@arcgis/core 4.33.0-next.20250414 → 4.33.0-next.20250416

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 (253) hide show
  1. package/arcade/featureset/support/FeatureSet.js +1 -1
  2. package/arcade/functions/geomasync.js +1 -1
  3. package/arcade/functions/geomsync.js +1 -1
  4. package/arcade/geometry/functions.js +1 -1
  5. package/arcade/geometry/operatorsWorker.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/0252d853419adc203f04.js +1 -0
  8. package/assets/esri/core/workers/chunks/030f5b9a9757eead436b.js +1 -0
  9. package/assets/esri/core/workers/chunks/{3a84ee5d0434362286a6.js → 07f206719763173faa8d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{4403b3f08907e88d0d91.js → 0b34c8356b8492ce7b16.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{fb65796296b0422cf266.js → 272a309760dacb13dee3.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{fe1ad9ed0d32f557e5a3.js → 29283c19e1ccdc6cfbde.js} +33 -33
  13. package/assets/esri/core/workers/chunks/2bdbf678d4f013543dbb.js +1 -0
  14. package/assets/esri/core/workers/chunks/2fd5b48976cefe7cc0ab.js +1 -0
  15. package/assets/esri/core/workers/chunks/321f6f6d268755482c27.js +1 -0
  16. package/assets/esri/core/workers/chunks/{b7a1185ac49480fc1410.js → 35a59f0df087e3c588a9.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{626e33ece2c49d40f6cd.js → 42aab2a336ee22fd9055.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{083548c5eea5aca6404c.js → 45d64b72b7e93e9c64d7.js} +1 -1
  19. package/assets/esri/core/workers/chunks/56fdbe61ac84b036a1a2.js +1 -0
  20. package/assets/esri/core/workers/chunks/57fd5a52be41ddd6a11b.js +1 -0
  21. package/assets/esri/core/workers/chunks/5fb9bb3ac2f60dbd59c4.js +1 -0
  22. package/assets/esri/core/workers/chunks/{0a675f9f69b8b13b7443.js → 601fc99426f0213b0769.js} +1 -1
  23. package/assets/esri/core/workers/chunks/68d7babbe7e0d934e056.js +1 -0
  24. package/assets/esri/core/workers/chunks/6fc39a58f3011291c602.js +1 -0
  25. package/assets/esri/core/workers/chunks/8221f2e540abe1e0f048.js +1 -0
  26. package/assets/esri/core/workers/chunks/83e13baab4b90a88d967.js +1 -0
  27. package/assets/esri/core/workers/chunks/851baab753d9c8e967bd.js +1 -0
  28. package/assets/esri/core/workers/chunks/8ba7d44eff348004f084.js +1 -0
  29. package/assets/esri/core/workers/chunks/{9050dad7e4f093568026.js → 97267911d03c2426d319.js} +1 -1
  30. package/assets/esri/core/workers/chunks/984c5047ab1fa632ca09.js +1 -0
  31. package/assets/esri/core/workers/chunks/{5aae4e127e888f69435a.js → 9a1c058d3ecd1db0e996.js} +1 -1
  32. package/assets/esri/core/workers/chunks/9b21dc4659922cc577cb.js +1 -0
  33. package/assets/esri/core/workers/chunks/{ff62b813fff4a015a8a6.js → a4239e301728d594afa5.js} +1 -1
  34. package/assets/esri/core/workers/chunks/aca3ccb9599bcc444617.js +1 -0
  35. package/assets/esri/core/workers/chunks/{a3421383e48379012c9c.js → b6dd25bccb9f6e19c18e.js} +1 -1
  36. package/assets/esri/core/workers/chunks/bf4947fe446dcb477031.js +1 -0
  37. package/assets/esri/core/workers/chunks/d053c23fce77fb77cc00.js +1 -0
  38. package/assets/esri/core/workers/chunks/e31bb256921807464715.js +1 -0
  39. package/assets/esri/core/workers/chunks/{8aae03e347ab18ae6ee2.js → e3d25d027885eb1a415f.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{d88544ac332be633e3fe.js → e64e0c3240f8e577a61c.js} +1 -1
  41. package/assets/esri/core/workers/chunks/e9fba86036b8fe700a41.js +1 -0
  42. package/assets/esri/themes/base/widgets/_Expand.scss +6 -1
  43. package/assets/esri/themes/base/widgets/_TimeSlider.scss +97 -107
  44. package/assets/esri/themes/dark/main.css +1 -1
  45. package/assets/esri/themes/light/main.css +1 -1
  46. package/assets/esri/themes/light/view.css +1 -1
  47. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider.json +1 -1
  48. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ar.json +1 -1
  49. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bg.json +1 -1
  50. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bs.json +1 -1
  51. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ca.json +1 -1
  52. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_cs.json +1 -1
  53. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_da.json +1 -1
  54. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_de.json +1 -1
  55. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_el.json +1 -1
  56. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_en.json +1 -1
  57. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_es.json +1 -1
  58. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_et.json +1 -1
  59. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fi.json +1 -1
  60. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fr.json +1 -1
  61. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_he.json +1 -1
  62. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hr.json +1 -1
  63. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hu.json +1 -1
  64. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_id.json +1 -1
  65. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_it.json +1 -1
  66. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ja.json +1 -1
  67. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ko.json +1 -1
  68. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lt.json +1 -1
  69. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lv.json +1 -1
  70. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_nl.json +1 -1
  71. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_no.json +1 -1
  72. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pl.json +1 -1
  73. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-BR.json +1 -1
  74. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-PT.json +1 -1
  75. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ro.json +1 -1
  76. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ru.json +1 -1
  77. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sk.json +1 -1
  78. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sl.json +1 -1
  79. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sr.json +1 -1
  80. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sv.json +1 -1
  81. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_th.json +1 -1
  82. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_tr.json +1 -1
  83. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_uk.json +1 -1
  84. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_vi.json +1 -1
  85. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-CN.json +1 -1
  86. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-HK.json +1 -1
  87. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-TW.json +1 -1
  88. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ar.json +1 -0
  89. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bg.json +1 -0
  90. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bs.json +1 -0
  91. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ca.json +1 -0
  92. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_cs.json +1 -0
  93. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_da.json +1 -0
  94. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_de.json +1 -0
  95. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_el.json +1 -0
  96. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_es.json +1 -0
  97. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_et.json +1 -0
  98. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fi.json +1 -0
  99. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fr.json +1 -0
  100. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_he.json +1 -0
  101. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hr.json +1 -0
  102. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hu.json +1 -0
  103. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_id.json +1 -0
  104. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_it.json +1 -0
  105. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ja.json +1 -0
  106. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ko.json +1 -0
  107. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lt.json +1 -0
  108. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lv.json +1 -0
  109. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_nl.json +1 -0
  110. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_no.json +1 -0
  111. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pl.json +1 -0
  112. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-BR.json +1 -0
  113. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-PT.json +1 -0
  114. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ro.json +1 -0
  115. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ru.json +1 -0
  116. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sk.json +1 -0
  117. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sl.json +1 -0
  118. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sr.json +1 -0
  119. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sv.json +1 -0
  120. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_th.json +1 -0
  121. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_tr.json +1 -0
  122. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_uk.json +1 -0
  123. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_vi.json +1 -0
  124. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-CN.json +1 -0
  125. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-HK.json +1 -0
  126. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-TW.json +1 -0
  127. package/chunks/BloomComposition.glsl.js +4 -13
  128. package/chunks/Theme.js +1 -1
  129. package/chunks/Tick.js +1 -1
  130. package/geometry/support/HalfFloatArray.js +1 -1
  131. package/geometry/support/MeshTexture.js +1 -1
  132. package/geometry/support/buffer/BufferView.js +1 -1
  133. package/geometry/support/float16.js +1 -1
  134. package/interfaces.d.ts +266 -139
  135. package/layers/FeatureLayer.js +1 -1
  136. package/layers/WCSLayer.js +1 -1
  137. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  138. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  139. package/layers/mixins/ArcGISImageService.js +1 -1
  140. package/layers/mixins/FeatureLayerBase.js +1 -1
  141. package/layers/support/capabilities.js +1 -1
  142. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  143. package/package.json +2 -2
  144. package/support/revision.js +1 -1
  145. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  146. package/views/3d/interactive/Manipulator3D.js +1 -1
  147. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  148. package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
  149. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  150. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  151. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  152. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  153. package/views/3d/layers/DrapedSubView3D.js +1 -1
  154. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  155. package/views/3d/layers/FlowSubView3D.js +5 -0
  156. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  157. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  158. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  159. package/views/3d/layers/WMSLayerView3D.js +1 -1
  160. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  161. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  162. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  163. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  164. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  165. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  167. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  168. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  169. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  170. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  171. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  172. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  173. package/views/3d/layers/graphics/Labeler.js +1 -1
  174. package/views/3d/layers/graphics/MeshFastUpdateProcessor.js +1 -1
  175. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  176. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  177. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  178. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  179. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  180. package/views/3d/support/MemoryController.js +1 -1
  181. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  182. package/views/3d/support/engineContent/line.js +1 -1
  183. package/views/3d/terrain/OverlayRenderer.js +1 -1
  184. package/views/3d/webgl-engine/Stage.js +1 -1
  185. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  186. package/views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js +1 -1
  187. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  188. package/views/3d/webgl-engine/lib/ContentObjectType.js +1 -1
  189. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  190. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  191. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  192. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  193. package/views/3d/webgl-engine/lib/IntersectableGeometry.js +5 -0
  194. package/views/3d/webgl-engine/lib/Material.js +1 -1
  195. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  196. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  197. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  198. package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
  199. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  200. package/views/3d/webgl-engine/lib/RendererBase.js +1 -1
  201. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  202. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  203. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  204. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  205. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  206. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  207. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  208. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  209. package/views/layers/ImageryTileLayerView.js +1 -1
  210. package/views/support/Scheduler.js +1 -1
  211. package/webscene/Slide.js +1 -1
  212. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  213. package/widgets/Features/FeaturesViewModel.js +1 -1
  214. package/widgets/Search/types.d.ts +10 -0
  215. package/widgets/Search/types.js +5 -0
  216. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  217. package/widgets/TimeSlider/css.js +1 -1
  218. package/widgets/TimeSlider.js +1 -1
  219. package/widgets/support/SelectionList/FeatureItem.js +5 -0
  220. package/widgets/support/SelectionList/GroupLayerItem.js +5 -0
  221. package/widgets/support/SelectionList/{SelectionListItemBase.js → ItemBase.js} +1 -1
  222. package/widgets/support/SelectionList/LayerItem.js +5 -0
  223. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  224. package/widgets/support/SelectionList/selectionListUtils.js +1 -1
  225. package/widgets/support/SelectionList.js +1 -1
  226. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  227. package/assets/esri/core/workers/chunks/0db4c0071282dd94f3b2.js +0 -1
  228. package/assets/esri/core/workers/chunks/10631680abe7607616ca.js +0 -1
  229. package/assets/esri/core/workers/chunks/277b61af8982092a4c81.js +0 -1
  230. package/assets/esri/core/workers/chunks/290aed587aa647226b46.js +0 -1
  231. package/assets/esri/core/workers/chunks/345f428dfcaa594ee617.js +0 -1
  232. package/assets/esri/core/workers/chunks/358a3a9326615d5e6d3b.js +0 -1
  233. package/assets/esri/core/workers/chunks/39fbac918ebd1b0e3a18.js +0 -1
  234. package/assets/esri/core/workers/chunks/544771f64a86b541d5bb.js +0 -1
  235. package/assets/esri/core/workers/chunks/6275114e8ed9dd31465d.js +0 -1
  236. package/assets/esri/core/workers/chunks/72b5e43741ce3a0da8f7.js +0 -1
  237. package/assets/esri/core/workers/chunks/72d7e45e7eb28f2cc0b0.js +0 -1
  238. package/assets/esri/core/workers/chunks/7e63e3d759c874077b52.js +0 -1
  239. package/assets/esri/core/workers/chunks/7f8c7e3e41e51ab4d612.js +0 -1
  240. package/assets/esri/core/workers/chunks/80a5fd4fb79e90086538.js +0 -1
  241. package/assets/esri/core/workers/chunks/80aaf31c8eec3cff2add.js +0 -1
  242. package/assets/esri/core/workers/chunks/b6361cec92003997bfe5.js +0 -1
  243. package/assets/esri/core/workers/chunks/bbbb1aa2569ebf01ad8b.js +0 -1
  244. package/assets/esri/core/workers/chunks/d59aeb46bf2fb0931a9b.js +0 -1
  245. package/assets/esri/core/workers/chunks/ee277dd58aa69281163f.js +0 -1
  246. package/assets/esri/core/workers/chunks/f718d41f665d5df25f79.js +0 -1
  247. package/assets/esri/core/workers/chunks/fa9ef9e8eae505371965.js +0 -1
  248. package/assets/esri/core/workers/chunks/fb5b852d0f72df014377.js +0 -1
  249. package/assets/esri/core/workers/chunks/fb603edd374e24f366ff.js +0 -1
  250. package/views/3d/webgl-engine/lib/MaterialCollection.js +0 -5
  251. package/widgets/support/SelectionList/SelectionListFeatureItem.js +0 -5
  252. package/widgets/support/SelectionList/SelectionListGroupLayerItem.js +0 -5
  253. package/widgets/support/SelectionList/SelectionListLayerItem.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8506],{6455:(e,t,i)=>{i.d(t,{FJ:()=>_,Dp:()=>g,KV:()=>x});var n=i(90237),r=i(93637),o=i(10107),s=(i(44208),i(53966),i(87811),i(40608)),l=i(89317),p=i(69540),a=i(5503),d=i(25482),u=i(43937),y=i(83960),c=i(13069);const h={write:{overridePolicy:(e,t,i)=>({enabled:!i||"scale"===i.filterMode})}};let m=class extends(p.A.ClonableMixin(d.A)){constructor(e){super(e),this.id=(0,c.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"id",void 0),(0,n._)([(0,o.MZ)({type:Number,json:h})],m.prototype,"maxScale",void 0),(0,n._)([(0,o.MZ)({type:Number,json:h})],m.prototype,"minScale",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=(0,n._)([(0,s.$)("esri.layers.support.DisplayFilter")],m);const f=m;var v=i(41560);let w=class extends(p.A.ClonableMixin(d.A)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(a.A.ofType(f)),this.mode="manual"}writeFilters(e,t,i,n){const r=e.toArray();"scale"===this.mode&&r.sort(((e,t)=>{const i=(0,y.oW)(t.minScale,e.minScale),n=e.maxScale-t.maxScale;return 0===i?n:i})),t[i]=r.map((e=>e.toJSON(n)))}write(e,t){return super.write(e,(0,v.mW)(this,t))}};(0,n._)([(0,o.MZ)({type:String,json:{write:{overridePolicy:(e,t,i)=>({enabled:"manual"===i.filterMode,isRequired:!0})}}})],w.prototype,"activeFilterId",void 0),(0,n._)([(0,o.MZ)({type:a.A.ofType(f),nonNullable:!0,json:{write:!0}})],w.prototype,"filters",void 0),(0,n._)([(0,u.K)("filters")],w.prototype,"writeFilters",null),(0,n._)([(0,o.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],w.prototype,"mode",void 0),w=(0,n._)([(0,s.$)("esri.layers.support.DisplayFilterInfo")],w);const M=w,_=e=>{let t=class extends e{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,n._)([(0,o.MZ)(g)],t.prototype,"displayFilterEnabled",void 0),(0,n._)([(0,o.MZ)(x)],t.prototype,"displayFilterInfo",void 0),t=(0,n._)([(0,s.$)("esri.layers.mixins.DisplayFilteredLayer")],t),t},g={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:l.K,writer(e,t,i){(0,r.sM)(i,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},x={type:M,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:l.K},origins:{"web-scene":{write:!1,read:!1}}}}},10184:(e,t,i)=>{i.d(t,{A:()=>y});var n=i(90237),r=i(69540),o=i(25482),s=i(88930),l=i(10107),p=(i(44208),i(53966),i(87811),i(93223)),a=i(40608),d=i(73133);let u=class extends(r.A.ClonableMixin(o.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,p.e)(d.j,{nonNullable:!0})],u.prototype,"unit",void 0),(0,n._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,n._)([(0,a.$)("esri.time.TimeInterval")],u);const y=u},17036:(e,t,i)=>{i.d(t,{p:()=>p});var n=i(44208),r=i(53966),o=i(20437),s=i(95466),l=i(30524);function p(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,n.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");r.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 ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const i=this.fieldsIndex?.has(t);i||r.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)}}}}},20816:(e,t,i)=>{i.d(t,{TA:()=>r,We:()=>l,Z3:()=>o,ZJ:()=>p,w5:()=>a});var n=i(78888);const r=(0,i(13069).vD)(),o=new Map,s=new Map;async function l(e,t,i){if(!e||!i)return!1;if(!t)return!0;const r=new URL(e).host;let s=o.get(r);if(!s){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");s=(await(0,n.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return s===t}async function p(e,t,n=!1){if(!e||!t)return!0;const o=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),l=s.get(o)?.entries();if(l)for(const[e,s]of l)if(s.name===t){const t=!s.stack?.hasForwardEdits();if(!t&&n){const[{deleteForwardEdits:t},{default:n}]=await Promise.all([i.e(2186).then(i.bind(i,32186)),i.e(2558).then(i.bind(i,32558))]),l=await t(o,e,new n({sessionId:r,moment:s.moment}));return l.success&&s.stack?.clearForwardEdits(),l.success}return t}return!0}function a(e,t){if(!e)return!1;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),n=s.get(i)?.entries();if(n)for(const[e,i]of n)if(i.name===t)return"edit"===i.lockType;return!1}new Map},38141:(e,t,i)=>{i.d(t,{A:()=>ot});var n,r=i(90237),o=i(25482),s=i(4718),l=i(3483),p=i(10107),a=i(79901),d=i(36005),u=i(40608),y=i(43937);i(44208),i(53966),i(87811);let c=n=class extends o.A{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new n({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],c.prototype,"expression",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,r._)([(0,p.MZ)({type:["boolean","date","number","string"],json:{write:!0}})],c.prototype,"returnType",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=n=(0,r._)([(0,u.$)("esri.form.ExpressionInfo")],c);const h=c;let m=class extends o.A{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],m.prototype,"description",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],m.prototype,"label",void 0),(0,r._)([(0,p.MZ)()],m.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],m.prototype,"visibilityExpression",void 0),m=(0,r._)([(0,u.$)("esri.form.elements.Element")],m);const f=m;var v=i(69540);let w=class extends(v.A.ClonableMixin(o.A)){constructor(e){super(e),this.type=null}};(0,r._)([(0,p.MZ)()],w.prototype,"type",void 0),w=(0,r._)([(0,u.$)("esri.form.elements.inputs.attachments.Input")],w);const M=w;var _=i(56507);const g=["any","capture","upload"];let x=class extends M{constructor(e){super(e),this.type="audio",this.inputMethod="any",this.maxDuration=null}};(0,r._)([(0,p.MZ)({type:["audio"],readOnly:!0,json:{write:!0}})],x.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:g,json:{write:!0}})],x.prototype,"inputMethod",void 0),(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],x.prototype,"maxDuration",void 0),x=(0,r._)([(0,u.$)("esri.form.elements.inputs.attachments.AudioInput")],x);const b=x;let Z=class extends M{constructor(e){super(e),this.type="document",this.maxFileSize=null}};(0,r._)([(0,p.MZ)({type:["document"],readOnly:!0,json:{write:!0}})],Z.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],Z.prototype,"maxFileSize",void 0),Z=(0,r._)([(0,u.$)("esri.form.elements.inputs.attachments.DocumentInput")],Z);const I=Z;let j=class extends M{constructor(e){super(e),this.type="image",this.inputMethod="any",this.maxImageSize=null}};(0,r._)([(0,p.MZ)({type:["image"],readOnly:!0,json:{write:!0}})],j.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:g,json:{write:!0}})],j.prototype,"inputMethod",void 0),(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],j.prototype,"maxImageSize",void 0),j=(0,r._)([(0,u.$)("esri.form.elements.inputs.attachments.ImageInput")],j);const F=j;let S=class extends M{constructor(e){super(e),this.type="signature",this.inputMethod="any"}};(0,r._)([(0,p.MZ)({type:["signature"],readOnly:!0,json:{write:!0}})],S.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:g,json:{write:!0}})],S.prototype,"inputMethod",void 0),S=(0,r._)([(0,u.$)("esri.form.elements.inputs.attachments.SignatureInput")],S);const E=S;let T=class extends M{constructor(e){super(e),this.type="video",this.inputMethod="any",this.maxDuration=null}};(0,r._)([(0,p.MZ)({type:["video"],readOnly:!0,json:{write:!0}})],T.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:g,json:{write:!0}})],T.prototype,"inputMethod",void 0),(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],T.prototype,"maxDuration",void 0),T=(0,r._)([(0,u.$)("esri.form.elements.inputs.attachments.VideoInput")],T);const A=T;function O(e){return{nestableTypes:{base:M,key:"type",typeMap:{audio:b,document:I,image:F,signature:E,video:A}},allTypes:{base:M,key:"type",typeMap:{attachment:e,audio:b,document:I,image:F,signature:E,video:A}}}}let R=class extends M{constructor(e){super(e),this.type="attachment",this.attachmentAssociationType="exact",this.inputTypes=null}castInputs(e){return function(e,t){return e?e.map((e=>(0,_.aq)(t.nestableTypes,e))):null}(e,U)}readInputs(e,t){return function(e,t){if(!e)return null;const i=t.nestableTypes.typeMap;return e.filter((e=>i[e.type])).map((e=>i[e.type].fromJSON(e)))}(t.inputTypes,U)}writeInputs(e,t){t.inputTypes=function(e,t){if(!e)return null;const i=t.nestableTypes.typeMap;return e.filter((e=>i[e.type])).map((e=>e.toJSON()))}(e,U)}};(0,r._)([(0,p.MZ)({type:["attachment"],readOnly:!0,json:{write:!0}})],R.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:["any","exact","exactOrNone"],json:{write:!0}})],R.prototype,"attachmentAssociationType",void 0),(0,r._)([(0,p.MZ)({json:{write:{isRequired:!0}}})],R.prototype,"inputTypes",void 0),(0,r._)([(0,a.w)("inputTypes")],R.prototype,"castInputs",null),(0,r._)([(0,d.w)("inputTypes")],R.prototype,"readInputs",null),(0,r._)([(0,y.K)("inputTypes")],R.prototype,"writeInputs",null),R=(0,r._)([(0,u.$)("esri.form.elements.inputs.attachments.AttachmentInput")],R);const U=O(R);var N;const k=O(R);let D=N=class extends f{constructor(e){super(e),this.allowUserRename=!0,this.attachmentKeyword=null,this.displayFilename=!1,this.editableExpression=null,this.filenameExpression="{attachmentKeyword}_{now}",this.input=null,this.maxAttachmentCount=null,this.minAttachmentCount=null,this.type="attachment",this.useOriginalFilename=!0}clone(){return new N({allowUserRename:this.allowUserRename,attachmentKeyword:this.attachmentKeyword,description:this.description,displayFilename:this.displayFilename,editableExpression:this.editableExpression,filenameExpression:this.filenameExpression,input:this.input?.clone(),label:this.label,maxAttachmentCount:this.maxAttachmentCount,minAttachmentCount:this.minAttachmentCount,useOriginalFilename:this.useOriginalFilename,visibilityExpression:this.visibilityExpression})}};(0,r._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],D.prototype,"allowUserRename",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:{isRequired:!0}}})],D.prototype,"attachmentKeyword",void 0),(0,r._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],D.prototype,"displayFilename",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],D.prototype,"editableExpression",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],D.prototype,"filenameExpression",void 0),(0,r._)([(0,p.MZ)({types:k.allTypes,json:{read:{source:"inputType"},write:{target:"inputType",isRequired:!0}}})],D.prototype,"input",void 0),(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],D.prototype,"maxAttachmentCount",void 0),(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],D.prototype,"minAttachmentCount",void 0),(0,r._)([(0,p.MZ)({type:["attachment"],readOnly:!0,json:{read:!1,write:!0}})],D.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],D.prototype,"useOriginalFilename",void 0),D=N=(0,r._)([(0,u.$)("esri.form.elements.AttachmentElement")],D);const V=D;let C=class extends o.A{constructor(e){super(e),this.type=null}};(0,r._)([(0,p.MZ)()],C.prototype,"type",void 0),C=(0,r._)([(0,u.$)("esri.form.elements.inputs.Input")],C);const $=C;let B=class extends ${constructor(e){super(e),this.maxLength=null,this.minLength=0}};(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],B.prototype,"maxLength",void 0),(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],B.prototype,"minLength",void 0),B=(0,r._)([(0,u.$)("esri.form.elements.inputs.TextInput")],B);const L=B;var H;let q=H=class extends L{constructor(e){super(e),this.type="barcode-scanner"}clone(){return new H({maxLength:this.maxLength,minLength:this.minLength})}};(0,r._)([(0,p.MZ)({type:["barcode-scanner"],json:{read:!1,write:!0}})],q.prototype,"type",void 0),q=H=(0,r._)([(0,u.$)("esri.form.elements.inputs.BarcodeScannerInput")],q);const K=q;var P;let G=P=class extends ${constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="combo-box"}clone(){return new P({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],G.prototype,"noValueOptionLabel",void 0),(0,r._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],G.prototype,"showNoValueOption",void 0),(0,r._)([(0,p.MZ)({type:["combo-box"],json:{read:!1,write:!0}})],G.prototype,"type",void 0),G=P=(0,r._)([(0,u.$)("esri.form.elements.inputs.ComboBoxInput")],G);const W=G;var Q;function J(e){return null!=e?e:null}function z(e){return null!=e?e:null}let X=Q=class extends ${constructor(e){super(e),this.max=null,this.min=null,this.type="date-picker"}readMax(e,t){return J(t.max)}writeMax(e,t){t.max=z(e)}readMin(e,t){return J(t.min)}writeMin(e,t){t.min=z(e)}clone(){return new Q({max:this.max,min:this.min})}};(0,r._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],X.prototype,"max",void 0),(0,r._)([(0,d.w)("max")],X.prototype,"readMax",null),(0,r._)([(0,y.K)("max")],X.prototype,"writeMax",null),(0,r._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],X.prototype,"min",void 0),(0,r._)([(0,d.w)("min")],X.prototype,"readMin",null),(0,r._)([(0,y.K)("min")],X.prototype,"writeMin",null),(0,r._)([(0,p.MZ)({type:["date-picker"],json:{read:!1,write:!0}})],X.prototype,"type",void 0),X=Q=(0,r._)([(0,u.$)("esri.form.elements.inputs.DatePickerInput")],X);const Y=X;var ee;function te(e){return null!=e?e:null}function ie(e){return null!=e?e:null}let ne=ee=class extends ${constructor(e){super(e),this.includeTimeOffset=!0,this.max=null,this.min=null,this.timeResolution="minutes",this.type="datetimeoffset-picker"}readMax(e,t){return te(t.max)}writeMax(e,t){t.max=ie(e)}readMin(e,t){return te(t.min)}writeMin(e,t){t.min=ie(e)}readTimeResolution(e,t){return te(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=ie(e)}clone(){return new ee({includeTimeOffset:this.includeTimeOffset,max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,r._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"includeTimeOffset",void 0),(0,r._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],ne.prototype,"max",void 0),(0,r._)([(0,d.w)("max")],ne.prototype,"readMax",null),(0,r._)([(0,y.K)("max")],ne.prototype,"writeMax",null),(0,r._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],ne.prototype,"min",void 0),(0,r._)([(0,d.w)("min")],ne.prototype,"readMin",null),(0,r._)([(0,y.K)("min")],ne.prototype,"writeMin",null),(0,r._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],ne.prototype,"timeResolution",void 0),(0,r._)([(0,d.w)("timeResolution")],ne.prototype,"readTimeResolution",null),(0,r._)([(0,y.K)("timeResolution")],ne.prototype,"writeTimeResolution",null),(0,r._)([(0,p.MZ)({type:["datetimeoffset-picker"],json:{read:!1,write:!0}})],ne.prototype,"type",void 0),ne=ee=(0,r._)([(0,u.$)("esri.form.elements.inputs.DateTimeOffsetPickerInput")],ne);const re=ne;var oe;function se(e){return null!=e?new Date(e):null}function le(e){return e?e.getTime():null}let pe=oe=class extends ${constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return se(t.max)}writeMax(e,t){t.max=le(e)}readMin(e,t){return se(t.min)}writeMin(e,t){t.min=le(e)}clone(){return new oe({includeTime:this.includeTime,max:this.max,min:this.min})}};(0,r._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pe.prototype,"includeTime",void 0),(0,r._)([(0,p.MZ)({type:Date,json:{type:Number,write:!0}})],pe.prototype,"max",void 0),(0,r._)([(0,d.w)("max")],pe.prototype,"readMax",null),(0,r._)([(0,y.K)("max")],pe.prototype,"writeMax",null),(0,r._)([(0,p.MZ)({type:Date,json:{type:Number,write:!0}})],pe.prototype,"min",void 0),(0,r._)([(0,d.w)("min")],pe.prototype,"readMin",null),(0,r._)([(0,y.K)("min")],pe.prototype,"writeMin",null),(0,r._)([(0,p.MZ)({type:["datetime-picker"],json:{read:!1,write:!0}})],pe.prototype,"type",void 0),pe=oe=(0,r._)([(0,u.$)("esri.form.elements.inputs.DateTimePickerInput")],pe);const ae=pe;var de;let ue=de=class extends ${constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="radio-buttons"}clone(){return new de({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],ue.prototype,"noValueOptionLabel",void 0),(0,r._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],ue.prototype,"showNoValueOption",void 0),(0,r._)([(0,p.MZ)({type:["radio-buttons"],json:{read:!1,write:!0}})],ue.prototype,"type",void 0),ue=de=(0,r._)([(0,u.$)("esri.form.elements.inputs.RadioButtonsInput")],ue);const ye=ue;var ce;let he=ce=class extends ${constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new ce({offValue:this.offValue,onValue:this.onValue})}};(0,r._)([(0,p.MZ)({type:[String,Number],json:{write:!0}})],he.prototype,"offValue",void 0),(0,r._)([(0,p.MZ)({type:[String,Number],json:{write:!0}})],he.prototype,"onValue",void 0),(0,r._)([(0,p.MZ)({type:["switch"],json:{read:!1,write:!0}})],he.prototype,"type",void 0),he=ce=(0,r._)([(0,u.$)("esri.form.elements.inputs.SwitchInput")],he);const me=he;var fe;let ve=fe=class extends L{constructor(e){super(e),this.type="text-area"}clone(){return new fe({maxLength:this.maxLength,minLength:this.minLength})}};(0,r._)([(0,p.MZ)({type:["text-area"],json:{read:!1,write:!0}})],ve.prototype,"type",void 0),ve=fe=(0,r._)([(0,u.$)("esri.form.elements.inputs.TextAreaInput")],ve);const we=ve;var Me;let _e=Me=class extends L{constructor(e){super(e),this.type="text-box"}clone(){return new Me({maxLength:this.maxLength,minLength:this.minLength})}};(0,r._)([(0,p.MZ)({type:["text-box"],json:{read:!1,write:!0}})],_e.prototype,"type",void 0),_e=Me=(0,r._)([(0,u.$)("esri.form.elements.inputs.TextBoxInput")],_e);const ge=_e;var xe;function be(e){return null!=e?e:null}function Ze(e){return null!=e?e:null}let Ie=xe=class extends ${constructor(e){super(e),this.max=null,this.min=null,this.timeResolution="minutes",this.type="time-picker"}readMax(e,t){return be(t.max)}writeMax(e,t){t.max=Ze(e)}readMin(e,t){return be(t.min)}writeMin(e,t){t.min=Ze(e)}readTimeResolution(e,t){return be(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=Ze(e)}clone(){return new xe({max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,r._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],Ie.prototype,"max",void 0),(0,r._)([(0,d.w)("max")],Ie.prototype,"readMax",null),(0,r._)([(0,y.K)("max")],Ie.prototype,"writeMax",null),(0,r._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],Ie.prototype,"min",void 0),(0,r._)([(0,d.w)("min")],Ie.prototype,"readMin",null),(0,r._)([(0,y.K)("min")],Ie.prototype,"writeMin",null),(0,r._)([(0,p.MZ)({type:String,json:{type:String,write:!0}})],Ie.prototype,"timeResolution",void 0),(0,r._)([(0,d.w)("timeResolution")],Ie.prototype,"readTimeResolution",null),(0,r._)([(0,y.K)("timeResolution")],Ie.prototype,"writeTimeResolution",null),(0,r._)([(0,p.MZ)({type:["time-picker"],json:{read:!1,write:!0}})],Ie.prototype,"type",void 0),Ie=xe=(0,r._)([(0,u.$)("esri.form.elements.inputs.TimePickerInput")],Ie);const je={base:$,key:"type",typeMap:{"barcode-scanner":K,"combo-box":W,"date-picker":Y,"datetime-picker":ae,"datetimeoffset-picker":re,"radio-buttons":ye,switch:me,"text-area":we,"text-box":ge,"time-picker":Ie}};var Fe,Se=i(80451);let Ee=Fe=class extends f{constructor(e){super(e),this.domain=null,this.editable=null,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}clone(){return new Fe({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};(0,r._)([(0,p.MZ)({types:Se.gK,json:{read:{reader:Se.rS},write:!0}})],Ee.prototype,"domain",void 0),(0,r._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],Ee.prototype,"editable",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"editableExpression",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"fieldName",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"hint",void 0),(0,r._)([(0,p.MZ)({types:je,json:{read:{source:"inputType"},write:{target:"inputType"}}})],Ee.prototype,"input",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"requiredExpression",void 0),(0,r._)([(0,p.MZ)({type:String,json:{read:!1,write:!0}})],Ee.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],Ee.prototype,"valueExpression",void 0),Ee=Fe=(0,r._)([(0,u.$)("esri.form.elements.FieldElement")],Ee);const Te=Ee;var Ae,Oe=i(49852);let Re=Ae=class extends f{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editableExpression=null,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new Ae({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editableExpression:this.editableExpression,label:this.label,orderByFields:(0,s.o8)(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],Re.prototype,"displayCount",void 0),(0,r._)([(0,p.MZ)({type:["list"],json:{write:!0}})],Re.prototype,"displayType",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],Re.prototype,"editableExpression",void 0),(0,r._)([(0,p.MZ)({type:[Oe.A],json:{write:!0}})],Re.prototype,"orderByFields",void 0),(0,r._)([(0,p.MZ)({type:Number,json:{write:!0}})],Re.prototype,"relationshipId",void 0),(0,r._)([(0,p.MZ)({type:["relationship"],json:{read:!1,write:!0}})],Re.prototype,"type",void 0),Re=Ae=(0,r._)([(0,u.$)("esri.form.elements.RelationshipElement")],Re);const Ue=Re;var Ne;let ke=Ne=class extends f{constructor(e){super(e),this.text=null,this.textFormat="plain-text",this.type="text"}clone(){return new Ne({text:this.text,textFormat:this.textFormat,visibilityExpression:this.visibilityExpression})}};(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],ke.prototype,"text",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],ke.prototype,"textFormat",void 0),(0,r._)([(0,p.MZ)({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],ke.prototype,"type",void 0),ke=Ne=(0,r._)([(0,u.$)("esri.form.elements.TextElement")],ke);const De=ke;var Ve=i(83342);let Ce=class extends(v.A.ClonableMixin(f)){constructor(e){super(e),this.associationTypes=null,this.editableExpression=null,this.type="utilityNetworkAssociations"}};(0,r._)([(0,p.MZ)({type:[Ve.A],json:{write:{isRequired:!0}}})],Ce.prototype,"associationTypes",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],Ce.prototype,"editableExpression",void 0),(0,r._)([(0,p.MZ)({type:["utilityNetworkAssociations"],json:{read:!1,write:!0}})],Ce.prototype,"type",void 0),Ce=(0,r._)([(0,u.$)("esri.form.elements.UtilityNetworkAssociationsElement")],Ce);const $e=Ce,Be=e=>"field"===e.type,Le=e=>"group"===e.type,He=e=>"text"===e.type;function qe(e){return{typesWithGroup:{base:f,key:"type",typeMap:{attachment:V,field:Te,group:e,relationship:Ue,text:De,utilityNetworkAssociations:$e}},typesWithoutGroup:{base:f,key:"type",typeMap:{attachment:V,field:Te,relationship:Ue,text:De,utilityNetworkAssociations:$e}}}}function Ke(e,t,i=!0){if(!e)return null;const n=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>n[e.type])).map((e=>n[e.type].fromJSON(e)))}function Pe(e,t,i=!0){if(!e)return null;const n=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((e=>n[e.type])).map((e=>e.toJSON()))}function Ge(e,t,i=!0){return e?e.map((e=>(0,_.aq)(i?t.typesWithGroup:t.typesWithoutGroup,e))):null}var We;let Qe=We=class extends f{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return Ge(e,Je,!1)}readElements(e,t){return Ke(t.formElements,Je,!1)}writeElements(e,t){t.formElements=Pe(e,Je,!1)}clone(){return new We({description:this.description,elements:(0,s.o8)(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,r._)([(0,p.MZ)({json:{write:!0}})],Qe.prototype,"elements",void 0),(0,r._)([(0,a.w)("elements")],Qe.prototype,"castElements",null),(0,r._)([(0,d.w)("elements",["formElements"])],Qe.prototype,"readElements",null),(0,r._)([(0,y.K)("elements")],Qe.prototype,"writeElements",null),(0,r._)([(0,p.MZ)({type:["collapsed","expanded"],json:{write:!0}})],Qe.prototype,"initialState",void 0),(0,r._)([(0,p.MZ)({type:String,json:{read:!1,write:!0}})],Qe.prototype,"type",void 0),Qe=We=(0,r._)([(0,u.$)("esri.form.elements.GroupElement")],Qe);const Je=qe(Qe),ze=Qe;var Xe,Ye=i(30524);const et=qe(ze);let tt=Xe=class extends o.A{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.title=null}castElements(e){return Ge(e,et)}readElements(e,t){return Ke(t.formElements,et)}writeElements(e,t){t.formElements=Pe(e,et)}clone(){return new Xe({description:this.description,expressionInfos:(0,s.o8)(this.expressionInfos),elements:(0,s.o8)(this.elements),title:this.title,preserveFieldValuesWhenHidden:this.preserveFieldValuesWhenHidden})}async getFieldsUsed(e,t){const i=new Set,{description:n,elements:r,expressionInfos:o,title:s}=this;if(rt(i,e,n),rt(i,e,s),!r)return[];const l=function(e,t){if(!t||0===t.length)return[];const i=nt(e),n=[];for(const e of t)i.has(e.name)&&n.push(e.expression);return n}(r,o).map((t=>(0,Ye.Dx)(i,e,t)));await Promise.all(l);for(const n of r)it(i,{fieldsIndex:e,relationships:t},n);return Array.from(i).sort()}};function it(e,t,i){const{fieldsIndex:n}=t;if(!n||n.fields.length!==e.size)switch(rt(e,n,i.label),rt(e,n,i.description),i.type){case"field":(0,Ye.rq)(e,n,i.fieldName);break;case"group":i.elements.forEach((i=>it(e,t,i)));break;case"relationship":if(t.relationships){const r=t.relationships.find((e=>e.id===i.relationshipId));r&&(0,Ye.rq)(e,n,r.keyField)}(0,Ye._w)(e,n,i.orderByFields?.map((e=>e.field)));break;case"text":rt(e,n,i.text)}}function nt(e){const t=new Set;for(const i of e)if((0,l.kb)(t,i.visibilityExpression),!He(i))if(Le(i))(0,l.FB)(t,nt(i.elements));else if((0,l.kb)(t,i.editableExpression),Be(i)){const{requiredExpression:e,valueExpression:n}=i;(0,l.FB)(t,[e,n])}return t}function rt(e,t,i){(0,Ye._w)(e,t,(0,Ye.nw)(i))}(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],tt.prototype,"description",void 0),(0,r._)([(0,p.MZ)({json:{write:!0}})],tt.prototype,"elements",void 0),(0,r._)([(0,a.w)("elements")],tt.prototype,"castElements",null),(0,r._)([(0,d.w)("elements",["formElements"])],tt.prototype,"readElements",null),(0,r._)([(0,y.K)("elements")],tt.prototype,"writeElements",null),(0,r._)([(0,p.MZ)({type:[h],json:{write:!0}})],tt.prototype,"expressionInfos",void 0),(0,r._)([(0,p.MZ)({type:Boolean,json:{default:!1,write:!0}})],tt.prototype,"preserveFieldValuesWhenHidden",void 0),(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],tt.prototype,"title",void 0),tt=Xe=(0,r._)([(0,u.$)("esri.form.FormTemplate")],tt);const ot=tt},47685:(e,t,i)=>{i.d(t,{Mk:()=>c,Zk:()=>u,w6:()=>f});var n=i(90237),r=i(65529),o=i(4718),s=i(74887),l=i(10107),p=(i(44208),i(53966),i(40608)),a=i(20816);const d=new r.A.EventEmitter;function u(e,t,i=null,n=!1){const r=(0,s.Tw)();return n=null==t||n,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:i,mayReceiveServiceEdits:n,result:r.promise}),r}const y=Symbol();function c(e){return null!=e&&"object"==typeof e&&y in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,i){const n=new URL(e).host,r=a.Z3.get(n),o=e=>!e||e===r;return o(t)&&o(i)||t===i}const f=e=>{var t;let i=class extends e{static{t=y}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:i,gdbVersion:n,mayReceiveServiceEdits:r,result:s}=e,l=t===this.url,p=null!=i&&null!=this.layerId&&i===this.layerId,a=h(this),d=h(this)&&m(t,n,this.gdbVersion);if(!l||a&&!d||!p&&!r)return;const u=s.then((e=>{if(this.lastEditsEventDate=new Date,p&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,o.o8)(e)),e;const i=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(i){const{adds:t,updates:n,deletes:r}=i.editedFeatures,s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:n?n.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,o.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,o.o8)(e.historicMoment)};return this.emit("edits",s),s}const r={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,o.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,o.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,n,r.historicMoment)&&this.emit("edits",r),r})).then((e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,n,e.historicMoment)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:u})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:i,moment:n}=e,r=t===this.url,o=h(this),s=h(this)&&m(t,i,this.gdbVersion),l=h(this)&&!m(t,this.gdbVersion,null);r&&o&&s&&l&&"historicMoment"in this&&this.historicMoment!==n&&(this.historicMoment=n)},this.when().then((()=>{this.addHandles(function(e){return d.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return d.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}_shouldUpdateHistoricMoment(e,t,i){return"historicMoment"in this&&this.historicMoment!==i&&(0,a.w5)(e,t)}};return(0,n._)([(0,l.MZ)()],i.prototype,"lastEditsEventDate",void 0),i=(0,n._)([(0,p.$)("esri.layers.mixins.EditBusLayer")],i),i}},54239:(e,t,i)=>{i.d(t,{A:()=>M});var n,r=i(90237),o=i(4576),s=i(66552),l=i(25482),p=i(83047),a=i(67076),d=i(10107),u=(i(44208),i(53966),i(36005)),y=i(40608),c=i(43937);const h=(0,s.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=h.jsonValues.slice();(0,o.Xy)(m,"orthometric");const f=(0,s.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let v=n=class extends l.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return h.write(e,t,i)}readHeightModel(e,t,i){return h.read(e)||(i?.messages&&i.messages.push(function(e,t){return new a.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(w(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,p.LA)(e)||f.read(e)||(i?.messages&&i.messages.push(w(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,p.k1)(t);return new n({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new n;return t.read(e,{origin:"web-scene"}),t}};function w(e,t){return new a.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,r._)([(0,d.MZ)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal",write:{isRequired:!0}}}}})],v.prototype,"heightModel",void 0),(0,r._)([(0,c.K)("web-scene","heightModel")],v.prototype,"writeHeightModel",null),(0,r._)([(0,u.w)(["web-scene","service"],"heightModel")],v.prototype,"readHeightModel",null),(0,r._)([(0,d.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],v.prototype,"heightUnit",void 0),(0,r._)([(0,u.w)("web-scene","heightUnit")],v.prototype,"readHeightUnit",null),(0,r._)([(0,u.w)("service","heightUnit")],v.prototype,"readHeightUnitService",null),(0,r._)([(0,d.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],v.prototype,"vertCRS",void 0),(0,r._)([(0,u.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],v.prototype,"readVertCRS",null),v=n=(0,r._)([(0,y.$)("esri.geometry.HeightModelInfo")],v);const M=v},73133:(e,t,i)=>{i.d(t,{j:()=>n});const n=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},82935:(e,t,i)=>{i.d(t,{B:()=>c,e:()=>h});var n=i(90237),r=i(10107),o=(i(44208),i(53966),i(87811),i(36005)),s=i(40608),l=i(89317),p=i(30524),a=i(96184),d=i(73133),u=i(79677),y=i(10184);const c={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const n=i.timeOffset,r=d.j.fromJSON(i.timeOffsetUnits);return n&&r?new y.A({value:n,unit:r}):null}set timeInfo(e){(0,p.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,r.MZ)({type:u.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,r.MZ)({type:y.A})],t.prototype,"timeOffset",void 0),(0,n._)([(0,o.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,r.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,r.MZ)(c)],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,s.$)("esri.layers.mixins.TemporalLayer")],t),t}},83960:(e,t,i)=>{i.d(t,{X_:()=>s,oW:()=>p,zx:()=>l});var n=i(34727),r=i(83047);const o=96;function s(e,t){const i=t||e.extent,n=e.width,s=(0,r.GA)(i?.spatialReference);return i&&n?i.width/n*s*r.dy*o:0}function l(e,t,i){return function(e,t){return 0===t||(0,n.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.Sp)(e,t)||e>t}(e,i)}function p(e,t){return(0,n.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},87796:(e,t,i)=>{i.d(t,{j:()=>R});var n=i(90237),r=i(5503),o=i(4718),s=i(53966),l=i(10107),p=(i(44208),i(36005)),a=i(40608),d=i(43937),u=i(89317),y=i(5443),c=i(54239),h=i(16930),m=i(60694),f=i(10873),v=i(69540),w=i(25482),M=(i(87811),i(56400));let _=class extends(v.A.ClonableMixin(w.A)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,n._)([(0,l.MZ)()],_.prototype,"creatorField",void 0),(0,n._)([(0,l.MZ)()],_.prototype,"creationDateField",void 0),(0,n._)([(0,l.MZ)()],_.prototype,"editorField",void 0),(0,n._)([(0,l.MZ)()],_.prototype,"editDateField",void 0),(0,n._)([(0,l.MZ)()],_.prototype,"realm",void 0),(0,n._)([(0,l.MZ)((0,M.P6)("dateFieldsTimeReference",!0))],_.prototype,"timeZone",void 0),_=(0,n._)([(0,a.$)("esri.layers.support.EditFieldsInfo")],_);const g=_;let x=class extends(v.A.ClonableMixin(w.A)){constructor(e){super(e)}};(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"name",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"fields",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"isAscending",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"indexType",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"isUnique",void 0),(0,n._)([(0,l.MZ)({constructOnly:!0,json:{write:!0}})],x.prototype,"description",void 0),x=(0,n._)([(0,a.$)("esri.layers.support.FeatureIndex")],x);var b=i(15426),Z=i(83047);let I=class extends(v.A.ClonableMixin(w.A)){constructor(e){super(e),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};(0,n._)([(0,l.MZ)({type:String,json:{read:{source:"shapeAreaFieldName"}}})],I.prototype,"shapeAreaField",void 0),(0,n._)([(0,l.MZ)({type:String,json:{read:{source:"shapeLengthFieldName"}}})],I.prototype,"shapeLengthField",void 0),(0,n._)([(0,l.MZ)({type:String,json:{read:e=>Z.dk.read(e)||Z.Sk.read(e)}})],I.prototype,"units",void 0),I=(0,n._)([(0,a.$)("esri.layers.support.GeometryFieldsInfo")],I);const j=I;var F=i(37352),S=i(45067),E=i(22453),T=i(80451);let A=class extends(v.A.ClonableMixin(w.A)){constructor(e){super(e),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(e){if(!e)return null;const t={};for(const i of Object.keys(e))t[i]=(0,T.rS)(e[i]);return t}writeDomains(e,t){if(!e)return;const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],A.prototype,"code",void 0),(0,n._)([(0,l.MZ)({type:Object,json:{write:!0}})],A.prototype,"defaultValues",void 0),(0,n._)([(0,l.MZ)({json:{write:!0}})],A.prototype,"domains",void 0),(0,n._)([(0,p.w)("domains")],A.prototype,"readDomains",null),(0,n._)([(0,d.K)("domains")],A.prototype,"writeDomains",null),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],A.prototype,"name",void 0),A=(0,n._)([(0,a.$)("esri.layers.support.Subtype")],A);const O=A,R=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(r.A.ofType(x)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=h.A.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.uniqueIdFields=null,this.version=void 0}getFieldDomain(){throw new Error("Not implemented")}getField(e){return this.fieldsIndex.get(e)}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:n}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(n.supportsUpdateByOthers&&n.supportsUpdateByAnonymous&&n.supportsDeleteByOthers&&n.supportsDeleteByAnonymous))return"load"}if((0,b.rQ)(this.serviceDefinitionExpression)||(0,b.rQ)(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if((0,b.tG)(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return(0,E.S)(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=(0,o.o8)(e),{operations:i,editing:n}=t;return(0,b.Pt)(this)?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=n.supportsDeleteByOthers=n.supportsGeometryUpdate=n.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=n.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}readGlobalIdFieldFromService(e,t){return(0,b.jD)(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||(0,b.Pt)(this))return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return(0,b.Pt)(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return(0,b.Zm)(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readUniqueIdFields(e,t){return t.uniqueIdInfo?.OIDFieldContainsHashValue?t.uniqueIdInfo.fields:null}set url(e){if(null==e)return void this._set("url",e);const t=(0,m.HZ)({layer:this,url:e,nonStandardUrlAllowed:!0,logger:s.A.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,i,n){(0,m.LS)(this,e,null,t,n)}readVersion(e,t){return(0,b.$4)(t)}};return(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"authenticationTriggerEvent",null),(0,n._)([(0,l.MZ)({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","maxUniqueIDCount","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],t.prototype,"capabilities",void 0),(0,n._)([(0,p.w)("service","capabilities")],t.prototype,"readCapabilitiesFromService",null),(0,n._)([(0,l.MZ)((0,M.P6)("dateFieldsTimeReference"))],t.prototype,"dateFieldsTimeZone",void 0),(0,n._)([(0,l.MZ)({type:Boolean})],t.prototype,"datesInUnknownTimezone",void 0),(0,n._)([(0,l.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,n._)([(0,l.MZ)({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],t.prototype,"displayField",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,type:g})],t.prototype,"editFieldsInfo",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"editingInfo",void 0),(0,n._)([(0,p.w)("editingInfo")],t.prototype,"readEditingInfo",null),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"effectiveCapabilities",null),(0,n._)([(0,l.MZ)()],t.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,l.MZ)((()=>{const e=(0,o.o8)(f.Yj),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],t.prototype,"elevationInfo",void 0),(0,n._)([(0,l.MZ)()],t.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)({type:F.A,json:{name:"layerDefinition.floorInfo",write:{layerContainerTypes:u.K}}})],t.prototype,"floorInfo",void 0),(0,n._)([(0,l.MZ)({type:y.A,json:{origins:{service:{read:{source:"extent"}}}}})],t.prototype,"fullExtent",void 0),(0,n._)([(0,l.MZ)()],t.prototype,"gdbVersion",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,type:j,json:{read:{source:"geometryProperties"}}})],t.prototype,"geometryFieldsInfo",void 0),(0,n._)([(0,l.MZ)({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:b.iX.read}}}})],t.prototype,"geometryType",void 0),(0,n._)([(0,l.MZ)({type:String})],t.prototype,"globalIdField",void 0),(0,n._)([(0,p.w)("service","globalIdField",["globalIdField","fields"])],t.prototype,"readGlobalIdFieldFromService",null),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"hasFullEditingRestrictions",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasM",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"hasUpdateItemRestrictions",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasZ",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,type:c.A})],t.prototype,"heightModelInfo",void 0),(0,n._)([(0,l.MZ)({type:Date})],t.prototype,"historicMoment",void 0),(0,n._)([(0,l.MZ)({type:r.A.ofType(x),readOnly:!0})],t.prototype,"indexes",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"isTable",void 0),(0,n._)([(0,p.w)("service","isTable",["type"])],t.prototype,"readIsTableFromService",null),(0,n._)([(0,l.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],t.prototype,"layerId",void 0),(0,n._)([(0,l.MZ)(f.hG)],t.prototype,"maxScale",void 0),(0,n._)([(0,p.w)("service","maxScale",["maxScale","effectiveMaxScale"])],t.prototype,"readMaxScale",null),(0,n._)([(0,l.MZ)(f.hn)],t.prototype,"minScale",void 0),(0,n._)([(0,p.w)("service","minScale",["minScale","effectiveMinScale"])],t.prototype,"readMinScale",null),(0,n._)([(0,l.MZ)({type:String})],t.prototype,"objectIdField",void 0),(0,n._)([(0,p.w)("service","objectIdField",["objectIdField","fields"])],t.prototype,"readObjectIdFieldFromService",null),(0,n._)([(0,l.MZ)((0,M.P6)("preferredTimeReference"))],t.prototype,"preferredTimeZone",void 0),(0,n._)([(0,l.MZ)({type:[S.A],readOnly:!0})],t.prototype,"relationships",void 0),(0,n._)([(0,l.MZ)({type:Boolean})],t.prototype,"returnM",void 0),(0,n._)([(0,l.MZ)({type:Boolean})],t.prototype,"returnZ",void 0),(0,n._)([(0,l.MZ)({readOnly:!0,json:{write:!1}})],t.prototype,"serverGens",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],t.prototype,"serviceDefinitionExpression",void 0),(0,n._)([(0,p.w)("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],t.prototype,"readServiceDefinitionExpression",null),(0,n._)([(0,l.MZ)({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"serviceItemId",void 0),(0,n._)([(0,l.MZ)()],t.prototype,"sourceJSON",void 0),(0,n._)([(0,l.MZ)({type:h.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],t.prototype,"spatialReference",void 0),(0,n._)([(0,l.MZ)({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],t.prototype,"subtypeField",void 0),(0,n._)([(0,l.MZ)({type:[O],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"subtypes",void 0),(0,n._)([(0,l.MZ)({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],t.prototype,"trackIdField",void 0),(0,n._)([(0,l.MZ)({type:[String],readOnly:!0})],t.prototype,"uniqueIdFields",void 0),(0,n._)([(0,p.w)("service","uniqueIdFields",["uniqueIdInfo.OIDFieldContainsHashValue","uniqueIdInfo.fields"])],t.prototype,"readUniqueIdFields",null),(0,n._)([(0,l.MZ)(f.OZ)],t.prototype,"url",null),(0,n._)([(0,d.K)("url")],t.prototype,"writeUrl",null),(0,n._)([(0,l.MZ)({json:{origins:{service:{read:!0}},read:!1}})],t.prototype,"version",void 0),(0,n._)([(0,p.w)("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],t.prototype,"readVersion",null),t=(0,n._)([(0,a.$)("esri.layers.mixins.FeatureLayerBase")],t),t}},91908:(e,t,i)=>{i.d(t,{D:()=>o});var n=i(60694);const r=[];function o(e,t){if((0,n.Wo)(e.url??""))return!0;const{wkid:i}=t;for(const t of r){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}r.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),r.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),r.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),r.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),r.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},96184:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(90237),r=i(69540),o=i(25482),s=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),p=i(40608),a=i(43937),d=i(79677),u=i(10184),y=i(56400);function c(e,t){return u.A.fromJSON({value:e,unit:t})}let h=class extends(r.A.ClonableMixin(o.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?d.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?c(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?c(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,s.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,s.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,l.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,a.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,s.MZ)({type:u.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,a.K)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,s.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,s.MZ)((0,y.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,n._)([(0,s.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,n._)([(0,s.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,n._)([(0,p.$)("esri.layers.support.TimeInfo")],h);const m=h}}]);
@@ -316,4 +316,4 @@ gl_Position = posProjCenter;
316
316
  gl_PointSize = 1.0;`),a.main.add(s.H`fragColor = vec4(1);
317
317
  if(discardByTerrainDepth()) {
318
318
  fragColor.g = 0.5;
319
- }`)}},66208:(e,t,r)=>{r.d(t,{m:()=>i});var n=r(53655);function i(e,t){const r=(0,n.SH)(e,t),i=r.queryResult.featureResult,s=r.queryResult.queryGeometry,a=r.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=a),i}},66344:(e,t,r)=>{var n,i;r.d(t,{q:()=>l}),(i=n||(n={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,i,s){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,n.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,i,n.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,r,0,n.ALL);const l=1+Math.max(s,-4)- -3;this._db.set(t,new a(r,i,l)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,r,i){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===r){for(this._size-=s.size,e.size-=s.size;i>this._maxSize;){const e=this._notifyRemove(t,r,i,n.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,n)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forEach((r=>{const{id:i,name:s}=r;if(n.startsWith(i)){const r=t[s]||0;t[s]=r+e.size}}))}));const n={};this._users.forEach((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,n[r]=Math.round(100*e.hitRate)+"%"}else n[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+n[r]));for(let t=r.length-1;t>=0;--t){const n=r[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,n.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,n.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,n){const i=this._users.get(e.split(o)[0])?.removeFunc,s=i?.(t,n,r);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const r=t??this;if(r.size<=e)return;const n=t?.id;let i=!0;for(;i;){i=!1;for(const[s,a]of this._db)if(0===a.lifetime&&(!n||s.startsWith(n))){const n=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,a,n),r.size<=.9*e)return;i||=this._db.has(s)}}for(const[i,s]of this._db)if(!n||i.startsWith(n)){const n=t??this._users.get(i.split(o)[0]);if(this._purgeItem(i,s,n),r.size<=.9*e)return}}_purgeItem(e,t,r){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,n.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}const o=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67063:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Lr});var n=r(90237),i=r(65529),s=r(74887),a=r(36708),o=r(10107),l=r(44208),c=(r(53966),r(87811),r(40608)),d=r(5443),u=r(80586),h=r(16930),f=r(68298),p=r(61956),m=r(69622),g=r(4576),y=r(32587),_=r(44794),b=r(19419),v=r(69397),x=r(24326);function w(e=""){return`${e}${(0,x.c)()}`}r(37539),new Float64Array(3);class S{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=w(`featureDataSubset-${e.id}-`)}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+v.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let n=0;n<r.length;++n)r[n]=t[e[n]];return new S(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let n=0;n<t;++n)this.getEnabled(n)&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class A{constructor(e){this._tile=e,this.id=w(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get featureCount(){return this._tile.featureCount}get usedMemory(){return v.qK+(0,v.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every((e=>e))}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new S(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const n of this._allFeatureIndices())t[n]&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:n}=this;for(const i of t)e[r++]=Number(n[i]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let C=class extends m.A{constructor(e){super(e),this._updatingCount=0,this.extent=null,this._tileHandles=new y.A,this._wanted=new y.A}destroy(){for(const e of this._tileHandles.values())e.abort();this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updatingCount>0}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,b.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted;for(const r of this._tileHandles.values())t.has(r.id)&&!O(r)&&e.push(r);return e}async onTileTreeChange(e){++this._updatingCount;try{const{added:t,removed:r}=e,n=this._tileHandles,{_boundingRect:i}=this,s=null!=i?t.filter((e=>(0,b.HY)(i,e.extent))):t,a=this._wanted,o=new Array;for(const e of r){const{id:r}=e;if(a.delete(r),t.some((t=>I(t,e)||I(e,t))))continue;const i=n.get(r);null!=i&&o.push(this._removeTile(i))}for(const e of s)a.set(e.id,e),o.push(this._addTile(e));await Promise.allSettled(o)}finally{--this._updatingCount}}async _removeTile(e){this._tileHandles.delete(e.id),this._validate(),e.abort();const{featureData:t}=e,r=new R(e.untilSettled(),null!=t?this.createRemoveFeatureDataCommand(t.id):null);e.nextEvent=null;const{command:n}=await r.getCommand();n?.execute()}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r)return!O(r)||r.featureData.isFullyEnabled||(r.featureData.enableAll(),r.nextEvent=this._onTileLoad(r)),void await r.untilSettled();const n=new T(e);this._tileHandles.set(n.id,n);const i=this.loadTile(e,n.signal);n.nextEvent=i;const a=await i;if(n.aborted)throw(0,s.NK)();n.featureData=new A(a),function(e){if(!O(e))throw new Error}(n),n.nextEvent=this._onTileLoad(n),await n.untilSettled()}async _onTileLoad(e){const{_wanted:t,_tileHandles:r,_missingTiles:n}=this,i=e.descriptor,s=new Array,a=new Array,o=new Set;for(const l of r.values()){if(l===e)continue;const{descriptor:c,id:d}=l;if(t.has(d)||n.some((({descriptor:e})=>I(e,c)||I(c,e)))){if(O(l)){if(I(i,c)){const e=l.featureData;for(const t of e.objectIds())o.add(t)}if(I(c,i)){const t=e.featureData,r=new Set(t.objectIds()),{featureData:n}=l;n.disableObjectIds(r);const i=AbortSignal.any([l.signal,e.signal]),o=l.untilSettled();s.push(new R(o,this.createUpdateFeatureDataVisibilityCommand(n),i)),a.push(l),this._validateRemoval(n,r)}}}else{l.abort(),r.delete(d);const{featureData:e}=l;null!=e&&s.push(new R(l.untilSettled(),this.createRemoveFeatureDataCommand(e.id))),l.nextEvent=null}}o.size>0&&(e.featureData.disableObjectIds(o),this._validateRemoval(e.featureData,o)),this._validate(),s.push(new R(e.untilSettled(),this.createAddFeatureDataCommand(e.featureData,e.signal),e.signal)),a.push(e);const l=this._joinCommands(s);for(const e of a)e.nextEvent=l;await l}async _joinCommands(e){const t=(await Promise.allSettled(e.map((async e=>e.getCommand())))).map((e=>"fulfilled"!==e.status||e.value.signal?.aborted?null:e.value.command)).filter(g.Ru);0!==t.length&&t.reduce(((e,t)=>(e.append(t),e))).execute()}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!O(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:n}=e[t];for(let i=t+1;i<e.length;++i){const{featureData:t,objectIds:s}=e[i];for(const e of s)if(n.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function I({lij:[e,t,r]},{lij:[n,i,s]}){const a=n-e;return a>=0&&t===i>>a&&r===s>>a}(0,n._)([(0,o.MZ)()],C.prototype,"updating",null),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"loadTile",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createAddFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createRemoveFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createUpdateFeatureDataVisibilityCommand",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_updatingCount",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"extent",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_boundingRect",null),(0,n._)([(0,o.MZ)()],C.prototype,"_missingTiles",null),C=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],C);class T{constructor(e){this.descriptor=e,this._controller=new AbortController,this._featureData=(0,_.v)(null),this.nextEvent=null}get id(){return this.descriptor.id}get featureData(){return this._featureData.value}set featureData(e){this._featureData.value=e}get signal(){return this._controller.signal}abort(){this._controller.abort()}get aborted(){return this._controller.signal.aborted}async untilSettled(){try{await this.nextEvent}catch(e){(0,s.zf)(e)||console.error(e)}}}function O(e){return null!=e.featureData}class R{constructor(e,t,r){this.previousEventSettled=e,this.commandPromise=t,this.signal=r}async getCommand(){const{previousEventSettled:e,commandPromise:t,signal:r}=this,[n]=await Promise.all([t,e]);if(r?.aborted)throw(0,s.NK)();return{command:n,signal:r}}}var M=r(75503),E=r(27647),P=r(92722);class z{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return v.qK+v.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new F(this._index,this._view,e)}}class F extends z{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,E.Q)(new P.A,this._geometryOverride,e.hasZ,e.hasM)}}class D{constructor(e,t){this.featureData=e,this.bounds=t}}class B{constructor(){this._tileBounds=new Map,this.events=new i.A,this.featureAdapter=j.shared}get usedMemory(){return v.qK+v.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new M.w(9,(t=>e.getBounds(t))),n=new Array;for(let e=0;e<t;++e)n[e]=e;r.load(n),this._tileBounds.set(e.id,new D(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all((r=>{t.getEnabled(r)&&e(new z(r,t))}))}forEachInBounds(e,t){V.minX=e[0],V.minY=e[1],V.maxX=e[2],V.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(V,(r=>{e.getEnabled(r)&&t(new z(r,e))}))}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:a,maxX:o,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,a),n=Math.min(n,o),i=Math.min(i,l)}return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:e}}}class j{static{this.shared=new j}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const V=new M.E;var U=r(80893);class k{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const n=v.ez+t.reduce(((e,{usedMemory:t})=>e+t),0),i=3*v.RS;this.usedMemory=v.qK+n+i,this.featureCount=t.reduce(((e,t)=>e+t.featureCount),0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttribute(n,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(n,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:n,featurePageIndex:i}=this._translateIndex(e);this._pages[n].getCoordinates(i,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getCentroid(n,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getObjectIdsArray(e,i,n);return n}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getCoordinatesArray(e,i,n);return n}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,n=new Array;for(const i of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(i);r!==e&&(0!==n.length&&t.push({pageIndex:r,indices:n}),r=e,n=[]),n.push(s)}0!==n.length&&t.push({pageIndex:r,indices:n})}const{_pages:r}=this;for(const{pageIndex:e,indices:n}of t)yield{page:r[e],indices:n}}}var N=r(49186),L=r(51624),q=r(51850),H=r(70328),G=r(62577),$=r(95466),Y=r(53655);class W{constructor(e){this._reader=new L.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return X(e.getMessage());e.skip()}Q()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:n}}=this,i=r.get(t)?.index;if(null==i)return;const s=n[e*r.fields.length+i],a=this._reader;return a.move(s),J(a)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,n=e*t.fields.length,i=this._reader,s={};for(const e of t.fields){const t=r[n+e.index];i.move(t),s[e.name]=J(i)}return s}getCoordinates(e,t,r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;n.move(s[e]),this._readCoordinates(a,o,t,r)}getOptimizedGeometry(e){const t=(0,q.vt)();return this.getCoordinates(e,t),new P.A([],t)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,K);const[n,i,s]=K,a=[n,i];return t&&(a[3]=s),r&&(a[t?4:3]=0),new P.A([],a)}getBounds(e){this.getCoordinates(e,K);const[t,r]=K,n=new M.E;return n.minX=t,n.minY=r,n.maxX=t,n.maxY=r,n}getBoundingBox(e){this.getCoordinates(e,K);const[t,r,n]=K;return(0,H.fA)(t,r,n,t,r,n)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{objectIdFieldName:i,attributeIndices:s,fieldsIndex:a}=this._index,o=a.get(i).index,l=a.fields.length;for(const i of t){const t=s[i*l+o];n.move(t),e[r++]=J(n)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;for(const i of t){const t=s[i];n.move(t),r=this._readCoordinates(a,o,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:n,fieldsIndex:i}=this._index,s=i.get(r).index,a=i.fields.length;for(const r of e){const e=n[r*a+s];t.move(e),yield J(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[n,i,s],a,o){const l=this._reader,c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)3===l.tag()?(l.getUInt32(),a[o++]=n+e*l.getSInt64(),a[o++]=i+t*l.getSInt64(),a[o++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return o}}function X(e){for(;e.next();){if(1===e.tag())return Z(e.getMessage());e.skip()}Q()}function Z(e){let t,r,n=!1,i=!1,s=0;const a=new Array,o=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&Q();break;case 9:n=e.getBool()??!1;break;case 12:t=(0,G.Q1)(e.processMessage(Y.ae));break;case 13:{const t=e.processMessage(Y.cn);t.index=s++,a.push(t);break}case 15:{o.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:i=e.getBool()??!1;break;default:e.skip()}const c=new $.A(a);return null!=t&&i&&null!=r&&c.has(r)||Q(),{transform:t,exceededTransferLimit:n,fieldsIndex:c,objectIdFieldName:r,featureIndices:o,attributeIndices:l}}function Q(){const e=new N.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function J(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const K=(0,q.vt)();class ee{constructor(e,t,r,n,i){this.spatialReference=e,this.url=r,this.objectIdField=n,this.capabilities=i;const{supportsMaxRecordCountFactor:s,maxRecordCount:a}=this.capabilities.query,o=s?4:1,l=(a??8e3)*o;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=o,c.num=this._pageSize,c.outFields=[n],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:n}=this,i=(0,b.w1)(e.extent,r),a=this._baseQuery.clone();a.geometry=i;const o=new Array;let l=0,c=!1,d=1;for(;!c;){const e=[];for(let r=0;r<d;++r)e.push(this._fetchPage(a,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&o.push(e)}d=Math.min(d+1,4)}return new k(e,o,n)}async _fetchPage(e,t,r){const n=e.clone();n.start=t*this._pageSize;const i=(await(0,U.kS)(this.url,n,{signal:r})).data;return(0,s.Te)(r),new W(i)}}var te=r(58083),re=r(9093),ne=r(97146),ie=r(24151),se=r(29920),ae=r(46540),oe=r(51768),le=r(34727),ce=r(77690),de=r(29242),ue=r(37585),he=r(48163),fe=r(38954),pe=r(91829);var me=r(13030),ge=r(78662),ye=r(26857),_e=r(1843),be=r(49255),ve=r(40268),xe=r(16943),we=r(25634),Se=r(11725),Ae=r(13464),Ce=r(77194),Ie=r(620);class Te{constructor(){this.scale=0,this.factor=0,this.minScaleFactor=0}}var Oe=r(59907),Re=r(43616),Me=r(13259),Ee=r(97220),Pe=r(98958),ze=r(59643),Fe=r(33524),De=r(63907),Be=r(90644);class je extends Pe.w{constructor(e,t){super(e,t,new Ee.$(Me.H,(()=>r.e(8241).then(r.bind(r,48241))))),this.primitiveType=t.occlusionPass?De.WR.POINTS:De.WR.TRIANGLES}initializePipeline(e){const{oitPass:t,hasPolygonOffset:r,draped:n,output:i,depthTestEnabled:s,occlusionPass:a}=e,o=t===ze.Y.NONE,l=t===ze.Y.ColorAlpha,c=i===be.V.Highlight,d=s&&!n&&!l&&!a&&!c;return(0,Be.Ey)({blending:(0,be.RN)(i)?o?Be.RC:(0,Fe.ez)(t):null,depthTest:s&&!n?{func:De.MT.LEQUAL}:null,depthWrite:d?Be.Uy:null,drawBuffers:(0,Fe.m6)(t,i),colorWrite:Be.kn,polygonOffset:r?Ve:null})}}const Ve={factor:0,units:-4};var Ue=r(53466),ke=r(22911),Ne=r(51976),Le=r(35256);class qe extends Le.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.vvSize=!1,this.vvColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.objectAndLayerIdColorInstanced=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.textureCoordinateType=Ue.I.None,this.emissionSource=ke.ZX.None,this.discardInvisibleFragments=!0,this.hasVvInstancing=!1}}(0,n._)([(0,Ne.W)()],qe.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"signedDistanceFieldEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvSize",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvColor",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasVerticalOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasScreenSizePerspective",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasRotation",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"debugDrawLabelBorder",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasPolygonOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"depthTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"pixelSnappingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"draped",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"terrainDepthTest",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"cullAboveTerrain",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionPass",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occludedFragmentFade",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"objectAndLayerIdColorInstanced",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"horizonCullingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"isFocused",void 0);var He=r(49788);class Ge extends Se.im{constructor(e,t){super(e,mt),this.produces=new Map([[Ae.N.HUD_MATERIAL,e=>(0,be.Mb)(e)&&!this.parameters.drawAsLabel],[Ae.N.LABEL_MATERIAL,e=>(0,be.Mb)(e)&&this.parameters.drawAsLabel],[Ae.N.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[Ae.N.DRAPED_MATERIAL,e=>this.parameters.draped&&(0,be.Mb)(e)]]),this._visible=!0,this._configuration=new qe(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===Ae.N.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===Ae.N.OCCLUSION_PIXELS,(0,be.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!ye.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,n,i,s){const{options:{selectionMode:a,hud:o,excludeLabels:l},point:c,camera:d}=r,{parameters:u}=this;if(!a||!o||l&&u.isLabel||!e.visible||!c)return;const h=e.attributes.get(ae.r.FEATUREATTRIBUTE),f=null==h?null:(0,pe.ci)(h.data,ct),{scaleX:p,scaleY:m}=bt(f,u,d.pixelRatio);(0,ce.z0)(nt,t),e.attributes.has(ae.r.FEATUREATTRIBUTE)&&function(e){const t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],d=1/Math.sqrt(t*t+r*r+n*n),u=1/Math.sqrt(i*i+s*s+a*a),h=1/Math.sqrt(o*o+l*l+c*c);e[0]=t*d,e[1]=r*d,e[2]=n*d,e[3]=i*u,e[4]=s*u,e[5]=a*u,e[6]=o*h,e[7]=l*h,e[8]=c*h}(nt);const g=e.attributes.get(ae.r.POSITION),y=e.attributes.get(ae.r.SIZE),_=e.attributes.get(ae.r.NORMAL),b=e.attributes.get(ae.r.ROTATION),v=e.attributes.get(ae.r.CENTEROFFSETANDDISTANCE);(0,Ie.vA)(g.size>=3);const x=(0,Me.c)(u),w="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<g.data.length/g.size;e++){const n=e*g.size;(0,fe.i)(Ze,g.data[n],g.data[n+1],g.data[n+2]),(0,fe.t)(Ze,Ze,t),(0,fe.t)(Ze,Ze,d.viewMatrix);const i=e*v.size;if((0,fe.i)(ot,v.data[i],v.data[i+1],v.data[i+2]),!w&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}const a=e*_.size;if((0,fe.i)(Qe,_.data[a],_.data[a+1],_.data[a+2]),Ye(Qe,nt,d,dt),vt(this.parameters,Ze,dt,d,Xe),d.applyProjection(Ze,Je),Je[0]>-1){w&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*d.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*d.pixelRatio),d.unapplyProjection(Je,Ze)),Je[0]+=this.parameters.screenOffset[0]*d.pixelRatio,Je[1]+=this.parameters.screenOffset[1]*d.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]);const t=e*y.size;ft[0]=y.data[t],ft[1]=y.data[t+1],(0,Ce.MD)(ft,Xe.factor,ft);const n=ut*d.pixelRatio;let i=0;u.textureIsSignedDistanceField&&(i=Math.min(u.outlineSize,.5*ft[0])*d.pixelRatio/2),ft[0]*=p,ft[1]*=m;const a=e*b.size,o=u.rotation+b.data[a];if(We(c,Je[0],Je[1],ft,n,i,o,u,x)){const e=r.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,d.viewMatrix)),Je[0]=c[0],Je[1]=c[1],d.unprojectFromRenderScreen(Je,Ze)){const t=(0,q.vt)();(0,fe.c)(t,e.direction);const r=1/(0,fe.l)(t);(0,fe.h)(t,t,r),s((0,fe.j)(e.origin,Ze)*r,t,-1,!0,1,et)}}}}}intersectDraped(e,t,r,n,i,s){const a=e.attributes.get(ae.r.POSITION),o=e.attributes.get(ae.r.SIZE),l=e.attributes.get(ae.r.ROTATION),c=this.parameters,d=(0,Me.c)(c),u=e.attributes.get(ae.r.FEATUREATTRIBUTE),h=null==u?null:(0,pe.ci)(u.data,ct),{scaleX:f,scaleY:p}=bt(h,c,e.screenToWorldRatio),m=ht*e.screenToWorldRatio;for(let t=0;t<a.data.length/a.size;t++){const r=t*a.size,u=a.data[r],h=a.data[r+1],g=t*o.size;ft[0]=o.data[g],ft[1]=o.data[g+1];let y=0;c.textureIsSignedDistanceField&&(y=Math.min(c.outlineSize,.5*ft[0])*e.screenToWorldRatio/2),ft[0]*=f,ft[1]*=p;const _=t*l.size,b=c.rotation+l.data[_];We(n,u,h,ft,m,y,b,c,d)&&i(s.dist,s.normal,-1,!1)}}createBufferWriter(){return new _t}applyShaderOffsetsView(e,t,r,n,i,s,a){const o=Ye(t,r,i,dt);return this._applyVerticalGroundOffsetView(e,o,i,a),vt(this.parameters,a,o,i,s),this._applyPolygonOffsetView(a,o,n[3],i,a),this._applyCenterOffsetView(a,n,a),a}applyShaderOffsetsNDC(e,t,r,n,i){return this._applyCenterOffsetNDC(e,t,r,n),null!=i&&(0,fe.c)(i,n),this._applyPolygonOffsetNDC(n,t,r,n),n}_applyPolygonOffsetView(e,t,r,n,i){const s=n.aboveGround?1:-1;let a=Math.sign(r);0===a&&(a=s);const o=s*a;if(this.parameters.shaderPolygonOffset<=0)return(0,fe.c)(i,e);const l=(0,le.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/n.viewport[2];return(0,fe.h)(i,e,o>0?c:1/c),i}_applyVerticalGroundOffsetView(e,t,r,n){const i=(0,fe.l)(e),s=r.aboveGround?1:-1,a=r.computeRenderPixelSizeAtDist(i)*ve.R,o=(0,fe.h)(Ze,t.normal,s*a);return(0,fe.g)(n,e,o),n}_applyCenterOffsetView(e,t,r){const n="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,fe.c)(r,e),n&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,fe.n)(Qe,r),(0,fe.g)(r,r,(0,fe.h)(Qe,Qe,t[2])))),r}_applyCenterOffsetNDC(e,t,r,n){const i="screen"!==this.parameters.centerOffsetUnits;return n!==e&&(0,fe.c)(n,e),i||(n[0]+=t[0]/r.fullWidth*2,n[1]+=t[1]/r.fullHeight*2),n}_applyPolygonOffsetNDC(e,t,r,n){const i=this.parameters.shaderPolygonOffset;if(e!==n&&(0,fe.c)(n,e),i){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);n[2]-=(s||e)*i}return n}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,n=e[3]>=He.Q||t>=He.Q&&r[3]>=He.Q;return this._visible&&n}createGLMaterial(e){return new $e(e)}calculateRelativeScreenBounds(e,t,r=(0,b.vt)()){return function(e,t,r,n){n[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,n[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class $e extends we.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(je,e)}}function Ye(e,t,r,n){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,ce.z0)(it,t)),(0,fe.q)(n.normal,e,t),(0,fe.t)(n.normal,n.normal,r.viewInverseTransposeMatrix),n.cosAngle=(0,fe.f)(Ke,pt),n}function We(e,t,r,n,i,s,a,o,l){let c=t-i-n[0]*l[0],d=c+n[0]+2*i,u=r-i-n[1]*l[1],h=u+n[1]+2*i;const f=o.distanceFieldBoundingBox;return o.textureIsSignedDistanceField&&null!=f&&(c+=n[0]*f[0],u+=n[1]*f[1],d-=n[0]*(1-f[2]),h-=n[1]*(1-f[3]),c-=s,d+=s,u-=s,h+=s),(0,ue.hZ)(rt,t,r),(0,ue.e$)(tt,e,rt,(0,le.kU)(a)),tt[0]>c&&tt[0]<d&&tt[1]>u&&tt[1]<h}const Xe=new class{constructor(){this.factor=new Te,this.factorAlignment=new Te}},Ze=(0,q.vt)(),Qe=(0,q.vt)(),Je=(0,pe.vt)(),Ke=(0,q.vt)(),et=(0,q.vt)(),tt=(0,he.vt)(),rt=(0,he.vt)(),nt=(0,de.vt)(),it=(0,de.vt)(),st=(0,re.vt)(),at=(0,pe.vt)(),ot=(0,q.vt)(),lt=(0,q.vt)(),ct=(0,pe.vt)(),dt={normal:Ke,cosAngle:0},ut=1,ht=2,ft=(0,he.fA)(0,0),pt=(0,q.fA)(0,0,1);class mt extends we.NV{constructor(){super(...arguments),this.renderOccluded=Se.m$.Occlude,this.isDecoration=!1,this.color=(0,pe.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,he.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,pe.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,pe.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const gt=(0,_e.BP)().vec3f(ae.r.POSITION).vec3f(ae.r.NORMAL).vec2i16(ae.r.UVI).vec4u8(ae.r.COLOR).vec2f(ae.r.SIZE).f32(ae.r.ROTATION).vec4f(ae.r.CENTEROFFSETANDDISTANCE).vec4f(ae.r.FEATUREATTRIBUTE),yt=gt.clone().vec4u8(ae.r.OLIDCOLOR);class _t{constructor(){this.vertexBufferLayout=(0,xe.E)()?yt:gt}elementCount(e){return 6*e.get(ae.r.POSITION).indices.length}write(e,t,r,n,i,s){const{position:a,normal:o,uvi:l,color:c,size:d,rotation:u,centerOffsetAndDistance:h,featureAttribute:f}=i;(0,Oe.Hk)(r.get(ae.r.POSITION),e,a,s,6),(0,Oe.p1)(r.get(ae.r.NORMAL),t,o,s,6);const p=r.get(ae.r.UVI)?.data;let m=0,g=0,y=-1-Me.f,_=-1-Me.f;p&&p.length>=4&&(m=p[0],g=p[1],y=-1-p[2],_=-1-p[3]);let b=r.get(ae.r.POSITION).indices.length,v=s;for(let e=0;e<b;++e)l.set(v,0,m),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,g),v++;(0,Oe.tb)(r.get(ae.r.COLOR),4,c,s,6);const{data:x,indices:w}=r.get(ae.r.SIZE);b=w.length,v=s;for(let e=0;e<b;++e){const t=x[2*w[e]],r=x[2*w[e]+1];for(let e=0;e<6;++e)d.set(v,0,t),d.set(v,1,r),v++}if((0,Oe.uO)(r.get(ae.r.ROTATION),u,s,6),r.get(ae.r.CENTEROFFSETANDDISTANCE)?(0,Oe.Ut)(r.get(ae.r.CENTEROFFSETANDDISTANCE),h,s,6):(0,Oe.Pq)(h,s,6*b),r.get(ae.r.FEATUREATTRIBUTE)?(0,Oe.Ut)(r.get(ae.r.FEATUREATTRIBUTE),f,s,6):(0,Oe.Pq)(f,s,6*b),null!=n){const e=r.get(ae.r.POSITION)?.indices;if(e){const t=e.length,r=i.getField(ae.r.OLIDCOLOR,me.XP);(0,Oe.vx)(n,r,t,s,6)}}return{numVerticesPerItem:6,numItems:b}}intersect(e,t,r,n,i,s,a){const{options:{selectionMode:o,hud:l,excludeLabels:c},point:d,camera:u}=n;if(!o||!l||c&&t.isLabel||!d)return;const h=this.vertexBufferLayout.createView(e),f=h.getField(ae.r.POSITION,me.xs),p=h.getField(ae.r.NORMAL,me.xs),m=h.getField(ae.r.ROTATION,me.Y$),g=h.getField(ae.r.SIZE,me.gH),y=h.getField(ae.r.FEATUREATTRIBUTE,me.Eq),_=h.getField(ae.r.CENTEROFFSETANDDISTANCE,me.Eq),b="screen"===t.centerOffsetUnits,v=(0,Me.c)(t);if(null==f||null==p||null==m||null==g||null==_)return;const x=null==y?null:y.getVec(0,ct),{scaleX:w,scaleY:S}=bt(x,t,u.pixelRatio),A=f.count/6;for(let e=0;e<A;e++){const i=6*e;if(f.getVec(i,Ze),null!=r&&(0,fe.g)(Ze,Ze,r),(0,fe.t)(Ze,Ze,u.viewMatrix),_.getVec(i,at),(0,fe.i)(ot,at[0],at[1],at[2]),!b&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}if(p.getVec(i,Qe),Ye(Qe,nt,u,dt),vt(t,Ze,dt,u,Xe),u.applyProjection(Ze,Je),Je[0]>-1){b&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*u.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*u.pixelRatio),u.unapplyProjection(Je,Ze)),Je[0]+=t.screenOffset[0]*u.pixelRatio,Je[1]+=t.screenOffset[1]*u.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]),g.getVec(i,ft),(0,Ce.MD)(ft,Xe.factor,ft);const r=ut*u.pixelRatio;let s=0;t.textureIsSignedDistanceField&&(s=Math.min(t.outlineSize,.5*ft[0])*u.pixelRatio/2),ft[0]*=w,ft[1]*=S;const o=m.get(i),l=t.rotation+o;if(We(d,Je[0],Je[1],ft,r,s,l,t,v)){const t=n.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,u.viewMatrix)),Je[0]=d[0],Je[1]=d[1],u.unprojectFromRenderScreen(Je,Ze)){const r=(0,q.vt)();(0,fe.c)(r,t.direction);const n=1/(0,fe.l)(r);(0,fe.h)(r,r,n),a((0,fe.j)(t.origin,Ze)*n,r,e,!0,1,et)}}}}}}function bt(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,ge.VC)(lt,t,e),{scaleX:lt[0]*r,scaleY:lt[1]*r})}function vt(e,t,r,n,i){if(!e.verticalOffset?.screenLength)return e.screenSizePerspective||e.screenSizePerspectiveAlignment?xt(e,i,(0,fe.l)(t),r.cosAngle):(i.factor.scale=1,i.factorAlignment.scale=1),t;const s=(0,fe.l)(t),a=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=(0,Re.kE)(n,s,e.verticalOffset,r.cosAngle,a);return xt(e,i,s,r.cosAngle),(0,fe.h)(r.normal,r.normal,o),(0,fe.g)(t,t,r.normal)}function xt(e,t,r,n){null!=e.screenSizePerspective?(0,Ce.cJ)(n,r,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?(0,Ce.cJ)(n,r,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}class wt{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this._sharedTextures=new Map,this.globalViewingMode=e===ie.RT.Global}createRenderCommandBuffer(){return{commands:[],transferList:[]}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async getOrCreateSharedTexture(e,t){const{data:r,parameters:n}=t(),i=await this._mainThreadDelegate.createTexture(r,n);return this._sharedTextures.set(e,i),i}async releaseSharedTexture(e){const t=this._sharedTextures,r=t.get(e);null!=r&&(t.delete(e),await this._mainThreadDelegate.releaseTexture(r))}async createMaterial(e){const{type:t,parameters:r}=e,n=w("material");let i,s;switch(t){case"default":i=new oe.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,materialId:n,parameters:e.parameters};break;case"hud":i=new Ge(r,this.globalViewingMode),s={type:t,materialId:n,parameters:e.parameters}}return this._bufferWriters.set(n,i.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),n}updateMaterial(e){return{commands:[{...e,id:"update-material"}],transferList:[]}}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}addDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.addDirectRendererGeometryBuffer(n,e,i,s,r)}updateDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.updateDirectRendererGeometryBuffer(n,e,i,s,r)}addDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=w("lod-renderer"),r=new Set,n={levels:e.levels.map((e=>({components:e.components.map((e=>{const t=e.attributes.get(ae.r.POSITION);if(!t||0===t.indices.length)throw new Error("positions attribute expected");const n=(0,ne.tM)(t.indices.length/3),i=new se.j(n,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:i.bbMax,bbMin:i.bbMin}}})),minScreenSpaceRadius:e.minScreenSpaceRadius})))};return await this._mainThreadDelegate.createLodRenderer(t,n,Array.from(r)),t}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t){const{materialId:r,visibilities:n,objectIds:i}=e,s=this._bufferWriters.get(r);if(null==s)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,te.C)(St,e.transformation),St[12]-=t[0],St[13]-=t[1],St[14]-=t[2],a=St;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let o=null;a&&((0,te.B8)(At,St),(0,te.mg)(At,At),o=At);const l=e.attributes,c=s.elementCount(l),d=s.vertexBufferLayout.stride/4;c>Math.floor(Ct/d)&&console.warn("geometry with very large number of elements encountered");const u=s.vertexBufferLayout.createBuffer(c),h=s.write(a,o,l,e.objectAndLayerIdColor,u,0);if(null==h)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==h.numItems||i.length!==h.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:u.buffer,elementCount:c},renderGeometryBufferItems:{objectIds:i,visibilities:n,ranges:{numVertices:h.numVerticesPerItem,numItems:h.numItems}}}}}const St=(0,re.vt)(),At=(0,re.vt)(),Ct=4194304;class It{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}}var Tt=r(9762),Ot=r(27993);function Rt(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function Mt(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function Et(e,t){const r=t.viewSpatialReference,n=t.renderSpatialReference,{extent:i}=e,s=(0,b.gX)(i),a=(0,q.vt)();return(0,Ot.F)([s[0],s[1],0],r,a,n),a}var Pt=r(48353),zt=r(8887),Ft=r(83047);function Dt(e){const t=new Map;for(const[r,n]of e)t.set(r,{...n,indices:(0,ne.Dg)(n.indices)});return t}r(87317),r(12359),r(95108),r(27615),r(52106),r(4718),r(34275),r(65864);var Bt,jt,Vt=r(57917),Ut=r(72385),kt=(r(4197),r(11868)),Nt=r(240),Lt=(r(71351),r(46610));(jt=Bt||(Bt={})).length=function(e,t){const r=e[t],n=e[t+1],i=e[t+2];return Math.sqrt(r*r+n*n+i*i)},jt.normalize=function(e,t){const r=e[t],n=e[t+1],i=e[t+2],s=1/Math.sqrt(r*r+n*n+i*i);e[t]*=s,e[t+1]*=s,e[t+2]*=s},jt.scale=function(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r},jt.add=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]+r[n],i[s+1]=e[t+1]+r[n+1],i[s+2]=e[t+2]+r[n+2]},jt.subtract=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]-r[n],i[s+1]=e[t+1]-r[n+1],i[s+2]=e[t+2]-r[n+2]},r(96672),r(87170);const qt=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)qt[6*e+t]=e;const Ht=new Array(36);for(let e=0;e<6;e++)Ht[6*e]=0,Ht[6*e+1]=1,Ht[6*e+2]=2,Ht[6*e+3]=2,Ht[6*e+4]=3,Ht[6*e+5]=0;const Gt=(0,Ut.fA)(-.5,0,-.5),$t=(0,Ut.fA)(.5,0,-.5),Yt=(0,Ut.fA)(0,0,.5),Wt=(0,Ut.fA)(0,.5,0),Xt=(0,Ut.vt)(),Zt=(0,Ut.vt)(),Qt=(0,Ut.vt)(),Jt=(0,Ut.vt)(),Kt=(0,Ut.vt)();function er(e,t){switch(e){case"cone":return((e,r,n=!1)=>({levels:e.map((e=>{const i=Dt(r(e.tesselation));return n&&function(e){const t=e,r=t.get(ae.r.POSITION).data,n=t.get(ae.r.NORMAL).data;if(n){const t=tr(e,ae.r.NORMAL).data;for(let e=0;e<n.length;e+=3){const r=n[e+1];t[e+1]=-n[e+2],t[e+2]=r}}if(r){const t=tr(e,ae.r.POSITION).data;for(let e=0;e<r.length;e+=3){const n=r[e+1];t[e+1]=-r[e+2],t[e+2]=n}}}(i),{components:[{attributes:i,objectAndLayerIdColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}}))}))(rr,(e=>function(e,t,r,n,i=!0,s=!0){let a=0;const o=t,l=e;let c=(0,Ut.fA)(0,a,0),d=(0,Ut.fA)(0,a+l,0),u=(0,Ut.fA)(0,-1,0),h=(0,Ut.fA)(0,1,0);n&&(a=l,d=(0,Ut.fA)(0,0,0),c=(0,Ut.fA)(0,a,0),u=(0,Ut.fA)(0,1,0),h=(0,Ut.fA)(0,-1,0));const f=[d,c],p=[u,h],m=r+2,g=Math.sqrt(l*l+o*o);if(n)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),n=(0,Ut.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,Ut.fA)(l*Math.cos(t)/g,-o/g,l*Math.sin(t)/g);p.push(i)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),n=(0,Ut.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,Ut.fA)(l*Math.cos(t)/g,o/g,l*Math.sin(t)/g);p.push(i)}const y=new Array,_=new Array;if(i){for(let e=3;e<f.length;e++)y.push(1),y.push(e-1),y.push(e),_.push(0),_.push(0),_.push(0);y.push(f.length-1),y.push(2),y.push(1),_.push(0),_.push(0),_.push(0)}if(s){for(let e=3;e<f.length;e++)y.push(e),y.push(e-1),y.push(0),_.push(e),_.push(e-1),_.push(1);y.push(0),y.push(2),y.push(f.length-1),_.push(1),_.push(2),_.push(p.length-1)}const b=(0,kt.oe)(3*m);for(let e=0;e<m;e++)b[3*e]=f[e][0],b[3*e+1]=f[e][1],b[3*e+2]=f[e][2];const v=(0,kt.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[[ae.r.POSITION,new Lt.n(b,y,3,!0)],[ae.r.NORMAL,new Lt.n(v,_,3,!0)]]}(1,.5,e,!1)),!0);case"sphere":case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function tr(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Vt.S)(r.data)},e.set(t,r)),r}(0,fe.d)(Xt,Gt,Wt),(0,fe.d)(Zt,Gt,$t),(0,fe.e)(Qt,Xt,Zt),(0,fe.n)(Qt,Qt),(0,fe.d)(Xt,$t,Wt),(0,fe.d)(Zt,$t,Yt),(0,fe.e)(Jt,Xt,Zt),(0,fe.n)(Jt,Jt),(0,fe.d)(Xt,Yt,Wt),(0,fe.d)(Zt,Yt,Gt),(0,fe.e)(Kt,Xt,Zt),(0,fe.n)(Kt,Kt),Qt[0],Qt[1],Qt[2],Jt[0],Jt[1],Jt[2],Kt[0],Kt[1],Kt[2],(0,q.vt)();const rr=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var nr=r(74810);class ir{constructor(e){this._context=e,this.lodRendererId=null,this._loaded=!1,this._loadingPromise=null,this._primitive="cone",this._primitiveMaterialId=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t={usePBR:!0,isSchematic:!0,mrrFactors:nr.Bt,ambient:q.Un,diffuse:q.Un,hasSlicePlane:!1,castShadows:!0,offsetTransparentBackfaces:!1,screenSizePerspective:{}};t.externalColor=pe.Un,t.isInstanced=!0;const r=await e.createMaterial({type:"default",parameters:t}),n=er(this._primitive,r);this.lodRendererId=await e.createLodRenderer(n),this._primitiveMaterialId=r,this._loaded=!0}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:n}=t;if(null==this.lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:i}=e;if(0===i)return r.createRenderCommandBuffer();const s=(0,H.vt)((0,zt.Fq)(this._primitive)),a=(0,q.ci)((0,H.Ej)(s)),o=(0,q.ci)((0,zt.Bb)(a,{isPrimitive:!0,width:100,depth:null,height:null})),l=new Float64Array(16*i),c=new Float64Array(16*i),d=Mt(e),u=await n.applyElevationAlignmentTo(d);for(let e=0;e<i;++e){const t=e,r=u[3*e+0],n=u[3*e+1],i=u[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or),d=this._computeLocalTransform(o,a,ar);this._writeMatrixToTypedBuffer(l,t,d),this._writeMatrixToTypedBuffer(c,t,s)}const h=Rt(e),f=new Uint8Array(i);e.getVisibilityArray(f);const p={featureIds:new Uint32Array(h),visibility:f,localTransforms:l,globalTransforms:c};return r.addLodInstances(this.lodRendererId,e.id,p)}async createRemoveCommand(e){const{_context:t,lodRendererId:r}=this,n=t.renderCommandContext;return null==r?n.createRenderCommandBuffer():n.removeLodInstances(r,e)}async createUpdateVisibilityCommand(e){const{lodRendererId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateLayerOpacityCommand(e){const{_context:t}=this,r=t.renderCommandContext,n=this._primitiveMaterialId;return null==n?r.createRenderCommandBuffer():r.updateMaterial({type:"default",materialId:n,parameters:{opacity:e}})}async createUpdateElevationCommand(e){const{_context:t,lodRendererId:r}=this,{renderCommandContext:n,mainThreadDelegate:i}=t,{featureCount:s,id:a}=e;if(null==r||0===s)return n.createRenderCommandBuffer();const o=new Float64Array(16*s),l=Mt(e),c=await i.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],n=c[3*e+1],i=c[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or);this._writeMatrixToTypedBuffer(o,t,s)}return n.updateLodInstancesData(r,a,o)}_writeMatrixToTypedBuffer(e,t,r){let n=16*t;for(let t=0;t<16;t++)e[n++]=r[t]}_computeGlobalTransform(e,t,r,n,i){return sr[0]=e,sr[1]=t,sr[2]=r,(0,Pt.l)(n,sr,i,this._context.renderSpatialReference),i}_computeLocalTransform(e,t,r){return(0,te.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const n=function(e=q.Un,t,r,n=1){const i=new Array(3);if(null==t||null==r)i[0]=1,i[1]=1,i[2]=1;else{let n,s=0;for(let a=2;a>=0;a--){const o=e[a],l=null!=o,c=0===a&&!n&&!l,d=r[a];let u;"symbol-value"===o||c?u=0!==d?t[a]/d:1:l&&"proportional"!==o&&isFinite(o)&&(u=0!==d?o/d:1),null!=u&&(i[a]=u,n=u,s=Math.max(s,Math.abs(u)))}for(let e=2;e>=0;e--)null==i[e]?i[e]=n:0===i[e]&&(i[e]=.001*s)}for(let e=2;e>=0;e--)i[e]/=n;return(0,q.ci)(i)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===n[0]&&1===n[1]&&1===n[2]||(0,te.hs)(r,r,n)}}const sr=(0,q.vt)(),ar=(0,re.vt)(),or=(0,re.vt)();var lr=r(97768);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const cr=[];{const e=16;for(let t=0;t<360;t+=360/e)cr.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}var dr,ur;(ur=dr||(dr={}))[ur.Left=0]="Left",ur[ur.Center=1]="Center",ur[ur.Right=2]="Right",Object.freeze({left:0,center:.5,right:1});const hr=Object.freeze({"bottom-left":(0,he.fA)(0,0),bottom:(0,he.fA)(.5,0),"bottom-right":(0,he.fA)(1,0),left:(0,he.fA)(0,.5),center:(0,he.fA)(.5,.5),right:(0,he.fA)(1,.5),"top-left":(0,he.fA)(0,1),top:(0,he.fA)(.5,1),"top-right":(0,he.fA)(1,1)});var fr=r(40804);r(48833);const pr=(0,pe.CN)(.25,.25,.75,.75);function mr(e){return"cross"===e||"x"===e}function gr(e,t=128,r=.5*t,n=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return xr(e,br(r,r,t/2))}(t,r);case"square":return function(e,t){return yr(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return _r(e,t,!1,r)}(t,r,n);case"x":return function(e,t,r=0){return _r(e,t,!0,r)}(t,r,n);case"kite":return function(e,t){return yr(e,t,!0)}(t,r);case"triangle":return function(e,t){return xr(e,vr(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,n=t/2,i=e/2,s=.8*r,a=br(i,(e-t)/2-s,Math.sqrt(s*s+n*n)),o=vr(i,r,n);return xr(e,((e,t)=>Math.max(o(e,t),-a(e,t))))}(t,r)}}function yr(e,t,r){return r&&(t/=Math.SQRT2),xr(e,((n,i)=>{let s=n-.5*e+.25,a=.5*e-i-.75;if(r){const e=(s+a)/Math.SQRT2;a=(a-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(a))-.5*t}))}function _r(e,t,r,n=0){t-=n,r&&(t*=Math.SQRT2);const i=.5*t;return xr(e,((t,s)=>{let a,o=t-.5*e,l=.5*e-s-1;if(r){const e=(o+l)/Math.SQRT2;l=(l-o)/Math.SQRT2,o=e}return o=Math.abs(o),l=Math.abs(l),a=o>l?o>i?Math.sqrt((o-i)*(o-i)+l*l):l:l>i?Math.sqrt(o*o+(l-i)*(l-i)):o,a-=n/2,a}))}function br(e,t,r){return(n,i)=>{const s=n-e,a=i-t;return Math.sqrt(s*s+a*a)-r}}function vr(e,t,r){const n=Math.sqrt(t*t+r*r);return(i,s)=>{const a=Math.abs(i-e)-r,o=s-e+t/2+.75,l=(t*a+r*o)/n,c=-o;return Math.max(l,c)}}function xr(e,t){const r=new Uint8Array(4*e*e);for(let n=0;n<e;n++)for(let i=0;i<e;i++){const s=i+e*n;let a=t(i,n);a=a/e+.5,(0,fr.U)(a,r,4*s)}return r}class wr{constructor(e){this._context=e,this.materialId=null,this._loaded=!1,this._loadingPromise=null,this._iconTexture=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}destroy(){this._iconTexture=(0,lr.xt)(this._iconTexture)}async _load(){const e=this._context.renderCommandContext,t=await e.getOrCreateSharedTexture("circle-icon",(()=>function(e,t=128,r=.5*t,n=0){return{data:gr(e,t,r,n),parameters:{mipmap:!1,wrap:{s:De.pF.CLAMP_TO_EDGE,t:De.pF.CLAMP_TO_EDGE},width:t,height:t,components:4,noUnpackFlip:!0,reloadable:!0}}}("circle")));this._iconTexture={remove:()=>e.releaseSharedTexture("circle-icon")};const r={anchorPosition:hr.center,occlusionTest:!0,hasSlicePlane:!1,color:[1,0,0,1],outlineColor:[0,0,0,1],outlineSize:1,distanceFieldBoundingBox:pr,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:mr("circle")};this.materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this.materialId),this._loaded=!0}async createAddCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r;if(null==t)throw new Error("expected material not to be null");const i=await this._createGeometry(e);if(null==i)return n.createRenderCommandBuffer();const s=Et(e,r);return n.addDirectRendererGeometry(e.id,i,s)}async _createGeometry(e){const{materialId:t,_context:r}=this,{mainThreadDelegate:n}=r,{featureCount:i}=e;if(0===i||null==t)return null;const s=Rt(e),a=Mt(e),o=function(e,t){const r=e.length/3,n=t.viewSpatialReference,i=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,Tt.projectBuffer)(e,n,0,s,i,0,r))throw new Error("Failed to project coordinates");return s}(await n.applyElevationAlignmentTo(a),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),d=new Float64Array([24,24]),u=new Float64Array([0,0,0,1]),h=new Float64Array([0,0]),f=new Float64Array([0]),p=new Uint32Array(i);for(let e=0;e<i;++e)p[e]=e;const m=new Uint32Array(i);for(let e=0;e<i;++e)m[e]=0;const g=new Lt.n(o,p,3,!0),y=new Lt.n(l,m,3,!0),_=new Lt.n(h,m,2,!0),b=new Lt.n(c,m,4,!0),v=new Lt.n(f,m,1,!0),x=new Lt.n(d,m,2,!0),w=new Lt.n(u,m,4,!0),S=[[ae.r.POSITION,g],[ae.r.NORMAL,y],[ae.r.UV0,_],[ae.r.COLOR,b],[ae.r.ROTATION,v],[ae.r.SIZE,x],[ae.r.CENTEROFFSETANDDISTANCE,w]],A=new Uint8Array(i);return e.getVisibilityArray(A),{attributes:Dt(S),objectAndLayerIdColor:void 0,transformation:(0,re.vt)(),materialId:t,objectIds:s,visibilities:A}}async createRemoveCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;return null==t?n.createRenderCommandBuffer():n.removeDirectRendererGeometryBuffer(t,e)}async createUpdateVisibilityCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateLayerOpacityCommand(e){const{_context:t}=this;return t.renderCommandContext.createRenderCommandBuffer()}async createUpdateElevationCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r,{featureCount:i,id:s}=e;if(null==t||0===i)return n.createRenderCommandBuffer();const a=await this._createGeometry(e);if(null==a)return n.createRenderCommandBuffer();const o=Et(e,r);return n.updateDirectRendererGeometry(s,a,o)}}class Sr{constructor(e){this._symbols=new Array,this._featureDataPartitioning=new Map,this._context=e}async load(){this._symbols[0]=new wr(this._context),this._symbols[1]=new ir(this._context)}async createAddCommand(e){const t=this._partition(e),r=await Promise.all(t.map((async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))}))),n=this._context.renderCommandContext;return new It(n,n.mergeRenderCommandBuffers(r),[()=>{this._featureDataPartitioning.set(e.id,t)}])}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})));return new It(n,n.mergeRenderCommandBuffers(s),[()=>{t.delete(e)}])}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e.id);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))})));return new It(n,n.mergeRenderCommandBuffers(s),[])}async createUpdateLayerOpacityCommand(e){const t=this._context.renderCommandContext,r=[];for(let t=0;t<this._symbols.length;++t){const n=this._symbols[t];null!=n&&n.loaded&&r.push(n.createUpdateLayerOpacityCommand(e))}const n=await Promise.all(r);return new It(t,t.mergeRenderCommandBuffers(n),[])}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=t.renderCommandContext,n=[];for(const t of e.values()){const e=t.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))}));n.push(...e)}const i=await Promise.all(n);return new It(r,r.mergeRenderCommandBuffers(i),[])}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=Rt(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,n=[[],[]];for(let e=0;e<r;++e)n[t[e]%2].push(e);return n.map(((t,r)=>new Ar(r,e.subset(new Uint32Array(t))))).filter((e=>e.features.featureCount>0))}}class Ar{constructor(e,t){this.index=e,this.features=t}}var Cr=r(73941),Ir=r(98764),Tr=r(65806);const Or=(0,q.vt)();var Rr=r(88582),Mr=r(17352),Er=r(97937);function Pr(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const zr=2**50;function Fr(e,t,r,n){return e.operations.setAltitudeAt(e.value,t,r,n)}function Dr(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Br=(0,q.vt)();(0,q.vt)();var jr=r(44280),Vr=r(32114);function Ur(e){return"point"===e.type}class kr{constructor(e,t,r,n){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=n,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(n),this.referenceEllipsoid=(0,Cr.tO)(t),this.sphericalPCPF=(0,Ir.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return function(e,t){return e.operations.getExtent(e.value,t),t}(this._coordinateSystem,(0,b.vt)())}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Fr(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){!function(e,t,r,n){t!==n&&(0,te.C)(n,t),(0,fe.i)(Br,n[12],n[13],n[14]),Fr(e,Br,r,Br),n[12]=Br[0],n[13]=Br[1],n[14]=Br[2]}(this._coordinateSystem,t,e,t)}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,Rr._.Z,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,n){return e.operations.axisAt(e.value,t,r,n)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,Rr._.X,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=this.worldBasisAtPosition(e,Rr._.Z,Vr.rq.get());return(0,te.hZ)(t,r[0],r[1],r[2],0,n[0],n[1],n[2],0,i[0],i[1],i[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=(0,jr.EJ)(t,n,r);return(0,le.KJ)(i)}intersectManifoldClosestSilhouette(e,t,r){return Dr(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=Vr.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,n)?(0,fe.c)(r,n):null}intersectInfiniteManifold(e,t,r){if(this.viewingMode===ie.RT.Global)return this.intersectManifold(e,t,r);Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=this._tmpCoordinateSystem.value,i=Vr.rq.get();return(0,Nt.Ui)(n.plane,e,i)?(0,fe.c)(r,i):null}toRenderCoords(e,t,r){return Ur(e)?(0,Tr.g)(e,t,this.spatialReference):(0,Ot.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return Ur(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,Ot.F)(e,t,Or,r.spatialReference)&&(r.x=Or[0],r.y=Or[1],r.z=Or[2],!0)}(e,this.spatialReference,t)?t:null):(0,Ot.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case ie.RT.Local:return new kr(ie.RT.Local,t,(0,Ft.GA)(t),Pr(Mr.b,(0,Mr.f)([0,0,0],[zr,0,0],[0,zr,0])));case ie.RT.Global:return new kr(ie.RT.Global,t,1,function(e){return Pr(Er.s,(0,Er.f)(0,0,0,(0,Cr.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,Ft.KX)(e)/(0,Ft.KX)(t)}}let Nr=class extends i.A.EventedAccessor{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new B,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,baseQuery:n,url:i,objectIdField:s,capabilities:o,fieldsIndex:l,timeInfo:c,elevationInfo:m,fullExtent:g}){const y=h.A.fromJSON(e),_=h.A.fromJSON(t);this._fetcher=new ee(y,p.A.fromJSON(n),i,s,o),this._queryEngine=new f.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",objectIdField:s,fieldsIndex:l,availableFields:[s],spatialReference:e,featureStore:this._featureStore,timeInfo:c});const b={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const n={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",n,{transferList:r})},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};this._renderer=new Sr({viewSpatialReference:y,renderSpatialReference:_,renderCoordsHelper:kr.create(r,_),renderCommandContext:new wt(r,b),elevationInfo:m??{},mainThreadDelegate:b}),this._defaultQueryJSON=new p.A({outSpatialReference:y}).toJSON();let v=null;if(null!=g){const e=d.A.fromJSON(g);await(0,u.initializeProjection)(e.spatialReference,y),v=(0,u.project)(e,y)}return this._tileManager=new C({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddFeatureDataCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveFeatureDataCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateFeatureDataVisibilityCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),extent:v}),this.addHandles((0,a.wB)((()=>this.updating),(e=>{this.emit("notify-updating",{updating:e})})),a.Vh),await this._renderer.load(),qr}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async onTileTreeChange(e){return await this._tileManager.onTileTreeChange(e),qr}async onElevationChange(e){return qr}async onLayerOpacityChange(e){const t=await this._renderer.createUpdateLayerOpacityCommand(e);return await t.execute(),qr}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,n=await this._renderer.createAddCommand(e);return(0,s.Te)(t),n.appendPipelineStateCommand((()=>{r.addTile(e)})),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer,n=await r.createRemoveCommand(e);return n.appendPipelineStateCommand((()=>{t.removeTile(e)})),n}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer,n=await r.createUpdateVisibilityCommand(e);return(0,s.Te)(t),n}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,n._)([(0,o.MZ)()],Nr.prototype,"updating",null),Nr=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Nr);const Lr=Nr,qr={result:void 0}},69418:(e,t,r)=>{r.d(t,{S:()=>c,z:()=>l});var n=r(83047),i=r(21325),s=r(43334),a=r(58512),o=r(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n.G9)(this._options.sourceSpatialReference)/(0,n.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.A}}},72385:(e,t,r)=>{function n(){return new Float32Array(3)}function i(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function a(){return n()}function o(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function d(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>i,vt:()=>n});const u=a(),h=o(),f=l(),p=c(),m=d();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:u,clone:i,create:n,fromValues:s,ones:o,unitX:l,unitY:c,unitZ:d,zeros:a},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,r)=>{r.d(t,{E:()=>C,w:()=>o});var n=r(4576),i=r(21818),s=(r(44208),r(3694)),a=r(11006);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),w.prune(),S.prune(),A.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(b(e,r))for(x.clear();r;){for(let i=0,s=r.children.length;i<s;i++){const s=r.children[i],a=r.leaf?n(s):s;b(e,a)&&(r.leaf?t(s):_(e,a)?l(s,t):x.push(s))}r=x.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!b(e,t))return!1;for(x.clear();t;){for(let n=0,i=t.children.length;n<i;n++){const i=t.children[n],s=t.leaf?r(i):i;if(b(e,s)){if(t.leaf||_(e,s))return!0;x.push(i)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,a=0,o=!1;const l=this._toBBox(e);for(S.clear(),A.clear();r||S.length>0;){if(r||(r=S.pop(),s=S.data[S.length-1],a=A.pop()??0,o=!0),r.leaf&&(t=(0,n.qh)(r.children,(0,i.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),S.push(r),this._condense(S),this;o||r.leaf||!_(r,l)?s?(a++,r=s.children[a],o=!1):r=null:(S.push(r),A.push(a),a=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,n){const i=r-t+1;let s=this._maxEntries;if(i<=s){const n=new T(e.slice(t,r+1));return c(n,this._toBBox),n}n||(n=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(n-1)));const a=new O([]);a.height=n;const o=Math.ceil(i/s),l=o*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let i=t;i<=r;i+=l){const t=Math.min(i+l-1,r);v(e,i,t,o,this._compareMinY);for(let r=i;r<=t;r+=o){const i=Math.min(r+o-1,t);a.children.push(this._build(e,r,i,n-1))}}return c(a,this._toBBox),a}_insert(e,t,r){const n=this._toBBox,i=r?e:n(e);S.clear();const s=function(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,i=1/0;for(let s=0,a=t.children.length;s<a;s++){const a=t.children[s],o=p(a),l=g(e,a)-o;l<i?(i=l,n=o<n?o:n,r=a):l===i&&o<n&&(n=o,r=a)}t=r||t.children[0]}return t}(i,this._data,t,S);for(s.children.push(e),u(s,i);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,r){for(let n=r;n>=0;n--)u(t.data[n],e)}(i,S,t)}_split(e,t){const r=e.data[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const s=this._chooseSplitIndex(r,i,n);if(!s)return;const a=r.children.splice(s,r.children.length-s),o=r.leaf?new T(a):new O(a);o.height=r.height,c(r,this._toBBox),c(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new O([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,i,s;n=i=1/0;for(let a=t;a<=r-t;a++){const t=d(e,0,a,this._toBBox),o=d(e,a,r,this._toBBox),l=y(t,o),c=p(t)+p(o);l<n?(n=l,s=a,i=c<i?c:i):l===n&&c<i&&(i=c,s=a)}return s}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const i=this._toBBox,s=d(e,0,t,i),a=d(e,r-t,r,i);let o=m(s)+m(a);for(let n=t;n<r-t;n++){const t=e.children[n];u(s,e.leaf?i(t):t),o+=m(s)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];u(a,e.leaf?i(t):t),o+=m(a)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const i=e.data[t-1],s=i.children;s.splice((0,n.qh)(s,r,s.length,i.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(w.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,i.zI)(e));else w.pushArray(r.children);r=w.pop()??null}}function c(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,n,i){i||(i=new T([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,a=t;a<r;a++)s=e.children[a],u(i,e.leaf?n(s):s);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,s-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,n,i){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=n)continue;const o=r+Math.ceil((t-r)/n/2)*n;(0,a.q)(e,o,r,t,i),s.push(r,o,o,t)}}const x=new s.A,w=new s.A,S=new s.A,A=new s.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class T extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class O extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(66552),s=r(25482),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const c=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends s.A{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,o.e)(c),(0,a.MZ)({json:{write:{isRequired:!0}}})],d.prototype,"type",void 0),d=(0,n._)([(0,l.$)("esri.layers.support.Domain")],d);const u=d},79677:(e,t,r)=>{r.d(t,{A:()=>f});var n,i=r(90237),s=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),c=r(40608),d=r(43937),u=r(98623);let h=class extends s.A{static{n=this}static get allTime(){return p}static get empty(){return m}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let i=this.end;if(i){const r=(0,a.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,o;return i>=t&&i<=r?a=i:t>=i&&t<=s&&(a=t),r>=i&&r<=s?o=r:s>=t&&s<=r&&(o=s),null==a||null==o||isNaN(a)||isNaN(o)?n.empty:new n({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,r=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:o}=this;return null!=s&&(i.start=(0,a.S1)(s,e,t,r)),null!=o&&(i.end=(0,a.S1)(o,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,i._)([(0,d.K)("end")],h.prototype,"writeEnd",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,i._)([(0,d.K)("start")],h.prototype,"writeStart",null),h=n=(0,i._)([(0,c.$)("esri.time.TimeExtent")],h);const f=h,p=new h,m=new h({start:void 0,end:void 0})},80451:(e,t,r)=>{r.d(t,{rS:()=>g,gK:()=>m}),r(44208);var n,i=r(53177),s=r(76357),a=r(90237),o=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let c=class extends s.A{static{n=this}constructor(e){super(e),this.type="inherited"}clone(){return new n}};(0,a._)([(0,o.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=n=(0,a._)([(0,l.$)("esri.layers.support.InheritedDomain")],c);const d=c;var u,h=r(10107);let f=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],f.prototype,"maxValue",void 0),(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],f.prototype,"minValue",void 0),(0,a._)([(0,o.e)({range:"range"})],f.prototype,"type",void 0),f=u=(0,a._)([(0,l.$)("esri.layers.support.RangeDomain")],f);const p=f,m={key:"type",base:s.A,typeMap:{range:p,"coded-value":i.A,inherited:d}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return p.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return d.fromJSON(e)}return null}},80893:(e,t,r)=>{r.d(t,{IJ:()=>p,Jf:()=>_,Pk:()=>g,eW:()=>f,gW:()=>y,kS:()=>m});var n=r(78888),i=r(84952),s=r(65864),a=r(17136),o=r(21325),l=r(10536),c=r(66208),d=r(58501);const u="Layer does not support extent calculation.";function h(e,t){const r=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const i=n;let a,l,c;if(null!=r&&(l=r.spatialReference,c=(0,o.YX)(l),i.geometryType=(0,s.$B)(r),i.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(r,e.compactGeometryEnabled),i.inSR=c),n.groupByFieldsForStatistics&&(i.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(i.objectIds=n.objectIds.join(",")),n.orderByFields&&(i.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete i.outFields:n.outFields.includes("*")?i.outFields="*":i.outFields=n.outFields.join(","),n.outSR?(i.outSR=(0,o.YX)(n.outSR),a=e.outSpatialReference):r&&(n.returnGeometry||n.returnCentroid)&&(i.outSR=i.inSR,a=l),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(i.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(i.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(i.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,i.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(i.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(i.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(i.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:r}=e;null==t&&null==r||(i.time=t===r?t:`${t??"null"},${r??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=a&&l.equals(a)&&(i.defaultSR=i.inSR,delete i.inSR,delete i.outSR),i}async function f(e,t,r,n){const i=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",n);return(0,d.q)(t,r,i.data),i}async function p(e,t,r,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:r.createFeatureResult()};const i=await m(e,t,n),s=i;return s.data=(0,c.m)(i.data,r),s}function m(e,t,r){return b(e,t,"pbf",r)}function g(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",r,{returnIdsOnly:!0})}function y(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,r){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await b(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),i=n.data;if(i.hasOwnProperty("extent"))return n;if(i.features)throw new Error(u);if(i.hasOwnProperty("count"))throw new Error(u);return n}async function b(e,t,r,s={},o={}){const c="string"==typeof e?(0,i.An)(e):e,d=t.geometry?[t.geometry]:[],u=await(0,a.el)(d,null,{signal:s.signal}),f=u?.[0];null!=f&&((t=t.clone()).geometry=f);const p=(0,l.z)({...c.query,f:r,...o,...h(t,o)});return(0,n.A)((0,i.fj)(c.path,(m=o,null==t.formatOf3DObjects||m.returnCountOnly||m.returnExtentOnly||m.returnIdsOnly?"query":"query3d")),{...s,responseType:"pbf"===r?"array-buffer":"json",query:{...p,...s.query}});var m}},95696:(e,t,r)=>{r.d(t,{A:()=>u});var n,i=r(90237),s=r(69540),a=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(40608);let d=class extends(s.A.ClonableMixin(a.A)){static{n=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new n}};(0,i._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],d.prototype,"origin",void 0),d=n=(0,i._)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],d);const u=d}}]);
319
+ }`)}},66208:(e,t,r)=>{r.d(t,{m:()=>i});var n=r(53655);function i(e,t){const r=(0,n.SH)(e,t),i=r.queryResult.featureResult,s=r.queryResult.queryGeometry,a=r.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=a),i}},66344:(e,t,r)=>{var n,i;r.d(t,{q:()=>l}),(i=n||(n={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,i,s){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,n.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,i,n.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,r,0,n.ALL);const l=1+Math.max(s,-4)- -3;this._db.set(t,new a(r,i,l)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,r,i){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===r){for(this._size-=s.size,e.size-=s.size;i>this._maxSize;){const e=this._notifyRemove(t,r,i,n.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,n)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forEach((r=>{const{id:i,name:s}=r;if(n.startsWith(i)){const r=t[s]||0;t[s]=r+e.size}}))}));const n={};this._users.forEach((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,n[r]=Math.round(100*e.hitRate)+"%"}else n[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+n[r]));for(let t=r.length-1;t>=0;--t){const n=r[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,n.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,n.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,n){const i=this._users.get(e.split(o)[0])?.removeFunc,s=i?.(t,n,r);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const r=t??this;if(r.size<=e)return;const n=t?.id;let i=!0;for(;i;){i=!1;for(const[s,a]of this._db)if(0===a.lifetime&&(!n||s.startsWith(n))){const n=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,a,n),r.size<=.9*e)return;i||=this._db.has(s)}}for(const[i,s]of this._db)if(!n||i.startsWith(n)){const n=t??this._users.get(i.split(o)[0]);if(this._purgeItem(i,s,n),r.size<=.9*e)return}}_purgeItem(e,t,r){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,n.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}const o=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67063:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Lr});var n=r(90237),i=r(65529),s=r(74887),a=r(36708),o=r(10107),l=r(44208),c=(r(53966),r(87811),r(40608)),d=r(5443),u=r(80586),h=r(16930),f=r(68298),p=r(61956),m=r(69622),g=r(4576),y=r(32587),_=r(44794),b=r(19419),v=r(69397),x=r(24326);function w(e=""){return`${e}${(0,x.c)()}`}r(37539),new Float64Array(3);class S{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=w(`featureDataSubset-${e.id}-`)}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+v.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let n=0;n<r.length;++n)r[n]=t[e[n]];return new S(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let n=0;n<t;++n)this.getEnabled(n)&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class A{constructor(e){this._tile=e,this.id=w(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get featureCount(){return this._tile.featureCount}get usedMemory(){return v.qK+(0,v.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every((e=>e))}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new S(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const n of this._allFeatureIndices())t[n]&&e.has(this.getObjectId(n))&&r.push(n);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:n}=this;for(const i of t)e[r++]=Number(n[i]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let C=class extends m.A{constructor(e){super(e),this._updatingCount=0,this.extent=null,this._tileHandles=new y.A,this._wanted=new y.A}destroy(){for(const e of this._tileHandles.values())e.abort();this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updatingCount>0}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,b.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted;for(const r of this._tileHandles.values())t.has(r.id)&&!O(r)&&e.push(r);return e}async onTileTreeChange(e){++this._updatingCount;try{const{added:t,removed:r}=e,n=this._tileHandles,{_boundingRect:i}=this,s=null!=i?t.filter((e=>(0,b.HY)(i,e.extent))):t,a=this._wanted,o=new Array;for(const e of r){const{id:r}=e;if(a.delete(r),t.some((t=>I(t,e)||I(e,t))))continue;const i=n.get(r);null!=i&&o.push(this._removeTile(i))}for(const e of s)a.set(e.id,e),o.push(this._addTile(e));await Promise.allSettled(o)}finally{--this._updatingCount}}async _removeTile(e){this._tileHandles.delete(e.id),this._validate(),e.abort();const{featureData:t}=e,r=new R(e.untilSettled(),null!=t?this.createRemoveFeatureDataCommand(t.id):null);e.nextEvent=null;const{command:n}=await r.getCommand();n?.execute()}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r)return!O(r)||r.featureData.isFullyEnabled||(r.featureData.enableAll(),r.nextEvent=this._onTileLoad(r)),void await r.untilSettled();const n=new T(e);this._tileHandles.set(n.id,n);const i=this.loadTile(e,n.signal);n.nextEvent=i;const a=await i;if(n.aborted)throw(0,s.NK)();n.featureData=new A(a),function(e){if(!O(e))throw new Error}(n),n.nextEvent=this._onTileLoad(n),await n.untilSettled()}async _onTileLoad(e){const{_wanted:t,_tileHandles:r,_missingTiles:n}=this,i=e.descriptor,s=new Array,a=new Array,o=new Set;for(const l of r.values()){if(l===e)continue;const{descriptor:c,id:d}=l;if(t.has(d)||n.some((({descriptor:e})=>I(e,c)||I(c,e)))){if(O(l)){if(I(i,c)){const e=l.featureData;for(const t of e.objectIds())o.add(t)}if(I(c,i)){const t=e.featureData,r=new Set(t.objectIds()),{featureData:n}=l;n.disableObjectIds(r);const i=AbortSignal.any([l.signal,e.signal]),o=l.untilSettled();s.push(new R(o,this.createUpdateFeatureDataVisibilityCommand(n),i)),a.push(l),this._validateRemoval(n,r)}}}else{l.abort(),r.delete(d);const{featureData:e}=l;null!=e&&s.push(new R(l.untilSettled(),this.createRemoveFeatureDataCommand(e.id))),l.nextEvent=null}}o.size>0&&(e.featureData.disableObjectIds(o),this._validateRemoval(e.featureData,o)),this._validate(),s.push(new R(e.untilSettled(),this.createAddFeatureDataCommand(e.featureData,e.signal),e.signal)),a.push(e);const l=this._joinCommands(s);for(const e of a)e.nextEvent=l;await l}async _joinCommands(e){const t=(await Promise.allSettled(e.map((async e=>e.getCommand())))).map((e=>"fulfilled"!==e.status||e.value.signal?.aborted?null:e.value.command)).filter(g.Ru);0!==t.length&&t.reduce(((e,t)=>(e.append(t),e))).execute()}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!O(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:n}=e[t];for(let i=t+1;i<e.length;++i){const{featureData:t,objectIds:s}=e[i];for(const e of s)if(n.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function I({lij:[e,t,r]},{lij:[n,i,s]}){const a=n-e;return a>=0&&t===i>>a&&r===s>>a}(0,n._)([(0,o.MZ)()],C.prototype,"updating",null),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"loadTile",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createAddFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createRemoveFeatureDataCommand",void 0),(0,n._)([(0,o.MZ)({constructOnly:!0})],C.prototype,"createUpdateFeatureDataVisibilityCommand",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_updatingCount",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"extent",void 0),(0,n._)([(0,o.MZ)()],C.prototype,"_boundingRect",null),(0,n._)([(0,o.MZ)()],C.prototype,"_missingTiles",null),C=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],C);class T{constructor(e){this.descriptor=e,this._controller=new AbortController,this._featureData=(0,_.v)(null),this.nextEvent=null}get id(){return this.descriptor.id}get featureData(){return this._featureData.value}set featureData(e){this._featureData.value=e}get signal(){return this._controller.signal}abort(){this._controller.abort()}get aborted(){return this._controller.signal.aborted}async untilSettled(){try{await this.nextEvent}catch(e){(0,s.zf)(e)||console.error(e)}}}function O(e){return null!=e.featureData}class R{constructor(e,t,r){this.previousEventSettled=e,this.commandPromise=t,this.signal=r}async getCommand(){const{previousEventSettled:e,commandPromise:t,signal:r}=this,[n]=await Promise.all([t,e]);if(r?.aborted)throw(0,s.NK)();return{command:n,signal:r}}}var M=r(75503),E=r(27647),P=r(92722);class z{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return v.qK+v.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new F(this._index,this._view,e)}}class F extends z{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,E.Q)(new P.A,this._geometryOverride,e.hasZ,e.hasM)}}class D{constructor(e,t){this.featureData=e,this.bounds=t}}class B{constructor(){this._tileBounds=new Map,this.events=new i.A,this.featureAdapter=j.shared}get usedMemory(){return v.qK+v.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new M.w(9,(t=>e.getBounds(t))),n=new Array;for(let e=0;e<t;++e)n[e]=e;r.load(n),this._tileBounds.set(e.id,new D(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all((r=>{t.getEnabled(r)&&e(new z(r,t))}))}forEachInBounds(e,t){V.minX=e[0],V.minY=e[1],V.maxX=e[2],V.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(V,(r=>{e.getEnabled(r)&&t(new z(r,e))}))}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:a,maxX:o,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,a),n=Math.min(n,o),i=Math.min(i,l)}return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:e}}}class j{static{this.shared=new j}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const V=new M.E;var U=r(80893);class k{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const n=v.ez+t.reduce(((e,{usedMemory:t})=>e+t),0),i=3*v.RS;this.usedMemory=v.qK+n+i,this.featureCount=t.reduce(((e,t)=>e+t.featureCount),0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttribute(n,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(n,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:n,featurePageIndex:i}=this._translateIndex(e);this._pages[n].getCoordinates(i,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:n}=this._translateIndex(e);return this._pages[r].getCentroid(n,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getObjectIdsArray(e,i,n);return n}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let n=r;for(const{page:r,indices:i}of this._batchPageIndices(t))n=r.getCoordinatesArray(e,i,n);return n}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,n=new Array;for(const i of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(i);r!==e&&(0!==n.length&&t.push({pageIndex:r,indices:n}),r=e,n=[]),n.push(s)}0!==n.length&&t.push({pageIndex:r,indices:n})}const{_pages:r}=this;for(const{pageIndex:e,indices:n}of t)yield{page:r[e],indices:n}}}var N=r(49186),L=r(51624),q=r(51850),H=r(70328),G=r(62577),$=r(95466),Y=r(53655);class W{constructor(e){this._reader=new L.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return X(e.getMessage());e.skip()}Q()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:n}}=this,i=r.get(t)?.index;if(null==i)return;const s=n[e*r.fields.length+i],a=this._reader;return a.move(s),J(a)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,n=e*t.fields.length,i=this._reader,s={};for(const e of t.fields){const t=r[n+e.index];i.move(t),s[e.name]=J(i)}return s}getCoordinates(e,t,r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;n.move(s[e]),this._readCoordinates(a,o,t,r)}getOptimizedGeometry(e){const t=(0,q.vt)();return this.getCoordinates(e,t),new P.A([],t)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,K);const[n,i,s]=K,a=[n,i];return t&&(a[3]=s),r&&(a[t?4:3]=0),new P.A([],a)}getBounds(e){this.getCoordinates(e,K);const[t,r]=K,n=new M.E;return n.minX=t,n.minY=r,n.maxX=t,n.maxY=r,n}getBoundingBox(e){this.getCoordinates(e,K);const[t,r,n]=K;return(0,H.fA)(t,r,n,t,r,n)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{objectIdFieldName:i,attributeIndices:s,fieldsIndex:a}=this._index,o=a.get(i).index,l=a.fields.length;for(const i of t){const t=s[i*l+o];n.move(t),e[r++]=J(n)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const n=this._reader,{transform:i,featureIndices:s}=this._index,{scale:a,translate:o}=i;for(const i of t){const t=s[i];n.move(t),r=this._readCoordinates(a,o,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:n,fieldsIndex:i}=this._index,s=i.get(r).index,a=i.fields.length;for(const r of e){const e=n[r*a+s];t.move(e),yield J(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[n,i,s],a,o){const l=this._reader,c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),d=l.pos()+c;for(;l.pos()<d&&l.next();)3===l.tag()?(l.getUInt32(),a[o++]=n+e*l.getSInt64(),a[o++]=i+t*l.getSInt64(),a[o++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return o}}function X(e){for(;e.next();){if(1===e.tag())return Z(e.getMessage());e.skip()}Q()}function Z(e){let t,r,n=!1,i=!1,s=0;const a=new Array,o=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&Q();break;case 9:n=e.getBool()??!1;break;case 12:t=(0,G.Q1)(e.processMessage(Y.ae));break;case 13:{const t=e.processMessage(Y.cn);t.index=s++,a.push(t);break}case 15:{o.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:i=e.getBool()??!1;break;default:e.skip()}const c=new $.A(a);return null!=t&&i&&null!=r&&c.has(r)||Q(),{transform:t,exceededTransferLimit:n,fieldsIndex:c,objectIdFieldName:r,featureIndices:o,attributeIndices:l}}function Q(){const e=new N.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function J(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const K=(0,q.vt)();class ee{constructor(e,t,r,n,i){this.spatialReference=e,this.url=r,this.objectIdField=n,this.capabilities=i;const{supportsMaxRecordCountFactor:s,maxRecordCount:a}=this.capabilities.query,o=s?4:1,l=(a??8e3)*o;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=o,c.num=this._pageSize,c.outFields=[n],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:n}=this,i=(0,b.w1)(e.extent,r),a=this._baseQuery.clone();a.geometry=i;const o=new Array;let l=0,c=!1,d=1;for(;!c;){const e=[];for(let r=0;r<d;++r)e.push(this._fetchPage(a,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&o.push(e)}d=Math.min(d+1,4)}return new k(e,o,n)}async _fetchPage(e,t,r){const n=e.clone();n.start=t*this._pageSize;const i=(await(0,U.kS)(this.url,n,{signal:r})).data;return(0,s.Te)(r),new W(i)}}var te=r(58083),re=r(9093),ne=r(97146),ie=r(24151),se=r(29920),ae=r(46540),oe=r(51768),le=r(34727),ce=r(77690),de=r(29242),ue=r(37585),he=r(48163),fe=r(38954),pe=r(91829);var me=r(13030),ge=r(78662),ye=r(26857),_e=r(1843),be=r(49255),ve=r(40268),xe=r(16943),we=r(25634),Se=r(11725),Ae=r(13464),Ce=r(77194),Ie=r(620);class Te{constructor(){this.scale=0,this.factor=0,this.minScaleFactor=0}}var Oe=r(59907),Re=r(43616),Me=r(13259),Ee=r(97220),Pe=r(98958),ze=r(59643),Fe=r(33524),De=r(63907),Be=r(90644);class je extends Pe.w{constructor(e,t){super(e,t,new Ee.$(Me.H,(()=>r.e(8241).then(r.bind(r,48241))))),this.primitiveType=t.occlusionPass?De.WR.POINTS:De.WR.TRIANGLES}initializePipeline(e){const{oitPass:t,hasPolygonOffset:r,draped:n,output:i,depthTestEnabled:s,occlusionPass:a}=e,o=t===ze.Y.NONE,l=t===ze.Y.ColorAlpha,c=i===be.V.Highlight,d=s&&!n&&!l&&!a&&!c;return(0,Be.Ey)({blending:(0,be.RN)(i)?o?Be.RC:(0,Fe.ez)(t):null,depthTest:s&&!n?{func:De.MT.LEQUAL}:null,depthWrite:d?Be.Uy:null,drawBuffers:(0,Fe.m6)(t,i),colorWrite:Be.kn,polygonOffset:r?Ve:null})}}const Ve={factor:0,units:-4};var Ue=r(53466),ke=r(22911),Ne=r(51976),Le=r(35256);class qe extends Le.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.vvSize=!1,this.vvColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.objectAndLayerIdColorInstanced=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.textureCoordinateType=Ue.I.None,this.emissionSource=ke.ZX.None,this.discardInvisibleFragments=!0,this.hasVvInstancing=!1}}(0,n._)([(0,Ne.W)()],qe.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"signedDistanceFieldEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvSize",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"vvColor",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasVerticalOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasScreenSizePerspective",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasRotation",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"debugDrawLabelBorder",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"hasPolygonOffset",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"depthTestEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"pixelSnappingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"draped",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"terrainDepthTest",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"cullAboveTerrain",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occlusionPass",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"occludedFragmentFade",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"objectAndLayerIdColorInstanced",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"horizonCullingEnabled",void 0),(0,n._)([(0,Ne.W)()],qe.prototype,"isFocused",void 0);var He=r(49788);class Ge extends Se.im{constructor(e,t){super(e,mt),this.produces=new Map([[Ae.N.HUD_MATERIAL,e=>(0,be.Mb)(e)&&!this.parameters.drawAsLabel],[Ae.N.LABEL_MATERIAL,e=>(0,be.Mb)(e)&&this.parameters.drawAsLabel],[Ae.N.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[Ae.N.DRAPED_MATERIAL,e=>this.parameters.draped&&(0,be.Mb)(e)]]),this._visible=!0,this._configuration=new qe(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===Ae.N.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===Ae.N.OCCLUSION_PIXELS,(0,be.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!ye.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,n,i,s){const{options:{selectionMode:a,hud:o,excludeLabels:l},point:c,camera:d}=r,{parameters:u}=this;if(!a||!o||l&&u.isLabel||!e.visible||!c)return;const h=e.attributes.get(ae.r.FEATUREATTRIBUTE),f=null==h?null:(0,pe.ci)(h.data,ct),{scaleX:p,scaleY:m}=bt(f,u,d.pixelRatio);(0,ce.z0)(nt,t),e.attributes.has(ae.r.FEATUREATTRIBUTE)&&function(e){const t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],d=1/Math.sqrt(t*t+r*r+n*n),u=1/Math.sqrt(i*i+s*s+a*a),h=1/Math.sqrt(o*o+l*l+c*c);e[0]=t*d,e[1]=r*d,e[2]=n*d,e[3]=i*u,e[4]=s*u,e[5]=a*u,e[6]=o*h,e[7]=l*h,e[8]=c*h}(nt);const g=e.attributes.get(ae.r.POSITION),y=e.attributes.get(ae.r.SIZE),_=e.attributes.get(ae.r.NORMAL),b=e.attributes.get(ae.r.ROTATION),v=e.attributes.get(ae.r.CENTEROFFSETANDDISTANCE);(0,Ie.vA)(g.size>=3);const x=(0,Me.c)(u),w="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<g.data.length/g.size;e++){const n=e*g.size;(0,fe.i)(Ze,g.data[n],g.data[n+1],g.data[n+2]),(0,fe.t)(Ze,Ze,t),(0,fe.t)(Ze,Ze,d.viewMatrix);const i=e*v.size;if((0,fe.i)(ot,v.data[i],v.data[i+1],v.data[i+2]),!w&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}const a=e*_.size;if((0,fe.i)(Qe,_.data[a],_.data[a+1],_.data[a+2]),Ye(Qe,nt,d,dt),vt(this.parameters,Ze,dt,d,Xe),d.applyProjection(Ze,Je),Je[0]>-1){w&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*d.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*d.pixelRatio),d.unapplyProjection(Je,Ze)),Je[0]+=this.parameters.screenOffset[0]*d.pixelRatio,Je[1]+=this.parameters.screenOffset[1]*d.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]);const t=e*y.size;ft[0]=y.data[t],ft[1]=y.data[t+1],(0,Ce.MD)(ft,Xe.factor,ft);const n=ut*d.pixelRatio;let i=0;u.textureIsSignedDistanceField&&(i=Math.min(u.outlineSize,.5*ft[0])*d.pixelRatio/2),ft[0]*=p,ft[1]*=m;const a=e*b.size,o=u.rotation+b.data[a];if(We(c,Je[0],Je[1],ft,n,i,o,u,x)){const e=r.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,d.viewMatrix)),Je[0]=c[0],Je[1]=c[1],d.unprojectFromRenderScreen(Je,Ze)){const t=(0,q.vt)();(0,fe.c)(t,e.direction);const r=1/(0,fe.l)(t);(0,fe.h)(t,t,r),s((0,fe.j)(e.origin,Ze)*r,t,-1,!0,1,et)}}}}}intersectDraped(e,t,r,n,i,s){const a=e.attributes.get(ae.r.POSITION),o=e.attributes.get(ae.r.SIZE),l=e.attributes.get(ae.r.ROTATION),c=this.parameters,d=(0,Me.c)(c),u=e.attributes.get(ae.r.FEATUREATTRIBUTE),h=null==u?null:(0,pe.ci)(u.data,ct),{scaleX:f,scaleY:p}=bt(h,c,e.screenToWorldRatio),m=ht*e.screenToWorldRatio;for(let t=0;t<a.data.length/a.size;t++){const r=t*a.size,u=a.data[r],h=a.data[r+1],g=t*o.size;ft[0]=o.data[g],ft[1]=o.data[g+1];let y=0;c.textureIsSignedDistanceField&&(y=Math.min(c.outlineSize,.5*ft[0])*e.screenToWorldRatio/2),ft[0]*=f,ft[1]*=p;const _=t*l.size,b=c.rotation+l.data[_];We(n,u,h,ft,m,y,b,c,d)&&i(s.dist,s.normal,-1,!1)}}createBufferWriter(){return new _t}applyShaderOffsetsView(e,t,r,n,i,s,a){const o=Ye(t,r,i,dt);return this._applyVerticalGroundOffsetView(e,o,i,a),vt(this.parameters,a,o,i,s),this._applyPolygonOffsetView(a,o,n[3],i,a),this._applyCenterOffsetView(a,n,a),a}applyShaderOffsetsNDC(e,t,r,n,i){return this._applyCenterOffsetNDC(e,t,r,n),null!=i&&(0,fe.c)(i,n),this._applyPolygonOffsetNDC(n,t,r,n),n}_applyPolygonOffsetView(e,t,r,n,i){const s=n.aboveGround?1:-1;let a=Math.sign(r);0===a&&(a=s);const o=s*a;if(this.parameters.shaderPolygonOffset<=0)return(0,fe.c)(i,e);const l=(0,le.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/n.viewport[2];return(0,fe.h)(i,e,o>0?c:1/c),i}_applyVerticalGroundOffsetView(e,t,r,n){const i=(0,fe.l)(e),s=r.aboveGround?1:-1,a=r.computeRenderPixelSizeAtDist(i)*ve.R,o=(0,fe.h)(Ze,t.normal,s*a);return(0,fe.g)(n,e,o),n}_applyCenterOffsetView(e,t,r){const n="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,fe.c)(r,e),n&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,fe.n)(Qe,r),(0,fe.g)(r,r,(0,fe.h)(Qe,Qe,t[2])))),r}_applyCenterOffsetNDC(e,t,r,n){const i="screen"!==this.parameters.centerOffsetUnits;return n!==e&&(0,fe.c)(n,e),i||(n[0]+=t[0]/r.fullWidth*2,n[1]+=t[1]/r.fullHeight*2),n}_applyPolygonOffsetNDC(e,t,r,n){const i=this.parameters.shaderPolygonOffset;if(e!==n&&(0,fe.c)(n,e),i){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);n[2]-=(s||e)*i}return n}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,n=e[3]>=He.Q||t>=He.Q&&r[3]>=He.Q;return this._visible&&n}createGLMaterial(e){return new $e(e)}calculateRelativeScreenBounds(e,t,r=(0,b.vt)()){return function(e,t,r,n){n[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,n[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class $e extends we.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(je,e)}}function Ye(e,t,r,n){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,ce.z0)(it,t)),(0,fe.q)(n.normal,e,t),(0,fe.t)(n.normal,n.normal,r.viewInverseTransposeMatrix),n.cosAngle=(0,fe.f)(Ke,pt),n}function We(e,t,r,n,i,s,a,o,l){let c=t-i-n[0]*l[0],d=c+n[0]+2*i,u=r-i-n[1]*l[1],h=u+n[1]+2*i;const f=o.distanceFieldBoundingBox;return o.textureIsSignedDistanceField&&null!=f&&(c+=n[0]*f[0],u+=n[1]*f[1],d-=n[0]*(1-f[2]),h-=n[1]*(1-f[3]),c-=s,d+=s,u-=s,h+=s),(0,ue.hZ)(rt,t,r),(0,ue.e$)(tt,e,rt,(0,le.kU)(a)),tt[0]>c&&tt[0]<d&&tt[1]>u&&tt[1]<h}const Xe=new class{constructor(){this.factor=new Te,this.factorAlignment=new Te}},Ze=(0,q.vt)(),Qe=(0,q.vt)(),Je=(0,pe.vt)(),Ke=(0,q.vt)(),et=(0,q.vt)(),tt=(0,he.vt)(),rt=(0,he.vt)(),nt=(0,de.vt)(),it=(0,de.vt)(),st=(0,re.vt)(),at=(0,pe.vt)(),ot=(0,q.vt)(),lt=(0,q.vt)(),ct=(0,pe.vt)(),dt={normal:Ke,cosAngle:0},ut=1,ht=2,ft=(0,he.fA)(0,0),pt=(0,q.fA)(0,0,1);class mt extends we.NV{constructor(){super(...arguments),this.renderOccluded=Se.m$.Occlude,this.isDecoration=!1,this.color=(0,pe.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,he.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,pe.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,pe.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const gt=(0,_e.BP)().vec3f(ae.r.POSITION).vec3f(ae.r.NORMAL).vec2i16(ae.r.UVI).vec4u8(ae.r.COLOR).vec2f(ae.r.SIZE).f32(ae.r.ROTATION).vec4f(ae.r.CENTEROFFSETANDDISTANCE).vec4f(ae.r.FEATUREATTRIBUTE),yt=gt.clone().vec4u8(ae.r.OLIDCOLOR);class _t{constructor(){this.vertexBufferLayout=(0,xe.E)()?yt:gt}elementCount(e){return 6*e.get(ae.r.POSITION).indices.length}write(e,t,r,n,i,s){const{position:a,normal:o,uvi:l,color:c,size:d,rotation:u,centerOffsetAndDistance:h,featureAttribute:f}=i;(0,Oe.Hk)(r.get(ae.r.POSITION),e,a,s,6),(0,Oe.p1)(r.get(ae.r.NORMAL),t,o,s,6);const p=r.get(ae.r.UVI)?.data;let m=0,g=0,y=-1-Me.f,_=-1-Me.f;p&&p.length>=4&&(m=p[0],g=p[1],y=-1-p[2],_=-1-p[3]);let b=r.get(ae.r.POSITION).indices.length,v=s;for(let e=0;e<b;++e)l.set(v,0,m),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,g),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,y),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,_),v++,l.set(v,0,m),l.set(v,1,g),v++;(0,Oe.tb)(r.get(ae.r.COLOR),4,c,s,6);const{data:x,indices:w}=r.get(ae.r.SIZE);b=w.length,v=s;for(let e=0;e<b;++e){const t=x[2*w[e]],r=x[2*w[e]+1];for(let e=0;e<6;++e)d.set(v,0,t),d.set(v,1,r),v++}if((0,Oe.uO)(r.get(ae.r.ROTATION),u,s,6),r.get(ae.r.CENTEROFFSETANDDISTANCE)?(0,Oe.Ut)(r.get(ae.r.CENTEROFFSETANDDISTANCE),h,s,6):(0,Oe.Pq)(h,s,6*b),r.get(ae.r.FEATUREATTRIBUTE)?(0,Oe.Ut)(r.get(ae.r.FEATUREATTRIBUTE),f,s,6):(0,Oe.Pq)(f,s,6*b),null!=n){const e=r.get(ae.r.POSITION)?.indices;if(e){const t=e.length,r=i.getField(ae.r.OLIDCOLOR,me.XP);(0,Oe.vx)(n,r,t,s,6)}}return{numVerticesPerItem:6,numItems:b}}intersect(e,t,r,n,i,s,a){const{options:{selectionMode:o,hud:l,excludeLabels:c},point:d,camera:u}=n;if(!o||!l||c&&t.isLabel||!d)return;const h=this.vertexBufferLayout.createView(e),f=h.getField(ae.r.POSITION,me.xs),p=h.getField(ae.r.NORMAL,me.xs),m=h.getField(ae.r.ROTATION,me.Y$),g=h.getField(ae.r.SIZE,me.gH),y=h.getField(ae.r.FEATUREATTRIBUTE,me.Eq),_=h.getField(ae.r.CENTEROFFSETANDDISTANCE,me.Eq),b="screen"===t.centerOffsetUnits,v=(0,Me.c)(t);if(null==f||null==p||null==m||null==g||null==_)return;const x=null==y?null:y.getVec(0,ct),{scaleX:w,scaleY:S}=bt(x,t,u.pixelRatio),A=f.count/6;for(let e=0;e<A;e++){const i=6*e;if(f.getVec(i,Ze),null!=r&&(0,fe.g)(Ze,Ze,r),(0,fe.t)(Ze,Ze,u.viewMatrix),_.getVec(i,at),(0,fe.i)(ot,at[0],at[1],at[2]),!b&&(Ze[0]+=ot[0],Ze[1]+=ot[1],0!==ot[2])){const e=ot[2];(0,fe.n)(ot,Ze),(0,fe.d)(Ze,Ze,(0,fe.h)(ot,ot,e))}if(p.getVec(i,Qe),Ye(Qe,nt,u,dt),vt(t,Ze,dt,u,Xe),u.applyProjection(Ze,Je),Je[0]>-1){b&&(ot[0]||ot[1])&&(Je[0]+=ot[0]*u.pixelRatio,0!==ot[1]&&(Je[1]+=(0,Ce.m0)(ot[1],Xe.factorAlignment)*u.pixelRatio),u.unapplyProjection(Je,Ze)),Je[0]+=t.screenOffset[0]*u.pixelRatio,Je[1]+=t.screenOffset[1]*u.pixelRatio,Je[0]=Math.floor(Je[0]),Je[1]=Math.floor(Je[1]),g.getVec(i,ft),(0,Ce.MD)(ft,Xe.factor,ft);const r=ut*u.pixelRatio;let s=0;t.textureIsSignedDistanceField&&(s=Math.min(t.outlineSize,.5*ft[0])*u.pixelRatio/2),ft[0]*=w,ft[1]*=S;const o=m.get(i),l=t.rotation+o;if(We(d,Je[0],Je[1],ft,r,s,l,t,v)){const t=n.ray;if((0,fe.t)(et,Ze,(0,te.B8)(st,u.viewMatrix)),Je[0]=d[0],Je[1]=d[1],u.unprojectFromRenderScreen(Je,Ze)){const r=(0,q.vt)();(0,fe.c)(r,t.direction);const n=1/(0,fe.l)(r);(0,fe.h)(r,r,n),a((0,fe.j)(t.origin,Ze)*n,r,e,!0,1,et)}}}}}}function bt(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,ge.VC)(lt,t,e),{scaleX:lt[0]*r,scaleY:lt[1]*r})}function vt(e,t,r,n,i){if(!e.verticalOffset?.screenLength)return e.screenSizePerspective||e.screenSizePerspectiveAlignment?xt(e,i,(0,fe.l)(t),r.cosAngle):(i.factor.scale=1,i.factorAlignment.scale=1),t;const s=(0,fe.l)(t),a=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=(0,Re.kE)(n,s,e.verticalOffset,r.cosAngle,a);return xt(e,i,s,r.cosAngle),(0,fe.h)(r.normal,r.normal,o),(0,fe.g)(t,t,r.normal)}function xt(e,t,r,n){null!=e.screenSizePerspective?(0,Ce.cJ)(n,r,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?(0,Ce.cJ)(n,r,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}class wt{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this._sharedTextures=new Map,this.globalViewingMode=e===ie.RT.Global}createRenderCommandBuffer(){return{commands:[],transferList:[]}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async getOrCreateSharedTexture(e,t){const{data:r,parameters:n}=t(),i=await this._mainThreadDelegate.createTexture(r,n);return this._sharedTextures.set(e,i),i}async releaseSharedTexture(e){const t=this._sharedTextures,r=t.get(e);null!=r&&(t.delete(e),await this._mainThreadDelegate.releaseTexture(r))}async createMaterial(e){const{type:t,parameters:r}=e,n=w("material");let i,s;switch(t){case"default":i=new oe.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,materialId:n,parameters:e.parameters};break;case"hud":i=new Ge(r,this.globalViewingMode),s={type:t,materialId:n,parameters:e.parameters}}return this._bufferWriters.set(n,i.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),n}updateMaterial(e){return{commands:[{...e,id:"update-material"}],transferList:[]}}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}addDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.addDirectRendererGeometryBuffer(n,e,i,s,r)}updateDirectRendererGeometry(e,t,r){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:i,renderGeometryBufferItems:s}=this.createRenderGeometryBuffer(t,r);return this.updateDirectRendererGeometryBuffer(n,e,i,s,r)}addDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,n,i){const{objectIds:s,visibilities:a}=n;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:n,localOrigin:i}],transferList:[r.data,s.buffer,a.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=w("lod-renderer"),r=new Set,n={levels:e.levels.map((e=>({components:e.components.map((e=>{const t=e.attributes.get(ae.r.POSITION);if(!t||0===t.indices.length)throw new Error("positions attribute expected");const n=(0,ne.tM)(t.indices.length/3),i=new se.j(n,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:i.bbMax,bbMin:i.bbMin}}})),minScreenSpaceRadius:e.minScreenSpaceRadius})))};return await this._mainThreadDelegate.createLodRenderer(t,n,Array.from(r)),t}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t){const{materialId:r,visibilities:n,objectIds:i}=e,s=this._bufferWriters.get(r);if(null==s)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,te.C)(St,e.transformation),St[12]-=t[0],St[13]-=t[1],St[14]-=t[2],a=St;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let o=null;a&&((0,te.B8)(At,St),(0,te.mg)(At,At),o=At);const l=e.attributes,c=s.elementCount(l),d=s.vertexBufferLayout.stride/4;c>Math.floor(Ct/d)&&console.warn("geometry with very large number of elements encountered");const u=s.vertexBufferLayout.createBuffer(c),h=s.write(a,o,l,e.objectAndLayerIdColor,u,0);if(null==h)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==h.numItems||i.length!==h.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:u.buffer,elementCount:c},renderGeometryBufferItems:{objectIds:i,visibilities:n,ranges:{numVertices:h.numVerticesPerItem,numItems:h.numItems}}}}}const St=(0,re.vt)(),At=(0,re.vt)(),Ct=4194304;class It{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}}var Tt=r(9762),Ot=r(27993);function Rt(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function Mt(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function Et(e,t){const r=t.viewSpatialReference,n=t.renderSpatialReference,{extent:i}=e,s=(0,b.gX)(i),a=(0,q.vt)();return(0,Ot.F)([s[0],s[1],0],r,a,n),a}var Pt=r(48353),zt=r(8887),Ft=r(83047);function Dt(e){const t=new Map;for(const[r,n]of e)t.set(r,{...n,indices:(0,ne.Dg)(n.indices)});return t}r(87317),r(12359),r(95108),r(27615),r(52106),r(4718),r(34275),r(65864);var Bt,jt,Vt=r(57917),Ut=r(72385),kt=(r(4197),r(11868)),Nt=r(240),Lt=(r(71351),r(46610));(jt=Bt||(Bt={})).length=function(e,t){const r=e[t],n=e[t+1],i=e[t+2];return Math.sqrt(r*r+n*n+i*i)},jt.normalize=function(e,t){const r=e[t],n=e[t+1],i=e[t+2],s=1/Math.sqrt(r*r+n*n+i*i);e[t]*=s,e[t+1]*=s,e[t+2]*=s},jt.scale=function(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r},jt.add=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]+r[n],i[s+1]=e[t+1]+r[n+1],i[s+2]=e[t+2]+r[n+2]},jt.subtract=function(e,t,r,n,i,s=t){(i=i||e)[s]=e[t]-r[n],i[s+1]=e[t+1]-r[n+1],i[s+2]=e[t+2]-r[n+2]},r(87170),r(75039);const qt=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)qt[6*e+t]=e;const Ht=new Array(36);for(let e=0;e<6;e++)Ht[6*e]=0,Ht[6*e+1]=1,Ht[6*e+2]=2,Ht[6*e+3]=2,Ht[6*e+4]=3,Ht[6*e+5]=0;const Gt=(0,Ut.fA)(-.5,0,-.5),$t=(0,Ut.fA)(.5,0,-.5),Yt=(0,Ut.fA)(0,0,.5),Wt=(0,Ut.fA)(0,.5,0),Xt=(0,Ut.vt)(),Zt=(0,Ut.vt)(),Qt=(0,Ut.vt)(),Jt=(0,Ut.vt)(),Kt=(0,Ut.vt)();function er(e,t){switch(e){case"cone":return((e,r,n=!1)=>({levels:e.map((e=>{const i=Dt(r(e.tesselation));return n&&function(e){const t=e,r=t.get(ae.r.POSITION).data,n=t.get(ae.r.NORMAL).data;if(n){const t=tr(e,ae.r.NORMAL).data;for(let e=0;e<n.length;e+=3){const r=n[e+1];t[e+1]=-n[e+2],t[e+2]=r}}if(r){const t=tr(e,ae.r.POSITION).data;for(let e=0;e<r.length;e+=3){const n=r[e+1];t[e+1]=-r[e+2],t[e+2]=n}}}(i),{components:[{attributes:i,objectAndLayerIdColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}}))}))(rr,(e=>function(e,t,r,n,i=!0,s=!0){let a=0;const o=t,l=e;let c=(0,Ut.fA)(0,a,0),d=(0,Ut.fA)(0,a+l,0),u=(0,Ut.fA)(0,-1,0),h=(0,Ut.fA)(0,1,0);n&&(a=l,d=(0,Ut.fA)(0,0,0),c=(0,Ut.fA)(0,a,0),u=(0,Ut.fA)(0,1,0),h=(0,Ut.fA)(0,-1,0));const f=[d,c],p=[u,h],m=r+2,g=Math.sqrt(l*l+o*o);if(n)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),n=(0,Ut.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,Ut.fA)(l*Math.cos(t)/g,-o/g,l*Math.sin(t)/g);p.push(i)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),n=(0,Ut.fA)(Math.cos(t)*o,a,Math.sin(t)*o);f.push(n);const i=(0,Ut.fA)(l*Math.cos(t)/g,o/g,l*Math.sin(t)/g);p.push(i)}const y=new Array,_=new Array;if(i){for(let e=3;e<f.length;e++)y.push(1),y.push(e-1),y.push(e),_.push(0),_.push(0),_.push(0);y.push(f.length-1),y.push(2),y.push(1),_.push(0),_.push(0),_.push(0)}if(s){for(let e=3;e<f.length;e++)y.push(e),y.push(e-1),y.push(0),_.push(e),_.push(e-1),_.push(1);y.push(0),y.push(2),y.push(f.length-1),_.push(1),_.push(2),_.push(p.length-1)}const b=(0,kt.oe)(3*m);for(let e=0;e<m;e++)b[3*e]=f[e][0],b[3*e+1]=f[e][1],b[3*e+2]=f[e][2];const v=(0,kt.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[[ae.r.POSITION,new Lt.n(b,y,3,!0)],[ae.r.NORMAL,new Lt.n(v,_,3,!0)]]}(1,.5,e,!1)),!0);case"sphere":case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function tr(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Vt.S)(r.data)},e.set(t,r)),r}(0,fe.d)(Xt,Gt,Wt),(0,fe.d)(Zt,Gt,$t),(0,fe.e)(Qt,Xt,Zt),(0,fe.n)(Qt,Qt),(0,fe.d)(Xt,$t,Wt),(0,fe.d)(Zt,$t,Yt),(0,fe.e)(Jt,Xt,Zt),(0,fe.n)(Jt,Jt),(0,fe.d)(Xt,Yt,Wt),(0,fe.d)(Zt,Yt,Gt),(0,fe.e)(Kt,Xt,Zt),(0,fe.n)(Kt,Kt),Qt[0],Qt[1],Qt[2],Jt[0],Jt[1],Jt[2],Kt[0],Kt[1],Kt[2],(0,q.vt)();const rr=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var nr=r(74810);class ir{constructor(e){this._context=e,this.lodRendererId=null,this._loaded=!1,this._loadingPromise=null,this._primitive="cone",this._primitiveMaterialId=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t={usePBR:!0,isSchematic:!0,mrrFactors:nr.Bt,ambient:q.Un,diffuse:q.Un,hasSlicePlane:!1,castShadows:!0,offsetTransparentBackfaces:!1,screenSizePerspective:{}};t.externalColor=pe.Un,t.isInstanced=!0;const r=await e.createMaterial({type:"default",parameters:t}),n=er(this._primitive,r);this.lodRendererId=await e.createLodRenderer(n),this._primitiveMaterialId=r,this._loaded=!0}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:n}=t;if(null==this.lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:i}=e;if(0===i)return r.createRenderCommandBuffer();const s=(0,H.vt)((0,zt.Fq)(this._primitive)),a=(0,q.ci)((0,H.Ej)(s)),o=(0,q.ci)((0,zt.Bb)(a,{isPrimitive:!0,width:100,depth:null,height:null})),l=new Float64Array(16*i),c=new Float64Array(16*i),d=Mt(e),u=await n.applyElevationAlignmentTo(d);for(let e=0;e<i;++e){const t=e,r=u[3*e+0],n=u[3*e+1],i=u[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or),d=this._computeLocalTransform(o,a,ar);this._writeMatrixToTypedBuffer(l,t,d),this._writeMatrixToTypedBuffer(c,t,s)}const h=Rt(e),f=new Uint8Array(i);e.getVisibilityArray(f);const p={featureIds:new Uint32Array(h),visibility:f,localTransforms:l,globalTransforms:c};return r.addLodInstances(this.lodRendererId,e.id,p)}async createRemoveCommand(e){const{_context:t,lodRendererId:r}=this,n=t.renderCommandContext;return null==r?n.createRenderCommandBuffer():n.removeLodInstances(r,e)}async createUpdateVisibilityCommand(e){const{lodRendererId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateLayerOpacityCommand(e){const{_context:t}=this,r=t.renderCommandContext,n=this._primitiveMaterialId;return null==n?r.createRenderCommandBuffer():r.updateMaterial({type:"default",materialId:n,parameters:{opacity:e}})}async createUpdateElevationCommand(e){const{_context:t,lodRendererId:r}=this,{renderCommandContext:n,mainThreadDelegate:i}=t,{featureCount:s,id:a}=e;if(null==r||0===s)return n.createRenderCommandBuffer();const o=new Float64Array(16*s),l=Mt(e),c=await i.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],n=c[3*e+1],i=c[3*e+2],s=this._computeGlobalTransform(r,n,i,this._context.viewSpatialReference,or);this._writeMatrixToTypedBuffer(o,t,s)}return n.updateLodInstancesData(r,a,o)}_writeMatrixToTypedBuffer(e,t,r){let n=16*t;for(let t=0;t<16;t++)e[n++]=r[t]}_computeGlobalTransform(e,t,r,n,i){return sr[0]=e,sr[1]=t,sr[2]=r,(0,Pt.l)(n,sr,i,this._context.renderSpatialReference),i}_computeLocalTransform(e,t,r){return(0,te.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const n=function(e=q.Un,t,r,n=1){const i=new Array(3);if(null==t||null==r)i[0]=1,i[1]=1,i[2]=1;else{let n,s=0;for(let a=2;a>=0;a--){const o=e[a],l=null!=o,c=0===a&&!n&&!l,d=r[a];let u;"symbol-value"===o||c?u=0!==d?t[a]/d:1:l&&"proportional"!==o&&isFinite(o)&&(u=0!==d?o/d:1),null!=u&&(i[a]=u,n=u,s=Math.max(s,Math.abs(u)))}for(let e=2;e>=0;e--)null==i[e]?i[e]=n:0===i[e]&&(i[e]=.001*s)}for(let e=2;e>=0;e--)i[e]/=n;return(0,q.ci)(i)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===n[0]&&1===n[1]&&1===n[2]||(0,te.hs)(r,r,n)}}const sr=(0,q.vt)(),ar=(0,re.vt)(),or=(0,re.vt)();var lr=r(97768);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const cr=[];{const e=16;for(let t=0;t<360;t+=360/e)cr.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}var dr,ur;(ur=dr||(dr={}))[ur.Left=0]="Left",ur[ur.Center=1]="Center",ur[ur.Right=2]="Right",Object.freeze({left:0,center:.5,right:1});const hr=Object.freeze({"bottom-left":(0,he.fA)(0,0),bottom:(0,he.fA)(.5,0),"bottom-right":(0,he.fA)(1,0),left:(0,he.fA)(0,.5),center:(0,he.fA)(.5,.5),right:(0,he.fA)(1,.5),"top-left":(0,he.fA)(0,1),top:(0,he.fA)(.5,1),"top-right":(0,he.fA)(1,1)});var fr=r(40804);r(31006);const pr=(0,pe.CN)(.25,.25,.75,.75);function mr(e){return"cross"===e||"x"===e}function gr(e,t=128,r=.5*t,n=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return xr(e,br(r,r,t/2))}(t,r);case"square":return function(e,t){return yr(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return _r(e,t,!1,r)}(t,r,n);case"x":return function(e,t,r=0){return _r(e,t,!0,r)}(t,r,n);case"kite":return function(e,t){return yr(e,t,!0)}(t,r);case"triangle":return function(e,t){return xr(e,vr(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,n=t/2,i=e/2,s=.8*r,a=br(i,(e-t)/2-s,Math.sqrt(s*s+n*n)),o=vr(i,r,n);return xr(e,((e,t)=>Math.max(o(e,t),-a(e,t))))}(t,r)}}function yr(e,t,r){return r&&(t/=Math.SQRT2),xr(e,((n,i)=>{let s=n-.5*e+.25,a=.5*e-i-.75;if(r){const e=(s+a)/Math.SQRT2;a=(a-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(a))-.5*t}))}function _r(e,t,r,n=0){t-=n,r&&(t*=Math.SQRT2);const i=.5*t;return xr(e,((t,s)=>{let a,o=t-.5*e,l=.5*e-s-1;if(r){const e=(o+l)/Math.SQRT2;l=(l-o)/Math.SQRT2,o=e}return o=Math.abs(o),l=Math.abs(l),a=o>l?o>i?Math.sqrt((o-i)*(o-i)+l*l):l:l>i?Math.sqrt(o*o+(l-i)*(l-i)):o,a-=n/2,a}))}function br(e,t,r){return(n,i)=>{const s=n-e,a=i-t;return Math.sqrt(s*s+a*a)-r}}function vr(e,t,r){const n=Math.sqrt(t*t+r*r);return(i,s)=>{const a=Math.abs(i-e)-r,o=s-e+t/2+.75,l=(t*a+r*o)/n,c=-o;return Math.max(l,c)}}function xr(e,t){const r=new Uint8Array(4*e*e);for(let n=0;n<e;n++)for(let i=0;i<e;i++){const s=i+e*n;let a=t(i,n);a=a/e+.5,(0,fr.U)(a,r,4*s)}return r}class wr{constructor(e){this._context=e,this.materialId=null,this._loaded=!1,this._loadingPromise=null,this._iconTexture=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}destroy(){this._iconTexture=(0,lr.xt)(this._iconTexture)}async _load(){const e=this._context.renderCommandContext,t=await e.getOrCreateSharedTexture("circle-icon",(()=>function(e,t=128,r=.5*t,n=0){return{data:gr(e,t,r,n),parameters:{mipmap:!1,wrap:{s:De.pF.CLAMP_TO_EDGE,t:De.pF.CLAMP_TO_EDGE},width:t,height:t,components:4,noUnpackFlip:!0,reloadable:!0}}}("circle")));this._iconTexture={remove:()=>e.releaseSharedTexture("circle-icon")};const r={anchorPosition:hr.center,occlusionTest:!0,hasSlicePlane:!1,color:[1,0,0,1],outlineColor:[0,0,0,1],outlineSize:1,distanceFieldBoundingBox:pr,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:mr("circle")};this.materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this.materialId),this._loaded=!0}async createAddCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r;if(null==t)throw new Error("expected material not to be null");const i=await this._createGeometry(e);if(null==i)return n.createRenderCommandBuffer();const s=Et(e,r);return n.addDirectRendererGeometry(e.id,i,s)}async _createGeometry(e){const{materialId:t,_context:r}=this,{mainThreadDelegate:n}=r,{featureCount:i}=e;if(0===i||null==t)return null;const s=Rt(e),a=Mt(e),o=function(e,t){const r=e.length/3,n=t.viewSpatialReference,i=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,Tt.projectBuffer)(e,n,0,s,i,0,r))throw new Error("Failed to project coordinates");return s}(await n.applyElevationAlignmentTo(a),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),d=new Float64Array([24,24]),u=new Float64Array([0,0,0,1]),h=new Float64Array([0,0]),f=new Float64Array([0]),p=new Uint32Array(i);for(let e=0;e<i;++e)p[e]=e;const m=new Uint32Array(i);for(let e=0;e<i;++e)m[e]=0;const g=new Lt.n(o,p,3,!0),y=new Lt.n(l,m,3,!0),_=new Lt.n(h,m,2,!0),b=new Lt.n(c,m,4,!0),v=new Lt.n(f,m,1,!0),x=new Lt.n(d,m,2,!0),w=new Lt.n(u,m,4,!0),S=[[ae.r.POSITION,g],[ae.r.NORMAL,y],[ae.r.UV0,_],[ae.r.COLOR,b],[ae.r.ROTATION,v],[ae.r.SIZE,x],[ae.r.CENTEROFFSETANDDISTANCE,w]],A=new Uint8Array(i);return e.getVisibilityArray(A),{attributes:Dt(S),objectAndLayerIdColor:void 0,transformation:(0,re.vt)(),materialId:t,objectIds:s,visibilities:A}}async createRemoveCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;return null==t?n.createRenderCommandBuffer():n.removeDirectRendererGeometryBuffer(t,e)}async createUpdateVisibilityCommand(e){const{materialId:t,_context:r}=this,n=r.renderCommandContext;if(null==t)return n.createRenderCommandBuffer();const i=new Uint8Array(e.featureCount);return e.getVisibilityArray(i),n.updateVisibility(t,e.id,i)}async createUpdateLayerOpacityCommand(e){const{_context:t}=this;return t.renderCommandContext.createRenderCommandBuffer()}async createUpdateElevationCommand(e){const{materialId:t,_context:r}=this,{renderCommandContext:n}=r,{featureCount:i,id:s}=e;if(null==t||0===i)return n.createRenderCommandBuffer();const a=await this._createGeometry(e);if(null==a)return n.createRenderCommandBuffer();const o=Et(e,r);return n.updateDirectRendererGeometry(s,a,o)}}class Sr{constructor(e){this._symbols=new Array,this._featureDataPartitioning=new Map,this._context=e}async load(){this._symbols[0]=new wr(this._context),this._symbols[1]=new ir(this._context)}async createAddCommand(e){const t=this._partition(e),r=await Promise.all(t.map((async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))}))),n=this._context.renderCommandContext;return new It(n,n.mergeRenderCommandBuffers(r),[()=>{this._featureDataPartitioning.set(e.id,t)}])}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})));return new It(n,n.mergeRenderCommandBuffers(s),[()=>{t.delete(e)}])}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,n=r.renderCommandContext,i=t.get(e.id);if(null==i)return new It(n,n.createRenderCommandBuffer(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))})));return new It(n,n.mergeRenderCommandBuffers(s),[])}async createUpdateLayerOpacityCommand(e){const t=this._context.renderCommandContext,r=[];for(let t=0;t<this._symbols.length;++t){const n=this._symbols[t];null!=n&&n.loaded&&r.push(n.createUpdateLayerOpacityCommand(e))}const n=await Promise.all(r);return new It(t,t.mergeRenderCommandBuffers(n),[])}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=t.renderCommandContext,n=[];for(const t of e.values()){const e=t.map((async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))}));n.push(...e)}const i=await Promise.all(n);return new It(r,r.mergeRenderCommandBuffers(i),[])}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=Rt(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,n=[[],[]];for(let e=0;e<r;++e)n[t[e]%2].push(e);return n.map(((t,r)=>new Ar(r,e.subset(new Uint32Array(t))))).filter((e=>e.features.featureCount>0))}}class Ar{constructor(e,t){this.index=e,this.features=t}}var Cr=r(73941),Ir=r(98764),Tr=r(65806);const Or=(0,q.vt)();var Rr=r(88582),Mr=r(17352),Er=r(97937);function Pr(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const zr=2**50;function Fr(e,t,r,n){return e.operations.setAltitudeAt(e.value,t,r,n)}function Dr(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Br=(0,q.vt)();(0,q.vt)();var jr=r(44280),Vr=r(32114);function Ur(e){return"point"===e.type}class kr{constructor(e,t,r,n){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=n,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(n),this.referenceEllipsoid=(0,Cr.tO)(t),this.sphericalPCPF=(0,Ir.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return function(e,t){return e.operations.getExtent(e.value,t),t}(this._coordinateSystem,(0,b.vt)())}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Fr(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){!function(e,t,r,n){t!==n&&(0,te.C)(n,t),(0,fe.i)(Br,n[12],n[13],n[14]),Fr(e,Br,r,Br),n[12]=Br[0],n[13]=Br[1],n[14]=Br[2]}(this._coordinateSystem,t,e,t)}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,Rr._.Z,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,n){return e.operations.axisAt(e.value,t,r,n)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,Rr._.X,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=this.worldBasisAtPosition(e,Rr._.Z,Vr.rq.get());return(0,te.hZ)(t,r[0],r[1],r[2],0,n[0],n[1],n[2],0,i[0],i[1],i[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,Vr.rq.get()),n=this.worldBasisAtPosition(e,Rr._.Y,Vr.rq.get()),i=(0,jr.EJ)(t,n,r);return(0,le.KJ)(i)}intersectManifoldClosestSilhouette(e,t,r){return Dr(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=Vr.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,n)?(0,fe.c)(r,n):null}intersectInfiniteManifold(e,t,r){if(this.viewingMode===ie.RT.Global)return this.intersectManifold(e,t,r);Dr(this._coordinateSystem,t,this._tmpCoordinateSystem);const n=this._tmpCoordinateSystem.value,i=Vr.rq.get();return(0,Nt.Ui)(n.plane,e,i)?(0,fe.c)(r,i):null}toRenderCoords(e,t,r){return Ur(e)?(0,Tr.g)(e,t,this.spatialReference):(0,Ot.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return Ur(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,Ot.F)(e,t,Or,r.spatialReference)&&(r.x=Or[0],r.y=Or[1],r.z=Or[2],!0)}(e,this.spatialReference,t)?t:null):(0,Ot.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case ie.RT.Local:return new kr(ie.RT.Local,t,(0,Ft.GA)(t),Pr(Mr.b,(0,Mr.f)([0,0,0],[zr,0,0],[0,zr,0])));case ie.RT.Global:return new kr(ie.RT.Global,t,1,function(e){return Pr(Er.s,(0,Er.f)(0,0,0,(0,Cr.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,Ft.KX)(e)/(0,Ft.KX)(t)}}let Nr=class extends i.A.EventedAccessor{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new B,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,baseQuery:n,url:i,objectIdField:s,capabilities:o,fieldsIndex:l,timeInfo:c,elevationInfo:m,fullExtent:g}){const y=h.A.fromJSON(e),_=h.A.fromJSON(t);this._fetcher=new ee(y,p.A.fromJSON(n),i,s,o),this._queryEngine=new f.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",objectIdField:s,fieldsIndex:l,availableFields:[s],spatialReference:e,featureStore:this._featureStore,timeInfo:c});const b={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const n={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",n,{transferList:r})},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};this._renderer=new Sr({viewSpatialReference:y,renderSpatialReference:_,renderCoordsHelper:kr.create(r,_),renderCommandContext:new wt(r,b),elevationInfo:m??{},mainThreadDelegate:b}),this._defaultQueryJSON=new p.A({outSpatialReference:y}).toJSON();let v=null;if(null!=g){const e=d.A.fromJSON(g);await(0,u.initializeProjection)(e.spatialReference,y),v=(0,u.project)(e,y)}return this._tileManager=new C({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddFeatureDataCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveFeatureDataCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateFeatureDataVisibilityCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),extent:v}),this.addHandles((0,a.wB)((()=>this.updating),(e=>{this.emit("notify-updating",{updating:e})})),a.Vh),await this._renderer.load(),qr}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async onTileTreeChange(e){return await this._tileManager.onTileTreeChange(e),qr}async onElevationChange(e){return qr}async onLayerOpacityChange(e){const t=await this._renderer.createUpdateLayerOpacityCommand(e);return await t.execute(),qr}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,n=await this._renderer.createAddCommand(e);return(0,s.Te)(t),n.appendPipelineStateCommand((()=>{r.addTile(e)})),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer,n=await r.createRemoveCommand(e);return n.appendPipelineStateCommand((()=>{t.removeTile(e)})),n}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer,n=await r.createUpdateVisibilityCommand(e);return(0,s.Te)(t),n}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,n._)([(0,o.MZ)()],Nr.prototype,"updating",null),Nr=(0,n._)([(0,c.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Nr);const Lr=Nr,qr={result:void 0}},69418:(e,t,r)=>{r.d(t,{S:()=>c,z:()=>l});var n=r(83047),i=r(21325),s=r(43334),a=r(58512),o=r(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n.G9)(this._options.sourceSpatialReference)/(0,n.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.A}}},72385:(e,t,r)=>{function n(){return new Float32Array(3)}function i(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function a(){return n()}function o(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function d(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>i,vt:()=>n});const u=a(),h=o(),f=l(),p=c(),m=d();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:u,clone:i,create:n,fromValues:s,ones:o,unitX:l,unitY:c,unitZ:d,zeros:a},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,r)=>{r.d(t,{E:()=>C,w:()=>o});var n=r(4576),i=r(21818),s=(r(44208),r(3694)),a=r(11006);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),w.prune(),S.prune(),A.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(b(e,r))for(x.clear();r;){for(let i=0,s=r.children.length;i<s;i++){const s=r.children[i],a=r.leaf?n(s):s;b(e,a)&&(r.leaf?t(s):_(e,a)?l(s,t):x.push(s))}r=x.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!b(e,t))return!1;for(x.clear();t;){for(let n=0,i=t.children.length;n<i;n++){const i=t.children[n],s=t.leaf?r(i):i;if(b(e,s)){if(t.leaf||_(e,s))return!0;x.push(i)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,a=0,o=!1;const l=this._toBBox(e);for(S.clear(),A.clear();r||S.length>0;){if(r||(r=S.pop(),s=S.data[S.length-1],a=A.pop()??0,o=!0),r.leaf&&(t=(0,n.qh)(r.children,(0,i.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),S.push(r),this._condense(S),this;o||r.leaf||!_(r,l)?s?(a++,r=s.children[a],o=!1):r=null:(S.push(r),A.push(a),a=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,n){const i=r-t+1;let s=this._maxEntries;if(i<=s){const n=new T(e.slice(t,r+1));return c(n,this._toBBox),n}n||(n=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(n-1)));const a=new O([]);a.height=n;const o=Math.ceil(i/s),l=o*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let i=t;i<=r;i+=l){const t=Math.min(i+l-1,r);v(e,i,t,o,this._compareMinY);for(let r=i;r<=t;r+=o){const i=Math.min(r+o-1,t);a.children.push(this._build(e,r,i,n-1))}}return c(a,this._toBBox),a}_insert(e,t,r){const n=this._toBBox,i=r?e:n(e);S.clear();const s=function(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,i=1/0;for(let s=0,a=t.children.length;s<a;s++){const a=t.children[s],o=p(a),l=g(e,a)-o;l<i?(i=l,n=o<n?o:n,r=a):l===i&&o<n&&(n=o,r=a)}t=r||t.children[0]}return t}(i,this._data,t,S);for(s.children.push(e),u(s,i);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,r){for(let n=r;n>=0;n--)u(t.data[n],e)}(i,S,t)}_split(e,t){const r=e.data[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const s=this._chooseSplitIndex(r,i,n);if(!s)return;const a=r.children.splice(s,r.children.length-s),o=r.leaf?new T(a):new O(a);o.height=r.height,c(r,this._toBBox),c(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new O([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,i,s;n=i=1/0;for(let a=t;a<=r-t;a++){const t=d(e,0,a,this._toBBox),o=d(e,a,r,this._toBBox),l=y(t,o),c=p(t)+p(o);l<n?(n=l,s=a,i=c<i?c:i):l===n&&c<i&&(i=c,s=a)}return s}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const i=this._toBBox,s=d(e,0,t,i),a=d(e,r-t,r,i);let o=m(s)+m(a);for(let n=t;n<r-t;n++){const t=e.children[n];u(s,e.leaf?i(t):t),o+=m(s)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];u(a,e.leaf?i(t):t),o+=m(a)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const i=e.data[t-1],s=i.children;s.splice((0,n.qh)(s,r,s.length,i.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(w.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,i.zI)(e));else w.pushArray(r.children);r=w.pop()??null}}function c(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,n,i){i||(i=new T([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,a=t;a<r;a++)s=e.children[a],u(i,e.leaf?n(s):s);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,s-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,n,i){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=n)continue;const o=r+Math.ceil((t-r)/n/2)*n;(0,a.q)(e,o,r,t,i),s.push(r,o,o,t)}}const x=new s.A,w=new s.A,S=new s.A,A=new s.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class T extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class O extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(66552),s=r(25482),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const c=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends s.A{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,o.e)(c),(0,a.MZ)({json:{write:{isRequired:!0}}})],d.prototype,"type",void 0),d=(0,n._)([(0,l.$)("esri.layers.support.Domain")],d);const u=d},79677:(e,t,r)=>{r.d(t,{A:()=>f});var n,i=r(90237),s=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),c=r(40608),d=r(43937),u=r(98623);let h=class extends s.A{static{n=this}static get allTime(){return p}static get empty(){return m}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let i=this.end;if(i){const r=(0,a.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,o;return i>=t&&i<=r?a=i:t>=i&&t<=s&&(a=t),r>=i&&r<=s?o=r:s>=t&&s<=r&&(o=s),null==a||null==o||isNaN(a)||isNaN(o)?n.empty:new n({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,r=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:o}=this;return null!=s&&(i.start=(0,a.S1)(s,e,t,r)),null!=o&&(i.end=(0,a.S1)(o,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,i._)([(0,d.K)("end")],h.prototype,"writeEnd",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,i._)([(0,d.K)("start")],h.prototype,"writeStart",null),h=n=(0,i._)([(0,c.$)("esri.time.TimeExtent")],h);const f=h,p=new h,m=new h({start:void 0,end:void 0})},80451:(e,t,r)=>{r.d(t,{rS:()=>g,gK:()=>m}),r(44208);var n,i=r(53177),s=r(76357),a=r(90237),o=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let c=class extends s.A{static{n=this}constructor(e){super(e),this.type="inherited"}clone(){return new n}};(0,a._)([(0,o.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=n=(0,a._)([(0,l.$)("esri.layers.support.InheritedDomain")],c);const d=c;var u,h=r(10107);let f=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],f.prototype,"maxValue",void 0),(0,a._)([(0,h.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],f.prototype,"minValue",void 0),(0,a._)([(0,o.e)({range:"range"})],f.prototype,"type",void 0),f=u=(0,a._)([(0,l.$)("esri.layers.support.RangeDomain")],f);const p=f,m={key:"type",base:s.A,typeMap:{range:p,"coded-value":i.A,inherited:d}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return p.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return d.fromJSON(e)}return null}},80893:(e,t,r)=>{r.d(t,{IJ:()=>p,Jf:()=>_,Pk:()=>g,eW:()=>f,gW:()=>y,kS:()=>m});var n=r(78888),i=r(84952),s=r(65864),a=r(17136),o=r(21325),l=r(10536),c=r(66208),d=r(58501);const u="Layer does not support extent calculation.";function h(e,t){const r=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const i=n;let a,l,c;if(null!=r&&(l=r.spatialReference,c=(0,o.YX)(l),i.geometryType=(0,s.$B)(r),i.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(r,e.compactGeometryEnabled),i.inSR=c),n.groupByFieldsForStatistics&&(i.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(i.objectIds=n.objectIds.join(",")),n.orderByFields&&(i.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete i.outFields:n.outFields.includes("*")?i.outFields="*":i.outFields=n.outFields.join(","),n.outSR?(i.outSR=(0,o.YX)(n.outSR),a=e.outSpatialReference):r&&(n.returnGeometry||n.returnCentroid)&&(i.outSR=i.inSR,a=l),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(i.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(i.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(i.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,i.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(i.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(i.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(i.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:r}=e;null==t&&null==r||(i.time=t===r?t:`${t??"null"},${r??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=a&&l.equals(a)&&(i.defaultSR=i.inSR,delete i.inSR,delete i.outSR),i}async function f(e,t,r,n){const i=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",n);return(0,d.q)(t,r,i.data),i}async function p(e,t,r,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:r.createFeatureResult()};const i=await m(e,t,n),s=i;return s.data=(0,c.m)(i.data,r),s}function m(e,t,r){return b(e,t,"pbf",r)}function g(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",r,{returnIdsOnly:!0})}function y(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,r){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await b(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),i=n.data;if(i.hasOwnProperty("extent"))return n;if(i.features)throw new Error(u);if(i.hasOwnProperty("count"))throw new Error(u);return n}async function b(e,t,r,s={},o={}){const c="string"==typeof e?(0,i.An)(e):e,d=t.geometry?[t.geometry]:[],u=await(0,a.el)(d,null,{signal:s.signal}),f=u?.[0];null!=f&&((t=t.clone()).geometry=f);const p=(0,l.z)({...c.query,f:r,...o,...h(t,o)});return(0,n.A)((0,i.fj)(c.path,(m=o,null==t.formatOf3DObjects||m.returnCountOnly||m.returnExtentOnly||m.returnIdsOnly?"query":"query3d")),{...s,responseType:"pbf"===r?"array-buffer":"json",query:{...p,...s.query}});var m}},95696:(e,t,r)=>{r.d(t,{A:()=>u});var n,i=r(90237),s=r(69540),a=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(40608);let d=class extends(s.A.ClonableMixin(a.A)){static{n=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new n}};(0,i._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],d.prototype,"origin",void 0),d=n=(0,i._)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],d);const u=d}}]);