@arcgis/core 6.0.0-next.55 → 6.0.0-next.57

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 (298) hide show
  1. package/arcgisGlobal.d.ts +1 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/00c227bcecc28fe278bb.js +1 -0
  4. package/assets/esri/core/workers/chunks/033b9fcd9833db3b6e7d.js +1 -0
  5. package/assets/esri/core/workers/chunks/0978e12dd6a1cbc50b80.js +1 -0
  6. package/assets/esri/core/workers/chunks/{88df1b8b295d3aed649f.js → 10499abb7678e95d9f05.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{e956845255bce0910944.js → 1507297550c3cd1268e2.js} +1 -1
  8. package/assets/esri/core/workers/chunks/1afc8820c283ef785729.js +1 -0
  9. package/assets/esri/core/workers/chunks/1c0f5c42331fb6fc26cb.js +1 -0
  10. package/assets/esri/core/workers/chunks/1c874f86bfd0963aa3d2.js +1 -0
  11. package/assets/esri/core/workers/chunks/2a84c9a81ec2bed3d4e5.js +1 -0
  12. package/assets/esri/core/workers/chunks/2cd2fcf4a37d180d5d5c.js +1 -0
  13. package/assets/esri/core/workers/chunks/2f31766bc0f9d1d70c5a.js +1 -0
  14. package/assets/esri/core/workers/chunks/2f9adf0b809ce8797ebf.js +1 -0
  15. package/assets/esri/core/workers/chunks/35109db6a6be66f895f7.js +1 -0
  16. package/assets/esri/core/workers/chunks/373b140f92eda3857f82.js +1 -0
  17. package/assets/esri/core/workers/chunks/38bba952c38af5a150e7.js +1 -0
  18. package/assets/esri/core/workers/chunks/3982409149571a827390.js +1 -0
  19. package/assets/esri/core/workers/chunks/3aea09191b737dc1de70.js +1 -0
  20. package/assets/esri/core/workers/chunks/3d851710f7fcc27c5b60.js +2 -0
  21. package/assets/esri/core/workers/chunks/3e8d70039800f2395d66.js +1 -0
  22. package/assets/esri/core/workers/chunks/3fc4b7d0ee460fc96176.js +1 -0
  23. package/assets/esri/core/workers/chunks/457bd1bd37c67b61efe8.js +1 -0
  24. package/assets/esri/core/workers/chunks/4d8539674fc2e4fea03c.js +1 -0
  25. package/assets/esri/core/workers/chunks/{e61082f56c08abe54b3a.js → 5954f02c3901b28d8e73.js} +1 -1
  26. package/assets/esri/core/workers/chunks/5ba6007c3c49a8153256.js +1 -0
  27. package/assets/esri/core/workers/chunks/5bdd95eeb8f34dbf26f2.js +2 -0
  28. package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js → 5e47026c681238038955.js} +2 -2
  29. package/assets/esri/core/workers/chunks/{2baf35b1b19482d603b5.js → 5f7505ada0991cfbdd84.js} +1 -1
  30. package/assets/esri/core/workers/chunks/601d668e70c5d72fe58c.js +1 -0
  31. package/assets/esri/core/workers/chunks/651e33be8bb3995d749f.js +1 -0
  32. package/assets/esri/core/workers/chunks/{542a9c414c99d84d52ab.js → 6a202ef9ba9b89e09153.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{0826feebdca8a31eb630.js → 6ba6fece5c11fe2a6ace.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{5eb69e2895e5aec81051.js → 6fd10891506925560443.js} +1 -1
  35. package/assets/esri/core/workers/chunks/721f43554b9654481de7.js +1 -0
  36. package/assets/esri/core/workers/chunks/75274ac3ddf7c45f47d7.js +1 -0
  37. package/assets/esri/core/workers/chunks/7b6fd287e7043ad50f4e.js +1 -0
  38. package/assets/esri/core/workers/chunks/7baa49055bc31618b56e.js +1 -0
  39. package/assets/esri/core/workers/chunks/80d1267606383ae537f2.js +1 -0
  40. package/assets/esri/core/workers/chunks/8570e3df90fb76a8741a.js +1 -0
  41. package/assets/esri/core/workers/chunks/{c3c0f24a9e0047232ae1.js → 8679dfc0c53355b6feb0.js} +1 -1
  42. package/assets/esri/core/workers/chunks/8920d0b11951b57d6a66.js +1 -0
  43. package/assets/esri/core/workers/chunks/8a636dc51372e14c98f5.js +1 -0
  44. package/assets/esri/core/workers/chunks/{14259910f44c08fd5bbd.js → 9117c9b720c9ba6e7a6e.js} +1 -1
  45. package/assets/esri/core/workers/chunks/92d97e0fcc20dd5f5ac4.js +1 -0
  46. package/assets/esri/core/workers/chunks/9ca84fa9423654061d05.js +1 -0
  47. package/assets/esri/core/workers/chunks/9e372af03d62fa5ad10e.js +1 -0
  48. package/assets/esri/core/workers/chunks/a22458e5272332d86cb9.js +1 -0
  49. package/assets/esri/core/workers/chunks/{3ea480cebf8ee56228a5.js → a7dfca326883384d2751.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{723d8316f5d4b6ce2942.js → a9539393e2f1812a973a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{be0b8bb4f09aae6ff5de.js → ab784764ddf9d7f693a1.js} +1 -1
  52. package/assets/esri/core/workers/chunks/b10c534cbe311d17b7d5.js +1 -0
  53. package/assets/esri/core/workers/chunks/b38b6fe08a367e9de4f5.js +1 -0
  54. package/assets/esri/core/workers/chunks/{4e651869e9a196494694.js → b6e628b5d2643af4c19b.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{b37ab6b1cb4cfc85cd9d.js → b7828d7e2c5b75644057.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{ec465abb0344ad719e9d.js → bd8e329ec74d921d311a.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{9e508f930086d2ef5f22.js → be0133fa63c5d6545a7f.js} +40 -41
  58. package/assets/esri/core/workers/chunks/{56e6e70aa40e51827290.js → c3f94024c6c9eed9f273.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{6d17b45022dfd2548098.js → c5ddf8b347c31fe772a3.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{ee9af58ae202b803bba7.js → c7a0c4ca37ebd1d98cf1.js} +1 -1
  61. package/assets/esri/core/workers/chunks/cb0e3614b78c78040662.js +1 -0
  62. package/assets/esri/core/workers/chunks/d22e3b5d836dffdf91cc.js +1 -0
  63. package/assets/esri/core/workers/chunks/d7763c42754152510e13.js +2 -0
  64. package/assets/esri/core/workers/chunks/e0341def2d81e679a200.js +1 -0
  65. package/assets/esri/core/workers/chunks/e42e9dd3c933f5f864ab.js +1 -0
  66. package/assets/esri/core/workers/chunks/e566102c7ed7a8ebf89e.js +1 -0
  67. package/assets/esri/core/workers/chunks/e74586b074d0fa6abb4b.js +1 -0
  68. package/assets/esri/core/workers/chunks/e7dff025780726d5feae.js +1 -0
  69. package/assets/esri/core/workers/chunks/e96fa029acba59c04e4e.js +2 -0
  70. package/assets/esri/core/workers/chunks/f4fcf87da4495584223d.js +1 -0
  71. package/assets/esri/core/workers/chunks/f989588dfdbb69056491.js +1 -0
  72. package/assets/esri/core/workers/chunks/fc5b920f9756e11c2f88.js +1 -0
  73. package/assets/esri/core/workers/chunks/fdfbd201be372d3796bf.js +2 -0
  74. package/assets/esri/core/workers/chunks/ff0a0819bba5e8264c47.js +1 -0
  75. package/chunks/BlendLayers.glsl.js +1 -1
  76. package/chunks/ColorMaterial.glsl.js +14 -14
  77. package/chunks/Component.glsl.js +38 -37
  78. package/chunks/DefaultMaterial.glsl.js +15 -15
  79. package/chunks/GlobalIllumination.glsl.js +12 -11
  80. package/chunks/GlobalIlluminationBlur.glsl.js +6 -4
  81. package/chunks/HUDMaterial.glsl.js +3 -3
  82. package/chunks/Path.glsl.js +15 -15
  83. package/chunks/Pattern.glsl.js +20 -20
  84. package/chunks/RasterColorizer.glsl.js +1 -1
  85. package/chunks/ShadowHighlight.glsl.js +1 -1
  86. package/chunks/Terrain.glsl.js +28 -27
  87. package/chunks/Water.glsl.js +30 -20
  88. package/chunks/pdf.js +57 -0
  89. package/config.js +1 -1
  90. package/core/accessorSupport/write.js +1 -1
  91. package/core/memoryEstimations.js +1 -1
  92. package/core/scheduling.js +1 -1
  93. package/interfaces.d.ts +0 -1
  94. package/kernel.js +1 -1
  95. package/layers/LinkChartLayer.js +1 -1
  96. package/layers/VoxelWasmPerSceneView.js +1 -1
  97. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  98. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -56
  99. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  100. package/layers/geospatialPDF/parserUtils.js +2 -0
  101. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  102. package/layers/graphics/dehydratedFeatures.js +1 -1
  103. package/layers/graphics/transferFeatures.js +1 -1
  104. package/layers/support/ControlPoint.js +1 -1
  105. package/layers/support/ControlPointsGeoreference.js +1 -1
  106. package/layers/support/commonProperties.js +1 -1
  107. package/layers/support/fieldUtils.d.ts +129 -57
  108. package/layers/support/fieldUtils.js +1 -1
  109. package/layers/support/geospatialPDFUtils.d.ts +63 -0
  110. package/layers/support/geospatialPDFUtils.js +2 -0
  111. package/networks/Network.js +1 -1
  112. package/networks/support/TopologyValidationJobInfo.js +1 -1
  113. package/package.json +5 -5
  114. package/symbols/CIMSymbol.d.ts +9 -9
  115. package/symbols/PathSymbol3DLayer.d.ts +1 -1
  116. package/symbols/WaterSymbol3DLayer.d.ts +13 -1
  117. package/symbols/WaterSymbol3DLayer.js +1 -1
  118. package/views/3d/GroundView3D.js +1 -1
  119. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  120. package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
  121. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  122. package/views/3d/camera/intersectionUtils.js +1 -1
  123. package/views/3d/environment/EnvironmentView.js +1 -1
  124. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  125. package/views/3d/interactive/Manipulator3D.js +1 -1
  126. package/views/3d/interactive/Manipulator3DBase.js +1 -1
  127. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  128. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  129. package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
  130. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  131. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  132. package/views/3d/layers/DrapedSubView3D.js +1 -1
  133. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  134. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  135. package/views/3d/layers/FlowSubView3D.js +1 -1
  136. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  137. package/views/3d/layers/I3SMeshView3D.js +1 -1
  138. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  139. package/views/3d/layers/RouteLayerView3D.js +1 -1
  140. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  141. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  142. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  143. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  144. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  145. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  146. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  147. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  148. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  149. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  150. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  151. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  152. package/views/3d/layers/support/Tiles3DBVH.js +1 -1
  153. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  154. package/views/3d/layers/support/createTileBVHForLayer.js +1 -1
  155. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  156. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  157. package/views/3d/state/controllers/RotateController.js +1 -1
  158. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  159. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  160. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  161. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  162. package/views/3d/state/utils/navigationUtils.js +1 -1
  163. package/views/3d/support/GroundAndIMSurface.js +1 -1
  164. package/views/3d/support/QualityProfile.js +1 -1
  165. package/views/3d/support/QualitySettings.js +1 -1
  166. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  167. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  168. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  169. package/views/3d/terrain/BlendLayersTechniqueConfiguration.js +1 -1
  170. package/views/3d/terrain/OverlayManager.js +1 -1
  171. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  172. package/views/3d/terrain/RasterColorizerTechniqueConfiguration.js +1 -1
  173. package/views/3d/terrain/TerrainRenderer.js +1 -1
  174. package/views/3d/terrain/TerrainSurface.js +1 -1
  175. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  176. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
  177. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  178. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  179. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  180. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  181. package/views/3d/webgl-engine/core/shaderLibrary/clampShadowPosition.glsl.js +2 -0
  182. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +14 -14
  183. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
  184. package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +1 -1
  185. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +15 -12
  186. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -3
  187. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  188. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  189. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  190. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  191. package/views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js +1 -1
  192. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  193. package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
  194. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  195. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  196. package/views/3d/webgl-engine/lib/Program.js +1 -1
  197. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  198. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  199. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  200. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  201. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  202. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  203. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  204. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  205. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  206. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  207. package/views/3d/webgl-engine/materials/getWaterColor.glsl.js +89 -0
  208. package/views/3d/webgl-engine/parts/Model.js +1 -1
  209. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  210. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  211. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  212. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  213. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  214. package/views/Attribution.js +5 -5
  215. package/views/DOMContainer.d.ts +2 -1
  216. package/views/SceneView.js +1 -1
  217. package/views/draw/DrawGraphicTool.js +1 -1
  218. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  219. package/views/webgl/Program.js +3 -3
  220. package/views/webgl/ShaderBuilder.js +23 -23
  221. package/webscene/Slide.js +1 -1
  222. package/webscene/VirtualLighting.d.ts +2 -4
  223. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +17 -1
  224. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  225. package/widgets/BatchAttributeForm/inputs/support/inputUtils.d.ts +7 -0
  226. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  227. package/widgets/BatchAttributeForm.js +1 -1
  228. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  229. package/widgets/Sketch/SketchViewModel.js +1 -1
  230. package/widgets/Weather/WeatherViewModel.js +1 -1
  231. package/widgets/support/ContingentValuesManager.js +1 -1
  232. package/widgets/support/forms/types.d.ts +23 -1
  233. package/assets/esri/core/workers/chunks/144f18a3dd2c8cf07cf7.js +0 -1
  234. package/assets/esri/core/workers/chunks/193a73a2c7f4f8482c21.js +0 -1
  235. package/assets/esri/core/workers/chunks/20acb6f3ed5140b6c6c6.js +0 -1
  236. package/assets/esri/core/workers/chunks/23fc1c1ed483ed3b2298.js +0 -1
  237. package/assets/esri/core/workers/chunks/249a687ce1b6d0815242.js +0 -1
  238. package/assets/esri/core/workers/chunks/2634927d26cb1139c6d0.js +0 -1
  239. package/assets/esri/core/workers/chunks/2d1b8154ee40afc9d40b.js +0 -1
  240. package/assets/esri/core/workers/chunks/2d4788be418a4e5f6606.js +0 -1
  241. package/assets/esri/core/workers/chunks/333140b18aeb5a50b654.js +0 -1
  242. package/assets/esri/core/workers/chunks/4401b3f8ebb658abe789.js +0 -1
  243. package/assets/esri/core/workers/chunks/4761cd436abceee858bf.js +0 -1
  244. package/assets/esri/core/workers/chunks/4a41bf3d1e2e9bb79771.js +0 -2
  245. package/assets/esri/core/workers/chunks/4de08ead94660025075b.js +0 -1
  246. package/assets/esri/core/workers/chunks/56f227e1a9e51d1fd742.js +0 -1
  247. package/assets/esri/core/workers/chunks/5bd451c7db17ee8f0315.js +0 -1
  248. package/assets/esri/core/workers/chunks/5c34d49a6c9cc34b7626.js +0 -1
  249. package/assets/esri/core/workers/chunks/5f324d88785ffcb73ae0.js +0 -1
  250. package/assets/esri/core/workers/chunks/703373f529c1c334cfad.js +0 -1
  251. package/assets/esri/core/workers/chunks/70695e0fb53018d48e7b.js +0 -2
  252. package/assets/esri/core/workers/chunks/723c9ad4c25be2b82476.js +0 -1
  253. package/assets/esri/core/workers/chunks/733c32d8091427d84de7.js +0 -1
  254. package/assets/esri/core/workers/chunks/766a1357be2ed7f4e125.js +0 -1
  255. package/assets/esri/core/workers/chunks/844c593754b2692257f4.js +0 -1
  256. package/assets/esri/core/workers/chunks/846248697c398468d8e6.js +0 -1
  257. package/assets/esri/core/workers/chunks/860552f49f17de2f3353.js +0 -1
  258. package/assets/esri/core/workers/chunks/89e55895683369b5277a.js +0 -1
  259. package/assets/esri/core/workers/chunks/8c94e987754b3919181e.js +0 -1
  260. package/assets/esri/core/workers/chunks/919115788da38049aea7.js +0 -2
  261. package/assets/esri/core/workers/chunks/976303f47c342b9d1cc0.js +0 -1
  262. package/assets/esri/core/workers/chunks/9b727f45dfea84357b57.js +0 -1
  263. package/assets/esri/core/workers/chunks/a05a2c2aaf0c288f9681.js +0 -1
  264. package/assets/esri/core/workers/chunks/a116dd204921e7464944.js +0 -1
  265. package/assets/esri/core/workers/chunks/ab76170c374fd67ce8cd.js +0 -1
  266. package/assets/esri/core/workers/chunks/aebd12488b4004e207a3.js +0 -1
  267. package/assets/esri/core/workers/chunks/b33e7e74cf8fa3926617.js +0 -1
  268. package/assets/esri/core/workers/chunks/bb2af16e55cb39163827.js +0 -1
  269. package/assets/esri/core/workers/chunks/c7b1c6d57603fa385c54.js +0 -1
  270. package/assets/esri/core/workers/chunks/cd8181600623e18f511c.js +0 -1
  271. package/assets/esri/core/workers/chunks/cef537fa9705dd1cf685.js +0 -1
  272. package/assets/esri/core/workers/chunks/d33403d578fbeecaf844.js +0 -1
  273. package/assets/esri/core/workers/chunks/d5bb9f9b7b341c671525.js +0 -1
  274. package/assets/esri/core/workers/chunks/d96e63d66f7b1f4ea54a.js +0 -2
  275. package/assets/esri/core/workers/chunks/ddbfa664e69612295785.js +0 -1
  276. package/assets/esri/core/workers/chunks/ded81c504bf44806ca7d.js +0 -1
  277. package/assets/esri/core/workers/chunks/e0466387b2ab54d706ca.js +0 -1
  278. package/assets/esri/core/workers/chunks/e3bcd2e356f75afc316a.js +0 -1
  279. package/assets/esri/core/workers/chunks/e80526571f1a34de3278.js +0 -1
  280. package/assets/esri/core/workers/chunks/ea71850ba87ae6038000.js +0 -1
  281. package/assets/esri/core/workers/chunks/ee70be138831cc2a0f56.js +0 -1
  282. package/assets/esri/core/workers/chunks/f23c4fd014126ea7abc6.js +0 -1
  283. package/assets/esri/core/workers/chunks/f537a5e808dc546813c7.js +0 -1
  284. package/assets/esri/core/workers/chunks/f6e40f3faf0c80cf1b3a.js +0 -1
  285. package/assets/esri/core/workers/chunks/fe811d651d201f698b8f.js +0 -2
  286. package/chunks/NativeLine.glsl.js +0 -8
  287. package/layers/geospatialPDF/geospatialPDFParserUtils.js +0 -2
  288. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +0 -70
  289. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +0 -2
  290. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +0 -2
  291. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +0 -2
  292. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +0 -2
  293. /package/assets/esri/core/workers/chunks/{919115788da38049aea7.js.LICENSE.txt → 3d851710f7fcc27c5b60.js.LICENSE.txt} +0 -0
  294. /package/assets/esri/core/workers/chunks/{fe811d651d201f698b8f.js.LICENSE.txt → 5bdd95eeb8f34dbf26f2.js.LICENSE.txt} +0 -0
  295. /package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js.LICENSE.txt → 5e47026c681238038955.js.LICENSE.txt} +0 -0
  296. /package/assets/esri/core/workers/chunks/{4a41bf3d1e2e9bb79771.js.LICENSE.txt → d7763c42754152510e13.js.LICENSE.txt} +0 -0
  297. /package/assets/esri/core/workers/chunks/{d96e63d66f7b1f4ea54a.js.LICENSE.txt → e96fa029acba59c04e4e.js.LICENSE.txt} +0 -0
  298. /package/assets/esri/core/workers/chunks/{70695e0fb53018d48e7b.js.LICENSE.txt → fdfbd201be372d3796bf.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[6319],{4341(e,t,r){r.d(t,{I:()=>a});var i=r(26390);class a{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*s);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,s));e++)this._items.push(this._allocator())}}const s=1024},80754(e,t,r){r.d(t,{j7:()=>o,kS:()=>h,kd:()=>l});var i=r(82799),a=r(16930),s=r(52006),n=r(60408);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){if((0,s.Ed)(e))for(let r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,s.aO)(e)){let[r,i]=e.c;r[0]+=t,i[0]+=t}else if((0,s.FG)(e)){let[r,i]=e.a;r[0]+=t,i[0]+=t}else if((0,s.n1)(e)){let[r,i,a]=e.b;r[0]+=t,i[0]+=t,a[0]+=t}else e[0]+=t;for(let r of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}},71351(e,t,r){r.d(t,{C:()=>u,Cr:()=>c,LV:()=>h,fA:()=>m,vt:()=>o}),r(77690);var i=r(29242),a=r(35522),s=r(51850),n=r(4341);function o(e){return e?l((0,s.o8)(e.origin),(0,s.o8)(e.direction)):l((0,s.vt)(),(0,s.vt)())}function l(e,t){return{origin:e,direction:t}}function h(e,t){let r=d.get();return r.origin=e,r.direction=t,r}function u(e,t=o()){return m(e.origin,e.direction,t)}function c(e,t,r=o()){return(0,a.C)(r.origin,e),(0,a.Re)(r.direction,t,e),r}function m(e,t,r=o()){return(0,a.C)(r.origin,e),(0,a.C)(r.direction,t),r}r(32114);const d=new n.I(()=>o());(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,i.vt)()},28540(e,t,r){r.d(t,{i:()=>d});var i=r(34304),a=r(58083),s=r(34275);var n=r(35522),o=r(51850),l=r(91829),h=r(34727),u=r(71351),c=r(44280),m=r(32114);class d{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,o.fA)(e,t,r):function(e){return t=e,(0,s.vZ)(t)&&t.length>=3||function(e){return((0,s.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,o.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,o.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,n.C)(this.center,e)}exactEquals(e){return(0,n.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,n.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,l.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,n.hG)(this.center,e)<=this.radius**2}intersects(e){let t=this.radius+e.radius;return(0,n.hG)(this.center,e.center)<=t*t}intersectRay(e,t){if(null==e||!this._intersect(e,p))return!1;let{t0:r,t1:i}=p;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){let{origin:i,direction:a}=e;t[0]=i[0]+a[0]*r,t[1]=i[1]+a[1]*r,t[2]=i[2]+a[2]*r}return!0}intersectLine(e,t){let r=(0,u.Cr)(e,t);if(!this._intersect(r,p))return[];let{origin:a,direction:s}=r,{t0:l,t1:h}=p,c=e=>{let t=(0,o.vt)();return(0,n.Ln)(t,a,s,e),this.projectPoint(t,t)};return Math.abs(l-h)<(0,i.FD)()?[c(l)]:[c(l),c(h)]}_intersect(e,t){let{origin:r,direction:i}=e,a=_;a[0]=r[0]-this.center[0],a[1]=r[1]-this.center[1],a[2]=r[2]-this.center[2];let s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===s)return!1;let n=2*(i[0]*a[0]+i[1]*a[1]+i[2]*a[2]),o=n*n-4*s*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-this.radius**2);if(o<0)return!1;let l=Math.sqrt(o);return t.t0=(-n-l)/(2*s),t.t1=(-n+l)/(2*s),!0}projectPoint(e,t){let r=(0,n.Re)(m.rq.get(),e,this.center),i=(0,n.hs)(m.rq.get(),r,this.radius/(0,n.Bw)(r));return(0,n.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){let r=m.rq.get(),i=m.Rc.get();(0,n.$A)(r,e.origin,e.direction),(0,n.$A)(t,r,e.origin),(0,n.hs)(t,t,1/(0,n.Bw)(t)*this.radius);let s=this._angleToSilhouette(e.origin),o=(0,c.g7)(e.origin,t);return(0,a.$0)(i,o+s,r),(0,n.Z0)(t,t,i),t}distanceToSilhouette(e){let t=(0,n.Re)(m.rq.get(),e,this.center),r=(0,n.m3)(t),i=this.radius**2;return Math.sqrt(Math.abs(r-i))}frustumCoverage(e,t,r){let i=this.radius,a=i*i,s=e+.5*Math.PI,n=t*t+a-2*Math.cos(s)*t*i,o=Math.sqrt(n),l=n-a;if(l<=0)return.5;let h=Math.acos(Math.sqrt(l)/o)-Math.asin(i/(o/Math.sin(s)));return Math.min(1,(h+.5*r)/r)}_angleToSilhouette(e){let t=(0,n.Re)(m.rq.get(),e,this.center),r=(0,n.Bw)(t),i=this.radius,a=i+Math.abs(i-r);return(0,h.XM)(i/a)}union(e){let t=(0,n.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,n.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){let{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new d;const p={t0:0,t1:0},_=(0,o.vt)()},38969(e,t,r){r.d(t,{i:()=>a});var i=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",a)))})}},31217(e,t,r){r.d(t,{D:()=>a});var i=r(78888);async function a(e,t){return(await(0,i.A)(e,{responseType:"image",...t})).data}},76200(e,t,r){r.d(t,{h:()=>z});var i=r(49186),a=r(65529),s=r(36563),n=r(44208),o=r(97768),l=r(17676),h=r(34275),u=r(24326),c=r(84952),m=r(38969),d=r(31217),p=r(95117),_=r(21231),g=r(67171),f=r(12541),T=r(42293),x=r(53966),E=r(2741);let A;const M=[171,75,84,88,32,50,48,187,13,10,26,10];function R(e){return ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e)}function w(e,t){return e.getUint16(t,!0)+65536*e.getUint8(t+2)}function b(e,t,r){return t<=e.byteLength&&r<=e.byteLength-t}function C(e){return x.A.getLogger("esri.libs.basisu.textureMetadata").error(`Invalid or unsupported ${e} texture metadata`),null}var D=r(63907);const F=()=>x.A.getLogger("esri.views.3d.webgl-engine.lib.BasisUtil");let S=null,y=null;async function I(){return y??(A??=(async()=>{let e=await(await r.e(9321).then(()=>r(49321))).default({locateFile:e=>(0,E.s)(`esri/libs/basisu/${e}`)});return e.initializeBasis(),e})(),y=A,S=await y),y}function v(e,t){let r=function(e){let t=R(e);if(t.byteLength<77)return C("Basis");let r=t.getUint16(0,!0),i=t.getUint16(2,!0),a=t.getUint16(4,!0),s=t.getUint8(20);if(17011!==r||19!==i||77!==a||0!==s)return C("Basis");let n=t.getUint32(8,!0),o=w(t,14),l=w(t,17),h=t.getUint16(21,!0),u=!!(4&h),c=t.getUint32(65,!0);if(0===l||o<l||!(1&h)||u&&o%2!=0||!b(t,77,n)||c<77||!b(t,c,23*o))return C("Basis");let m=w(t,c),d=t.getUint8(c+3);if(0!==m||0!==d)return C("Basis");let p=t.getUint16(c+5,!0),_=t.getUint16(c+7,!0),g=1;for(let e=1;e<o;++e){let r=c+23*e;if(0!==w(t,r))break;let i=t.getUint8(r+3);g=Math.max(g,i+1)}return 0===p||0===_||g>16?C("Basis"):{width:p,height:_,levels:g,hasAlpha:u}}(e);return r?P(r,t):0}function U(e,t){let r=function(e){let t=R(e);if(t.byteLength<80||!M.every((e,r)=>t.getUint8(r)===e))return C("KTX2");let r=t.getUint32(12,!0),i=t.getUint32(16,!0),a=t.getUint32(20,!0),s=t.getUint32(24,!0),n=t.getUint32(28,!0),o=t.getUint32(36,!0),l=t.getUint32(40,!0),h=t.getUint32(44,!0),u=t.getUint32(48,!0),c=t.getUint32(52,!0);if(0!==r||1!==i||0===a||0===s||0!==n||1!==o&&6!==o||6===o&&a!==s||0===l||l>32||!b(t,80,24*l)||u<80||44!==c&&60!==c||!b(t,u,c))return C("KTX2");let m=t.getUint32(u,!0),d=t.getUint8(u+12),p=t.getUint8(u+14);if(m!==c||1!==p&&2!==p||163!==d&&166!==d||(163===d?1!==h:0!==h&&2!==h))return C("KTX2");for(let e=0;e<l;++e){let r=80+24*e,i=Number(t.getBigUint64(r,!0)),a=Number(t.getBigUint64(r+8,!0));if(i<80||0===a||!b(t,i,a))return C("KTX2")}let _=t.getUint32(56,!0),g=t.getUint32(60,!0),f=Number(t.getBigUint64(64,!0)),T=Number(t.getBigUint64(72,!0));if(g>0&&(_<80||!b(t,_,g))||1===h&&(f<80||!b(t,f,T)))return C("KTX2");let x=15&t.getUint8(u+31);return{width:a,height:s,levels:l,hasAlpha:163===d?60===c:3===x}}(e);return r?P(r,t):0}function P({levels:e,hasAlpha:t,width:r,height:i},a){let s=(0,T.MW)(t?D.CQ.COMPRESSED_RGBA8_ETC2_EAC:D.CQ.COMPRESSED_RGB8_ETC2),n=a&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*s*n)}function H(e,t,r,i,a,s,n,o,l=!1){let{compressedTextureETC:h,compressedTextureS3TC:u}=e.capabilities,{basisFormat:c,internalFormat:m}=function(e,t,r,i){return e?r?{basisFormat:1,internalFormat:i?D.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:D.CQ.COMPRESSED_RGBA8_ETC2_EAC}:{basisFormat:0,internalFormat:i?D.CQ.COMPRESSED_SRGB8_ETC2:D.CQ.COMPRESSED_RGB8_ETC2}:t?r?{basisFormat:3,internalFormat:D.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{basisFormat:2,internalFormat:D.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT}:{basisFormat:13,internalFormat:i?D.H0.SRGB8_ALPHA8:6408}}(null!=h,null!=u,i,l),d=t.hasMipmap?r:Math.min(1,r),p=[];for(let e=0;e<d;e++)p.push(new Uint8Array(n(e,c))),o(e,c,p[e]);return t.internalFormat=m,t.hasMipmap=p.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=a,t.height=s,new _.g(e,t,{type:"compressed",levels:p})}function O(e,t){let r=new Uint32Array(e.buffer,e.byteOffset,16);if(1481919403!==r[0]||3140563232!==r[1]||169478669!==r[2])return F().error("Invalid magic number in KTX1 header"),null;if(67305985!==r[3]||1!==r[5]||r[7]!==D.CQ.COMPRESSED_RGB8_ETC2||6407!==r[8])return F().error("Unsupported KTX1 image"),null;let i=r[7],a=1,s=r[9],n=r[10];if(3&s||3&n)return null;let o=s,l=n;!1!==t&&(a=Math.max(1,r[14]));let h,u,c=e.byteOffset+64,m=[];for(let t=0;t<a;++t)u=(e[c]|e[c+1]<<8|e[c+2]<<16|e[c+3]<<24)>>>0,c+=4,h=new Uint8Array(e.buffer,c,u),m.push(h),c+=u,s=Math.max(1,s>>1),n=Math.max(1,n>>1);return{textureData:{type:"compressed",levels:m},internalFormat:i,width:o,height:l}}const B=()=>x.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function G(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const N=G("DXT1"),L=G("DXT3"),X=G("DXT5");function k(e,t){let r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return B().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return B().error("Unsupported format, must contain a FourCC code"),null;let i,a,s=r[21];switch(s){case N:i=8,a=D.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case L:i=16,a=D.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case X:i=16,a=D.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return B().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(s)),null}let n=1,o=r[4],l=r[3];(3&o||3&l)&&(B().warn("Rounding up compressed texture size to nearest multiple of 4."),o=o+3&-4,l=l+3&-4);let h=o,u=l;131072&r[2]&&!1!==t&&(n=Math.max(1,r[7]));let c,m,d=e.byteOffset+r[1]+4,p=[];for(let t=0;t<n;++t)m=(o+3>>2)*(l+3>>2)*i,c=new Uint8Array(e.buffer,d,m),p.push(c),d+=m,o=Math.max(1,o>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:a,width:h,height:u}}function V(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function Q(e,t){let[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){let a=Math.max(e,t),s=e*t;if(a<=i&&s<=r)return[e,t];let n=Math.min(Math.sqrt(r/s),i/a);return[V(Math.round(e*n),i),V(Math.round(t*n),i)]}(e,t);return e.width===r&&e.height===i?e:W(e,r,i)}function W(e,t,r){if(e instanceof ImageData)return W(function(e){let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);let a=document.createElement("canvas");return a.width=t,a.height=r,a.getContext("2d").drawImage(e,0,0,a.width,a.height),a}var K=r(620);const q=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class z{constructor(e,t){this._data=e,this.id=(0,u.c)(),this.events=new a.bk,this._videoFrameHandle=null,this._videoFrameToken=-1,this._parameters={...j,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(null==e.srcObject&&!(0,c.w8)(e.src)&&("auto"!==e.preload||!e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){let t=[];(0,m.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){let t=new g.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t.isImmutable=!0===this._parameters.immutable&&function(e){return null!=e&&((0,f.tl)(e)||(0,f.tr)(e)||(0,f.CR)(e)||(0,f.QJ)(e))}(this._parameters.internalFormat),t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return q?0:this._texture?.usedMemory??function(e,t){if(null==e)return 0;if((0,h.mw)(e)||(0,h.mg)(e))return"image/ktx2"===t.encoding?U(e,!!t.mipmap):"image/x.basis"===t.encoding?v(e,!!t.mipmap):e.byteLength;let{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Y(e):t,a=t.pixelFormat??6408,s=(0,T.wH)(a);return(t.mipmap?4/3:1)*r*i*s||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;let t=this._data;return null==t?(this._texture=new _.g(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,h.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,h.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):(0,h.mg)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,t):(0,h.mw)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,new Uint8Array(t)):((0,h.mw)(t)||(0,h.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,h.mw)(t)||(0,h.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,h.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,h.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||t===this._videoFrameToken||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA?t:(this._texture.setData(e),this._parameters.updateCallback&&this._parameters.updateCallback(),this._videoFrameToken)}_trackVideoFrames(e){let t=()=>{this._videoFrameToken++,r=e.requestVideoFrameCallback(t)},r=e.requestVideoFrameCallback(t);this._videoFrameHandle=(0,s.hA)(()=>e.cancelVideoFrameCallback(r))}_loadFromDDSData(e,t){return this._texture=function(e,t,r){let i=k(r,t.hasMipmap??!1);if(null==i)throw Error("DDS texture data is null");let{textureData:a,internalFormat:s,width:n,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=s,t.width=n,t.height=o,new _.g(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX1(e,t){return this._texture=function(e,t,r){let i=O(r,t.hasMipmap??!1);if(null==i)throw Error("KTX1 texture data is null");let{textureData:a,internalFormat:s,width:n,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=s,t.width=n,t.height=o,new _.g(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r,i=!1){S??=await I();let a=new S.KTX2File(new Uint8Array(r));if(!function(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}(a))return null;let s=i&&2===a.getDFDTransferFunc();a.startTranscoding();let n=H(e,t,a.getLevels(),a.getHasAlpha(),a.getWidth(),a.getHeight(),(e,t)=>a.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>a.transcodeImage(r,e,0,0,t,0,-1,-1),s);return a.close(),a.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){S??=await I();let i=new S.BasisFile(new Uint8Array(r));if(!function(e){return e.getNumImages()>=1&&!e.isUASTC()}(i))return null;i.startTranscoding();let a=H(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),a}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,K.vA)(this._parameters.width>0&&this._parameters.height>0);let r=this._createDescriptor(e);return(6407===r.pixelFormat||6408===r.pixelFormat)&&(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new _.g(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{let i=await(0,d.D)(t,{signal:r});return(0,l.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{let i=await(0,p.y)(t,t.src,!1,r);return(0,l.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((a,s)=>{let n=()=>{t.removeEventListener("loadeddata",h),t.removeEventListener("error",u),(0,o.xt)(c)},h=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(n(),a(this._loadFromImage(e,t)))},u=e=>{n(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",h),t.addEventListener("error",u);let c=(0,l.u7)(r,()=>u((0,l.NK)()))}))}_loadFromImage(e,t){let r=t instanceof HTMLVideoElement,i=r?t:Q(t,e.parameters),a=Y(i);this._parameters.width=a.width,this._parameters.height=a.height;let s=this._createDescriptor(e);return s.width=a.width,s.height=a.height,s.compress=this._parameters.compressionOptions,this._texture=new _.g(e,s,i),r&&this._trackVideoFrames(t),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){let t=new AbortController;this._loadingController=t;let r=e(t.signal);this._loadingPromise=r;let i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._videoFrameHandle=(0,o.xt)(this._videoFrameHandle),this._videoFrameToken=-1,this._texture=(0,o.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){let e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function Y(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const j={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},58682(e,t,r){r.d(t,{Uy:()=>l,h7:()=>m});var i=r(35522),a=r(51850),s=r(70328);class n{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const o=(0,s.vt)();function l(e,t,r,a,s,o){if(!e.visible)return;let l=(0,i.jb)(M,a,r),{tolerance:h}=t,c=new n(h,!1,t.options.normalRequired);if(e.boundingInfo)u(e.readPrimitivePosition,e.boundingInfo,r,l,h,s,c,o);else{let t=e.readPrimitivePosition;!function(e,t,r,a,s,n,o,l){let h=t,u=R,c=Math.abs(h[0]),m=Math.abs(h[1]),d=Math.abs(h[2]),f=c>=m?c>=d?0:2:m>=d?1:2,x=f,E=h[x]<0?2:1,A=(f+E)%3,M=(f+(3-E))%3,w=h[A]/h[x],b=h[M]/h[x],C=1/h[x],D=p,F=_,S=g,{normalRequired:y}=o;for(let t=r;t<a;++t){let r=3*t;s(u[0],r),s(u[1],r+1),s(u[2],r+2),n&&(n.applyToVertex(u[0],u[0][0],u[0][1],u[0][2],t),n.applyToVertex(u[1],u[1][0],u[1][1],u[1][2],t),n.applyToVertex(u[2],u[2][0],u[2][1],u[2][2],t)),(0,i.jb)(D,u[0],e),(0,i.jb)(F,u[1],e),(0,i.jb)(S,u[2],e);let a=D[A]-w*D[x],o=D[M]-b*D[x],h=F[A]-w*F[x],c=F[M]-b*F[x],m=S[A]-w*S[x],d=S[M]-b*S[x],p=m*c-d*h,_=a*d-o*m,g=h*o-c*a;if((p<0||_<0||g<0)&&(p>0||_>0||g>0))continue;let f=p+_+g;if(0===f)continue;let E=p*(C*D[x])+_*(C*F[x])+g*(C*S[x]);if(E*Math.sign(f)<0)continue;let R=E/f;R>=0&&l(R,R,y?T(u):null,t)}}(r,l,0,e.faceCount,t,s,c,o)}}const h=(0,a.vt)();function u(e,t,r,a,n,l,c,m){if(null==t)return;let p=function(e,t){return(0,i.hZ)(t,1/e[0],1/e[1],1/e[2])}(a,h);if((0,s.C)(o,t.box),l?.applyToAabb(o),function(e,t,r,i){return function(e,t,r,i){let a=(e[0]-i-t[0])*r[0],s=(e[3]+i-t[0])*r[0],n=Math.min(a,s),o=Math.max(a,s),l=(e[1]-i-t[1])*r[1],h=(e[4]+i-t[1])*r[1];if(o=Math.min(o,Math.max(l,h)),o<0||(n=Math.max(n,Math.min(l,h)),n>o))return!1;let u=(e[2]-i-t[2])*r[2],c=(e[5]+i-t[2])*r[2];return o=Math.min(o,Math.max(u,c)),!(o<0||(n=Math.max(n,Math.min(u,c)),n>o))&&n<1/0}(e,t,r,i)}(o,r,p,n)){let{primitiveIndices:i}=t,s=i.length;if(s>1e3){let i=t.children;if(void 0!==i){for(let t of i)u(e,t,r,a,n,l,c,m);return}}d(r,a,0,s,e,i,l,c,m)}}const c=(0,a.vt)();function m(e,t,r,i,a,s,n,o,l,h=null,u=0){let m=e[0],d=e[1],p=e[2],_=t[0],g=t[1],T=t[2];for(let e=r;e<i;++e){let t=u+(h?.[e]??e),r=3*t,i=n*a[r],x=s[i],E=s[i+1],M=s[i+2],R=n*a[r+1],w=s[R],b=s[R+1],C=s[R+2],D=n*a[r+2],F=w-x,S=b-E,y=C-M,I=s[D]-x,v=s[D+1]-E,U=s[D+2]-M,P=g*U-v*T,H=T*I-U*_,O=_*v-I*g,B=F*P+S*H+y*O,G=B*B;if(G<=A)continue;let N=m-x,L=d-E,X=p-M,k=(N*P+L*H+X*O)*B;if(k<0||k>G)continue;let V=L*y-S*X,Q=X*F-y*N,W=N*S-F*L,K=(_*V+g*Q+T*W)*B;if(K<0||k+K>G)continue;let q=(I*V+v*Q+U*W)/B;q>=0&&l(q,q,o?f(F,S,y,I,v,U,c):null,t)}}function d(e,t,r,i,a,s,n,o,l){let h=e[0],u=e[1],m=e[2],d=t[0],p=t[1],_=t[2],{normalRequired:g}=o;for(let e=r;e<i;++e){let t=s[e],r=3*t,[i,o,T]=a(b,r),[x,E,M]=a(b,r+1),[R,C,D]=a(b,r+2);null!=n&&([i,o,T]=n.applyToVertex(w,i,o,T,e),[x,E,M]=n.applyToVertex(w,x,E,M,e),[R,C,D]=n.applyToVertex(w,R,C,D,e));let F=x-i,S=E-o,y=M-T,I=R-i,v=C-o,U=D-T,P=p*U-v*_,H=_*I-U*d,O=d*v-I*p,B=F*P+S*H+y*O,G=B*B;if(G<=A)continue;let N=h-i,L=u-o,X=m-T,k=(N*P+L*H+X*O)*B;if(k<0||k>G)continue;let V=L*y-S*X,Q=X*F-y*N,W=N*S-F*L,K=(d*V+p*Q+_*W)*B;if(K<0||k+K>G)continue;let q=(I*V+v*Q+U*W)/B;q>=0&&l(q,q,g?f(F,S,y,I,v,U,c):null,t)}}const p=(0,a.vt)(),_=(0,a.vt)(),g=(0,a.vt)();function f(e,t,r,a,s,n,o){return(0,i.hZ)(x,e,t,r),(0,i.hZ)(E,a,s,n),(0,i.$A)(o,x,E),(0,i.S8)(o,o),o}function T(e){return(0,i.jb)(x,e[1],e[0]),(0,i.jb)(E,e[2],e[0]),(0,i.$A)(c,x,E),(0,i.S8)(c,c),c}const x=(0,a.vt)(),E=(0,a.vt)(),A=1e-7*1e-7,M=(0,a.vt)(),R=[(0,a.vt)(),(0,a.vt)(),(0,a.vt)()],w=(0,a.vt)(),b=(0,a.vt)()},74810(e,t,r){r.d(t,{Bt:()=>o,Jr:()=>s});var i=r(51850),a=r(35522);function s({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:s,emissiveTexture:n,emissiveFactor:o,occlusionTexture:l}){return null==e&&null==t&&null==n&&(null==o||(0,a.t2)(o,i.uY))&&null==l&&(null==s||1===s)&&(null==r||1===r)}const n=(0,i.CN)(1,1,.5),o=(0,i.CN)(0,.6,.2),l=(0,i.CN)(0,1,.2);r.d(t,["SY",0,l,"mb",0,n])},21231(e,t,r){r.d(t,{g:()=>g});var i=r(49186),a=r(44208),s=r(53966),n=r(97768),o=r(93637),l=r(17676),h=r(94656),u=r(63907),c=r(67171),m=r(12541);class d extends c.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case u.H0.R16F:case u.H0.R32F:case u.H0.R8_SNORM:case u.H0.R8:this.pixelFormat=6403;break;case u.H0.R8I:case u.H0.R8UI:case u.H0.R16I:case u.H0.R16UI:case u.H0.R32I:case u.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new d(e,t)}}const p=!!(0,a.A)("esri-tests-disable-gpu-memory-measurements"),_=()=>s.A.getLogger("esri/views/webgl/Texture");class g{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{let r=d.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return p?0:(0,c.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(u.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){let r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!(0,m.Qp)(e)&&this._descriptor.internalFormat&&(0,o.a4)(u.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!(0,m.Qp)(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,a,s,n,o=0){n||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update uninitialized texture!");let l=this._descriptor;l.internalFormat=(0,m.mq)(l);let{context:h,pixelFormat:u,dataType:c,target:d,isImmutable:p}=l;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");let f=h.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+a>l.width||r+s>l.height)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:T}=h;o&&(a&&s||_().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),T.pixelStorei(T.UNPACK_SKIP_ROWS,o)),(0,m.Kv)(n)?T.texSubImage2D(d,e,t,r,a,s,u,c,n):(0,m.Qp)(n)?T.compressedTexSubImage2D(d,e,t,r,a,s,l.internalFormat,n.levels[e]):T.texSubImage2D(d,e,t,r,a,s,u,c,n),o&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),h.bindTexture(f,g.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,a,s,n,o,l){l||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update an uninitialized texture!");let h=this._descriptor;h.internalFormat=(0,m.mq)(h);let{context:u,pixelFormat:c,dataType:d,isImmutable:p,target:f}=h;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");(0,m.re)(f)||_().warn("Attempting to set 3D texture data on a non-3D texture");let T=u.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||a<0||t+s>h.width||r+n>h.height||a+o>h.depth)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:x}=u;if((0,m.Qp)(l))l=l.levels[e],x.compressedTexSubImage3D(f,e,t,r,a,s,n,o,h.internalFormat,l);else{let i=l;x.texSubImage3D(f,e,t,r,a,s,n,o,c,d,i)}u.bindTexture(T,g.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){let e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,(0,m.QE)(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);let t=this._descriptor.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,g.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){let e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,(0,m.QE)(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,(0,m.QE)(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),(0,m.QE)(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&=(this._applySamplingMode(),!1),this._wrapModeDirty&&=(this._applyWrapMode(),!1),this._shadowFilterDirty&&=(this._applyShadowMode(),!1)}abortCompression(){this._compressionAbortController=(0,n.DC)(this._compressionAbortController)}_setData(e,t){let r=this._descriptor,a=r.context?.gl;if(!a)return;(0,h.Y2)(a),this.hasWebGLTextureObject||(this._glName=a.createTexture(),r.context.instanceCounter.increment(u.vt.Texture,this)),(0,m.QE)(r);let s=r.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,h.Y2)(a);let n=t??r.target,o=(0,m.re)(n);if((0,m.Kv)(e))this._setDataFromTexImageSource(e,n);else{let{width:t,height:s,depth:l}=r;if(null==t||null==s)throw new i.A("texture:missing-size","Width and height must be specified!");if(o&&null==l)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=(0,m.mq)(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(n,r.internalFormat,r.hasMipmap,t,s,l),(0,m.Qp)(e)){if(!(0,m.tl)(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,n)}else this._texImage(n,0,r.internalFormat,t,s,l,e),(0,h.Y2)(a),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,h.Y2)(a),r.context.bindTexture(s,g.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){let e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,+!!r),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,+!!i)}_setDataFromTexImageSource(e,t){let{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=(0,m.mq)(i);let a=(0,m.re)(t),{width:s,height:n,depth:o}=(0,m.Eo)(e);i.width&&i.height,i.width||=s,i.height||=n,a&&i.depth,a&&(i.depth=o),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,s,n,o),this._texImage(t,0,i.internalFormat,s,n,o,e),(0,h.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,h.Y2)(r))}_setDataFromCompressedSource(e,t,r){let i=this._descriptor,{width:a,height:s,depth:n}=i,o=e.levels,l=(0,m.FV)(r,a,s,n),h=Math.min(l,o.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,h),this._forEachMipmapLevel((e,i,a,s)=>{let n=o[Math.min(e,o.length-1)];this._compressedTexImage(r,e,t,i,a,s,n)},h)}_texStorage(e,t,r,a,s,n){let{gl:o}=this._descriptor.context;if(!(0,m.tr)(t)&&!(0,m.tl)(t))throw new i.A("texture:missing-format","Immutable textures must have a sized or compressed internal format");if(!this._descriptor.isImmutable)return;let l=r?(0,m.FV)(e,a,s,n):1;if((0,m.re)(e)){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");o.texStorage3D(e,l,t,a,s,n)}else o.texStorage2D(e,l,t,a,s);this._wasImmutablyAllocated=!0}_texImage(e,t,r,a,s,n,o){let l=this._descriptor.context.gl,h=(0,m.re)(e),{isImmutable:u,pixelFormat:c,dataType:d}=this._descriptor;if(u){if(null!=o){let r=o;if(h){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,a,s,n,c,d,r)}else l.texSubImage2D(e,t,0,0,a,s,c,d,r)}}else{let u=o;if(h){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,a,s,n,0,c,d,u)}else l.texImage2D(e,t,r,a,s,0,c,d,u)}}_compressedTexImage(e,t,r,a,s,n,o){let l=this._descriptor.context.gl,h=(0,m.re)(e);if(this._descriptor.isImmutable){if(null!=o)if(h){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,a,s,n,r,o)}else l.compressedTexSubImage2D(e,t,0,0,a,s,r,o)}else if(h){if(null==n)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,a,s,n,0,o)}else l.compressedTexImage2D(e,t,r,a,s,0,o)}async _compressOnWorker(e){let{width:t,height:r,context:i,flipped:a,preMultiplyAlpha:s,hasMipmap:n,compress:o}=this._descriptor;if(!o)return;let{compressionTracker:h,compressionCallback:u,preserveSourceBitmap:c}=o,{compressedTextureETC:m,compressedTextureS3TC:d}=i.capabilities;if(!g.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!m&&!d)return;this.abortCompression();let p=new AbortController;this._compressionAbortController=p,h?.increment();let f,T=!1,x=!1;try{e instanceof ImageBitmap?c?(f=await createImageBitmap(e),(0,l.Te)(p),x=!0):f=e:e instanceof Uint8Array?(f=e.buffer,T=this.descriptor.flipped):(f=await createImageBitmap(e,{imageOrientation:a?"flipY":"none"}),(0,l.Te)(p),x=!0);let i={data:f,width:t,height:r,needsFlip:T,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:s,isOpaque:this._descriptor.isOpaque,hasMipmap:n,hasETC:!!m,hasS3TC:!!d},o=await g.compressionWorkerHandle.invoke(i,p.signal,1);if((0,l.Te)(p),o.compressedTexture&&this.hasWebGLTextureObject){let e=this.usedMemory;this._descriptor.internalFormat=o.internalFormat,this._setData(o.compressedTexture),u?.(e-this.usedMemory)}}catch(e){(0,l.zf)(e)||_().error("Texture compression failed!")}finally{h?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),x&&f instanceof ImageBitmap&&f.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:a,depth:s,hasMipmap:n,target:o}=this._descriptor,l=32879===o;if(null==r||null==a||l&&null==s)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,a,s),n&&(1!==r||1!==a||l&&1!==s)&&!(i>=t);++i)r=Math.max(1,r>>1),a=Math.max(1,a>>1),l&&(s=Math.max(1,s>>1))}_applySamplingMode(){let e=this._descriptor,t=e.context?.gl,r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):(9984===r||9986===r)&&(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i),null!=e.maxMipLevel&&t.texParameteri(e.target,t.TEXTURE_MAX_LEVEL,e.maxMipLevel)}_applyWrapMode(){let e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){let e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,h.Y2)(t)}_applyAnisotropicFilteringParameters(){let e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},67171(e,t,r){r.d(t,{R:()=>s,e:()=>n});var i=r(63907),a=r(42293);class s{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function n(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,a.MW)(e.internalFormat))*(34067===e.target?6:1))}},42293(e,t,r){r.d(t,{MW:()=>l,wH:()=>o,yu:()=>n});var i=r(94656),a=r(63907);const s=new Set([a.pe.BYTE,a.pe.SHORT,a.pe.INT,a.pe.UNSIGNED_BYTE,a.pe.UNSIGNED_SHORT,a.pe.UNSIGNED_INT]);function n(e,t,r,a=0){let n=e.gl;e.bindBuffer(r);for(let o of r.layout){let r=t.get(o.name);if(null==r){console.warn(`There is no location for vertex attribute '${o.name}' defined.`);continue}let l=a*o.stride;if(o.count<=4)o.integer&&s.has(o.type)?n.vertexAttribIPointer(r,o.count,o.type,o.stride,o.offset+l):n.vertexAttribPointer(r,o.count,o.type,o.normalized,o.stride,o.offset+l),n.enableVertexAttribArray(r),o.divisor>0&&n.vertexAttribDivisor(r,o.divisor);else if(9===o.count)for(let e=0;e<3;e++)n.vertexAttribPointer(r+e,3,o.type,o.normalized,o.stride,o.offset+12*e+l),n.enableVertexAttribArray(r+e),o.divisor>0&&n.vertexAttribDivisor(r+e,o.divisor);else if(16===o.count)for(let e=0;e<4;e++)n.vertexAttribPointer(r+e,4,o.type,o.normalized,o.stride,o.offset+16*e+l),n.enableVertexAttribArray(r+e),o.divisor>0&&n.vertexAttribDivisor(r+e,o.divisor);else console.error("Unsupported vertex attribute element count: "+o.count);if((0,i.en)()){let t=(0,i.u1)(e.gl);t&&console.error(`Unable to bind vertex attribute "${o.name}" with baseInstanceOffset ${l}:`,t,o)}}}function o(e){switch(e){case 6406:case 6409:case 6403:case 36244:case 6402:case 34041:return 1;case 6410:case 33319:case 33320:return 2;case 6407:case 36248:return 3;case 6408:case 36249:return 4}return 0}function l(e){switch(e){case 6406:case 6409:case 6403:case 36244:case a.H0.R8:case a.H0.R8I:case a.H0.R8UI:case a.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case a.H0.RGBA4:case a.H0.R16F:case a.H0.R16I:case a.H0.R16UI:case a.H0.RG8:case a.H0.RG8I:case a.H0.RG8UI:case a.H0.RG8_SNORM:case a.H0.RGB565:case a.H0.RGB5_A1:case a.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case a.H0.RGB8:case a.H0.RGB8I:case a.H0.RGB8UI:case a.H0.RGB8_SNORM:case a.H0.SRGB8:case a.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case a.H0.RGBA8:case a.H0.R32F:case a.H0.R11F_G11F_B10F:case a.H0.RG16F:case a.H0.R32I:case a.H0.R32UI:case a.H0.RG16I:case a.H0.RG16UI:case a.H0.RGBA8I:case a.H0.RGBA8UI:case a.H0.RGBA8_SNORM:case a.H0.SRGB8_ALPHA8:case a.H0.RGB9_E5:case a.H0.RGB10_A2UI:case a.H0.RGB10_A2:case a.SB.DEPTH_COMPONENT32F:case a.iE.DEPTH24_STENCIL8:return 4;case a.iE.DEPTH32F_STENCIL8:return 5;case a.H0.RGB16F:case a.H0.RGB16I:case a.H0.RGB16UI:return 6;case a.H0.RG32F:case a.H0.RG32I:case a.H0.RG32UI:case a.H0.RGBA16F:case a.H0.RGBA16I:case a.H0.RGBA16UI:return 8;case a.H0.RGB32F:case a.H0.RGB32I:case a.H0.RGB32UI:return 12;case a.H0.RGBA32F:case a.H0.RGBA32I:case a.H0.RGBA32UI:return 16;case a.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case a.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case a.CQ.COMPRESSED_R11_EAC:case a.CQ.COMPRESSED_SIGNED_R11_EAC:case a.CQ.COMPRESSED_RGB8_ETC2:case a.CQ.COMPRESSED_SRGB8_ETC2:case a.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case a.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case a.CQ.COMPRESSED_RG11_EAC:case a.CQ.COMPRESSED_SIGNED_RG11_EAC:case a.CQ.COMPRESSED_RGBA8_ETC2_EAC:case a.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656(e,t,r){r.d(t,{Y2:()=>h,en:()=>l,u1:()=>n});var i=r(49186),a=r(44208),s=r(53966);function n(e){switch(e.getError()){case e.NO_ERROR:return null;case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}const o=!!(0,a.A)("enable-feature:webgl-debug");function l(){return o}function h(e,t=l()){if(t){let t=n(e);if(t){let e=Error().stack;s.A.getLogger("esri.views.webgl.checkWebGLError").error(new i.A("webgl-error","WebGL error occurred",{message:t,stack:e}))}}}},12541(e,t,r){r.d(t,{CR:()=>u,Eo:()=>T,FV:()=>g,Kv:()=>p,QE:()=>l,QJ:()=>c,Qp:()=>d,mq:()=>f,re:()=>_,tl:()=>m,tr:()=>h});var i=r(49186),a=r(53966),s=r(93637),n=r(63907);const o=()=>a.A.getLogger("esri/views/webgl/textureUtils");function l(e){let{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&o().error("Negative dimension parameters are not allowed!");let{internalFormat:a}=e;if(a&&(u(a)||c(a))){let{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:a}=e;a&&o().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&o().error("Depth textures cannot sample mipmaps"):(9728!==i&&o().error("Depth textures without filtering must use NEAREST filtering"),r&&o().error("Depth textures without filtering cannot use compare function"))}}function h(e){return function(e){return n.XN.includes(e)}(e)||u(e)||c(e)}function u(e){return(0,s.a4)(n.SB,e)}function c(e){return(0,s.a4)(n.iE,e)}function m(e){return null!=e&&(0,s.a4)(n.CQ,e)}function d(e){return null!=e&&"type"in e&&"compressed"===e.type}function p(e){return null!=e&&!d(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function g(e,t,r,i=1){let a=Math.max(t,r);return 32879===e&&(a=Math.max(a,i)),Math.floor(Math.log2(a))+1}function f(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case n.ld.FLOAT:switch(e.pixelFormat){case 6408:return n.H0.RGBA32F;case 6407:return n.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case n.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return n.H0.RGBA8;case 6407:return n.H0.RGB8}}let{pixelFormat:t}=e;return e.internalFormat=34041===t?n.iE.DEPTH24_STENCIL8:6402===t?n.SB.DEPTH_COMPONENT24:t,e.internalFormat}function T(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}},49788(e,t,r){r.d(t,["Q",0,1/255.5,"v",0,.9960861056751468])}}]);
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[6874],{66344(e,t,i){i.d(t,{q:()=>o});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){return this._db.get(e.id+t)?.size??0}put(e,t,i,s,a){t=e.id+t;let o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,o.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);let n=1+Math.max(a,-4)- -3;this._db.set(t,new l(i,s,n)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;let i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){let e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;let i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;let i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){let i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=[];this._db.forEach((e,r)=>{let s=e.lifetime;i[s]=(i[s]||0)+e.size,this._clients.forEach(i=>{let{id:s,name:l}=i;if(r.startsWith(s)){let i=t[l]||0;t[l]=i+e.size}})});let r={};this._clients.forEach(e=>{let i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){let s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});let s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){let r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){let t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(let[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){let s=(0,this._clients.get(e.split(a)[0])?.removeFunc)?.(t,r,i);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){let i=t??this;if(i.size<=e)return;let r=t?.id,s=!0;for(;s;){s=!1;for(let[l,o]of this._db)if(0===o.lifetime&&(!r||l.startsWith(r))){let r=t??this._clients.get(l.split(a)[0]);if(this._purgeItem(l,o,r),i.size<=.9*e)return;s||=this._db.has(l)}}for(let[s,l]of this._db)if(!r||s.startsWith(r)){let r=t??this._clients.get(s.split(a)[0]);if(this._purgeItem(s,l,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);let r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class l{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class o{constructor(e,t){this.removeFunc=t,this.id=":",this.name="",this.size=0,this._storage=new s(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>f,Ke:()=>p,QA:()=>g,Tj:()=>u,UT:()=>y,aD:()=>v,jJ:()=>h});var r=i(32198),s=i(56372),l=i(10107),a=i(64108),o=i(97768),n=i(17676);function h(e,t,i){return(0,n.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function u(e,t,i){return(await(0,n.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,n.QP)(e),d(e)}}function g(e){if(!0===e.ok)return e.value;throw e.error}function y(e,t){return new m(e,t)}let m=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super(),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,o.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,n.u7)(t,this.abort)}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,o.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,l.MZ)()],m.prototype,"value",null),(0,r.Cg)([(0,l.MZ)()],m.prototype,"error",null),(0,r.Cg)([(0,l.MZ)()],m.prototype,"finished",null),(0,r.Cg)([(0,l.MZ)()],m.prototype,"promise",void 0),(0,r.Cg)([(0,l.MZ)()],m.prototype,"_result",void 0),m=(0,r.Cg)([(0,a.$K)("esri.core.asyncUtils.ReactiveTask")],m);class v{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},69397(e,t,i){i.d(t,{JY:()=>p,Qf:()=>n,Qh:()=>a,lM:()=>l,ro:()=>h,rq:()=>u});var r=i(44208),s=i(34275);function l(e){if(!e)return 0;let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=o(e[i],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return n(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=d;for(let r=0;r<t;r++)i+=o(e[r]);return i}(e);let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=o(e[i]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function n(...e){return e.reduce((e,t)=>e+h(t),0)}function h(e,t=16){return e?(0,s.iu)(e)?e.byteLength+f:Array.isArray(e)?u(e,t):0:0}function u(e,t){return d+e.length*t}const c=32,d=16,p=(0,r.A)("ios")||!(0,r.A)("chrome")&&!(0,r.A)("opr")?8:4,f=145},83027(e,t,i){const r=i(29953).ho;i.d(t,["h",0,r])},35982(e,t,i){i.d(t,{B:()=>u});var r=i(4576),s=i(71511),l=i(36563),a=i(53966),o=i(97768),n=i(17676),h=i(83027);class u{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,h.h)(e,{...s,schedule:r}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{s.hasInitialize&&e.invoke("initialize",{}).catch(()=>{});for(let t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>a.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){let i=new c(e,t);return this._listeners.push(i),this._connectListener(i),(0,l.hA)(()=>{(0,r.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,o.xt)(this._onClientConnectedHandle),this._thread&&=(this._thread.close(),null),this._promise=null;for(let e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){return this._invokeMethod(e,[t],i,r)}invokeMethodWithArgs(e,t,i,r){return this._invokeMethod(e,t,i,r)}_invokeMethod(e,t,i,r){if(this._thread){let s=this._transferLists[e],l=s?s(...t):[];return this._thread.apply(e,t,{transferList:l,signal:i,jobPriority:r})}return this._promise?this._promise.then(()=>((0,n.Te)(i),this._invokeMethod(e,t,i,r))):Promise.reject((0,n.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(d):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,n.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class c{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new s.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function d(){}},54239(e,t,i){i.d(t,{A:()=>m});var r,s=i(32198),l=i(91429),a=i(4576),o=i(66552),n=i(25482),h=i(86211),u=i(67076),c=i(97348),d=i(43937),p=i(36005);const f=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=f.jsonValues.slice();(0,a.Xy)(g,"orthometric");const y=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=r=class extends n.o{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),("service"===t?.origin||"web-scene"===t?.origin)&&(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,h.LA)(e)||y.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){let{latestVcsWkid:t,vcsWkid:i}=e;if(!i)return null;let s=(null==t?null:c.B.get(t))??c.B.get(i);return s?new r({heightModel:0===s.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,h.LA)(s.unit.name),vertCRS:s.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;let t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,l.MZ)()],m.prototype,"origin",void 0),(0,s.Cg)([(0,l.MZ)()],m.prototype,"associatedSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,d.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,l.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y.jsonValues,write:{writer:y.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,l.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=r=(0,s.Cg)([(0,l.$K)("esri.geometry.HeightModelInfo")],m)},38732(e,t,i){i.r(t),i.d(t,{default:()=>S});var r=i(32198),s=i(91429),l=i(49186),a=i(97768),o=i(25728),n=i(17676),h=i(84952),u=i(78888),c=i(4146),d=i(89186),p=i(18768),f=i(85707),g=i(34287),y=i(8303),m=i(10873),v=i(87378),_=i(35982);class w extends _.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(b.forEach((e,t)=>{e===this&&b.delete(t)}),this.destroy())}}const b=new Map;var C=i(36005);let M=class extends((0,f.a)((0,d.f)((0,p.b)((0,g.q)((0,y.A)((0,o.M)(c.A))))))){constructor(e){super(e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=b.get(e);return t||(null==e?(t=new w,b.set(null,t)):(t=new w(t=>e.immediate.schedule(t)),b.set(e,t))),++t.ref,t}()}destroy(){this._lercDecoder=(0,a.Gz)(this._lercDecoder)}readCapabilities(e,t){let i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}get memoizedElevationQueryDependencies(){return[this.loadStatus,this.tileInfo,this.fullExtent,this.spatialReference]}readVersion(e,t){let i=t.currentVersion;return i||=9.3,i}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new l.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(n.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,r){let s=r?.signal,a={responseType:"array-buffer",signal:s,useQueue:r?.useQueue,priority:r?.priority},o={noDataValue:r?.noDataValue};await this.load(),await this._fetchTileAvailability(e,t,i,r);let n=await(0,u.A)(this.getTileUrl(e,t,i),a),h=await this._lercDecoder.decode(n.data,o,s);if(!h)throw new l.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new v.A({values:h.pixelData,width:h.width,height:h.height,noDataValue:h.noDataValue})}getTileUrl(e,t,i){let r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){let{query:r}=await i.e(4943).then(()=>i(54943));return(0,n.Te)(t),r(this,e,t)}async queryElevationForGround(e,t){let{queryElevationFromTiles:r}=await i.e(4943).then(()=>i(54943));return r(this,e,t)}async createElevationSampler(e,t){let{createSampler:r}=await i.e(4943).then(()=>i(54943));return(0,n.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;let t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,u.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,r.Cg)([(0,s.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,r.Cg)([(0,C.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,r.Cg)([(0,s.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,r.Cg)([(0,s.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,s.MZ)()],M.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,s.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)()],M.prototype,"memoizedElevationQueryDependencies",null),(0,r.Cg)([(0,s.MZ)(m.OZ)],M.prototype,"url",void 0),(0,r.Cg)([(0,s.MZ)()],M.prototype,"version",void 0),(0,r.Cg)([(0,C.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,r.Cg)([(0,s.$K)("esri.layers.ElevationLayer")],M);const A=Symbol("default-fetch-tile");M.prototype.fetchTile[A]=!0;const S=M},89186(e,t,i){var r=i(32198),s=i(91429),l=i(16930),a=i(87045),o=i(65509),n=i(25943),h=i(36005);i.d(t,["f",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){let r=t.capabilities?.toLowerCase().includes("tilemap"),{minLOD:s,maxLOD:l,minScale:h,maxScale:u}=t;if(null==s&&null==l&&(0!==h||0!==u)){let e=e=>Math.round(1e4*e)/1e4;h=e(h||t.tileInfo.lods[0].scale),u=e(u||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(let i of t.tileInfo.lods){let t=e(i.scale);s=t>=h?i.level:s,l=t>=u?i.level:l}}if(r)return new n.d({layer:this,minLOD:s,maxLOD:l});if(t.tileInfo){let e=new a.A;return e.read(t.tileInfo,i),new o.A(e,s,l)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:l.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:a.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}])},18768(e,t,i){var r=i(32198),s=i(91429),l=i(53966),a=i(60694);i.d(t,["b",0,e=>{let t=e,i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,l.A.getLogger(this)))}};return(0,r.Cg)([(0,s.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,s.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISService")],i),i}])},85707(e,t,i){var r=i(32198),s=i(91429),l=i(54239);i.d(t,["a",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,r.Cg)([(0,s.MZ)({readOnly:!0,type:l.A})],i.prototype,"heightModelInfo",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.HeightModelInfoMixin")],i),i}])},8303(e,t,i){var r=i(32198),s=i(92602),l=i(91429),a=i(60999),o=i(49186),n=i(36563),h=i(53966),u=i(97768),c=i(17676),d=i(84952),p=i(70333),f=i(20655),g=i(80812),y=i(41318),m=i(10407),v=i(78888),_=i(26121),w=i(77548),b=i(36005),C=i(43937);const M={credential:null,user:null};i.d(t,["A",0,e=>{let t=e,A=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:r}=await i.e(1204).then(()=>i(41204));return(0,c.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let r=t?.signal?null:new AbortController;try{let{reload:s}=await i.e(1204).then(()=>i(41204));return r&&this.addHandles((0,n.rE)(r),"reloadFromPortal"),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:r.signal})}catch(e){throw(0,c.zf)(e)||h.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{r&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);let r,s,l=!p.id?.findCredential(this.url),a=e===i.id;if(a&&i.portal.user)return this._getUserPrivileges(i,l);if(a)r=i.portal.url;else try{r=await(0,w.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!r||!(0,d.b8)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;s=await(p.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(a?await i.reload():(i=new g.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,l)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let i=(0,m.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?p.id?.findCredential(this.url):null;if(!t)return!0;let i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let i=p.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;let r=`${i.owningSystemUrl}/sharing/rest`,s=f.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(r))return s.user;let l=`${r}/community/self`,o=null==e?null:e.signal,n=await(0,a.Ke)((0,v.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:o}));return n.ok?y.A.fromJSON(n.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,_.wN)(this.portalItem,t)?(t?.messages?.push(new o.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,l.MZ)({type:g.default})],A.prototype,"portalItem",null),(0,r.Cg)([(0,b.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,r.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,r.Cg)([(0,l.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.PortalLayer")],A),A}])},87378(e,t,i){i.d(t,{A:()=>o});var r,s=i(56507),l=i(34275);const a=Symbol("ElevationTileDataClass");class o{static{r=a}constructor({values:e,width:t,height:i,noDataValue:s}){this[r]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,l.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=s}get hasNoDataValues(){if(null==this._hasNoDataValues){let e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;let{noDataValue:e,values:t}=this,i=1/0,r=-1/0,s=!0;for(let l of t)l===e?this._hasNoDataValues=!0:(i=l<i?l:i,r=l>r?l:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}static{this.from=(0,s.qf)(o)}}},91806(e,t,i){i.d(t,{A:()=>n});var r,s=i(32198),l=i(91429),a=i(56507),o=i(25482);let n=class extends o.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s.Cg)([(0,l.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"cols",void 0),(0,s.Cg)([(0,l.MZ)({type:a.jz,json:{write:!0}})],n.prototype,"level",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],n.prototype,"levelValue",void 0),(0,s.Cg)([(0,l.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"origin",void 0),(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],n.prototype,"resolution",void 0),(0,s.Cg)([(0,l.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"rows",void 0),(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],n.prototype,"scale",void 0),n=r=(0,s.Cg)([(0,l.$K)("esri.layers.support.LOD")],n)},87045(e,t,i){i.d(t,{A:()=>_});var r,s=i(32198),l=i(91429),a=i(56507),o=i(66552),n=i(25482),h=i(86211),u=i(86738),c=i(16930),d=i(21325),p=i(28735),f=i(91806),g=i(72802),y=i(36005),m=i(43937);const v=new o.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",JPEGPlus:"jpgplus",pbf:"pbf"});let _=class extends n.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:l=c.A.WebMercator,numLODs:a=24}=e;if(!(0,d.fn)(l)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new f.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=a-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new u.A({x:0,y:0,spatialReference:l}),size:[s,s],spatialReference:l})}let o=(0,d.Vp)(l),n=e.origin?new u.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):o?new u.A({x:o.origin[0],y:o.origin[1],spatialReference:l}):new u.A({x:0,y:0,spatialReference:l}),p=1/(39.37*(0,h.GA)(l)*96),g=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*p;g.push(new f.A({level:e,scale:t,resolution:r}))}else{let e=(0,d.EA)(l)?512/s*591657527.5917094:256/s*591657527.591555,i=Math.ceil(a/t);g.push(new f.A({level:0,scale:e,resolution:e*p}));for(let r=1;r<i;r++){let i=e/2**t,s=i*p;g.push(new f.A({level:r,scale:i,resolution:s})),e=i}}return new r({dpi:96,lods:g,origin:n,size:[s,s],spatialReference:l})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],s=t[r+1];if(i<=e)return r;if(s===e)return r+1;if(i>e&&s<e)return r+Math.log(i/e)/Math.log(i/s)}return r}tileAt(e,t,i,r){let s,l,a=this.lodAt(e);if(!a)return null;if("number"==typeof t)s=t,l=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))s=t.x,l=t.y,r=i;else{let e=(0,p.y)(t,this.spatialReference);if(null==e)return null;s=e.x,l=e.y,r=i}let o=a.resolution*this.size[0],n=a.resolution*this.size[1];return r??=new g.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-l)/n+.001),r.col=Math.floor((s-this.origin.x)/o+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,s=i.resolution*this.size[0]/2**r,l=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+l,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,s=r*this.size[0],l=r*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+s,e[3]=e[1]+l,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],s=this.lods.length-t;for(let e=0;e<s;e++){let r=e+t,{scale:s,resolution:l}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new f.A({level:e,scale:s,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],_.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],_.prototype,"dpi",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],_.prototype,"format",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],_.prototype,"isWrappable",null),(0,s.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],_.prototype,"origin",void 0),(0,s.Cg)([(0,y.w)("origin")],_.prototype,"readOrigin",null),(0,s.Cg)([(0,l.MZ)({type:[f.A],value:null,json:{write:!0}})],_.prototype,"lods",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],_.prototype,"scales",void 0),(0,s.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],_.prototype,"size",void 0),(0,s.Cg)([(0,y.w)("size",["rows","cols"])],_.prototype,"readSize",null),(0,s.Cg)([(0,m.K)("size",{cols:{type:a.jz},rows:{type:a.jz}})],_.prototype,"writeSize",null),(0,s.Cg)([(0,l.MZ)({type:c.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),_=r=(0,s.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],_)},65509(e,t,i){i.d(t,{A:()=>l});var r=i(49186),s=i(17676);class l{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){let r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,l){await(0,s.NO)(l);let a=this.getAvailability(e,t,i);if("unavailable"===a)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return a}async fetchAvailabilityUpsample(e,t,i,r,l){await(0,s.NO)(l),r.level=e,r.row=t,r.col=i;let a=this.tileInfo;return a.updateTileInfo(r),this.fetchAvailability(e,t,i,l).catch(e=>{if((0,s.zf)(e))throw e;if(a.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e})}}},72802(e,t,i){i.d(t,{U:()=>s});var r=i(19419);class s{constructor(e,t,i,s=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=s}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new s(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>C});var r,s=i(32198),l=i(56372),a=i(91429),o=i(49186),n=i(36563),h=(i(44208),i(66344)),u=i(15142),c=i(17676),d=i(36708),p=i(76030),f=i(84952),g=i(78888),y=i(72802),m=i(4718),v=i(69397);class _{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);let{location:t,data:i}=e;this.location=Object.freeze((0,m.o8)(t));let r=this.location.width,s=this.location.height,l=!0,a=!0,n=function(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Uint32Array(e)}(Math.ceil(r*s/32)),h=0;for(let e=0;e<i.length;e++){let t=e%32;i[e]?(a=!1,n[h]|=1<<t):l=!1,31===t&&++h}a?(this._availability="unavailable",this.byteSize=40):l?(this._availability="available",this.byteSize=40):(this._availability=n,this.byteSize=40+(0,v.Qf)(n))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;let i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,l=this._availability;return s<0||s>l.length?"unknown":l[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){let i=e.service.request||g.A,{row:r,col:s,width:l,height:a}=e,n={query:{f:"json"}};return t=t?{...n,...t}:n,i(function(e){let t;if(e.service.tileServers?.length){let i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;let i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:l,height:a},valid:!0,data:Array(l*a).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==l||e.location.height!==a))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:l,height:a}});return _.fromJSON(e)})}static fromJSON(e){return Object.freeze(new _(e))}}function w(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function b(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let C=class extends l.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=g.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,d.wB)(()=>{let{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),d.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";let r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(b(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof _){let s=r.getAvailability(t,i);if("unavailable"===s)throw b(e,t,i);return s}if((0,c.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;let l=this.layer.tileInfo;l.updateTileInfo(r);let a=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,c.zf)(e))throw e;if(l.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,l){if(!this._prefetchingEnabled)return;let a=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(a))return;let o=new AbortController;l.then(()=>o.abort(),()=>o.abort());let h=!1,u=(0,n.hA)(()=>{h||(h=!0,o.abort())});if(this.addHandles(u,a),await(0,p.md)(10,o.signal).catch(()=>{}),h||(h=!0,this.removeHandles(a)),(0,c.G4)(o))return;let d=new y.U(e,t,i),f={...s,signal:o.signal},g=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&g.upsampleTile(d);++e){let e=this.fetchAvailability(d.level,d.row,d.col,f);r._prefetches.push(e);let t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));let s=this._tmpTilemapDefinition,l=this._tilemapFromCache(e,t,i,s);if(l)return Promise.resolve(l);let a=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,c.u7)(a,()=>t((0,c.NK)()));let i=w(s),l=this._pendingTilemapRequests[i];if(!l){l=_.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));let e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=l,l.then(e,e)}l.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;let{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,f.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;let s=w(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],C.prototype,"layer",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],C.prototype,"minLOD",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],C.prototype,"maxLOD",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],C.prototype,"request",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],C.prototype,"size",void 0),C=r=(0,s.Cg)([(0,a.$K)("esri.layers.support.TilemapCache")],C)},10407(e,t,i){i.d(t,{It:()=>p,LG:()=>a,OM:()=>h,Sm:()=>u,Y:()=>o,bK:()=>n,mm:()=>d,sQ:()=>c});var r=i(99917),s=i(16930),l=i(28735);function a(e,t){if(!o(e,t)){let i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function n(e){return o(e,d.HOSTED_SERVICE)}function h(e,t){let i=e.typeKeywords;if(i){let e=i.indexOf(t);e>-1&&i.splice(e,1)}}function u(e,t,i){i?a(e,t):h(e,t)}async function c(e){let t,i=e.clone().normalize();if(i.length>1)for(let e of i)t?e.width>t.width&&(t=e):t=e;else t=i[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,l.ci)(e);let i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(t)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function p(e){let{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges,l=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit"),o="update"===r||"admin"===r;return o?a=l=!0:a&&(l=!0),{features:{edit:l,fullEdit:a},content:{updateItem:o}}}},78553(e,t,i){i.d(t,{D:()=>l,p:()=>s});var r=i(56507);function s(e){let t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){let t=1-e/100;return Math.max(0,Math.min(t,1))}},26121(e,t,i){i.d(t,{I6:()=>u,ci:()=>h,dL:()=>n,wN:()=>c});var r=i(49186),s=i(84952),l=i(77548),a=i(20655),o=i(59923);async function n(e){let t=[];for(let i of e.allLayers)if("beforeSave"in i&&"function"==typeof i.beforeSave){let e=i.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function h(e,t,i){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:i})=>new r.A(e,t,i));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>(0,o.GL)("url",`Relative url '${e}' is not supported`)))),i){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:r}=i;e&&(s=s.filter(({name:e})=>!(o.MG.has(e)||t.includes(e)))),r&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new r.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}function u(e){return(0,l.qd)(e).some(e=>!!e.charts?.length)}function c(e,t){let i=t?.portal,r=e?.id&&(e.portal||a.A.getDefault());return!!i&&!!r&&!(0,s.ut)(r.restUrl,i.restUrl)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[161],{51850(t,e,n){function r(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function o(t,e,n){return[t,e,n]}function a(t,e,n){return[t,e,n]}function u(t,e=[0,0,0]){let n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function s(){return o(1,1,1)}function l(){return o(1,0,0)}function f(){return o(0,1,0)}function c(){return o(0,0,1)}n.d(e,{CN:()=>a,Cb:()=>g,Cw:()=>d,JP:()=>M,Un:()=>m,ci:()=>u,fA:()=>o,o8:()=>i,uY:()=>h,vt:()=>r});const h=[0,0,0],m=s(),d=l(),M=f(),g=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_X:d,UNIT_Y:M,UNIT_Z:g,ZEROS:h,clone:i,create:r,freeze:a,fromArray:u,fromValues:o,ones:s,unitX:l,unitY:f,unitZ:c,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},34304(t,e,n){n.d(e,{DF:()=>s,FD:()=>i,Ov:()=>o,ct:()=>l});let r=1e-6;function i(){return r}const o=Math.random,a=Math.PI/180,u=180/Math.PI;function s(t){return t*a}function l(t){return t*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:o,equals:function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:l,toRadian:s},Symbol.toStringTag,{value:"Module"}))},37585(t,e,n){n.d(e,{C:()=>o,Cc:()=>A,Il:()=>U,Io:()=>g,LI:()=>m,Ln:()=>M,Om:()=>v,Re:()=>s,S8:()=>w,T9:()=>c,WQ:()=>u,aI:()=>_,e$:()=>S,hG:()=>y,hZ:()=>a,hs:()=>d,jb:()=>E,l0:()=>x,qE:()=>h,t2:()=>I});var r=n(34727),i=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t}function a(t,e,n){return t[0]=e,t[1]=n,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function s(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function f(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function h(t,e,n,i){return t[0]=(0,r.qE)(e[0],n[0],i[0]),t[1]=(0,r.qE)(e[1],n[1],i[1]),t}function m(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function d(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function M(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function g(t,e){let n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function y(t,e){let n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function p(t){let e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function b(t){let e=t[0],n=t[1];return e*e+n*n}function w(t,e){let n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]}function A(t,e,n,r){let i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function x(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function S(t,e,n,r){let i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+n[0],t[1]=i*a+o*u+n[1],t}function I(t,e){return t[0]===e[0]&&t[1]===e[1]}function _(t,e){let n=t[0],r=t[1],o=e[0],a=e[1],u=(0,i.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))}const U=p,E=s,N=l,C=f,T=g,O=y,q=b;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){let n=t[0],r=t[1],i=e[0],o=e[1],a=n*n+r*r;a>0&&(a=1/Math.sqrt(a));let u=i*i+o*o;u>0&&(u=1/Math.sqrt(u));let s=(n*i+r*o)*a*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},clamp:h,copy:o,cross:function(t,e,n){let r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},dist:T,distance:g,div:C,divide:f,dot:v,equals:_,exactEquals:I,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:U,length:p,lerp:A,max:c,min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:N,multiply:l,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:w,projectAndScale:function(t,e,n,r,i){let o=e[0]-n[0],a=e[1]-n[1],u=(r[0]*o+r[1]*a)*(i-1);return o=r[0]*u,a=r[1]*u,t[0]=e[0]+o,t[1]=e[1]+a,t},random:function(t,e=1){let n=2*(0,i.Ov)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:S,round:m,scale:d,scaleAndAdd:M,set:a,sqrDist:O,sqrLen:q,squaredDistance:y,squaredLength:b,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:E,subtract:s,transformMat2:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:x,transformMat3:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"})),n.d(e,["xg",0,T])},35522(t,e,n){n.d(e,{$A:()=>I,Bw:()=>o,C:()=>a,Cc:()=>_,DI:()=>A,Il:()=>D,Io:()=>p,Ln:()=>y,Om:()=>S,Qr:()=>c,Re:()=>l,S8:()=>x,T9:()=>M,WQ:()=>s,Z0:()=>U,_S:()=>m,aI:()=>B,ei:()=>E,fw:()=>C,gL:()=>N,hG:()=>b,hZ:()=>u,hs:()=>g,jb:()=>z,jk:()=>d,lo:()=>V,lw:()=>f,m3:()=>w,oW:()=>F,t2:()=>q,tn:()=>h,uE:()=>W,ze:()=>v});var r=n(51850),i=n(34304);function o(t){let e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function l(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function m(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function M(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function g(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function p(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function b(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function w(t){let e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function v(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function A(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function x(t,e=t){let n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function I(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2];return t[0]=i*s-o*u,t[1]=o*a-r*s,t[2]=r*u-i*a,t}function _(t,e,n,r){let i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function U(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12],t[1]=n[1]*r+n[5]*i+n[9]*o+n[13],t[2]=n[2]*r+n[6]*i+n[10]*o+n[14],t}function E(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function N(t,e,n){return C(t,e,n[0],n[1],n[2],n[3])}function C(t,e,n,r,i,o){let a=e[0],u=e[1],s=e[2],l=r*s-i*u,f=i*a-n*s,c=n*u-r*a,h=r*c-i*f,m=i*l-n*c,d=n*f-r*l,M=2*o;return t[0]=a+l*M+2*h,t[1]=u+f*M+2*m,t[2]=s+c*M+2*d,t}const T=(0,r.vt)(),O=(0,r.vt)();function q(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function B(t,e){if(t===e)return!0;let n=t[0],r=t[1],o=t[2],a=e[0],u=e[1],s=e[2],l=(0,i.FD)();return Math.abs(n-a)<=l*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-s)<=l*Math.max(1,Math.abs(o),Math.abs(s))}function F(t,e,n){let r=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2],a=r*r+i*i+o*o;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=i*a,t[2]=o*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const z=l,P=f,L=c,R=p,V=b,D=o,W=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:function(t,e){x(T,t),x(O,e);let n=S(T,O);return n>1?0:n<-1?Math.PI:Math.acos(n)},applyTranslation:function(t,e,n){return t[0]=e[0]+n[12],t[1]=e[1]+n[13],t[2]=e[2]+n[14],t},bezier:function(t,e,n,r,i,o){let a=1-o,u=a*a,s=o*o,l=u*a,f=3*o*u,c=3*s*a,h=s*o;return t[0]=e[0]*l+n[0]*f+r[0]*c+i[0]*h,t[1]=e[1]*l+n[1]*f+r[1]*c+i[1]*h,t[2]=e[2]*l+n[2]*f+r[2]*c+i[2]*h,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:a,cross:I,crossAndNormalize:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2],l=i*s-o*u,f=o*a-r*s,c=r*u-i*a,h=Math.sqrt(l*l+f*f+c*c);return t[0]=l/h,t[1]=f/h,t[2]=c/h,t},direction:F,dist:R,distance:p,div:L,divide:c,dot:S,equals:B,exactEquals:q,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,i,o){let a=o*o,u=a*(2*o-3)+1,s=a*(o-2)+o,l=a*(o-1),f=a*(3-2*o);return t[0]=e[0]*u+n[0]*s+r[0]*l+i[0]*f,t[1]=e[1]*u+n[1]*s+r[1]*l+i[1]*f,t[2]=e[2]*u+n[2]*s+r[2]*l+i[2]*f,t},inverse:A,len:D,length:o,lerp:_,max:M,min:d,mul:P,multiply:f,negate:v,normalize:x,random:function(t,e=1){let n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,a=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=o*e,t},rotateX:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:g,scaleAndAdd:y,scaleTo:function(t,e){return g(t,t,e/D(t))},set:u,sign:m,sqrDist:V,sqrLen:W,squaredDistance:b,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:z,subtract:l,transformMat3:E,transformMat4:U,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:N,transformQuatValues:C},Symbol.toStringTag,{value:"Module"}))},34727(t,e,n){n.d(e,{$8:()=>x,Cc:()=>a,Hx:()=>M,Io:()=>v,KJ:()=>l,OS:()=>_,Sp:()=>h,XM:()=>f,YN:()=>c,ZH:()=>d,b6:()=>A,cU:()=>i,gg:()=>m,hs:()=>u,kU:()=>s,or:()=>I,pF:()=>E,pq:()=>U,qE:()=>o});const r=new Float32Array(1);function i(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function o(t,e,n){return Math.min(Math.max(t,e),n)}function a(t,e,n){return t+(e-t)*n}function u(t,e,n,r,i){return a(r,i,(t-e)/(n-e))}function s(t){return t*Math.PI/180}function l(t){return 180*t/Math.PI}function f(t){return Math.acos(o(t,-1,1))}function c(t){return Math.asin(o(t,-1,1))}function h(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function m(t,e,n=1e-6){return!h(t,e,n)&&t>e}function d(t,e,n=1e-6){return!h(t,e,n)&&t<e}function M(t,e,n=1e-6){return h(t,e,n)||t>e}const g=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function y(t){return g.setFloat64(0,t),g.getBigInt64(0)}const p=1000000n,b=w(1);function w(t){let e=y(t=Math.abs(t)),n=function(t){return g.setBigInt64(0,t),g.getFloat64(0)}(e<=p?p:e-p);return Math.abs(t-n)}function v(t,e,n=b){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&w(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;let r=y(t),i=y(e);return!(r<0!=i<0||(r<i?i-r:r-i)>p)}function A(t,e,n=1e-6){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;let r=Math.abs(t-e),i=Math.abs(t),o=Math.abs(e);if(0===t||0===e||i<1e-12&&o<1e-12){if(r>.01*n)return!1}else if(r/(i+o)>n)return!1;return!0}function x(t){return S(Math.max(-U,Math.min(t,U)))}function S(t){return r[0]=t,r[0]}function I(t){let e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(h(e,1)&&h(n,1)&&h(r,1))}function _(t,e){return(t%e+e)%e}const U=S(34028234663852886e22);function E(t,e,n){if(void 0===n||0==+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let r=e.toString().split("e");return r=(e=Math[t](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}},97146(t,e,n){n.d(e,{Dg:()=>o,lc:()=>c,my:()=>a,tM:()=>h,uW:()=>i});var r=n(34275);function i(t){return o(t,!0)}function o(t,e){if(Array.isArray(t)){if(t.length<1024)return t}else if(t.length<1024)return Array.from(t);let n=!0,i=!0;return t.some((t,e)=>(n&&=0===t,i&&=t===e,!n&&!i)),n?function(t){if(1===t)return l;if(t<1024)return Array(t).fill(0);if(t>s.length){let e=Math.max(2*s.length,t);s=new Uint8Array(e)}return new Uint8Array(s.buffer,0,t)}(t.length):i?h(t.length):(0,r.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,e){for(let n of t){if(n>=65536)return(0,r.iu)(t)?t:new Uint32Array(t);n>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}(t,!e)}function a(t,e=t){return t<=1024?Array(t):e<=65536?new Uint16Array(t):new Uint32Array(t)}let u=m(131072),s=new Uint8Array(65536);const l=[0],f=(()=>{let t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function c(t){if(t===l)return!0;if(!(0,r.iu)(t))return!1;let{buffer:e}=t;return e===f.buffer||e===u.buffer||e===s.buffer}function h(t){return 1===t?l:t<1024?function(t){let e=Array(t).fill(0);for(let n=0;n<t;n++)e[n]=n;return e}(t):t<f.length?new Uint16Array(f.buffer,0,t):(t>u.length&&(u=m(Math.max(2*u.length,t))),new Uint32Array(u.buffer,0,t))}function m(t){let e=new Uint32Array(t);for(let t=0;t<e.length;t++)e[t]=t;return e}},10614(t,e,n){n.d(e,{Tz:()=>a,aT:()=>o});var r=n(35522),i=(n(51850),n(34727));function o(t,e,n,r,i,o=2,a=0){let s=1/(Math.abs(n)+Math.abs(r)+Math.abs(i)),l=n*s,f=r*s,c=i<=0?(l>=0?1:-1)*(1-Math.abs(f)):l,h=i<=0?(f>=0?1:-1)*(1-Math.abs(l)):f,m=e*o+a;t[m]=u(c),t[m+1]=u(h)}function a(t,e,n,i=2,o=0){let a=n*i+o,u=s(e[a]),l=s(e[a+1]),f=1-Math.abs(u)-Math.abs(l);return t[2]=f,f<0?(t[0]=(u>=0?1:-1)*(1-Math.abs(l)),t[1]=(l>=0?1:-1)*(1-Math.abs(u))):(t[0]=u,t[1]=l),(0,r.S8)(t,t)}function u(t){return(0,i.qE)(Math.round(32767*t),-32767,32767)}function s(t){return(0,i.qE)(t/32767,-1,1)}},99058(t,e,n){n.d(e,{I$:()=>y,gr:()=>w,In:()=>v});var r=n(4431),i=n(1843),o=n(63907);class a{constructor(t){this.internalFormat=t,this.channelByteStride=4,this.dataType=o.ld.UNSIGNED_INT,this.elementArrayConstructor=Uint32Array,this.pixelFormat=s[t],this.channels=u[this.pixelFormat],this.byteStride=this.channelByteStride*this.channels}}const u={36244:1,33320:2,36249:4},s={[o.H0.R32UI]:36244,[o.H0.RG32UI]:33320,[o.H0.RGBA32UI]:36249},l=[new a(o.H0.RGBA32UI),new a(o.H0.RG32UI),new a(o.H0.R32UI)];function f(t){let e=1/0,n=null;for(let r of l){let i=r.byteStride,o=(i-t%i)%i;o<e&&(e=o,n=r)}return n??l[2]}var c=n(13030),h=n(90239);class m{constructor(t,e,n){this.elementCount=t,this.elementType=e,this.bufferViewConstructor=n,this.byteSize=function(t){return(0,h.GJ)(t.ElementType)*t.ElementCount}(n)}}const d={u8:new m(1,"uint",c.SL),u32:new m(1,"uint",c.P),vec4u32:new m(4,"uint",c.ml),vec4u8:new m(4,"uint",c.XP),unorm8:new m(1,"float",c.dy),vec4unorm8:new m(4,"float",c.td),snorm16:new m(1,"float",c.Qy),vec2snorm16:new m(2,"float",c.ES),f16:new m(1,"float",c.XW),vec4f16:new m(4,"float",c.jz),f32:new m(1,"float",c.Y$),vec2f32:new m(2,"float",c.gH),vec3f32:new m(3,"float",c.xs),vec4f32:new m(4,"float",c.Eq),mat3f32:new m(9,"float",c.jZ)};class M{constructor(t,e,n,r){this._declaration=t,this._byteOffset=e,this._creationInfo=r,this._startTexel=Math.floor(e/n);let i=r.byteSize;this._numTexels=Math.ceil((e+i)/n)-this._startTexel,this._texelByteStride=n}get name(){return this._declaration.name}get fieldType(){return this._declaration.type}get byteOffset(){return this._byteOffset}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get texelByteStride(){return this._texelByteStride}get elementType(){return this._creationInfo.elementType}get elementCount(){return this._creationInfo.elementCount}get byteSize(){return this._creationInfo.byteSize}get bufferViewConstructor(){return this._creationInfo.bufferViewConstructor}}class g{constructor(t,e,n,r=0){this.layout=t,this.byteOffset=r,this._bufferViews=new Map,this.buffer="number"==typeof e?new ArrayBuffer(e*t.byteStride):e,this.texelElementBuffer=new n(this.buffer,r);let i=this._bufferViews;for(let[t,e]of this.layout.fields)i.set(t,new e.bufferViewConstructor(this.buffer,r+e.byteOffset,this.layout.byteStride))}get stride(){return this.layout.byteStride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(t,e){let n=this._bufferViews.get(t);return null!=n&&n.elementCount===e.ElementCount&&n.elementType===e.ElementType?n:null}copyItem(t,e){let{buffer:n,layout:r,byteOffset:i}=this,o=new Uint8Array(n),a=r.byteStride,u=i+t*a,s=i+e*a;o.copyWithin(s,u,u+a)}copyFrom(t,e=0,n=0,r=t.count){let i=this.stride,o=t.byteOffset+e*i,a=this.byteOffset+n*i,u=r*i;if(i%4==0&&o%4==0&&a%4==0){let e=new Uint32Array(t.buffer,o,u/4);new Uint32Array(this.buffer,a,u/4).set(e)}else{let e=new Uint8Array(t.buffer,o,u);new Uint8Array(this.buffer,a,u).set(e)}return this}get usedMemory(){return this.byteLength}}const y=(0,i.BP)().vec3f("position").u16("componentIndex",{integer:!0}).freeze(),p=(0,i.BP)().vec2u8("sideness").freeze(),b=(0,r.U)(p),w=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),v=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),A=(0,r.U)(w,1),x=(0,r.U)(v,1);b.concat(A),b.concat(x),new class{constructor(t){this._fields=new Map;let e=0,n=[];for(let r=0;r<t.length;++r){let i=t[r],{type:o}=i,a=d[o];n.push({declaration:i,byteOffset:e,creationInfo:a}),e+=a.byteSize}this.texelFormatInfo=f(e);let{texelByteStride:r}=this;e=Math.ceil(e/r)*r;let i=e,o=this._fields;for(let{declaration:t,byteOffset:e,creationInfo:i}of n)o.set(t.name,new M(t,e,r,i));this.byteStride=i,this.texelStride=Math.ceil(i/r)}get texelByteStride(){return this.texelFormatInfo.byteStride}get texelElementArrayConstructor(){return this.texelFormatInfo.elementArrayConstructor}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(t){return new g(this,t,this.texelElementArrayConstructor)}createView(t,e){return new g(this,t,this.texelElementArrayConstructor,e)}}([{name:"color",type:"vec4unorm8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"unorm8"},{name:"elevationOffset",type:"f32"}])},93406(t,e,n){n.d(e,{K:()=>u});var r=n(35522),i=n(51850),o=n(34727),a=n(15142);function u(t,e,n){let i=t.vertices.position,o=t.vertices.componentIndex,a=d.position0,u=d.position1,f=d.faceNormal0,h=d.faceNormal1,{edges:m,normals:M}=l(t),g=m.length/4,y=e.allocate(g),p=0,b=g,A=n?.allocate(b),S=0,I=0,_=0;c.length=0;for(let t=0;t<g;++t){let e=4*t;i.getVec(m.data[e],a),i.getVec(m.data[e+1],u);let n=c.pushNew();n.index=4*t,n.length=(0,r.Io)(a,u)}c.sort((t,e)=>e.length-t.length);let U=[],E=[];c.forAll(({length:t,index:l})=>{let c=m.data[l],g=m.data[l+1],b=m.data[l+2],N=m.data[l+3],C=-1===N;if(i.getVec(c,a),i.getVec(g,u),C){let t=3*b;(0,r.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),(0,r.C)(h,f),d.componentIndex=o.get(c),d.cosAngle=(0,r.Om)(f,h)}else{let t=3*b;if((0,r.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),t=3*N,(0,r.hZ)(h,M.data[t],M.data[t+1],M.data[t+2]),d.componentIndex=o.get(c),d.cosAngle=(0,r.Om)(f,h),function(t,e){return t.cosAngle>e}(d,v))return;d.cosAngle<-.9999&&(0,r.C)(h,f)}I+=t,_++,C||function(t,e){return t.cosAngle<e}(d,x)?(e.write(y,p++,d),U.push(t)):s(d,w)&&(A&&n&&n.write(A,S++,d),E.push(t))});let N=new Float32Array(U.reverse()),C=new Float32Array(E.reverse()),T=A&&n?{instancesData:A.slice(0,S),lodInfo:{lengths:C}}:void 0;return{regular:{instancesData:y.slice(0,p),lodInfo:{lengths:N}},silhouette:T,averageEdgeLength:I/_}}function s(t,e){let n=(0,o.XM)(t.cosAngle);return(0,r.oW)(g,t.position1,t.position0),n*((0,r.Om)((0,r.$A)(M,t.faceNormal0,t.faceNormal1),g)>0?-1:1)>e}function l(t){let e=t.faces.length/3,n=t.faces,i=t.neighbors,o=t.vertices.position;h.length=m.length=0;for(let t=0;t<e;t++){let e=3*t,a=i[e],u=i[e+1],s=i[e+2],l=n[e],f=n[e+1],c=n[e+2];o.getVec(l,y),o.getVec(f,p),o.getVec(c,b),(0,r.Re)(p,p,y),(0,r.Re)(b,b,y),(0,r.$A)(y,p,b),(0,r.S8)(y,y),m.pushArray(y),(-1===a||l<f)&&(h.push(l),h.push(f),h.push(t),h.push(a)),(-1===u||f<c)&&(h.push(f),h.push(c),h.push(t),h.push(u)),(-1===s||c<l)&&(h.push(c),h.push(l),h.push(t),h.push(s))}return{edges:h,normals:m}}class f{constructor(){this.index=0,this.length=0}}const c=new a.A({allocator:t=>t||new f,deallocator:null}),h=new a.A({deallocator:null}),m=new a.A({deallocator:null}),d=new class{constructor(){this.position0=(0,i.vt)(),this.position1=(0,i.vt)(),this.faceNormal0=(0,i.vt)(),this.faceNormal1=(0,i.vt)(),this.componentIndex=0,this.cosAngle=0}},M=(0,i.vt)(),g=(0,i.vt)(),y=(0,i.vt)(),p=(0,i.vt)(),b=(0,i.vt)(),w=(0,o.kU)(4),v=Math.cos(w),A=(0,o.kU)(35),x=Math.cos(A)},44801(t,e,n){n.d(e,{o6:()=>U,HY:()=>q,hx:()=>E,Jb:()=>O});var r=n(34727),i=n(97146);function o(t,e,n){let o=Array.isArray(t),f=o?t.length/e:t.byteLength/(4*e),c=o?t:new Uint32Array(t,0,f*e),h=n?.minReduction??0,m=n?.originalIndices||null,d=m?m.length:0,M=n?.componentOffsets||null,g=0;if(M)for(let t=0;t<M.length-1;t++){let e=M[t+1]-M[t];e>g&&(g=e)}else g=f;let y=Math.floor(1.1*g)+1;(null==l||l.length<2*y)&&(l=new Uint32Array((0,r.cU)(2*y)));for(let t=0;t<2*y;t++)l[t]=0;let p=0,b=!!M&&!!m,w=b?d:f,v=(0,i.my)(f),A=new Uint32Array(d),x=1.96,S=0===h?w:Math.ceil(4*x*x/(h*h)*h*(1-h)),I=1,_=M?M[1]:w;for(let t=0;t<w;t++){if(t===S){let e=1-p/t;if(e+x*Math.sqrt(e*(1-e)/t)<h)return null;S*=2}if(t===_){for(let t=0;t<2*y;t++)l[t]=0;if(m)for(let t=M[I-1];t<M[I];t++)A[t]=v[m[t]];_=M[++I]}let n=b?m[t]:t,r=n*e,i=s(c,r,e),o=i%y,u=p;for(;0!==l[2*o+1];){if(l[2*o]===i){let t=l[2*o+1]-1;if(a(c,r,t*e,e)){u=v[t];break}}o++,o>=y&&(o-=y)}u===p&&(l[2*o]=i,l[2*o+1]=n+1,p++),v[n]=u}if(0!==h&&1-p/f<h)return null;if(b){for(let t=M[I-1];t<A.length;t++)A[t]=v[m[t]];v=(0,i.uW)(A)}let U=o?Array(p):new Uint32Array(p*e);p=0;for(let t=0;t<w;t++)v[t]===p&&(u(c,(b?m[t]:t)*e,U,p*e,e),p++);if(m&&!b){let t=new Uint32Array(d);for(let e=0;e<t.length;e++)t[e]=v[m[e]];v=(0,i.uW)(t)}return{buffer:Array.isArray(U)?U:U.buffer,indices:v,uniqueCount:p}}function a(t,e,n,r){for(let i=0;i<r;i++)if(t[e+i]!==t[n+i])return!1;return!0}function u(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[e+o]}function s(t,e,n){let r=0;for(let i=0;i<n;i++)r=t[e+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let l=null;var f=n(1843);function c(t,e,n){let r=e/3,i=new Uint32Array(n+1),o=new Uint32Array(n+1),a=(t,e)=>{t<e?i[t+1]++:o[e+1]++};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];a(n,r),a(r,i),a(i,n)}let u=0,s=0;for(let t=0;t<n;t++){let e=i[t+1],n=o[t+1];i[t+1]=u,o[t+1]=s,u+=e,s+=n}let l=new Uint32Array(6*r),f=i[n],c=(t,e,n)=>{if(t<e){let r=i[t+1]++;l[2*r]=e,l[2*r+1]=n}else{let r=o[e+1]++;l[2*f+2*r]=t,l[2*f+2*r+1]=n}};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];c(n,r,e),c(r,i,e),c(i,n,e)}let h=(t,e)=>{let n=2*t,r=e-t;for(let t=1;t<r;t++){let e=l[n+2*t],r=l[n+2*t+1],i=t-1;for(;i>=0&&l[n+2*i]>e;i--)l[n+2*i+2]=l[n+2*i],l[n+2*i+3]=l[n+2*i+1];l[n+2*i+2]=e,l[n+2*i+3]=r}};for(let t=0;t<n;t++)h(i[t],i[t+1]),h(f+o[t],f+o[t+1]);let m=new Int32Array(3*r),d=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,M=(t,e)=>{let n=d(t,e);m[3*e+n]=-1},g=(t,e,n,r)=>{let i=d(t,e);m[3*e+i]=r;let o=d(n,r);m[3*r+o]=e};for(let t=0;t<n;t++){let e=i[t],n=i[t+1],r=o[t],a=o[t+1];for(;e<n&&r<a;){let n=l[2*e],i=l[2*f+2*r];n===i?(g(t,l[2*e+1],i,l[2*f+2*r+1]),e++,r++):n<i?(M(t,l[2*e+1]),e++):(M(i,l[2*f+2*r+1]),r++)}for(;e<n;)M(t,l[2*e+1]),e++;for(;r<a;)M(l[2*f+2*r],l[2*f+2*r+1]),r++}return m}var h=n(99058),m=n(35522),d=n(51850),M=n(87811),g=n(10614);class y{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:v}write(t,e,n){I.seed=this._edgeHashFunction(n);let r=I.getIntRange(0,255),i=I.getIntRange(0,this.settings.variants-1),o=I.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(o/.7,1))+Math.max(0,o-.7)/.30000000000000004)+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,r),t.variantStroke.set(e,i),t.variantExtension.set(e,a)}}const p=new Float32Array(6),b=new Uint32Array(p.buffer),w=new Uint32Array(1);function v(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],w[0]=31*(31*(31*(31*(31*(166811+b[0])+b[1])+b[2])+b[3])+b[4])+b[5],w[0]}function A(t){let e=p;e[0]=x(t.position0[0]),e[1]=x(t.position0[1]),e[2]=x(t.position0[2]),e[3]=x(t.position1[0]),e[4]=x(t.position1[1]),e[5]=x(t.position1[2]),w[0]=5381;for(let t=0;t<b.length;t++)w[0]=31*w[0]+b[t];return w[0]}function x(t){return Math.round(1e4*t)/1e4}const S=(0,d.vt)(),I=new M.A;var _=n(93406);function U(t){let e=E(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return C.updateSettings(t.writerSettings),T.updateSettings(t.writerSettings),(0,_.K)(e,C,T)}function E(t,e,n,r){if(e){let e=c(n,r,t.count);return new N(n,r,e,t)}let i=o(t.buffer,t.stride/4,{originalIndices:n}),a=c(i.indices,r,i.uniqueCount);return{faces:i.indices,facesLength:i.indices.length,neighbors:a,vertices:h.I$.createView(i.buffer)}}class N{constructor(t,e,n,r){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=r}}const C=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,m.WQ)(S,n.faceNormal0,n.faceNormal1),(0,m.S8)(S,S);let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,S[0],S[1],S[2],i)}},T=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],i)}{let{typedBuffer:r,typedBufferStride:i}=t.normal2Compressed;(0,g.aT)(r,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],i)}}},O=(0,f.BP)().vec3f("position0").vec3f("position1"),q=(0,f.BP)().vec3f("position0").vec3f("position1").u16("componentIndex",{integer:!0})}}]);
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[9933],{39933(e,t,l){l.r(t),l.d(t,{build:()=>r.b}),l(14113),l(72722),l(96336),l(53466),l(54154),l(9169),l(12696),l(32680),l(68785),l(28390),l(96777),l(20598),l(22393),l(59469),l(56529),l(51406),l(89435),l(34711),l(71020),l(58614),l(20693),l(33079),l(31821),l(63761),l(24111),l(84368);var r=l(57323)}}]);
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[31,506,1132,1550,1666,1948,7992,8125],{61691(e,t,r){r.d(t,{G:()=>s});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},70031(e,t,r){r.d(t,{OperatorIntersects:()=>n});var s=r(39117);class n extends s._{getOperatorType(){return 4}execute(e,t,r,n){return!(0,s.$)(e,t,r,4,n)}}},76061(e,t,r){r.d(t,{S:()=>n});var s=r(61691);class n extends s.G{m_aGeoms;m_iGeom=-1;constructor(e){super(),this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){let e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},69397(e,t,r){r.d(t,{JY:()=>m,Qf:()=>l,Qh:()=>i,lM:()=>a,ro:()=>h,rq:()=>u});var s=r(44208),n=r(34275);function a(e){if(!e)return 0;let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let r=g;for(let s=0;s<t;s++)r+=o(e[s]);return r}(e);let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?i(e):f;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+h(t),0)}function h(e,t=16){return e?(0,n.iu)(e)?e.byteLength+c:Array.isArray(e)?u(e,t):0:0}function u(e,t){return g+e.length*t}const f=32,g=16,m=(0,s.A)("ios")||!(0,s.A)("chrome")&&!(0,s.A)("opr")?8:4,c=145},87992(e,t,r){r.d(t,{JR:()=>Z,ME:()=>M,MY:()=>A,NO:()=>C,Nh:()=>P,V2:()=>_,_s:()=>I,e6:()=>b,gh:()=>E,jm:()=>V,tr:()=>X,uX:()=>p});var s=r(32198),n=(r(69397),r(92722)),a=r(16930),i=r(19419),o=r(513),l=r(50954),h=r(79567),u=r(52006),f=r(49663),g=r(46068),m=r(60408),c=r(21325);class p{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:a,partCount:i,partOffsets:o,partFlags:l,segmentFlags:h,segmentIndices:u,segmentParams:f,segmentCountArc:g,segmentCountBezier:m}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=a,this.partCount=i,this.partOffsets=o,this.partFlags=l,this.segmentFlags=h,this.segmentIndices=u,this.segmentParams=f,this.segmentCountArc=g,this.segmentCountBezier=m}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){let{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){let{type:e,vertexCount:t,partCount:r,hasZ:s,hasM:n,segmentCountArc:a,segmentCountBezier:i}=this,o=_(e,t,r,s,n,this.hasCurves(),a,i);o.spatialReference=this.spatialReference;let{vertexXY:l,vertexZ:h,vertexM:u}=this;if(o.vertexXY.set(l.subarray(0,2*t),0),o.vertexZ?.set(h.subarray(0,t),0),o.vertexM?.set(u.subarray(0,t),0),this.isMultipart()){let{partOffsets:e,partFlags:t}=this;o.partFlags.set(t.subarray(0,r+1)),o.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){let{segmentFlags:e,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;o.segmentFlags.set(e.subarray(0,t),0),o.segmentIndices.set(r.subarray(0,t),0),o.segmentParams.set(s.subarray(0,n),0)}return o}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,c.aI)(this.spatialReference,e.spatialReference)||this.vertexCount!==e.vertexCount||this.partCount!==e.partCount||this.hasZ!==e.hasZ||this.hasM!==e.hasM||this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;let r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new x(this):[][Symbol.iterator]()}}class x{constructor(e){this.geometry=e,this.value=new d(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class d{constructor(e){this.geometry=e,this.index=-1,this._readVertex=w(e),this._segments=new y(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){let e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class y{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this.value=new v(e.geometry)}get _partIsClosed(){return!!(1&this._part.geometry.partFlags?.[this._part.index])}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;let e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._partIsClosed?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){let{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._partIsClosed?1:2),this.value.indexOfStartVertex=this._partStart-1}}class v{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=w(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){let e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;let t=this.geometry.segmentParams,r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){let e=t[r++],s=t[r++],n=t[r++],a=t[r++];return{b:[this.end,[e,s],[n,a]]}}let s=t[r++],n=t[r++],a=t[r++],i=t[r++],o=t[r++],l=t[r++];r++,r++;let h=t[r++],u=t[r++];if(!(4&s)&&1===a)return{c:[this.end,[h,u]]};let f=2&s?0:1,g=1&s?0:1;return{a:[this.end,[o,l],f,g,i,n,a]}}}function C(e,t){let r={stack:[],error:void 0,hasError:!1};try{return t??=(0,i.Ie)(),(0,s.mS)(r,new O(e,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(t,function(e){let t,{vertexCount:r,vertexXY:n,vertexZ:a,vertexM:o}=e,l=R(e);if(e.hasCurves()){let r={stack:[],error:void 0,hasError:!1};try{(0,s.mS)(r,new O(e,["vertexZ","vertexM"]),!1);let n=(0,i.Ie)();for(let t of e.parts){let e=t.startVertex;for(let{curve:r}of t.segments)(0,h.e)(n,e,r),e=(0,u.yP)(r)}let[a,o,f,g]=n;t={xmin:a,ymin:o,xmax:f,ymax:g,spatialReference:l}}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}else{let e,s,a,i;e=s=1/0,a=i=-1/0;for(let t=0;t<r;++t){let r=n[2*t],o=n[2*t+1];e=Math.min(e,r),a=Math.max(a,r),s=Math.min(s,o),i=Math.max(i,o)}t={xmin:e,ymin:s,xmax:a,ymax:i,spatialReference:l}}if(a){let e=1/0,r=-1/0;for(let t of a)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(o){let e=1/0,r=-1/0;for(let t of o)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}function M(e){let t,r,s;if((0,m.fT)(e)){s="point";let{x:n,y:a,z:i,m:o}=e,l=[n,a];null!=i&&l.push(i),null!=o&&l.push(o),r=[[l]],t=1}else(0,m.U9)(e)?(s="multipoint",r=[e.points],t=e.points.length):(0,m.Rg)(e)?(s="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(s="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,S(t[0],(0,u.yP)(t.at(-1)))&&--e),e),0));let n=_(s,t,s.includes("point")?0:r.length,(0,m.Pv)(e),(0,m.W0)(e),(0,u.Ed)(e)),{hasZ:a,hasM:i,vertexXY:o,vertexZ:l,vertexM:h}=n;function f(e){o[2*c]=e[0],o[2*c+1]=e[1],a&&(l[c]=e[2]),i&&(h[c]=e[g]),++c}n.spatialReference=e.spatialReference??void 0;let g=n.hasZ?3:2,c=0;if(!n.isMultipart()){if(!a&&!i){for(let[e,t]of r[0])o[2*c]=e,o[2*c+1]=t,++c;return n}for(let e of r[0])f(e);return n}let p="polygon"===s,{partOffsets:x}=n,d=0;if(!(0,u.Ed)(e)){for(let e of r){if(x[d++]=c,0===e.length)continue;let t=e.length;if(p&&S(e[0],e.at(-1))&&--t,a||i)for(let r=0;r<t;++r)f(e[r]);else for(let r=0;r<t;++r){let[t,s]=e[r];o[2*c]=t,o[2*c+1]=s,++c}}return x[d]=c,n}function y(e){let t=v+e;if(t<=(n.segmentParams?.length??0))return;let r=t*G;r=20*Math.ceil(r/20);let s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let v=0;for(let e of r){if(n.partOffsets[d++]=c,0===e.length)continue;let t=e[0],r=t;for(let t=1;t<e.length;++t){let s=e[t];f(r);let a=c-1;(0,u.wY)(s)?(y(10),++n.segmentCountArc,v=I(r,s,n,a,v),r=s.a[0]):(0,u.DA)(s)?(y(10),++n.segmentCountArc,v=Y(r,s,n,a,v),r=s.a[0]):(0,u.aO)(s)?(y(10),++n.segmentCountArc,v=b(r,s,n,a,v),r=s.c[0]):(0,u.n1)(s)?(y(4),++n.segmentCountBezier,v=X(0,s,n,a,v),r=s.b[0]):r=s}p&&S(t,r)||f(r)}return n.partOffsets[d]=c,n}function E(e){let t=w(e),{vertexCount:r,partCount:s,hasZ:n,hasM:a}=e,i=R(e),o=0;if(!e.isMultipart()){if("point"===e.type){let[t,r]=e.vertexXY;return{x:t,y:r,z:e.vertexZ?.[0],m:e.vertexM?.[0],spatialReference:i}}let s=[];for(;o<r;)s.push(t(o++));return{points:s,spatialReference:i,hasZ:n,hasM:a}}if(!e.hasCurves()){let r=[];for(let n=0;n<s;++n){let s=!!(1&e.partFlags[n]),a=e.partOffsets[n+1],i=[];for(;o<a;)i.push(t(o++));s&&i.length>0&&i.push([...i[0]]),r.push(i)}return"polygon"===e.type?{rings:r,hasZ:n,hasM:a,spatialReference:i}:{paths:r,hasZ:n,hasM:a,spatialReference:i}}let l=[];for(let{segments:t,startVertex:r}of e.parts){let e=[r];for(let{curve:r}of t)e.push(r);l.push(e)}return"polygon"===e.type?{rings:[],curveRings:l,hasZ:n,hasM:a,spatialReference:i}:{paths:[],curvePaths:l,hasZ:n,hasM:a,spatialReference:i}}function P(e,{lengths:t,coords:r,hasZ:s,hasM:n},a){let i=e.includes("point")?0:t.length,o="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(o?i:0);s??=!1,n??=!1;let h=_(e,l,i,s,n,!1,0,0);if(h.spatialReference=a??void 0,!h.isMultipart()){for(let e=0,t=0;e<l;++e)h.vertexXY[2*e]=r[t++],h.vertexXY[2*e+1]=r[t++],s&&(h.vertexZ[e]=r[t++]),n&&(h.vertexM[e]=r[t++]);return h}let u=2+Number(s)+Number(n),f=0,g=0;h.partOffsets[0]=0;for(let e of t){let t=h.partOffsets[g],a=t+e-Number(o);h.partOffsets[++g]=a;for(let e=t;e<a;++e)h.vertexXY[2*e]=r[f++],h.vertexXY[2*e+1]=r[f++],s&&(h.vertexZ[e]=r[f++]),n&&(h.vertexM[e]=r[f++]);o&&(f+=u)}return h}function Z({type:e,vertexCount:t,vertexXY:r,vertexZ:s,vertexM:a,partCount:i,partOffsets:o,partFlags:l,hasZ:h,hasM:u}){let f=new n.A([],[],h,u);i=Math.max(i,1);let g=0;for(let e=0;e<i;++e){let n=o?.[e+1]??t,i=f.coords.length;for(let e=g;e<n;++e)f.coords.push(r[2*e],r[2*e+1]),h&&f.coords.push(s[e]),u&&f.coords.push(a[e]);if(l&&1&l[e]){let e=g;f.coords.push(r[2*e],r[2*e+1]),h&&f.coords.push(s[e]),u&&f.coords.push(a[e])}f.lengths.push((f.coords.length-i)/f.stride),g=n}return"point"===e&&(f.lengths.length=0),f}function V(...e){let t=new Set;for(let r of e){if(!r)continue;let e=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(let r of e){let e=r?.buffer;e&&t.add(e)}}return Array.from(t)}function A(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;let t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let s=e.getLatestID();(s<=0||s===r)&&(s=void 0);let n=e.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:t};let a=n.isCustomWkid()?0:n.getOldID();if(a<=0)return{wkt:t};let i=e.getLatestVerticalID();return(i<=0||i===a)&&(i=void 0),{wkid:r,wkt:t,latestWkid:s,vcsWkid:a,latestVcsWkid:i}}(e.getSpatialReference()),e=e.getGeometry()),new p({...e.toFlatGeometry(),spatialReference:t})}class O{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(let r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof a.A?e.toJSON():e}function w({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?s=>[e[2*s],e[2*s+1],t[s],r[s]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function S(e,t){return e.every((e,r)=>e===t[r])}function _(e,t,r,s,n,a,i,o){i??=0,o??=0;let l=new p({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:i,segmentCountBezier:o}),h=2*Float64Array.BYTES_PER_ELEMENT*t;s&&(h+=Float64Array.BYTES_PER_ELEMENT*t),n&&(h+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(h+=(r+1)*Int32Array.BYTES_PER_ELEMENT,h+=(r+1)*Int8Array.BYTES_PER_ELEMENT),a&&(h+=t*Int8Array.BYTES_PER_ELEMENT,h+=t*Int32Array.BYTES_PER_ELEMENT,h+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);let u=new ArrayBuffer(h),f=0;return l.vertexXY=new Float64Array(u,f,2*t),f+=l.vertexXY.byteLength,s&&(l.vertexZ=new Float64Array(u,f,t),f+=l.vertexZ.byteLength),n&&(l.vertexM=new Float64Array(u,f,t),f+=l.vertexM.byteLength),a&&(l.segmentParams=new Float64Array(u,f,l.segmentParamCount),f+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(u,f,t),l.segmentIndices.fill(z),f+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(u,f,r+1),f+=l.partOffsets.byteLength,l.partFlags=new Int8Array(u,f,r+1),f+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,r).fill(1)),a&&(l.segmentFlags=new Int8Array(u,f,t),l.segmentFlags.fill(1),f+=l.segmentFlags.byteLength),l}function I(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},a,i){r[a]=4,s[a]=i;let[o,[l,h],u,f,m,c,p]=t.a,x=4;f||(x|=1),u||(x|=2);let d=(0,g.SW)(e,t),[y,v]=(0,g.Uk)(d,.5);return n[i++]=x,n[i++]=c,n[i++]=p,n[i++]=m,n[i++]=l,n[i++]=h,n[i++]=d.u2-d.u1,n[i++]=d.u1,n[i++]=y,n[i++]=v,i}function Y(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},a,i){r[a]=4,s[a]=i;let l=(0,f.io)(e,t);return F(l,4,...(0,o.mq)(l,.5),n,i)}function b(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},a,i){return r[a]=4,s[a]=i,F((0,l.pM)(e,t),0,...t.c[1],n,i)}function F(e,t,r,s,n,a){let{cx:i,cy:o,thetaStart:l,thetaEnd:h,radius:u}=e;return l>h||(t|=1),Math.abs(h-l)<=Math.PI||(t|=2),n[a++]=t,n[a++]=u,n[a++]=1,n[a++]=0,n[a++]=i,n[a++]=o,n[a++]=h-l,n[a++]=l,n[a++]=r,n[a++]=s,a}function X(e,{b:[t,[r,s],[n,a]]},{segmentFlags:i,segmentIndices:o,segmentParams:l},h,u){return i[h]=2,o[h]=u,l[u++]=r,l[u++]=s,l[u++]=n,l[u++]=a,u}const G=1.61803,z=-1},97479(e,t,r){r.d(t,{fz:()=>a,g7:()=>n});const s=new(r(70031).OperatorIntersects);function n(e,t,r){return s.execute(e,t,r,null)}function a(){return s.supportsCurves()}},25275(e,t,r){r.d(t,{intersectsExecute:()=>a});var s=r(97479),n=r(78125);function a(e,t){let r=(0,n.getSpatialReference)(e);return(0,s.g7)((0,n.fromGeometry)(e),(0,n.fromGeometry)(t),(0,n.fromSpatialReference)(r))}r(85036),(0,s.fz)()},78125(e,t,r){r.r(t),r.d(t,{fromExtent:()=>x,fromGeometry:()=>p,fromMultipoint:()=>d,fromPoint:()=>y,fromPolygon:()=>v,fromPolyline:()=>C,fromPolylineUsingImportOperator:()=>M,fromSpatialReference:()=>E,getSpatialReference:()=>c,toExtent:()=>Z,toGeometry:()=>P,toMultipoint:()=>V,toPoint:()=>A,toPolygon:()=>O,toPolyline:()=>R});var s=r(83661),n=r(55537),a=r(95213),i=r(88885),o=r(5443),l=r(48526),h=r(86738),u=r(39829),f=r(82799),g=(r(90293),r(83299));const m="_gxVersion";function c(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function p(e){switch(e.type){case"point":return y(e);case"multipoint":return d(e);case"polyline":return C(e);case"polygon":return v(e);case"extent":return x(e);default:throw Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(m)){let t=new a.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(m,t)}return e.getCacheValue(m)}function d(e){if(!e.getCacheValue(m)){let t=new i.M,r=new a.P,s=e.points,n=e.hasM,o=e.hasZ,l=o?3:2;for(let e=0,a=s.length;e<a;e++){let a=s[e];r.setXYCoords(a[0],a[1]),o&&r.setZ(a[2]??0),n&&r.setM(a[l]??NaN),t.add(r)}e.setCacheValue(m,t)}return e.getCacheValue(m)}function y(e){if(!e.getCacheValue(m)){let t=new a.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(m,t)}return e.getCacheValue(m)}function v(e){if(!e.getCacheValue(m)){let{curveRings:t,hasM:r,hasZ:s,rings:n}=e,a=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:r,hasZ:s,rings:n});e.setCacheValue(m,a)}return e.getCacheValue(m)}function C(e){if(!e.getCacheValue(m)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,a=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(m,a)}return e.getCacheValue(m)}function M(e){if(!e.getCacheValue(m)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,a=(0,g.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(m,a)}return e.getCacheValue(m)}function E(e){return e.cache?(e.cache[m]??=(0,g.fromSpatialReference)(e),e.cache[m]):(0,g.fromSpatialReference)(e)}function P(e,t){if(e)switch(e.getGeometryType()){case n.G.enumPoint:return A(e,t);case n.G.enumEnvelope:return Z(e,t);case n.G.enumMultiPoint:return V(e,t);case n.G.enumPolyline:return R(e,t);case n.G.enumPolygon:return O(e,t)}return null}function Z(e,t){if(e.isEmpty())return null;let r=new o.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),s=e.getDescription();if(s.hasM()){let t=e.queryInterval(2,0);r.mmin=t.vmin,r.mmax=t.vmax}if(s.hasZ()){let t=e.queryInterval(1,0);r.zmin=t.vmin,r.zmax=t.vmax}return r.setCacheValue(m,e),r}function V(e,t){if(e.isEmpty())return null;let r=e.getDescription(),s=r.hasM(),n=r.hasZ(),i=[],o=new a.P;for(let t=0,r=e.getPointCount();t<r;t++){e.getPointByVal(t,o);let r=[o.getX(),o.getY()];n&&r.push(o.getZ()),s&&r.push(o.getM()),i.push(r)}let h=new l.A({hasM:s,hasZ:n,points:i,spatialReference:t});return h.setCacheValue(m,e),h}function A(e,t){if(e instanceof s.P)return new h.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;let r=new h.A({x:e.getX(),y:e.getY(),spatialReference:t}),n=e.getDescription();return n.hasM()&&(r.m=e.getM()),n.hasZ()&&(r.z=e.getZ()),r.setCacheValue(m,e),r}function O(e,t){if(e.isEmpty())return null;let r=u.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}function R(e,t){if(e.isEmpty())return null;let r=f.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}},85036(e,t,r){r.d(t,{Q:()=>a});var s=r(51447),n=r(53966);function a(e,t,r){(0,s.io)(n.A.getLogger(`esri.geometry.operators.${e}`),`${t} is deprecated. Refactor using @arcgis/codemod or manually replace usages with ${r} instead.`,{replacement:r,warnOnce:!0})}},92722(e,t,r){r.d(t,{A:()=>n});var s=r(69397);class n{constructor(e=[],t=[],r=!1,s=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:s}){return new n(e,t,r||!1,s||!1)}static fromRect([e,t,r,s]){let a=r-e,i=s-t;return new n([5],[e,t,a,0,0,i,-a,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:s}=this,n=this.coords[s*t],a=this.coords[s*t+1];for(let i=1;i<r;i+=1){let r=s*(t+i),o=this.coords[r],l=this.coords[r+1];e+=-.5*(o-n)*(l+a),n=o,a=l}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let s of this.lengths){for(let n=0;n<s;n++){let s=r*(t+n);e(this.coords[s],this.coords[s+1])}t+=s}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,s=0,{stride:n}=this;for(let e of r){for(let r=1;r<e;r++){let e=n*(s+r);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}s+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:s}=this,a=this.coords.slice(0,s*r);return e?(e.set(a),new n(t,e,this.hasZ,this.hasM)):new n(t,Array.from(a),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,s=0;t<r.length;t+=e)r[s++]=this.coords[t],r[s++]=this.coords[t+1];return new n(this.lengths,r,!1,!1)}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[3309],{93309(e,t,i){i.r(t),i.d(t,{default:()=>q});var a=i(32198),n=i(67996),o=i(91429),r=i(35666),s=i(7762),l=i(51447),h=i(49186),d=i(53966),p=i(91869),u=i(25728),y=i(17676),g=i(36708),c=i(5443),m=i(86738),f=i(82799),L=i(12359),C=i(8460),M=i(69540),w=i(25482),b=i(56507),k=i(69647),T=i(93223);let v=class extends((0,M.OU)(w.o)){constructor(e){super(e),this.durationLineWidth=5,this.entityPositionAtDurationRatio=1,this.eventsTicksVisualization="start-and-end",this.lineSeparationMultiplier=1,this.moveFirstBends=!0,this.secondBendRatio=.3,this.separateTimeOverlaps=!0,this.separateTimelineOverlaps=!0,this.separatedLineShapeRatio=0,this.showDurationLineForNonZeroDurationEntityEvents=!1,this.showNonZeroDurationIntervalBounds=!1,this.spaceSeparatedLinesEvenly=!1,this.timeBannerUTCOffsetInMinutes=0,this.timeDirection="right",this.useBezierCurves=!1}};(0,a.Cg)([(0,o.MZ)({type:b.jz,range:{min:1,max:10},json:{write:!0}})],v.prototype,"durationLineWidth",void 0),(0,a.Cg)([(0,o.MZ)({type:Number,range:{min:0,max:1},json:{write:!0}})],v.prototype,"entityPositionAtDurationRatio",void 0),(0,a.Cg)([(0,T.e)(k.SJ)],v.prototype,"eventsTicksVisualization",void 0),(0,a.Cg)([(0,o.MZ)({type:Number,range:{min:0},json:{write:!0}})],v.prototype,"lineSeparationMultiplier",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"moveFirstBends",void 0),(0,a.Cg)([(0,o.MZ)({type:Number,range:{min:0,max:1},json:{write:!0}})],v.prototype,"secondBendRatio",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"separateTimeOverlaps",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"separateTimelineOverlaps",void 0),(0,a.Cg)([(0,o.MZ)({type:Number,range:{min:0,max:1},json:{write:!0}})],v.prototype,"separatedLineShapeRatio",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"showDurationLineForNonZeroDurationEntityEvents",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"showNonZeroDurationIntervalBounds",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"spaceSeparatedLinesEvenly",void 0),(0,a.Cg)([(0,o.MZ)({type:b.jz,json:{write:!0}})],v.prototype,"timeBannerUTCOffsetInMinutes",void 0),(0,a.Cg)([(0,o.MZ)({type:["bottom","left","right","top"],json:{write:!0}})],v.prototype,"timeDirection",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"useBezierCurves",void 0),v=(0,a.Cg)([(0,o.$K)("esri.linkChart.ChronologicalLayoutSettings")],v);const E=v;let N=class extends((0,M.OU)(w.o)){constructor(e){super(e),this.absoluteIdealEdgeLength=1,this.autoRepulsionRadius=!0,this.computationBudgetTime=2,this.idealEdgeLengthType="multiplier",this.multiplicativeIdealEdgeLength=1,this.repulsionRadiusMultiplier=1}};(0,a.Cg)([(0,o.MZ)({type:Number,range:{min:0,max:360},json:{write:!0}})],N.prototype,"absoluteIdealEdgeLength",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],N.prototype,"autoRepulsionRadius",void 0),(0,a.Cg)([(0,o.MZ)({type:Number,json:{write:!1}})],N.prototype,"computationBudgetTime",void 0),(0,a.Cg)([(0,T.e)(k.lg)],N.prototype,"idealEdgeLengthType",void 0),(0,a.Cg)([(0,o.MZ)({type:Number,range:{min:0,max:5},json:{write:!0}})],N.prototype,"multiplicativeIdealEdgeLength",void 0),(0,a.Cg)([(0,o.MZ)({type:Number,range:{min:1,max:99},json:{write:!0}})],N.prototype,"repulsionRadiusMultiplier",void 0),N=(0,a.Cg)([(0,o.$K)("esri.linkChart.OrganicLayoutSettings")],N);const D=N;let S=class extends((0,M.OU)(w.o)){constructor(e){super(e),this.rootEntities=[]}};(0,a.Cg)([(0,o.MZ)({type:[Object],json:{write:!0}})],S.prototype,"rootEntities",void 0),S=(0,a.Cg)([(0,o.$K)("esri.linkChart.RootedLayoutSettings")],S);const x=S;let I=class extends((0,M.OU)(w.o)){constructor(e){super(e),this.chronologicalLayoutSettings=null,this.organicLayoutSettings=null,this.rootedLayoutSettings=null}};(0,a.Cg)([(0,o.MZ)({type:E,json:{write:!0}})],I.prototype,"chronologicalLayoutSettings",void 0),(0,a.Cg)([(0,o.MZ)({type:D,json:{write:!0}})],I.prototype,"organicLayoutSettings",void 0),(0,a.Cg)([(0,o.MZ)({type:x,json:{write:!0}})],I.prototype,"rootedLayoutSettings",void 0),I=(0,a.Cg)([(0,o.$K)("esri.linkChart.LayoutSettings")],I);const A=I;var _=i(54628),R=i(53902),Z=i(56400),B=i(90708),z=i(15375);const O={MULTIPLIER:"multiplier",ABSOLUTE:"absolute-value"};var P=i(24137),U=i(62796),j=i(40736),F=i(69860),G=i(99916),H=i(4146),$=i(63074),K=i(34287),Q=i(25036),V=i(10873);let W=class extends((0,K.q)((0,$.dM)((0,Q.j)((0,u.M)(H.A))))){constructor(e){if(super(function(e){if(!e)return{};let{url:t,dataPreloadedInLocalCache:i,initializationLinkChartConfig:a}=e,{title:n}=e;return!n&&e?.url&&(n=(0,j.$L)(e.url)),{url:t,title:n,dataPreloadedInLocalCache:i,initializationLinkChartConfig:a}}(e)),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(s.A.ofType(U.A)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new c.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(s.A.ofType(U.A)),this.type="link-chart",this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1,this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new h.A("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");this.addHandles((0,g.wB)(()=>this.layers.concat(this.tables),(e,t)=>this._handleSublayersChange(e,t),g.OH))}_initializeLayerProperties(e){let t=new Set,i=[],a=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new h.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(i=e.knowledgeGraph.dataModel.entityTypes??[],a=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,o)=>{let r=this._graphTypeLookup.get(o);r?"relationship"===r.type?t.has(o)||(t.add(o),a.push(r)):"entity"===r.type?t.has(o)||(t.add(o),i.push(r)):(d.A.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)):(d.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))}):(i=e.knowledgeGraph.dataModel.entityTypes??[],a=e.knowledgeGraph.dataModel.relationshipTypes??[]);let n=new P.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=i,this.memberRelationshipTypes=a,this.dataManager=n}load(e){let t=async()=>{let e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,j.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(e=>{e.useAllData=!1}),await this._initializeDiagram(),this.layers.forEach(i=>{t.push(i.refreshCachedQueryEngine()),e.push(new Promise(e=>{i.on("layerview-create",()=>{e(null)})}))}),this.tables.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t)};return this.addResolvingPromise(new Promise(i=>{(0,R.fetchKnowledgeGraph)(this.url).then(async a=>{(0,y.Te)(e),a.dataModel.entityTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)}),a.dataModel.relationshipTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)});let o=this.linkChart?.linkChartProperties;6===o?.originIdOf("entitiesUrl")&&(this.membershipModified=!1,(0,_.lV)([o.entitiesUrl??"",o.relationshipsUrl??""],this.linkChart?.portalItem?.itemUrl??"").then(e=>{this.linkChart?.linkChartProperties?.setCreationDatesForResources?.(e)},()=>{}),this._originalInclusionList=await n.XW.fetchAndConvertSerializedLinkChart({entitiesUrl:o?.entitiesUrl,relationshipsUrl:o?.relationshipsUrl},{signal:e?.signal}),this._alignLayersDataModelAndInclusionDefinition(a.dataModel),this.initializationLinkChartConfig={layoutSettings:o?.layoutSettings??void 0,layoutMode:(0,G.k5)(o.layoutType)}),this._initializeLayerProperties({knowledgeGraph:a,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})}));let{edit:r,fullEdit:s,updateItem:l}=await(0,j.N1)(a.serviceDefinition.serviceItemId,this.url,e);if((0,y.Te)(e),this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",l),this.read({dateFieldsTimeReference:a.serviceDefinition.dateFieldsTimeReference},{origin:"service"}),this.dataPreloadedInLocalCache){let e=F.A.getInstance();for(let[t,i]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(let a of i.members?.values()??[]){let i=e.readFromStoreById(`${t}__${a.id}`);i&&(0,p.tE)(this.dataManager.sublayerCaches,t,()=>new Map).set(a.id,i)}await t()}else{let i="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,i,!0).then(async()=>{(0,y.Te)(e),await t()}))}i(null)}).catch(()=>{})})),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"===this.loadStatus||"failed"===this.loadStatus?d.A.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded."):this._set("initializationInclusionModeDefinition",e)}get linkChart(){return this.parent}get sublayerCapabilities(){return(0,j.hZ)(this.knowledgeGraph)}async addRecords(e,t){let i=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(i=await(0,G.aq)(e,this.dataManager.knowledgeGraph));let a=e.concat(i).filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id));a.length>0&&(this.membershipModified=!0),await this._handleNewRecords(a,t)}async createSublayerForNamedType(e){await this.load();let t=this._graphTypeLookup.get(e);if(!t)throw new h.A("knowledge-graph:missing-type","The specified type does not exist in the knowledge graph.");if(this.dataManager.sublayerCaches.has(e))throw new h.A("knowledge-graph:duplicate-type","The specified type already exists as a sublayer.");this.dataManager.sublayerCaches.set(e,new Map),(0,p.tE)(this.sublayerIdsCache,e,()=>new Set);let i=this._createSublayer(t);return"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.set(e,{useAllData:!1,members:new Map}),i.geometryType?this.layers.push(i):this.tables.push(i),await(0,j.qN)(this,[e]),this._refreshNamedTypes(),i}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:i=!1,overrideMembershipCheck:a=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(let t of e)(a||!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){let e=new Set,t=[];for(let t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(let i of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(i);for(let i of e)if(this.dataManager.memberIdTypeLookup.has(i))for(let e of this.dataManager.memberIdTypeLookup.get(i))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:i,typeName:e});n=n.concat(t)}let o=this._currentLinkChartConfig.layoutSettings?.rootedLayoutSettings?.rootEntities;if(o?.length){let e=new Set(n.map(({id:e})=>e)),t=o.filter(({id:t})=>!e.has(t));if(t.length!==o.length){this._currentLinkChartConfig.layoutSettings.rootedLayoutSettings.rootEntities=t;let e=this.linkChart?.linkChartProperties;e?.layoutSettings?.rootedLayoutSettings&&(e.layoutSettings.rootedLayoutSettings.rootEntities=t)}}this.dataManager.removeFromLayer(n);for(let 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);let r=i?void 0:this.getCurrentNodeLocations();await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedEntityLocations:r}),n.length>0&&(this.membershipModified=!0);let s=[];return this.layers.forEach(e=>{s.push(e.refreshCachedQueryEngine())}),await Promise.all(s),this._refreshNamedTypes(),n}async expand(e,t){let i=[];try{let a=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);i=a.filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)),await this._handleNewRecords(i,t),a.length>0&&(this.membershipModified=!0),(0,y.Te)(t?.signal)}catch(e){throw(0,y.zf)(e)&&i.length>0&&await this.removeRecords(i,{overrideMembershipCheck:!0}),e}return{records:i}}loadLayerAssumingLocalCache(){let e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.layers.length||0===this.originIdOf("tables")?0===this.originIdOf("layers")?this._createSublayers(e,this.layers,e=>!!e.geometryType):this._updateSublayers(e,this.layers):this.layers=new s.A,this.tables.length||0===this.originIdOf("layers")?0===this.originIdOf("tables")?this._createSublayers(e,this.tables,e=>!e.geometryType):this._updateSublayers(e,this.tables):this.tables=new s.A,this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{let i=(0,p.tE)(this.sublayerIdsCache,t,()=>new Set);e.members?.forEach(({id:e,linkChartLocation:a})=>{if(i.add(e),a){let i="coords"in a&&"lengths"in a?a:(0,B.Ux)(a);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,i):this.entityLinkChartDiagramLookup.set(e,i)}})})}async calculateLinkChartLayout(e="organic-standard",t){let i=[],a=[],n=[];this.dataManager.sublayerCaches.forEach((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach(e=>{i.push({typeName:t,feature:e})}):this.dataManager.relationshipTypeNames.has(t)&&e.forEach(e=>{a.push({typeName:t,feature:e})})}),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;let o,r=new Map,s=new Map,l=new Map,u=new Map,g=new Uint8Array(i.length),M=new Float64Array(i.length),w=new Float64Array(i.length),b=new Float64Array(i.length),k=new Float64Array(i.length),T=new Uint32Array(a.length),v=new Uint32Array(a.length),E=new Float64Array(a.length),N=new Float64Array(a.length),D=[],S=!1,x=new c.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),I="organic-standard",A=0,_=0,R=C.i6.apply;switch(I="geographic-organic-standard"===e?"organic-standard":e,I){case"organic-standard":o=C.pM.apply;break;case"organic-community":o=C.Tu.apply;break;case"hierarchical-bottom-to-top":o=C.$C.apply;break;case"radial-root-centric":o=C.vJ.apply;break;case"tree-left-to-right":o=C.Xq.apply;break;default:o=C.Wg.apply}let Z=!1,O=new Set(t?.layoutSettings?.rootedLayoutSettings?.rootEntities?.map(({id:e})=>e));i.forEach(({typeName:i,feature:a})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedEntityLocations?.has(a.attributes[z.dr])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(i)?g[A]=2:g[A]=0;let n=t.lockedEntityLocations.get(a.attributes[z.dr]);M[A]=n.x,w[A]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(i)){g[A]=2;let e=null,t=a.attributes[this.dataManager.geographicLookup.get(i).name];switch(this.dataManager.geographicLookup.get(i)?.geometryType){case"esriGeometryPoint":M[A]=t?.x,w[A]=t?.y;break;case"esriGeometryPolygon":{let i=t?(0,L.Ve)(t):null;e=i?m.A.fromJSON(i):null,null!=e?.x&&null!=e?.y?(M[A]=e.x,w[A]=e.y):g[A]=1;break}case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(M[A]=e.x,w[A]=e.y):g[A]=1;break;default:g[A]=1}(null==M[A]||null==w[A]||Number.isNaN(M[A])||Number.isNaN(w[A]))&&(g[A]=1,M[A]=0,w[A]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!Z&&t?.lockedEntityLocations?.has(a.attributes[z.dr])&&(Z=!0);let e=t?.timeInfoByTypeName?.get(i),n=e?.startField,o=n&&e?.startField?a.attributes[n]:null;b[A]=o?new Date(o).getTime():NaN;let r=e?.endField,s=r&&e?.endField?a.attributes[r]:null;k[A]=s?new Date(s).getTime():NaN,M[A]=0,w[A]=0,g[A]=1}else g[A]=1,M[A]=0,w[A]=0;O.has(a.attributes[z.dr])&&(g[A]|=4),u.set(a.attributes[z.dr],A),D[A]={feature:a,typeName:i},A++}),Z&&d.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let P=!1,U=new Map;a.forEach(i=>{let a=i.feature.attributes[z.Cz],o=i.feature.attributes[z.KQ],r=u.get(a),s=u.get(o),l=t?.timeInfoByTypeName?.get(i.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?i.feature.attributes[h]:null,p=l?.endField,y=p?i.feature.attributes[p]:null;if(void 0!==r&&void 0!==s){let t=a+"-"+o;("chronological-mono-timeline"===e||"chronological-multi-timeline"===e)&&(t=t+"-"+d+"-"+y);let l=U.get(t);l?.has(i.typeName)||(T[_]=r,v[_]=s,("chronological-mono-timeline"===e||"chronological-multi-timeline"===e)&&(E[_]=d?new Date(d).getTime():NaN,N[_]=y?new Date(y).getTime():NaN),void 0===l?U.set(t,new Map([[i.typeName,_]])):l.set(i.typeName,_),_++),n.push(i)}else P=!0,this.relationshipLinkChartDiagramLookup.set(a,null)}),P&&d.A.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");let j=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),F=this._convertValidatedOrganicSettingsToCalculationSettings(j);await(0,C.Hh)();let G=1,H=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let i;({status:G,links:H,graphics:i}=R(()=>t?.signal?.aborted??!1,g,M,w,b,k,T.subarray(0,_),v.subarray(0,_),E.subarray(0,_),N.subarray(0,_),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),0===G&&(this.chronologicalAuxiliaryGraphics=i)}else({status:G,links:H}=o(()=>t?.signal?.aborted??!1,g,M,w,T.subarray(0,_),v.subarray(0,_),F.computationBudgetTime,F.idealEdgeLengthMultiplier,F.repulsionRadiusMultiplier));if((0,y.Te)(t?.signal),1===G)throw new h.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(2===G)throw(0,y.NK)();for(let e=0;e<D.length;e++){if(w[e]>84.9999?w[e]=84.9999:w[e]<-84.9999&&(w[e]=-84.9999),M[e]>179.9999?M[e]=179.9999:M[e]<-179.9999&&(M[e]=-179.9999),D[e].feature.attributes[z.T1]=new m.A({x:M[e],y:w[e]}),r.has(D[e].typeName))r.get(D[e].typeName)?.set(D[e].feature.attributes[z.dr],D[e].feature);else{let t=new Map;t.set(D[e].feature.attributes[z.dr],D[e].feature),r.set(D[e].typeName,t)}l.set(D[e].feature.attributes[z.dr],D[e].feature);let t=(0,B.Ux)(D[e].feature.attributes[z.T1]);this.entityLinkChartDiagramLookup.set(D[e].feature.attributes[z.dr],D[e].feature.attributes[z.T1]?t:null);let i=(0,p.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,D[e].typeName,()=>({useAllData:!1,members:new Map}));(0,p.tE)(i.members,D[e].feature.attributes[z.dr],()=>({id:D[e].feature.attributes[z.dr],linkChartLocation:void 0})).linkChartLocation=D[e].feature.attributes[z.T1];let{x:a,y:n}=D[e].feature.attributes[z.T1];if(S)x.xmin=Math.min(x.xmin,a),x.xmax=Math.max(x.xmax,a),x.ymin=Math.min(x.ymin,n),x.ymax=Math.max(x.ymax,n);else{let e=1e-7;x.xmin=a-e,x.xmax=a+e,x.ymin=n-e,x.ymax=n+e,S=!0}}if(this.linkChartExtent.xmin=x.xmin,this.linkChartExtent.xmax=x.xmax,this.linkChartExtent.ymin=x.ymin,this.linkChartExtent.ymax=x.ymax,!H)throw new h.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");let $=new Map,K=new Map,Q=new Map,V=new Set;for(let i=0;i<n.length;i++){let a=[],o=n[i],r=o.feature.attributes[z.Cz],h=o.feature.attributes[z.KQ],y=r+"-"+h;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let e=t?.timeInfoByTypeName?.get(o.typeName),i=t?.timeInfoByTypeName?e?.startField:null,a=i?o.feature.attributes[i]:null,n=e?.endField;y+="-"+a+"-"+(n?o.feature.attributes[n]:null)}let g=U.get(y).get(o.typeName),c=0===g?0:H?.vertexEndIndex[g-1];if(!V.has(g)){if(V.add(g),2===H.types[g]){let e=[H.vertices[2*c],H.vertices[2*c+1]],t=[H.vertices[2*(c+1)],H.vertices[2*(c+1)+1]],i=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[i[0]-e[0],i[1]-e[1]],o=[i[0]+n[1],i[1]-n[0]],r=[i[0]-n[1],i[1]+n[0]];a.push(e),a.push(o),a.push(t),a.push(r),a.push(e)}else{if(0!==H.types[g]){d.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=c;e<H.vertexEndIndex[g];e++)a.push([H.vertices[2*e],H.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){let e=D[u.get(r)]?.feature.attributes[z.T1],t=D[u.get(h)]?.feature.attributes[z.T1];(a[0][0]!==e.x||a[0][1]!==e.y)&&(a[0]=[e.x,e.y]),(a[a.length-1][0]!==t.x||a[a.length-1][1]!==t.y)&&(a[a.length-1]=[t.x,t.y])}for(let e=1;e<a.length-1;e++)a[e][1]>85.5?a[e][1]=85.5:a[e][1]<-85.5&&(a[e][1]=-85.5),a[e][0]>179.9999?a[e][0]=179.9999:a[e][0]<-179.9999&&(a[e][0]=-179.9999);$.has(y)?$.get(y).push(a):$.set(y,[a])}let m=$.get(y);K.has(y)||(K.set(y,new Map),Q.set(y,new Map));let L=K.get(y),C=Q.get(y);L.has(o.typeName)||(L.set(o.typeName,m.shift()),C.set(o.typeName,0));let M=L.get(o.typeName);C.set(o.typeName,C.get(o.typeName)+1);let w=new f.A({paths:[M]});if(o.feature.attributes[z.T1]=w,s.has(o.typeName))s.get(o.typeName)?.set(o.feature.attributes[z.dr],o.feature);else{let e=new Map;e.set(o.feature.attributes[z.dr],o.feature),s.set(o.typeName,e)}l.set(o.feature.attributes[z.dr],o.feature);let b=(0,B.Ux)(o.feature.attributes[z.T1]);this.relationshipLinkChartDiagramLookup.set(o.feature.attributes[z.dr],o.feature.attributes[z.T1]?b:null);let k=(0,p.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,o.typeName,()=>({useAllData:!1,members:new Map}));(0,p.tE)(k.members,o.feature.attributes[z.dr],()=>({id:o.feature.attributes[z.dr],linkChartLocation:void 0})).linkChartLocation=b}for(let e of n)e.feature.attributes[z.M1]=Q.get(e.feature.attributes[z.Cz]+"-"+e.feature.attributes[z.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:r,links:s,idMap:l}}async applyNewLinkChartLayout(e="organic-standard",t){let{lockedNodeLocations:i,lockedEntityLocations:a,rootEntityIds:n,...o}=t??{};!a&&i?((0,l.io)(d.A.getLogger(this),"lockedNodeLocations is deprecated in 5.0. Use lockedEntityLocations instead.",{replacement:"Use lockedEntityLocations instead.",version:"5.0"}),a=i):a&&i&&(0,l.io)(d.A.getLogger(this),"Both lockedNodeLocations (deprecated in 5.0) and lockedEntityLocations are defined. Use lockedEntityLocations only instead.",{replacement:"Use lockedEntityLocations instead.",version:"5.0"});let r=o.layoutSettings?.rootedLayoutSettings?.rootEntities;if(!r&&n){(0,l.io)(d.A.getLogger(this),"rootEntityIds is deprecated in 5.1. Use layoutSettings.rootedLayoutSettings.rootEntities instead.",{replacement:"Use layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"});let e=[];for(let t of n){let i=this.dataManager.memberIdTypeLookup.get(t),a=Array.from(i??[]).find(e=>this.dataManager.entityTypeNames.has(e));a&&e.push({id:t,typeName:a})}o.layoutSettings=o.layoutSettings??new A,o.layoutSettings.rootedLayoutSettings=o.layoutSettings.rootedLayoutSettings??new x,o.layoutSettings.rootedLayoutSettings.rootEntities=e}else r&&n&&(0,l.io)(d.A.getLogger(this),"Both rootEntityIds (deprecated in 5.1) and layoutSettings.rootedLayoutSettings.rootEntities are defined. Use layoutSettings.rootedLayoutSettings.rootEntities only instead.",{replacement:"Use layoutSettings.rootedLayoutSettings.rootEntities instead.",version:"5.1"});let s=[];await this._calculateLayoutWithSublayerTimeInfo(e,{...o,lockedEntityLocations:a}),this.layers.forEach(e=>{s.push(e.refreshCachedQueryEngine())}),this.membershipModified=!0,await Promise.all(s),this._refreshNamedTypes()}getCurrentNodeLocations(){let e=new Map;for(let[t,i]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||i?.members?.forEach(t=>{let i,a=t.linkChartLocation,n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new m.A({x:i.x,y:i.y})))});return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);let t=[];this.layers.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let i=[];try{let a=[];for(let e of this.dataManager.relationshipTypeNames){let t=this.sublayerIdsCache.get(e);t&&(a=a.concat(Array.from(t.keys())))}i=await this.dataManager.getRelationshipsBetweenNodes(e,a,t),await this._handleNewRecords(i,t),(0,y.Te)(t)}catch(e){throw(0,y.zf)(e)&&this.removeRecords(i),e}return{records:i}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let i=[];try{let a=[];for(let e of this.dataManager.relationshipTypeNames){let t=this.sublayerIdsCache.get(e);t&&(a=a.concat(Array.from(t.keys())))}let n=[];for(let e of this.dataManager.entityTypeNames){let t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}i=await this.dataManager.getRelationshipsFromNodes(e,n,a,t),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),(0,y.Te)(t)}catch(e){throw(0,y.zf)(e)&&this.removeRecords(i),e}return{records:i}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){let i=new Map;this.layers.forEach(e=>{i.set(e.objectType.name,e.timeInfo)}),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:i,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){let i=new Set,a=[],n=this.layers.concat(this.tables);for(let t of e)this._graphTypeLookup.has(t.typeName)&&(!1===n.some(e=>e.objectType.name===t.typeName)&&(this.dataManager.sublayerCaches.set(t.typeName,new Map),i.add(t.typeName)),(0,p.tE)(this.sublayerIdsCache,t.typeName,()=>new Set).add(t.id),a.push(t));this.dataManager.addToLayer(a);for(let e of i){let t=this._graphTypeLookup.get(e);if(t){let i=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),i.geometryType?this.layers.push(i):this.tables.push(i)}}await(0,j.qN)(this,Array.from(i),t),await this.dataManager.refreshCacheContent(e.map(e=>e.id),void 0,void 0,void 0,t);let o={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedEntityLocations:new Map};for(let[e,t]of this.entityLinkChartDiagramLookup.entries())t&&o.lockedEntityLocations.set(e,new m.A({x:t.coords[0],y:t.coords[1]}));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,o)}_createSublayers(e,t,i){e.forEach(e=>{let a=this._createSublayer(e);i(a)&&t.push(a),this._updateSublayerCaches(e)})}_updateSublayers(e,t){t.forEach(t=>{t.parentCompositeLayer=this;let i=e.find(e=>e.type===t.graphType&&e.name===t.graphTypeName);i&&(t.objectType=i,t.read({title:i.name},{origin:"service"}),this._updateSublayerCaches(i))})}_updateSublayerCaches({name:e}){if(!e)return;let t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_layersLoadedFromAuthoritativeItem(){let e=this.originIdOf("layers");return e>=3&&e<7}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e?.members?.forEach(e=>{let i,a=e.linkChartLocation,n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};let o=(0,B.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)})}),this.memberRelationshipTypes.forEach(e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach(e=>{let t=this.relationshipLinkChartDiagramLookup.get(e.attributes[z.Cz]),i=this.relationshipLinkChartDiagramLookup.get(e.attributes[z.KQ]);if(t&&i){let a=(0,B.Ux)(new f.A({paths:[[[t.coords[0],t.coords[1]],[i.coords[0],i.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[z.dr],a)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[z.dr],null)})})):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedEntityLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedEntityLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(let e of this.layers)e.emit("refresh",{dataChanged:!0});for(let e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){let i=e=>"number"==typeof e&&!isNaN(e),a=e=>i(e)&&e>=0,n={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return n;let{computationBudgetTime:o,autoRepulsionRadius:r,repulsionRadiusMultiplier:s,absoluteIdealEdgeLength:l,multiplicativeIdealEdgeLength:h,idealEdgeLengthType:p}=t;return(e=>i(e)&&e>=1)(o)?n.computationBudgetTime=o:o&&d.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),n.autoRepulsionRadius=r,!r&&(e=>i(e)&&e>=1)(s)?n.repulsionRadiusMultiplier=s:r||(n.autoRepulsionRadius=!0,d.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&((e=>Object.values(O).includes(e))(p)?n.idealEdgeLengthType=p:void 0!==p&&d.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===p&&a(l)?n.absoluteIdealEdgeLength=l:"absolute-value"===p&&void 0!==l?d.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===p&&a(h)?n.multiplicativeIdealEdgeLength=h:"multiplier"===p&&void 0!==h&&d.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),n}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===O.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===O.ABSOLUTE&&(t=void 0===t?-1:-1*t),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new U.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){if(t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner")),e){let t=[];e.forEach(e=>{e.parent=this,t.push(this._createVisibleRefreshHandle(e))}),this.addHandles([...t,e.on("after-add",({item:e})=>{e.parent=this,this.addHandles(this._createVisibleRefreshHandle(e),"sublayers-owner")}),e.on("after-remove",({item:e})=>{e.parent=null})],"sublayers-owner")}}_createVisibleRefreshHandle(e){return(0,g.wB)(()=>e.visible,(t,i)=>{!0===t&&!1===i&&e.emit("refresh",{dataChanged:!0})})}_alignLayersDataModelAndInclusionDefinition(e){let t=new Set((e.entityTypes??[]).map(e=>e.name).concat((e.relationshipTypes??[]).map(e=>e.name))),i=new Set((e.entityTypes??[]).map(e=>e.name)),a=new Set((e.relationshipTypes??[]).map(e=>e.name));if(this.layers){for(let e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=i.has(e.graphTypeName)?"entity":"relationship");let e=this.layers.filter(e=>t.has(e.graphTypeName)&&("entity"===e.graphType?i.has(e.graphTypeName):a.has(e.graphTypeName)));this.setAtOrigin("layers",e,(0,r.OL)(this.originIdOf("layers")))}else this.layers=new s.A;if(this.layers&&this._originalInclusionList){let e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map(e=>e.graphTypeName)??[],i=this.layers.map(e=>e.graphTypeName).concat(t);for(let t of i)e.has(t)||this._originalInclusionList.namedTypeDefinitions.set(t,{useAllData:!1,members:new Map});let a=[];for(let e of this._originalInclusionList.namedTypeDefinitions.keys())i.includes(e)||(d.A.getLogger(this).warn(`A named type, ${e}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),a.push(e));for(let e of a)this._originalInclusionList.namedTypeDefinitions.delete(e)}}};(0,a.Cg)([(0,o.MZ)(V.OZ)],W.prototype,"url",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"dataPreloadedInLocalCache",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"initializationLinkChartConfig",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"membershipModified",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"dataManager",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"initializationInclusionModeDefinition",null),(0,a.Cg)([(0,o.MZ)()],W.prototype,"knowledgeGraph",void 0),(0,a.Cg)([(0,o.MZ)({type:s.A.ofType(U.A),json:{write:{ignoreOrigin:!0}}})],W.prototype,"layers",void 0),(0,a.Cg)([(0,o.MZ)({readOnly:!0})],W.prototype,"linkChart",null),(0,a.Cg)([(0,o.MZ)()],W.prototype,"entityLinkChartDiagramLookup",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"linkChartExtent",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"memberEntityTypes",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"memberRelationshipTypes",void 0),(0,a.Cg)([(0,o.MZ)({type:["LinkChartLayer"]})],W.prototype,"operationalLayerType",void 0),(0,a.Cg)([(0,o.MZ)()],W.prototype,"sublayerCapabilities",null),(0,a.Cg)([(0,o.MZ)()],W.prototype,"sublayerIdsCache",void 0),(0,a.Cg)([(0,o.MZ)({type:s.A.ofType(U.A),json:{write:{ignoreOrigin:!0}}})],W.prototype,"tables",void 0),(0,a.Cg)([(0,o.MZ)({json:{read:!1}})],W.prototype,"type",void 0),(0,a.Cg)([(0,o.MZ)({readOnly:!0})],W.prototype,"userHasEditingPrivileges",void 0),(0,a.Cg)([(0,o.MZ)({readOnly:!0})],W.prototype,"userHasFullEditingPrivileges",void 0),(0,a.Cg)([(0,o.MZ)({readOnly:!0})],W.prototype,"userHasUpdateItemPrivileges",void 0),(0,a.Cg)([(0,o.MZ)({json:{read:!1}})],W.prototype,"chronologicalAuxiliaryGraphics",void 0),(0,a.Cg)([(0,o.MZ)((0,Z.P6)("dateFieldsTimeReference"))],W.prototype,"dateFieldsTimeZone",void 0),W=(0,a.Cg)([(0,o.$K)("esri.layers.LinkChartLayer")],W);const q=W}}]);
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[5856],{69397(e,t,r){r.d(t,{JY:()=>h,Qf:()=>a,Qh:()=>l,lM:()=>s,ro:()=>u,rq:()=>f});var n=r(44208),i=r(34275);function s(e){if(!e)return 0;let t=c;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r],!1));return t}function l(e){if(!e)return 0;if("number"==typeof e[0])return a(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return f(e,8);let r=d;for(let n=0;n<t;n++)r+=o(e[n]);return r}(e);let t=c;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?l(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...e){return e.reduce((e,t)=>e+u(t),0)}function u(e,t=16){return e?(0,i.iu)(e)?e.byteLength+g:Array.isArray(e)?f(e,t):0:0}function f(e,t){return d+e.length*t}const c=32,d=16,h=(0,n.A)("ios")||!(0,n.A)("chrome")&&!(0,n.A)("opr")?8:4,g=145},35856(e,t,r){r.r(t),r.d(t,{SplatSortWorkerInput:()=>i,SplatSortWorkerOutput:()=>s,clear:()=>k,destroy:()=>A,sort:()=>b});var n=r(69397);class i{constructor({addedTiles:e,removedTileHandles:t,visibleTileHandles:r,sortedAtlasIndices:n,numGaussians:i,directionX:s,directionY:l,directionZ:o,preciseSort:a=!1}){this.addedTiles=e,this.removedTileHandles=t,this.visibleTileHandles=r,this.sortedAtlasIndices=n,this.numGaussians=i,this.directionX=s,this.directionY=l,this.directionZ=o,this.preciseSort=a}}class s{constructor(e,t){this.sortedAtlasIndices=e,this.usedMemory=t}}let l=null,o=0,a=null,u=0,f=null,c=0;const d=new Map;function h(){let e=(0,n.Qf)(l,a,f);for(let t of d.values())e+=(0,n.Qh)(t);return e}function g(e,t){let r=Math.max(1,e);for(;r<t;)r=Math.ceil(1.5*r);return r}function p(e){e>o&&(o=g(o,e),l=new Uint32Array(o)),l.fill(0,0,e)}function m(e){e<=u||(u=g(u,e),a=new Float64Array(u))}function w(e){return e>c&&(c=g(c,e),f=new Uint32Array(c)),f}function y(e,t,r,n,i){let s=e.length,o=Math.max(10,Math.min(20,Math.round(Math.log2(s/.25)))),a=1+(1<<o);p(a);let u=l,f=i-n,c=f>=1e-6,h=c?(1<<o)/f:0;if(c)for(let t=0;t<s;t++)u[(e[t]-n)*h>>>0]++;else u[0]=s;let g=u[0];for(let e=1;e<a;e++)g+=u[e],u[e]=g;let m=0;for(let i=0;i<t.length;i++){let s=d.get(t[i]);if(null==s)throw Error("Gaussian splat sort worker is missing resident tile data");let l=m+s.gaussianCount;for(let t=0;t<s.pageIds.length&&m<l;t++){let i=1024*s.pageIds[t],o=Math.min(l-m,1024);for(let t=0;t<o;t++,m++)r[--u[c?(e[m]-n)*h>>>0:0]]=i+t}}if(m!==s)throw Error("Gaussian splat sort worker received inconsistent resident tile data")}async function b(e){let{addedTiles:t,removedTileHandles:r,visibleTileHandles:n,sortedAtlasIndices:i,numGaussians:l,directionX:o,directionY:u,directionZ:f,preciseSort:c}=e;for(let e=0;e<r.length;e++)d.delete(r[e]);for(let e=0;e<t.length;e++){let r=t[e];d.set(r.handle,r)}if(0===l)return{result:new s(i,h()),transferList:[i.buffer]};m(l);let g=a.subarray(0,l),p=i.subarray(0,l),b=0,A=1/0,k=-1/0;for(let e=0;e<n.length;e++){let t=d.get(n[e]);if(null==t)throw Error("Gaussian splat sort worker is missing resident tile data");let{relativePositions:r,gaussianCount:i,originX:s,originY:l,originZ:a}=t,c=b+i,h=o*s+u*l+f*a;for(let e=0;b<c;b++,e+=3){let t=r[e]*o+r[e+1]*u+r[e+2]*f+h;g[b]=t,A=Math.min(A,t),k=Math.max(k,t)}}if(b!==l)throw Error("Gaussian splat sort worker received inconsistent resident tile data");if(c){let e=w(l).subarray(0,l);!function(e,t){let r=0;for(let n=0;n<e.length;n++){let i=d.get(e[n]);if(null==i)throw Error("Gaussian splat sort worker is missing resident tile data");let s=r+i.gaussianCount;for(let e=0;e<i.pageIds.length&&r<s;e++){let n=1024*i.pageIds[e],l=Math.min(s-r,1024);for(let e=0;e<l;e++,r++)t[r]=n+e}}if(r!==t.length)throw Error("Gaussian splat sort worker received inconsistent resident tile data")}(n,e);let t=Array(l);for(let e=0;e<l;e++)t[e]=e;t.sort((e,t)=>g[e]-g[t]||e-t);for(let r=0;r<l;r++)p[r]=e[t[r]]}else l>0&&y(g,n,p,A,k);return{result:new s(i,h()),transferList:[i.buffer]}}function A(){k()}function k(){d.clear(),a=null,u=0,f=null,c=0,l=null,o=0}}}]);
@@ -1 +0,0 @@
1
- "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[506,1666,7992,8125],{69397(e,t,r){r.d(t,{JY:()=>c,Qf:()=>l,Qh:()=>i,lM:()=>a,ro:()=>h,rq:()=>u});var s=r(44208),n=r(34275);function a(e){if(!e)return 0;let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let r=g;for(let s=0;s<t;s++)r+=o(e[s]);return r}(e);let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?i(e):f;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+h(t),0)}function h(e,t=16){return e?(0,n.iu)(e)?e.byteLength+m:Array.isArray(e)?u(e,t):0:0}function u(e,t){return g+e.length*t}const f=32,g=16,c=(0,s.A)("ios")||!(0,s.A)("chrome")&&!(0,s.A)("opr")?8:4,m=145},87992(e,t,r){r.d(t,{JR:()=>Z,ME:()=>M,MY:()=>A,NO:()=>C,Nh:()=>P,V2:()=>Y,_s:()=>F,e6:()=>_,gh:()=>E,jm:()=>V,tr:()=>X,uX:()=>p});var s=r(32198),n=(r(69397),r(92722)),a=r(16930),i=r(19419),o=r(513),l=r(50954),h=r(79567),u=r(52006),f=r(49663),g=r(46068),c=r(60408),m=r(21325);class p{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:a,partCount:i,partOffsets:o,partFlags:l,segmentFlags:h,segmentIndices:u,segmentParams:f,segmentCountArc:g,segmentCountBezier:c}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=a,this.partCount=i,this.partOffsets=o,this.partFlags=l,this.segmentFlags=h,this.segmentIndices=u,this.segmentParams=f,this.segmentCountArc=g,this.segmentCountBezier=c}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){let{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){let{type:e,vertexCount:t,partCount:r,hasZ:s,hasM:n,segmentCountArc:a,segmentCountBezier:i}=this,o=Y(e,t,r,s,n,this.hasCurves(),a,i);o.spatialReference=this.spatialReference;let{vertexXY:l,vertexZ:h,vertexM:u}=this;if(o.vertexXY.set(l.subarray(0,2*t),0),o.vertexZ?.set(h.subarray(0,t),0),o.vertexM?.set(u.subarray(0,t),0),this.isMultipart()){let{partOffsets:e,partFlags:t}=this;o.partFlags.set(t.subarray(0,r+1)),o.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){let{segmentFlags:e,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;o.segmentFlags.set(e.subarray(0,t),0),o.segmentIndices.set(r.subarray(0,t),0),o.segmentParams.set(s.subarray(0,n),0)}return o}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,m.aI)(this.spatialReference,e.spatialReference)||this.vertexCount!==e.vertexCount||this.partCount!==e.partCount||this.hasZ!==e.hasZ||this.hasM!==e.hasM||this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;let r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new x(this):[][Symbol.iterator]()}}class x{constructor(e){this.geometry=e,this.value=new d(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class d{constructor(e){this.geometry=e,this.index=-1,this._readVertex=w(e),this._segments=new y(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){let e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class y{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this.value=new v(e.geometry)}get _partIsClosed(){return!!(1&this._part.geometry.partFlags?.[this._part.index])}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;let e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._partIsClosed?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){let{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._partIsClosed?1:2),this.value.indexOfStartVertex=this._partStart-1}}class v{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=w(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){let e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;let t=this.geometry.segmentParams,r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){let e=t[r++],s=t[r++],n=t[r++],a=t[r++];return{b:[this.end,[e,s],[n,a]]}}let s=t[r++],n=t[r++],a=t[r++],i=t[r++],o=t[r++],l=t[r++];r++,r++;let h=t[r++],u=t[r++];if(!(4&s)&&1===a)return{c:[this.end,[h,u]]};let f=2&s?0:1,g=1&s?0:1;return{a:[this.end,[o,l],f,g,i,n,a]}}}function C(e,t){let r={stack:[],error:void 0,hasError:!1};try{return t??=(0,i.Ie)(),(0,s.mS)(r,new O(e,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(t,function(e){let t,{vertexCount:r,vertexXY:n,vertexZ:a,vertexM:o}=e,l=R(e);if(e.hasCurves()){let r={stack:[],error:void 0,hasError:!1};try{(0,s.mS)(r,new O(e,["vertexZ","vertexM"]),!1);let n=(0,i.Ie)();for(let t of e.parts){let e=t.startVertex;for(let{curve:r}of t.segments)(0,h.e)(n,e,r),e=(0,u.yP)(r)}let[a,o,f,g]=n;t={xmin:a,ymin:o,xmax:f,ymax:g,spatialReference:l}}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}else{let e,s,a,i;e=s=1/0,a=i=-1/0;for(let t=0;t<r;++t){let r=n[2*t],o=n[2*t+1];e=Math.min(e,r),a=Math.max(a,r),s=Math.min(s,o),i=Math.max(i,o)}t={xmin:e,ymin:s,xmax:a,ymax:i,spatialReference:l}}if(a){let e=1/0,r=-1/0;for(let t of a)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(o){let e=1/0,r=-1/0;for(let t of o)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}function M(e){let t,r,s;if((0,c.fT)(e)){s="point";let{x:n,y:a,z:i,m:o}=e,l=[n,a];null!=i&&l.push(i),null!=o&&l.push(o),r=[[l]],t=1}else(0,c.U9)(e)?(s="multipoint",r=[e.points],t=e.points.length):(0,c.Rg)(e)?(s="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(s="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,S(t[0],(0,u.yP)(t.at(-1)))&&--e),e),0));let n=Y(s,t,s.includes("point")?0:r.length,(0,c.Pv)(e),(0,c.W0)(e),(0,u.Ed)(e)),{hasZ:a,hasM:i,vertexXY:o,vertexZ:l,vertexM:h}=n;function f(e){o[2*m]=e[0],o[2*m+1]=e[1],a&&(l[m]=e[2]),i&&(h[m]=e[g]),++m}n.spatialReference=e.spatialReference??void 0;let g=n.hasZ?3:2,m=0;if(!n.isMultipart()){if(!a&&!i){for(let[e,t]of r[0])o[2*m]=e,o[2*m+1]=t,++m;return n}for(let e of r[0])f(e);return n}let p="polygon"===s,{partOffsets:x}=n,d=0;if(!(0,u.Ed)(e)){for(let e of r){if(x[d++]=m,0===e.length)continue;let t=e.length;if(p&&S(e[0],e.at(-1))&&--t,a||i)for(let r=0;r<t;++r)f(e[r]);else for(let r=0;r<t;++r){let[t,s]=e[r];o[2*m]=t,o[2*m+1]=s,++m}}return x[d]=m,n}function y(e){let t=v+e;if(t<=(n.segmentParams?.length??0))return;let r=t*N;r=20*Math.ceil(r/20);let s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let v=0;for(let e of r){if(n.partOffsets[d++]=m,0===e.length)continue;let t=e[0],r=t;for(let t=1;t<e.length;++t){let s=e[t];f(r);let a=m-1;(0,u.wY)(s)?(y(10),++n.segmentCountArc,v=F(r,s,n,a,v),r=s.a[0]):(0,u.DA)(s)?(y(10),++n.segmentCountArc,v=I(r,s,n,a,v),r=s.a[0]):(0,u.aO)(s)?(y(10),++n.segmentCountArc,v=_(r,s,n,a,v),r=s.c[0]):(0,u.n1)(s)?(y(4),++n.segmentCountBezier,v=X(0,s,n,a,v),r=s.b[0]):r=s}p&&S(t,r)||f(r)}return n.partOffsets[d]=m,n}function E(e){let t=w(e),{vertexCount:r,partCount:s,hasZ:n,hasM:a}=e,i=R(e),o=0;if(!e.isMultipart()){if("point"===e.type){let[t,r]=e.vertexXY;return{x:t,y:r,z:e.vertexZ?.[0],m:e.vertexM?.[0],spatialReference:i}}let s=[];for(;o<r;)s.push(t(o++));return{points:s,spatialReference:i,hasZ:n,hasM:a}}if(!e.hasCurves()){let r=[];for(let n=0;n<s;++n){let s=!!(1&e.partFlags[n]),a=e.partOffsets[n+1],i=[];for(;o<a;)i.push(t(o++));s&&i.length>0&&i.push([...i[0]]),r.push(i)}return"polygon"===e.type?{rings:r,hasZ:n,hasM:a,spatialReference:i}:{paths:r,hasZ:n,hasM:a,spatialReference:i}}let l=[];for(let{segments:t,startVertex:r}of e.parts){let e=[r];for(let{curve:r}of t)e.push(r);l.push(e)}return"polygon"===e.type?{rings:[],curveRings:l,hasZ:n,hasM:a,spatialReference:i}:{paths:[],curvePaths:l,hasZ:n,hasM:a,spatialReference:i}}function P(e,{lengths:t,coords:r,hasZ:s,hasM:n},a){let i=e.includes("point")?0:t.length,o="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(o?i:0);s??=!1,n??=!1;let h=Y(e,l,i,s,n,!1,0,0);if(h.spatialReference=a??void 0,!h.isMultipart()){for(let e=0,t=0;e<l;++e)h.vertexXY[2*e]=r[t++],h.vertexXY[2*e+1]=r[t++],s&&(h.vertexZ[e]=r[t++]),n&&(h.vertexM[e]=r[t++]);return h}let u=2+Number(s)+Number(n),f=0,g=0;h.partOffsets[0]=0;for(let e of t){let t=h.partOffsets[g],a=t+e-Number(o);h.partOffsets[++g]=a;for(let e=t;e<a;++e)h.vertexXY[2*e]=r[f++],h.vertexXY[2*e+1]=r[f++],s&&(h.vertexZ[e]=r[f++]),n&&(h.vertexM[e]=r[f++]);o&&(f+=u)}return h}function Z({type:e,vertexCount:t,vertexXY:r,vertexZ:s,vertexM:a,partCount:i,partOffsets:o,partFlags:l,hasZ:h,hasM:u}){let f=new n.A([],[],h,u);i=Math.max(i,1);let g=0;for(let e=0;e<i;++e){let n=o?.[e+1]??t,i=f.coords.length;for(let e=g;e<n;++e)f.coords.push(r[2*e],r[2*e+1]),h&&f.coords.push(s[e]),u&&f.coords.push(a[e]);if(l&&1&l[e]){let e=g;f.coords.push(r[2*e],r[2*e+1]),h&&f.coords.push(s[e]),u&&f.coords.push(a[e])}f.lengths.push((f.coords.length-i)/f.stride),g=n}return"point"===e&&(f.lengths.length=0),f}function V(...e){let t=new Set;for(let r of e){if(!r)continue;let e=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(let r of e){let e=r?.buffer;e&&t.add(e)}}return Array.from(t)}function A(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;let t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let s=e.getLatestID();(s<=0||s===r)&&(s=void 0);let n=e.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:t};let a=n.isCustomWkid()?0:n.getOldID();if(a<=0)return{wkt:t};let i=e.getLatestVerticalID();return(i<=0||i===a)&&(i=void 0),{wkid:r,wkt:t,latestWkid:s,vcsWkid:a,latestVcsWkid:i}}(e.getSpatialReference()),e=e.getGeometry()),new p({...e.toFlatGeometry(),spatialReference:t})}class O{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(let r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof a.A?e.toJSON():e}function w({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?s=>[e[2*s],e[2*s+1],t[s],r[s]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function S(e,t){return e.every((e,r)=>e===t[r])}function Y(e,t,r,s,n,a,i,o){i??=0,o??=0;let l=new p({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:i,segmentCountBezier:o}),h=2*Float64Array.BYTES_PER_ELEMENT*t;s&&(h+=Float64Array.BYTES_PER_ELEMENT*t),n&&(h+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(h+=(r+1)*Int32Array.BYTES_PER_ELEMENT,h+=(r+1)*Int8Array.BYTES_PER_ELEMENT),a&&(h+=t*Int8Array.BYTES_PER_ELEMENT,h+=t*Int32Array.BYTES_PER_ELEMENT,h+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);let u=new ArrayBuffer(h),f=0;return l.vertexXY=new Float64Array(u,f,2*t),f+=l.vertexXY.byteLength,s&&(l.vertexZ=new Float64Array(u,f,t),f+=l.vertexZ.byteLength),n&&(l.vertexM=new Float64Array(u,f,t),f+=l.vertexM.byteLength),a&&(l.segmentParams=new Float64Array(u,f,l.segmentParamCount),f+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(u,f,t),l.segmentIndices.fill(z),f+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(u,f,r+1),f+=l.partOffsets.byteLength,l.partFlags=new Int8Array(u,f,r+1),f+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,r).fill(1)),a&&(l.segmentFlags=new Int8Array(u,f,t),l.segmentFlags.fill(1),f+=l.segmentFlags.byteLength),l}function F(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},a,i){r[a]=4,s[a]=i;let[o,[l,h],u,f,c,m,p]=t.a,x=4;f||(x|=1),u||(x|=2);let d=(0,g.SW)(e,t),[y,v]=(0,g.Uk)(d,.5);return n[i++]=x,n[i++]=m,n[i++]=p,n[i++]=c,n[i++]=l,n[i++]=h,n[i++]=d.u2-d.u1,n[i++]=d.u1,n[i++]=y,n[i++]=v,i}function I(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},a,i){r[a]=4,s[a]=i;let l=(0,f.io)(e,t);return b(l,4,...(0,o.mq)(l,.5),n,i)}function _(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},a,i){return r[a]=4,s[a]=i,b((0,l.pM)(e,t),0,...t.c[1],n,i)}function b(e,t,r,s,n,a){let{cx:i,cy:o,thetaStart:l,thetaEnd:h,radius:u}=e;return l>h||(t|=1),Math.abs(h-l)<=Math.PI||(t|=2),n[a++]=t,n[a++]=u,n[a++]=1,n[a++]=0,n[a++]=i,n[a++]=o,n[a++]=h-l,n[a++]=l,n[a++]=r,n[a++]=s,a}function X(e,{b:[t,[r,s],[n,a]]},{segmentFlags:i,segmentIndices:o,segmentParams:l},h,u){return i[h]=2,o[h]=u,l[u++]=r,l[u++]=s,l[u++]=n,l[u++]=a,u}const N=1.61803,z=-1},78125(e,t,r){r.r(t),r.d(t,{fromExtent:()=>x,fromGeometry:()=>p,fromMultipoint:()=>d,fromPoint:()=>y,fromPolygon:()=>v,fromPolyline:()=>C,fromPolylineUsingImportOperator:()=>M,fromSpatialReference:()=>E,getSpatialReference:()=>m,toExtent:()=>Z,toGeometry:()=>P,toMultipoint:()=>V,toPoint:()=>A,toPolygon:()=>O,toPolyline:()=>R});var s=r(83661),n=r(55537),a=r(95213),i=r(88885),o=r(5443),l=r(48526),h=r(86738),u=r(39829),f=r(82799),g=(r(90293),r(83299));const c="_gxVersion";function m(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function p(e){switch(e.type){case"point":return y(e);case"multipoint":return d(e);case"polyline":return C(e);case"polygon":return v(e);case"extent":return x(e);default:throw Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(c)){let t=new a.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(c,t)}return e.getCacheValue(c)}function d(e){if(!e.getCacheValue(c)){let t=new i.M,r=new a.P,s=e.points,n=e.hasM,o=e.hasZ,l=o?3:2;for(let e=0,a=s.length;e<a;e++){let a=s[e];r.setXYCoords(a[0],a[1]),o&&r.setZ(a[2]??0),n&&r.setM(a[l]??NaN),t.add(r)}e.setCacheValue(c,t)}return e.getCacheValue(c)}function y(e){if(!e.getCacheValue(c)){let t=new a.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(c,t)}return e.getCacheValue(c)}function v(e){if(!e.getCacheValue(c)){let{curveRings:t,hasM:r,hasZ:s,rings:n}=e,a=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:r,hasZ:s,rings:n});e.setCacheValue(c,a)}return e.getCacheValue(c)}function C(e){if(!e.getCacheValue(c)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,a=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(c,a)}return e.getCacheValue(c)}function M(e){if(!e.getCacheValue(c)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,a=(0,g.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(c,a)}return e.getCacheValue(c)}function E(e){return e.cache?(e.cache[c]??=(0,g.fromSpatialReference)(e),e.cache[c]):(0,g.fromSpatialReference)(e)}function P(e,t){if(e)switch(e.getGeometryType()){case n.G.enumPoint:return A(e,t);case n.G.enumEnvelope:return Z(e,t);case n.G.enumMultiPoint:return V(e,t);case n.G.enumPolyline:return R(e,t);case n.G.enumPolygon:return O(e,t)}return null}function Z(e,t){if(e.isEmpty())return null;let r=new o.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),s=e.getDescription();if(s.hasM()){let t=e.queryInterval(2,0);r.mmin=t.vmin,r.mmax=t.vmax}if(s.hasZ()){let t=e.queryInterval(1,0);r.zmin=t.vmin,r.zmax=t.vmax}return r.setCacheValue(c,e),r}function V(e,t){if(e.isEmpty())return null;let r=e.getDescription(),s=r.hasM(),n=r.hasZ(),i=[],o=new a.P;for(let t=0,r=e.getPointCount();t<r;t++){e.getPointByVal(t,o);let r=[o.getX(),o.getY()];n&&r.push(o.getZ()),s&&r.push(o.getM()),i.push(r)}let h=new l.A({hasM:s,hasZ:n,points:i,spatialReference:t});return h.setCacheValue(c,e),h}function A(e,t){if(e instanceof s.P)return new h.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;let r=new h.A({x:e.getX(),y:e.getY(),spatialReference:t}),n=e.getDescription();return n.hasM()&&(r.m=e.getM()),n.hasZ()&&(r.z=e.getZ()),r.setCacheValue(c,e),r}function O(e,t){if(e.isEmpty())return null;let r=u.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(c,e),r}function R(e,t){if(e.isEmpty())return null;let r=f.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(c,e),r}},92722(e,t,r){r.d(t,{A:()=>n});var s=r(69397);class n{constructor(e=[],t=[],r=!1,s=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:s}){return new n(e,t,r||!1,s||!1)}static fromRect([e,t,r,s]){let a=r-e,i=s-t;return new n([5],[e,t,a,0,0,i,-a,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:s}=this,n=this.coords[s*t],a=this.coords[s*t+1];for(let i=1;i<r;i+=1){let r=s*(t+i),o=this.coords[r],l=this.coords[r+1];e+=-.5*(o-n)*(l+a),n=o,a=l}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let s of this.lengths){for(let n=0;n<s;n++){let s=r*(t+n);e(this.coords[s],this.coords[s+1])}t+=s}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,s=0,{stride:n}=this;for(let e of r){for(let r=1;r<e;r++){let e=n*(s+r);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}s+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:s}=this,a=this.coords.slice(0,s*r);return e?(e.set(a),new n(t,e,this.hasZ,this.hasM)):new n(t,Array.from(a),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,s=0;t<r.length;t+=e)r[s++]=this.coords[t],r[s++]=this.coords[t+1];return new n(this.lengths,r,!1,!1)}}}}]);