@arcgis/core 4.29.0-next.20231219 → 4.29.0-next.20231221

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 (242) hide show
  1. package/analysis/Analysis.js +1 -1
  2. package/applications/WebEditor/sketchUtils.js +1 -1
  3. package/assets/components/assets/icon/hexagon16.json +1 -0
  4. package/assets/components/assets/icon/hexagon24.json +1 -0
  5. package/assets/components/assets/icon/hexagon32.json +1 -0
  6. package/assets/components/assets/icon/octagon16.json +1 -0
  7. package/assets/components/assets/icon/octagon24.json +1 -0
  8. package/assets/components/assets/icon/octagon32.json +1 -0
  9. package/assets/esri/core/libs/libtess/libtess.wasm +0 -0
  10. package/assets/esri/core/workers/RemoteClient.js +1 -1
  11. package/assets/esri/core/workers/chunks/00b340b4495bfabd4ca2.js +1 -0
  12. package/assets/esri/core/workers/chunks/{4301736368af52b94ee2.js → 02d6e2f0b1003534a077.js} +1 -1
  13. package/assets/esri/core/workers/chunks/050132142f4887c62724.js.LICENSE.txt +1 -1
  14. package/assets/esri/core/workers/chunks/0e315452f11b112523f0.js +1 -0
  15. package/assets/esri/core/workers/chunks/0f5a197f0a4b3a354bcd.js +1 -0
  16. package/assets/esri/core/workers/chunks/1187ba315883ff27e2d9.js +1 -0
  17. package/assets/esri/core/workers/chunks/1254a544d369d99ccf59.js +1 -0
  18. package/assets/esri/core/workers/chunks/138d138a5d33b2f5d8a4.js +1 -0
  19. package/assets/esri/core/workers/chunks/1a73dcbb49d17f16ed5a.js +1 -0
  20. package/assets/esri/core/workers/chunks/1c2b17d22f97d56f6212.js +1 -0
  21. package/assets/esri/core/workers/chunks/{0be38fd63e870341c660.js → 220fcc25578b2ef316da.js} +1 -1
  22. package/assets/esri/core/workers/chunks/251ceefdea4b345698a4.js +1 -0
  23. package/assets/esri/core/workers/chunks/28aafc7ea522663909b8.js +1 -0
  24. package/assets/esri/core/workers/chunks/30749bcd1a7b98a38386.js +1 -0
  25. package/assets/esri/core/workers/chunks/320a75ff760295d9af91.js +1 -0
  26. package/assets/esri/core/workers/chunks/{c9f8354d51f701cd69e5.js → 321dcff84c31c739ed93.js} +1 -1
  27. package/assets/esri/core/workers/chunks/36eb1e0471eb61a6bc38.js +1 -0
  28. package/assets/esri/core/workers/chunks/{57176c0968e07357126d.js → 3a429bb09b89e84021ab.js} +1 -1
  29. package/assets/esri/core/workers/chunks/444adb8a310024ec969c.js +1 -0
  30. package/assets/esri/core/workers/chunks/48aebd650b6eccde01f8.js.LICENSE.txt +1 -1
  31. package/assets/esri/core/workers/chunks/4f7459402b5910288ab1.js +1 -0
  32. package/assets/esri/core/workers/chunks/4fcd94fbf7c68996ad31.js +1 -0
  33. package/assets/esri/core/workers/chunks/573ad8aa1c2cfad61eb8.js +1 -0
  34. package/assets/esri/core/workers/chunks/5e12871a267742de6d22.js +1 -0
  35. package/assets/esri/core/workers/chunks/5f3104051f5267c58dda.js +2 -0
  36. package/assets/esri/core/workers/chunks/{76d0c4d6192449f22e51.js.LICENSE.txt → 5f3104051f5267c58dda.js.LICENSE.txt} +1 -1
  37. package/assets/esri/core/workers/chunks/{f350378a0d93dda39425.js → 7205c1680afee0cc0aac.js} +1 -1
  38. package/assets/esri/core/workers/chunks/77b3dff9fdcfe1222749.js +1 -0
  39. package/assets/esri/core/workers/chunks/77c29cfa3d245ff0afa0.js +1 -0
  40. package/assets/esri/core/workers/chunks/82dac92c1c611dea077f.js +1 -0
  41. package/assets/esri/core/workers/chunks/831283ac6653d7af90b6.js +1 -0
  42. package/assets/esri/core/workers/chunks/8485562b452686c6c3f2.js +1 -0
  43. package/assets/esri/core/workers/chunks/85a39b0f928f817a4b1b.js +1 -0
  44. package/assets/esri/core/workers/chunks/882fec2317740f6c118f.js +1 -0
  45. package/assets/esri/core/workers/chunks/8e1ac19a6188da157c0b.js +1 -0
  46. package/assets/esri/core/workers/chunks/8e2723dbc09400202aea.js +1 -0
  47. package/assets/esri/core/workers/chunks/{d3860693a40394723c99.js → 9249371cb2437e68a304.js} +1 -1
  48. package/assets/esri/core/workers/chunks/9528dfed701ad37ea551.js.LICENSE.txt +1 -1
  49. package/assets/esri/core/workers/chunks/{419f4aaecc4231fdd171.js → 9dc0331885cb8150d9ca.js} +1 -1
  50. package/assets/esri/core/workers/chunks/9ebf8288046aa0fa51f1.js.LICENSE.txt +1 -1
  51. package/assets/esri/core/workers/chunks/a0b8164928a331ffc1b4.js +2 -0
  52. package/assets/esri/core/workers/chunks/{5c71a14417cdd11a1e8d.js.LICENSE.txt → a0b8164928a331ffc1b4.js.LICENSE.txt} +1 -1
  53. package/assets/esri/core/workers/chunks/a6e3783cc10fb505473e.js +1 -0
  54. package/assets/esri/core/workers/chunks/a6fec91863abaa670301.js +2 -0
  55. package/assets/esri/core/workers/chunks/{359297c87764ae8db386.js.LICENSE.txt → a6fec91863abaa670301.js.LICENSE.txt} +1 -1
  56. package/assets/esri/core/workers/chunks/a98cdf10ff7b2923abd5.js +1 -0
  57. package/assets/esri/core/workers/chunks/aa43b12a71957da2e678.js +1 -0
  58. package/assets/esri/core/workers/chunks/ac85f9d88f5583407d66.js +1 -0
  59. package/assets/esri/core/workers/chunks/{418988591e8068adefe2.js → b7c2244c27790ccaca92.js} +1 -1
  60. package/assets/esri/core/workers/chunks/da70e2c191e7d1d2df64.js +1 -0
  61. package/assets/esri/core/workers/chunks/dbded06d7a944dd97b01.js +1 -0
  62. package/assets/esri/core/workers/chunks/dcf857dc23b152fe74ff.js +1 -0
  63. package/assets/esri/core/workers/chunks/dcfc48bf5c27774fa05c.js +1 -0
  64. package/assets/esri/core/workers/chunks/dd368833c042127360ad.js +1 -0
  65. package/assets/esri/core/workers/chunks/e4049e498b3eaa9c8596.js +1 -0
  66. package/assets/esri/core/workers/chunks/e730a930d8a551552db5.js +1 -0
  67. package/assets/esri/core/workers/chunks/eb55835b8d3829f75e1e.js +1 -0
  68. package/assets/esri/core/workers/chunks/ef6fc6c92eae4f51e689.js +2 -0
  69. package/assets/esri/core/workers/chunks/{931063b2654ff763d15e.js.LICENSE.txt → ef6fc6c92eae4f51e689.js.LICENSE.txt} +1 -1
  70. package/assets/esri/core/workers/chunks/f4124bf5b674811332bd.js.LICENSE.txt +1 -1
  71. package/assets/esri/core/workers/chunks/fd03cd19d0d4db699dca.js +1 -0
  72. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  73. package/assets/esri/themes/base/widgets/_Directions.scss +4 -0
  74. package/assets/esri/themes/base/widgets/_Grid.scss +8 -2
  75. package/assets/esri/themes/dark/main.css +1 -1
  76. package/assets/esri/themes/light/main.css +1 -1
  77. package/assets/esri/themes/light/view.css +1 -1
  78. package/chunks/libtess-asm.js +1 -1
  79. package/chunks/libtess.js +1 -1
  80. package/chunks/vec32.js +1 -1
  81. package/chunks/vxlLayer.js +1 -1
  82. package/core/PooledArray.js +1 -1
  83. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  84. package/core/scheduling.js +1 -1
  85. package/core/sql.js +1 -1
  86. package/geometry/ellipsoidUtils.js +1 -1
  87. package/geometry/libtess.js +1 -1
  88. package/geometry/support/meshUtils/loadExternal.js +1 -1
  89. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  90. package/interfaces.d.ts +391 -49
  91. package/layers/BuildingSceneLayer.js +1 -1
  92. package/layers/GeoJSONLayer.js +1 -1
  93. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  94. package/layers/IntegratedMeshLayer.js +1 -1
  95. package/layers/MapImageLayer.js +1 -1
  96. package/layers/OGCFeatureLayer.js +1 -1
  97. package/layers/PointCloudLayer.js +1 -1
  98. package/layers/SceneLayer.js +1 -1
  99. package/layers/VoxelLayer.js +1 -1
  100. package/layers/VoxelWasmPerSceneView.js +1 -1
  101. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  102. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  103. package/layers/graphics/sources/WFSSource.js +1 -1
  104. package/layers/graphics/sources/support/uploads.js +1 -1
  105. package/layers/mixins/SceneService.js +1 -1
  106. package/layers/ogc/wfsUtils.js +1 -1
  107. package/layers/support/I3SIndexInfo.js +1 -1
  108. package/layers/support/Sublayer.js +1 -1
  109. package/layers/support/associatedFeatureServiceUtils.js +1 -1
  110. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  111. package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
  112. package/layers/support/rasterFunctions/bandIndexUtils.js +1 -1
  113. package/package.json +2 -2
  114. package/portal/schemas/buildingSceneLayerItem.js +1 -1
  115. package/portal/schemas/definitions.js +1 -1
  116. package/portal/schemas/integratedMeshLayerItem.js +1 -1
  117. package/portal/schemas/pointCloudLayerItem.js +1 -1
  118. package/portal/schemas/sceneLayerItem.js +1 -1
  119. package/support/revision.js +1 -1
  120. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  121. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  122. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  123. package/views/2d/layers/SubtypeGroupLayerView2D.js +1 -1
  124. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +5 -0
  125. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +5 -0
  126. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +5 -0
  127. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +5 -0
  128. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +5 -0
  129. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +5 -0
  130. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +5 -0
  131. package/views/2d/layers/features/layerAdapters/featureReductionUtils.js +5 -0
  132. package/views/2d/layers/features/layerAdapters/floorFilterUtils.js +5 -0
  133. package/views/2d/layers/features/support/NormalizedField.js +1 -1
  134. package/views/2d/layers/support/DebugOverlay.js +1 -1
  135. package/views/3d/analysis/AnalysisView3D.js +1 -1
  136. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  137. package/views/3d/layers/I3SMeshView3D.js +1 -1
  138. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  139. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  140. package/views/3d/layers/IntegratedMesh3DTilesViewPerformanceInfo.js +5 -0
  141. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  142. package/views/3d/layers/TiledLayerView3D.js +1 -1
  143. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  144. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  145. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  146. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  147. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  148. package/views/3d/layers/i3s/PagedNodeIndex.js +1 -1
  149. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  150. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  151. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  152. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  153. package/views/3d/support/RenderCoordsHelper.js +1 -1
  154. package/views/3d/support/orientedBoundingBox.js +1 -1
  155. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  156. package/views/3d/terrain/OverlayManager.js +1 -1
  157. package/views/3d/terrain/OverlayRenderer.js +1 -1
  158. package/views/3d/terrain/PatchRenderData.js +1 -1
  159. package/views/3d/terrain/SphericalPatch.js +1 -1
  160. package/views/3d/terrain/TerrainSurface.js +1 -1
  161. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  162. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  163. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  164. package/views/3d/webgl-engine/effects/RenderNodeCollection.js +1 -1
  165. package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
  166. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  167. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  168. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  169. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  170. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  171. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  172. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  173. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  174. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  175. package/views/3d/webgl-engine/lib/rendererUtils.js +1 -1
  176. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  177. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  178. package/views/draw/DrawGraphicTool.js +1 -1
  179. package/views/interactive/AnalysisToolBase.js +1 -1
  180. package/views/interactive/tooltip/Tooltip.js +1 -1
  181. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  182. package/views/layers/DimensionLayerView.js +1 -1
  183. package/views/webgl/Program.js +1 -1
  184. package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.js +1 -1
  185. package/widgets/BasemapLayerList.js +1 -1
  186. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +4 -0
  187. package/widgets/DirectionalPad.d.ts +4 -0
  188. package/widgets/Directions/css.js +1 -1
  189. package/widgets/Directions.js +1 -1
  190. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  191. package/widgets/FeatureTable/FieldColumn.js +1 -1
  192. package/widgets/FeatureTable/Grid/Column.js +1 -1
  193. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  194. package/widgets/Features/FeaturesViewModel.js +1 -1
  195. package/widgets/LayerList/support/layerListUtils.js +1 -1
  196. package/widgets/LayerList.js +1 -1
  197. package/widgets/TableList.js +1 -1
  198. package/widgets/support/AnchorElementViewModel.js +1 -1
  199. package/assets/esri/core/workers/chunks/040e0122efe1cb716431.js +0 -1
  200. package/assets/esri/core/workers/chunks/04c89069761f7d6bf69d.js +0 -1
  201. package/assets/esri/core/workers/chunks/0c05900239e372f49f7e.js +0 -1
  202. package/assets/esri/core/workers/chunks/104e943cfffd093572a8.js +0 -1
  203. package/assets/esri/core/workers/chunks/1f5a4da5773ba48addfa.js +0 -1
  204. package/assets/esri/core/workers/chunks/24087961564e5b8cc20c.js +0 -1
  205. package/assets/esri/core/workers/chunks/26d8f6e0b9d67c75a781.js +0 -1
  206. package/assets/esri/core/workers/chunks/3441ae1ee2b11cf2c3f6.js +0 -1
  207. package/assets/esri/core/workers/chunks/359297c87764ae8db386.js +0 -2
  208. package/assets/esri/core/workers/chunks/37f71dac3208e74a76fc.js +0 -1
  209. package/assets/esri/core/workers/chunks/3913cf13681761afa596.js +0 -1
  210. package/assets/esri/core/workers/chunks/4a4dfe393c4c5e9435f9.js +0 -1
  211. package/assets/esri/core/workers/chunks/530306592924eb06d30c.js +0 -1
  212. package/assets/esri/core/workers/chunks/5558e8acc1bee29a0e9b.js +0 -1
  213. package/assets/esri/core/workers/chunks/587c81abcbe118ea89ae.js +0 -1
  214. package/assets/esri/core/workers/chunks/5c71a14417cdd11a1e8d.js +0 -2
  215. package/assets/esri/core/workers/chunks/5db76bdc4916d11cbcfe.js +0 -1
  216. package/assets/esri/core/workers/chunks/642e652bf21a7fa463c9.js +0 -1
  217. package/assets/esri/core/workers/chunks/649c3cbf6b3ec94cbdf1.js +0 -1
  218. package/assets/esri/core/workers/chunks/67e4bec7950f09ffe4a7.js +0 -1
  219. package/assets/esri/core/workers/chunks/68b2743411ef5e09862b.js +0 -1
  220. package/assets/esri/core/workers/chunks/76d0c4d6192449f22e51.js +0 -2
  221. package/assets/esri/core/workers/chunks/78123fa25903d376bd49.js +0 -1
  222. package/assets/esri/core/workers/chunks/7918a1c53ce9e7c95030.js +0 -1
  223. package/assets/esri/core/workers/chunks/80498a2a85e1aeadd569.js +0 -1
  224. package/assets/esri/core/workers/chunks/8407cf549c0c59a206f1.js +0 -1
  225. package/assets/esri/core/workers/chunks/89299923c92540455513.js +0 -1
  226. package/assets/esri/core/workers/chunks/8932cdbb7cfab9258d5a.js +0 -1
  227. package/assets/esri/core/workers/chunks/931063b2654ff763d15e.js +0 -2
  228. package/assets/esri/core/workers/chunks/969a22814dc765ac1061.js +0 -1
  229. package/assets/esri/core/workers/chunks/aa4d3276917421abaa12.js +0 -1
  230. package/assets/esri/core/workers/chunks/be924cb8ab2d40abea6c.js +0 -1
  231. package/assets/esri/core/workers/chunks/c6d1a6db8cfa0a7e3bd2.js +0 -1
  232. package/assets/esri/core/workers/chunks/c87e3d55ecdbbb584dfc.js +0 -1
  233. package/assets/esri/core/workers/chunks/cf9bf7d57341d00a92a6.js +0 -1
  234. package/assets/esri/core/workers/chunks/d72121b17640e302d6a9.js +0 -1
  235. package/assets/esri/core/workers/chunks/de01e106ca3daf6c2f49.js +0 -1
  236. package/assets/esri/core/workers/chunks/e3154ef5dbd851224452.js +0 -1
  237. package/assets/esri/core/workers/chunks/f0c62bb406bb93b1408a.js +0 -1
  238. package/assets/esri/core/workers/chunks/f4c4e0fe6be09fa49784.js +0 -1
  239. package/assets/esri/core/workers/chunks/f64a4349f895f92b6338.js +0 -1
  240. package/assets/esri/core/workers/chunks/f7a31ac1251c9c0ba713.js +0 -1
  241. package/assets/esri/core/workers/chunks/f842b3b50059aa70f1af.js +0 -1
  242. package/assets/esri/core/workers/chunks/fab270f3a45914f8df9e.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9498,5732],{5732:(e,t,r)=>{r.d(t,{c:()=>s,g:()=>o});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>p});var s=r(43697),o=r(46791),i=(r(66643),r(20102),r(92604),r(26258),r(87538)),n=r(5600),a=r(52011);let l=class extends o.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,i.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new o.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.Cb)()],l.prototype,"getCollections",void 0),(0,s._)([(0,n.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,s._)([(0,a.j)("esri.core.CollectionFlattener")],l);const p=l},30223:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Xe});var s=r(43697),o=r(46791),i=r(57435),n=r(20102),a=r(22974),l=r(68668),p=r(92604),u=r(16453),y=r(95330),d=r(17452),c=r(5600),h=(r(80442),r(71715)),f=r(52011),g=r(82971),m=r(87085),b=r(38171),v=r(51773),w=(r(16050),r(93348),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),_=r(3172),C=r(35454),S=r(83379),x=r(609),F=(r(77734),r(36030)),T=r(6570),O=r(19238),j=r(10699),R=r(75215),A=r(21506);let I=class extends((0,j.IG)(u.w)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:-1}};(0,s._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],I.prototype,"title",void 0),(0,s._)([(0,h.r)("service","title",["alias","name"])],I.prototype,"readTitle",null),(0,s._)([(0,c.Cb)()],I.prototype,"layer",void 0),(0,s._)([(0,c.Cb)({type:R.z8,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],I.prototype,"id",void 0),(0,s._)([(0,h.r)("service","id")],I.prototype,"readIdOnlyOnce",null),(0,s._)([(0,c.Cb)((0,A.Lx)(String))],I.prototype,"modelName",void 0),(0,s._)([(0,c.Cb)((0,A.Lx)(Boolean))],I.prototype,"isEmpty",void 0),(0,s._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],I.prototype,"legendEnabled",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{name:"visibility",write:!0}})],I.prototype,"visible",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],I.prototype,"opacity",void 0),I=(0,s._)([(0,f.j)("esri.layers.buildingSublayers.BuildingSublayer")],I);const L=I;var E=r(15506),q=r(53518),P=r(99514),Z=r(73012),Q=r(61064),B=r(51161),M=r(14165),N=r(32163),D=r(86787),k=r(4006),z=r(19833);const U=(0,q.v)();let G=class extends(S.Z.LoadableMixin((0,x.v)(L))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new P.Z(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,s=t.associatedLayerID;return null!=r&&"number"==typeof s?new O.default({portalItem:r,layerId:s}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}get timeInfo(){return this.associatedLayer?.timeInfo}get timeExtent(){return this.associatedLayer?.timeExtent}get timeOffset(){return this.associatedLayer?.timeOffset}get useViewTime(){return this.associatedLayer?.useViewTime??!0}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=(0,Q.T)(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.Z.getLogger(this),t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,N.eZ)(this,e)}async _fetchService(e){const t=(await(0,_.Z)(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:E.C,{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}=e;return{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}}createQuery(){const e=new M.Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}async queryCachedAttributes(e,t){const r=(0,Z.Lk)(this.fieldsIndex,await(0,z.e7)(this,(0,z.V5)(this)));return(0,k.xe)(this.parsedUrl.path,this.attributeStorageInfo,e,t,r)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new n.Z("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new b.Z;return s.attributes=r[0],s.layer=this,s.sourceLayer=this,s}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new n.Z("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.Z("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,s._)([(0,c.Cb)({readOnly:!0})],G.prototype,"parsedUrl",null),(0,s._)([(0,c.Cb)({type:B.U4,readOnly:!0})],G.prototype,"nodePages",void 0),(0,s._)([(0,c.Cb)({type:[B.QI],readOnly:!0})],G.prototype,"materialDefinitions",void 0),(0,s._)([(0,c.Cb)({type:[B.Yh],readOnly:!0})],G.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,c.Cb)({type:[B.H3],readOnly:!0})],G.prototype,"geometryDefinitions",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],G.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],G.prototype,"store",void 0),(0,s._)([(0,c.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],G.prototype,"rootNode",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],G.prototype,"attributeStorageInfo",void 0),(0,s._)([(0,c.Cb)(U.fields)],G.prototype,"fields",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],G.prototype,"fieldsIndex",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:O.default})],G.prototype,"associatedLayer",void 0),(0,s._)([(0,h.r)("service","associatedLayer",["associatedLayerID"])],G.prototype,"readAssociatedLayer",null),(0,s._)([(0,c.Cb)(U.outFields)],G.prototype,"outFields",void 0),(0,s._)([(0,c.Cb)({type:String,readOnly:!0})],G.prototype,"objectIdField",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:String,json:{read:!1}})],G.prototype,"displayField",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:String})],G.prototype,"apiKey",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:String})],G.prototype,"customParameters",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:T.Z})],G.prototype,"fullExtent",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:g.Z})],G.prototype,"spatialReference",null),(0,s._)([(0,c.Cb)({readOnly:!0})],G.prototype,"version",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:D.Z})],G.prototype,"elevationInfo",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:Number})],G.prototype,"minScale",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:Number})],G.prototype,"maxScale",null),(0,s._)([(0,c.Cb)({readOnly:!0,type:Number})],G.prototype,"effectiveScaleRange",null),(0,s._)([(0,c.Cb)({type:["hide","show"],json:{write:!0}})],G.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)({types:w.o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],G.prototype,"renderer",void 0),(0,s._)([(0,c.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],G.prototype,"definitionExpression",void 0),(0,s._)([(0,c.Cb)(A.C_)],G.prototype,"popupEnabled",void 0),(0,s._)([(0,c.Cb)({type:v.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],G.prototype,"popupTemplate",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],G.prototype,"normalReferenceFrame",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],G.prototype,"defaultPopupTemplate",null),(0,s._)([(0,c.Cb)()],G.prototype,"timeInfo",null),(0,s._)([(0,c.Cb)()],G.prototype,"timeExtent",null),(0,s._)([(0,c.Cb)()],G.prototype,"timeOffset",null),(0,s._)([(0,c.Cb)()],G.prototype,"useViewTime",null),(0,s._)([(0,c.Cb)()],G.prototype,"datesInUnknownTimezone",null),(0,s._)([(0,c.Cb)()],G.prototype,"types",null),(0,s._)([(0,c.Cb)()],G.prototype,"typeIdField",null),(0,s._)([(0,c.Cb)({json:{write:!1}}),(0,F.J)(new C.X({"3DObject":"3d-object",Point:"point"}))],G.prototype,"layerType",void 0),(0,s._)([(0,c.Cb)()],G.prototype,"geometryType",null),(0,s._)([(0,c.Cb)()],G.prototype,"profile",null),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],G.prototype,"capabilities",null),G=(0,s._)([(0,f.j)("esri.layers.buildingSublayers.BuildingComponentSublayer")],G);const V=G;var H,J=r(20941);const K={type:o.Z,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:W}}},read:!1}};function W(e,t,r){if(e&&Array.isArray(e))return new o.Z(e.map((e=>{const t=function(e){return"group"===e.layerType?X:V}(e);if(t){const s=new t;return s.read(e,r),s}return r?.messages&&e&&r.messages.push(new J.Z("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null})))}let X=H=class extends L{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,l.w)(this,(e=>H.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)}))))}};var $;(0,s._)([(0,c.Cb)({type:["hide","show","hide-children"],json:{write:!0}})],X.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)(K)],X.prototype,"sublayers",void 0),X=H=(0,s._)([(0,f.j)("esri.layers.buildingSublayers.BuildingGroupSublayer")],X),($=X||(X={})).sublayersProperty=K,$.readSublayers=W,$.forEachSublayer=function e(t,r){t.forEach((t=>{r(t),"building-group"===t.type&&e(t.sublayers,r)}))};const Y=X;var ee=r(54295),te=r(17287),re=r(17017),se=r(38009),oe=r(16859),ie=r(72965),ne=r(37253),ae=r(71592),le=r(96674),pe=r(41123);let ue=class extends le.wq{constructor(){super(...arguments),this.type=null}};(0,s._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:!0}})],ue.prototype,"type",void 0),ue=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilterAuthoringInfo")],ue);const ye=ue;var de;let ce=de=class extends le.wq{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new de({filterType:this.filterType,filterValues:(0,a.d9)(this.filterValues)})}};(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],ce.prototype,"filterType",void 0),(0,s._)([(0,c.Cb)({type:[String],json:{write:!0}})],ce.prototype,"filterValues",void 0),ce=de=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilterAuthoringInfoType")],ce);const he=ce;var fe;const ge=o.Z.ofType(he);let me=fe=class extends le.wq{clone(){return new fe({filterTypes:(0,a.d9)(this.filterTypes)})}};(0,s._)([(0,c.Cb)({type:ge,json:{write:!0}})],me.prototype,"filterTypes",void 0),me=fe=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],me);const be=me;var ve;const we=o.Z.ofType(be);let _e=ve=class extends ye{constructor(){super(...arguments),this.type="checkbox"}clone(){return new ve({filterBlocks:(0,a.d9)(this.filterBlocks)})}};(0,s._)([(0,c.Cb)({type:["checkbox"]})],_e.prototype,"type",void 0),(0,s._)([(0,c.Cb)({type:we,json:{write:!0}})],_e.prototype,"filterBlocks",void 0),_e=ve=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],_e);const Ce=_e;let Se=class extends le.wq{};(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],Se.prototype,"type",void 0),Se=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilterMode")],Se);const xe=Se;var Fe;let Te=Fe=class extends xe{constructor(){super(...arguments),this.type="solid"}clone(){return new Fe}};(0,s._)([(0,c.Cb)({type:["solid"],readOnly:!0,json:{write:!0}})],Te.prototype,"type",void 0),Te=Fe=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilterModeSolid")],Te);const Oe=Te;var je,Re=r(56332);let Ae=je=class extends xe{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new je({edges:(0,a.d9)(this.edges)})}};(0,s._)([(0,F.J)({wireFrame:"wire-frame"})],Ae.prototype,"type",void 0),(0,s._)([(0,c.Cb)(Re.Z)],Ae.prototype,"edges",void 0),Ae=je=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilterModeWireFrame")],Ae);const Ie=Ae;var Le;let Ee=Le=class extends xe{constructor(){super(...arguments),this.type="x-ray"}clone(){return new Le}};(0,s._)([(0,c.Cb)({type:["x-ray"],readOnly:!0,json:{write:!0}})],Ee.prototype,"type",void 0),Ee=Le=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilterModeXRay")],Ee);const qe=Ee;var Pe;const Ze={nonNullable:!0,types:{key:"type",base:xe,typeMap:{solid:Oe,"wire-frame":Ie,"x-ray":qe}},json:{read:e=>{switch(e?.type){case"solid":return Oe.fromJSON(e);case"wireFrame":return Ie.fromJSON(e);case"x-ray":return qe.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let Qe=Pe=class extends le.wq{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Oe,this.title=""}clone(){return new Pe({filterExpression:this.filterExpression,filterMode:(0,a.d9)(this.filterMode),title:this.title})}};(0,s._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Qe.prototype,"filterExpression",void 0),(0,s._)([(0,c.Cb)(Ze)],Qe.prototype,"filterMode",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Qe.prototype,"title",void 0),Qe=Pe=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilterBlock")],Qe);const Be=Qe;var Me;const Ne=o.Z.ofType(Be);let De=Me=class extends le.wq{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=(0,pe.DO)(),this.name=null}clone(){return new Me({description:this.description,filterBlocks:(0,a.d9)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,a.d9)(this.filterAuthoringInfo)})}};(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],De.prototype,"description",void 0),(0,s._)([(0,c.Cb)({type:Ne,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"filterBlocks",void 0),(0,s._)([(0,c.Cb)({types:{key:"type",base:ye,typeMap:{checkbox:Ce}},json:{read:e=>"checkbox"===e?.type?Ce.fromJSON(e):null,write:!0}})],De.prototype,"filterAuthoringInfo",void 0),(0,s._)([(0,c.Cb)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"id",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"name",void 0),De=Me=(0,s._)([(0,f.j)("esri.layers.support.BuildingFilter")],De);const ke=De;let ze=class extends le.wq{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,s._)([(0,c.Cb)({type:String})],ze.prototype,"fieldName",void 0),(0,s._)([(0,c.Cb)({type:String})],ze.prototype,"modelName",void 0),(0,s._)([(0,c.Cb)({type:String})],ze.prototype,"label",void 0),(0,s._)([(0,c.Cb)({type:Number})],ze.prototype,"min",void 0),(0,s._)([(0,c.Cb)({type:Number})],ze.prototype,"max",void 0),(0,s._)([(0,c.Cb)({json:{read:e=>Array.isArray(e)&&(e.every((e=>"string"==typeof e))||e.every((e=>"number"==typeof e)))?e.slice():null}})],ze.prototype,"mostFrequentValues",void 0),(0,s._)([(0,c.Cb)({type:[Number]})],ze.prototype,"subLayerIds",void 0),ze=(0,s._)([(0,f.j)("esri.layers.support.BuildingFieldStatistics")],ze);let Ue=class extends(S.Z.LoadableMixin((0,x.v)(le.wq))){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(p.Z.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,_.Z)(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,s._)([(0,c.Cb)({constructOnly:!0,type:String})],Ue.prototype,"url",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,type:[ze],json:{read:{source:"summary"}}})],Ue.prototype,"fields",null),Ue=(0,s._)([(0,f.j)("esri.layers.support.BuildingSummaryStatistics")],Ue);const Ge=Ue;var Ve=r(36405);const He=o.Z.ofType(ke),Je=(0,a.d9)(Y.sublayersProperty),Ke=Je.json?.origins;Ke&&(Ke["web-scene"]={type:[V],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},Ke["portal-item"]={type:[V],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let We=class extends((0,ne.Vt)((0,te.Y)((0,se.q)((0,oe.I)((0,ie.M)((0,u.R)((0,re.N)((0,ee.V)(m.Z))))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new i.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._sublayerOverrides=null,this.filters=new He,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const s=Y.readSublayers(e,t,r);return Y.forEachSublayer(s,(e=>e.layer=this)),this._sublayerOverrides&&(this.applySublayerOverrides(s,this._sublayerOverrides),this._sublayerOverrides=null),s}applySublayerOverrides(e,{overrides:t,context:r}){Y.forEachSublayer(e,(e=>e.read(t.get(e.id),r)))}readSublayerOverrides(e,t){const r=new Map;for(const s of e)null!=s&&"object"==typeof s&&"number"==typeof s.id?r.set(s.id,s):t.messages?.push(new n.Z("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:s}));return{overrides:r,context:t}}writeSublayerOverrides(e,t,r){const s=[];Y.forEachSublayer(this.sublayers,(e=>{const t=e.write({},r);Object.keys(t).length>1&&s.push(t)})),s.length>0&&(t.sublayers=s)}writeUnappliedOverrides(e,t){t.sublayers=[],e.overrides.forEach((e=>{t.sublayers.push((0,a.d9)(e))}))}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?this.writeSublayerOverrides(this.sublayers,e,t):this._sublayerOverrides&&this.writeUnappliedOverrides(this._sublayerOverrides,e)),e}read(e,t){if(super.read(e,t),t&&("web-scene"===t.origin||"portal-item"===t.origin)&&null!=e&&Array.isArray(e.sublayers)){const r=this.readSublayerOverrides(e.sublayers,t);this.sublayers?this.applySublayerOverrides(this.sublayers,r):this._sublayerOverrides=r}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef){const e=(0,d.v_)(this.parsedUrl?.path,t.statisticsHRef);return new Ge({url:e})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.r9).then((()=>this._fetchService(t))).then((()=>this._fetchAssociatedFeatureService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,l.G)(this,(e=>{Y.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)})),this.summaryStatistics&&e(this.summaryStatistics)}))}async saveAs(e,t){return this._debouncedSaveOperations(ne.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(ne.xp.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.Z("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:t}=await(0,ae.w)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=t}catch(e){p.Z.getLogger(this).warn("Associated feature service item could not be loaded",e)}}_validateElevationInfo(){const e=this.elevationInfo,t="Building scene layers";(0,Ve.LR)(p.Z.getLogger(this),(0,Ve.Uy)(t,"absolute-height",e)),(0,Ve.LR)(p.Z.getLogger(this),(0,Ve.kf)(t,e))}};(0,s._)([(0,c.Cb)({type:["BuildingSceneLayer"]})],We.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],We.prototype,"allSublayers",void 0),(0,s._)([(0,c.Cb)(Je)],We.prototype,"sublayers",void 0),(0,s._)([(0,h.r)("service","sublayers")],We.prototype,"readSublayers",null),(0,s._)([(0,c.Cb)({type:He,nonNullable:!0,json:{write:!0}})],We.prototype,"filters",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],We.prototype,"activeFilterId",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,type:Ge})],We.prototype,"summaryStatistics",void 0),(0,s._)([(0,h.r)("summaryStatistics",["statisticsHRef"])],We.prototype,"readSummaryStatistics",null),(0,s._)([(0,c.Cb)({type:[String],json:{read:!1}})],We.prototype,"outFields",void 0),(0,s._)([(0,c.Cb)(A.vg)],We.prototype,"fullExtent",void 0),(0,s._)([(0,c.Cb)(A.rn)],We.prototype,"legendEnabled",void 0),(0,s._)([(0,c.Cb)({type:["show","hide","hide-children"]})],We.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)((0,A.Lx)(g.Z))],We.prototype,"spatialReference",void 0),(0,s._)([(0,c.Cb)(A.PV)],We.prototype,"elevationInfo",null),(0,s._)([(0,c.Cb)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,s._)([(0,c.Cb)()],We.prototype,"associatedFeatureServiceItem",void 0),We=(0,s._)([(0,f.j)("esri.layers.BuildingSceneLayer")],We);const Xe=We},70082:(e,t,r)=>{r.d(t,{Z:()=>y});var s=r(43697),o=r(2368),i=r(35454),n=r(96674),a=r(5600),l=(r(80442),r(92604),r(77734),r(52011));const p=new i.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,s._)([(0,a.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,s._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const y=u},16451:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(43697),o=r(2368),i=r(96674),n=r(5600),a=(r(80442),r(92604),r(77734),r(71715)),l=r(52011),p=r(30556),u=r(72729),y=r(70082);let d=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,s._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,s._)([(0,a.r)("domains")],d.prototype,"readDomains",null),(0,s._)([(0,p.c)("domains")],d.prototype,"writeDomains",null),(0,s._)([(0,n.Cb)({type:[y.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,s._)([(0,l.j)("esri.layers.support.FeatureType")],d);const c=d},54275:(e,t,r)=>{r.d(t,{h:()=>y});var s=r(80442),o=r(66677);function i(e,t,r){return!!a(e,t,r)}function n(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function y(e,t){return{analytics:d(e),attachment:c(e),data:h(e),metadata:f(e),operations:g(e.capabilities,e,t),query:m(e,t),queryRelated:b(e),queryTopFeatures:v(e),editing:w(e)}}function d(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:i(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:i(e,"isDataVersioned",!1),supportsAttachment:i(e,"hasAttachments",!1),supportsM:i(e,"hasM",!1),supportsZ:i(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:i(e,"supportsFieldDescriptionProperty",!1)}}function g(e,t,r){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,o.Qc)(r):null,a=s.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),l=s.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&s.includes("create"),u=l&&s.includes("delete"),y=l&&s.includes("update");const d=s.includes("changetracking"),c=t.advancedQueryCapabilities;return l&&!(p||u||y)&&(p=u=y=!0),{supportsCalculate:i(t,"supportsCalculate",!1),supportsTruncate:i(t,"supportsTruncate",!1),supportsValidateSql:i(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:d,supportsQuery:a,supportsQueryAnalytics:i(c,"supportsQueryAnalytic",!1),supportsQueryAttachments:i(c,"supportsQueryAttachments",!1),supportsQueryTopFeatures:i(c,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:i(t,"supportsAttachmentsResizing",!1),supportsSync:s.includes("sync"),supportsUpdate:y,supportsExceedsLimitStatistics:i(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:i(t,"supportsAsyncConvert3D",!1)}}function m(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,y=e.currentVersion,d=t?.includes("MapServer"),c=!d||y>=(0,s.Z)("mapserver-pbf-version-support"),h=(0,o.M8)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:i(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:i(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:i(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:i(r,"supportsReturningGeometryCentroid",!1),supportsDistance:i(r,"supportsQueryWithDistance",!1),supportsDistinct:i(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:i(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:i(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:i(r,"supportsHavingClause",!1),supportsOrderBy:i(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:i(r,"supportsPagination",!1),supportsQuantization:i(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:i(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:i(e,"supportsReturningQueryGeometry",!1),supportsResultType:i(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:i(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:i(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:i(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:i(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:i(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:i(a,"allowOthersToQuery",!0),supportsHistoricMoment:i(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&f.has("pbf"),supportsDisjointSpatialRelationship:i(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:i(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:i(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:i(r,"supportsFullTextSearch",!1),maxRecordCountFactor:n(e,"maxRecordCountFactor",void 0),maxRecordCount:n(e,"maxRecordCount",void 0),standardMaxRecordCount:n(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:n(e,"tileMaxRecordCount",void 0)}}function b(e){const t=e.advancedQueryCapabilities,r=i(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:i(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function v(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:i(e,"allowGeometryUpdates",!0),supportsGlobalId:i(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:i(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:i(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:i(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:i(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:i(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:i(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:i(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:i(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:i(r,"supportsAsyncApplyEdits",!1),zDefault:n(e,"zDefault",void 0)}}},28694:(e,t,r)=>{r.d(t,{p:()=>o});var s=r(69285);function o(e,t,r){if(!r?.features||!r.hasZ)return;const o=(0,s.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var s,o=r(43697),i=r(66577),n=r(38171),a=r(35454),l=r(96674),p=r(22974),u=r(5600),y=(r(80442),r(92604),r(71715)),d=r(52011),c=r(30556),h=r(82971),f=r(33955),g=r(1231);const m=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=s=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],i=n.Z.fromJSON(o),a=o.geometry?.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=r);const l=o.aggregateGeometries,p=i.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],s=l[e],o=s?.spatialReference;null==t||o||(t.spatialReference=r)}s.push(i)}return s}writeGeometryType(e,t,r,s){if(e)return void m.write(e,t,r,s);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=h.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,o]}=e,i=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)n?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,o],scale:[i,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*i+s),(e=>o-e*n),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,o;const i=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===s&&n===o||(i.push([e-s,n-o]),s=e,o=n)}else s=t(a[0]),o=r(a[1]),i.push([s,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.oU)(e)?e.rings:e.paths,o=[];for(let e=0,i=s.length;e<i;e++){const i=s[e],n=this._quantizePoints(i,t,r);n&&o.push(n)}return o.length>0?((0,f.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,f.oU)(e)?e.rings:e.paths;let n,a;for(let e=0,s=i.length;e<s;e++){const s=i[e];for(let e=0,o=s.length;e<o;e++){const o=s[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=r(a)}}if(s&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=o(r[3])}}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let n,a;for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}if(s&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2]),t[3]=o(t[3])}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.Cb)({type:[n.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,o._)([(0,y.r)("features")],b.prototype,"readFeatures",null),(0,o._)([(0,u.Cb)({type:[g.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,o._)([(0,u.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],b.prototype,"geometryType",void 0),(0,o._)([(0,c.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,o._)([(0,u.Cb)({types:i.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,o._)([(0,y.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,o._)([(0,u.Cb)({type:h.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,o._)([(0,c.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,o._)([(0,u.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=s=(0,o._)([(0,d.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const v=b}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see ef6fc6c92eae4f51e689.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7171],{67171:(e,t,i)=>{i.r(t),i.d(t,{CalciteInput:()=>H,defineCustomElement:()=>C});var n=i(77210),a=i(79145),s=i(89055),l=i(64426),o=i(25694),r=i(81629),c=i(16265),u=i(19417),d=i(85545),h=i(25177),p=i(53801),m=i(90326);const b=({scale:e,status:t,icon:i,message:a})=>(0,n.h)("div",{class:"validation-container"},(0,n.h)("calcite-input-message",{icon:i,scale:e,status:t},a));var g,v=i(44586);!function(e){e.valid="check-circle",e.invalid="exclamation-mark-triangle",e.idle="information"}(g||(g={}));const f=(0,n.GH)(class extends n.mv{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.status="idle"}handleIconEl(){this.requestedIcon=(0,a.o)(g,this.icon,this.status)}connectedCallback(){this.requestedIcon=(0,a.o)(g,this.icon,this.status)}render(){const e=this.el.hidden;return(0,n.h)(n.AA,{"calcite-hydrated-hidden":e},this.renderIcon(this.requestedIcon),(0,n.h)("slot",null))}renderIcon(e){if(e)return(0,n.h)("calcite-icon",{class:"calcite-input-message-icon",flipRtl:this.iconFlipRtl,icon:e,scale:"s"})}get el(){return this}static get watchers(){return{status:["handleIconEl"],icon:["handleIconEl"]}}static get style(){return":host([scale=m]),:host([scale=l]){--calcite-input-message-spacing-value:0.25rem}:host{box-sizing:border-box;display:flex;block-size:auto;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);opacity:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([scale=m]),:host([scale=l]){margin-block-start:var(--calcite-input-message-spacing-value)}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-color-status-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-color-status-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-color-status-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-color-brand)}:host([status]){color:var(--calcite-color-text-1)}:host([status][scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([status][scale=m]){margin-block-start:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([status][scale=l]){margin-block-start:0.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([hidden]){display:none}[hidden]{display:none}"}},[1,"calcite-input-message",{icon:[520],iconFlipRtl:[516,"icon-flip-rtl"],scale:[513],status:[513]},void 0,{status:["handleIconEl"],icon:["handleIconEl"]}]);function x(){"undefined"!=typeof customElements&&["calcite-input-message","calcite-icon"].forEach((e=>{switch(e){case"calcite-input-message":customElements.get(e)||customElements.define(e,f);break;case"calcite-icon":customElements.get(e)||(0,v.d)()}}))}x();const y=(0,n.GH)(class extends n.mv{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.type="determinate",this.value=0,this.label=void 0,this.text=void 0,this.reversed=!1}render(){const e="determinate"===this.type?{width:100*this.value+"%"}:{},t=(0,a.a)(this.el);return(0,n.h)("div",{"aria-label":this.label||this.text,"aria-valuemax":1,"aria-valuemin":0,"aria-valuenow":this.value,role:"progressbar"},(0,n.h)("div",{class:"track"},(0,n.h)("div",{class:{bar:!0,indeterminate:"indeterminate"===this.type,[h.C.rtl]:"rtl"===t,reversed:this.reversed},style:e})),this.text?(0,n.h)("div",{class:"text"},this.text):null)}get el(){return this}static get style(){return":host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:var(--calcite-z-index);inline-size:100%;overflow:hidden;background:var(--calcite-color-border-3)}.bar{z-index:var(--calcite-z-index);background-color:var(--calcite-color-brand)}@media (forced-colors: active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) / var(--calcite-internal-duration-factor) * 11 / var(--calcite-internal-duration-factor)) linear infinite}.indeterminate.calcite--rtl{animation-name:looping-progress-bar-ani-rtl}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-2)}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%, 0, 0)}50%{inline-size:40%}100%{transform:translate3d(600%, 0, 0)}}@keyframes looping-progress-bar-ani-rtl{0%{transform:translate3d(100%, 0, 0)}50%{inline-size:40%}100%{transform:translate3d(-600%, 0, 0)}}:host([hidden]){display:none}[hidden]{display:none}"}},[1,"calcite-progress",{type:[513],value:[2],label:[1],text:[1],reversed:[516]}]);function k(){"undefined"!=typeof customElements&&["calcite-progress"].forEach((e=>{"calcite-progress"===e&&(customElements.get(e)||customElements.define(e,y))}))}k();const w="number-button-item--horizontal",z="number-button-item",I={tel:"phone",password:"lock",email:"email-address",date:"calendar",time:"clock",search:"search"},E=(0,n.GH)(class extends n.mv{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calciteInternalInputFocus=(0,n.yM)(this,"calciteInternalInputFocus",6),this.calciteInternalInputBlur=(0,n.yM)(this,"calciteInternalInputBlur",6),this.calciteInputInput=(0,n.yM)(this,"calciteInputInput",7),this.calciteInputChange=(0,n.yM)(this,"calciteInputChange",6),this.childElType="input",this.previousValueOrigin="initial",this.mutationObserver=(0,d.c)("mutation",(()=>this.setDisabledAction())),this.userChangedValue=!1,this.keyDownHandler=e=>{this.readOnly||this.disabled||(this.isClearable&&"Escape"===e.key&&(this.clearInputValue(e),e.preventDefault()),"Enter"!==e.key||e.defaultPrevented||(0,s.s)(this)&&e.preventDefault())},this.clearInputValue=e=>{this.setValue({committing:!0,nativeEvent:e,origin:"user",value:""})},this.emitChangeIfUserModified=()=>{"user"===this.previousValueOrigin&&this.value!==this.previousEmittedValue&&(this.calciteInputChange.emit(),this.setPreviousEmittedValue(this.value))},this.inputBlurHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId),this.calciteInternalInputBlur.emit(),this.emitChangeIfUserModified()},this.clickHandler=e=>{if(this.disabled)return;const t=(0,a.g)(this.el,"action");e.target!==t&&this.setFocus()},this.inputFocusHandler=()=>{this.calciteInternalInputFocus.emit()},this.inputChangeHandler=()=>{"file"===this.type&&(this.files=this.childEl.files)},this.inputInputHandler=e=>{this.disabled||this.readOnly||this.setValue({nativeEvent:e,origin:"user",value:e.target.value})},this.inputKeyDownHandler=e=>{this.disabled||this.readOnly||"Enter"===e.key&&this.emitChangeIfUserModified()},this.inputNumberInputHandler=e=>{if(this.disabled||this.readOnly)return;const t=e.target.value;u.n.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};const i=u.n.delocalize(t);"insertFromPaste"===e.inputType?((0,u.i)(i)||e.preventDefault(),this.setValue({nativeEvent:e,origin:"user",value:(0,u.p)(i)}),this.childNumberEl.value=this.localizedValue):this.setValue({nativeEvent:e,origin:"user",value:i})},this.inputNumberKeyDownHandler=e=>{if("number"!==this.type||this.disabled||this.readOnly)return;if("ArrowUp"===e.key)return e.preventDefault(),void this.nudgeNumberValue("up",e);if("ArrowDown"===e.key)return void this.nudgeNumberValue("down",e);const t=[...o.n,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&"Tab"===e.key;if(t.includes(e.key)||i)"Enter"===e.key&&this.emitChangeIfUserModified();else{if(u.n.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},e.key===u.n.decimal){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&-1===this.childNumberEl.value.indexOf(u.n.decimal))return}if(/[eE]/.test(e.key)){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&!/[eE]/.test(this.childNumberEl.value))return}if("-"===e.key){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&this.childNumberEl.value.split("-").length<=2)return}e.preventDefault()}},this.nudgeNumberValue=(e,t)=>{if(t instanceof KeyboardEvent&&t.repeat||"number"!==this.type)return;const i=this.maxString?parseFloat(this.maxString):null,n=this.minString?parseFloat(this.minString):null;this.incrementOrDecrementNumberValue(e,i,n,t),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let a=!0;this.nudgeNumberValueIntervalId=window.setInterval((()=>{a?a=!1:this.incrementOrDecrementNumberValue(e,i,n,t)}),150)},this.numberButtonPointerUpAndOutHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)},this.numberButtonPointerDownHandler=e=>{if(!(0,a.i)(e))return;e.preventDefault();const t=e.target.dataset.adjustment;this.disabled||this.nudgeNumberValue(t,e)},this.hiddenInputChangeHandler=e=>{e.target.name===this.name&&this.setValue({value:e.target.value,origin:"direct"}),e.stopPropagation()},this.setChildElRef=e=>{this.childEl=e},this.setChildNumberElRef=e=>{this.childNumberEl=e},this.setInputValue=e=>{("text"!==this.type||this.childEl)&&("number"!==this.type||this.childNumberEl)&&(this[`child${"number"===this.type?"Number":""}El`].value=e)},this.setPreviousEmittedValue=e=>{this.previousEmittedValue=this.normalizeValue(e)},this.setPreviousValue=e=>{this.previousValue=this.normalizeValue(e)},this.setValue=({committing:e=!1,nativeEvent:t,origin:i,previousValue:n,value:a})=>{if(this.setPreviousValue(n??this.value),this.previousValueOrigin=i,"number"===this.type){u.n.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator,signDisplay:"never"};const e=this.previousValue?.length>a.length||this.value?.length>a.length,t="."===a.charAt(a.length-1),n=t&&e?a:(0,u.s)(a),s=a&&!n?(0,u.i)(this.previousValue)?this.previousValue:"":n;let l=u.n.localize(s);"connected"===i||t||(l=(0,u.a)(l,s,u.n)),this.localizedValue=t&&e?`${l}${u.n.decimal}`:l,this.userChangedValue="user"===i&&this.value!==s,this.value=["-","."].includes(s)?"":s}else this.userChangedValue="user"===i&&this.value!==a,this.value=a;"direct"===i&&(this.setInputValue(a),this.previousEmittedValue=a),t&&(this.calciteInputInput.emit().defaultPrevented?(this.value=this.previousValue,this.localizedValue="number"===this.type?u.n.localize(this.previousValue):this.previousValue):e&&this.emitChangeIfUserModified())},this.inputKeyUpHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)},this.alignment="start",this.autofocus=!1,this.clearable=!1,this.disabled=!1,this.form=void 0,this.groupSeparator=!1,this.hidden=!1,this.icon=void 0,this.iconFlipRtl=!1,this.label=void 0,this.loading=!1,this.numberingSystem=void 0,this.localeFormat=!1,this.max=void 0,this.min=void 0,this.maxLength=void 0,this.minLength=void 0,this.validationMessage=void 0,this.validationIcon=void 0,this.name=void 0,this.numberButtonType="vertical",this.placeholder=void 0,this.prefixText=void 0,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.step=void 0,this.autocomplete=void 0,this.pattern=void 0,this.accept=void 0,this.multiple=!1,this.inputMode="text",this.enterKeyHint=void 0,this.suffixText=void 0,this.editingEnabled=!1,this.type="text",this.value="",this.files=void 0,this.messages=void 0,this.messageOverrides=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.localizedValue=void 0,this.slottedActionElDisabledInternally=!1}disabledWatcher(){this.setDisabledAction()}maxWatcher(){this.maxString=this.max?.toString()||null}minWatcher(){this.minString=this.min?.toString()||null}onMessagesChange(){}valueWatcher(e,t){this.userChangedValue||(this.setValue({origin:"direct",previousValue:t,value:null==e||""==e?"":"number"===this.type?(0,u.i)(e)?e:this.previousValue||"":e}),this.warnAboutInvalidNumberValue(e)),this.userChangedValue=!1}updateRequestedIcon(){this.requestedIcon=(0,a.o)(I,this.icon,this.type)}get isClearable(){return!this.isTextarea&&(this.clearable||"search"===this.type)&&this.value?.length>0}get isTextarea(){return"textarea"===this.childElType}effectiveLocaleChange(){(0,p.u)(this,this.effectiveLocale)}connectedCallback(){(0,l.c)(this),(0,u.c)(this),(0,p.c)(this),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),(0,r.c)(this),(0,s.c)(this),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),"number"===this.type&&(this.warnAboutInvalidNumberValue(this.value),this.setValue({origin:"connected",value:(0,u.i)(this.value)?this.value:""})),this.mutationObserver?.observe(this.el,{childList:!0}),this.setDisabledAction(),this.el.addEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}disconnectedCallback(){(0,l.d)(this),(0,r.d)(this),(0,s.d)(this),(0,u.d)(this),(0,p.d)(this),this.mutationObserver?.disconnect(),this.el.removeEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}async componentWillLoad(){(0,c.s)(this),this.childElType="textarea"===this.type?"textarea":"input",this.maxString=this.max?.toString(),this.minString=this.min?.toString(),this.requestedIcon=(0,a.o)(I,this.icon,this.type),await(0,p.s)(this)}componentDidLoad(){(0,c.a)(this)}componentShouldUpdate(e,t,i){return!("number"===this.type&&"value"===i&&e&&!(0,u.i)(e)&&(this.setValue({origin:"reset",value:t}),1))}componentDidRender(){(0,l.u)(this)}async setFocus(){await(0,c.c)(this),"number"===this.type?this.childNumberEl?.focus():this.childEl?.focus()}async selectText(){"number"===this.type?this.childNumberEl?.select():this.childEl?.select()}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(e,t,i,n){const{value:a}=this,s="up"===e?1:-1,l="any"===this.step?1:Math.abs(this.step||1),o=new u.B(""!==a?a:"0").add(""+l*s),r="number"==typeof i&&!isNaN(i)&&o.subtract(`${i}`).isNegative?`${i}`:"number"!=typeof t||isNaN(t)||o.subtract(`${t}`).isNegative?o.toString():`${t}`;this.setValue({committing:!0,nativeEvent:n,origin:"user",value:r})}onFormReset(){this.setValue({origin:"reset",value:this.defaultValue})}syncHiddenFormInput(e){const{type:t}=this;e.type=t,"number"===t?(e.min=this.min?.toString(10)??"",e.max=this.max?.toString(10)??""):"text"===t&&(null!=this.minLength&&(e.minLength=this.minLength),null!=this.maxLength&&(e.maxLength=this.maxLength))}setDisabledAction(){const e=(0,a.g)(this.el,"action");e&&(this.disabled?(null==e.getAttribute("disabled")&&(this.slottedActionElDisabledInternally=!0),e.setAttribute("disabled","")):this.slottedActionElDisabledInternally&&(e.removeAttribute("disabled"),this.slottedActionElDisabledInternally=!1))}normalizeValue(e){return"number"===this.type?(0,u.i)(e)?e:"":e}warnAboutInvalidNumberValue(e){"number"===this.type&&e&&!(0,u.i)(e)&&console.warn(`The specified value "${e}" cannot be parsed, or is out of range.`)}render(){const e=(0,a.a)(this.el),t=(0,n.h)("div",{class:"loader"},(0,n.h)("calcite-progress",{label:this.messages.loading,type:"indeterminate"})),i=(0,n.h)("button",{"aria-label":this.messages.clear,class:"clear-button",disabled:this.disabled||this.readOnly,onClick:this.clearInputValue,tabIndex:-1,type:"button"},(0,n.h)("calcite-icon",{icon:"x",scale:(0,m.g)(this.scale)})),l=(0,n.h)("calcite-icon",{class:"icon",flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:(0,m.g)(this.scale)}),o="horizontal"===this.numberButtonType,c=(0,n.h)("button",{"aria-hidden":"true",class:{[z]:!0,[w]:o},"data-adjustment":"up",disabled:this.disabled||this.readOnly,onPointerDown:this.numberButtonPointerDownHandler,onPointerOut:this.numberButtonPointerUpAndOutHandler,onPointerUp:this.numberButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},(0,n.h)("calcite-icon",{icon:"chevron-up",scale:(0,m.g)(this.scale)})),u=(0,n.h)("button",{"aria-hidden":"true",class:{[z]:!0,[w]:o},"data-adjustment":"down",disabled:this.disabled||this.readOnly,onPointerDown:this.numberButtonPointerDownHandler,onPointerOut:this.numberButtonPointerUpAndOutHandler,onPointerUp:this.numberButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},(0,n.h)("calcite-icon",{icon:"chevron-down",scale:(0,m.g)(this.scale)})),d=(0,n.h)("div",{class:"number-button-wrapper"},c,u),p=(0,n.h)("div",{class:"prefix"},this.prefixText),g=(0,n.h)("div",{class:"suffix"},this.suffixText),v="number"===this.type?(0,n.h)("input",{accept:this.accept,"aria-label":(0,r.g)(this),autocomplete:this.autocomplete,autofocus:!!this.autofocus||null,defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.enterKeyHint,inputMode:this.inputMode,key:"localized-input",maxLength:this.maxLength,minLength:this.minLength,multiple:this.multiple,name:void 0,onBlur:this.inputBlurHandler,onFocus:this.inputFocusHandler,onInput:this.inputNumberInputHandler,onKeyDown:this.inputNumberKeyDownHandler,onKeyUp:this.inputKeyUpHandler,pattern:this.pattern,placeholder:this.placeholder||"",readOnly:this.readOnly,type:"text",value:this.localizedValue,ref:this.setChildNumberElRef}):null,f="number"!==this.type?[(0,n.h)(this.childElType,{accept:this.accept,"aria-label":(0,r.g)(this),autocomplete:this.autocomplete,autofocus:!!this.autofocus||null,class:{"editing-enabled":this.editingEnabled,"inline-child":!!this.inlineEditableEl},defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.enterKeyHint,inputMode:this.inputMode,max:this.maxString,maxLength:this.maxLength,min:this.minString,minLength:this.minLength,multiple:this.multiple,name:this.name,onBlur:this.inputBlurHandler,onChange:this.inputChangeHandler,onFocus:this.inputFocusHandler,onInput:this.inputInputHandler,onKeyDown:this.inputKeyDownHandler,onKeyUp:this.inputKeyUpHandler,pattern:this.pattern,placeholder:this.placeholder||"",readOnly:this.readOnly,required:!!this.required||null,step:this.step,tabIndex:this.disabled||this.inlineEditableEl&&!this.editingEnabled?-1:null,type:this.type,value:this.value,ref:this.setChildElRef}),this.isTextarea?(0,n.h)("div",{class:"resize-icon-wrapper"},(0,n.h)("calcite-icon",{icon:"chevron-down",scale:(0,m.g)(this.scale)})):null]:null;return(0,n.h)(n.AA,{onClick:this.clickHandler,onKeyDown:this.keyDownHandler},(0,n.h)("div",{class:{wrapper:!0,[h.C.rtl]:"rtl"===e}},"number"!==this.type||"horizontal"!==this.numberButtonType||this.readOnly?null:u,this.prefixText?p:null,(0,n.h)("div",{class:"element-wrapper"},v,f,this.isClearable?i:null,this.requestedIcon?l:null,this.loading?t:null),(0,n.h)("div",{class:"action-wrapper"},(0,n.h)("slot",{name:"action"})),"number"!==this.type||"vertical"!==this.numberButtonType||this.readOnly?null:d,this.suffixText?g:null,"number"!==this.type||"horizontal"!==this.numberButtonType||this.readOnly?null:c,(0,n.h)(s.H,{component:this})),this.validationMessage?(0,n.h)(b,{icon:this.validationIcon,message:this.validationMessage,scale:this.scale,status:this.status}):null)}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{disabled:["disabledWatcher"],max:["maxWatcher"],min:["minWatcher"],messageOverrides:["onMessagesChange"],value:["valueWatcher"],icon:["updateRequestedIcon"],type:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}}static get style(){return":host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) textarea{block-size:1.5rem;min-block-size:1.5rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) input[type=file]{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=s]) textarea{block-size:auto;padding-block:0.25rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) textarea{min-block-size:2rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) input[type=file]{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=m]) textarea{block-size:auto;padding-block:0.5rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) textarea{min-block-size:2.75rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) input[type=file]{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([scale=l]) textarea{block-size:auto;padding-block:0.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([disabled]) textarea{resize:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}textarea,input{transition:var(--calcite-animation-timing), block-size 0, outline-offset 0s;-webkit-appearance:none;position:relative;margin:0px;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;border-radius:0px;background-color:var(--calcite-color-foreground-1);font-family:inherit;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-1)}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input,textarea{text-overflow:ellipsis;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);color:var(--calcite-color-text-1)}input:placeholder-shown,textarea:placeholder-shown{text-overflow:ellipsis}input:focus,textarea:focus{border-color:var(--calcite-color-brand);color:var(--calcite-color-text-1)}input[readonly],textarea[readonly]{background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium)}input[readonly]:focus,textarea[readonly]:focus{color:var(--calcite-color-text-1)}calcite-icon{color:var(--calcite-color-text-3)}textarea,input{outline-color:transparent}textarea:focus,input:focus{outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host([status=invalid]) input,:host([status=invalid]) textarea{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) input:focus,:host([status=invalid]) textarea:focus{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host([scale=s]) .icon{inset-inline-start:0.5rem}:host([scale=m]) .icon{inset-inline-start:0.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{padding-inline-start:2rem}:host([icon][scale=m]) input{padding-inline-start:2.5rem}:host([icon][scale=l]) input{padding-inline-start:3.5rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;display:block;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.icon,.resize-icon-wrapper{z-index:var(--calcite-z-index)}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration,input[type=date]::-webkit-clear-button,input[type=time]::-webkit-clear-button{display:none}.clear-button{pointer-events:initial;order:4;margin:0px;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);outline-color:transparent;border-inline-start-width:0px}.clear-button:hover{background-color:var(--calcite-color-foreground-2);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:hover calcite-icon{color:var(--calcite-color-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:active{background-color:var(--calcite-color-foreground-3)}.clear-button:active calcite-icon{color:var(--calcite-color-text-1)}.clear-button:focus{outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.clear-button:disabled{opacity:var(--calcite-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium);line-height:1;color:var(--calcite-color-text-2)}.prefix{order:2;border-inline-end-width:0px}.suffix{order:5;border-inline-start-width:0px}:host([alignment=start]) textarea,:host([alignment=start]) input{text-align:start}:host([alignment=end]) textarea,:host([alignment=end]) input{text-align:end}input[type=number]{-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:textfield;margin:0px}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input,:host([number-button-type=vertical]) textarea{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:1;max-block-size:100%;min-block-size:100%;align-self:stretch}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover{background-color:var(--calcite-color-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover calcite-icon{color:var(--calcite-color-text-1)}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover{background-color:var(--calcite-color-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover calcite-icon{color:var(--calcite-color-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover{background-color:var(--calcite-color-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover calcite-icon{color:var(--calcite-color-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover{background-color:var(--calcite-color-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover calcite-icon{color:var(--calcite-color-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0px;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);padding-block:0px;padding-inline:0.5rem;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-inline-start-width:0px}.number-button-item calcite-icon{pointer-events:none;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.number-button-item:focus{background-color:var(--calcite-color-foreground-2)}.number-button-item:focus calcite-icon{color:var(--calcite-color-text-1)}.number-button-item:active{background-color:var(--calcite-color-foreground-3)}.number-button-item:disabled{pointer-events:none}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:input::-webkit-calendar-picker-indicator{display:none}input[type=date]::-webkit-input-placeholder{visibility:hidden !important}textarea::-webkit-resizer{position:absolute;inset-block-end:0px;box-sizing:border-box;padding-block:0px;padding-inline:0.25rem;inset-inline-end:0}.resize-icon-wrapper{inset-block-end:2px;inset-inline-end:2px;pointer-events:none;position:absolute;block-size:0.75rem;inline-size:0.75rem;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-3)}.resize-icon-wrapper calcite-icon{inset-block-end:0.25rem;inset-inline-end:0.25rem;transform:rotate(-45deg)}.calcite--rtl .resize-icon-wrapper calcite-icon{transform:rotate(45deg)}:host([type=color]) input{padding:0.25rem}:host([type=file]) input{cursor:pointer;border-width:1px;border-style:dashed;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);text-align:center}:host([type=file][scale=s]) input{padding-block:1px;padding-inline:0.5rem}:host([type=file][scale=m]) input{padding-block:0.25rem;padding-inline:0.75rem}:host([type=file][scale=l]) input{padding-block:0.5rem;padding-inline:1rem}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{background-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start:0}.validation-container{padding-block-start:0.5rem;display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}:host([hidden]){display:none}[hidden]{display:none}"}},[1,"calcite-input",{alignment:[513],autofocus:[516],clearable:[516],disabled:[516],form:[513],groupSeparator:[516,"group-separator"],hidden:[516],icon:[520],iconFlipRtl:[516,"icon-flip-rtl"],label:[1],loading:[516],numberingSystem:[513,"numbering-system"],localeFormat:[4,"locale-format"],max:[514],min:[514],maxLength:[514,"max-length"],minLength:[514,"min-length"],validationMessage:[1,"validation-message"],validationIcon:[8,"validation-icon"],name:[513],numberButtonType:[513,"number-button-type"],placeholder:[1],prefixText:[1,"prefix-text"],readOnly:[516,"read-only"],required:[516],scale:[513],status:[513],step:[520],autocomplete:[1],pattern:[1],accept:[1],multiple:[4],inputMode:[1,"input-mode"],enterKeyHint:[1,"enter-key-hint"],suffixText:[1,"suffix-text"],editingEnabled:[1540,"editing-enabled"],type:[513],value:[1025],files:[16],messages:[1040],messageOverrides:[1040],defaultMessages:[32],effectiveLocale:[32],localizedValue:[32],slottedActionElDisabledInternally:[32],setFocus:[64],selectText:[64]},void 0,{disabled:["disabledWatcher"],max:["maxWatcher"],min:["minWatcher"],messageOverrides:["onMessagesChange"],value:["valueWatcher"],icon:["updateRequestedIcon"],type:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}]);function V(){"undefined"!=typeof customElements&&["calcite-input","calcite-icon","calcite-input-message","calcite-progress"].forEach((e=>{switch(e){case"calcite-input":customElements.get(e)||customElements.define(e,E);break;case"calcite-icon":customElements.get(e)||(0,v.d)();break;case"calcite-input-message":customElements.get(e)||x();break;case"calcite-progress":customElements.get(e)||k()}}))}V();const H=E,C=V}}]);
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
4
- * v2.0.0
4
+ * v2.1.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
4
- * v2.0.0
4
+ * v2.1.0
5
5
  */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9885],{64830:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(58971),i=r(10661);class o{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.s,this._items=new Set}get length(){return(0,n.it)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,n.it)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,n.it)(this._observable),yield*this._items}}},82960:(e,t,r)=>{r.d(t,{C:()=>n});const n=["operational-layers","basemap","ground"]},24133:(e,t,r)=>{r.d(t,{Q:()=>s});var n=r(67676),i=r(44553),o=r(88764);class s{constructor(e=9,t){this._compareMinX=d,this._compareMinY=u,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(),b.prune(),_.prune(),v.prune(),E.prune()}all(e){this._all(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(g(e,r))for(b.clear();r;){for(let i=0,o=r.children.length;i<o;i++){const o=r.children[i],s=r.leaf?n(o):o;g(e,s)&&(r.leaf?t(o):f(e,s)?this._all(o,t):b.push(o))}r=b.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!g(e,t))return!1;for(b.clear();t;){for(let n=0,i=t.children.length;n<i;n++){const i=t.children[n],o=t.leaf?r(i):i;if(g(e,o)){if(t.leaf||f(e,o))return!0;b.push(i)}}t=b.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),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,i=null,o=0,s=!1;const a=this._toBBox(e);for(v.clear(),E.clear();r||v.length>0;){if(r||(r=v.pop(),i=v.data[v.length-1],o=E.pop()??0,s=!0),r.leaf&&(t=(0,n.cq)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),v.push(r),this._condense(v),this;s||r.leaf||!f(r,a)?i?(o++,r=i.children[o],s=!1):r=null:(v.push(r),E.push(o),o=0,i=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let r=e;for(_.clear();r;){if(!0===r.leaf)for(const e of r.children)t(e);else _.pushArray(r.children);r=_.pop()??null}}_build(e,t,r,n){const i=r-t+1;let o=this._maxEntries;if(i<=o){const n=new T(e.slice(t,r+1));return a(n,this._toBBox),n}n||(n=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(n-1)));const s=new I([]);s.height=n;const l=Math.ceil(i/o),p=l*Math.ceil(Math.sqrt(o));w(e,t,r,p,this._compareMinX);for(let i=t;i<=r;i+=p){const t=Math.min(i+p-1,r);w(e,i,t,l,this._compareMinY);for(let r=i;r<=t;r+=l){const i=Math.min(r+l-1,t);s.children.push(this._build(e,r,i,n-1))}}return a(s,this._toBBox),s}_chooseSubtree(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 o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=c(s),l=y(e,s)-a;l<i?(i=l,n=a<n?a:n,r=s):l===i&&a<n&&(n=a,r=s)}t=r||t.children[0]}return t}_insert(e,t,r){const n=this._toBBox,i=r?e:n(e);v.clear();const o=this._chooseSubtree(i,this._data,t,v);for(o.children.push(e),p(o,i);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;this._adjustParentBBoxes(i,v,t)}_split(e,t){const r=e.data[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const o=this._chooseSplitIndex(r,i,n);if(!o)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const s=r.children.splice(o,r.children.length-o),l=r.leaf?new T(s):new I(s);l.height=r.height,a(r,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(r,l)}_splitRoot(e,t){this._data=new I([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,i,o;n=i=1/0;for(let s=t;s<=r-t;s++){const t=l(e,0,s,this._toBBox),a=l(e,s,r,this._toBBox),p=m(t,a),d=c(t)+c(a);p<n?(n=p,o=s,i=d<i?d:i):p===n&&d<i&&(i=d,o=s)}return o}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:d,i=e.leaf?this._compareMinY:u;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,o=l(e,0,t,i),s=l(e,r-t,r,i);let a=h(o)+h(s);for(let n=t;n<r-t;n++){const t=e.children[n];p(o,e.leaf?i(t):t),a+=h(o)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];p(s,e.leaf?i(t):t),a+=h(s)}return a}_adjustParentBBoxes(e,t,r){for(let n=r;n>=0;n--)p(t.data[n],e)}_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],o=i.children;o.splice((0,n.cq)(o,r,o.length,i.indexHint),1)}else this.clear();else a(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 a(e,t){l(e,0,e.children.length,t,e)}function l(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 o,s=t;s<r;s++)o=e.children[s],p(i,e.leaf?n(o):o);return i}function p(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 d(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function h(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(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 m(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function f(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function g(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(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 a=r+Math.ceil((t-r)/n/2)*n;(0,o.q)(e,a,r,t,i),s.push(r,a,a,t)}}const b=new i.Z,_=new i.Z,v=new i.Z,E=new i.Z({deallocator:void 0});class x{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends x{constructor(){super(...arguments),this.height=1,this.indexHint=new n.SO}}class T extends C{constructor(e){super(),this.children=e,this.leaf=!0}}class I extends C{constructor(e){super(),this.children=e,this.leaf=!1}}},42033:(e,t,r)=>{async function n(e,t){const{WhereClause:n}=await Promise.all([r.e(8968),r.e(8592)]).then(r.bind(r,8968));return n.create(e,t)}function i(e,t){return null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{E:()=>n,_:()=>i})},80903:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(50758),i=r(95330),o=r(64830),s=r(18948),a=r(49737),l=r(728);class p{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new o.Z}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,n)=>{let o=!0;const s=e=>{(0,i.k_)(t.signal),o&&(o=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let o=0;o<e.length;++o){const a=e[o];(0,i.y8)(a)?this._clientPromises[o]=a.then((e=>(this._clients[o]=new l.default(e,t,this._ongoingJobsQueue),s(r),this._clients[o])),(()=>(s(n),null))):(this._clients[o]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[o]=Promise.resolve(this._clients[o]),s(r))}}))}broadcast(e,t,r){const n=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const o=this._clientPromises[i];n[i]=o.then((n=>n?.invoke(e,t,r)))}return n}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,s.E)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const n=(0,i.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:n});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return n.promise}createInvokeProxy(e){return(0,a.D)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,n.AL)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let n=0;n<this._clientPromises.length;++n)this._clientPromises[n].then((i=>{i&&(t[n]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},18948:(e,t,r)=>{r.d(t,{E:()=>o,z:()=>i});const n=new FinalizationRegistry((e=>{e.close()}));function i(e,t){n.register(e,t,t)}function o(e){n.unregister(e)}},56569:(e,t,r)=>{r.d(t,{bA:()=>q});var n=r(20102),i=r(80442),o=r(95330),s=r(80903),a=r(18948),l=r(728),p=r(92604),d=r(70586),u=r(3172),c=r(17452);const h={async request(e,t){const r=e.options,n=r.responseType;r.signal=t?.signal,r.responseType="native"===n||"native-request-init"===n?"native-request-init":n&&["blob","json","text"].includes(n)&&(0,c.oh)(e.url)?.after?n:"array-buffer";const i=await(0,u.Z)(e.url,r),o={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete o.data.signal,o;case"blob":o.data=await o.data.arrayBuffer();break;case"json":o.data=(new TextEncoder).encode(JSON.stringify(o.data)).buffer;break;case"text":o.data=(new TextEncoder).encode(o.data).buffer}return{result:o,transferList:[o.data]}}};var y=r(94362),m=r(99880),f=r(68773),g=(r(2587),r(40330));const w={};var b=r(41213);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class v{constructor(){this._dispatcher=new _,this._workerPostMessage({type:y.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,b.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,b.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.QM)(e);if(t&&t.type===y.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let n=await l.default.loadWorker(e);n||(n=await import(e));const i=l.default.connect(n);this._workerPostMessage({type:y.MessageType.OPENED,jobId:r,data:i})}}}var E=r(70171),x=r(17202);const C=()=>p.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:T}=y.MessageType;let I,k;const M="Failed to create Worker. Fallback to execute module in main thread";async function L(e){return new Promise((t=>{function r(i){const o=(0,y.QM)(i);o&&o.type===T&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),C().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}let S=0;const{ABORT:R,INVOKE:N,OPEN:D,OPENED:j,RESPONSE:P}=y.MessageType;class G{static async create(e){const t=await async function(){if(!(0,i.Z)("esri-workers"))return L(new v);if(!I&&!k)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=f.default.default){const t={...f.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.default));e.assetsPath=(0,c.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,c.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,E.Kd)(),e.has={"esri-csp-restrictions":(0,i.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.Z)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.Z)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.Z)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.Z)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.Z)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.Z)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.Z)("esri-atomics"),"esri-shared-array-buffer":(0,i.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,c.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,c.hF)(e.workers.workerPath):e.workers.workerPath=(0,c.hF)((0,m.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.default.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=w.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,E.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),n={buildDate:x.r,fullVersion:g.bR,revision:x.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}()}'`);I=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){k=e||{}}let e;if(I)try{e=new Worker(I,{name:"esri-worker-"+S++})}catch(t){C().warn(M,k),e=new v}else C().warn(M,k),e=new v;return L(e)}();return new G(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),p.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,y.jt)();return new Promise(((t,i)=>{const s={resolve:t,reject:i,abortHandle:(0,o.$F)(r,(()=>{this._outJobs.delete(n),this._post({type:R,jobId:n})}))};this._outJobs.set(n,s),this._post({type:D,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,y.QM)(e);if(t)switch(t.type){case j:this._onOpenedMessage(t);break;case P:this._onResponseMessage(t);break;case R:this._onAbortMessage(t);break;case N:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:i}=e,s=i?new AbortController:null,a=this._inJobs,l=h[t];let p;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);p=l.call(null,n,{signal:s?s.signal:null})}catch(e){return void this._post({type:P,jobId:r,error:(0,y.AB)(e)})}(0,o.y8)(p)?(a.set(r,{controller:s,promise:p}),p.then((e=>{a.has(r)&&(a.delete(r),this._post({type:P,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.D_)(e)||this._post({type:P,jobId:r,error:(0,y.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:P,jobId:r},p)}_onOpenedMessage(e){const{jobId:t,data:r}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.hw)(n.abortHandle),n.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,d.hw)(o.abortHandle),r?o.reject(n.Z.fromJSON(JSON.parse(r))):o.resolve(i))}_post(e,t,r){return(0,y.oi)(this.worker,e,t,r)}}const A=(0,i.Z)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.Z)("workers-pool-size")):0;let O=(0,i.Z)("esri-mobile")?Math.min(A,3):A;O||(O=(0,i.Z)("safari")&&(0,i.Z)("mac")?7:2);let Z=0;const F=[];async function B(e,t){const r=new s.Z,{registryTarget:n,...i}=t;return await r.open(e,i),n&&(0,a.z)(n,r),r}async function q(e,t={}){if("string"!=typeof e)throw new n.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.Z)("host-webworker")&&!(0,i.Z)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,o.k_)(t.signal);const n=t.client||r;return B([l.default.connect(r)],{...t,client:n})}if(await async function(){if(Y)return Y;z=new AbortController;const e=[];for(let t=0;t<O;t++){const r=G.create(t).then((e=>(F[t]=e,e)));e.push(r)}return Y=Promise.all(e),Y}(),(0,o.k_)(t.signal),"dedicated"===r){const r=Z++%O;return B([await F[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,O);if(r<O){const n=new Array(r);for(let i=0;i<r;++i){const r=Z++%O;n[i]=F[r].open(e,t)}return B(n,t)}}return B(F.map((r=>r.open(e,t))),t)}let z,Y=null},84864:(e,t,r)=>{r.d(t,{bU:()=>v,fC:()=>x,ir:()=>m,zp:()=>f}),r(80442);var n=r(22021),i=r(6570),o=r(38913),s=r(82971),a=r(68441),l=r(98732),p=r(5428),d=r(37427);const u=new Float64Array(2),c=new Float64Array(2),h="0123456789bcdefghjkmnpqrstuvwxyz",y=64;function m(e,t,r,n){const a=[e.xmin,e.ymin,e.xmax,e.ymax],u=o.Z.fromExtent(i.Z.fromBounds(a,n)),c=(0,d.iV)(u,n,s.Z.WGS84,{densificationStep:t*y}),h=(0,l.Uy)(new p.Z,c,!1,!1),m=h.coords.filter(((e,t)=>!(t%2))),g=h.coords.filter(((e,t)=>t%2)),w=Math.min(...m),b=Math.min(...g),_=Math.max(...m),v=Math.max(...g),E=f(w,b,r,s.Z.WGS84),x=f(_,v,r,s.Z.WGS84);if(!E||!x)throw new Error("InternalError: Unable to project tile bounds");return{bounds:a,geohashBounds:{xLL:E[0],yLL:E[1],xTR:x[0],yTR:x[1]},level:r}}function f(e,t,r,i){if(i.isWebMercator){const i=(0,n.BV)(e/a.sv.radius),o=i-360*Math.floor((i+180)/360),s=[0,0];return E(s,0,(0,n.BV)(Math.PI/2-2*Math.atan(Math.exp(-t/a.sv.radius))),o,r),s}const o=(0,d.iV)({x:e,y:t},i,s.Z.WGS84);if(!o)return null;const l=[0,0];return E(l,0,o.y,o.x,r),l}function g(e){return h[e]}function w(e){return(e[0]+e[1])/2}function b(e,t,r){return e[0]=t,e[1]=r,e}function _(e,t){const r=t>w(e);return function(e,t){const r=w(e),n=t,i=!t;e[0]=i*e[0]+n*r,e[1]=i*r+n*e[1]}(e,r),r}function v(e,t){let r=-90,n=90,i=-180,o=180;for(let s=0;s<t;s++){const t=Math.ceil((s+1)/2),a=Math.floor((s+1)/2),l=1-s%2,p=30-(3*t+2*a),d=30-(2*t+3*a),u=3*l+2*(1-l),c=2*l+3*(1-l),h=3*l+7*(1-l)<<d,y=(7*l+3*(1-l)<<p&e.geohashX)>>p,m=(h&e.geohashY)>>d;for(let e=u-1;e>=0;e--){const t=(i+o)/2,r=y&1<<e?1:0;i=(1-r)*i+r*t,o=(1-r)*t+r*o}for(let e=c-1;e>=0;e--){const t=(r+n)/2,i=m&1<<e?1:0;r=(1-i)*r+i*t,n=(1-i)*t+i*n}}return[i,r,o,n]}function E(e,t,r,n,i){i%2&&(i+=1);let o=0,s=0,a=-90,l=90,p=-180,d=180;for(let e=0;e<i/2;e++){for(let t=0;t<5;t++){const r=(p+d)/2,i=n>r?1:0;o|=i<<29-(t+5*e),p=(1-i)*p+i*r,d=(1-i)*r+i*d}for(let t=0;t<5;t++){const n=(a+l)/2,i=r>n?1:0;s|=i<<29-(t+5*e),a=(1-i)*a+i*n,l=(1-i)*n+i*l}}e[2*t]=o,e[2*t+1]=s}function x(e,t,r){let n="";const i=b(u,-90,90),o=b(c,-180,180);for(let s=0;s<r;s++){let r=0;s%2?(r|=_(i,e)<<4,r|=_(o,t)<<3,r|=_(i,e)<<2,r|=_(o,t)<<1,r|=_(i,e)<<0):(r|=_(o,t)<<4,r|=_(i,e)<<3,r|=_(o,t)<<2,r|=_(i,e)<<1,r|=_(o,t)<<0),n+=g(r)}return n}},16306:(e,t,r)=>{r.d(t,{aX:()=>E});var n=r(68773),i=r(20102),o=r(92604),s=r(38913),a=r(58901),l=r(73913),p=r(8744),d=r(40488),u=(r(66577),r(3172)),c=r(33955),h=r(11282),y=r(17452);async function m(e,t,r){const n="string"==typeof e?(0,y.mN)(e):e,i=t[0].spatialReference,o=(0,c.Ji)(t[0]),s={...r,query:{...n.query,f:"json",sr:(0,p.B9)(i),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:a}=await(0,u.Z)(n.path+"/simplify",s);var l;return function(e,t,r){const n=(0,c.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(a.geometries,o,i)}const f=()=>o.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof s.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new i.Z(e)}const r=(0,l.x3)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const i=e[n][0],o=e[n][1],s=e[n+1][0],a=e[n+1][1],l=Math.sqrt((s-i)*(s-i)+(a-o)*(a-o)),p=(a-o)/l,d=(s-i)/l,u=l/t;if(u>1){for(let e=1;e<=u-1;e++){const n=e*t,s=d*n+i,a=p*n+o;r.push([s,a])}const e=(l+Math.floor(u-1)*t)/2,n=d*e+i,s=p*e+o;r.push([n,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.Z({rings:n,spatialReference:e.spatialReference}):new a.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function _(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function v(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const i=t.cutIndexes[n],o=t.geometries[n],s=(0,l.x3)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(i===r){if(g(e))for(const t of(0,l.x3)(o))e[i]=e[i].addRing(t);else if(w(e))for(const t of(0,l.x3)(o))e[i]=e[i].addPath(t)}else r=i,e[i]=o}return e}async function E(e,t,r){if(!Array.isArray(e))return E([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let o,y,g,w,x,C,T,I,k=0;const M=[],L=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,y=(0,p.C5)(o),g=o.isWebMercator,C=g?102100:4326,w=l.UZ[C].maxX,x=l.UZ[C].minX,T=l.UZ[C].plus180Line,I=l.UZ[C].minus180Line),y)if("mesh"===t.type)L.push(t);else if("point"===t.type)L.push(_(t.clone(),w,x));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>_(e,w,x))),L.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);L.push(e.rings?new s.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,x)*(2*w);let n=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(T)&&e.xmax!==w?(k=e.xmax>k?e.xmax:k,n=b(n,g),M.push(n),L.push("cut")):e.intersects(I)&&e.xmin!==x?(k=e.xmax*(2*w)>k?e.xmax*(2*w):k,n=b(n,g,360),M.push(n),L.push("cut")):L.push(n)}else L.push(t.clone());else L.push(t);else L.push(t);let S=(0,l.XZ)(k,w),R=-90;const N=S,D=new a.Z;for(;S>0;){const e=360*S-180;D.addPath([[e,R],[e,-1*R]]),R*=-1,S--}if(M.length>0&&N>0){const t=v(M,await async function(e,t,r,n){const i=(0,h.en)(e),o=t[0].spatialReference,s={...n,responseType:"json",query:{...i.query,f:"json",sr:(0,p.B9)(o),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,u.Z)(i.path+"/cut",s),{cutIndexes:l,geometries:d=[]}=a.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,c.im)(e);return t.spatialReference=o,t}))}}(i,M,D,r)),n=[],o=[];for(let r=0;r<L.length;r++){const i=L[r];if("cut"!==i)o.push(i);else{const i=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(n.push(i),o.push("simplify")):o.push(g?(0,d.$)(i):i)}}if(!n.length)return o;const s=await m(i,n,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(g?(0,d.$)(s.shift()):s.shift())}return a}const j=[];for(let e=0;e<L.length;e++){const t=L[e];if("cut"!==t)j.push(t);else{const e=M.shift();j.push(!0===g?(0,d.$)(e):e)}}return j}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>s,XZ:()=>a,x3:()=>p});var n=r(58901),i=r(82971),o=r(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=p(e);for(const e of r)for(const r of e)r[0]+=t;return e}function p(e){return(0,o.oU)(e)?e.rings:e.paths}},30606:(e,t,r)=>{r.r(t),r.d(t,{default:()=>yr});var n=r(43697),i=(r(66577),r(46791)),o=r(20102),s=r(92604),a=r(95330),l=r(5600),p=r(80442),d=(r(77734),r(52011)),u=r(84864),c=r(87085),h=r(98732),y=r(5428),m=r(92036),f=r(30175),g=r(42033),w=r(38913),b=r(73615),_=r(8744),v=r(70272),E=r(33955);class x{constructor(){this._featureLookup=new Map}static getInstance(){return x.instance||(x.instance=new x),x.instance}static resetInstance(){x.instance&&(x.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const n=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let i,o=null;if(r&&e.properties[r]&&(o=(0,h.GH)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const n=this._featureLookup.get(e.id),s=JSON.parse(JSON.stringify(Object.assign(n.attributes,e.properties)));r&&e.properties[r]&&(s[r]=(0,E.im)(e.properties[r])),i=new v.u_(o?JSON.parse(JSON.stringify(o)):n?.geometry?JSON.parse(JSON.stringify(n.geometry)):null,s,null,e.properties[t])}else i=new v.u_(o?JSON.parse(JSON.stringify(o)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,i),n.push(i)})),n}}var C=r(3172),T=r(40330);let I=class extends m.Z{constructor(e){super(e),this.resultRows=[]}};(0,n._)([(0,l.Cb)()],I.prototype,"resultRows",void 0),I=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],I);const k=I;let M=class extends m.Z{constructor(e){super(e),this.resultRowsStream=new ReadableStream}};(0,n._)([(0,l.Cb)()],M.prototype,"resultRowsStream",void 0),M=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],M);const L=M;var S=r(96674),R=r(82971);let N=class extends S.wq{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=null,this.description=null,this.fieldNames=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],N.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],N.prototype,"unique",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],N.prototype,"ascending",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],N.prototype,"description",void 0),(0,n._)([(0,l.Cb)({type:[String],json:{write:!0}})],N.prototype,"fieldNames",void 0),N=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.FieldIndex")],N);const D=N;let j=class extends S.wq{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=null,this.required=null,this.defaultVisibility=null,this.systemMaintained=null,this.role=null,this.defaultValue=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],j.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],j.prototype,"alias",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],j.prototype,"fieldType",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],j.prototype,"geometryType",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"hasM",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"hasZ",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"nullable",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"editable",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"required",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"defaultVisibility",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"systemMaintained",void 0),(0,n._)([(0,l.Cb)()],j.prototype,"role",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{type:String,write:{writer:(e,t)=>{t.defaultValue=null!=e?e.toString():null}}}})],j.prototype,"defaultValue",void 0),j=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphProperty")],j);const P=j;let G=class extends S.wq{constructor(e){super(e),this.name=null,this.alias=null,this.role=null,this.strict=null,this.properties=null,this.fieldIndexes=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"alias",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"role",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"strict",void 0),(0,n._)([(0,l.Cb)({type:[P],json:{write:!0}})],G.prototype,"properties",void 0),(0,n._)([(0,l.Cb)({type:[D],json:{write:!0}})],G.prototype,"fieldIndexes",void 0),G=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObjectType")],G);const A=G;let O=class extends A{constructor(e){super(e)}};O=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.EntityType")],O);const Z=O;let F=class extends A{constructor(e){super(e),this.endPoints=[]}};(0,n._)([(0,l.Cb)()],F.prototype,"endPoints",void 0),F=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.RelationshipType")],F);const B=F;let q=class extends S.wq{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=null,this.entityTypes=null,this.relationshipTypes=null}};(0,n._)([(0,l.Cb)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],q.prototype,"timestamp",void 0),(0,n._)([(0,l.Cb)({type:R.Z,json:{write:!0}})],q.prototype,"spatialReference",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],q.prototype,"strict",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],q.prototype,"objectIdField",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],q.prototype,"globalIdField",void 0),(0,n._)([(0,l.Cb)()],q.prototype,"arcgisManaged",void 0),(0,n._)([(0,l.Cb)()],q.prototype,"identifierInfo",void 0),(0,n._)([(0,l.Cb)()],q.prototype,"searchIndexes",void 0),(0,n._)([(0,l.Cb)({type:[Z],json:{write:!0}})],q.prototype,"entityTypes",void 0),(0,n._)([(0,l.Cb)({type:[B],json:{write:!0}})],q.prototype,"relationshipTypes",void 0),q=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.DataModel")],q);const z=q;let Y=class extends S.wq{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1}};(0,n._)([(0,l.Cb)({type:[String],json:{write:!0}})],Y.prototype,"capabilities",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"supportsSearch",void 0),(0,n._)([(0,l.Cb)({type:[String],json:{write:!0}})],Y.prototype,"supportedQueryFormats",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"allowGeometryUpdates",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],Y.prototype,"searchMaxRecordCount",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{write:!0}})],Y.prototype,"serviceCapabilities",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],Y.prototype,"maxRecordCount",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],Y.prototype,"description",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],Y.prototype,"copyrightText",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],Y.prototype,"units",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{write:!0}})],Y.prototype,"spatialReference",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],Y.prototype,"currentVersion",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{write:!0}})],Y.prototype,"dateFieldsTimeReference",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],Y.prototype,"serviceItemId",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"supportsDocuments",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"dataEditingNotSupported",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"schemaEditingNotSupported",void 0),Y=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.ServiceDefinition")],Y);const U=Y;let Q=class extends S.wq{constructor(e){super(e),this.dataModel=null,this.serviceDefinition=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],Q.prototype,"url",void 0),(0,n._)([(0,l.Cb)({type:z,json:{write:!0}})],Q.prototype,"dataModel",void 0),(0,n._)([(0,l.Cb)({type:U,json:{write:!0}})],Q.prototype,"serviceDefinition",void 0),Q=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.KnowledgeGraph")],Q);const H=Q;var J=r(99880);const V="esri/rest/knowledgeGraph/wasmInterface/";let $,X=null;async function W(){const e=X??$;if(e)return e;const t=(0,p.Z)("wasm-simd");return $=async function(e){if(e){const{default:e}=await r.e(5389).then(r.bind(r,35389)).then((e=>e.a));return e({locateFile:e=>(0,J.V)(V+e)})}const{default:t}=await r.e(9931).then(r.bind(r,39931)).then((e=>e.a));return t({locateFile:e=>(0,J.V)(V+e)})}(t),$}var K=r(65091),ee=r(94139),te=r(58901),re=r(9361);function ne(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(se(e,t))})),r}function ie(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,i]of Object.entries(e))r.set_key_value(n,se(i,t));return r}function oe(e,t){if(e instanceof K.Z)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{n[o]=e,o++}))})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof ee.Z)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=1,n[0]=e.x,n[1]=e.y;let o=2;return e.hasZ&&(n[o]=e.z,o++),e.hasM&&(n[o]=e.m,o++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof te.Z||e instanceof w.Z)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];let o=[];e instanceof te.Z?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof w.Z&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{n[a]=e,a++}))})),i[s]=t,s++})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);throw new o.Z("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function se(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof re.Z)return oe(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(se(e,t))})),r}return ie(e,t)}let ae=class extends S.wq{constructor(e){super(e),this.properties=null}};(0,n._)([(0,l.Cb)({json:{write:!0}})],ae.prototype,"properties",void 0),ae=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObject")],ae);const le=ae;let pe=class extends le{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],pe.prototype,"typeName",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],pe.prototype,"id",void 0),pe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphNamedObject")],pe);const de=pe;let ue=class extends de{constructor(e){super(e),this.layoutGeometry=null}};(0,n._)([(0,l.Cb)({type:ee.Z,json:{write:!0}})],ue.prototype,"layoutGeometry",void 0),ue=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.Entity")],ue);const ce=ue;let he=class extends de{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],he.prototype,"originId",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],he.prototype,"destinationId",void 0),(0,n._)([(0,l.Cb)({type:te.Z,json:{write:!0}})],he.prototype,"layoutGeometry",void 0),he=(0,n._)([(0,d.j)("esri.rest.Relationship.Relationship")],he);const ye=he;function me(e,t){if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(e instanceof ce){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,fe(i,t));return e.id&&r.set_id(e.id),r}if(e instanceof ye){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,fe(i,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new o.Z("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function fe(e,t){return null==e?"":"object"!=typeof e||e instanceof Date?e:e instanceof re.Z?oe(e,t):""}let ge=class extends m.Z{constructor(e){super(e),this.name=null,this.supportedCategory=null,this.analyzers=[],this.searchProperties=new Map}};(0,n._)([(0,l.Cb)()],ge.prototype,"name",void 0),(0,n._)([(0,l.Cb)()],ge.prototype,"supportedCategory",void 0),(0,n._)([(0,l.Cb)()],ge.prototype,"analyzers",void 0),(0,n._)([(0,l.Cb)()],ge.prototype,"searchProperties",void 0),ge=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.SearchIndex")],ge);const we=ge;var be,_e,ve,Ee,xe,Ce,Te,Ie;function ke(e){return e.deleteLater(),new Z(Le(e))}function Me(e){return e.deleteLater(),new D({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:De(e.fields)})}function Le(e){return{name:e.name,alias:e.alias,role:be[e.role.value]?be[e.role.value]:null,strict:e.strict,properties:je(e.properties),fieldIndexes:Pe(e.field_indexes)}}function Se(e){return e.deleteLater(),new P({alias:e.alias,name:e.name,fieldType:_e[e.field_type.value]?_e[e.field_type.value]:null,geometryType:ve[e.geometry_type.value]?ve[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Ce[e.role.value],defaultValue:e.default_value})}function Re(e){e.deleteLater();const t=Le(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new B(Object.assign({endPoints:r},t))}function Ne(e){const t=[];for(let r=0;r<e.size();r++)t.push(ke(e.get(r)));return e.delete(),t}function De(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function je(e){const t=[];for(let r=0;r<e.size();r++)t.push(Se(e.get(r)));return e.delete(),t}function Pe(e){const t=[];for(let r=0;r<e.size();r++)t.push(Me(e.get(r)));return e.delete(),t}function Ge(e){const t=[];for(let r=0;r<e.size();r++)t.push(Re(e.get(r)));return e.delete(),t}function Ae(e){const t=[];for(let r=0;r<e.size();r++){const r=new we,n=e.get(0);r.name=n.name,r.supportedCategory=xe[n.supported_category.value];const i=n.analyzers.size();for(let e=0;e<i;e++)r.analyzers.push({name:n.analyzers.get(e).name});n.analyzers.delete();for(let e=0;e<n.search_properties.keys().size();e++){const t=n.search_properties.keys().get(e),i=n.search_properties.get(t),o=[];for(let e=0;e<i.property_names.size();e++)o.push(i.property_names.get(e));r.searchProperties.set(t,{propertyNames:o})}t.push(r)}return e.delete(),t}(Ie=be||(be={}))[Ie.Regular=0]="Regular",Ie[Ie.Provenance=1]="Provenance",Ie[Ie.Document=2]="Document",function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(_e||(_e={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(ve||(ve={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(Ee||(Ee={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(xe||(xe={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension"}(Ce||(Ce={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(Te||(Te={}));let Oe=class extends le{constructor(e){super(e)}};Oe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.ObjectValue")],Oe);const Ze=Oe;let Fe=class extends S.wq{constructor(e){super(e),this.path=null}};(0,n._)([(0,l.Cb)({type:[le],json:{write:!0}})],Fe.prototype,"path",void 0),Fe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.Path")],Fe);const Be=Fe;var qe,ze,Ye;function Ue(e){const t={},r=Qe(e,t),n=e.lengths,i=e.coords;let s="";if(e.geometry_type.value===qe.ESRI_GEOMETRY_POLYGON)s="rings";else{if(e.geometry_type.value!==qe.ESRI_GEOMETRY_POLYLINE)throw new o.Z("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");s="paths"}t[s]=[];let a=0;return n.forEach((e=>{const n=[];for(let t=0;t<e;t++){const e=[];for(let t=0;t<r;t++)e[t]=i[a],a++;n.push(e)}t[s].push(n)})),t}function Qe(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(qe||(qe={})),function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(ze||(ze={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(Ye||(Ye={}));const He=()=>s.Z.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors"),Je={decodedWasmObjToQueryResponseObj:(e,t)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case qe.ESRI_GEOMETRY_POINT:return function(e){const t={};let r=2;Qe(e,t);const n=e.coords;return t.x=n[0],t.y=n[1],e.has_z&&(t.z=n[r],r++),e.has_m&&(t.m=n[r]),new ee.Z(t)}(e);case qe.ESRI_GEOMETRY_MULTIPOINT:return function(e){const t={},r=Qe(e,t),n=e.lengths,i=e.coords,o=n[0];t.points=[];let s=0;for(let e=0;e<o;e++){const e=[];for(let t=0;t<r;t++)e[t]=i[s],s++;t.points.push(e)}return new K.Z(t)}(e);case qe.ESRI_GEOMETRY_POLYLINE:return r=e,new te.Z(Ue(r));case qe.ESRI_GEOMETRY_POLYGON:return function(e){return new w.Z(Ue(e))}(e);case qe.ESRI_GEOMETRY_ENVELOPE:case qe.ESRI_GEOMETRY_MULTI_PATCH:return He().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case qe.ESRI_GEOMETRY_NULL:case qe.ESRI_GEOMETRY_ANY:default:return He().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return He().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case ze.OBJECT:return function(e,t){return new Ze(Xe(e,t))}(e,t);case ze.ENTITY:return $e(e,t);case ze.RELATIONSHIP:return We(e,t);case ze.PATH:return function(e,t){const r=e.entity_count(),n=e.relationship_count(),i=[];for(let o=0;o<r;o++)i.push($e(e.get_entity_at(o),t)),o<n&&i.push(We(e.get_relationship_at(o),t));return new Be({path:i})}(e,t);case ze.ARRAY:return function(e,t){const r=[],n=e.count();for(let i=0;i<n;i++){const n=e.get_value_at(i);r.push(Ve(n,t))}return r}(e,t);default:return He().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}var r}};function Ve(e,t){return Je.decodedWasmObjToQueryResponseObj(e,t)}function $e(e,t){const r=e.type_name,n=Xe(e,t),i=e.get_id();return new ce(Object.assign({typeName:r,id:i},n))}function Xe(e,t){const r={},n=e.key_count();for(let i=0;i<n;i++)r[e.get_key_at(i)]=Ve(e.get_value_at(i),t);return{properties:r}}function We(e,t){const r=e.type_name,n=Xe(e,t);return new ye(Object.assign({typeName:r,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},n))}let Ke=class extends m.Z{constructor(e){super(e),this.hasError=null,this.error=null,this.editResults=[]}};(0,n._)([(0,l.Cb)()],Ke.prototype,"hasError",void 0),(0,n._)([(0,l.Cb)()],Ke.prototype,"error",void 0),(0,n._)([(0,l.Cb)()],Ke.prototype,"editResults",void 0),Ke=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphApplyEdits")],Ke);const et=Ke,tt={fetchKnowledgeGraph:async e=>{const t=new H({url:e}),r=[];return r.push(nt(t)),r.push(async function(e){return tt.refreshServiceDefinition(e)}(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await ut(e)},refreshServiceDefinition:async e=>{const t=(await(0,C.Z)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new U(t),e.serviceDefinition},executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await ot(e);const i=await lt(n,r);i.data.body=await async function(e,t){const r=await W(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,i]of Object.entries(e.bindParameters))at(t,i,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await nt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new o.Z("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r);try{n.encode()}catch(e){throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const i=n.get_encoding_result();if(0!==i.error.error_code)throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return i.get_byte_buffer()}(t,e);const s=await it(i.data.url,i.data);if(e.dataModel)return new L({resultRowsStream:await dt(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new o.Z("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await ot(e);const i=await lt(n,r);return i.data.body=await async function(e,t){if(t.dataModel||await nt(t),!t.dataModel)throw new o.Z("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await W(),n=!!e.options?.cascadeDelete,i=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());i.deleteLater(),i.cascade_delete=n;try{let t;e.entityAdds?.forEach((e=>{t=i.add_entity(me(e,r)),st(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new o.Z("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=i.add_relationship(me(e,r)),st(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_entity(me(e,r)),st(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_relationship(me(e,r)),st(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),i.encode()}catch(e){throw new o.Z("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=i.get_encoding_result();return st(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),s.get_byte_buffer()}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await W()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=new et;t.hasError=e.has_error(),t.hasError&&(t.error={errorCode:e.error.error_code,errorMessage:e.error.error_message});const r=e.get_edit_results_count();for(let n=0;n<r;n++){const r=e.get_edit_results_at(n),i=e.get_edit_results_type_name_at(n),o=[],s=[],a=[],l=r.get_add_results_count(),p=r.get_update_results_count(),d=r.get_delete_results_count();for(let e=0;e<l;e++){const t=r.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<p;e++){const t=r.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=r.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}t.editResults.push({typeName:i,adds:o,updates:s,deletes:a})}return t}(r)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await it(i.data.url,i.data))},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,i=await(0,C.Z)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=i.getHeader?.("content-type"),a=i.data;if(s?.includes("application/x-protobuf")){const t=new((await W()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new k({resultRows:pt(t,a,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:i.data})},executeSearch:async(e,t,r)=>{const n=t.typeCategoryFilter,i=`${e.url}/graph/search`,s=await(0,C.Z)(i,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),a=s.getHeader?.("content-type"),l=s.data;if(a?.includes("application/x-protobuf")){const t=new((await W()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new k({resultRows:pt(t,l,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await ot(e);const i=await lt(n,r);i.data.body=await async function(e){const t=await W(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(ne(e.idsFilter,t))}catch(e){throw new o.Z("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const n=r.get_encoding_result();if(0!==n.error.error_code)throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return n.get_byte_buffer()}(t);const s=await it(i.data.url,i.data);if(e.dataModel)return new L({resultRowsStream:await dt(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},_fetchWrapper:async(e,t)=>fetch(e,t)};async function rt(e,t,r){return tt.executeQueryStreaming(e,t,r)}async function nt(e){return tt.refreshDataModel(e)}async function it(e,t){return tt._fetchWrapper(e,t)}async function ot(e){const t=T.id?.findCredential(e.url);t||(e.dataModel?await ut(e):await nt(e))}function st(e,t,r){if(0!==e.error_code)throw new o.Z(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function at(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof re.Z?r.set_param_key_value(e,oe(t,n)):t instanceof Array?r.set_param_key_value(e,ne(t,n)):r.set_param_key_value(e,ie(t,n))}async function lt(e,t){return(0,C.Z)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}function pt(e,t,r){e.push_buffer(new Uint8Array(t));const n=[];let i=0;for(;e.next_row();){i||(i=e.get_header_keys().size());const t=new Array(i);for(let n=0;n<i;n++){const i=e.get_value(n);t[n]=Ve(i,r)}n.push(t)}if(e.has_error())throw new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return n}async function dt(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await W()).GraphQueryDecoder);return n.deleteLater(),new ReadableStream({async start(e){try{return function i(){return r?.read().then((({done:s,value:a})=>{if(s){let t;if(n.has_error()&&(t=new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:n.error.error_code,errorMessage:n.error.error_message})),r.releaseLock(),t)throw e.error(t),t;return void e.close()}const l=pt(n,a,t);return l.length>0&&e.enqueue(l),i()}))}()}catch(t){r?.releaseLock(),e.error(new o.Z("knowledge-graph:stream-decoding-error","The server returned a valid response, but there was an error decoding the response stream",{error:t})),e.close()}}})}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function ut(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,C.Z)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),i=r.data;if(n?.includes("application/x-protobuf")){const e=(await W()).decode_data_model_from_protocol_buffer(new Uint8Array(i));if(!e)throw new o.Z("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){return e.deleteLater(),new z({timestamp:e.timestamp,spatialReference:new R.Z(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:Te[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:Ee[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:Ae(e.search_indexes),entityTypes:Ne(e.entity_types),relationshipTypes:Ge(e.relationship_types)})}(e)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}let ct=class extends m.Z{constructor(e){super(e),this.openCypherQuery=""}};(0,n._)([(0,l.Cb)()],ct.prototype,"openCypherQuery",void 0),ct=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQuery")],ct);const ht=ct;let yt=class extends ht{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null}};(0,n._)([(0,l.Cb)()],yt.prototype,"bindParameters",void 0),(0,n._)([(0,l.Cb)()],yt.prototype,"bindGeometryQuantizationParameters",void 0),(0,n._)([(0,l.Cb)()],yt.prototype,"outputQuantizationParameters",void 0),yt=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryStreaming")],yt);const mt=yt;var ft,gt,wt,bt,_t,vt,Et;function xt(e){if(!e.spatialReference.isWGS84)throw new o.Z("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");let t;return t=e.xmax>180&&e.xmin<180?[[[e.xmin,e.ymin],[e.xmin,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[-180,e.ymin]]]:e.xmax>180&&e.xmin>180?[[[e.xmin-360,e.ymin],[e.xmin-360,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[e.xmin-360,e.ymin]]]:e.xmax>-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin+360,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[-180,e.ymin]]]:e.xmax<-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[e.xmax+360,e.ymax],[e.xmax+360,e.ymin],[e.xmin+360,e.ymin]]]:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]],t}(Et=ft||(ft={}))[Et.OID=0]="OID",Et[Et.ELEMENTUID=1]="ELEMENTUID",Et[Et.TYPENAME=2]="TYPENAME",Et[Et.AGGREGATEDBY=3]="AGGREGATEDBY",Et[Et.CENTRALITYDEGREE=4]="CENTRALITYDEGREE",Et[Et.CENTRALITYINDEGREE=5]="CENTRALITYINDEGREE",Et[Et.CENTRALITYOUTDEGREE=6]="CENTRALITYOUTDEGREE",Et[Et.CENTRALITYBETWEENNESS=7]="CENTRALITYBETWEENNESS",Et[Et.CENTRALITYHARMONIC=8]="CENTRALITYHARMONIC",Et[Et.CENTRALITYCLOSENESS=9]="CENTRALITYCLOSENESS",Et[Et.CENTRALITYEIGEN=10]="CENTRALITYEIGEN",Et[Et.CENTRALITYPAGERANK=11]="CENTRALITYPAGERANK",function(e){e[e.OID=0]="OID",e[e.ELEMENTUID=1]="ELEMENTUID",e[e.TYPENAME=2]="TYPENAME",e[e.FROMUID=3]="FROMUID",e[e.TOUID=4]="TOUID",e[e.AGGREGATEDBY=5]="AGGREGATEDBY"}(gt||(gt={})),function(e){e[e.featureResult=0]="featureResult",e[e.countResult=1]="countResult",e[e.idsResult=2]="idsResult"}(wt||(wt={})),function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(bt||(bt={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(_t||(_t={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(vt||(vt={}));var Ct=r(14165),Tt=r(6570);const It="ESRI__ID",kt="ESRI__ORIGIN_ID",Mt="ESRI__DESTINATION_ID",Lt="ESRI__LAYOUT_GEOMETRY",St=12;let Rt=class extends m.Z{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,n)=>{if("entity"===t.get(n))this.entityTypeNames.add(n);else{if("relationship"!==t.get(n))return s.Z.getLogger(this).warn(`A named type, ${n}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(n);this.relationshipTypeNames.add(n)}const i=new Map;r.members?.forEach((e=>{(0,f.s1)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(n);const t=this.getById(e.id);t&&i.set(e.id,t)})),this.sublayerCaches.set(n,i)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new o.Z("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||(r.members=new Map),r.members.set(t,{id:t}),(0,f.s1)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,f.s1)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return x.getInstance().readFromStoreById(e)}async getData(e,t,r){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let n;if(n=e||new Ct.Z({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),i=n.outFields,o=n.geometry;let s="",a="";o&&o.extent&&(s=(0,u.fC)(o.extent.ymin,o.extent.xmin,St),a=(0,u.fC)(o.extent.ymax,o.extent.xmax,St)),i&&1===i.length&&i[0]===It&&"1=1"===n.where||await Promise.all(r??[]);const l=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],p=[];return l.forEach((r=>{if(this.relationshipTypeNames.has(t.objectType.name)?r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]):r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]),r.attributes[Lt]=r.geometry,s&&a){const n=e.linkChartGeohashLookup.get(r.attributes[t.objectIdField]);n?n>=s&&n<=a&&p.push(r):p.push(r)}else p.push(r)})),p}return this.retrieveDataFromService(n,t,r)}async getConnectedRecordIds(e,t){const r=[];let n="";const i=[],o=new Map;if(e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(t))return;o.has(t)?o.get(t)?.push(e):o.set(t,[e])}})),t&&0!==t?.length){for(const e of t)n=n+e+"|";n=n.slice(0,-1)}return o.forEach(((e,o)=>{let a;a=t&&0!==t?.length?`MATCH (n:${o})-[r:${n}]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${o})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`;const l=new Promise((t=>{(async()=>{const t=(await rt(this.knowledgeGraph,new mt({openCypherQuery:a,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;for(let e=0;e<n.length;e++){const t=n[e];r.push({id:t[0],typeName:t[1]}),r.push({id:t[2],typeName:t[3]})}}}catch(e){if("AbortError"!==e.name)throw e;s.Z.getLogger(this).info("Request aborted as expected")}})().then((()=>{t()}))}));i.push(l)})),this.refreshCacheContent(),await Promise.all(i),r}async refreshCacheContent(e,t,r,n=!0){const i=x.getInstance(),s=[],a=new Map,l=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))a.has(t)?a.get(t)?.push(e):a.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?a.set(t,null):e.members&&e.members.forEach((e=>{a.has(t)&&null!==a.get(t)?a.get(t)?.push(e.id):a.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})));for(const[e,p]of a){const a=new Promise((s=>{(async()=>{const s=new Set,a=[];let d,u="",c=!1;if(t||l.get(e)?.properties?.forEach((e=>{e.name&&s.add(e.name)})),r&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&s.add(t)}if(this.entityTypeNames.has(e))u=`MATCH (n:${e}) ${p?"WHERE id(n) IN $ids ":""}return ID(n)`,s.forEach((e=>{u+=`, n.${e}`,a.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new o.Z("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);c=!0,u=`MATCH ()-[n:${e}]->() ${p?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,s.forEach((e=>{u+=`, n.${e}`,a.push(e)}))}d=new mt(p?{openCypherQuery:u,bindParameters:{ids:p}}:{openCypherQuery:u});const h=(await rt(this.knowledgeGraph,d)).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await h.read();if(t)break;const o=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,i=0;const s={properties:{}};for(s.id=t[n],n++,i++,c&&(s.originId=t[n],n++,i++,s.destinationId=t[n],n++,i++,(0,f.s1)(this.nodeConnectionsLookup,s.originId,(()=>new Set)).add(s.id),(0,f.s1)(this.nodeConnectionsLookup,s.destinationId,(()=>new Set)).add(s.id),(0,f.s1)(this.relationshipConnectionsLookup,s.id,(()=>[s.originId,s.destinationId])));n<t.length;n++)s.properties[a[n-i]]=t[n];o.push(s)}const s=i.writeToStore(o,It,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach((t=>{l?.set(t.attributes[It],t),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[It])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[It],{id:t.attributes[It]}),(0,f.s1)(this.memberIdTypeLookup,t.attributes[It],(()=>new Set)).add(e))}))}})().then((()=>{s(null)}))}));s.push(a),this._processingCacheUpdatesLookup.get(e)?.push(a)}await Promise.all(s)}removeFromLayer(e){const t=new Set,r=new Set(e.map((e=>e.id)));for(const r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,n)=>{r.has(n)&&this.sublayerCaches.get(e)?.delete(n)}))}))}async retrieveDataFromService(e,t,r){const n=x.getInstance(),i=new Set,s=[];let a,l="",p=[];const d="relationship"===t.graphType,u=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,c=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let h=!u&&c?Array.from(c).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(h=e.objectIds);else if(null!=e.objectIds&&h&&h.length>0){const t=e.objectIds;e.objectIds=h.filter((e=>t.includes(e)))}else if(null!=e.objectIds)h=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=h}if(null!=e.outFields){const r=e.outFields;r.includes("*")?t.fields.forEach((e=>{i.add(e.name)})):r.forEach((e=>{e!==It&&e!==t.geometryFieldName&&i.add(e)}))}if(null!=e.geometry){const r=e.geometry;let n;const p=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,u=p?.spatialReference,c=p?.serviceCapabilities?.geometryCapabilities;let h=c?.geometryMaxBoundingRectangleSizeX,y=c?.geometryMaxBoundingRectangleSizeY;if(r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,b.initializeProjection)(r.extent.spatialReference,_.Zn),n=(0,b.project)(r.extent,_.Zn)):n=r.extent,h&&y&&u){if(4326!==u.wkid){const e=new Tt.Z({spatialReference:u,xmax:h,ymax:y}),t=(0,b.project)(e,_.Zn);h=t.xmax,y=t.ymax}if(n.xmax-n.xmin>h)throw new o.Z("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${h}° latitude, limit exceeded`);if(n.ymax-n.ymin>y)throw new o.Z("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${y}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const r=await(0,g.E)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&i.add(e.name)}))}l=d?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{l+=`, n.${e}`,s.push(e)})),a=new mt({openCypherQuery:l,bindParameters:{param_filter_geom:new w.Z({rings:xt(n)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const n=await(0,g.E)(e.where,t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&i.add(e.name)}));const o=new Set(["column-reference","string","number","binary-expression"]),s=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&o.has(e.left.type)&&o.has(e.right.type)&&s.has(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let r=e.right.value;"%"===r.charAt(0)&&(r=r.slice(1)),"%"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),t+=`'${r.toLowerCase()}')`}return t}return a=!0,""};r=l(n.parseTree),a&&(r="")}let n="";n=d?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let o=!1;h&&(o=!0,n+=" WHERE ID(n) IN $ids"),r&&(n+=o?" AND":" WHERE",n+=` ${r}`),n+=" return ID(n)",d&&(n+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{n+=`, n.${e}`,s.push(e)})),a=new mt(h?{openCypherQuery:n,bindParameters:{ids:h}}:{openCypherQuery:n})}const y=(await rt(t.parentCompositeLayer.dataManager.knowledgeGraph,a,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await y.read();if(e)break;const i=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,o=0;const a={properties:{}};for(a.id=t[n],n++,o++,d&&(a.originId=t[n],n++,o++,a.destinationId=t[n],n++,o++);n<t.length;n++)a.properties[s[n-o]]=t[n];i.push(a)}p=p.concat(n.writeToStore(i,It,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return p}};(0,n._)([(0,l.Cb)()],Rt.prototype,"knowledgeGraph",void 0),(0,n._)([(0,l.Cb)()],Rt.prototype,"inclusionModeDefinition",void 0),(0,n._)([(0,l.Cb)()],Rt.prototype,"entityTypeNames",void 0),(0,n._)([(0,l.Cb)()],Rt.prototype,"relationshipTypeNames",void 0),(0,n._)([(0,l.Cb)()],Rt.prototype,"geographicLookup",void 0),(0,n._)([(0,l.Cb)()],Rt.prototype,"sublayerCaches",void 0),(0,n._)([(0,l.Cb)()],Rt.prototype,"nodeConnectionsLookup",void 0),(0,n._)([(0,l.Cb)()],Rt.prototype,"relationshipConnectionsLookup",void 0),(0,n._)([(0,l.Cb)()],Rt.prototype,"memberIdTypeLookup",void 0),Rt=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager")],Rt);var Nt=r(51773),Dt=(r(16050),r(93348),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423)),jt=r(32400),Pt=(r(56569),r(78990)),Gt=r(3489),At=r(25278);const Ot=(0,r(53518).v)(),Zt=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,n._)([(0,l.Cb)(Ot.fields)],t.prototype,"fields",void 0),(0,n._)([(0,l.Cb)(Ot.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,n._)([(0,d.j)("esri.layers.knowledgeGraphLayer.KnowledgeGraphSublayerBase")],t),t};var Ft=r(71612),Bt=r(55755),qt=r(34760),zt=r(72965),Yt=r(21506),Ut=r(1231),Qt=r(73012),Ht=r(74889),Jt=r(32163),Vt=r(728),$t=r(86973);let Xt=class extends((0,Bt.M)(Zt((0,Ft.h)((0,zt.M)((0,qt.Q)(c.Z)))))){constructor(e){if(super(e),this.capabilities=(0,At.MS)(!1,!1),this.definitionExpression="",this.displayField="",this.elevationInfo=null,this.geometryType=null,this.geometryFieldName=null,this.graphType=null,this.hasM=!1,this.hasZ=!1,this.labelsVisible=null,this.labelingInfo=null,this.objectIdField=It,this.objectType=null,this.parentCompositeLayer=null,this.popupEnabled=!0,this.popupTemplate=null,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new Vt.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=Ct.Z.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer","link-chart"===e.parentCompositeLayer.type)"relationship"===e.graphType?this.geometryType="polyline":this.geometryType="point",this.geometryFieldName=Lt;else if(e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType&&"esriGeometryNull"!==e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType){const t=e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name);this.geometryFieldName=t?.name??null,this.geometryType=t?.geometryType?$t.M.fromJSON(t.geometryType):null;const r=t?.name,n=r?e.objectType.properties?.[r]:null;n?(this.hasM=n.hasM??!1,this.hasZ=n.hasZ??!1):(this.hasM=!1,this.hasZ=!1)}else this.geometryType=null;e.objectType.properties?.forEach((e=>{let t=e.fieldType;"esriFieldTypeOID"===t&&(t="esriFieldTypeInteger"),this.fields.push(Ut.Z.fromJSON({name:e.name,type:t,alias:e.alias,defaultValue:null,editable:e.editable,nullable:e.nullable}))})),this.fields.push(Ut.Z.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1})),this._set("fields",[...this.fields]),e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel?.spatialReference&&(this.spatialReference=e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel.spatialReference),"link-chart"===e.parentCompositeLayer.type?"relationship"===e.graphType?this.renderer=(0,Dt.i)((0,At.bU)($t.M.toJSON("polyline")).renderer):this.renderer=(0,Dt.i)((0,At.bU)($t.M.toJSON("point")).renderer):this.renderer=(0,Dt.i)((0,At.bU)($t.M.toJSON(this.geometryType)).renderer)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,Qt.YN)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,Jt.eZ)(this,e)}createQuery(){return new Ct.Z({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];throw new Error("Field not found")}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e),i=Ht.Z.fromJSON(await n.executeQuery(r.toJSON(),t?.signal));return i.features.forEach((e=>{e.sourceLayer=this})),i}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return await n.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return n.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(r),o=await i.executeQueryForExtent(n.toJSON(),t?.signal);let s;return s=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new Tt.Z(o.extent):new Tt.Z,{count:o.count,extent:s}}async queryObjectIds(e,t){const r=Ct.Z.from(e);let n;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);n=this.loadQueryEngine(e)}return n.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new Pt.Z({geometryType:$t.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new Gt.q({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:$t.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new Ct.Z({where:"1=1",outFields:[It]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const r=Ct.Z.from(e),n=r.geometry;let i;if(n&&!n.spatialReference?.isWGS84&&(await(0,b.initializeProjection)(n.spatialReference,_.Zn),r.geometry=(0,b.project)(n instanceof w.Z||n instanceof te.Z?n:n.extent,_.Zn)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:i}}};(0,n._)([(0,l.Cb)()],Xt.prototype,"capabilities",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],Xt.prototype,"defaultPopupTemplate",null),(0,n._)([(0,l.Cb)()],Xt.prototype,"definitionExpression",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"displayField",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"elevationInfo",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"geometryType",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"geometryFieldName",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"graphType",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"hasM",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"hasZ",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"labelsVisible",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"labelingInfo",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"objectIdField",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"objectType",void 0),(0,n._)([(0,l.Cb)()],Xt.prototype,"parentCompositeLayer",void 0),(0,n._)([(0,l.Cb)(Yt.C_)],Xt.prototype,"popupEnabled",void 0),(0,n._)([(0,l.Cb)({type:Nt.Z,json:{name:"popupInfo",write:!0}})],Xt.prototype,"popupTemplate",void 0),(0,n._)([(0,l.Cb)({types:jt.A,json:{write:{target:"layerDefinition.drawingInfo.renderer"}}})],Xt.prototype,"renderer",null),(0,n._)([(0,l.Cb)()],Xt.prototype,"source",void 0),(0,n._)([(0,l.Cb)({json:{read:!1}})],Xt.prototype,"type",void 0),Xt=(0,n._)([(0,d.j)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],Xt);const Wt=Xt;let Kt,er=null;var tr,rr,nr,ir,or,sr,ar,lr,pr,dr,ur;function cr(e,t,r,n,i,o){const s=r.length,a=i.length,l=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,u=15+s*(d+2*l)+a*(2*p),c=er._malloc(u);try{const d=c+16-c%16,u=d+s*l,h=u+s*l,y=h+a*p,m=y+a*p,f=()=>[er.HEAPF64.subarray(d>>3,(d>>3)+s),er.HEAPF64.subarray(u>>3,(u>>3)+s),er.HEAPU32.subarray(h>>2,(h>>2)+a),er.HEAPU32.subarray(y>>2,(y>>2)+a),er.HEAPU8.subarray(m,m+s)],[g,w,b,_,v]=f();g.set(r),w.set(n),b.set(i),_.set(o),v.set(t);const E=e(s,m,d,u,a,h,y);let x=null;if(E){const e=er.getLayoutLinksTypes(),t=er.getLayoutLinksVerticesEndIndices(),r=er.getLayoutLinksVertices(),n=er.countLayoutLinksVertices();x={types:er.HEAPU8.subarray(e,e+a),vertexEndIndex:er.HEAPU32.subarray(t>>2,(t>>2)+a),vertices:er.HEAPF64.subarray(r>>3,(r>>3)+2*n)}}const[C,T,I,k,M]=f();return r.set(C),n.set(T),i.set(I),o.set(k),t.set(M),{success:E,links:x}}finally{er._free(c),er.cleanupLayout()}}(nr=tr||(tr={}))[nr.None=0]="None",nr[nr.IsMovable=1]="IsMovable",nr[nr.IsGeographic=2]="IsGeographic",nr[nr.IsRoot=4]="IsRoot",function(e){e[e.Regular=0]="Regular",e[e.Orthogonal=1]="Orthogonal",e[e.Curved=2]="Curved",e[e.Recursive=3]="Recursive"}(rr||(rr={})),function(e){e.getMinIdealEdgeLength=function(){return er.getMinIdealEdgeLength()},e.apply=function(e,t,r,n,i,o=2,s=1,a=-1){return cr(((e,t,r,n,i,l,p)=>er.applyForceDirectedLayout(e,t,r,n,i,l,p,o,s,a)),e,t,r,n,i)}}(ir||(ir={})),function(e){e.apply=function(e,t,r,n,i,o=2,s=1,a=-1){return cr(((e,t,r,n,i,l,p)=>er.applyCommunityLayout(e,t,r,n,i,l,p,o,s,a)),e,t,r,n,i)}}(or||(or={})),function(e){e.apply=function(e,t,r,n,i){return cr(er.applySimpleLayout,e,t,r,n,i)}}(sr||(sr={})),function(e){e.apply=function(e,t,r,n,i){return cr(er.applyHierarchicalLayout,e,t,r,n,i)}}(ar||(ar={})),function(e){e.apply=function(e,t,r,n,i){return cr(er.applyRadialTreeLayout,e,t,r,n,i)}}(lr||(lr={})),function(e){e.apply=function(e,t,r,n,i){return cr(er.applySmartTreeLayout,e,t,r,n,i)}}(pr||(pr={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(dr||(dr={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(ur||(ur={}));let hr=class extends((0,Ft.h)((0,zt.M)(c.Z))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE",xScaleFactor:1,yScaleFactor:1},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new i.Z,this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new Tt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new i.Z,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new o.Z("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let r=[],n=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new o.Z("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(r=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,o)=>{if(!this._graphTypeLookup.get(o))return s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);this._graphTypeLookup.get(o)instanceof B||"strictOrigin"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),n.push(this._graphTypeLookup.get(o))):this._graphTypeLookup.get(o)instanceof Z||"properties"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),r.push(this._graphTypeLookup.get(o))):(s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(r=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]);const i=new Rt({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=r,this.memberRelationshipTypes=n,this.dataManager=i}load(e){return this.addResolvingPromise(new Promise((t=>{(async function(e){return tt.fetchKnowledgeGraph(e)})(this.url).then((r=>{if(this._initializeLayerProperties({knowledgeGraph:r,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof y.Z?e.linkChartLocation:e.linkChartLocation?(0,h.GH)(e.linkChartLocation):null,t&&2===t.coords.length&&0===t.lengths.length?(this.linkChartGeohashLookup.set(e.id,(0,u.fC)(t.coords[1],t.coords[0],St)),this.entityLinkChartDiagramLookup.set(e.id,t)):(this.linkChartGeohashLookup.set(e.id,""),this.relationshipLinkChartDiagramLookup.set(e.id,t))})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,a.k_)(e);const t=[],r=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{r.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{r.push(e.refreshCachedQueryEngine())})),await Promise.all(r)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let r=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(r=await async function(e,t){const r=[],n=new Map,i=[];if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);for(const[e,o]of n){if(o.length<1)continue;const n=new mt({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:o}});i.push(rt(t,n).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:n}=await t.read();if(e)break;for(const e of n)r.push({id:e[0],typeName:e[1]}),r.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(i),r}(e,this.dataManager.knowledgeGraph));const n=e.concat(r).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(n)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:r=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let n=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&n.push(t);if(t){const e=new Set,t=[];for(const t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const r of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(r);for(const r of e)if(this.dataManager.memberIdTypeLookup.has(r))for(const e of this.dataManager.memberIdTypeLookup.get(r))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:r,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const e of n)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);r&&await this.calculateLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor});const i=[];return this.layers.forEach((e=>{i.push(e.refreshCachedQueryEngine())})),await Promise.all(i),this._refreshNamedTypes(),n}async expand(e,t){const r=await this.dataManager.getConnectedRecordIds(e,t),n=r.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(r),{records:n}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new Wt({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new Wt({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const r=((e,t,r)=>(e.has(t)||e.set(t,new Set),e.get(t)))(this.sublayerIdsCache,t);e.members?.forEach((e=>{if(r.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof y.Z)this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],St)):this.linkChartGeohashLookup.set(e.id,"");else{const r=(0,h.GH)(e.linkChartLocation);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation?r:null):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation?r:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(e.linkChartLocation.x,e.linkChartLocation.y,St)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const n=[],i=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{n.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const a=new Map,l=new Map,p=new Map,d=new Map,c=new Uint8Array(n.length),y=new Float64Array(n.length),m=new Float64Array(n.length),f=new Uint32Array(i.length),g=new Uint32Array(i.length),w=[],b=t?.xScaleFactor??1,_=t?.yScaleFactor??1,v=new Tt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let E,x="FORCE_DIRECTED",C=0,T=0;switch(x="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,x){case"FORCE_DIRECTED":E=ir.apply;break;case"COMMUNITY":E=or.apply;break;case"HIERARCHICAL":E=ar.apply;break;case"RADIAL_TREE":E=lr.apply;break;case"SMART_TREE":E=pr.apply;break;default:E=sr.apply}n.forEach((({typeName:r,feature:n})=>{if(t?.lockedNodeLocations?.has(n.attributes[It])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(r)?c[C]=tr.IsGeographic:c[C]=tr.None;const i=t.lockedNodeLocations.get(n.attributes[It]);y[C]=i.x,m[C]=i.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(r)){c[C]=tr.IsGeographic;let e=null;const t=n.attributes[this.dataManager.geographicLookup.get(r).name],i=this.dataManager.geographicLookup.get(r)?.geometryType;switch(i){case"esriGeometryPoint":y[C]=t?.x,m[C]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[C]=e.x,m[C]=e.y):c[C]=tr.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[C]=e.x,m[C]=e.y):c[C]=tr.IsMovable;break;default:c[C]=tr.IsMovable}(null==y[C]||null==m[C]||Number.isNaN(y[C])||Number.isNaN(m[C]))&&(c[C]=tr.IsMovable,y[C]=0,m[C]=0)}else c[C]=tr.IsMovable,y[C]=0,m[C]=0;d.set(n.attributes[It],C),w[C]={feature:n,typeName:r},C++}));let I=!1;i.forEach((e=>{const t=d.get(e.feature.attributes[kt]),r=d.get(e.feature.attributes[Mt]);void 0!==t&&void 0!==r?(f[T]=t,g[T]=r,T++):(I=!0,this.relationshipLinkChartDiagramLookup.set(e.feature.attributes[kt],null),this.linkChartGeohashLookup.set(e.feature.attributes[kt],null))})),I&&s.Z.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await(Kt||(Kt=r.e(6124).then(r.bind(r,36124)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,J.V)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){er=e}(e)})),Kt));const{success:k}=E(c,y,m,f,g);if(!k)throw new o.Z("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<w.length;e++){if(c[e]===tr.IsMovable&&(y[e]=y[e]*b,m[e]=m[e]*_),m[e]>84.9999&&(m[e]=84.9999),m[e]<-84.9999&&(m[e]=-84.9999),y[e]>179.9999&&(y[e]=179.9999),y[e]<-179.9999&&(y[e]=-179.9999),w[e].feature.attributes[Lt]=new ee.Z(y[e],m[e]),a.has(w[e].typeName)){const t=a.get(w[e].typeName);t?.set(w[e].feature.attributes[It],w[e].feature)}else{const t=new Map;t.set(w[e].feature.attributes[It],w[e].feature),a.set(w[e].typeName,t)}p.set(w[e].feature.attributes[It],w[e].feature);const t=(0,h.GH)(w[e].feature.attributes[Lt]);this.entityLinkChartDiagramLookup.set(w[e].feature.attributes[It],w[e].feature.attributes[Lt]?t:null),this.linkChartGeohashLookup.set(w[e].feature.attributes[It],(0,u.fC)(w[e].feature.attributes[Lt].y,w[e].feature.attributes[Lt].x,St)),w[e].feature.attributes[Lt].x<v.xmin&&(v.xmin=w[e].feature.attributes[Lt].x),w[e].feature.attributes[Lt].x>v.xmax&&(v.xmax=w[e].feature.attributes[Lt].x),w[e].feature.attributes[Lt].y<v.ymin&&(v.ymin=w[e].feature.attributes[Lt].y),w[e].feature.attributes[Lt].y>v.ymax&&(v.ymax=w[e].feature.attributes[Lt].y)}return this.linkChartExtent.xmin=v.xmin,this.linkChartExtent.xmax=v.xmax,this.linkChartExtent.ymin=v.ymin,this.linkChartExtent.ymax=v.ymax,i.forEach((e=>{const t=w[d.get(e.feature.attributes[kt])]?.feature.attributes[Lt],r=w[d.get(e.feature.attributes[Mt])]?.feature.attributes[Lt];if(!t||!r)return;const n=new te.Z({paths:[[t.x,t.y],[r.x,r.y]]});if(e.feature.attributes[Lt]=n,l.has(e.typeName)){const t=l.get(e.typeName);t?.set(e.feature.attributes[It],e.feature)}else{const t=new Map;t.set(e.feature.attributes[It],e.feature),l.set(e.typeName,t)}p.set(e.feature.attributes[It],e.feature);const i=(0,h.GH)(e.feature.attributes[Lt]);this.relationshipLinkChartDiagramLookup.set(e.feature.attributes[It],e.feature.attributes[Lt]?i:null),this.linkChartGeohashLookup.set(e.feature.attributes[It],"")})),this._currentLinkChartConfig={layoutMode:e,xScaleFactor:b,yScaleFactor:_},{nodes:a,links:l,idMap:p}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const r=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{r.push(e.refreshCachedQueryEngine())})),await Promise.all(r),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const r=t.linkChartLocation;let n;const i=t.id;r&&(n="x"in r?{x:r.x,y:r.y}:{x:r.coords[0],y:r.coords[1]},e.set(i,new ee.Z({x:n.x,y:n.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const r=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(e.members.keys()).filter((e=>!r.has(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const r of e)this.sublayerIdsCache.has(r.typeName)||(this.sublayerIdsCache.set(r.typeName,new Set),t.push(r.typeName)),this.sublayerIdsCache.get(r.typeName).add(r.id);for(const e of t)if(this._graphTypeLookup.has(e)){const t=this._graphTypeLookup.get(e),r="endPoints"in t?"relationship":"entity",n=new Wt({objectType:t,parentCompositeLayer:this,graphType:r,title:e});"entity"===r?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),n.geometryType?this.layers.push(n):this.tables.push(n),this.dataManager.sublayerCaches.set(e,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor})}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const r=e.linkChartLocation;let n;const i=e.id;if(!r)return;n="x"in r?{x:r.x,y:r.y}:{x:r.coords[0],y:r.coords[1]};const o=(0,h.GH)(n);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(i,o):this.entityLinkChartDiagramLookup.set(i,o),this.linkChartGeohashLookup.set(i,(0,u.fC)(n.x,n.y,St)),this.linkChartExtent.xmin>n.x&&(this.linkChartExtent.xmin=n.x),this.linkChartExtent.xmax<n.x&&(this.linkChartExtent.xmax=n.x),this.linkChartExtent.ymin>n.y&&(this.linkChartExtent.ymin=n.y),this.linkChartExtent.ymax<n.y&&(this.linkChartExtent.ymax=n.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[kt]),r=this.relationshipLinkChartDiagramLookup.get(e.attributes[Mt]);if(t&&r){const n=(0,h.GH)(new te.Z({paths:[[t.coords[0],t.coords[1]],[r.coords[0],r.coords[1]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[It],n)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[It],null);this.linkChartGeohashLookup.set(e.attributes[It],"")}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{xScaleFactor:this.defaultLinkChartConfig.xScaleFactor,yScaleFactor:this.defaultLinkChartConfig.yScaleFactor,lockedNodeLocations:this.getCurrentNodeLocations()}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}};(0,n._)([(0,l.Cb)()],hr.prototype,"dataPreloadedInLocalCache",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"defaultLinkChartConfig",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"dataManager",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"knowledgeGraph",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"layers",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"entityLinkChartDiagramLookup",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"linkChartExtent",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"linkChartGeohashLookup",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"memberEntityTypes",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"memberRelationshipTypes",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"sublayerIdsCache",void 0),(0,n._)([(0,l.Cb)()],hr.prototype,"tables",void 0),(0,n._)([(0,l.Cb)({json:{read:!1}})],hr.prototype,"type",void 0),hr=(0,n._)([(0,d.j)("esri.layers.LinkChartLayer")],hr);const yr=hr},37549:(e,t,r)=>{r.d(t,{H:()=>a});var n=r(80442),i=r(24133),o=r(24470);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,n.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((r,n)=>{e[t++]=n})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,r)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},78990:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(67676),i=r(20102),o=r(32448),s=r(92604),a=r(60437),l=r(24470),p=r(98732),d=r(37549),u=r(42712),c=r(65326);const h=(0,a.Ue)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new o.Z,this.featureAdapter=c.n}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,r,n,i]=this.fullBounds;return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:(0,u.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(n.pC)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,a.JR)(h,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,r)=>{this._markedIds.has(r)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void s.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let n;if(this._markedIds.add(t),r?(e.displayId=r.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,p.$)(null!=n?n:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return s.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const r=this._featuresById.get(t);if(!r)return this._add(e),e;this._markedIds.add(t);const{geometry:n,attributes:o}=e;for(const e in o)r.attributes[e]=o[e];return n&&(r.geometry=n,this._boundsStore.set(t,(0,p.$)((0,l.Ue)(),n,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>u,MS:()=>c,bU:()=>a});var n=r(80442),i=r(22974),o=r(61159),s=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,n.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function u(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},1231:(e,t,r)=>{r.d(t,{Z:()=>f});var n,i=r(43697),o=r(35454),s=r(96674),a=r(5600),l=r(75215),p=(r(77734),r(80442),r(36030)),d=r(71715),u=r(52011),c=r(72729),h=r(86719);const y=new o.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=n=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,i._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,i._)([(0,a.Cb)()],m.prototype,"description",void 0),(0,i._)([(0,d.r)("description")],m.prototype,"readDescription",null),(0,i._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],m.prototype,"domain",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,i._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,i._)([(0,p.J)(h.v)],m.prototype,"type",void 0),(0,i._)([(0,a.Cb)()],m.prototype,"valueType",void 0),(0,i._)([(0,d.r)("valueType",["description"])],m.prototype,"readValueType",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=n=(0,i._)([(0,u.j)("esri.layers.support.Field")],m);const f=m},1523:(e,t,r)=>{r.d(t,{Z:()=>F});var n=r(43697),i=r(9790),o=r(35454),s=r(96674),a=r(22974),l=r(62357),p=r(5600),d=(r(80442),r(92604),r(71715)),u=r(52011),c=r(30556),h=(r(77734),r(19153));const y="__begin__",m="__end__",f=new RegExp(y,"ig"),g=new RegExp(m,"ig"),w=new RegExp("^"+y,"i"),b=new RegExp(m+"$","i"),_='"';function v(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=function(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function E(e){let t;return e?(t=(0,h.gx)(e,(e=>y+'$feature["'+e+'"]'+m)),t=w.test(t)?t.replace(w,""):_+t,t=b.test(t)?t.replace(b,""):t+_,t=t.replaceAll(f,'" + ').replaceAll(g,' + "')):t='""',t}const x=/^\s*\{([^}]+)\}\s*$/i,C=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,T=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,I=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function k(e){if(!e)return null;let t=C.exec(e)||T.exec(e);return t?t[1]||t[3]:(t=I.exec(e),t?t[2]:null)}var M;let L=M=class extends s.wq{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?E(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=E(this.value)),null!=e&&(t[r]=e)}clone(){return new M({expression:this.expression,title:this.title,value:this.value})}};(0,n._)([(0,p.Cb)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],L.prototype,"expression",void 0),(0,n._)([(0,d.r)("expression",["expression","value"])],L.prototype,"readExpression",null),(0,n._)([(0,c.c)("expression")],L.prototype,"writeExpression",null),(0,n._)([(0,p.Cb)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],L.prototype,"title",void 0),(0,n._)([(0,p.Cb)({json:{read:!1,write:!1}})],L.prototype,"value",void 0),L=M=(0,n._)([(0,u.j)("esri.layers.support.LabelExpressionInfo")],L);const S=L;var R,N=r(84230),D=r(28412),j=r(21878);const P=new o.X({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function G(e,t,r){return{enabled:!(0,N.A2)(r?.layer)}}function A(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function O(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let Z=R=class extends s.wq{static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),i=n[3],o=r(t[n[4]],n[5],n[6]);switch(i){case"AND":return e&&o;case"OR":return e||o}}return!1}catch(t){console.log("Error.: can't parse = "+e)}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=D.Rz,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=function(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=k(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&A(n))e=new S({expression:this.getLabelExpressionArcade()});else if(!e)return;const i=e.toJSON(n);i.expression&&(t[r]=i)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return v(this)}getLabelExpressionArcade(){return function(e){const t=v(e);if(!t)return null;switch(t.type){case"conventional":return E(t.expression);case"arcade":return t.expression}return null}(this)}getLabelExpressionSingleField(){return function(e){const t=v(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(x);return t?.[1].trim()||null}(t.expression);case"arcade":return k(t.expression)}return null}(this)}hash(){return JSON.stringify(this)}clone(){return new R({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.d9)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.d9)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],Z.prototype,"name",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:G}}}}})],Z.prototype,"allowOverrun",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:G}}}}})],Z.prototype,"deconflictionStrategy",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&O(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],Z.prototype,"labelExpression",void 0),(0,n._)([(0,d.r)("labelExpression")],Z.prototype,"readLabelExpression",null),(0,n._)([(0,c.c)("labelExpression")],Z.prototype,"writeLabelExpression",null),(0,n._)([(0,p.Cb)({type:S,json:{write:{overridePolicy:(e,t,r)=>function(e){return A(e)||O(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],Z.prototype,"labelExpressionInfo",void 0),(0,n._)([(0,c.c)("labelExpressionInfo")],Z.prototype,"writeLabelExpressionInfo",null),(0,n._)([(0,p.Cb)({type:P.apiValues,json:{type:P.jsonValues,read:P.read,write:P.write}})],Z.prototype,"labelPlacement",void 0),(0,n._)([(0,p.Cb)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],Z.prototype,"labelPosition",void 0),(0,n._)([(0,p.Cb)({type:Number})],Z.prototype,"maxScale",void 0),(0,n._)([(0,c.c)("maxScale")],Z.prototype,"writeMaxScale",null),(0,n._)([(0,p.Cb)({type:Number})],Z.prototype,"minScale",void 0),(0,n._)([(0,c.c)("minScale")],Z.prototype,"writeMinScale",null),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:G}}}}})],Z.prototype,"repeatLabel",void 0),(0,n._)([(0,p.Cb)({type:Number,cast:l.t_,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:G}}}}})],Z.prototype,"repeatLabelDistance",void 0),(0,n._)([(0,p.Cb)({types:i.yK,json:{origins:{"web-scene":{types:i.S6,write:j.vX,default:null}},write:j.vX,default:null}})],Z.prototype,"symbol",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Z.prototype,"useCodedValues",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],Z.prototype,"where",void 0),Z=R=(0,n._)([(0,u.j)("esri.layers.support.LabelClass")],Z);const F=Z},21506:(e,t,r)=>{r.d(t,{qG:()=>v,PV:()=>f,id:()=>x,iR:()=>h,rn:()=>m,rT:()=>I,u1:()=>T,rO:()=>C,Oh:()=>b,bT:()=>_,C_:()=>c,Lx:()=>g,vg:()=>E,YI:()=>u,HQ:()=>y});var n=r(92835),i=r(82960),o=r(6570),s=r(82971),a=r(25929),l=(r(67676),r(35463)),p=r(86787),d=r(65242);const u={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:i.C}}},c={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,r){t[r]=!e}}}},h={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:i.C}}},y={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:a.w}}},m={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:i.C}}},f={value:null,type:p.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:i.C}}};function g(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const w={write:{enabled:!0,layerContainerTypes:i.C},read:!0},b={type:Number,json:{origins:{"web-document":w,"portal-item":{write:!0}}}},_={...b,json:{...b.json,origins:{"web-document":{...w,write:{enabled:!0,layerContainerTypes:i.C,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,r)=>r&&"service"!==r.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition?.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,d.b)(t.layerDefinition.drawingInfo.transparency):void 0:(0,d.b)(t.drawingInfo.transparency)}}},v={type:n.Z,readOnly:!0,get(){const e=null!=this.layer?.timeInfo?this.layer:null!=this.i3slayer?.timeInfo?this.i3slayer:null;if(null==e)return null;const{datesInUnknownTimezone:t,timeOffset:r,useViewTime:i}=e,o=this.view?.timeExtent;let s=e.timeExtent;t&&(s=function(e){if(!e)return e;const{start:t,end:r}=e;return new n.Z({start:null!=t?(0,l.Nm)(t,t.getTimezoneOffset(),"minutes"):t,end:null!=r?(0,l.Nm)(r,r.getTimezoneOffset(),"minutes"):r})}(s));let a=i?o&&s?o.intersection(s):o||s:s;if(!a||a.isEmpty||a.isAllTime)return a;r&&(a=a.offset(-r.value,r.unit)),t&&(a=function(e){if(!e)return e;const{start:t,end:r}=e;return new n.Z({start:null!=t?(0,l.Nm)(t,-t.getTimezoneOffset(),"minutes"):t,end:null!=r?(0,l.Nm)(r,-r.getTimezoneOffset(),"minutes"):r})}(a));const p=this._get("timeExtent");return a.equals(p)?p:a}},E={type:o.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const r=o.Z.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(r.spatialReference=s.Z.fromJSON(t.spatialReference)),r}}}},read:!1}},x={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},C={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.minScale",write:{enabled:!0,layerContainerTypes:i.C}}},name:"layerDefinition.minScale",write:!0}},T={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.maxScale",write:{enabled:!0,layerContainerTypes:i.C}}},name:"layerDefinition.maxScale",write:!0}},I={json:{write:{ignoreOrigin:!0,layerContainerTypes:i.C},origins:{"web-map":{read:!1,write:!1}}}}},72729:(e,t,r)=>{r.d(t,{im:()=>C,V5:()=>x}),r(80442);var n,i=r(43697),o=r(22974),s=r(5600),a=(r(92604),r(36030)),l=r(52011),p=r(96674);r(77734);let d=n=class extends p.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=n=(0,i._)([(0,l.j)("esri.layers.support.CodedValue")],d);const u=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends p.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,a.J)(u)],c.prototype,"type",void 0),c=(0,i._)([(0,l.j)("esri.layers.support.Domain")],c);const h=c;var y;let m=y=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,o.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,s.Cb)({type:[d],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,i._)([(0,a.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,i._)([(0,l.j)("esri.layers.support.CodedValueDomain")],m);const f=m;var g;r(20102);let w=g=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,a.J)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,i._)([(0,l.j)("esri.layers.support.InheritedDomain")],w);const b=w;var _;let v=_=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,s.Cb)({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]}}}})],v.prototype,"maxValue",void 0),(0,i._)([(0,s.Cb)({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]}}}})],v.prototype,"minValue",void 0),(0,i._)([(0,a.J)({range:"range"})],v.prototype,"type",void 0),v=_=(0,i._)([(0,l.j)("esri.layers.support.RangeDomain")],v);const E=v,x={key:"type",base:h,typeMap:{range:v,"coded-value":f,inherited:b}};function C(e){if(!e?.type)return null;switch(e.type){case"range":return E.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},99282:(e,t,r)=>{r.d(t,{a:()=>o});var n=r(67900),i=r(68441);const o={unknown:1,inches:(0,n.En)(1,"meters","inches"),feet:(0,n.En)(1,"meters","feet"),"us-feet":(0,n.En)(1,"meters","us-feet"),yards:(0,n.En)(1,"meters","yards"),miles:(0,n.En)(1,"meters","miles"),"nautical-miles":(0,n.En)(1,"meters","nautical-miles"),millimeters:(0,n.En)(1,"meters","millimeters"),centimeters:(0,n.En)(1,"meters","centimeters"),decimeters:(0,n.En)(1,"meters","decimeters"),meters:(0,n.En)(1,"meters","meters"),kilometers:(0,n.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,n.ty)(1,"meters",i.sv.radius)}},56545:(e,t,r)=>{r.d(t,{Z:()=>c});var n,i=r(43697),o=r(96674),s=r(22974),a=r(5600),l=r(75215),p=r(52011),d=r(30556);let u=n=class extends o.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new n((0,s.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],u.prototype,"attachmentTypes",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],u.prototype,"attachmentsWhere",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],u.prototype,"cacheHint",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],u.prototype,"keywords",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],u.prototype,"globalIds",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],u.prototype,"num",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],u.prototype,"objectIds",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],u.prototype,"returnMetadata",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],u.prototype,"size",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],u.prototype,"start",void 0),(0,i._)([(0,d.c)("start"),(0,d.c)("num")],u.prototype,"writeStart",null),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],u.prototype,"where",void 0),u=n=(0,i._)([(0,p.j)("esri.rest.support.AttachmentQuery")],u),u.from=(0,l.se)(u);const c=u},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var n,i=r(43697),o=r(66577),s=r(38171),a=r(35454),l=r(96674),p=r(22974),d=r(5600),u=(r(80442),r(92604),r(71715)),c=r(52011),h=r(30556),y=r(82971),m=r(33955),f=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.Z.fromJSON(i),a=i.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=i.aggregateGeometries,p=o.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],n=l[e],i=n?.spatialReference;null==t||i||(t.spatialReference=r)}n.push(o)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,m.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=y.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,i],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*o+n),(e=>i-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(a[0]),i=r(a[1]),o.push([n,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,m.oU)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,m.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.Cb)({type:[s.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,u.r)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,d.Cb)({type:[f.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,h.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,d.Cb)({types:o.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,u.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,d.Cb)({type:y.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,h.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,d.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,i._)([(0,c.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},11282:(e,t,r)=>{r.d(t,{cv:()=>a,en:()=>s,lA:()=>o}),r(68773),r(40330);var n=r(22974),i=r(17452);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.mN)(e):(0,n.d9)(e)}function a(e,t,r){const n={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){n[i]=[];for(let e=0;e<o.length;e++)n[i][e]=a(o[e])}else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(r?.[i]);n[i]=t?e:JSON.stringify(e)}else n[i]=t?o:JSON.stringify(o);else n[i]=o}return n}r(71058)},32163:(e,t,r)=>{r.d(t,{eZ:()=>p});var n=r(51773),i=r(73012),o=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(29986);function p({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:p},h){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(u),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new a.Z({fieldName:t.name,isEditable:(0,i.Hp)(t,e),label:t.alias,format:c(t),visible:d(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!m.length)return null;const f=function(e){const t=(0,i.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:p,fields:r,displayField:e}),g=[new s.Z,new o.Z];return new n.Z({title:f,content:g,fieldInfos:m})}const d=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,i.Fv)(e,t);function u(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"string":return(0,i.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]},86787:(e,t,r)=>{r.d(t,{Z:()=>_});var n,i=r(43697),o=r(35454),s=r(96674),a=r(70586),l=r(5600),p=(r(80442),r(92604),r(77734),r(71715)),d=r(52011),u=r(30556),c=r(73012);let h=n=class extends s.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,c.io)(e,t,this.expression)}clone(){return new n({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"expression",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"title",void 0),h=n=(0,i._)([(0,d.j)("esri.layers.support.FeatureExpressionInfo")],h);const y=h;var m,f=r(12541);const g=(0,o.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),w=new o.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let b=m=class extends s.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,r,n){t[r]=e.write({},n),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new m({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,i._)([(0,l.Cb)({type:y,json:{write:!0}})],b.prototype,"featureExpressionInfo",void 0),(0,i._)([(0,p.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],b.prototype,"readFeatureExpressionInfo",null),(0,i._)([(0,u.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],b.prototype,"writeFeatureExpressionInfo",null),(0,i._)([(0,l.Cb)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],b.prototype,"mode",null),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],b.prototype,"offset",void 0),(0,i._)([(0,l.Cb)({type:f.f9,json:{type:String,read:w.read,write:w.write}})],b.prototype,"unit",null),b=m=(0,i._)([(0,d.j)("esri.layers.support.ElevationInfo")],b);const _=b},12541:(e,t,r)=>{r.d(t,{Z7:()=>i,f9:()=>o});var n=r(99282);function i(e){return 1/(n.a[e]||1)}const o=function(){const e=Object.keys(n.a);return e.sort(),e}()},65242:(e,t,r)=>{r.d(t,{a:()=>i,b:()=>o});var n=r(75215);function i(e){const t=(0,n.vU)(100*(1-e));return Math.max(0,Math.min(t,100))}function o(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);