@arcgis/core 6.0.0-next.6 → 6.0.0-next.8

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 (257) hide show
  1. package/arcade/functions/knowledgegraph.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{f09c9d9a554c33a753b4.js → 02253bdffbd580af22d8.js} +1 -1
  4. package/assets/esri/core/workers/chunks/06ab24a083c3229228dd.js +1 -0
  5. package/assets/esri/core/workers/chunks/09a63cc1987f8636c5b0.js +1 -0
  6. package/assets/esri/core/workers/chunks/{8ba32d3a0df4a206ef1c.js → 15cc2c295682f48030f9.js} +1 -1
  7. package/assets/esri/core/workers/chunks/17b76e0d401c7e396d10.js +1 -0
  8. package/assets/esri/core/workers/chunks/{c18189710d6198516175.js → 19b9d393046a780e6c3f.js} +1 -1
  9. package/assets/esri/core/workers/chunks/1b35ec54968fbeec17ce.js +1 -0
  10. package/assets/esri/core/workers/chunks/1c0c5cb13c2590aae906.js +1 -0
  11. package/assets/esri/core/workers/chunks/1e0d2715d603f48a7e0b.js +1 -0
  12. package/assets/esri/core/workers/chunks/{83589144eeeb08f45557.js → 2aeb5cc32284dd3e4d22.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{9a7fc93cc693fd12b5d8.js → 2b6c74646ff475a6e302.js} +1 -1
  14. package/assets/esri/core/workers/chunks/2d9a1f23ec6ce90723ac.js +1 -0
  15. package/assets/esri/core/workers/chunks/340621182db9e8edbec2.js +1 -0
  16. package/assets/esri/core/workers/chunks/{71f739bb3f7350704af6.js → 384ae10053d35940de73.js} +1 -1
  17. package/assets/esri/core/workers/chunks/3b3e519f15ed52c83f0c.js +1 -0
  18. package/assets/esri/core/workers/chunks/{72019baeba520edb6bb0.js → 3b737dae6efed627406e.js} +1 -1
  19. package/assets/esri/core/workers/chunks/3c0ed15b544df6fb0903.js +1 -0
  20. package/assets/esri/core/workers/chunks/3ffda5bf0b91700dc308.js +1 -0
  21. package/assets/esri/core/workers/chunks/{1317ecdfd0cfa683a493.js → 42323093827adffe56d3.js} +1 -1
  22. package/assets/esri/core/workers/chunks/451d7d456df0f4466563.js +1 -0
  23. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +1 -0
  24. package/assets/esri/core/workers/chunks/4e544de61f07ca660236.js +1 -0
  25. package/assets/esri/core/workers/chunks/{67ac6b326bf80fc3d33d.js → 53be85d04cd2da4f391d.js} +1 -1
  26. package/assets/esri/core/workers/chunks/54778dec1598818d93cb.js +1 -0
  27. package/assets/esri/core/workers/chunks/{06e7400f5ebe0719b81c.js → 5a5d80c2519aa3ea8878.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{fb4ff0ac2bc445fec413.js → 5b434e8c98e7119d4a3b.js} +1 -1
  29. package/assets/esri/core/workers/chunks/606ea251075fe81a1206.js +1 -0
  30. package/assets/esri/core/workers/chunks/{3ac9dcbb0571a2580236.js → 62c8c9ad09e0166207fd.js} +1 -1
  31. package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +1 -0
  32. package/assets/esri/core/workers/chunks/{ac4cc49104d26c384e98.js → 658b2642ab6880770e4e.js} +1 -1
  33. package/assets/esri/core/workers/chunks/68be3fb88ca61f82fb90.js +1 -0
  34. package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +1 -0
  35. package/assets/esri/core/workers/chunks/6ebe73f69ae822053b70.js +1 -0
  36. package/assets/esri/core/workers/chunks/6ef647b7769d27529f9c.js +1 -0
  37. package/assets/esri/core/workers/chunks/709e019885822b1f6f3e.js +1 -0
  38. package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +1 -0
  39. package/assets/esri/core/workers/chunks/{cbe6c0f32608cb504695.js → 776ae25a34352d3468bc.js} +1 -1
  40. package/assets/esri/core/workers/chunks/8730e7e6e0296f43f10b.js +1 -0
  41. package/assets/esri/core/workers/chunks/8bea0d706ede6f84f8aa.js +1 -0
  42. package/assets/esri/core/workers/chunks/900181f68449d8f82eeb.js +1 -0
  43. package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{1ef39aef6b33c530cbe4.js → 966d0832a3c1f03668a0.js} +1 -1
  45. package/assets/esri/core/workers/chunks/9a28a66807a1e3557018.js +1 -0
  46. package/assets/esri/core/workers/chunks/{2f9033890c465acff698.js → 9bf48a907f91ea004648.js} +1 -1
  47. package/assets/esri/core/workers/chunks/9c7fa9d324fa0bf64d9c.js +1 -0
  48. package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +1 -0
  49. package/assets/esri/core/workers/chunks/{1ba1f705b6ce5c8ea702.js → a655ebdb4bf0660615a2.js} +1 -1
  50. package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +1 -0
  51. package/assets/esri/core/workers/chunks/af349c7bc8ef41a0e1bd.js +1 -0
  52. package/assets/esri/core/workers/chunks/{250d3be6d3849d71fed8.js → c29c474c4b1049352d3e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/c8ba0673d1b87216e619.js +1 -0
  54. package/assets/esri/core/workers/chunks/{4d3f97a48046021713a6.js → ceb112fe7aef354f8051.js} +1 -1
  55. package/assets/esri/core/workers/chunks/d6ad4390df576198e45b.js +1 -0
  56. package/assets/esri/core/workers/chunks/ddf0671976648f621269.js +1 -0
  57. package/assets/esri/core/workers/chunks/ded8b64a46992c3ae693.js +1 -0
  58. package/assets/esri/core/workers/chunks/{0b36abcbf03037b4073d.js → e1af43e2a8f2ef1059e3.js} +1 -1
  59. package/assets/esri/core/workers/chunks/eaf6d587477399a83088.js +1 -0
  60. package/assets/esri/core/workers/chunks/ecaac39dde7ec4213264.js +1 -0
  61. package/assets/esri/core/workers/chunks/f122c18af10e56f9ec2b.js +1 -0
  62. package/assets/esri/core/workers/chunks/f31b424a3667686af10c.js +1 -0
  63. package/assets/esri/core/workers/chunks/{711cfb84659cb4437679.js → f528ac5c648ca6a98582.js} +1 -1
  64. package/assets/esri/core/workers/chunks/f92364afaefbac7e8f77.js +1 -0
  65. package/assets/esri/core/workers/chunks/fb444954be74c1962ced.js +1 -0
  66. package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +1 -0
  67. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +1 -1
  68. package/assets/esri/themes/base/widgets/_Features.scss +1 -1
  69. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +5 -9
  70. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +2 -4
  71. package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -1
  72. package/assets/esri/themes/dark/main.css +1 -1
  73. package/assets/esri/themes/light/main.css +1 -1
  74. package/assets/esri/themes/light/view.css +1 -1
  75. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
  76. package/chunks/GlobalIllumination.glsl.js +4 -2
  77. package/chunks/GlobalIlluminationBlur.glsl.js +3 -5
  78. package/chunks/GlobalIlluminationUpscale.glsl.js +1 -1
  79. package/config.js +1 -1
  80. package/core/colorUtils.js +1 -1
  81. package/core/has.js +1 -1
  82. package/core/workers/workerFactory.js +1 -1
  83. package/form/elements/inputs/DynamicChoiceInput.d.ts +35 -5
  84. package/geometry/projectionUtils.js +1 -1
  85. package/geometry/support/scaleUtils.js +1 -1
  86. package/kernel.js +1 -1
  87. package/layers/ParquetLayer.d.ts +3 -2
  88. package/layers/ParquetLayer.js +1 -1
  89. package/layers/graphics/data/FeatureStore.js +1 -1
  90. package/layers/graphics/data/QueryEngineResult.js +1 -1
  91. package/layers/graphics/data/geometryUtils.js +1 -1
  92. package/layers/graphics/data/projectionSupport.js +1 -1
  93. package/layers/knowledgeGraph/layerUtils.js +1 -1
  94. package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
  95. package/layers/mixins/ScaleRangeLayer.js +1 -1
  96. package/layers/mixins/SublayersOwner.js +1 -1
  97. package/layers/raster/datasets/TIFFRaster.js +1 -1
  98. package/layers/support/Sublayer.js +1 -1
  99. package/layers/support/SubtypeSublayer.js +1 -1
  100. package/package.json +2 -2
  101. package/popup/FeaturesModel.d.ts +26 -5
  102. package/popup/FeaturesModel.js +1 -1
  103. package/rest/support/printTaskUtils.js +1 -1
  104. package/symbols/cim/CIMSymbolHelper.js +1 -1
  105. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  106. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  107. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  108. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  109. package/views/2d/layers/LayerView2D.js +1 -1
  110. package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
  111. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  112. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  113. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  114. package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +1 -1
  115. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  116. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  117. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  118. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  119. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  120. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  121. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  122. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  123. package/views/3d/analysis/Viewshed/types.d.ts +3 -1
  124. package/views/3d/environment/Environment.d.ts +2 -2
  125. package/views/3d/environment/Environment.js +1 -1
  126. package/views/3d/environment/EnvironmentView.js +2 -0
  127. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  128. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  129. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  130. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  131. package/views/3d/layers/FlowSubView3D.js +1 -1
  132. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  133. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  134. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  135. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  136. package/views/3d/layers/MediaLayerView3D.js +1 -1
  137. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  138. package/views/3d/layers/RouteLayerView3D.js +1 -1
  139. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  140. package/views/3d/layers/SceneLayerView3D.js +1 -1
  141. package/views/3d/layers/TiledLayerView3D.js +1 -1
  142. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  143. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  144. package/views/3d/layers/graphics/Labeler.js +1 -1
  145. package/views/3d/layers/support/FeatureTile.js +1 -1
  146. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  147. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  148. package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +1 -1
  149. package/views/3d/support/elevationUpdateUtils.js +1 -1
  150. package/views/3d/support/popupHitTest.js +1 -1
  151. package/views/3d/terrain/TerrainRenderer.js +1 -1
  152. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  153. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  154. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  155. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js +2 -2
  156. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  157. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  158. package/views/SceneView.js +1 -1
  159. package/views/draw/Draw.d.ts +1 -1
  160. package/views/draw/support/InteractiveHandle.js +1 -1
  161. package/views/interactive/options/SnappingOptions.d.ts +1 -0
  162. package/views/interactive/options/TooltipOptions.d.ts +1 -0
  163. package/views/interactive/options/ViewOptions.d.ts +1 -0
  164. package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
  165. package/views/interactive/support/Units.d.ts +1 -0
  166. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  167. package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
  168. package/views/layers/LayerView.js +1 -1
  169. package/views/layers/LineOfSightLayerView.d.ts +3 -4
  170. package/views/layers/ViewshedLayerView.d.ts +5 -6
  171. package/views/support/layerViewUtils.js +1 -1
  172. package/views/support/projectionUtils.js +1 -1
  173. package/widgets/BasemapLayerList.js +1 -1
  174. package/widgets/BatchAttributeForm.js +1 -1
  175. package/widgets/DirectionalPad.js +1 -1
  176. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  177. package/widgets/Editor.d.ts +10 -0
  178. package/widgets/Expand.js +1 -1
  179. package/widgets/FeatureForm.d.ts +2 -2
  180. package/widgets/FeatureForm.js +1 -1
  181. package/widgets/FeatureTable/FieldColumn.js +1 -1
  182. package/widgets/FeatureTable.js +1 -1
  183. package/widgets/Features/FeaturesDrillIn.js +1 -1
  184. package/widgets/Features.js +1 -1
  185. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  186. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  187. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  188. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  189. package/widgets/PanoramicVideoViewer.js +1 -1
  190. package/widgets/Print.js +1 -1
  191. package/widgets/ScaleRangeSlider.js +1 -1
  192. package/widgets/Search/SearchResultRenderer.js +1 -1
  193. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  194. package/widgets/Sketch/SketchViewModel.d.ts +1 -1
  195. package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
  196. package/widgets/Sketch.d.ts +1 -1
  197. package/widgets/Track/TrackViewModel.d.ts +1 -1
  198. package/widgets/UtilityNetworkAssociations.js +1 -1
  199. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  200. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  201. package/widgets/UtilityNetworkTrace/types.d.ts +2 -2
  202. package/widgets/UtilityNetworkTrace.js +1 -1
  203. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  204. package/widgets/ValuePicker.js +1 -1
  205. package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
  206. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  207. package/widgets/support/GridControls.js +1 -1
  208. package/widgets/support/PluginSettingsControls.js +1 -1
  209. package/widgets/support/SelectionToolbar.js +1 -1
  210. package/widgets/support/SnappingControls.js +1 -1
  211. package/widgets/support/componentsUtils.js +1 -1
  212. package/assets/esri/core/workers/chunks/00a600c71ceebe7bfeee.js +0 -1
  213. package/assets/esri/core/workers/chunks/00d24415bdeb0adae3df.js +0 -1
  214. package/assets/esri/core/workers/chunks/0193df3f9fb23633da87.js +0 -1
  215. package/assets/esri/core/workers/chunks/02d4f91652a79d2b637e.js +0 -1
  216. package/assets/esri/core/workers/chunks/07aa6d36f1006b6ab7ff.js +0 -1
  217. package/assets/esri/core/workers/chunks/107b025dc5b09465a78f.js +0 -1
  218. package/assets/esri/core/workers/chunks/1f43e06dcfe56229bb0f.js +0 -1
  219. package/assets/esri/core/workers/chunks/25d6c674b1c4829f040f.js +0 -1
  220. package/assets/esri/core/workers/chunks/25e6013e2c095629b236.js +0 -1
  221. package/assets/esri/core/workers/chunks/2a570ce6b99dac6ee996.js +0 -1
  222. package/assets/esri/core/workers/chunks/2c90f7a6432cd716db8b.js +0 -1
  223. package/assets/esri/core/workers/chunks/2e6a2f4d686b71249c0e.js +0 -1
  224. package/assets/esri/core/workers/chunks/303fde8f3459dde16555.js +0 -1
  225. package/assets/esri/core/workers/chunks/350540770781b281c39a.js +0 -1
  226. package/assets/esri/core/workers/chunks/3880d2c7fb14955d7f93.js +0 -1
  227. package/assets/esri/core/workers/chunks/3b017b718ea2d4ed498f.js +0 -1
  228. package/assets/esri/core/workers/chunks/43fc42405167a5537039.js +0 -1
  229. package/assets/esri/core/workers/chunks/4d82db661365daa513a6.js +0 -1
  230. package/assets/esri/core/workers/chunks/56851011276de0b3e318.js +0 -1
  231. package/assets/esri/core/workers/chunks/5f3ab77a79c408423fde.js +0 -1
  232. package/assets/esri/core/workers/chunks/633a9051580c5302d2f7.js +0 -1
  233. package/assets/esri/core/workers/chunks/6469c0d18d3663e7da4b.js +0 -1
  234. package/assets/esri/core/workers/chunks/65654e481cce9ae40e54.js +0 -1
  235. package/assets/esri/core/workers/chunks/669e39c3437d7273f0c7.js +0 -1
  236. package/assets/esri/core/workers/chunks/798a63653f82c0e842c5.js +0 -1
  237. package/assets/esri/core/workers/chunks/84fcbf7a1d04f01685d1.js +0 -1
  238. package/assets/esri/core/workers/chunks/8b54589f173259c1ba55.js +0 -1
  239. package/assets/esri/core/workers/chunks/8e511079918e2fd9261f.js +0 -1
  240. package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +0 -1
  241. package/assets/esri/core/workers/chunks/9673a9efec86040b8c13.js +0 -1
  242. package/assets/esri/core/workers/chunks/a010d2e4e34eb7bc1fec.js +0 -1
  243. package/assets/esri/core/workers/chunks/b05a41a60e30935644be.js +0 -1
  244. package/assets/esri/core/workers/chunks/bff767ec5bb4c0d6b324.js +0 -1
  245. package/assets/esri/core/workers/chunks/c906f984b2b6e7578c06.js +0 -1
  246. package/assets/esri/core/workers/chunks/d21257d2e2a37266c0f7.js +0 -1
  247. package/assets/esri/core/workers/chunks/d270cc9807161033686e.js +0 -1
  248. package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +0 -1
  249. package/assets/esri/core/workers/chunks/e5943f3a4bbc12c06c4d.js +0 -1
  250. package/assets/esri/core/workers/chunks/ec9a2425b4a498054a19.js +0 -1
  251. package/assets/esri/core/workers/chunks/f0a68d2900d24f56afa0.js +0 -1
  252. package/assets/esri/core/workers/chunks/f0aaa646b17ffdbdcefa.js +0 -1
  253. package/assets/esri/core/workers/chunks/f46a0d7cf588ba1b4157.js +0 -1
  254. package/assets/esri/core/workers/chunks/f762f70e7d39634ce797.js +0 -1
  255. package/assets/esri/core/workers/chunks/fccbb902fe08448f91de.js +0 -1
  256. package/assets/esri/core/workers/chunks/fd0254c6fc6c03ec11ba.js +0 -1
  257. package/views/3d/environment/EnvironmentManager.js +0 -2
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,3864],{52106(e,t,r){r.d(t,{A:()=>M});var i,s,o=r(32198),n=r(37838),l=r(69540),a=r(51447),u=r(25482),p=r(53966),d=r(36708),c=r(24326),y=r(91429),h=r(12195),g=r(65864),f=r(50498),m=r(55156),v=r(60950),b=r(54339),w=r(94128),S=r(33910);const x=Symbol("meshGeometryHandles");function C(e){if(null==e)return null;let t={};for(let r in e){let i=e[r];i&&(t[r]=i.toJSON())}return 0===Object.keys(t).length?null:t}let M=class extends((0,l.OU)(u.o)){static{i=w.Z}static{s=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new s({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,m.I)(this.origin);if(e)return(0,b.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){let e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:C(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=i),"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.removeHandles(x);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,d.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,d.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],x)}};(0,o.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let r in e){let i=(0,g.rS)(e[r]);i&&(t[r]=i)}return 0===Object.keys(t).length?null:t}}})],M.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,y.MZ)({value:null})],M.prototype,"attributes",null),(0,o.Cg)([(0,y.MZ)({value:null,types:f.yR,json:{read:g.rS}})],M.prototype,"geometry",null),(0,o.Cg)([(0,y.MZ)()],M.prototype,"distance",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,o.Cg)([(0,y.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,o.Cg)([(0,y.MZ)({type:n.A,value:null})],M.prototype,"popupTemplate",null),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],M.prototype,"statisticsAggregatedIds",void 0),(0,o.Cg)([(0,y.MZ)({value:null,types:S.Es})],M.prototype,"symbol",null),(0,o.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=s=(0,o.Cg)([(0,y.$K)("esri.Graphic")],M)},19334(e,t,r){r.d(t,{e:()=>n});var i=r(54639),s=r(14112);class o{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function n(e){if(null==e)return null;switch(e.type){case"point":if((0,s.e6)(e))return null;break;case"polygon":if((0,s.Wq)(e))return null;break;case"polyline":if((0,s.IY)(e))return null;break;case"multipoint":if((0,s.DG)(e))return null;break;case"extent":if((0,s.As)(e))return null;break;default:return null}let t=i.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new o(e));return t.asAccessorGeometry(),t}},36983(e,t,r){r.d(t,{R:()=>u,p:()=>p});var i=r(54639),s=r(14112),o=r(16930),n=r(60408),l=r(65864);class a{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){let t=(0,l.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function u(e,t){if("object"!=typeof e||!e)return null;let r=t;if("spatialReference"in e&&(e.spatialReference instanceof o.A?r=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(r=new o.A,r.read(e.spatialReference))),null==r)throw Error("Spatial reference required");return(0,n.fT)(e)?p("point",e,r):(0,n.Rg)(e)?p("polyline",e,r):(0,n.Bi)(e)?p("polygon",e,r):(0,n.U9)(e)?p("multipoint",e,r):(0,n.ZC)(e)?p("extent",e,r):null}function p(e,t,r){if(null==t)return null;let o=!1,n=!1;switch(e){case"point":if((0,s.e6)(t))return null;o=void 0!==t.z,n=void 0!==t.m;break;case"polygon":if((0,s.Wq)(t))return null;o=!0===t.hasZ,n=!0===t.hasM;break;case"polyline":if((0,s.IY)(t))return null;o=!0===t.hasZ,n=!0===t.hasM;break;case"multipoint":if((0,s.DG)(t))return null;o=!0===t.hasZ,n=!0===t.hasM;break;case"extent":if((0,s.As)(t))return null;o=null!=t.zmin&&null!=t.zmax,n=null!=t.mmin&&null!=t.mmax;break;default:throw Error("Unsupported geometry type: "+t.type)}return i.R.of(e,r,o,n,new a(t))}},14112(e,t,r){function i(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function s(e){if(0===(e.curveRings??e.rings).length)return!0;for(let t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function o(e){if(0===(e.curvePaths??e.paths).length)return!0;for(let t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function n(e){return 0===e.points.length}function l(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}r.d(t,{As:()=>l,DG:()=>n,IY:()=>o,Wq:()=>s,e6:()=>i})},46140(e,t,r){r.d(t,{A:()=>s});var i=r(49186);class s{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new s(this.major,this.minor,this._context)}static parse(e,t=""){let[r,o]=e.split("."),n=/^\s*\d+\s*$/;if(!r?.match||!n.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!o?.match||!n.test(o)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new s(parseInt(r,10),parseInt(o,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>c});var i=r(69622),s=r(7762),o=r(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=a(e),s=a(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let o=s.filter(e=>!i.includes(e)),c=i.filter(e=>!s.includes(e)),y=i.filter(r=>s.includes(r)&&u(e,r)!==u(t,r)).concat(o,c).sort(),h=p(e);if(h&&n.has(h)&&y.length)return{type:"complete",oldValue:e,newValue:t};let g,f=l(e)&&l(t);for(let i of y){let s,o=u(e,i),n=u(t,i);if((f||"function"!=typeof o&&"function"!=typeof n)&&o!==n&&(null!=o||null!=n)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(o,n);else if(o instanceof Date&&n instanceof Date){if(o.getTime()===n.getTime())continue;s={type:"complete",oldValue:o,newValue:n}}else s="object"==typeof o&&"object"==typeof n&&p(o)===p(n)?d(o,n):{type:"complete",oldValue:o,newValue:n};null!=s&&(null==g?g={type:"partial",diff:{[i]:s}}:g.diff[i]=s)}}return g}function c(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},13069(e,t,r){r.d(t,{AG:()=>l,lk:()=>s,vD:()=>n,yS:()=>o});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${s().toUpperCase()}}`}function n(){return`{${s()}}`}function l(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},83027(e,t,r){const i=r(29953).ho;r.d(t,["h",0,i])},55156(e,t,r){r.d(t,{I:()=>s});const i=Symbol("idFieldsProviderSymbol");function s(e){return(t=e)&&i in t?e[i]:void 0;var t}r.d(t,["e",0,i])},15481(e,t,r){r.r(t),r.d(t,{default:()=>se});var i=r(32198),s=r(37838),o=r(25728),n=r(17676),l=r(84952),a=r(91429),u=r(5443),p=r(16930),d=r(50498),c=r(41910),y=r(55156),h=r(60950),g=r(89808),f=r(99959);const m=Symbol("isGeoJSONGraphicOrigin");var v;class b extends f.A{get[(v=m,h.ym)](){return this.layer}get[y.e](){return this.layer}get[g.Q](){return this.layer}get[c.e7](){return this.layer}constructor(e){super(),this[v]=!0,this.type="geojson",this.layer=e}get id(){return this.layer.id}}var w=r(4146),S=r(49186),x=r(44208),C=r(92474),M=r(53966),A=r(83027),I=r(39829),E=r(64714),_=r(22671);let P=class extends C.x_{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,n.sg)(async e=>{await this.load();let{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}queryFeatures(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)).then(e=>_.A.fromJSON(e))}queryFeaturesJSON(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:u.A.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}_applyEdits(e){if(!this._connection)throw new S.A("geojson-layer-source:edit-failure","Memory source not loaded");let t=this.layer.objectIdField,r=[],i=[],s=[];if(e.addFeatures)for(let t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(let r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?i.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&i.push(r.attributes[t]);if(e.updateFeatures)for(let t of e.updateFeatures)s.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:s,deletes:i}).then(({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r)))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){let t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new S.A("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){let{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){let{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?I.A.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,A.h)("GeoJSONSourceWorker",{strategy:(0,x.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});let{fields:t,spatialReference:r,hasZ:i,geometryType:s,objectIdField:o,url:n,timeInfo:l,customParameters:a}=this.layer,u="defaults"===this.layer.originOf("spatialReference"),p={url:n,customParameters:a,fields:t&&t.map(e=>e.toJSON()),geometryType:d.gy.toJSON(s),hasZ:i,objectIdField:o,timeInfo:l?l.toJSON():null,spatialReference:u?null:r&&r.toJSON()},c=await this._connection.invoke("load",p,{signal:e});for(let e of c.warnings)M.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});c.featureErrors.length&&M.A.getLogger(this.layer).warn("#load()",`Encountered ${c.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:c.featureErrors}),this.sourceJSON=c.layerDefinition,this.capabilities=(0,E.f)(this.sourceJSON.hasZ,!0)}};(0,i.Cg)([(0,a.MZ)()],P.prototype,"capabilities",void 0),(0,i.Cg)([(0,a.MZ)()],P.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],P.prototype,"layer",void 0),(0,i.Cg)([(0,a.MZ)()],P.prototype,"sourceJSON",void 0),P=(0,i.Cg)([(0,a.$K)("esri.layers.graphics.sources.GeoJSONSource")],P);var T=r(63074),O=r(69208),F=r(6455),Z=r(87718),L=r(56658),j=r(34287),R=r(32756),N=r(8303),G=r(54310),D=r(25036),$=r(82935),J=r(63396),z=r(10873),B=r(15426),U=r(29005),k=r(20437),q=r(17036),V=r(30524),H=r(46499),Q=r(39383),K=r(41214),W=r(97552),Y=r(30291),X=r(79677),ee=r(10184),te=r(56400);const re=(0,q.p)();let ie=class extends((0,R.fY)((0,F.FJ)((0,O.d)((0,L.J)((0,Z.F)((0,T.dM)((0,$.e)((0,J.d)((0,D.j)((0,G.J)((0,j.q)((0,N.A)((0,o.M)(w.A)))))))))))))){constructor(e){super(e),this.timeInfo=null,this.attributeTableTemplate=null,this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new b(this),this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new P({layer:this}),this.spatialReference=p.A.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){this.source?.destroy()}load(e){let t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(n.QP).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),(0,V.yp)(this.renderer,this.fieldsIndex),(0,V.sv)(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return(0,l.An)(this.url)}set renderer(e){(0,V.yp)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);let t=(0,l.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){let{applyEdits:i}=await r.e(8628).then(()=>r(78628));await this.load();let s=await i(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),s}createPopupTemplate(e){return(0,Y.tn)(this,e)}createQuery(){let e=new W.A,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";let{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(W.A.from(e)||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(W.A.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(W.A.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(W.A.from(e)||this.createQuery(),t))}async queryAttributeBins(e,t){let{source:i,capabilities:s}=await this.load();(0,B.ZJ)(e,s,"GeoJSONLayer");let o=await r.e(4575).then(()=>r(14575)),n=await i.queryAttributeBins(o.default.from(e),t);if(n.features)for(let e of n.features)e.layer=e.sourceLayer=this;return n}read(e,t){super.read(e,t),"service"===t?.origin&&["objectIdField","fields","timeInfo"].forEach(e=>this.revertToOrigin(e,"service"))}async hasDataChanged(){try{let{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,i.Cg)([(0,a.MZ)({type:X.A})],ie.prototype,"timeExtent",void 0),(0,i.Cg)([(0,a.MZ)({type:ee.A})],ie.prototype,"timeOffset",void 0),(0,i.Cg)([(0,a.MZ)((0,z.U$)({alwaysWriteNonItemOrigin:!0}))],ie.prototype,"timeInfo",void 0),(0,i.Cg)([(0,a.MZ)(z.zQ)],ie.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1,write:!1}})],ie.prototype,"capabilities",null),(0,i.Cg)([(0,a.MZ)({type:String})],ie.prototype,"copyright",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ie.prototype,"createQueryVersion",null),(0,i.Cg)([(0,a.MZ)((0,te.P6)("dateFieldsTimeReference"))],ie.prototype,"dateFieldsTimeZone",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ie.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ie.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,a.MZ)({type:String})],ie.prototype,"displayField",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],ie.prototype,"editingEnabled",void 0),(0,i.Cg)([(0,a.MZ)(z.Yj)],ie.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,a.MZ)({type:[k.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],ie.prototype,"fields",void 0),(0,i.Cg)([(0,a.MZ)(re.fieldsIndex)],ie.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,a.MZ)({type:u.A,json:{name:"extent"}})],ie.prototype,"fullExtent",void 0),(0,i.Cg)([(0,a.MZ)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:d.gy.read}}})],ie.prototype,"geometryType",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0,clonable:!1})],ie.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],ie.prototype,"hasZ",void 0),(0,i.Cg)([(0,a.MZ)(z.id)],ie.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,readOnly:!0})],ie.prototype,"isTable",null),(0,i.Cg)([(0,a.MZ)(z.kF)],ie.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,a.MZ)({type:[H.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Q.w},write:!0}})],ie.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,a.MZ)(z.fV)],ie.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,a.MZ)({type:["show","hide"]})],ie.prototype,"listMode",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],ie.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)(z.ke)],ie.prototype,"opacity",void 0),(0,i.Cg)([(0,a.MZ)({type:["GeoJSON"]})],ie.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,a.MZ)(re.outFields)],ie.prototype,"outFields",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ie.prototype,"parsedUrl",null),(0,i.Cg)([(0,a.MZ)(z.M6)],ie.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,a.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],ie.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,a.MZ)({types:K.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:K.XJ}}}})],ie.prototype,"renderer",null),(0,i.Cg)([(0,a.MZ)(z.PY)],ie.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ie.prototype,"source",void 0),(0,i.Cg)([(0,a.MZ)({type:p.A})],ie.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({type:[U.A]})],ie.prototype,"templates",void 0),(0,i.Cg)([(0,a.MZ)()],ie.prototype,"title",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1},readOnly:!0})],ie.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)(z.OZ)],ie.prototype,"url",null),ie=(0,i.Cg)([(0,a.$K)("esri.layers.GeoJSONLayer")],ie);const se=ie},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},54339(e,t,r){function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let r=[];for(let i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>s})},64714(e,t,r){r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>c,f:()=>y});var i=r(44208),s=r(4718),o=r(99352),n=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.Cb:"esriGeometryPolyline"===e?n.yM:n.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${d(t)} = null;`);for(let t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;let i=Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return a.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},69208(e,t,r){var i=r(32198),s=r(91429);r.d(t,["d",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),s=r(93637),o=r(91429),n=r(91880);function l(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let s=new n.A;return s.read(i,r),[s]}const a={type:[n.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){let o=e.find(e=>!!e.field);o&&(0,s.sM)(r,[o.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,o.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},8303(e,t,r){var i=r(32198),s=r(92602),o=r(70333),n=r(56507),l=r(60999),a=r(49186),u=r(36563),p=r(53966),d=r(97768),c=r(17676),y=r(84952),h=r(91429),g=r(77548),f=r(20655),m=r(80812),v=r(41318),b=r(10407),w=r(36005),S=r(43937);const x={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,C=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,d.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:s}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,s,n=!o.id?.findCredential(this.url),l=e===r.id;if(l&&r.portal.user)return this._getUserPrivileges(r,n);if(l)i=r.portal.url;else try{i=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,y.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;s=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await r.reload():(r=new m.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,b.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;let r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,s=f.A.getDefault();if(s&&s.loaded&&(0,y.S8)(s.restUrl)===(0,y.S8)(i))return s.user;let a=`${i}/community/self`,u=null==e?null:e.signal,p=await(0,l.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){let r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||f.A.getDefault());return r&&i&&!(0,y.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,h.MZ)({type:m.default})],C.prototype,"portalItem",null),(0,i.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],C.prototype,"readPortalItem",null),(0,i.Cg)([(0,S.K)("web-document","portalItem",{itemId:{type:String}})],C.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],C.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasUpdateItemPrivileges",void 0),C=(0,i.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],C),C}])},82935(e,t,r){var i=r(32198),s=r(91429),o=r(30524),n=r(96184),l=r(73133),a=r(79677),u=r(10184),p=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,d,"e",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){let r=t.timeInfo.exportOptions;if(!r)return null;let i=r.timeOffset,s=l.j.fromJSON(r.timeOffsetUnits);return i&&s?new u.A({value:i,unit:s}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,s.MZ)({type:a.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,s.MZ)({type:u.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,p.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,s.MZ)({value:null,type:n.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,s.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},63396(e,t,r){r.d(t,{d:()=>C});var i=r(32198),s=r(91429),o=r(41910),n=r(60950),l=r(99959);class a extends l.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[n.ym](){return this.trackInfoProvider.trackInfo}get[o.e7](){return this.trackInfoProvider}}var u=r(37838),p=r(69540),d=r(25482),c=r(93637),y=r(50820),h=r(10873),g=r(46499),f=r(41214);let m=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,i.Cg)([(0,s.MZ)({type:[g.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,s.MZ)(h.kF)],m.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,s.MZ)({types:f.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,i.Cg)([(0,s.$K)("esri.layers.support.TrackPartInfo")],m);var v=r(96576),b=r(59868),w=r(10184),S=r(43937);let x=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new v.A({symbol:b.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new v.A({symbol:b.UK.clone()})}),this.trackLines=new m({renderer:new v.A({symbol:b.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){let i=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,c.sM)(r,i,t)}};(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],x.prototype,"enabled",void 0),(0,i.Cg)([(0,s.MZ)({type:[y.A],json:{write:!0}})],x.prototype,"fields",void 0),(0,i.Cg)([(0,S.K)("fields")],x.prototype,"writeFields",null),(0,i.Cg)([(0,s.MZ)({type:m,json:{write:!0}})],x.prototype,"latestObservations",void 0),(0,i.Cg)([(0,s.MZ)({type:w.A,json:{write:!0}})],x.prototype,"maxDisplayDuration",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],x.prototype,"maxDisplayObservationsPerTrack",void 0),(0,i.Cg)([(0,s.MZ)(h.M6)],x.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,s.MZ)({type:u.A,json:{name:"popupInfo",write:!0}})],x.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,s.MZ)({type:m,json:{write:!0}})],x.prototype,"previousObservations",void 0),(0,i.Cg)([(0,s.MZ)({type:m,json:{write:!0}})],x.prototype,"trackLines",void 0),(0,i.Cg)([(0,s.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],x.prototype,"timeField",void 0),x=(0,i.Cg)([(0,s.$K)("esri.layers.support.TrackInfo")],x);const C=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new a(this),this.trackInfo=null}};return(0,i.Cg)([(0,s.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,i.Cg)([(0,s.MZ)({type:x})],r.prototype,"trackInfo",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.TrackableLayer")],r),r}},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),s=r(69540),o=r(66552),n=r(25482),l=r(91429);const a=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},46499(e,t,r){r.d(t,{A:()=>M});var i,s,o=r(32198),n=(r(44208),r(66552)),l=r(25482),a=r(4718),u=r(90629),p=r(91429),d=r(90360),c=r(73913),y=r(32730),h=r(77548),g=r(59868),f=r(73838),m=r(33910),v=r(36005),b=r(43937);const w=new n.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function S(e,t,r){return{enabled:!(0,h.TU)(r?.layer)}}function x(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function C(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let M=class extends l.o{static{i=y.vK}static{s=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),s=i[3],o=r(t[i[4]],i[5],i[6]);switch(s){case"AND":return e&&o;case"OR":return e||o}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=g.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&x(i))e=new c.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let s=e.toJSON(i);s.expression&&(t[r]=s)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new s({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],M.prototype,"name",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],M.prototype,"allowOverrun",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],M.prototype,"deconflictionStrategy",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&C(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],M.prototype,"labelExpression",void 0),(0,o.Cg)([(0,v.w)("labelExpression")],M.prototype,"readLabelExpression",null),(0,o.Cg)([(0,b.K)("labelExpression")],M.prototype,"writeLabelExpression",null),(0,o.Cg)([(0,p.MZ)({type:c.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return x(e)||C(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],M.prototype,"labelExpressionInfo",void 0),(0,o.Cg)([(0,b.K)("labelExpressionInfo")],M.prototype,"writeLabelExpressionInfo",null),(0,o.Cg)([(0,p.MZ)({type:w.apiValues,json:{type:w.jsonValues,read:w.read,write:w.write}})],M.prototype,"labelPlacement",void 0),(0,o.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],M.prototype,"offsetDistance",void 0),(0,o.Cg)([(0,p.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],M.prototype,"labelPosition",void 0),(0,o.Cg)([(0,p.MZ)({type:Number})],M.prototype,"maxScale",void 0),(0,o.Cg)([(0,b.K)("maxScale")],M.prototype,"writeMaxScale",null),(0,o.Cg)([(0,p.MZ)({type:Number})],M.prototype,"minScale",void 0),(0,o.Cg)([(0,b.K)("minScale")],M.prototype,"writeMinScale",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],M.prototype,"repeatLabel",void 0),(0,o.Cg)([(0,p.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],M.prototype,"repeatLabelDistance",null),(0,o.Cg)([(0,p.MZ)({types:m.em,json:{types:m.em,origins:{"portal-item":{types:m.em,read:{reader:(0,d.C)({types:m.em})},default:null},"web-scene":{types:m.Rv,read:{reader:(0,d.C)({types:m.Rv})},write:f.oO,default:null}},write:f.oO,default:null}})],M.prototype,"symbol",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],M.prototype,"useCodedValues",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],M.prototype,"where",void 0),M=s=(0,o.Cg)([(0,p.$K)("esri.layers.support.LabelClass")],M)},73913(e,t,r){r.d(t,{A:()=>p});var i,s=r(32198),o=r(25482),n=r(91429),l=r(32730),a=r(36005),u=r(43937);let p=class extends o.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,l.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,l.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,s.Cg)([(0,n.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],p.prototype,"name",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],p.prototype,"expression",void 0),(0,s.Cg)([(0,a.w)("expression",["expression","value"])],p.prototype,"readExpression",null),(0,s.Cg)([(0,u.K)("expression")],p.prototype,"writeExpression",null),(0,s.Cg)([(0,n.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],p.prototype,"title",void 0),(0,s.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],p.prototype,"value",void 0),p=i=(0,s.Cg)([(0,n.$K)("esri.layers.support.LabelExpressionInfo")],p)},91880(e,t,r){r.d(t,{A:()=>u});var i,s=r(32198),o=r(66552),n=r(25482),l=r(91429);const a=new o.J({asc:"ascending",desc:"descending"});let u=class extends n.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,s.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"order",void 0),u=i=(0,s.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},41560(e,t,r){r.d(t,{Ch:()=>n,mW:()=>o});var i=r(34727),s=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){let o=function(e){if("manual"===u(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(o&&((0,i.gg)(t,o[0])||(0,i.ZH)(r,o[1])))return"";let n=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;let s=p(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,i.ZH)(s,t)||(0,i.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],s=e[t+1];if((0,i.ZH)(p(s.minScale),d(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,s.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,s){return e=p(e),r=p(r),t=d(t),!(!(0,i.Sp)(r,e)&&(s??r)>e||(0,i.Hx)(t,r)||void 0!==s&&(0,i.Sp)(s,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||1/0}function d(e){return e||0}},17036(e,t,r){r.d(t,{p:()=>a});var i=r(44208),s=r(53966),o=r(20437),n=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return n.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,l.DB)(this.fieldsIndex,e)}}}}},32730(e,t,r){r.d(t,{BI:()=>d,D3:()=>u,XJ:()=>p,lc:()=>a,mX:()=>y,rU:()=>c,tH:()=>v,zA:()=>w});var i=r(799);const s=RegExp("__begin__","ig"),o=RegExp("__end__","ig"),n=RegExp("^__begin__","i"),l=RegExp("__end__$","i");function a(e){return e.replaceAll(RegExp("\\[","g"),"{").replaceAll(RegExp("\\]","g"),"}")}function u(e){return e.replaceAll(RegExp("\\{","g"),"[").replaceAll(RegExp("\\}","g"),"]")}function p(e){let t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=a(e.labelExpression),t.type="conventional"),t}function d(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function c(e){let t=p(e);if(!t)return null;switch(t.type){case"conventional":return function(e){return(e?.match(h))?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function y(e){let t;return e?(t=(0,i.HC)(e,e=>'__begin__$feature["'+e+'"]__end__'),t=n.test(t)?t.replace(n,""):'"'+t,t=l.test(t)?t.replace(l,""):t+'"',t=t.replaceAll(s,'" + ').replaceAll(o,' + "')):t='""',t}const h=/^\s*\{([^}]+)\}\s*$/i,g=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,f=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,m=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=g.exec(e)||f.exec(e);return t?t[1]||t[3]:(t=m.exec(e),t?t[2]:null)}const b=Symbol("LabelClassInstance");function w(e){return"object"==typeof e&&!!e&&b in e}r.d(t,["vK",0,b])},39383(e,t,r){r.d(t,{w:()=>a,z:()=>d});var i=r(49186),s=r(53966),o=r(46499);const n=()=>s.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function a(e,t,r){return e?e.map(e=>{let i=new o.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const u=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],p={esriGeometryPoint:u,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:u,esriGeometryEnvelope:null};function d(e,t){let r=[];for(let s of e){let e=s.labelPlacement,o=p[t];if(!s.symbol)return n().warn("No ILabelClass symbol specified."),[];if(!o)return n().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(o.includes(e))r.push(s);else{let i=o[0];e&&n().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let l=s.clone();l.labelPlacement=i,r.push(l)}}return r}},10407(e,t,r){r.d(t,{It:()=>y,LG:()=>n,OM:()=>u,Sm:()=>p,Y:()=>l,bK:()=>a,sQ:()=>d});var i=r(99917),s=r(16930),o=r(28735);function n(e,t){if(!l(e,t)){let r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,c.HOSTED_SERVICE)}function u(e,t){let r=e.typeKeywords;if(r){let e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?n(e,t):u(e,t)}async function d(e){let t,r=e.clone().normalize();if(r.length>1)for(let e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);let r=s.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(t)}const c={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function y(e){let{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges,o=!s||s.includes("features:user:edit"),n=!!r&&!!s?.includes("features:user:fullEdit"),l="update"===i||"admin"===i;return l?n=o=!0:n&&(o=!0),{features:{edit:o,fullEdit:n},content:{updateItem:l}}}r.d(t,["mm",0,c])},73681(e,t,r){r.d(t,{n:()=>a});var i=r(49186),s=r(53966),o=r(46140),n=r(95466),l=r(55674);class a{static async from(e,t,r){let n=e.dictionary_version?o.A.parse(e.dictionary_version):null,p=new Set(e.itemsNames),d={};if(t)for(let e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);let c=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))c.delete(e);c.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});let y=await(0,l.xR)(e.expression,null,d);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let h=!n||!n.greaterEqual(4,0);h&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:n});let g=new u(r,h);return new a(h,p,y,g)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new n.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new n.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},22671(e,t,r){r.d(t,{A:()=>v});var i,s=r(32198),o=r(52106),n=r(66552),l=r(25482),a=r(4718),u=r(91429),p=r(16930),d=r(60408),c=r(65864),y=r(50498),h=r(20437),g=r(36005),f=r(43937);const m=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);let{features:s}=this;if(s)for(let e of s)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((s-e)/r));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,s],scale:[o,n]}=r,l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*o+i,e=>s-e*n,l,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=p.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){let o=e[t],n=r.fromJSON(o),l=o.geometry?.spatialReference;null!=n.geometry&&!l&&(n.geometry.spatialReference=i);let a=o.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}s.push(n)}return s}_quantizePoints(e,t,r){let i,s,o=[];for(let n=0,l=e.length;n<l;n++){let l=e[n];if(n>0){let e=t(l[0]),n=r(l[1]);(e!==i||n!==s)&&(o.push([e-i,n-s]),i=e,s=n)}else i=t(l[0]),s=r(l[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,d.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){let o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,d.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let o,n,l=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,i=l.length;e<i;e++){let i=l[e];for(let e=0,s=i.length;e<s;e++){let s=i[e];e>0?(o+=s[0],n+=s[1]):(o=s[0],n=s[1]),s[0]=t(o),s[1]=r(n)}}if(i&&s)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{let o,n,l=e.points;for(let e=0,i=l.length;e<i;e++){let i=l[e];e>0?(o+=i[0],n+=i[1]):(o=i[0],n=i[1]),i[0]=t(o),i[1]=r(n)}if(i&&s)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2])}else if(s)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=s(t[2])}}:null}};(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,s.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],v.prototype,"features",void 0),(0,s.Cg)([(0,g.w)("features")],v.prototype,"readFeatures",null),(0,s.Cg)([(0,u.MZ)({type:[h.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,s.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,s.Cg)([(0,f.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,s.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,s.Cg)([(0,g.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,s.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,s.Cg)([(0,f.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,s.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,s.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){var i=r(32198),s=r(66552),o=r(53966),n=r(91429),l=r(93223);const a=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field";r.d(t,["K",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&u||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===p||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(a,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,n.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,a])},93470(e,t,r){const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i};r.d(t,["Cb",0,s,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,i,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,o])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6377],{52106(e,t,r){r.d(t,{A:()=>A});var i,s,n=r(32198),o=r(37838),l=r(69540),a=r(51447),p=r(25482),u=r(53966),c=r(36708),g=r(24326),y=r(91429),d=r(12195),h=r(65864),m=r(50498),f=r(55156),b=r(60950),v=r(54339),w=r(94128),S=r(33910);const x=Symbol("meshGeometryHandles");function C(e){if(null==e)return null;let t={};for(let r in e){let i=e[r];i&&(t[r]=i.toJSON())}return 0===Object.keys(t).length?null:t}let A=class extends((0,l.OU)(p.o)){static{i=w.Z}static{s=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,g.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new s({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,f.I)(this.origin);if(e)return(0,v.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){let e=(0,f.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:C(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,d.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=i),"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.removeHandles(x);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,c.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],x)}};(0,n.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let r in e){let i=(0,h.rS)(e[r]);i&&(t[r]=i)}return 0===Object.keys(t).length?null:t}}})],A.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,y.MZ)({value:null})],A.prototype,"attributes",null),(0,n.Cg)([(0,y.MZ)({value:null,types:m.yR,json:{read:h.rS}})],A.prototype,"geometry",null),(0,n.Cg)([(0,y.MZ)()],A.prototype,"distance",void 0),(0,n.Cg)([(0,y.MZ)({type:Boolean})],A.prototype,"isAggregate",void 0),(0,n.Cg)([(0,y.MZ)({clonable:!1})],A.prototype,"layer",void 0),(0,n.Cg)([(0,y.MZ)({clonable:"reference"})],A.prototype,"origin",void 0),(0,n.Cg)([(0,y.MZ)({type:o.A,value:null})],A.prototype,"popupTemplate",null),(0,n.Cg)([(0,y.MZ)({clonable:"reference"})],A.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],A.prototype,"statisticsAggregatedIds",void 0),(0,n.Cg)([(0,y.MZ)({value:null,types:S.Es})],A.prototype,"symbol",null),(0,n.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],A.prototype,"_version",void 0),(0,n.Cg)([(0,y.MZ)({type:Boolean,value:!0})],A.prototype,"visible",null),A=s=(0,n.Cg)([(0,y.$K)("esri.Graphic")],A)},19334(e,t,r){r.d(t,{e:()=>o});var i=r(54639),s=r(14112);class n{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function o(e){if(null==e)return null;switch(e.type){case"point":if((0,s.e6)(e))return null;break;case"polygon":if((0,s.Wq)(e))return null;break;case"polyline":if((0,s.IY)(e))return null;break;case"multipoint":if((0,s.DG)(e))return null;break;case"extent":if((0,s.As)(e))return null;break;default:return null}let t=i.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new n(e));return t.asAccessorGeometry(),t}},36983(e,t,r){r.d(t,{R:()=>p,p:()=>u});var i=r(54639),s=r(14112),n=r(16930),o=r(60408),l=r(65864);class a{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){let t=(0,l.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function p(e,t){if("object"!=typeof e||!e)return null;let r=t;if("spatialReference"in e&&(e.spatialReference instanceof n.A?r=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(r=new n.A,r.read(e.spatialReference))),null==r)throw Error("Spatial reference required");return(0,o.fT)(e)?u("point",e,r):(0,o.Rg)(e)?u("polyline",e,r):(0,o.Bi)(e)?u("polygon",e,r):(0,o.U9)(e)?u("multipoint",e,r):(0,o.ZC)(e)?u("extent",e,r):null}function u(e,t,r){if(null==t)return null;let n=!1,o=!1;switch(e){case"point":if((0,s.e6)(t))return null;n=void 0!==t.z,o=void 0!==t.m;break;case"polygon":if((0,s.Wq)(t))return null;n=!0===t.hasZ,o=!0===t.hasM;break;case"polyline":if((0,s.IY)(t))return null;n=!0===t.hasZ,o=!0===t.hasM;break;case"multipoint":if((0,s.DG)(t))return null;n=!0===t.hasZ,o=!0===t.hasM;break;case"extent":if((0,s.As)(t))return null;n=null!=t.zmin&&null!=t.zmax,o=null!=t.mmin&&null!=t.mmax;break;default:throw Error("Unsupported geometry type: "+t.type)}return i.R.of(e,r,n,o,new a(t))}},14112(e,t,r){function i(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function s(e){if(0===(e.curveRings??e.rings).length)return!0;for(let t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function n(e){if(0===(e.curvePaths??e.paths).length)return!0;for(let t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function o(e){return 0===e.points.length}function l(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}r.d(t,{As:()=>l,DG:()=>o,IY:()=>n,Wq:()=>s,e6:()=>i})},46140(e,t,r){r.d(t,{A:()=>s});var i=r(49186);class s{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new s(this.major,this.minor,this._context)}static parse(e,t=""){let[r,n]=e.split("."),o=/^\s*\d+\s*$/;if(!r?.match||!o.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!n?.match||!o.test(n)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new s(parseInt(r,10),parseInt(n,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>g});var i=r(69622),s=r(7762),n=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof s.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function c(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=a(e),s=a(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let n=s.filter(e=>!i.includes(e)),g=i.filter(e=>!s.includes(e)),y=i.filter(r=>s.includes(r)&&p(e,r)!==p(t,r)).concat(n,g).sort(),d=u(e);if(d&&o.has(d)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h,m=l(e)&&l(t);for(let i of y){let s,n=p(e,i),o=p(t,i);if((m||"function"!=typeof n&&"function"!=typeof o)&&n!==o&&(null!=n||null!=o)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(n,o);else if(n instanceof Date&&o instanceof Date){if(n.getTime()===o.getTime())continue;s={type:"complete",oldValue:n,newValue:o}}else s="object"==typeof n&&"object"==typeof o&&u(n)===u(o)?c(n,o):{type:"complete",oldValue:n,newValue:o};null!=s&&(null==h?h={type:"partial",diff:{[i]:s}}:h.diff[i]=s)}}return h}function g(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},55156(e,t,r){r.d(t,{I:()=>s});const i=Symbol("idFieldsProviderSymbol");function s(e){return(t=e)&&i in t?e[i]:void 0;var t}r.d(t,["e",0,i])},54339(e,t,r){function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let r=[];for(let i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>s})},46499(e,t,r){r.d(t,{A:()=>A});var i,s,n=r(32198),o=(r(44208),r(66552)),l=r(25482),a=r(4718),p=r(90629),u=r(91429),c=r(90360),g=r(73913),y=r(32730),d=r(77548),h=r(59868),m=r(73838),f=r(33910),b=r(36005),v=r(43937);const w=new o.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function S(e,t,r){return{enabled:!(0,d.TU)(r?.layer)}}function x(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function C(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let A=class extends l.o{static{i=y.vK}static{s=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),s=i[3],n=r(t[i[4]],i[5],i[6]);switch(s){case"AND":return e&&n;case"OR":return e||n}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=h.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&x(i))e=new g.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let s=e.toJSON(i);s.expression&&(t[r]=s)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new s({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],A.prototype,"name",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],A.prototype,"allowOverrun",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],A.prototype,"deconflictionStrategy",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&C(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],A.prototype,"labelExpression",void 0),(0,n.Cg)([(0,b.w)("labelExpression")],A.prototype,"readLabelExpression",null),(0,n.Cg)([(0,v.K)("labelExpression")],A.prototype,"writeLabelExpression",null),(0,n.Cg)([(0,u.MZ)({type:g.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return x(e)||C(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],A.prototype,"labelExpressionInfo",void 0),(0,n.Cg)([(0,v.K)("labelExpressionInfo")],A.prototype,"writeLabelExpressionInfo",null),(0,n.Cg)([(0,u.MZ)({type:w.apiValues,json:{type:w.jsonValues,read:w.read,write:w.write}})],A.prototype,"labelPlacement",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],A.prototype,"offsetDistance",void 0),(0,n.Cg)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],A.prototype,"labelPosition",void 0),(0,n.Cg)([(0,u.MZ)({type:Number})],A.prototype,"maxScale",void 0),(0,n.Cg)([(0,v.K)("maxScale")],A.prototype,"writeMaxScale",null),(0,n.Cg)([(0,u.MZ)({type:Number})],A.prototype,"minScale",void 0),(0,n.Cg)([(0,v.K)("minScale")],A.prototype,"writeMinScale",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],A.prototype,"repeatLabel",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:p.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],A.prototype,"repeatLabelDistance",null),(0,n.Cg)([(0,u.MZ)({types:f.em,json:{types:f.em,origins:{"portal-item":{types:f.em,read:{reader:(0,c.C)({types:f.em})},default:null},"web-scene":{types:f.Rv,read:{reader:(0,c.C)({types:f.Rv})},write:m.oO,default:null}},write:m.oO,default:null}})],A.prototype,"symbol",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],A.prototype,"useCodedValues",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],A.prototype,"where",void 0),A=s=(0,n.Cg)([(0,u.$K)("esri.layers.support.LabelClass")],A)},73913(e,t,r){r.d(t,{A:()=>u});var i,s=r(32198),n=r(25482),o=r(91429),l=r(32730),a=r(36005),p=r(43937);let u=class extends n.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,l.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,l.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"name",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],u.prototype,"expression",void 0),(0,s.Cg)([(0,a.w)("expression",["expression","value"])],u.prototype,"readExpression",null),(0,s.Cg)([(0,p.K)("expression")],u.prototype,"writeExpression",null),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"title",void 0),(0,s.Cg)([(0,o.MZ)({json:{read:!1,write:!1}})],u.prototype,"value",void 0),u=i=(0,s.Cg)([(0,o.$K)("esri.layers.support.LabelExpressionInfo")],u)},4071(e,t,r){const i={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},s={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1,supportsTypeWildcard:!1,supportsCountOnly:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i,query:{maxRecordCount:0,maxRecordCountFactor:0,maxUniqueIDCount:0,relativeTimeBinWindow:0,standardMaxRecordCount:0,standardMaxRecordCountNoGeometry:0,supportsStatisticsAggregatedIds:!1,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsOutDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}};r.d(t,["$",0,i,"P",0,s])},32730(e,t,r){r.d(t,{BI:()=>c,D3:()=>p,XJ:()=>u,lc:()=>a,mX:()=>y,rU:()=>g,tH:()=>b,zA:()=>w});var i=r(799);const s=RegExp("__begin__","ig"),n=RegExp("__end__","ig"),o=RegExp("^__begin__","i"),l=RegExp("__end__$","i");function a(e){return e.replaceAll(RegExp("\\[","g"),"{").replaceAll(RegExp("\\]","g"),"}")}function p(e){return e.replaceAll(RegExp("\\{","g"),"[").replaceAll(RegExp("\\}","g"),"]")}function u(e){let t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=a(e.labelExpression),t.type="conventional"),t}function c(e){let t=u(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function g(e){let t=u(e);if(!t)return null;switch(t.type){case"conventional":return function(e){return(e?.match(d))?.[1].trim()||null}(t.expression);case"arcade":return b(t.expression)}return null}function y(e){let t;return e?(t=(0,i.HC)(e,e=>'__begin__$feature["'+e+'"]__end__'),t=o.test(t)?t.replace(o,""):'"'+t,t=l.test(t)?t.replace(l,""):t+'"',t=t.replaceAll(s,'" + ').replaceAll(n,' + "')):t='""',t}const d=/^\s*\{([^}]+)\}\s*$/i,h=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,m=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,f=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function b(e){if(!e)return null;let t=h.exec(e)||m.exec(e);return t?t[1]||t[3]:(t=f.exec(e),t?t[2]:null)}const v=Symbol("LabelClassInstance");function w(e){return"object"==typeof e&&!!e&&v in e}r.d(t,["vK",0,v])},39383(e,t,r){r.d(t,{w:()=>a,z:()=>c});var i=r(49186),s=r(53966),n=r(46499);const o=()=>s.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function a(e,t,r){return e?e.map(e=>{let i=new n.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const p=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],u={esriGeometryPoint:p,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:p,esriGeometryEnvelope:null};function c(e,t){let r=[];for(let s of e){let e=s.labelPlacement,n=u[t];if(!s.symbol)return o().warn("No ILabelClass symbol specified."),[];if(!n)return o().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(n.includes(e))r.push(s);else{let i=n[0];e&&o().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let l=s.clone();l.labelPlacement=i,r.push(l)}}return r}},73681(e,t,r){r.d(t,{n:()=>a});var i=r(49186),s=r(53966),n=r(46140),o=r(95466),l=r(55674);class a{static async from(e,t,r){let o=e.dictionary_version?n.A.parse(e.dictionary_version):null,u=new Set(e.itemsNames),c={};if(t)for(let e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);let g=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))g.delete(e);g.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:g});let y=await(0,l.xR)(e.expression,null,c);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let d=!o||!o.greaterEqual(4,0);d&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});let h=new p(r,d);return new a(d,u,y,h)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class p extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},41366(e,t,r){var i=r(32198),s=r(66552),n=r(53966),o=r(91429),l=r(93223);const a=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",u="field";r.d(t,["K",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&u||r&&p||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===u||e===p)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(a,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,o.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,a])},93470(e,t,r){const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i};r.d(t,["Cb",0,s,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,i,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,n])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9917],{159(e,n,t){t.d(n,{A:()=>s});var r,l=t(32198),a=t(69540),o=t(25482),i=t(91429),u=t(99157);let s=r=class extends((0,a.OU)(o.o)){constructor(e){super(e),this.steps=[]}get isUsable(){let e=!0;for(let n=0;n<this.steps.length;n++){let t=this.steps[n];if(null==t.isUsable)return t.isUsable;e&&=t.isUsable}return e}getInverse(){let e=new r;for(let n=this.steps.length-1;n>=0;n--){let t=this.steps[n];e.steps.push(t.getInverse())}return e}};(0,l.Cg)([(0,i.MZ)()],s.prototype,"isUsable",null),(0,l.Cg)([(0,i.MZ)({type:[u.A],nonNullable:!0,json:{name:"geoTransforms"}})],s.prototype,"steps",void 0),s=r=(0,l.Cg)([(0,i.$K)("esri.geometry.operators.support.GeographicTransformation")],s)},99157(e,n,t){t.d(n,{A:()=>u});var r,l=t(32198),a=t(69540),o=t(25482),i=t(91429);let u=r=class extends((0,a.OU)(o.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,l.Cg)([(0,i.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,n,t)=>{n[t]=!e}}})],u.prototype,"isInverse",void 0),(0,l.Cg)([(0,i.MZ)()],u.prototype,"isUsable",void 0),(0,l.Cg)([(0,i.MZ)({json:{write:!0}})],u.prototype,"wkt",void 0),(0,l.Cg)([(0,i.MZ)({json:{write:!0}})],u.prototype,"wkid",void 0),u=r=(0,l.Cg)([(0,i.$K)("esri.geometry.operators.support.GeographicTransformationStep")],u)},9762(e,n,t){t.r(n),t.d(n,{projectBuffer:()=>l});var r=t(49208);function l(e,n,t,l,a,o,i=Math.floor(e.length/3)){let u=(0,r.jd)(n,a);if(null==u)return!1;if(u===r.pO){if(e===l&&t===o)return!0;let n=t+3*i;for(let r=t,a=o;r<n;r++,a++)l[a]=e[r]??0;return!0}let s=t+3*i;for(let n=t,r=o;n<s;n+=3,r+=3)u(e,n,l,r);return!0}},49208(e,n,t){t.d(n,{Tp:()=>f,jd:()=>c,pO:()=>d,s7:()=>M,wy:()=>p});var r=t(34727),l=t(86211),a=t(73941),o=t(79258),i=t(34403),u=t(21325);const s={2:{5:d,7:null,9:null,10:d,1:v,6:null,8:null,0:null,3:M,11:j,2:d,4:I},5:{5:d,7:null,9:null,10:d,1:v,6:null,8:null,0:null,3:M,11:j,2:d,4:I},7:{5:null,7:d,9:null,10:d,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:d,10:d,1:null,6:null,8:T,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:m,6:null,8:null,0:null,3:d,11:R,2:g,4:w},4:{5:b,7:null,9:null,10:b,1:F,6:null,8:null,0:null,3:U,11:function(e,n,t,r){b(e,n,t,r),j(t,r,t,r)},2:b,4:d},1:{5:S,7:null,9:null,10:S,1:d,6:null,8:null,0:null,3:k,11:function(e,n,t,r){S(e,n,t,r),j(t,r,t,r)},2:S,4:x},6:{5:null,7:E,9:null,10:E,1:null,6:d,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:d,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:d,3:null,11:null,2:null,4:null},10:{5:d,7:d,9:d,10:d,1:v,6:C,8:T,0:null,3:M,11:j,2:d,4:I},11:{5:y,7:null,9:null,10:y,1:function(e,n,t,r){y(e,n,t,r),v(t,r,t,r)},6:null,8:null,0:null,3:function(e,n,t,r){y(e,n,t,r),M(t,r,t,r)},11:d,2:y,4:function(e,n,t,r){y(e,n,t,r),I(t,r,t,r)}}};function c(e,n){return f(e,n)?.projector}function f(e,n){if(null==e||null==n)return null;if(Z.source.spatialReference===e&&Z.dest.spatialReference===n)return Z;let t=h(e,Z.source),r=h(n,Z.dest);return 0===t&&0===r?(0,u.aI)(e,n)?Z.projector=d:Z.projector=null:Z.projector=s[t][r],Z}function p(e,n){switch(c(e,n)){case d:return"copy3";case v:return"wgs84ToSphericalECEF";case M:return"wgs84ToWebMercator";case j:return"wgs84ToPlateCarree";case I:return"wgs84ToWGS84ECEF";case g:return"webMercatorToWGS84";case m:return"webMercatorToSphericalECEF";case w:return"webMercatorToWGS84ECEF";case R:return"webMercatorToPlateCarree";case b:return"wgs84ECEFToWGS84";case F:return"wgs84ECEFToSphericalECEF";case U:return"wgs84ECEFToWebMercator";case S:return"sphericalECEFToWGS84";case k:return"sphericalECEFToWebMercator";case E:return"sphericalMarsPCPFToMars2000";case A:return"sphericalMoonPCPFToMoon2000";case x:return"sphericalECEFToWGS84ECEF";case C:return"mars2000ToSphericalPCPF";case T:return"moon2000ToSphericalPCPF";default:return null}}function h(e,n){return e?n.spatialReference===e?n.spatialReferenceId:(n.spatialReference=e,"metersPerUnit"in n&&(n.metersPerUnit=(0,l.GA)(e,1)),n.spatialReferenceId=(0,a.jA)(e)?1:(0,u.oT)(e)?2:(0,u.K8)(e)?3:(0,u.r1)(e)?11:e.wkt===a.Ro.wkt?4:4490===e.wkid?5:e.wkt===a.FY.wkt?6:e.wkt===a.LJ.wkt?8:(0,a.q8)(e)?7:(0,a.KQ)(e)?9:0):0}function d(e,n,t,r){e!==t&&(t[r++]=e[n++],t[r++]=e[n++],t[r]=e[n]??0)}function g(e,n,t,r){t[r]=L*(e[n]/q),t[r+1]=L*(W-2*Math.atan(Math.exp(-e[n+1]/q))),t[r+2]=e[n+2]??0}function m(e,n,t,r){let l=e[n]/q,a=W-2*Math.atan(Math.exp(-e[n+1]/q)),o=q+(e[n+2]??0),i=Math.cos(a)*o;t[r]=Math.cos(l)*i,t[r+1]=Math.sin(l)*i,t[r+2]=Math.sin(a)*o}function w(e,n,t,r){g(e,n,t,r),I(t,r,t,r)}function M(e,n,t,l){!function(e,n,t,l,a){let o=.4999999*Math.PI,i=(0,r.qE)(G*e[n+1],-o,o),u=Math.sin(i);t[l++]=G*e[n]*a.radius,t[l++]=a.halfSemiMajorAxis*Math.log((1+u)/(1-u)),t[l]=e[n+2]??0}(e,n,t,l,o.$O)}function j(e,n,t,r){t[r]=e[n]*$,t[r+1]=e[n+1]*$,t[r+2]=e[n+2]??0}function y(e,n,t,r){t[r]=e[n]*z,t[r+1]=e[n+1]*z,t[r+2]=e[n+2]??0}function R(e,n,t,r){g(e,n,t,r),j(t,r,t,r)}function P(e,n,t,r,l){let a=l+(e[n+2]??0),o=G*e[n],i=G*e[n+1],u=Math.cos(i)*a;t[r]=Math.cos(o)*u,t[r+1]=Math.sin(o)*u,t[r+2]=Math.sin(i)*a}function T(e,n,t,r){P(e,n,t,r,o.Sw.radius)}function C(e,n,t,r){P(e,n,t,r,o.sH.radius)}function v(e,n,t,r){P(e,n,t,r,o.$O.radius)}function O(e,n,t,l,a){let o=e[n],i=e[n+1],u=e[n+2]??0,s=Math.sqrt(o*o+i*i+u*u),c=(0,r.YN)(u/(0===s?1:s)),f=Math.atan2(i,o);t[l++]=L*f,t[l++]=L*c,t[l]=s-a}function A(e,n,t,r){O(e,n,t,r,o.Sw.radius)}function E(e,n,t,r){O(e,n,t,r,o.sH.radius)}function S(e,n,t,r){O(e,n,t,r,o.$O.radius)}function k(e,n,t,r){S(e,n,t,r),M(t,r,t,r)}function x(e,n,t,r){S(e,n,t,r),I(t,r,t,r)}function I(e,n,t,r){!function(e,n,t,r,l){let a=G*e[n],o=G*e[n+1],i=e[n+2]??0,u=Math.sin(o),s=Math.cos(o),c=l.radius/Math.sqrt(1-l.eccentricitySquared*u*u);t[r++]=(c+i)*s*Math.cos(a),t[r++]=(c+i)*s*Math.sin(a),t[r++]=(c*(1-l.eccentricitySquared)+i)*u}(e,n,t,r,o.$O)}function b(e,n,t,r){let l,a,u,s,c,f,p,h,d,g,m,w,M,j,y,R,P,T,C,v,O,A=i.TP,E=e[n],S=e[n+1],k=e[n+2]??0;l=Math.abs(k),a=E*E+S*S,u=Math.sqrt(a),s=a+k*k,c=Math.sqrt(s),v=Math.atan2(S,E),f=k*k/s,p=a/s,j=A.a2/c,y=A.a3-A.a4/c,p>.3?(h=l/c*(1+p*(A.a1+j+f*y)/c),C=Math.asin(h),g=h*h,d=Math.sqrt(1-g)):(d=u/c*(1-f*(A.a5-j-p*y)/c),C=Math.acos(d),g=1-d*d,h=Math.sqrt(g)),m=1-o.$O.eccentricitySquared*g,w=o.$O.radius/Math.sqrt(m),M=A.a6*w,j=u-w*d,y=l-M*h,P=d*j+h*y,R=d*y-h*j,T=R/(M/m+P),C+=T,O=P+R*T/2,k<0&&(C=-C),t[r++]=L*v,t[r++]=L*C,t[r]=O}function F(e,n,t,r){b(e,n,t,r),v(t,r,t,r)}function U(e,n,t,r){b(e,n,t,r),M(t,r,t,r)}const Z={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:d},G=(0,r.kU)(1),L=(0,r.KJ)(1),W=.5*Math.PI,q=o.$O.radius,$=q*Math.PI/180,z=180/(q*Math.PI);t.d(n,["w5",0,s])},99917(e,n,t){t.r(n),t.d(n,{canProjectWithoutEngine:()=>z,initializeProjection:()=>K,isEqualBaseGCS:()=>B,isLoaded:()=>S,isLoadedOrLoad:()=>k,isLoadedOrLoadFor:()=>x,load:()=>b,project:()=>F,projectAsync:()=>$,projectExtent:()=>ee,projectMany:()=>U,projectMultipoint:()=>N,projectOrLoad:()=>G,projectOrLoadMany:()=>L,projectPoint:()=>D,projectPolygon:()=>X,projectPolyline:()=>Q,projectWithoutEngine:()=>H,requiresLoad:()=>I,test:()=>q,tryProject:()=>Z});var r=t(49186),l=t(17676),a=t(62788),o=t(95488),i=t(51850),u=t(21276),s=t(73941),c=t(5443),f=t(91075),p=t(48526),h=t(86738),d=t(39829),g=t(82799),m=t(16930),w=t(98764),M=t(159),j=t(9762);const y={loadPromise:null,projectOperator:null,jsonProjectOperator:null,geographicTransformationUtils:null,defaultTransformations:{}};var R=t(49208);function P(e,n,t,r,l,a){return T[0]=e,T[1]=n,T[2]=t,(0,j.projectBuffer)(T,r,0,l,a,0)}const T=(0,i.vt)();var C=t(60408),v=t(65864),O=t(21325),A=t(52006);const E=new o.I;function S(){let{projectOperator:e,jsonProjectOperator:n,geographicTransformationUtils:t}=y;return!!(e?.projectIsLoaded()&&n?.projectIsLoaded()&&t?.isLoaded())}function k(){return!!S()||((0,a.gc)(E),b(),!1)}function x(e,n){return!e||!n||z(e,n)||k()}function I(e,n){return!z(e,n)&&!S()}async function b(e){y.loadPromise??(y.loadPromise=Promise.all([t.e(3276).then(()=>t(83276)).then(e=>(y.projectOperator=e,e.projectLoad())),t.e(8377).then(()=>t(8377)).then(e=>(y.jsonProjectOperator=e,e.projectLoad())),t.e(2158).then(()=>t(12158)).then(e=>(y.geographicTransformationUtils=e,e.load()))])),await y.loadPromise,(0,l.Te)(e),E.notify()}function F(e,n,t){return Array.isArray(e)?0===e.length?[]:((0,u.H)(e),U(e,e[0].spatialReference,n,t)):((0,u.f)(e),U([e],e.spatialReference,n,t)[0])}function U(e,n,t,r){if(null==n||null==t)return e.map(e=>(0,v.rS)(e));if(z(n,t,r))return e.map(e=>H(e,n,t));if(null==r?.geographicTransformation&&(0,s.jA)(n))return U(e.map(e=>H(e,n,m.A.WGS84)),m.A.WGS84,t,{zConversionDisabled:r?.zConversionDisabled});if(null==r?.geographicTransformation&&(0,s.jA)(t))return U(e,n,m.A.WGS84).map(e=>H(e,m.A.WGS84,t));if(!S())throw new W;let{geographicTransformationUtils:l,defaultTransformations:a}=y;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:l.getTransformation(n,t,r.areaOfInterestExtent)||new M.A};else if(!r?.areaOfInterestExtent){let e=function(e,n){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",n.wkid?.toString()??"-1",n.wkt?.toString()??"",n.wkt2?.toString()??""].join()}(n,t),o=a[e];o||(o=l.getTransformation(n,t)||new M.A,a[e]=o),r={geographicTransformation:o,zConversionDisabled:r?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=n),e[0]instanceof f.A?y.projectOperator.projectExecuteMany(e,t,r):y.jsonProjectOperator.projectExecuteMany(e,t,r)}function Z(e,n,t){try{return F(e,n,t)}catch{return null}}function G(e,n){let t=L([e],n);return null==t.pending?null==t.geometries?{pending:null,geometry:null}:{pending:null,geometry:t.geometries[0]}:{pending:t.pending,geometry:null}}function L(e,n,t){if(!S())for(let t of e)if(null!=t&&!(0,O.aI)(t.spatialReference,n)&&(0,O.fn)(t.spatialReference)&&(0,O.fn)(n)&&!z(t.spatialReference,n))return(0,a.gc)(E),{pending:b(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,O.aI)(e.spatialReference,n)?(0,v.rS)(e):(0,O.fn)(e.spatialReference)&&(0,O.fn)(n)?F(e,n,t):null)}}class W extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}const q={get loadPromise(){return y.loadPromise}};async function $(e,n,t){if((0,l.Te)(t),!e)return e;let r=L(Array.isArray(e)?e:[e],n,t);if(r.pending)return await r.pending,(0,l.Te)(t),$(e,n,t);let a=r.geometries??[];return Array.isArray(e)?a:a[0]}function z(e,n,t){return!(t?.areaOfInterestExtent||t?.extendedParams||t?.geographicTransformation)&&(!!(0,O.aI)(e,n)||(0,O.fn)(e)&&(0,O.fn)(n)&&!!(0,R.jd)(e,n))}function B(e,n){if((0,O.aI)(e,n))return!0;if(!(0,O.fn)(e)||!(0,O.fn)(n))return!1;let t=(0,O.oT)(e)||(0,O.K8)(e)||(0,O.x1)(e),r=(0,O.oT)(n)||(0,O.K8)(n)||(0,O.x1)(n);return t&&r}async function K(e,n,t,r){if(S())return(0,l.NO)(r);if(Array.isArray(e)){for(let{source:n,dest:t,options:l}of e)if(n&&t&&!z(n,t,l))return b(r)}else if(e&&n&&!z(e,n,t))return b(r);return(0,l.NO)(r)}function H(e,n,t){return e?(0,C.fT)(e)?Y(e,n,new h.A,t,0):(0,C.ZC)(e)?ne(e,n,new c.A,t,0):(0,C.Bi)(e)?_(e,n,new d.A,t,0):(0,C.Rg)(e)?V(e,n,new g.A,t,0):(0,C.U9)(e)?J(e,n,new p.A,t,0):null:null}function D(e,n,t=n.spatialReference,r=0){return null!=t&&null!=e.spatialReference&&null!=Y(e,e.spatialReference,n,t,r)}function Y(e,n,t,r,l){ae[0]=e.x,ae[1]=e.y;let a=e.z;return ae[2]=void 0===a?l:a,(0,j.projectBuffer)(ae,n,0,ae,r,0)?(t.x=ae[0],t.y=ae[1],t.spatialReference=r,void 0!==a||(0,s.xP)(r)?(t.z=ae[2],t.hasZ=!0):(t.z=void 0,t.hasZ=!1),void 0===e.m?(t.m=void 0,t.hasM=!1):(t.m=e.m,t.hasM=!0),t):null}function N(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=J(e,e.spatialReference,n,t,r)}function J(e,n,t,r,l){let{points:a,hasZ:o,hasM:i}=e,u=[],s=a.length,c=[];for(let e of a)c.push(e[0],e[1],o?e[2]:l);if(!(0,j.projectBuffer)(c,n,0,c,r,0,s))return null;let f=le(o,r);for(let e=0;e<s;++e){let n=3*e,t=c[n],r=c[n+1];f&&i?u.push([t,r,c[n+2],a[e][3]]):f?u.push([t,r,c[n+2]]):i?u.push([t,r,a[e][2]]):u.push([t,r])}return t.points=u,t.spatialReference=r,t.hasZ=o,t.hasM=i,t}function Q(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=V(e,e.spatialReference,n,t,r)}function V(e,n,t,r,l){let{curvePaths:a,paths:o,hasZ:i,hasM:u}=e;if(!(a?re(a,i??!1,u??!1,n,t.curvePaths=[],r,l):te(o,i??!1,u??!1,n,t.paths,r,l)))return null;let s=le(i,r);return t.spatialReference=r,t.hasZ=s,t.hasM=u,t}function X(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=_(e,e.spatialReference,n,t,r)}function _(e,n,t,r,l){let{curveRings:a,rings:o,hasZ:i,hasM:u}=e;return(a?re(a,i??!1,u??!1,n,t.curveRings=[],r,l):te(o,i??!1,u??!1,n,t.rings,r,l))?(t.spatialReference=r,t.hasZ=le(i,r),t.hasM=u,t):null}function ee(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ne(e,e.spatialReference,n,t,r)}function ne(e,n,t,r,l){let{xmin:a,ymin:o,xmax:i,ymax:u,hasZ:s,hasM:c}=e;if(!P(a,o,s?e.zmin:l,n,ae,r))return null;let f=le(s,r);return t.xmin=ae[0],t.ymin=ae[1],f&&(t.zmin=ae[2]),P(i,u,s?e.zmax:l,n,ae,r)?(t.xmax=ae[0],t.ymax=ae[1],f&&(t.zmax=ae[2]),c&&(t.mmin=e.mmin,t.mmax=e.mmax),t.spatialReference=r,t):null}function te(e,n,t,r,l,a,o=0){let i=[];for(let t of e)for(let e of t)i.push(e[0],e[1],n?e[2]:o);if(!(0,j.projectBuffer)(i,r,0,i,a,0))return!1;let u=0;l.length=0;let s=n?3:2,c=le(n,a);for(let n of e){let e=[];for(let r of n){let n=i.slice(u,u+=3);c||n.pop(),t&&n.push(r[s]),e.push(n)}l.push(e)}return!0}function re(e,n,t,r,l,a,o=0){let i=[];for(let t of e)for(let e of t){if((0,A.FG)(e))return!1;if((0,A.aO)(e)){let[t,r]=e.c;i.push(t[0],t[1],n?t[2]:o,r[0],r[1],o);continue}if((0,A.n1)(e)){let[t,r,l]=e.b;i.push(t[0],t[1],n?t[2]:o,r[0],r[1],o,l[0],l[1],o);continue}let t=e;i.push(t[0],t[1],n?t[2]:o)}if(!(0,j.projectBuffer)(i,r,0,i,a,0))return!1;let u=0;l.length=0;let s=n?3:2,c=le(n,a);for(let n of e){let e=[];for(let r of n){let n=i.slice(u,u+=3);if(c||n.pop(),t&&n.push((0,A.yP)(r)[s]),(0,A.FG)(r))return!1;if((0,A.aO)(r)){let t=i[u++],r=i[u++];++u,e.push({c:[n,[t,r]]})}else if((0,A.n1)(r)){let t=i[u++],r=i[u++];++u;let l=i[u++],a=i[u++];++u,e.push({b:[n,[t,r],[l,a]]})}else e.push(n)}l.push(e)}return!0}function le(e,n){return e||(0,s.xP)(n)||(0,O.aI)(n,w.Y0)}const ae=(0,i.vt)()},98764(e,n,t){t.d(n,{lO:()=>c});var r=t(73941),l=t(16930),a=t(21325);const o=new l.A(r.fv),i=new l.A(r.FY),u=new l.A(r.LJ),s=new l.A(r.Ro);function c(e){let n=f.get(e);if(n)return n;let t=o;if(e)if(e===i)t=i;else if(e===u)t=u;else{let n=e.wkid,r=e.latestWkid;if(null!=n||null!=r)(0,a.tl)(n)||(0,a.tl)(r)?t=i:((0,a.ZL)(n)||(0,a.ZL)(r))&&(t=u);else{let n=e.wkt2??e.wkt;if(n){let e=n.toUpperCase();e===p?t=i:e===h&&(t=u)}}}return f.set(e,t),t}const f=new Map,p=i.wkt.toUpperCase(),h=u.wkt.toUpperCase();t.d(n,["GD",0,o,"Y0",0,s])},34403(e,n,t){var r=t(79258);Math.PI;const l=r.$O.radius,a=r.$O.eccentricitySquared,o={a1:l*a,a2:l*a*l*a,a3:l*a*a/2,a4:l*a*l*a*2.5,a5:l*a+l*a*a/2,a6:1-a};r.$O.radius,r.$O.flattening,r.Sw.radius,r.Sw.flattening,r.sH.radius,r.sH.flattening,r.sH.radius,t.d(n,["TP",0,o])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1003],{1003(e,t,i){i.r(t),i.d(t,{default:()=>de});var a=i(49186),r=i(32198),s=i(91429),n=i(49859),l=i(68197),o=i(5443),f=i(16930),u=i(73444),h=i(94778),c=i(14140);function p(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function d(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function m(e){let{axes:t}=e.domain,i=Object.keys(t),a=[],r=[],s=-1,n=-1,l=[];for(let e=0;e<i.length;e++){let o=i[e];p(o)?s=e:d(o)&&(n=e);let f=t[o],u=[];if("values"in f){f.values.forEach(e=>u.push("string"==typeof e?new Date(e).getTime():e));let e=u[1]-u[0];a.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{let{start:e,stop:t,num:i}=f,s=(t-e)/(i-1);a.push([e-.5*s,t+.5*s]),r.push(s);for(let t=0;t<i;t++)u.push(e+s*t)}l.push({name:o,values:u,extent:[u[0],u[u.length-1]]})}s>-1&&-1===n?n=+(0===s):n>-1&&-1===s?s=+(0===n):-1===n&&-1===s&&(s=0,n=1),l=l.filter((e,t)=>t!==s&&t!==n);let{referencing:u}=e.domain,h=u.find(e=>e.coordinates.includes(i[s])).system.id,c=h?.slice(h.lastIndexOf("/")+1),m=null==c||"CRS84"===c?4326:Number(c),g=new f.A({wkid:m}),[y,x]=a[s],[w,I]=a[n],b=new o.A({xmin:y,xmax:x,ymin:w,ymax:I,spatialReference:g});return{width:Math.round(b.width/r[s]),height:Math.round(b.height/r[n]),extent:b,dimensions:l}}function g(e){let t=(0,u.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function y(){return Math.round(255*Math.random())}function x(e){let t={},{parameters:i}=e;if(!i)return t;for(let[e,a]of Object.entries(i)){let{type:i,description:r,unit:s,categoryEncoding:n,observedProperty:o}=a;if("Parameter"===i&&(t[e]={},r&&(t[e].description=g(r)),s&&(t[e].unit=s.label?g(s.label):null,t[e].symbol=s.symbol?.value),n)){let i=Object.entries(n).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})),a=!1;o?.categories?.length&&(o.categories.forEach(e=>{if(!e.id)return;let t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find(e=>e.ClassName===t);if(r&&(r.Label=e.label?g(e.label):null,e.preferredColor)){let t=l.A.fromHex(e.preferredColor);t&&(a=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}}),a&&i.forEach(e=>{e.Red??(e.Red=y(),e.Green=y(),e.Blue=y())}));let r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map(e=>({attributes:e}))};a&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function w(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let a=0;a<e.length;a++){let r=e[a];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,h.X1)(t,i)}function I(e,t,i){let a=e.map((e,i)=>({name:e,count:t[i]})).sort((e,t)=>e.name>t.name?-1:1),r=(e=>t=>e*=t.count)(1),s=[...a.slice(1),{name:"",count:1}].reverse().map(r).reverse(),n=0;for(let r=e.length-1;r>=0;r--){let l=a.findIndex(({name:t})=>t===e[r]);n+=s[l]*(i%t[r]),i=Math.floor(i/t[r])}return n}var b=i(17676),v=i(4366),C=i(47520),S=i(51927),T=i(45617),A=i(87186);let R=class extends n.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.preGenerateTiles=!0,this.source=null}get url(){return""}fetchRawTile(e,t,i,a={}){if(!this._pixelBlockTiles){let{rasterInfo:r}=this,[s,n]=r.storageInfo.tileInfo.size,{sliceId:l}=a,{pixelBlocks:o}=this.source,f={pixelBlock:null==l?o[0]:o[l],useBilinear:"thematic"!==r.dataType,tileSize:{width:s,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(f,a):(0,C.J$)(f);return Promise.resolve(u)}let r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){let t=this.source,{pixelBlocks:i,attributeTable:a,statistics:r,histograms:s,name:n,nativeExtent:l,transform:u,colormap:h}=t,c=i[0],{width:p,height:d,pixelType:m}=c,g=t.extent??new o.A({xmin:-.5,ymin:.5,xmax:p-.5,ymax:d-.5,spatialReference:new f.A({wkid:3857})}),y=t.isPseudoSpatialReference??!t.extent,x={x:g.width/p,y:g.height/d},w={...t.keyProperties};t.dataType&&(w.DataType=t.dataType),t.bandInfos&&(w.BandProperties=t.bandInfos.map(e=>e.toJSON())),a&&(w.DataType="Thematic");let I=new A.A({width:p,height:d,pixelType:m,extent:g,nativeExtent:l,attributeTable:a,colormap:h,transform:u,pixelSize:x,spatialReference:g.spatialReference,bandCount:c.pixels.length,keyProperties:w,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:y,histograms:s});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(I),this.createRemoteDatasetStorageInfo(I,512,512),this._set("rasterInfo",I),this.updateTileInfo(),I.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,I.multidimensionalInfo):this.preGenerateTiles&&await this._buildInMemoryRaster(c,{width:512,height:512},e),I.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){let{rasterInfo:r}=this,s=r.storageInfo.maximumPyramidLevel??0,n="thematic"!==r.dataType,l=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:s,useBilinear:n},i):Promise.resolve((0,C.lD)(e,t,s,n)),o=null!=r.statistics,f=null!=r.histograms,u=this.ioConfig.skipStatistics||o?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,S.f4)(e)),h=await(0,b.Lx)([l,u]);if(!h[0].value&&h[1].value)throw new a.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,o||(r.statistics=h[1].value?.statistics),f||(r.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let a=0;a<t.variables.length;a++){let r=t.variables[a];if(r.statistics)continue;let s=r.dimensions.map(e=>new T.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),n=(0,v.NG)(s,t),l=null==n?null:e[n];if(null==l)continue;let o=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:l},i):(0,S.eH)(l);r.statistics=o.statistics,r.histograms||=o.histograms}}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],R.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,s.MZ)({constructOnly:!0})],R.prototype,"preGenerateTiles",void 0),(0,r.Cg)([(0,s.MZ)()],R.prototype,"source",void 0),(0,r.Cg)([(0,s.MZ)()],R.prototype,"url",null),R=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.InMemoryRaster")],R);const M=R;var O=i(22671);let _=class extends n.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,a={}){return this._inMemoryRaster.fetchRawTile(e,t,i,a)}async _open(e){let{extent:t,pixelBlocks:i,multidimensionalInfo:a,attributeTable:r,bandNames:s}=await this._fetchData(e),{statistics:n,histograms:l}=(0,S.eH)(i[0]),o=s?.map(e=>({BandName:e})),f={DataType:r?"Thematic":a?"Scientific":"Generic",BandProperties:o},u=new M({source:{extent:t,pixelBlocks:i,attributeTable:r?O.A.fromJSON(r):null,multidimensionalInfo:a,statistics:n,histograms:l,keyProperties:f,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;let h=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",h.slice(0,h.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){let t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new a.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new a.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new a.A(i,"Missing domain referencing in the grid coverage data");let r=Object.values(t.ranges);for(let e=0;e<r.length;e++){let{axisNames:t,shape:s,type:n,values:l}=r[e];if(!("ndarray"===n.toLowerCase()&&l?.length&&t?.length&&s?.length))throw new a.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!p(t[t.length-1])||!d(t[t.length-2]))throw new a.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){let{width:t,height:i,extent:a,dimensions:r}=m(e),{ranges:s}=e,n=Object.keys(s).sort((e,t)=>e<t?-1:1),l=[];for(let e=0;e<n.length;e++){let t=n[e];r?.length&&l.push({name:t,dimensions:r})}let o=x(e);l.forEach(e=>o[e.name]&&Object.assign(e,o[e.name]));let f=l.length?{variables:l}:void 0,u=[];for(let e=0;e<n.length;e++){let{values:a,dataType:l,axisNames:o,shape:f}=s[n[e]],h=f.length>2?e*f.slice(0,-2).reduce((e,t)=>e*t):0,p=o.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":w(a),g=t*i,y=a.length/g;for(let s=0;s<y;s++){let n=c.A.createEmptyBand(m,g),l=new Uint8Array(g).fill(255),o=!1,f=s*g;for(let e=0;e<g;e++){let t=a[f+e];null==t?(l[e]=0,o=!0):n[e]=t}if(0===e||r?.length){let e=new c.A({width:t,height:i,mask:o?l:null,pixels:[n],pixelType:m});e.updateStatistics(),r?.length?u[I(p,d,s)+h]=e:u.push(e)}else{let e=u[s];e.pixels.push(n),o?e.mask&&=c.A.combineBandMasks([e.mask,l]):e.mask=o?l:null}}}return{extent:a,pixelBlocks:u,multidimensionalInfo:f,attributeTable:Object.values(o).find(e=>e.attributeTable)?.attributeTable,bandNames:f?void 0:n}}(t)}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,s.MZ)({constructOnly:!0})],_.prototype,"source",void 0),_=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.CovJSONRaster")],_);const k=_;var F=i(4576),B=i(21325),P=i(330),N=i(43163);function D(e,t){if(!e||!t)return null;let i=[];for(let a=0;a<e.length;a++)i.push(e[a]),i.push(t[a]);return i}function E(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new f.A({wkid:t});if(e=String(e).trim(),(0,B.jp)(e))return new f.A({wkt2:e});let i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;let a=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),s=r>-1?r:i.indexOf("GEOGCS");if(-1===s)return null;let n=e.slice(s,e.lastIndexOf("]",a)+1).trim(),l=e.slice(a,e.lastIndexOf("]")).trim();t=L(n);let o=t?new f.A({wkid:t}):new f.A({wkt:n}),u=L(l);return u&&(o.vcsWkid=u),o}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=L(e),0===t?new f.A({wkt:e}):new f.A({wkid:t})):null}function L(e){let t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),i=t[t.length-1].split(","),a=i[0]?.toLowerCase();if(("epsg"===a||"esri"===a)&&e.endsWith('"]]')){let e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function z(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};let t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,P.g7)(e,"SRS")){if(!t.spatialReference){let i=(0,P.mX)(e);t.spatialReference=E(i)}}else if((0,P.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){let{spatialReference:i,transform:a}=function(e){let t=(0,P.V6)(e,"GeodataXform"),i=E((0,P.v7)(t,"SpatialReference/WKID")||(0,P.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};let a=(0,P.v7)(t,"PolynomialOrder")??1,r=(0,P.Ui)(t,"CoeffX/Double"),s=(0,P.Ui)(t,"CoeffY/Double"),n=(0,P.Ui)(t,"InverseCoeffX/Double"),l=(0,P.Ui)(t,"InverseCoeffY/Double"),o=D(r,s),f=D(n,l);return{spatialReference:i,transform:o&&f&&o.length&&f.length?new N.A({spatialReference:i,polynomialOrder:a,forwardCoefficients:o,inverseCoefficients:f}):null}}(e);t.transform=a,t.spatialReference||=i}else(0,P.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,P.mX)(e));else if((0,P.g7)(e,"PAMRasterBand")){let i=function(e){let t,i,a,r,s=(0,P.v7)(e,"NoDataValue"),n=(0,P.V6)(e,"Histograms/HistItem"),l=(0,P.v7)(n,"HistMin"),o=(0,P.v7)(n,"HistMax"),f=(0,P.v7)(n,"BucketCount"),u=(0,P.mX)(n,"HistCounts")?.split("|").map(e=>Number(e));(0,P.IC)(e,"Metadata/MDI").forEach(e=>{let s=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":t=s;break;case"STATISTICS_MAXIMUM":i=s;break;case"STATISTICS_MEAN":a=s;break;case"STATISTICS_STDDEV":r=s}});let h=(0,P.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:s,histogram:u?.length&&null!=l&&null!=o?{min:l,max:o,size:f||u.length,counts:u}:null,sourceBandIndex:h,statistics:null!=t&&null!=i?{min:t,max:i,avg:a,stddev:r}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}});let i=t.rasterBands;return i.length&&(t.statistics=i[0].statistics?i.map(e=>e.statistics).filter(F.Ru):null,t.histograms=i[0].histogram?i.map(e=>e.histogram).filter(F.Ru):null),t}var J=i(85951),H=i(96381);let U=class extends n.A{set rasterJobHandler(e){this._set("rasterJobHandler",e),this._inMemoryRaster&&(this._inMemoryRaster.rasterJobHandler=e)}fetchRawTile(e,t,i,a={}){if(this._imageBlob){let{blockWidth:a,blockHeight:r}=this.rasterInfo.storageInfo;return this.decodePixelBlock(this._imageBlob,{tileSize:[a,r],tileIndex:[e,t,i],canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0})}return this._inMemoryRaster?this._inMemoryRaster.fetchRawTile(e,t,i,a):Promise.resolve(null)}async _open(e){let t=await this._fetchData(e);if(null==t)throw new a.A("image-aux-raster:open","the data cannot be decoded");let{spatialReference:i,statistics:r,histograms:s,transform:n}=await this._fetchAuxiliaryData(e),l=!i;l&&(i=new f.A({wkid:3857})),s?.length&&null==r&&(r=(0,S.Pg)(s));let{width:u,height:h,pixelBlock:c}=t,p=new o.A({xmin:-.5,ymin:.5-h,xmax:u-.5,ymax:.5,spatialReference:i}),d=n?n.forwardTransform(p):p,m=!0;if(n){let e=n.forwardCoefficients;m=e&&0===e[1]&&0===e[2],m&&(n=null,p=d)}if(!c){let e=new A.A({width:u,height:h,bandCount:3,pixelType:"u8",extent:d,nativeExtent:p,transform:n,pixelSize:{x:d.width/u,y:d.height/h},spatialReference:d.spatialReference,keyProperties:{DataType:"Processed"}});return this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(e),this.createRemoteDatasetStorageInfo(e,512,512),this._set("rasterInfo",e),void this.updateTileInfo()}let{rasterJobHandler:g,ioConfig:y}=this,x=new M({preGenerateTiles:!1,rasterJobHandler:g,source:{extent:d,nativeExtent:p,transform:n,pixelBlocks:[c],statistics:r,histograms:s,keyProperties:{DataType:"Processed"},isPseudoSpatialReference:l},ioConfig:{...y,sampling:"closest",skipStatistics:!0}});await x.open(),x.source=null,this._set("rasterInfo",x.rasterInfo),this._inMemoryRaster=x}async _fetchData(e){let{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,H.g)(t);if("jpg"!==i&&"png"!==i&&"gif"!==i&&"bmp"!==i)throw new a.A("image-aux-raster:open","the data is not a supported format");if(this._set("datasetFormat",i.toUpperCase()),"jpg"===i){let e=(0,J.R)(t);if(null==e)throw new a.A("image-aux-raster:open","the data is not a supported format");return this._imageBlob=t,e}try{let e=await this.decodePixelBlock(t,{format:i,canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0});return this._imageBlob=t,e?{width:e.width,height:e.height,pixelBlock:e}:null}catch{let e=await this.decodePixelBlock(t,{format:i,canvasUsage:"no-canvas",skipStatistics:!0});return e?{width:e.width,height:e.height,pixelBlock:e}:null}}async _fetchAuxiliaryData(e){let t=e?.signal,{skipExtensions:i=[],skipMapInfo:a}=this.ioConfig,r=a||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),s=this.datasetFormat,n="JPG"===s?"jgw":"PNG"===s?"pgw":"BMP"===s?"bpw":null,l=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),o=await(0,b.Lx)([r,l]);if(t?.aborted)throw(0,b.NK)();let f=z(o[0].value?.data);if(!f.transform){let e=o[1].value?o[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;f.transform=6===e?.length?new N.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return f}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],U.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,s.MZ)()],U.prototype,"rasterJobHandler",null),U=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.ImageAuxRaster")],U);const G=U;var q=i(97768),j=i(84952),V=i(86738),W=i(75414),Z=i(20223),X=i(87045),$=i(25943),Y=i(82371);let K=class extends n.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,a={}){let{storageInfo:r,extent:s}=this.rasterInfo,{transposeInfo:n}=r,l=null!=n&&!!a.transposedVariableName;if(this._slices&&!l&&null==a.sliceId)return null;let o,f,u=l?0:r.maximumPyramidLevel-e+this._levelOffset,h=`${this.url}/tile/${u}/${t}/${i}`,c={...this._slices?l?{variable:a.transposedVariableName}:{sliceId:a.sliceId||0}:null,...a.refreshParameters};if(r.isBsqTile){let e=(a.bandIds?.length?a.bandIds:[0,1,2]).map(e=>this.request(h,{query:{...c,bandId:e},responseType:"array-buffer",signal:a.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),r=new Uint8Array(i);f=[];let s=0;for(let{data:e}of t)f.push(s),r.set(new Uint8Array(e),s),s+=e.byteLength;o=r.buffer}else o=(await this.request(h,{query:c,responseType:"array-buffer",signal:a.signal})).data;if(!o)return null;let{tileInfo:p}=r,d=l?n.tileSize:p.size,m=/^(mixed|jp)/i.test(p.format),g=await this.decodePixelBlock(o,{width:d[0],height:d[1],planes:f?.length,offsets:f,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:l,noDataValue:this.rasterInfo.noDataValue,applyJpegMask:m});if(null==g)return null;let y=r.blockBoundary[e];if("jpg"!==r.compression||i>y.minCol&&i<y.maxCol&&t>y.minRow&&t<y.maxRow)return g;let{origin:x,blockWidth:w,blockHeight:I}=r,{x:b,y:v}=this.getPyramidPixelSize(e),S=Math.round((s.xmin-x.x)/b)%w,T=Math.round((s.xmax-x.x)/b)%w||w,A=Math.round((x.y-s.ymax)/v)%I,R=Math.round((x.y-s.ymin)/v)%I||I,M=i===y.minCol?S:0,O=t===y.minRow?A:0,_=i===y.maxCol?T:w,k=t===y.maxRow?R:I;return(0,C.z$)(g,{x:M,y:O},{width:_-M,height:k-O}),g}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;let t=e;for(let e=0;e<this._slices.length;e++){let i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some(e=>{let i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){let i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),a=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),r=await Promise.all([i,a]);return r[0]&&r[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let a=0,{maximumPyramidLevel:r}=this.rasterInfo.storageInfo,s=r-a+this._levelOffset,n=i.srcLocation;for(;s>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(s,i.row,i.col,t))break}catch{}if(s--,a++,i=this.identifyPixelLocation(n,a,t.datumTransformation),null===i)return null}return-1===s||null==i?null:a}async _open(e){let t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=i.data;if(this.sourceJSON=r,!r)throw new a.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!r.tileInfo)throw new a.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo();this.tileType=r.cacheType,this.tileType??=["jpg","jpeg","png","png8","png24","png32","mixed"].includes(r.tileInfo.format.toLowerCase())?"Map":"lerc"===r.tileInfo.format.toLowerCase()?"Elevation":"Raster",this.datasetName=r.name?.slice(r.name.indexOf("/")+1)??"";let s=this.rasterInfo??await this._fetchRasterInfo({signal:t});if(null==s)throw new a.A("image-server-raster:open","cannot initialize image service");(0,Y.E9)(s,r);let n="Map"===this.tileType?function(e,t){if(!e)return null;let{minScale:i,maxScale:a,minLOD:r,maxLOD:s}=t;if(null!=r&&null!=s)return X.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=r&&e<=s)});if(0!==i&&0!==a){let t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,s=a?t(a):-1/0;return X.A.fromJSON({...e,lods:e.lods.filter(e=>{let i=t(e.scale);return i<=r&&i>=s})})}return X.A.fromJSON(e)}(r.tileInfo,r):X.A.fromJSON(r.tileInfo);(0,q.Lw)(n);let[l,o]=this._computeMinMaxLOD(s,n),{extent:f,pixelSize:u}=s,h=.001*Math.min(u.x,u.y);(u.x!==u.y||Math.abs(l.resolution-u.x)>h)&&(u.x=u.y=l.resolution,s.width=Math.ceil((f.xmax-f.xmin)/u.x-.1),s.height=Math.ceil((f.ymax-f.ymin)/u.y-.1));let c=l.level-o.level,[p,d]=n.size,m=[],g=[],{lods:y}=n;y.forEach((e,t)=>{e.level>=o.level&&e.level<=l.level&&m.push({x:e.resolution,y:e.resolution}),t<y.length-1&&g.push(Math.round(10*e.resolution/y[t+1].resolution)/10)}),m.sort((e,t)=>e.x-t.x);let x,w=this.computeBlockBoundary(f,p,d,n.origin,m,c),I=m.length>1?m.slice(1):null;r.transposeInfo&&(x={tileSize:[r.transposeInfo.rows,r.transposeInfo.cols],packetSize:s.keyProperties?._yxs.PacketSize??0});let b=g.length<=1||g.length>=3&&g.slice(0,-1).every(e=>e===g[0])?g[0]??2:Math.round(10/(o.resolution/l.resolution)**(-1/c))/10,v=!!r.bsq&&"Raster"===this.tileType;if(s.storageInfo=new Z.A({blockWidth:n.size[0],blockHeight:n.size[1],pyramidBlockWidth:n.size[0],pyramidBlockHeight:n.size[1],pyramidResolutions:I,pyramidScalingFactor:b,compression:n.format,origin:n.origin,firstPyramidLevel:1,maximumPyramidLevel:c,tileInfo:n,isBsqTile:v,transposeInfo:x,blockBoundary:w}),function(e){let{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new W.A,e.extent=e.transform.forwardTransform(t))}(s),this._set("rasterInfo",s),r.capabilities.toLowerCase().includes("tilemap")){let e={tileInfo:s.storageInfo.tileInfo,parsedUrl:(0,j.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new $.d({layer:e})}}async _fetchRasterInfo(e){let t=this.sourceJSON;if("Map"===this.tileType){let e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),a=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=f.A.fromJSON(t.spatialReference||e.spatialReference),s=new V.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new A.A({width:i,height:a,bandCount:3,extent:o.A.fromJSON(e),spatialReference:r,pixelSize:s,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}let i={...e,query:{...this.ioConfig.customFetchParameters,f:"json"}},a=(0,Y.Tw)(this.url,this.sourceJSON,i),r=t.hasMultidimensions?this.request(`${this.url}/slices`,i).then(e=>e.data?.slices).catch(()=>null):null,s=await Promise.all([a,r]);return this._slices=s[1],s[0]}_fixScaleInServiceInfo(){let{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){let{pixelSize:i}=e,a=.5/e.width*i.x,{lods:r}=t,s=t.lodAt(Math.max.apply(null,r.map(e=>e.level))),n=t.lodAt(Math.min.apply(null,r.map(e=>e.level))),{tileType:l}=this;if("Map"===l)return this._levelOffset=r[0].level,[s,n];if("Raster"===l)return[r.find(e=>e.resolution===i.x)??s,n];let{minScale:o,maxScale:f}=this.sourceJSON,u=s;f>0&&(u=r.find(e=>Math.abs(e.scale-f)<a),u||=r.filter(e=>e.scale>f).sort((e,t)=>e.scale>t.scale?1:-1)[0]??s);let h=n;return o>0&&(h=r.find(e=>Math.abs(e.scale-o)<a)??n,this._levelOffset=h.level-n.level),[u,h]}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],K.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,s.MZ)()],K.prototype,"tileType",void 0),K=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.ImageServerRaster")],K);const Q=K;var ee=i(10713);const te=new Map([["byte","u8"],["signedbyte","s8"],["int8","s8"],["uint8","u8"],["int16","s16"],["uint16","u16"],["int32","s32"],["uint32","u32"],["float32","f32"],["float64","f64"],["double64","f64"]]),ie=new Map;ie.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),ie.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),ie.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),ie.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"}),ie.set("qb3",{blobExtension:".pq3",isOneSegment:!0,decoderFormat:"qb3"});let ae=class extends n.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this._isBsq=!1,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,a={}){let{blockWidth:r,blockHeight:s,blockBoundary:n}=this.rasterInfo.storageInfo,l=n[e];if(!l||l.maxRow<t||l.maxCol<i||l.minRow>t||l.minCol>i)return null;let{bandCount:o,pixelType:f}=this.rasterInfo,{ranges:u,actualTileWidth:h,actualTileHeight:p}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(u.some(e=>e.from>e.to)){let e=new Uint8Array(r*s);return new c.A({width:r,height:s,pixels:void 0,mask:e,validPixelCount:0})}let{bandIds:d}=this.ioConfig,m=this._getBandSegmentCount(),g=[],y=0;for(y=0;y<m;y++)(!d||d.includes(y))&&g.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:a.signal}));let x=await Promise.all(g),w=x.map(e=>e.data.byteLength).reduce((e,t)=>e+t),I=new Uint8Array(w),b=[],v=0;for(y=0;y<m;y++)b.push(v),I.set(new Uint8Array(x[y].data),v),v+=x[y].data.byteLength;let C=ie.get(this.rasterInfo.storageInfo.compression).decoderFormat,S="jpg"===C&&4===o&&1===b.length,T=await this.decodePixelBlock(I.buffer,{width:r,height:s,format:C,planes:d?.length||o,offsets:b,pixelType:f,canvasUsage:S?"no-canvas":void 0,decodeJpegAsRgb:!1}).catch(()=>null);if(null==T)return null;let{noDataValue:A}=this.rasterInfo;if(null!=A&&"lerc"!==C&&!T.mask&&(A=A[0],null!=A)){let e=T.width*T.height,t=new Uint8Array(e);if(Math.abs(A)>1e24)for(y=0;y<e;y++)Math.abs((T.pixels[0][y]-A)/A)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)T.pixels[0][y]!==A&&(t[y]=1);T.mask=t}let R=0,M=0;if(h!==r||p!==s){let e=T.mask;if(e)for(y=0;y<s;y++)if(M=y*r,y<p)for(R=h;R<r;R++)e[M+R]=0;else for(R=0;R<r;R++)e[M+R]=0;else for(e=new Uint8Array(r*s),T.mask=e,y=0;y<p;y++)for(M=y*r,R=0;R<h;R++)e[M+R]=1}return T}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);let t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:a,files:r}=this._parseHeader(i.data),{skipMapInfo:s,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!s){let t=await this._fetchAuxiliaryData(e);null!=t&&(a.statistics=t.statistics??a.statistics,a.histograms=t.histograms,t.histograms&&null==a.statistics&&(a.statistics=(0,S.Pg)(t.histograms)))}s&&this.updateImageSpaceRasterInfo(a),this._set("rasterInfo",a),this._files=r;let l=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw Error("invalid array buffer must be multiples of 16");let t;if(ee.Z){let i=new Uint8Array(e),a=new ArrayBuffer(e.byteLength),r=new Uint8Array(a);for(let t=0;t<e.byteLength/4;t++)for(let e=0;e<4;e++)r[4*t+e]=i[4*t+3-e];t=new Uint32Array(a)}else t=new Uint32Array(e);return t}(l.data);let{blockWidth:o,blockHeight:f}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:c}=this.rasterInfo,p=[],d=this._getBandSegmentCount(),m=0,g=-1;for(;m<this._storageIndex.length;){g++;let e=Math.ceil(h/o/u**g)-1,t=Math.ceil(c/f/u**g)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return this._isBsq?this.rasterInfo.bandCount:1}_getTileLocation(e,t,i){let a,r,s,{blockWidth:n,blockHeight:l,pyramidScalingFactor:o}=this.rasterInfo.storageInfo,{width:f,height:u}=this.rasterInfo,h=this._getBandSegmentCount(),c=0,p=0;for(s=0;s<e;s++)p=o**s,a=Math.ceil(f/n/p),r=Math.ceil(u/l/p),c+=a*r;p=o**e,a=Math.ceil(f/n/p),r=Math.ceil(u/l/p),c+=t*a+i,c*=4*h;let d=this._storageIndex.subarray(c,c+4*h),m=0,g=0,y=[];for(let e=0;e<h;e++)m=d[4*e]*2**32+d[4*e+1],g=m+d[4*e+2]*2**32+d[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:i<a-1?n:Math.ceil(f/p)-n*(a-1),actualTileHeight:t<r-1?l:Math.ceil(u/p)-l*(r-1)}}_parseHeader(e){let t=(0,P.V6)(e,"MRF_META/Raster");if(!t)throw new a.A("mrf:open","not a valid MRF format");let i=(0,P.V6)(t,"Size"),r=parseInt(i.getAttribute("x"),10),s=parseInt(i.getAttribute("y"),10),n=parseInt(i.getAttribute("c"),10),l=((0,P.mX)(t,"Compression")||"none").toLowerCase();if(!ie.has(l))throw new a.A("mrf:open","currently does not support compression "+l);let u=(0,P.mX)(t,"DataType")||"UInt8",h=te.get(u.toLowerCase());if(null==h)throw new a.A("mrf:open","currently does not support pixel type "+u);let c=(0,P.V6)(t,"PageSize"),p=parseInt(c.getAttribute("x"),10),d=parseInt(c.getAttribute("y"),10),m=c.getAttribute("c"),g=m?m===String(n):ie.get(l).isOneSegment;this._isBsq=!g;let y,x=(0,P.V6)(t,"DataValues");if(x){let e=x.getAttribute("NoData");null!=e&&(y=e.trim().split(" ").map(e=>parseFloat(e)))}if((0,P.V6)(e,"MRF_META/CachedSource"))throw new a.A("mrf:open","currently does not support MRF referencing other data files");let w,I=(0,P.V6)(e,"MRF_META/GeoTags"),b=(0,P.V6)(I,"BoundingBox"),v=!1;if(null!=b){let e=parseFloat(b.getAttribute("minx")),t=parseFloat(b.getAttribute("miny")),i=parseFloat(b.getAttribute("maxx")),a=parseFloat(b.getAttribute("maxy")),r=(0,P.mX)(I,"Projection")||"",s=f.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){let e=Number(r.slice(5));!isNaN(e)&&0!==e&&(s=new f.A({wkid:e}))}else s=E(r)??f.A.WGS84;else v=!0,s=new f.A({wkid:3857});w=new o.A(e,t,i,a),w.spatialReference=s}else v=!0,w=new o.A({xmin:-.5,ymin:.5-s,xmax:r-.5,ymax:.5,spatialReference:new f.A({wkid:3857})});let C=(0,P.V6)(e,"MRF_META/Rsets"),S=parseInt(C?.getAttribute("scale")||"2",10),T=w.spatialReference,R=new Z.A({origin:new V.A({x:w.xmin,y:w.ymax,spatialReference:T}),blockWidth:p,blockHeight:d,pyramidBlockWidth:p,pyramidBlockHeight:d,compression:l,pyramidScalingFactor:S}),M=new V.A({x:w.width/r,y:w.height/s,spatialReference:T}),O=new A.A({width:r,height:s,extent:w,isPseudoSpatialReference:v,spatialReference:T,bandCount:n,pixelType:h,pixelSize:M,noDataValue:y,storageInfo:R}),_=this._getAuxFullPath((0,P.mX)(t,"DataFile")),k=this._getAuxFullPath((0,P.mX)(t,"IndexFile"));return{rasterInfo:O,files:{mrf:this.url,index:k||this.url.replace(".mrf",".idx"),data:_||this.url.replace(".mrf",ie.get(l).blobExtension)}}}_getAuxFullPath(e){return!e||e.includes("\\")?null:e.includes("/")?e.startsWith(new URL(this.url).origin)?e:null:`${this.url.slice(0,this.url.lastIndexOf("/"))}/${e}`}async _fetchAuxiliaryData(e){try{let{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return z(t)}catch{return null}}};(0,r.Cg)([(0,s.MZ)()],ae.prototype,"_files",void 0),(0,r.Cg)([(0,s.MZ)()],ae.prototype,"_storageIndex",void 0),(0,r.Cg)([(0,s.MZ)()],ae.prototype,"_isBsq",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],ae.prototype,"datasetFormat",void 0),ae=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.MRFRaster")],ae);const re=ae;i(44208);var se=i(53966),ne=i(9334);function le(e){let t=e.fields,i=e.records,a=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",r=[{name:a,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),s=r.map(e=>e.name),n=[],l=0,o=0;return i.forEach(e=>{let t={};for(t[a]=l++,o=1;o<s.length;o++)t[s[o]]=e[o-1];n.push({attributes:t})}),{displayFieldName:"",fields:r,features:n}}function oe(e){let t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};let a=t.getUint32(4,!0),r=t.getUint16(8,!0),s=t.getUint16(10,!0),n={version:i,recordCount:a,headerByteCount:r,recordByteCount:s},l=32,o=[],f=[];for(;13!==t.getUint8(l);){let i=String.fromCharCode(t.getUint8(l+11)).trim();o.push({name:(0,ne.w)(new Uint8Array(e,l,11)),type:i,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(i)],length:t.getUint8(l+16)}),l+=32}if(l+=1,o.length>0)for(;f.length<a&&e.byteLength-l>s;){let i=[];32===t.getUint8(l)?(l+=1,o.forEach(t=>{if("C"===t.type)i.push((0,ne.w)(new Uint8Array(e,l,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,l,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,l,t.length)).trim()));else if("D"===t.type){let a=String.fromCharCode.apply(null,new Uint8Array(e,l,t.length)).trim();i.push(new Date(parseInt(a.slice(0,4),10),parseInt(a.slice(4,6),10)-1,parseInt(a.slice(6,8),10)))}l+=t.length}),f.push(i)):l+=s}return{header:n,fields:o,records:f,recordSet:le({fields:o,records:f})}}var fe=i(44094),ue=i(94213);let he=class extends n.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,a={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;let r=await this._fetchRawTiffTile(e,t,i,!1,a);if(null!=r&&this._headerInfo.hasMaskBand){let s=await this._fetchRawTiffTile(e,t,i,!0,a);null!=s&&s.pixels[0]instanceof Uint8Array&&(r.mask=s.pixels[0])}return r}async _open(e){let t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new a.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));let{littleEndian:r,firstIFDPos:s,isBigTiff:n}=(0,fe.uT)(i),l=[],u={fileChunk:i,posIFD:s,fileOffset:0};await this._readIFDs(l,u,r,n?8:4,t);let{imageInfo:h,rasterInfo:c}=function(e){let t=(0,fe.uc)(e),{width:i,height:a,tileWidth:r,tileHeight:s,planes:n,pixelType:l,compression:u,firstPyramidLevel:h,maximumPyramidLevel:c,pyramidBlockWidth:p,pyramidBlockHeight:d,pyramidResolutions:m,tileBoundary:g,affine:y,metadata:x,colormap:w}=t,I=E(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),b=!!t.isPseudoGeographic;I??=(b=!0,new f.A({wkid:3857}));let v=new o.A({...t.extent,spatialReference:I}),C=v?new V.A({x:v.xmin,y:v.ymax,spatialReference:I}):new V.A({x:0,y:0}),S=new Z.A({blockWidth:r,blockHeight:s,pyramidBlockWidth:p,pyramidBlockHeight:d,compression:u,origin:C,firstPyramidLevel:h,maximumPyramidLevel:c,pyramidResolutions:m,blockBoundary:g}),T=new V.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/a,spatialReference:I}),R=x?{BandProperties:x.bandProperties,DataType:x.dataType}:{},M=new A.A({width:i,height:a,bandCount:n,pixelType:l,pixelSize:T,storageInfo:S,spatialReference:I,isPseudoSpatialReference:b,keyProperties:R,extent:v,colormap:w,statistics:x?x.statistics:null});if(y?.length&&(M.nativeExtent=new o.A({xmin:-.5,ymin:.5-a,xmax:i-.5,ymax:.5,spatialReference:I}),M.transform=new N.A({polynomialOrder:1,forwardCoefficients:[y[2]+y[0]/2,y[5]-y[3]/2,y[0],y[3],-y[1],-y[4]]}),M.extent=M.transform.forwardTransform(M.nativeExtent),M.pixelSize=new V.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/a,spatialReference:I}),S.origin.x=-.5,S.origin.y=.5),m){let{x:e,y:t}=M.pixelSize;m.forEach(i=>{i.x*=e,i.y*=t})}return{imageInfo:t,rasterInfo:M}}(l),p=(0,fe.zS)(l),d=(0,fe.r9)(l);if(this._headerInfo={littleEndian:r,isBigTiff:n,ifds:l,pyramidIFDs:p,maskIFDs:d,...h},this._set("rasterInfo",c),!h.isSupported)throw new a.A("tiffraster:open","this tiff is not supported: "+h.message);if(!h.tileWidth)throw new a.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");c.isPseudoSpatialReference&&se.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");let m=l[0].get("PREDICTOR")?.values?.[0];if(3===l[0].get("SAMPLEFORMAT")?.values?.[0]&&2===m)throw new a.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");let{skipMapInfo:g,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!g){let t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,S.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;let i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new V.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,c)}!y.includes("vat.dbf")&&1===c.bandCount&&"u8"===c.pixelType&&!g&&(c.attributeTable=await this._fetchAuxiliaryTable(e),null!=c.attributeTable&&(c.keyProperties.DataType="thematic")),g&&this.updateImageSpaceRasterInfo(c),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:a,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(a=r+a,i=(await this.request(this.url,{range:{from:a,to:a+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:a,posIFD:r}}async _readIFDs(e,t,i,r=4,s){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,s);let n=await this._readIFD(t,i,ue.NB,r,s);if(!n?.ifd)throw new a.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(n.ifd),!n.nextIFD)return null;t.posIFD=n.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,r,s)}async _readIFD(e,t,i=ue.NB,a=4,r){let{fileChunk:s,posIFD:n,fileOffset:l}=e;if(!e.fileChunk)return null;let o=(0,fe.JM)(s,t,n,l,i,a);if(o.success){let e=[];if(o.ifd?.forEach(t=>{t.values||e.push(t)}),e.length>0&&await this._fillOffsets(e,t,o.nextIFD,r),o.ifd?.has("GEOKEYDIRECTORY")){let e=o.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){let a=i[0]+"."+i[1]+"."+i[2];n=e.valueOffset+6-l;let o=await this._validateOrFetchHeaderBuffer({fileChunk:s,posIFD:n,fileOffset:l},r);e.data=(await this._readIFD(o,t,ue.YC,2,r))?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[a]})}}return o}return o.requiredBufferSize?(s=(await this.request(this.url,{range:{from:l,to:l+n+o.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,s.byteLength<n+o.requiredBufferSize?null:(e.fileChunk=s,e.fileOffset=l,this._readIFD(e,t,i,a,r))):null}async _fillOffsets(e,t,i,a){let r=e.filter(e=>null!=e.offlineOffsetSize);if(0===r.length)return;let s=r.map(e=>e.offlineOffsetSize),n=Math.min.apply(null,s.map(e=>e[0])),l=Math.max.apply(null,s.map(e=>e[0]+e[1])),o=1===s.length||l-n<=this._bufferSize;if(!o&&s.length>1&&(s.sort((e,t)=>e[0]-t[0]),o=s.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,s[0][0])===l),o){let e=await this._fetchOffsets(n,Math.max(l,n+this._bufferSize),a);return void r.forEach(i=>(0,fe.Cr)(e,t,i,n))}let f=r.map(async e=>{let i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],a);(0,fe.Cr)(r,t,e,i[0])});await Promise.all(f)}async _fetchOffsets(e,t,i){let a=[],r=this._chunkSize,s=Math.ceil((t-e)/r),n=e;for(let e=0;e<s;e++)a.push(this.request(this.url,{range:{from:n,to:e===s-1?t:n+r-1},responseType:"array-buffer",signal:i})),n+=r;let l=await Promise.all(a);if(1===s)return l[0].data;let o=new Uint8Array(t-e+1);for(let e=0;e<s;e++)o.set(new Uint8Array(l[e].data),e*r);return o.buffer}async _fetchRawTiffTile(e,t,i,a,r={}){let s=this._getTileLocation(e,t,i,a);if(!s)return null;let{ranges:n,actualTileWidth:l,actualTileHeight:o,ifd:f}=s,u=n.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal})),h=await Promise.all(u),c=h.map(e=>e.data.byteLength).reduce((e,t)=>e+t),p=1===h.length?h[0].data:new ArrayBuffer(c),d=[0],m=[0];if(h.length>1){let e=new Uint8Array(p);for(let t=0,i=0;t<h.length;t++){let a=h[t].data;e.set(new Uint8Array(a),i),d[t]=i,i+=a.byteLength,m[t]=a.byteLength}}let{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),x=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:f,offsets:d,sizes:m},width:g,height:y,planes:null,pixelType:null});if(null==x)return null;if(l!==g||o!==y){let e=x.mask;if(e)for(let t=0;t<y;t++){let i=t*g;if(t<o)for(let t=l;t<g;t++)e[i+t]=0;else for(let t=0;t<g;t++)e[i+t]=0}else{e=new Uint8Array(g*y),x.mask=e;for(let t=0;t<o;t++){let i=t*g;for(let t=0;t<l;t++)e[i+t]=1}}}return x}_getTileLocation(e,t,i,a=!1){let{firstPyramidLevel:r,blockBoundary:s}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:l}=this;if(!l)return null;let o=a?l.maskIFDs[n]:0===n?l.ifds[0]:l.pyramidIFDs[n-1];if(!o)return null;let f=(0,fe.XO)(o,l),u=(0,fe.wc)(o,"TILEOFFSETS"),h=(0,fe.wc)(o,"TILEBYTECOUNTS");if(!u?.length||!h?.length)return null;let{minRow:c,minCol:p,maxRow:d,maxCol:m}=s[n];if(t>d||i>m||t<c||i<p)return null;let g=(0,fe.LZ)(o,"IMAGEWIDTH"),y=(0,fe.LZ)(o,"IMAGELENGTH"),x=(0,fe.LZ)(o,"TILEWIDTH"),w=(0,fe.LZ)(o,"TILELENGTH"),I=[];if(f){let{bandCount:e}=this.rasterInfo;for(let a=0;a<e;a++){let e=a*(d+1)*(m+1)+t*(m+1)+i;I[a]={from:u[e],to:u[e]+h[e]-1}}}else{let e=t*(m+1)+i;I.push({from:u[e],to:u[e]+h[e]-1})}for(let e=0;e<I.length;e++)if(null==I[e].from||!I[e].to||I[e].to<0)return null;return{ranges:I,ifd:o,actualTileWidth:i===m&&g%x||x,actualTileHeight:t===d&&y%w||w}}async _fetchAuxiliaryMetaData(e){try{let{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return z(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{let{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=oe(t);return i?.recordSet?O.A.fromJSON(i.recordSet):null}catch{return null}}};(0,r.Cg)([(0,s.MZ)()],he.prototype,"_files",void 0),(0,r.Cg)([(0,s.MZ)()],he.prototype,"_headerInfo",void 0),(0,r.Cg)([(0,s.MZ)()],he.prototype,"_bufferSize",void 0),(0,r.Cg)([(0,s.MZ)()],he.prototype,"_chunkSize",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],he.prototype,"datasetFormat",void 0),he=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.TIFFRaster")],he);const ce=he,pe=new Map;pe.set("MRF",{desc:"Meta Raster Format",constructor:re}),pe.set("TIFF",{desc:"GeoTIFF",constructor:ce}),pe.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Q}),pe.set("JPG",{desc:"JPG Raster Format",constructor:G}),pe.set("PNG",{desc:"PNG Raster Format",constructor:G}),pe.set("GIF",{desc:"GIF Raster Format",constructor:G}),pe.set("BMP",{desc:"BMP Raster Format",constructor:G}),pe.set("CovJSON",{desc:"COVJSON Raster Format",constructor:k}),pe.set("MEMORY",{desc:"In Memory Raster Format",constructor:M});class de{static get supportedFormats(){let e=new Set;return pe.forEach((t,i)=>e.add(i)),e}static async open(e){let{url:t,ioConfig:i,source:r,sourceJSON:s}=e,n=e.datasetFormat??i?.datasetFormat;n??(t.includes(".")?n=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===r?.type?.toLowerCase()?n="CovJSON":r?.extent&&r.pixelblocks&&(n="MEMORY")),"OVR"===n||"TIF"===n||"DM"===n?n="TIFF":"JPG"===n||"JPEG"===n||"JFIF"===n?n="JPG":"COVJSON"===n&&(n="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(n="RasterTileServer");let l={url:t,source:r,sourceJSON:s,datasetFormat:n,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(l).forEach(e=>{l[e]??delete l[e]}),n){if(!this.supportedFormats.has(n))throw new a.A("rasterfactory:open","not a supported format "+n);if("CRF"===n)throw new a.A("rasterfactory:open",`cannot open raster: ${t}`);let i=new(0,pe.get(n).constructor)(l);return i.rasterJobHandler=e.rasterJobHandler,i.rasterInfo=e.rasterInfo,await i.open({signal:e.signal}),i}let o=Array.from(pe.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e),f=0,u=()=>{if(n=o[f++],!n||"CRF"===n)return null;let t=new(0,pe.get(n).constructor)(l);return t.rasterJobHandler=e.rasterJobHandler,t.open({signal:e.signal}).then(()=>t).catch(()=>u())};return u()}static register(e,t,i){pe.has(e.toUpperCase())||pe.set(e.toUpperCase(),{desc:t,constructor:i})}}},330(e,t,i){function a(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let r=[];if(t){let s=a(e,i);for(let e=0;e<s.length;e++)a(s[e],t).forEach(e=>r.push(e));return r}let s=e.getElementsByTagNameNS("*",i);if(!s||0===s.length)return[];for(let e=0;e<s.length;e++)r.push(s[e]||s.item(e));return r}function r(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let s=a(e,i);return s.length>0?t?r(s[0],t):s[0]:null}function s(e,t=null){let i,a=t?r(e,t):e;return a?(i=a.textContent||a.nodeValue,i?i.trim():null):null}function n(e,t){let i,r=a(e,t),s=[];for(let e=0;e<r.length;e++)i=r[e].textContent||r[e].nodeValue,i&&(i=i.trim(),""!==i&&s.push(i));return s}function l(e,t=null){return s(e,t)?.split(" ").map(e=>Number(e))??[]}function o(e,t){return n(e,t).map(e=>Number(e))}function f(e,t){let i=s(e,t);return Number(i)}function u(e,t){let i=e?.nodeName?.toLowerCase(),a=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===a}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>n,IC:()=>a,Ui:()=>o,V6:()=>r,g7:()=>u,mX:()=>s,pN:()=>l,v7:()=>f,vv:()=>h})},10333(e,t,i){i.d(t,{A:()=>n});var a=i(32198),r=i(25482),s=i(91429);let n=class extends r.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,a.Cg)([(0,s.MZ)()],n.prototype,"affectsPixelSize",null),(0,a.Cg)([(0,s.MZ)({json:{write:!0}})],n.prototype,"spatialReference",void 0),n=(0,a.Cg)([(0,s.$K)("esri.layers.raster.transforms.BaseRasterTransform")],n)},75414(e,t,i){i.d(t,{A:()=>o});var a,r=i(32198),s=i(91429),n=i(10333),l=i(93223);let o=a=class extends n.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new a({tolerance:this.tolerance})}};(0,r.Cg)([(0,l.e)({GCSShiftXform:"gcs-shift"})],o.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)()],o.prototype,"tolerance",void 0),o=a=(0,r.Cg)([(0,s.$K)("esri.layers.raster.transforms.GCSShiftTransform")],o)},43163(e,t,i){i.d(t,{A:()=>d});var a,r=i(32198),s=i(91429),n=i(5443),l=i(86738),o=i(10333),f=i(36005),u=i(43937),h=i(93223);function c(e,t,i){let{x:a,y:r}=t;if(i<2)return{x:e[0]+a*e[2]+r*e[4],y:e[1]+a*e[3]+r*e[5]};if(2===i){let t=a*a,i=r*r,s=a*r;return{x:e[0]+a*e[2]+r*e[4]+t*e[6]+s*e[8]+i*e[10],y:e[1]+a*e[3]+r*e[5]+t*e[7]+s*e[9]+i*e[11]}}let s=a*a,n=r*r,l=a*r,o=s*a,f=s*r,u=a*n,h=r*n;return{x:e[0]+a*e[2]+r*e[4]+s*e[6]+l*e[8]+n*e[10]+o*e[12]+f*e[14]+u*e[16]+h*e[18],y:e[1]+a*e[3]+r*e[5]+s*e[7]+l*e[9]+n*e[11]+o*e[13]+f*e[15]+u*e[17]+h*e[19]}}function p(e,t,i){let{xmin:a,ymin:r,xmax:s,ymax:l,spatialReference:o}=t,f=[];if(i<2)f.push({x:a,y:l}),f.push({x:s,y:l}),f.push({x:a,y:r}),f.push({x:s,y:r});else{let e=10;for(let t=0;t<e;t++)f.push({x:a,y:r+(l-r)*t/(e-1)}),f.push({x:s,y:r+(l-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)f.push({x:a+(s-a)*t/e,y:r}),f.push({x:a+(s-a)*t/e,y:l})}f=f.map(t=>c(e,t,i));let u=f.map(e=>e.x),h=f.map(e=>e.y);return new n.A({xmin:Math.min.apply(null,u),xmax:Math.max.apply(null,u),ymin:Math.min.apply(null,h),ymax:Math.max.apply(null,h),spatialReference:o})}let d=a=class extends o.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){let{coeffX:i,coeffY:a}=t;if(!i?.length||!a?.length||i.length!==a.length)return null;let r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(a[e]);return r}writeForwardCoefficients(e,t,i){let a=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?a.push(e[t]):r.push(e[t]);t.coeffX=a,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients"),t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){let[t,i,a,r,s,n]=e,l=a*n-s*r,o=s*r-a*n;return[(s*i-t*n)/l,(a*i-t*r)/o,n/l,r/o,-s/l,-a/o]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){let{inverseCoeffX:i,inverseCoeffY:a}=t;if(!i?.length||!a?.length||i.length!==a.length)return null;let r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(a[e]);return r}writeInverseCoefficients(e,t,i){let a=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?a.push(e[t]):r.push(e[t]);t.inverseCoeffX=a,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){let t=c(this.forwardCoefficients,e,this.polynomialOrder);return new l.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){let t=c(this.inverseCoefficients,e,this.polynomialOrder);return new l.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new a({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"polynomialOrder",void 0),(0,r.Cg)([(0,s.MZ)()],d.prototype,"forwardCoefficients",void 0),(0,r.Cg)([(0,f.w)("forwardCoefficients",["coeffX","coeffY"])],d.prototype,"readForwardCoefficients",null),(0,r.Cg)([(0,u.K)("forwardCoefficients")],d.prototype,"writeForwardCoefficients",null),(0,r.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"inverseCoefficients",null),(0,r.Cg)([(0,f.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],d.prototype,"readInverseCoefficients",null),(0,r.Cg)([(0,u.K)("inverseCoefficients")],d.prototype,"writeInverseCoefficients",null),(0,r.Cg)([(0,s.MZ)()],d.prototype,"affectsPixelSize",null),(0,r.Cg)([(0,h.e)({PolynomialXform:"polynomial"})],d.prototype,"type",void 0),d=a=(0,r.Cg)([(0,s.$K)("esri.layers.raster.transforms.PolynomialTransform")],d)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1003],{1003(e,t,i){i.r(t),i.d(t,{default:()=>me});var a=i(49186),r=i(32198),s=i(91429),n=i(49859),l=i(68197),o=i(5443),f=i(16930),u=i(73444),h=i(94778),c=i(14140);function p(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function d(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function m(e){let{axes:t}=e.domain,i=Object.keys(t),a=[],r=[],s=-1,n=-1,l=[];for(let e=0;e<i.length;e++){let o=i[e];p(o)?s=e:d(o)&&(n=e);let f=t[o],u=[];if("values"in f){f.values.forEach(e=>u.push("string"==typeof e?new Date(e).getTime():e));let e=u[1]-u[0];a.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{let{start:e,stop:t,num:i}=f,s=(t-e)/(i-1);a.push([e-.5*s,t+.5*s]),r.push(s);for(let t=0;t<i;t++)u.push(e+s*t)}l.push({name:o,values:u,extent:[u[0],u[u.length-1]]})}s>-1&&-1===n?n=+(0===s):n>-1&&-1===s?s=+(0===n):-1===n&&-1===s&&(s=0,n=1),l=l.filter((e,t)=>t!==s&&t!==n);let{referencing:u}=e.domain,h=u.find(e=>e.coordinates.includes(i[s])).system.id,c=h?.slice(h.lastIndexOf("/")+1),m=null==c||"CRS84"===c?4326:Number(c),g=new f.A({wkid:m}),[y,x]=a[s],[w,I]=a[n],b=new o.A({xmin:y,xmax:x,ymin:w,ymax:I,spatialReference:g});return{width:Math.round(b.width/r[s]),height:Math.round(b.height/r[n]),extent:b,dimensions:l}}function g(e){let t=(0,u.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function y(){return Math.round(255*Math.random())}function x(e){let t={},{parameters:i}=e;if(!i)return t;for(let[e,a]of Object.entries(i)){let{type:i,description:r,unit:s,categoryEncoding:n,observedProperty:o}=a;if("Parameter"===i&&(t[e]={},r&&(t[e].description=g(r)),s&&(t[e].unit=s.label?g(s.label):null,t[e].symbol=s.symbol?.value),n)){let i=Object.entries(n).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})),a=!1;o?.categories?.length&&(o.categories.forEach(e=>{if(!e.id)return;let t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find(e=>e.ClassName===t);if(r&&(r.Label=e.label?g(e.label):null,e.preferredColor)){let t=l.A.fromHex(e.preferredColor);t&&(a=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}}),a&&i.forEach(e=>{e.Red??(e.Red=y(),e.Green=y(),e.Blue=y())}));let r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map(e=>({attributes:e}))};a&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function w(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let a=0;a<e.length;a++){let r=e[a];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,h.X1)(t,i)}function I(e,t,i){let a=e.map((e,i)=>({name:e,count:t[i]})).sort((e,t)=>e.name>t.name?-1:1),r=(e=>t=>e*=t.count)(1),s=[...a.slice(1),{name:"",count:1}].reverse().map(r).reverse(),n=0;for(let r=e.length-1;r>=0;r--){let l=a.findIndex(({name:t})=>t===e[r]);n+=s[l]*(i%t[r]),i=Math.floor(i/t[r])}return n}var b=i(17676),v=i(4366),C=i(47520),S=i(51927),T=i(45617),A=i(87186);let R=class extends n.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.preGenerateTiles=!0,this.source=null}get url(){return""}fetchRawTile(e,t,i,a={}){if(!this._pixelBlockTiles){let{rasterInfo:r}=this,[s,n]=r.storageInfo.tileInfo.size,{sliceId:l}=a,{pixelBlocks:o}=this.source,f={pixelBlock:null==l?o[0]:o[l],useBilinear:"thematic"!==r.dataType,tileSize:{width:s,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(f,a):(0,C.J$)(f);return Promise.resolve(u)}let r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){let t=this.source,{pixelBlocks:i,attributeTable:a,statistics:r,histograms:s,name:n,nativeExtent:l,transform:u,colormap:h}=t,c=i[0],{width:p,height:d,pixelType:m}=c,g=t.extent??new o.A({xmin:-.5,ymin:.5,xmax:p-.5,ymax:d-.5,spatialReference:new f.A({wkid:3857})}),y=t.isPseudoSpatialReference??!t.extent,x={x:g.width/p,y:g.height/d},w={...t.keyProperties};t.dataType&&(w.DataType=t.dataType),t.bandInfos&&(w.BandProperties=t.bandInfos.map(e=>e.toJSON())),a&&(w.DataType="Thematic");let I=new A.A({width:p,height:d,pixelType:m,extent:g,nativeExtent:l,attributeTable:a,colormap:h,transform:u,pixelSize:x,spatialReference:g.spatialReference,bandCount:c.pixels.length,keyProperties:w,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:y,histograms:s});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(I),this.createRemoteDatasetStorageInfo(I,512,512),this._set("rasterInfo",I),this.updateTileInfo(),I.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,I.multidimensionalInfo):this.preGenerateTiles&&await this._buildInMemoryRaster(c,{width:512,height:512},e),I.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){let{rasterInfo:r}=this,s=r.storageInfo.maximumPyramidLevel??0,n="thematic"!==r.dataType,l=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:s,useBilinear:n},i):Promise.resolve((0,C.lD)(e,t,s,n)),o=null!=r.statistics,f=null!=r.histograms,u=this.ioConfig.skipStatistics||o?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,S.f4)(e)),h=await(0,b.Lx)([l,u]);if(!h[0].value&&h[1].value)throw new a.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,o||(r.statistics=h[1].value?.statistics),f||(r.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let a=0;a<t.variables.length;a++){let r=t.variables[a];if(r.statistics)continue;let s=r.dimensions.map(e=>new T.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),n=(0,v.NG)(s,t),l=null==n?null:e[n];if(null==l)continue;let o=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:l},i):(0,S.eH)(l);r.statistics=o.statistics,r.histograms||=o.histograms}}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],R.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,s.MZ)({constructOnly:!0})],R.prototype,"preGenerateTiles",void 0),(0,r.Cg)([(0,s.MZ)()],R.prototype,"source",void 0),(0,r.Cg)([(0,s.MZ)()],R.prototype,"url",null),R=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.InMemoryRaster")],R);const M=R;var O=i(22671);let _=class extends n.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,a={}){return this._inMemoryRaster.fetchRawTile(e,t,i,a)}async _open(e){let{extent:t,pixelBlocks:i,multidimensionalInfo:a,attributeTable:r,bandNames:s}=await this._fetchData(e),{statistics:n,histograms:l}=(0,S.eH)(i[0]),o=s?.map(e=>({BandName:e})),f={DataType:r?"Thematic":a?"Scientific":"Generic",BandProperties:o},u=new M({source:{extent:t,pixelBlocks:i,attributeTable:r?O.A.fromJSON(r):null,multidimensionalInfo:a,statistics:n,histograms:l,keyProperties:f,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;let h=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",h.slice(0,h.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){let t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new a.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new a.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new a.A(i,"Missing domain referencing in the grid coverage data");let r=Object.values(t.ranges);for(let e=0;e<r.length;e++){let{axisNames:t,shape:s,type:n,values:l}=r[e];if(!("ndarray"===n.toLowerCase()&&l?.length&&t?.length&&s?.length))throw new a.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!p(t[t.length-1])||!d(t[t.length-2]))throw new a.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){let{width:t,height:i,extent:a,dimensions:r}=m(e),{ranges:s}=e,n=Object.keys(s).sort((e,t)=>e<t?-1:1),l=[];for(let e=0;e<n.length;e++){let t=n[e];r?.length&&l.push({name:t,dimensions:r})}let o=x(e);l.forEach(e=>o[e.name]&&Object.assign(e,o[e.name]));let f=l.length?{variables:l}:void 0,u=[];for(let e=0;e<n.length;e++){let{values:a,dataType:l,axisNames:o,shape:f}=s[n[e]],h=f.length>2?e*f.slice(0,-2).reduce((e,t)=>e*t):0,p=o.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":w(a),g=t*i,y=a.length/g;for(let s=0;s<y;s++){let n=c.A.createEmptyBand(m,g),l=new Uint8Array(g).fill(255),o=!1,f=s*g;for(let e=0;e<g;e++){let t=a[f+e];null==t?(l[e]=0,o=!0):n[e]=t}if(0===e||r?.length){let e=new c.A({width:t,height:i,mask:o?l:null,pixels:[n],pixelType:m});e.updateStatistics(),r?.length?u[I(p,d,s)+h]=e:u.push(e)}else{let e=u[s];e.pixels.push(n),o?e.mask&&=c.A.combineBandMasks([e.mask,l]):e.mask=o?l:null}}}return{extent:a,pixelBlocks:u,multidimensionalInfo:f,attributeTable:Object.values(o).find(e=>e.attributeTable)?.attributeTable,bandNames:f?void 0:n}}(t)}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],_.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,s.MZ)({constructOnly:!0})],_.prototype,"source",void 0),_=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.CovJSONRaster")],_);const k=_;var F=i(4576),B=i(21325),P=i(330),N=i(43163);function D(e,t){if(!e||!t)return null;let i=[];for(let a=0;a<e.length;a++)i.push(e[a]),i.push(t[a]);return i}function E(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new f.A({wkid:t});if(e=String(e).trim(),(0,B.jp)(e))return new f.A({wkt2:e});let i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;let a=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),s=r>-1?r:i.indexOf("GEOGCS");if(-1===s)return null;let n=e.slice(s,e.lastIndexOf("]",a)+1).trim(),l=e.slice(a,e.lastIndexOf("]")).trim();t=L(n);let o=t?new f.A({wkid:t}):new f.A({wkt:n}),u=L(l);return u&&(o.vcsWkid=u),o}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=L(e),0===t?new f.A({wkt:e}):new f.A({wkid:t})):null}function L(e){let t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),i=t[t.length-1].split(","),a=i[0]?.toLowerCase();if(("epsg"===a||"esri"===a)&&e.endsWith('"]]')){let e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function H(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};let t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,P.g7)(e,"SRS")){if(!t.spatialReference){let i=(0,P.mX)(e);t.spatialReference=E(i)}}else if((0,P.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){let{spatialReference:i,transform:a}=function(e){let t=(0,P.V6)(e,"GeodataXform"),i=E((0,P.v7)(t,"SpatialReference/WKID")||(0,P.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};let a=(0,P.v7)(t,"PolynomialOrder")??1,r=(0,P.Ui)(t,"CoeffX/Double"),s=(0,P.Ui)(t,"CoeffY/Double"),n=(0,P.Ui)(t,"InverseCoeffX/Double"),l=(0,P.Ui)(t,"InverseCoeffY/Double"),o=D(r,s),f=D(n,l);return{spatialReference:i,transform:o&&f&&o.length&&f.length?new N.A({spatialReference:i,polynomialOrder:a,forwardCoefficients:o,inverseCoefficients:f}):null}}(e);t.transform=a,t.spatialReference||=i}else(0,P.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,P.mX)(e));else if((0,P.g7)(e,"PAMRasterBand")){let i=function(e){let t,i,a,r,s=(0,P.v7)(e,"NoDataValue"),n=(0,P.V6)(e,"Histograms/HistItem"),l=(0,P.v7)(n,"HistMin"),o=(0,P.v7)(n,"HistMax"),f=(0,P.v7)(n,"BucketCount"),u=(0,P.mX)(n,"HistCounts")?.split("|").map(e=>Number(e));(0,P.IC)(e,"Metadata/MDI").forEach(e=>{let s=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":t=s;break;case"STATISTICS_MAXIMUM":i=s;break;case"STATISTICS_MEAN":a=s;break;case"STATISTICS_STDDEV":r=s}});let h=(0,P.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:s,histogram:u?.length&&null!=l&&null!=o?{min:l,max:o,size:f||u.length,counts:u}:null,sourceBandIndex:h,statistics:null!=t&&null!=i?{min:t,max:i,avg:a,stddev:r}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}});let i=t.rasterBands;return i.length&&(t.statistics=i[0].statistics?i.map(e=>e.statistics).filter(F.Ru):null,t.histograms=i[0].histogram?i.map(e=>e.histogram).filter(F.Ru):null),t}var z=i(85951),J=i(96381);let U=class extends n.A{set rasterJobHandler(e){this._set("rasterJobHandler",e),this._inMemoryRaster&&(this._inMemoryRaster.rasterJobHandler=e)}fetchRawTile(e,t,i,a={}){if(this._imageBlob){let{blockWidth:a,blockHeight:r}=this.rasterInfo.storageInfo;return this.decodePixelBlock(this._imageBlob,{tileSize:[a,r],tileIndex:[e,t,i],canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0})}return this._inMemoryRaster?this._inMemoryRaster.fetchRawTile(e,t,i,a):Promise.resolve(null)}async _open(e){let t=await this._fetchData(e);if(null==t)throw new a.A("image-aux-raster:open","the data cannot be decoded");let{spatialReference:i,statistics:r,histograms:s,transform:n}=await this._fetchAuxiliaryData(e),l=!i;l&&(i=new f.A({wkid:3857})),s?.length&&null==r&&(r=(0,S.Pg)(s));let{width:u,height:h,pixelBlock:c}=t,p=new o.A({xmin:-.5,ymin:.5-h,xmax:u-.5,ymax:.5,spatialReference:i}),d=n?n.forwardTransform(p):p,m=!0;if(n){let e=n.forwardCoefficients;m=e&&0===e[1]&&0===e[2],m&&(n=null,p=d)}if(!c){let e=new A.A({width:u,height:h,bandCount:3,pixelType:"u8",extent:d,nativeExtent:p,transform:n,pixelSize:{x:d.width/u,y:d.height/h},spatialReference:d.spatialReference,keyProperties:{DataType:"Processed"}});return this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(e),this.createRemoteDatasetStorageInfo(e,512,512),this._set("rasterInfo",e),void this.updateTileInfo()}let{rasterJobHandler:g,ioConfig:y}=this,x=new M({preGenerateTiles:!1,rasterJobHandler:g,source:{extent:d,nativeExtent:p,transform:n,pixelBlocks:[c],statistics:r,histograms:s,keyProperties:{DataType:"Processed"},isPseudoSpatialReference:l},ioConfig:{...y,sampling:"closest",skipStatistics:!0}});await x.open(),x.source=null,this._set("rasterInfo",x.rasterInfo),this._inMemoryRaster=x}async _fetchData(e){let{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,J.g)(t);if("jpg"!==i&&"png"!==i&&"gif"!==i&&"bmp"!==i)throw new a.A("image-aux-raster:open","the data is not a supported format");if(this._set("datasetFormat",i.toUpperCase()),"jpg"===i){let e=(0,z.R)(t);if(null==e)throw new a.A("image-aux-raster:open","the data is not a supported format");return this._imageBlob=t,e}try{let e=await this.decodePixelBlock(t,{format:i,canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0});return this._imageBlob=t,e?{width:e.width,height:e.height,pixelBlock:e}:null}catch{let e=await this.decodePixelBlock(t,{format:i,canvasUsage:"no-canvas",skipStatistics:!0});return e?{width:e.width,height:e.height,pixelBlock:e}:null}}async _fetchAuxiliaryData(e){let t=e?.signal,{skipExtensions:i=[],skipMapInfo:a}=this.ioConfig,r=a||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),s=this.datasetFormat,n="JPG"===s?"jgw":"PNG"===s?"pgw":"BMP"===s?"bpw":null,l=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),o=await(0,b.Lx)([r,l]);if(t?.aborted)throw(0,b.NK)();let f=H(o[0].value?.data);if(!f.transform){let e=o[1].value?o[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;f.transform=6===e?.length?new N.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return f}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],U.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,s.MZ)()],U.prototype,"rasterJobHandler",null),U=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.ImageAuxRaster")],U);const G=U;var q=i(97768),j=i(84952),V=i(86738),W=i(75414),Z=i(20223),X=i(87045),$=i(25943),Y=i(82371);let K=class extends n.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,a={}){let{storageInfo:r,extent:s}=this.rasterInfo,{transposeInfo:n}=r,l=null!=n&&!!a.transposedVariableName;if(this._slices&&!l&&null==a.sliceId)return null;let o,f,u=l?0:r.maximumPyramidLevel-e+this._levelOffset,h=`${this.url}/tile/${u}/${t}/${i}`,c={...this._slices?l?{variable:a.transposedVariableName}:{sliceId:a.sliceId||0}:null,...a.refreshParameters};if(r.isBsqTile){let e=(a.bandIds?.length?a.bandIds:[0,1,2]).map(e=>this.request(h,{query:{...c,bandId:e},responseType:"array-buffer",signal:a.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),r=new Uint8Array(i);f=[];let s=0;for(let{data:e}of t)f.push(s),r.set(new Uint8Array(e),s),s+=e.byteLength;o=r.buffer}else o=(await this.request(h,{query:c,responseType:"array-buffer",signal:a.signal})).data;if(!o)return null;let{tileInfo:p}=r,d=l?n.tileSize:p.size,m=/^(mixed|jp)/i.test(p.format),g=await this.decodePixelBlock(o,{width:d[0],height:d[1],planes:f?.length,offsets:f,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:l,noDataValue:this.rasterInfo.noDataValue,applyJpegMask:m});if(null==g)return null;let y=r.blockBoundary[e];if("jpg"!==r.compression||i>y.minCol&&i<y.maxCol&&t>y.minRow&&t<y.maxRow)return g;let{origin:x,blockWidth:w,blockHeight:I}=r,{x:b,y:v}=this.getPyramidPixelSize(e),S=Math.round((s.xmin-x.x)/b)%w,T=Math.round((s.xmax-x.x)/b)%w||w,A=Math.round((x.y-s.ymax)/v)%I,R=Math.round((x.y-s.ymin)/v)%I||I,M=i===y.minCol?S:0,O=t===y.minRow?A:0,_=i===y.maxCol?T:w,k=t===y.maxRow?R:I;return(0,C.z$)(g,{x:M,y:O},{width:_-M,height:k-O}),g}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;let t=e;for(let e=0;e<this._slices.length;e++){let i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some(e=>{let i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){let i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),a=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),r=await Promise.all([i,a]);return r[0]&&r[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let a=0,{maximumPyramidLevel:r}=this.rasterInfo.storageInfo,s=r-a+this._levelOffset,n=i.srcLocation;for(;s>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(s,i.row,i.col,t))break}catch{}if(s--,a++,i=this.identifyPixelLocation(n,a,t.datumTransformation),null===i)return null}return-1===s||null==i?null:a}async _open(e){let t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=i.data;if(this.sourceJSON=r,!r)throw new a.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!r.tileInfo)throw new a.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo();this.tileType=r.cacheType,this.tileType??=["jpg","jpeg","png","png8","png24","png32","mixed"].includes(r.tileInfo.format.toLowerCase())?"Map":"lerc"===r.tileInfo.format.toLowerCase()?"Elevation":"Raster",this.datasetName=r.name?.slice(r.name.indexOf("/")+1)??"";let s=this.rasterInfo??await this._fetchRasterInfo({signal:t});if(null==s)throw new a.A("image-server-raster:open","cannot initialize image service");(0,Y.E9)(s,r);let n="Map"===this.tileType?function(e,t){if(!e)return null;let{minScale:i,maxScale:a,minLOD:r,maxLOD:s}=t;if(null!=r&&null!=s)return X.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=r&&e<=s)});if(0!==i&&0!==a){let t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,s=a?t(a):-1/0;return X.A.fromJSON({...e,lods:e.lods.filter(e=>{let i=t(e.scale);return i<=r&&i>=s})})}return X.A.fromJSON(e)}(r.tileInfo,r):X.A.fromJSON(r.tileInfo);(0,q.Lw)(n);let[l,o]=this._computeMinMaxLOD(s,n),{extent:f,pixelSize:u}=s,h=.001*Math.min(u.x,u.y);(u.x!==u.y||Math.abs(l.resolution-u.x)>h)&&(u.x=u.y=l.resolution,s.width=Math.ceil((f.xmax-f.xmin)/u.x-.1),s.height=Math.ceil((f.ymax-f.ymin)/u.y-.1));let c=l.level-o.level,[p,d]=n.size,m=[],g=[],{lods:y}=n;y.forEach((e,t)=>{e.level>=o.level&&e.level<=l.level&&m.push({x:e.resolution,y:e.resolution}),t<y.length-1&&g.push(Math.round(10*e.resolution/y[t+1].resolution)/10)}),m.sort((e,t)=>e.x-t.x);let x,w=this.computeBlockBoundary(f,p,d,n.origin,m,c),I=m.length>1?m.slice(1):null;r.transposeInfo&&(x={tileSize:[r.transposeInfo.rows,r.transposeInfo.cols],packetSize:s.keyProperties?._yxs.PacketSize??0});let b=g.length<=1||g.length>=3&&g.slice(0,-1).every(e=>e===g[0])?g[0]??2:Math.round(10/(o.resolution/l.resolution)**(-1/c))/10,v=!!r.bsq&&"Raster"===this.tileType;if(s.storageInfo=new Z.A({blockWidth:n.size[0],blockHeight:n.size[1],pyramidBlockWidth:n.size[0],pyramidBlockHeight:n.size[1],pyramidResolutions:I,pyramidScalingFactor:b,compression:n.format,origin:n.origin,firstPyramidLevel:1,maximumPyramidLevel:c,tileInfo:n,isBsqTile:v,transposeInfo:x,blockBoundary:w}),function(e){let{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new W.A,e.extent=e.transform.forwardTransform(t))}(s),this._set("rasterInfo",s),r.capabilities.toLowerCase().includes("tilemap")){let e={tileInfo:s.storageInfo.tileInfo,parsedUrl:(0,j.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new $.d({layer:e})}}async _fetchRasterInfo(e){let t=this.sourceJSON;if("Map"===this.tileType){let e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),a=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=f.A.fromJSON(t.spatialReference||e.spatialReference),s=new V.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new A.A({width:i,height:a,bandCount:3,extent:o.A.fromJSON(e),spatialReference:r,pixelSize:s,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}let i={...e,query:{...this.ioConfig.customFetchParameters,f:"json"}},a=(0,Y.Tw)(this.url,this.sourceJSON,i),r=t.hasMultidimensions?this.request(`${this.url}/slices`,i).then(e=>e.data?.slices).catch(()=>null):null,s=await Promise.all([a,r]);return this._slices=s[1],s[0]}_fixScaleInServiceInfo(){let{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){let{pixelSize:i}=e,a=.5/e.width*i.x,{lods:r}=t,s=t.lodAt(Math.max.apply(null,r.map(e=>e.level))),n=t.lodAt(Math.min.apply(null,r.map(e=>e.level))),{tileType:l}=this;if("Map"===l)return this._levelOffset=r[0].level,[s,n];if("Raster"===l)return[r.find(e=>e.resolution===i.x)??s,n];let{minScale:o,maxScale:f}=this.sourceJSON,u=s;f>0&&(u=r.find(e=>Math.abs(e.scale-f)<a),u||=r.filter(e=>e.scale>f).sort((e,t)=>e.scale>t.scale?1:-1)[0]??s);let h=n;return o>0&&(h=r.find(e=>Math.abs(e.scale-o)<a)??n,this._levelOffset=h.level-n.level),[u,h]}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],K.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,s.MZ)()],K.prototype,"tileType",void 0),K=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.ImageServerRaster")],K);const Q=K;var ee=i(10713);const te=new Map([["byte","u8"],["signedbyte","s8"],["int8","s8"],["uint8","u8"],["int16","s16"],["uint16","u16"],["int32","s32"],["uint32","u32"],["float32","f32"],["float64","f64"],["double64","f64"]]),ie=new Map;ie.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),ie.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),ie.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),ie.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"}),ie.set("qb3",{blobExtension:".pq3",isOneSegment:!0,decoderFormat:"qb3"});let ae=class extends n.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this._isBsq=!1,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,a={}){let{blockWidth:r,blockHeight:s,blockBoundary:n}=this.rasterInfo.storageInfo,l=n[e];if(!l||l.maxRow<t||l.maxCol<i||l.minRow>t||l.minCol>i)return null;let{bandCount:o,pixelType:f}=this.rasterInfo,{ranges:u,actualTileWidth:h,actualTileHeight:p}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(u.some(e=>e.from>e.to)){let e=new Uint8Array(r*s);return new c.A({width:r,height:s,pixels:void 0,mask:e,validPixelCount:0})}let{bandIds:d}=this.ioConfig,m=this._getBandSegmentCount(),g=[],y=0;for(y=0;y<m;y++)(!d||d.includes(y))&&g.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:a.signal}));let x=await Promise.all(g),w=x.map(e=>e.data.byteLength).reduce((e,t)=>e+t),I=new Uint8Array(w),b=[],v=0;for(y=0;y<m;y++)b.push(v),I.set(new Uint8Array(x[y].data),v),v+=x[y].data.byteLength;let C=ie.get(this.rasterInfo.storageInfo.compression).decoderFormat,S="jpg"===C&&4===o&&1===b.length,T=await this.decodePixelBlock(I.buffer,{width:r,height:s,format:C,planes:d?.length||o,offsets:b,pixelType:f,canvasUsage:S?"no-canvas":void 0,decodeJpegAsRgb:!1}).catch(()=>null);if(null==T)return null;let{noDataValue:A}=this.rasterInfo;if(null!=A&&"lerc"!==C&&!T.mask&&(A=A[0],null!=A)){let e=T.width*T.height,t=new Uint8Array(e);if(Math.abs(A)>1e24)for(y=0;y<e;y++)Math.abs((T.pixels[0][y]-A)/A)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)T.pixels[0][y]!==A&&(t[y]=1);T.mask=t}let R=0,M=0;if(h!==r||p!==s){let e=T.mask;if(e)for(y=0;y<s;y++)if(M=y*r,y<p)for(R=h;R<r;R++)e[M+R]=0;else for(R=0;R<r;R++)e[M+R]=0;else for(e=new Uint8Array(r*s),T.mask=e,y=0;y<p;y++)for(M=y*r,R=0;R<h;R++)e[M+R]=1}return T}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);let t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:a,files:r}=this._parseHeader(i.data),{skipMapInfo:s,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!s){let t=await this._fetchAuxiliaryData(e);null!=t&&(a.statistics=t.statistics??a.statistics,a.histograms=t.histograms,t.histograms&&null==a.statistics&&(a.statistics=(0,S.Pg)(t.histograms)))}s&&this.updateImageSpaceRasterInfo(a),this._set("rasterInfo",a),this._files=r;let l=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw Error("invalid array buffer must be multiples of 16");let t;if(ee.Z){let i=new Uint8Array(e),a=new ArrayBuffer(e.byteLength),r=new Uint8Array(a);for(let t=0;t<e.byteLength/4;t++)for(let e=0;e<4;e++)r[4*t+e]=i[4*t+3-e];t=new Uint32Array(a)}else t=new Uint32Array(e);return t}(l.data);let{blockWidth:o,blockHeight:f}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:c}=this.rasterInfo,p=[],d=this._getBandSegmentCount(),m=0,g=-1;for(;m<this._storageIndex.length;){g++;let e=Math.ceil(h/o/u**g)-1,t=Math.ceil(c/f/u**g)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return this._isBsq?this.rasterInfo.bandCount:1}_getTileLocation(e,t,i){let a,r,s,{blockWidth:n,blockHeight:l,pyramidScalingFactor:o}=this.rasterInfo.storageInfo,{width:f,height:u}=this.rasterInfo,h=this._getBandSegmentCount(),c=0,p=0;for(s=0;s<e;s++)p=o**s,a=Math.ceil(f/n/p),r=Math.ceil(u/l/p),c+=a*r;p=o**e,a=Math.ceil(f/n/p),r=Math.ceil(u/l/p),c+=t*a+i,c*=4*h;let d=this._storageIndex.subarray(c,c+4*h),m=0,g=0,y=[];for(let e=0;e<h;e++)m=d[4*e]*2**32+d[4*e+1],g=m+d[4*e+2]*2**32+d[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:i<a-1?n:Math.ceil(f/p)-n*(a-1),actualTileHeight:t<r-1?l:Math.ceil(u/p)-l*(r-1)}}_parseHeader(e){let t=(0,P.V6)(e,"MRF_META/Raster");if(!t)throw new a.A("mrf:open","not a valid MRF format");let i=(0,P.V6)(t,"Size"),r=parseInt(i.getAttribute("x"),10),s=parseInt(i.getAttribute("y"),10),n=parseInt(i.getAttribute("c"),10),l=((0,P.mX)(t,"Compression")||"none").toLowerCase();if(!ie.has(l))throw new a.A("mrf:open","currently does not support compression "+l);let u=(0,P.mX)(t,"DataType")||"UInt8",h=te.get(u.toLowerCase());if(null==h)throw new a.A("mrf:open","currently does not support pixel type "+u);let c=(0,P.V6)(t,"PageSize"),p=parseInt(c.getAttribute("x"),10),d=parseInt(c.getAttribute("y"),10),m=c.getAttribute("c"),g=m?m===String(n):ie.get(l).isOneSegment;this._isBsq=!g;let y,x=(0,P.V6)(t,"DataValues");if(x){let e=x.getAttribute("NoData");null!=e&&(y=e.trim().split(" ").map(e=>parseFloat(e)))}if((0,P.V6)(e,"MRF_META/CachedSource"))throw new a.A("mrf:open","currently does not support MRF referencing other data files");let w,I=(0,P.V6)(e,"MRF_META/GeoTags"),b=(0,P.V6)(I,"BoundingBox"),v=!1;if(null!=b){let e=parseFloat(b.getAttribute("minx")),t=parseFloat(b.getAttribute("miny")),i=parseFloat(b.getAttribute("maxx")),a=parseFloat(b.getAttribute("maxy")),r=(0,P.mX)(I,"Projection")||"",s=f.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){let e=Number(r.slice(5));!isNaN(e)&&0!==e&&(s=new f.A({wkid:e}))}else s=E(r)??f.A.WGS84;else v=!0,s=new f.A({wkid:3857});w=new o.A(e,t,i,a),w.spatialReference=s}else v=!0,w=new o.A({xmin:-.5,ymin:.5-s,xmax:r-.5,ymax:.5,spatialReference:new f.A({wkid:3857})});let C=(0,P.V6)(e,"MRF_META/Rsets"),S=parseInt(C?.getAttribute("scale")||"2",10),T=w.spatialReference,R=new Z.A({origin:new V.A({x:w.xmin,y:w.ymax,spatialReference:T}),blockWidth:p,blockHeight:d,pyramidBlockWidth:p,pyramidBlockHeight:d,compression:l,pyramidScalingFactor:S}),M=new V.A({x:w.width/r,y:w.height/s,spatialReference:T}),O=new A.A({width:r,height:s,extent:w,isPseudoSpatialReference:v,spatialReference:T,bandCount:n,pixelType:h,pixelSize:M,noDataValue:y,storageInfo:R}),_=this._getAuxFullPath((0,P.mX)(t,"DataFile")),k=this._getAuxFullPath((0,P.mX)(t,"IndexFile"));return{rasterInfo:O,files:{mrf:this.url,index:k||this.url.replace(".mrf",".idx"),data:_||this.url.replace(".mrf",ie.get(l).blobExtension)}}}_getAuxFullPath(e){return!e||e.includes("\\")?null:e.includes("/")?e.startsWith(new URL(this.url).origin)?e:null:`${this.url.slice(0,this.url.lastIndexOf("/"))}/${e}`}async _fetchAuxiliaryData(e){try{let{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return H(t)}catch{return null}}};(0,r.Cg)([(0,s.MZ)()],ae.prototype,"_files",void 0),(0,r.Cg)([(0,s.MZ)()],ae.prototype,"_storageIndex",void 0),(0,r.Cg)([(0,s.MZ)()],ae.prototype,"_isBsq",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],ae.prototype,"datasetFormat",void 0),ae=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.MRFRaster")],ae);const re=ae;i(44208);var se=i(53966),ne=i(9334);function le(e){let t=e.fields,i=e.records,a=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",r=[{name:a,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),s=r.map(e=>e.name),n=[],l=0,o=0;return i.forEach(e=>{let t={};for(t[a]=l++,o=1;o<s.length;o++)t[s[o]]=e[o-1];n.push({attributes:t})}),{displayFieldName:"",fields:r,features:n}}function oe(e){let t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};let a=t.getUint32(4,!0),r=t.getUint16(8,!0),s=t.getUint16(10,!0),n={version:i,recordCount:a,headerByteCount:r,recordByteCount:s},l=32,o=[],f=[];for(;13!==t.getUint8(l);){let i=String.fromCharCode(t.getUint8(l+11)).trim();o.push({name:(0,ne.w)(new Uint8Array(e,l,11)),type:i,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(i)],length:t.getUint8(l+16)}),l+=32}if(l+=1,o.length>0)for(;f.length<a&&e.byteLength-l>s;){let i=[];32===t.getUint8(l)?(l+=1,o.forEach(t=>{if("C"===t.type)i.push((0,ne.w)(new Uint8Array(e,l,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,l,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,l,t.length)).trim()));else if("D"===t.type){let a=String.fromCharCode.apply(null,new Uint8Array(e,l,t.length)).trim();i.push(new Date(parseInt(a.slice(0,4),10),parseInt(a.slice(4,6),10)-1,parseInt(a.slice(6,8),10)))}l+=t.length}),f.push(i)):l+=s}return{header:n,fields:o,records:f,recordSet:le({fields:o,records:f})}}var fe=i(44094),ue=i(94213);const he="none-tiled tiff is not optimized for access, convert to COG and retry.";let ce=class extends n.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,a={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;let r=await this._fetchRawTiffTile(e,t,i,!1,a);if(null!=r&&this._headerInfo.hasMaskBand){let s=await this._fetchRawTiffTile(e,t,i,!0,a);null!=s&&s.pixels[0]instanceof Uint8Array&&(r.mask=s.pixels[0])}return r}async _open(e){let t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new a.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));let{littleEndian:r,firstIFDPos:s,isBigTiff:n}=(0,fe.uT)(i),l=[],u={fileChunk:i,posIFD:s,fileOffset:0};await this._readIFDs(l,u,r,n?8:4,t);let{imageInfo:h,rasterInfo:c}=function(e){let t=(0,fe.uc)(e),{width:i,height:a,tileWidth:r,tileHeight:s,planes:n,pixelType:l,compression:u,firstPyramidLevel:h,maximumPyramidLevel:c,pyramidBlockWidth:p,pyramidBlockHeight:d,pyramidResolutions:m,tileBoundary:g,affine:y,metadata:x,colormap:w}=t,I=E(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),b=!!t.isPseudoGeographic;I??=(b=!0,new f.A({wkid:3857}));let v=new o.A({...t.extent,spatialReference:I}),C=v?new V.A({x:v.xmin,y:v.ymax,spatialReference:I}):new V.A({x:0,y:0}),S=new Z.A({blockWidth:r,blockHeight:s,pyramidBlockWidth:p,pyramidBlockHeight:d,compression:u,origin:C,firstPyramidLevel:h,maximumPyramidLevel:c,pyramidResolutions:m,blockBoundary:g}),T=new V.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/a,spatialReference:I}),R=x?{BandProperties:x.bandProperties,DataType:x.dataType}:{},M=new A.A({width:i,height:a,bandCount:n,pixelType:l,pixelSize:T,storageInfo:S,spatialReference:I,isPseudoSpatialReference:b,keyProperties:R,extent:v,colormap:w,statistics:x?x.statistics:null});if(y?.length&&(M.nativeExtent=new o.A({xmin:-.5,ymin:.5-a,xmax:i-.5,ymax:.5,spatialReference:I}),M.transform=new N.A({polynomialOrder:1,forwardCoefficients:[y[2]+y[0]/2,y[5]-y[3]/2,y[0],y[3],-y[1],-y[4]]}),M.extent=M.transform.forwardTransform(M.nativeExtent),M.pixelSize=new V.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/a,spatialReference:I}),S.origin.x=-.5,S.origin.y=.5),m){let{x:e,y:t}=M.pixelSize;m.forEach(i=>{i.x*=e,i.y*=t})}return{imageInfo:t,rasterInfo:M}}(l),p=(0,fe.zS)(l),d=(0,fe.r9)(l);if(this._headerInfo={littleEndian:r,isBigTiff:n,ifds:l,pyramidIFDs:p,maskIFDs:d,...h},this._set("rasterInfo",c),!h.isSupported)throw new a.A("tiffraster:open","this tiff is not supported: "+h.message);if(!h.tileWidth||!h.tileHeight)throw new a.A("tiffraster:open",he);c.isPseudoSpatialReference&&se.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");let m=l[0].get("PREDICTOR")?.values?.[0];if(3===l[0].get("SAMPLEFORMAT")?.values?.[0]&&2===m)throw new a.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");let{skipMapInfo:g,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!g){let t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,S.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;let i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new V.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,c)}!y.includes("vat.dbf")&&1===c.bandCount&&"u8"===c.pixelType&&!g&&(c.attributeTable=await this._fetchAuxiliaryTable(e),null!=c.attributeTable&&(c.keyProperties.DataType="thematic")),g&&this.updateImageSpaceRasterInfo(c),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:a,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(a=r+a,i=(await this.request(this.url,{range:{from:a,to:a+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:a,posIFD:r}}async _readIFDs(e,t,i,r=4,s){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,s);let n=await this._readIFD(t,i,ue.NB,r,s);if(!n?.ifd)throw new a.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(n.ifd),!n.nextIFD)return null;t.posIFD=n.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,r,s)}async _readIFD(e,t,i=ue.NB,r=4,s){let{fileChunk:n,posIFD:l,fileOffset:o}=e;if(!e.fileChunk)return null;let f=(0,fe.JM)(n,t,l,o,i,r);if(f.success){let{ifd:e}=f;if(!e)throw new a.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(!(this.ioConfig.loadFullMetadata||i!==ue.NB||e.has("TILEWIDTH")&&e.has("TILELENGTH")))throw new a.A("tiffraster:open",he);let r=[];if(e.forEach(e=>{e.values||r.push(e)}),r.length>0&&await this._fillOffsets(r,t,f.nextIFD,s),e.has("GEOKEYDIRECTORY")){let i=e.get("GEOKEYDIRECTORY"),a=i?.values;if(a&&a.length>4){let e=a[0]+"."+a[1]+"."+a[2];l=i.valueOffset+6-o;let r=await this._validateOrFetchHeaderBuffer({fileChunk:n,posIFD:l,fileOffset:o},s);i.data=(await this._readIFD(r,t,ue.YC,2,s))?.ifd,i.data&&i.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[e]})}}return f}return f.requiredBufferSize?(n=(await this.request(this.url,{range:{from:o,to:o+l+f.requiredBufferSize+8},responseType:"array-buffer",signal:s})).data,n.byteLength<l+f.requiredBufferSize?null:(e.fileChunk=n,e.fileOffset=o,this._readIFD(e,t,i,r,s))):null}async _fillOffsets(e,t,i,a){let r=e.filter(e=>null!=e.offlineOffsetSize);if(0===r.length)return;let s=r.map(e=>e.offlineOffsetSize),n=Math.min.apply(null,s.map(e=>e[0])),l=Math.max.apply(null,s.map(e=>e[0]+e[1])),o=1===s.length||l-n<=this._bufferSize;if(!o&&s.length>1&&(s.sort((e,t)=>e[0]-t[0]),o=s.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,s[0][0])===l),o){let e=await this._fetchOffsets(n,Math.max(l,n+this._bufferSize),a);return void r.forEach(i=>(0,fe.Cr)(e,t,i,n))}let f=r.map(async e=>{let i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],a);(0,fe.Cr)(r,t,e,i[0])});await Promise.all(f)}async _fetchOffsets(e,t,i){let a=[],r=this._chunkSize,s=Math.ceil((t-e)/r),n=e;for(let e=0;e<s;e++)a.push(this.request(this.url,{range:{from:n,to:e===s-1?t:n+r-1},responseType:"array-buffer",signal:i})),n+=r;let l=await Promise.all(a);if(1===s)return l[0].data;let o=new Uint8Array(t-e+1);for(let e=0;e<s;e++)o.set(new Uint8Array(l[e].data),e*r);return o.buffer}async _fetchRawTiffTile(e,t,i,a,r={}){let s=this._getTileLocation(e,t,i,a);if(!s)return null;let{ranges:n,actualTileWidth:l,actualTileHeight:o,ifd:f}=s,u=n.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal})),h=await Promise.all(u),c=h.map(e=>e.data.byteLength).reduce((e,t)=>e+t),p=1===h.length?h[0].data:new ArrayBuffer(c),d=[0],m=[0];if(h.length>1){let e=new Uint8Array(p);for(let t=0,i=0;t<h.length;t++){let a=h[t].data;e.set(new Uint8Array(a),i),d[t]=i,i+=a.byteLength,m[t]=a.byteLength}}let{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),x=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:f,offsets:d,sizes:m},width:g,height:y,planes:null,pixelType:null});if(null==x)return null;if(l!==g||o!==y){let e=x.mask;if(e)for(let t=0;t<y;t++){let i=t*g;if(t<o)for(let t=l;t<g;t++)e[i+t]=0;else for(let t=0;t<g;t++)e[i+t]=0}else{e=new Uint8Array(g*y),x.mask=e;for(let t=0;t<o;t++){let i=t*g;for(let t=0;t<l;t++)e[i+t]=1}}}return x}_getTileLocation(e,t,i,a=!1){let{firstPyramidLevel:r,blockBoundary:s}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:l}=this;if(!l)return null;let o=a?l.maskIFDs[n]:0===n?l.ifds[0]:l.pyramidIFDs[n-1];if(!o)return null;let f=(0,fe.XO)(o,l),u=(0,fe.wc)(o,"TILEOFFSETS"),h=(0,fe.wc)(o,"TILEBYTECOUNTS");if(!u?.length||!h?.length)return null;let{minRow:c,minCol:p,maxRow:d,maxCol:m}=s[n];if(t>d||i>m||t<c||i<p)return null;let g=(0,fe.LZ)(o,"IMAGEWIDTH"),y=(0,fe.LZ)(o,"IMAGELENGTH"),x=(0,fe.LZ)(o,"TILEWIDTH"),w=(0,fe.LZ)(o,"TILELENGTH"),I=[];if(f){let{bandCount:e}=this.rasterInfo;for(let a=0;a<e;a++){let e=a*(d+1)*(m+1)+t*(m+1)+i;I[a]={from:u[e],to:u[e]+h[e]-1}}}else{let e=t*(m+1)+i;I.push({from:u[e],to:u[e]+h[e]-1})}for(let e=0;e<I.length;e++)if(null==I[e].from||!I[e].to||I[e].to<0)return null;return{ranges:I,ifd:o,actualTileWidth:i===m&&g%x||x,actualTileHeight:t===d&&y%w||w}}async _fetchAuxiliaryMetaData(e){try{let{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return H(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{let{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=oe(t);return i?.recordSet?O.A.fromJSON(i.recordSet):null}catch{return null}}};(0,r.Cg)([(0,s.MZ)()],ce.prototype,"_files",void 0),(0,r.Cg)([(0,s.MZ)()],ce.prototype,"_headerInfo",void 0),(0,r.Cg)([(0,s.MZ)()],ce.prototype,"_bufferSize",void 0),(0,r.Cg)([(0,s.MZ)()],ce.prototype,"_chunkSize",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],ce.prototype,"datasetFormat",void 0),ce=(0,r.Cg)([(0,s.$K)("esri.layers.raster.datasets.TIFFRaster")],ce);const pe=ce,de=new Map;de.set("MRF",{desc:"Meta Raster Format",constructor:re}),de.set("TIFF",{desc:"GeoTIFF",constructor:pe}),de.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Q}),de.set("JPG",{desc:"JPG Raster Format",constructor:G}),de.set("PNG",{desc:"PNG Raster Format",constructor:G}),de.set("GIF",{desc:"GIF Raster Format",constructor:G}),de.set("BMP",{desc:"BMP Raster Format",constructor:G}),de.set("CovJSON",{desc:"COVJSON Raster Format",constructor:k}),de.set("MEMORY",{desc:"In Memory Raster Format",constructor:M});class me{static get supportedFormats(){let e=new Set;return de.forEach((t,i)=>e.add(i)),e}static async open(e){let{url:t,ioConfig:i,source:r,sourceJSON:s}=e,n=e.datasetFormat??i?.datasetFormat;n??(t.includes(".")?n=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===r?.type?.toLowerCase()?n="CovJSON":r?.extent&&r.pixelblocks&&(n="MEMORY")),"OVR"===n||"TIF"===n||"DM"===n?n="TIFF":"JPG"===n||"JPEG"===n||"JFIF"===n?n="JPG":"COVJSON"===n&&(n="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(n="RasterTileServer");let l={url:t,source:r,sourceJSON:s,datasetFormat:n,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(l).forEach(e=>{l[e]??delete l[e]}),n){if(!this.supportedFormats.has(n))throw new a.A("rasterfactory:open","not a supported format "+n);if("CRF"===n)throw new a.A("rasterfactory:open",`cannot open raster: ${t}`);let i=new(0,de.get(n).constructor)(l);return i.rasterJobHandler=e.rasterJobHandler,i.rasterInfo=e.rasterInfo,await i.open({signal:e.signal}),i}let o=Array.from(de.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e),f=0,u=()=>{if(n=o[f++],!n||"CRF"===n)return null;let t=new(0,de.get(n).constructor)(l);return t.rasterJobHandler=e.rasterJobHandler,t.open({signal:e.signal}).then(()=>t).catch(()=>u())};return u()}static register(e,t,i){de.has(e.toUpperCase())||de.set(e.toUpperCase(),{desc:t,constructor:i})}}},330(e,t,i){function a(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let r=[];if(t){let s=a(e,i);for(let e=0;e<s.length;e++)a(s[e],t).forEach(e=>r.push(e));return r}let s=e.getElementsByTagNameNS("*",i);if(!s||0===s.length)return[];for(let e=0;e<s.length;e++)r.push(s[e]||s.item(e));return r}function r(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let s=a(e,i);return s.length>0?t?r(s[0],t):s[0]:null}function s(e,t=null){let i,a=t?r(e,t):e;return a?(i=a.textContent||a.nodeValue,i?i.trim():null):null}function n(e,t){let i,r=a(e,t),s=[];for(let e=0;e<r.length;e++)i=r[e].textContent||r[e].nodeValue,i&&(i=i.trim(),""!==i&&s.push(i));return s}function l(e,t=null){return s(e,t)?.split(" ").map(e=>Number(e))??[]}function o(e,t){return n(e,t).map(e=>Number(e))}function f(e,t){let i=s(e,t);return Number(i)}function u(e,t){let i=e?.nodeName?.toLowerCase(),a=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===a}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>n,IC:()=>a,Ui:()=>o,V6:()=>r,g7:()=>u,mX:()=>s,pN:()=>l,v7:()=>f,vv:()=>h})},10333(e,t,i){i.d(t,{A:()=>n});var a=i(32198),r=i(25482),s=i(91429);let n=class extends r.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,a.Cg)([(0,s.MZ)()],n.prototype,"affectsPixelSize",null),(0,a.Cg)([(0,s.MZ)({json:{write:!0}})],n.prototype,"spatialReference",void 0),n=(0,a.Cg)([(0,s.$K)("esri.layers.raster.transforms.BaseRasterTransform")],n)},75414(e,t,i){i.d(t,{A:()=>o});var a,r=i(32198),s=i(91429),n=i(10333),l=i(93223);let o=a=class extends n.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new a({tolerance:this.tolerance})}};(0,r.Cg)([(0,l.e)({GCSShiftXform:"gcs-shift"})],o.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)()],o.prototype,"tolerance",void 0),o=a=(0,r.Cg)([(0,s.$K)("esri.layers.raster.transforms.GCSShiftTransform")],o)},43163(e,t,i){i.d(t,{A:()=>d});var a,r=i(32198),s=i(91429),n=i(5443),l=i(86738),o=i(10333),f=i(36005),u=i(43937),h=i(93223);function c(e,t,i){let{x:a,y:r}=t;if(i<2)return{x:e[0]+a*e[2]+r*e[4],y:e[1]+a*e[3]+r*e[5]};if(2===i){let t=a*a,i=r*r,s=a*r;return{x:e[0]+a*e[2]+r*e[4]+t*e[6]+s*e[8]+i*e[10],y:e[1]+a*e[3]+r*e[5]+t*e[7]+s*e[9]+i*e[11]}}let s=a*a,n=r*r,l=a*r,o=s*a,f=s*r,u=a*n,h=r*n;return{x:e[0]+a*e[2]+r*e[4]+s*e[6]+l*e[8]+n*e[10]+o*e[12]+f*e[14]+u*e[16]+h*e[18],y:e[1]+a*e[3]+r*e[5]+s*e[7]+l*e[9]+n*e[11]+o*e[13]+f*e[15]+u*e[17]+h*e[19]}}function p(e,t,i){let{xmin:a,ymin:r,xmax:s,ymax:l,spatialReference:o}=t,f=[];if(i<2)f.push({x:a,y:l}),f.push({x:s,y:l}),f.push({x:a,y:r}),f.push({x:s,y:r});else{let e=10;for(let t=0;t<e;t++)f.push({x:a,y:r+(l-r)*t/(e-1)}),f.push({x:s,y:r+(l-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)f.push({x:a+(s-a)*t/e,y:r}),f.push({x:a+(s-a)*t/e,y:l})}f=f.map(t=>c(e,t,i));let u=f.map(e=>e.x),h=f.map(e=>e.y);return new n.A({xmin:Math.min.apply(null,u),xmax:Math.max.apply(null,u),ymin:Math.min.apply(null,h),ymax:Math.max.apply(null,h),spatialReference:o})}let d=a=class extends o.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){let{coeffX:i,coeffY:a}=t;if(!i?.length||!a?.length||i.length!==a.length)return null;let r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(a[e]);return r}writeForwardCoefficients(e,t,i){let a=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?a.push(e[t]):r.push(e[t]);t.coeffX=a,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients"),t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){let[t,i,a,r,s,n]=e,l=a*n-s*r,o=s*r-a*n;return[(s*i-t*n)/l,(a*i-t*r)/o,n/l,r/o,-s/l,-a/o]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){let{inverseCoeffX:i,inverseCoeffY:a}=t;if(!i?.length||!a?.length||i.length!==a.length)return null;let r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(a[e]);return r}writeInverseCoefficients(e,t,i){let a=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?a.push(e[t]):r.push(e[t]);t.inverseCoeffX=a,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){let t=c(this.forwardCoefficients,e,this.polynomialOrder);return new l.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){let t=c(this.inverseCoefficients,e,this.polynomialOrder);return new l.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new a({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"polynomialOrder",void 0),(0,r.Cg)([(0,s.MZ)()],d.prototype,"forwardCoefficients",void 0),(0,r.Cg)([(0,f.w)("forwardCoefficients",["coeffX","coeffY"])],d.prototype,"readForwardCoefficients",null),(0,r.Cg)([(0,u.K)("forwardCoefficients")],d.prototype,"writeForwardCoefficients",null),(0,r.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"inverseCoefficients",null),(0,r.Cg)([(0,f.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],d.prototype,"readInverseCoefficients",null),(0,r.Cg)([(0,u.K)("inverseCoefficients")],d.prototype,"writeInverseCoefficients",null),(0,r.Cg)([(0,s.MZ)()],d.prototype,"affectsPixelSize",null),(0,r.Cg)([(0,h.e)({PolynomialXform:"polynomial"})],d.prototype,"type",void 0),d=a=(0,r.Cg)([(0,s.$K)("esri.layers.raster.transforms.PolynomialTransform")],d)}}]);