@arcgis/core 4.34.0-next.57 → 4.34.0-next.59

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 (462) hide show
  1. package/Basemap.js +1 -1
  2. package/LICENSE.md +19 -0
  3. package/README.md +2 -18
  4. package/applications/KnowledgeStudio/reshape.d.ts +5 -0
  5. package/applications/KnowledgeStudio/reshape.js +5 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/03fe4164abd12abc7921.js +1 -0
  8. package/assets/esri/core/workers/chunks/{893e5eb5c028c4704317.js → 0427f66b56ec6601deb0.js} +1 -1
  9. package/assets/esri/core/workers/chunks/06b65105b15abf4d0fbf.js +1 -0
  10. package/assets/esri/core/workers/chunks/{02902303e5585a16ebea.js → 0b53bc76d38e85902748.js} +1 -1
  11. package/assets/esri/core/workers/chunks/0cb2f7172190babb4139.js +1 -0
  12. package/assets/esri/core/workers/chunks/0e28cb5d8d89ae29cdd0.js +1 -0
  13. package/assets/esri/core/workers/chunks/{1776ef96c9f4636f8838.js → 138c11b5eca621e51396.js} +1 -1
  14. package/assets/esri/core/workers/chunks/14c6461ffd36319e1d74.js +1 -0
  15. package/assets/esri/core/workers/chunks/1612d1c1d78c122dfef6.js +1 -0
  16. package/assets/esri/core/workers/chunks/17abab49db1813d3e192.js +1 -0
  17. package/assets/esri/core/workers/chunks/182383fd00008606bfaa.js +1 -0
  18. package/assets/esri/core/workers/chunks/18f878ec695617650a96.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d578c3880eaf2dd62324.js → 19e5e011f929b6b940fe.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{57c438bb0da6410df525.js → 1bf17c6548ac4cd5a166.js} +1 -1
  21. package/assets/esri/core/workers/chunks/1c61cf137a989bc52bb8.js +1 -0
  22. package/assets/esri/core/workers/chunks/{043bb97e38e3a54aa2ab.js → 1ed7a8f4a0058d3b69ef.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{dd2b5f115d156b5b212e.js → 22ec2b0a853911692dc8.js} +1 -1
  24. package/assets/esri/core/workers/chunks/232c76f122b1f519e099.js +1 -0
  25. package/assets/esri/core/workers/chunks/{827bebb4bcdde23adc91.js → 251b7f2e295ce191eb62.js} +1 -1
  26. package/assets/esri/core/workers/chunks/27334cda1b877abcba1b.js +1 -0
  27. package/assets/esri/core/workers/chunks/{02a31483e09652a1a1a2.js → 2b7f9a57a2cfbc108673.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{9fef330b241f958b55df.js → 2cd27b06226e30aec5da.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{7c86af4f60cea383ed96.js → 39a1f361bb69073af765.js} +1 -1
  30. package/assets/esri/core/workers/chunks/3a7ac10a6614fe5745f7.js +1 -0
  31. package/assets/esri/core/workers/chunks/{70cf81ec5a901782d2db.js → 3e7c9a43e52ed6a1b018.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{8257352421f453a669e9.js → 3f634580055b30dbfc8e.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{0e8d3d38e9b1f6abf6f2.js → 3fd09a7c05583a57a317.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{52917b753c5ceab0c1f7.js → 4050ddb580d364d9e205.js} +7 -7
  35. package/assets/esri/core/workers/chunks/{8c79945909069733558f.js → 4094cebc4b92c52f4e27.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{82de1b50ae286f1e6c44.js → 451761c7bd2da530e1d0.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{cc748d4f4adb9c584aa4.js → 45aeff2f751f124f8e53.js} +1 -1
  38. package/assets/esri/core/workers/chunks/462b30fc40a5f337ba10.js +1 -0
  39. package/assets/esri/core/workers/chunks/{d20af70b23f175fb5442.js → 48b9ba825856a0c843ff.js} +1 -1
  40. package/assets/esri/core/workers/chunks/497214e9e82b936fc94e.js +1 -0
  41. package/assets/esri/core/workers/chunks/4ac127cefa3aa5e93e78.js +1 -0
  42. package/assets/esri/core/workers/chunks/4b1daffa97fd90a554a0.js +1 -0
  43. package/assets/esri/core/workers/chunks/4d7fcec769369c576847.js +1 -0
  44. package/assets/esri/core/workers/chunks/4dee2f05508e90410f13.js +1 -0
  45. package/assets/esri/core/workers/chunks/516864fb68025acc7db6.js +1 -0
  46. package/assets/esri/core/workers/chunks/{d630fc3acd2552c98dc0.js → 547af4ffbeeccba9d187.js} +1 -1
  47. package/assets/esri/core/workers/chunks/54b43876ae6fb078eb38.js +1 -0
  48. package/assets/esri/core/workers/chunks/{cf699b9bb530b87be14c.js → 58422c616a824ab49218.js} +1 -1
  49. package/assets/esri/core/workers/chunks/589a0e244ef5f1b84ab6.js +1 -0
  50. package/assets/esri/core/workers/chunks/5b7e5ec6aea1f7f9b005.js +1 -0
  51. package/assets/esri/core/workers/chunks/{fe55833c80cf59df9c2b.js → 5cb238318a24b70d5ac3.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{2c7e7895c4dda176220e.js → 5d4b24c864ebb68ae61e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{88a5e7415f8858c454f7.js → 5de7c2a80bd9c81cefe2.js} +1 -1
  54. package/assets/esri/core/workers/chunks/5e1afea05b624b315d9f.js +1 -0
  55. package/assets/esri/core/workers/chunks/5ed7e139c72cd2b3ddba.js +1 -0
  56. package/assets/esri/core/workers/chunks/6531f33d6710960079e9.js +1 -0
  57. package/assets/esri/core/workers/chunks/{a1ff4c252012d5026133.js → 65eb183b5d001dfc42c8.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{f1b6d6ee03635d985c3e.js → 6688efc71d9d8f4d2559.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{d5faf3ddf9a39de826be.js → 672c04d48aa51f16e9b7.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{1cbd59918c60a1a21494.js → 700b5a536f97233bc4af.js} +1 -1
  61. package/assets/esri/core/workers/chunks/7597ef10d1699e7088e5.js +1 -0
  62. package/assets/esri/core/workers/chunks/781e424a383c71ca904d.js +1 -0
  63. package/assets/esri/core/workers/chunks/79933271a76a1756584f.js +1 -0
  64. package/assets/esri/core/workers/chunks/{17e203e4680c07bd02f1.js → 7aa7aff6d42be7c2d1d2.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{c2f184e9f579152aa29a.js → 7b17f52019762aa21af8.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{549e073fe276363a9896.js → 7db105f6b688b6da8106.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{945c5a477940ebd23a4c.js → 7f0c78bcba0aed3c4eff.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{a249e56a0be8cef33ba8.js → 81eb7785d626aa975033.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{3eb792863a789b97ec58.js → 831a69e5a87e92830fbe.js} +1 -1
  70. package/assets/esri/core/workers/chunks/8374d87176486c1fc90e.js +1 -0
  71. package/assets/esri/core/workers/chunks/83dfaa6e3bd58d544f35.js +1 -0
  72. package/assets/esri/core/workers/chunks/{5691d504ffe5592bc40f.js → 897f9775f06ddbf6486f.js} +1 -1
  73. package/assets/esri/core/workers/chunks/8bbae8ac586e5c0819d2.js +1 -0
  74. package/assets/esri/core/workers/chunks/8c0e11f781607239749d.js +1 -0
  75. package/assets/esri/core/workers/chunks/90540fdfb0c5f68aa959.js +1 -0
  76. package/assets/esri/core/workers/chunks/9280edff80fd87860a5e.js +1 -0
  77. package/assets/esri/core/workers/chunks/{9275313e0f1f521b2658.js → 9325000c87295c473291.js} +1 -1
  78. package/assets/esri/core/workers/chunks/94b9948ec628187c19fc.js +1 -0
  79. package/assets/esri/core/workers/chunks/94f1005222bff1870ef1.js +1 -0
  80. package/assets/esri/core/workers/chunks/{aab349d4624b78ef429f.js → 96102a9296afd1bfe1a9.js} +1 -1
  81. package/assets/esri/core/workers/chunks/981275b6f008431c983a.js +1 -0
  82. package/assets/esri/core/workers/chunks/{4d2473e680324dc17cfa.js → 997a2a1a51039ce7e4e3.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{07d5e0633cc2f765037f.js → 9f4e23bae621ff3ecea3.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{4e2b125e6e3945985a54.js → 9f93513037a6e87433c4.js} +1 -1
  85. package/assets/esri/core/workers/chunks/a16b471c3706ee37f9b6.js +1 -0
  86. package/assets/esri/core/workers/chunks/{989251f5e0d6a08b1afa.js → a17ed7ce97e69466d730.js} +1 -1
  87. package/assets/esri/core/workers/chunks/a2150baf0661e2f28011.js +1 -0
  88. package/assets/esri/core/workers/chunks/a244afea77127e54dd3a.js +1 -0
  89. package/assets/esri/core/workers/chunks/{ab3c018c406dcd81ef9e.js → a2f4b6d8da93f106852c.js} +1 -1
  90. package/assets/esri/core/workers/chunks/a532614aa65fb52dee7b.js +1 -0
  91. package/assets/esri/core/workers/chunks/{3b51b61a7b8a1ef87c9b.js → a700f57af6856cb5313c.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{319fe6a02ec630a827ea.js → a7ea2e3895046e566bc6.js} +1 -1
  93. package/assets/esri/core/workers/chunks/abe60d92e0219ee97036.js +1 -0
  94. package/assets/esri/core/workers/chunks/{a7530dcb08b43e37bbb2.js → ae1cb4c65d72217ae4d4.js} +1 -1
  95. package/assets/esri/core/workers/chunks/af5ae7c36e1178077cbc.js +1 -0
  96. package/assets/esri/core/workers/chunks/{7f80bbbd0897082c1af3.js → b29144ee58b43f769d9a.js} +1 -1
  97. package/assets/esri/core/workers/chunks/b30de4936caa654d7817.js +1 -0
  98. package/assets/esri/core/workers/chunks/{4193691ca076948f4f90.js → b53008c1461dd6bacc63.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{1d234c057a6671acc59f.js → b605dfdfed8ff8eda4f3.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{76ff7ccfe583927918f3.js → b68b54be3d67595a9446.js} +18 -18
  101. package/assets/esri/core/workers/chunks/b6c6f82df3b60c2f831f.js +1 -0
  102. package/assets/esri/core/workers/chunks/{7eda1c400658b6a99be8.js → ba0c7339fa19cc7cbde7.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{fae6030a81cb91a91b69.js → bafd9b0f6e817252cb31.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{c80c032c5b7a11db177a.js → bb2ab663e3e5597f2104.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{724de82d101eb59c2834.js → bd451668c4ce9f7d7128.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{91ede8c62a7b1e8b8023.js → be06c8a58c217a17451b.js} +1 -1
  107. package/assets/esri/core/workers/chunks/bf6b76027c60b4ffa507.js +1 -0
  108. package/assets/esri/core/workers/chunks/{08c0c016787caa169492.js → c24214666d10cb648428.js} +1 -1
  109. package/assets/esri/core/workers/chunks/c34a164a8ece4cb33e81.js +1 -0
  110. package/assets/esri/core/workers/chunks/{a3a23a56df4e5ee86bb2.js → c5fe356fc5b8b7be0d31.js} +1 -1
  111. package/assets/esri/core/workers/chunks/c696615cae5daefa2d98.js +1 -0
  112. package/assets/esri/core/workers/chunks/{e982cf44906eb26164f2.js → c75b0243e5bb84738419.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{64fab4e1e28c06c83403.js → c779c8b98e07fa881c1d.js} +1 -1
  114. package/assets/esri/core/workers/chunks/{4a0257c449f31bdadf26.js → cef9ff811221a7c3812c.js} +1 -1
  115. package/assets/esri/core/workers/chunks/{b1982490762972ae023d.js → d0296368ae143de4d5ce.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{3d5954478864a975e65e.js → d07d3b0e06f12aee4a8b.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{e1472dbf0795d737d6f8.js → d2371f5034b2a32e2523.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{2f65081bfedeab44d6cb.js → d35cadfb78ac9803069b.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{80a69897fa3ce1eaa6e7.js → d707538b150d79050336.js} +1 -1
  120. package/assets/esri/core/workers/chunks/d7ce68667bb355ef8e5d.js +1 -0
  121. package/assets/esri/core/workers/chunks/d823277612f971a9c2f0.js +1 -0
  122. package/assets/esri/core/workers/chunks/d83bdc13c3cad3eee7be.js +1 -0
  123. package/assets/esri/core/workers/chunks/d91b80aa4f847c2e2a33.js +1 -0
  124. package/assets/esri/core/workers/chunks/{a96ac5c68d84122e7751.js → db7678104b18534482e3.js} +1 -1
  125. package/assets/esri/core/workers/chunks/dbcef57073075e9cfdfe.js +1 -0
  126. package/assets/esri/core/workers/chunks/{c4ceb267d4004d8da8cc.js → e0bbfbe1ed39c82f1bd4.js} +1 -1
  127. package/assets/esri/core/workers/chunks/e36d538915261ee0373f.js +1 -0
  128. package/assets/esri/core/workers/chunks/e58c5c8639aa837c84d1.js +1 -0
  129. package/assets/esri/core/workers/chunks/{a24762e976c1459b12de.js → e689a4849f5af3f2f641.js} +1 -1
  130. package/assets/esri/core/workers/chunks/e97250ae8da4bd0d6bc9.js +1 -0
  131. package/assets/esri/core/workers/chunks/{ef85cd0e82d59db8a26f.js → eacc7fccdc3fb670ac8f.js} +2 -2
  132. package/assets/esri/core/workers/chunks/{0df1f56df6d47dfbb6ea.js → eada3483116a5ea8baed.js} +1 -1
  133. package/assets/esri/core/workers/chunks/ed8863c3d334f438b625.js +1 -0
  134. package/assets/esri/core/workers/chunks/{47682247910271077333.js → ee78a38a0cacb19b2fd4.js} +1 -1
  135. package/assets/esri/core/workers/chunks/{f4061587ff5789fa4e1f.js → f594df2f5ce6ca41a254.js} +1 -1
  136. package/assets/esri/core/workers/chunks/{d7b3e81cc313fd0a33b0.js → f5c821ca2911a5103c9a.js} +1 -1
  137. package/assets/esri/core/workers/chunks/f636ca5c811c3a2a962f.js +1 -0
  138. package/assets/esri/core/workers/chunks/{a3ee76b7e46d3fba7cf7.js → f6d91256c4e5f8a0d5c0.js} +1 -1
  139. package/assets/esri/core/workers/chunks/f711aeba1a2c184ddb43.js +1 -0
  140. package/assets/esri/core/workers/chunks/f718f630a8b81496c646.js +1 -0
  141. package/assets/esri/core/workers/chunks/{cac060a187f3a27a19ba.js → fa0f94318173db2034de.js} +1 -1
  142. package/assets/esri/core/workers/chunks/fdae43a97537093e4b97.js +1 -0
  143. package/assets/esri/core/workers/chunks/{b6a201e86f9caef45ff0.js → ff2614d96ca5228e9685.js} +1 -1
  144. package/assets/esri/themes/base/widgets/_Editor.scss +5 -3
  145. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +6 -0
  146. package/assets/esri/themes/dark/main.css +1 -1
  147. package/assets/esri/themes/light/main.css +1 -1
  148. package/assets/esri/themes/light/view.css +1 -1
  149. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar.json +1 -1
  150. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_en.json +1 -1
  151. package/chunks/BloomComposition.glsl.js +36 -18
  152. package/chunks/ColorMaterial.glsl.js +1 -1
  153. package/chunks/ComponentShader.glsl.js +3 -3
  154. package/chunks/CompositeGeographicTransformation.js +1 -1
  155. package/chunks/CutFillDepth.glsl.js +15 -0
  156. package/chunks/CutFillReduction.glsl.js +12 -0
  157. package/chunks/CutFillTargetDepth.glsl.js +6 -0
  158. package/chunks/DefaultMaterial.glsl.js +2 -2
  159. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  160. package/chunks/GeographicTransformation.js +1 -1
  161. package/chunks/HUDMaterial.glsl.js +4 -4
  162. package/chunks/ImageMaterial.glsl.js +2 -2
  163. package/chunks/MultiPathImpl.js +1 -1
  164. package/chunks/NativeLine.glsl.js +1 -1
  165. package/chunks/OperatorGeodesicBuffer.js +1 -1
  166. package/chunks/OperatorGeodeticArea.js +1 -1
  167. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  168. package/chunks/OperatorGeodeticLength.js +1 -1
  169. package/chunks/OperatorProximityGeodesic.js +1 -1
  170. package/chunks/OperatorShapePreservingLength.js +1 -1
  171. package/chunks/OperatorShapePreservingProject.js +1 -1
  172. package/chunks/Path.glsl.js +7 -7
  173. package/chunks/Pattern.glsl.js +1 -1
  174. package/chunks/Point2D.js +1 -1
  175. package/chunks/ProjectionTransformation.js +1 -1
  176. package/chunks/RealisticTree.glsl.js +2 -2
  177. package/chunks/RibbonLine.glsl.js +2 -2
  178. package/chunks/ShadedColorMaterial.glsl.js +1 -1
  179. package/chunks/SimpleAtmosphere.glsl.js +1 -1
  180. package/chunks/SpatialReference.js +1 -1
  181. package/chunks/Terrain.glsl.js +4 -4
  182. package/chunks/UnitFactory.js +1 -1
  183. package/chunks/WaterSurface.glsl.js +3 -3
  184. package/chunks/offsetOperator.js +1 -1
  185. package/chunks/sphere.js +1 -1
  186. package/chunks/vec42.js +1 -1
  187. package/config.js +1 -1
  188. package/copyright.txt +2 -20
  189. package/core/Clonable.js +1 -1
  190. package/core/accessorSupport/layerContainerType.js +1 -1
  191. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  192. package/core/libs/gl-matrix-2/math/vec4.js +1 -1
  193. package/core/quantityFormatUtils.js +1 -1
  194. package/core/unitFormatUtils.js +1 -1
  195. package/editing/geometry/coordUtils.js +5 -0
  196. package/editing/geometry/lineUtils.js +5 -0
  197. package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
  198. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  199. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  200. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  201. package/editing/sharedTemplates/executor/builders/support/shapeUtils.js +1 -1
  202. package/effects/FocusArea.js +1 -1
  203. package/geometry/coordinateFormatter.js +1 -1
  204. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  205. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  206. package/geometry/operators/gx/operatorOffset.js +1 -1
  207. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  208. package/geometry/operators/offsetOperator.js +1 -1
  209. package/geometry/operators/support/apiConverter.js +1 -1
  210. package/geometry/operators/support/initNoPeFactory.js +1 -1
  211. package/geometry/operators/support/jsonConverter.js +1 -1
  212. package/geometry/support/sphere.js +1 -1
  213. package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
  214. package/graphic/LinkChartGraphicOrigin.js +5 -0
  215. package/graphic/isLinkChartGraphicOrigin.js +5 -0
  216. package/interfaces.d.ts +131 -12
  217. package/kernel.js +1 -1
  218. package/layers/FeatureLayer.js +1 -1
  219. package/layers/GroundLayer.js +1 -1
  220. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  221. package/layers/IntegratedMeshLayer.js +1 -1
  222. package/layers/ParquetLayer.js +1 -1
  223. package/layers/PointCloudLayer.js +1 -1
  224. package/layers/SceneLayer.js +1 -1
  225. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  226. package/layers/catalog/catalogUtils.js +1 -1
  227. package/layers/graphics/hydratedFeatures.js +1 -1
  228. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  229. package/layers/knowledgeGraph/nodeMovementUtils.js +5 -0
  230. package/layers/mixins/ImageryTileMixin.js +1 -1
  231. package/layers/mixins/operationalLayers.js +1 -1
  232. package/layers/support/RasterStorageInfo.js +1 -1
  233. package/layers/support/SceneFilter.js +1 -1
  234. package/layers/support/Sublayer.js +1 -1
  235. package/layers/support/layersCreator.js +1 -1
  236. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  237. package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
  238. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  239. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  240. package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
  241. package/package.json +2 -2
  242. package/portal/schemas/definitions.js +1 -1
  243. package/renderers/support/RasterSymbolizer.js +1 -1
  244. package/support/basemapUtils.js +1 -1
  245. package/support/revision.js +1 -1
  246. package/views/2d/engine/Stage.js +1 -1
  247. package/views/2d/engine/webgl/Profiler.js +1 -1
  248. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  249. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  250. package/views/3d/camera/constraintUtils/distance.js +1 -1
  251. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  252. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  253. package/views/3d/layers/CSVLayerView3D.js +1 -1
  254. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  255. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  256. package/views/3d/layers/GeoJSONLayerView3D.js +1 -1
  257. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  258. package/views/3d/layers/GraphicsView3D.js +1 -1
  259. package/views/3d/layers/I3SMeshView3D.js +1 -1
  260. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  261. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  262. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  263. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  264. package/views/3d/layers/RouteLayerView3D.js +1 -1
  265. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  266. package/views/3d/layers/SceneLayerView3D.js +1 -1
  267. package/views/3d/layers/StreamLayerView3D.js +1 -1
  268. package/views/3d/layers/WFSLayerView3D.js +1 -1
  269. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  270. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  271. package/views/3d/layers/graphics/ElevationContext.js +1 -1
  272. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  273. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  274. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  275. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  276. package/views/3d/layers/graphics/Labeler.js +1 -1
  277. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  278. package/views/3d/layers/graphics/StreamController.js +1 -1
  279. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  280. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  281. package/views/3d/layers/graphics/pointUtils.js +1 -1
  282. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  283. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  284. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  285. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  286. package/views/3d/layers/support/FlowTileTree3DDebugger.js +1 -1
  287. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  288. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  289. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  290. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  291. package/views/3d/state/utils/navigationUtils.js +1 -1
  292. package/views/3d/support/CombinedElevationProvider.js +1 -1
  293. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  294. package/views/3d/terrain/OverlayManager.js +1 -1
  295. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  296. package/views/3d/terrain/OverlayRenderer.js +1 -1
  297. package/views/3d/terrain/SphericalPatch.js +1 -1
  298. package/views/3d/terrain/TerrainRenderer.js +1 -1
  299. package/views/3d/terrain/TerrainSurface.js +1 -1
  300. package/views/3d/terrain/Tile.js +1 -1
  301. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  302. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  303. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +2 -2
  304. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  305. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  306. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  307. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  308. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +1 -1
  309. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +1 -1
  310. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +4 -4
  311. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +2 -0
  312. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  313. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js +1 -1
  314. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -4
  315. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  316. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  317. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  318. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  319. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +5 -0
  320. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  321. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  322. package/views/3d/webgl-engine/effects/geometry/ObjectAndLayerIDRenderNode.js +1 -1
  323. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  324. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  325. package/views/3d/webgl-engine/lib/CutFillDepth.js +5 -0
  326. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  327. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  328. package/views/3d/webgl-engine/lib/Material.js +1 -1
  329. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  330. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  331. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  332. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  333. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  334. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  335. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  336. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  337. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  338. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  339. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  340. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  341. package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
  342. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  343. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  344. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  345. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  346. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  347. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  348. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  349. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  350. package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +5 -0
  351. package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +5 -0
  352. package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +5 -0
  353. package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +5 -0
  354. package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +5 -0
  355. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +5 -0
  356. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  357. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +1 -1
  358. package/views/3d/webgl.js +1 -1
  359. package/views/LinkChartView.js +1 -1
  360. package/views/draw/DrawOperation.js +1 -1
  361. package/views/draw/support/GraphicMover.js +1 -1
  362. package/views/draw/support/HighlightHelper.js +1 -1
  363. package/views/draw/support/Reshape.js +1 -1
  364. package/views/draw/support/drawUtils.js +1 -1
  365. package/views/interactive/Tooltip.js +1 -1
  366. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  367. package/views/interactive/sketch/SketchLabelOptions.js +1 -1
  368. package/views/interactive/sketch/SketchOptions.js +1 -1
  369. package/views/interactive/sketch/SketchTooltipOptions.js +1 -1
  370. package/views/interactive/sketch/SketchTooltipVisibleElements.js +1 -1
  371. package/views/interactive/sketch/SketchValueOptions.js +1 -1
  372. package/views/interactive/sketch/Units.js +1 -1
  373. package/views/interactive/sketch/constraints.js +1 -1
  374. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  375. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  376. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  377. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  378. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  379. package/views/interactive/tooltip/fields/fields.js +1 -1
  380. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  381. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  382. package/views/support/angularMeasurementUtils.js +1 -1
  383. package/webdoc/support/writeUtils.js +1 -1
  384. package/webscene/spec-certification/api.js +1 -1
  385. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  386. package/widgets/Editor/EditorViewModel.js +1 -1
  387. package/widgets/Editor/support/splitFeatureUtils.js +5 -0
  388. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  389. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  390. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  391. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  392. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  393. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  394. package/widgets/OrientedImageryViewer.js +1 -1
  395. package/widgets/Sketch.js +1 -1
  396. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  397. package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
  398. package/widgets/support/SelectionToolbar.js +1 -1
  399. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  400. package/EULA.pdf +0 -0
  401. package/assets/esri/core/workers/chunks/0390f3aa624e3f380ce2.js +0 -1
  402. package/assets/esri/core/workers/chunks/0569698a3e4eaf2bac8e.js +0 -1
  403. package/assets/esri/core/workers/chunks/06d2251d6f6b3e44800a.js +0 -1
  404. package/assets/esri/core/workers/chunks/07eea90733834313e9fa.js +0 -1
  405. package/assets/esri/core/workers/chunks/08393d9cc2ed846dd5b4.js +0 -1
  406. package/assets/esri/core/workers/chunks/094c741fa8139c3f40cf.js +0 -1
  407. package/assets/esri/core/workers/chunks/0f51e51db83f303ce5a6.js +0 -1
  408. package/assets/esri/core/workers/chunks/171ce8c64f322cd5d6d1.js +0 -1
  409. package/assets/esri/core/workers/chunks/184d3c88ac2fc1d7e2c3.js +0 -1
  410. package/assets/esri/core/workers/chunks/1ae15163af8875148fb8.js +0 -1
  411. package/assets/esri/core/workers/chunks/1eee7cf11df01a52c1bf.js +0 -1
  412. package/assets/esri/core/workers/chunks/27197b0a2ffb2b6104ea.js +0 -1
  413. package/assets/esri/core/workers/chunks/2c0241a5958aef9cda61.js +0 -1
  414. package/assets/esri/core/workers/chunks/2ded2446700f89155ccd.js +0 -1
  415. package/assets/esri/core/workers/chunks/3264d58aeef8cf074b86.js +0 -1
  416. package/assets/esri/core/workers/chunks/3445ffd752262673fb13.js +0 -1
  417. package/assets/esri/core/workers/chunks/38f09e36e174792646bd.js +0 -1
  418. package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +0 -1
  419. package/assets/esri/core/workers/chunks/4162c633efefc63c5506.js +0 -1
  420. package/assets/esri/core/workers/chunks/435169b455fd2846799b.js +0 -1
  421. package/assets/esri/core/workers/chunks/44dc7ec52c4abb700783.js +0 -1
  422. package/assets/esri/core/workers/chunks/4558f2e3e77831758fdc.js +0 -1
  423. package/assets/esri/core/workers/chunks/4fc267552939583a81a0.js +0 -1
  424. package/assets/esri/core/workers/chunks/527557b603400189d49a.js +0 -1
  425. package/assets/esri/core/workers/chunks/53873f26a2c24cd75e4a.js +0 -1
  426. package/assets/esri/core/workers/chunks/554c789f4e875d7e6fd5.js +0 -1
  427. package/assets/esri/core/workers/chunks/561a2078458bc0339f83.js +0 -1
  428. package/assets/esri/core/workers/chunks/5f28470304b57e24d94c.js +0 -1
  429. package/assets/esri/core/workers/chunks/61a294f9411bf884f2ab.js +0 -1
  430. package/assets/esri/core/workers/chunks/6acffacbb4a03af52e3b.js +0 -1
  431. package/assets/esri/core/workers/chunks/719450ccd455f503d81a.js +0 -1
  432. package/assets/esri/core/workers/chunks/71cac356874b36f9a383.js +0 -1
  433. package/assets/esri/core/workers/chunks/7388e8c905d93dea1c05.js +0 -1
  434. package/assets/esri/core/workers/chunks/749c7159e0902388e828.js +0 -1
  435. package/assets/esri/core/workers/chunks/7714228825fb44d506df.js +0 -1
  436. package/assets/esri/core/workers/chunks/77ee4afaa4a1c7047940.js +0 -1
  437. package/assets/esri/core/workers/chunks/790e97ddbe318bc75415.js +0 -1
  438. package/assets/esri/core/workers/chunks/8762928d10c3821738ad.js +0 -1
  439. package/assets/esri/core/workers/chunks/8ead467a5af0d9bba804.js +0 -1
  440. package/assets/esri/core/workers/chunks/91e04d03b0013bcaad82.js +0 -1
  441. package/assets/esri/core/workers/chunks/92b60d4fb09711919601.js +0 -1
  442. package/assets/esri/core/workers/chunks/9940e59033a8a1eff2a9.js +0 -1
  443. package/assets/esri/core/workers/chunks/998c38974372720b1c52.js +0 -1
  444. package/assets/esri/core/workers/chunks/9b10e70f28873cff44f5.js +0 -1
  445. package/assets/esri/core/workers/chunks/9b5e04d87116ce2b68b2.js +0 -1
  446. package/assets/esri/core/workers/chunks/9d920f3488d59e7f276c.js +0 -1
  447. package/assets/esri/core/workers/chunks/a999f804fc2f00b2e7ae.js +0 -1
  448. package/assets/esri/core/workers/chunks/acf13a64df2991a4cb6b.js +0 -1
  449. package/assets/esri/core/workers/chunks/b457b7dd907f06278bee.js +0 -1
  450. package/assets/esri/core/workers/chunks/b5640f9623a9c9ded92a.js +0 -1
  451. package/assets/esri/core/workers/chunks/b8158c681456d4cf2395.js +0 -1
  452. package/assets/esri/core/workers/chunks/bbdbb618a18542f7a4a2.js +0 -1
  453. package/assets/esri/core/workers/chunks/bead38898c3f4d4d3569.js +0 -1
  454. package/assets/esri/core/workers/chunks/c51e2a048df152abd901.js +0 -1
  455. package/assets/esri/core/workers/chunks/c86e339e45900c54c9f5.js +0 -1
  456. package/assets/esri/core/workers/chunks/ca7c9756802214e41c56.js +0 -1
  457. package/assets/esri/core/workers/chunks/cb8f2ce22274990b359c.js +0 -1
  458. package/assets/esri/core/workers/chunks/d6ab4d55f1023ee6ec6a.js +0 -1
  459. package/assets/esri/core/workers/chunks/db2b8d8cf7131554cf7e.js +0 -1
  460. package/assets/esri/core/workers/chunks/e7ccf067bea8f4766424.js +0 -1
  461. package/assets/esri/core/workers/chunks/f1c50f37a81c672263a1.js +0 -1
  462. package/assets/esri/core/workers/chunks/ff323db554c9e09749e8.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6558],{6558:(e,t,n)=>{n.r(t),n.d(t,{OperatorGeodeticArea:()=>q});var s=n(55537),i=n(88885),a=n(5247),_=n(39117),r=n(83661),h=n(79187),o=n(95213),m=n(31139),l=n(47591),u=n(31635),p=n(11878),c=n(16859);class g{constructor(e,t,n,s,i=100){this.m_startPt=e.clone(),this.m_endPt=t.clone(),this.m_cE2=s,this.m_cE=Math.sqrt(this.m_cE2),this.m_c1By2e=1/(2*this.m_cE),this.m_cRpu=n.getGCS().getUnit().getUnitToBaseFactor(),this.isPcs=2===n.getCoordinateSystemType(),this.PEProjcs=n.getPECoordSys(),this.m_points=(0,r.d)(2*i,Number.NaN)}setSegmentEndPoints(e,t){this.m_startPt.assign(e),this.m_endPt.assign(t)}makeFunctor(){return e=>{const t=[0,0];t[0]=this.m_startPt.x*(1-e)+this.m_endPt.x*e,t[1]=this.m_startPt.y*(1-e)+this.m_endPt.y*e,this.isPcs&&_.aj.projToGeogCenter(this.PEProjcs,1,t,0);const n=Math.sin(t[1]*this.m_cRpu);return 0===this.m_cE2?n:-Math.log((1-this.m_cE*n)/(1+this.m_cE*n))*this.m_c1By2e+n/(1-this.m_cE2*n*n)}}}function d(e,t,n,s,i){const r=(new a.O).execute(e,t,0,0,i);let o;o=s?(new _.O).execute(r,s,i):r;const m=1===n.getUnit().getUnitToBaseFactor()?Math.PI/180:1,l=new h.Envelope2D;o.queryEnvelope(l);const u=new h.Envelope2D,p=new h.Envelope2D,c=new h.Envelope2D;u.setCoords({xmin:l.xmin,ymin:75*m,xmax:l.xmax,ymax:90*m}),p.setCoords({xmin:l.xmin,ymin:-60*m,xmax:l.xmax,ymax:75*m}),c.setCoords({xmin:l.xmin,ymin:-90*m,xmax:l.xmax,ymax:-60*m}),u.inflateCoords(.01*u.width(),0),p.inflateCoords(.01*p.width(),0),c.inflateCoords(.01*c.width(),0);let g=0;return g+=E(o,u,n,i),g+=E(o,p,n,i),g+=E(o,c,n,i),g}function E(e,t,n,i){const a=(new m.O).execute(e,t,n,i);if(null!==a&&!a.isEmpty()){const e=new h.Envelope2D;a.queryEnvelope(e);const{first:t,second:o}=function(e,t){const n=function(e,t){const n=e.getUnit().getUnitToBaseFactor(),i=t.getCenter();i.scale(180*n/Math.PI);const a=new r.P;a.x=0,a.y=0;let h=0;if(0===h){i.y>45?(a.y=r.o,h=0):i.y<-45?(a.y=-r.o,h=1):i.x>=45&&i.x<135?(a.x=r.o,h=2):i.x>=135||i.x<-135?(a.x=r.o,h=3):i.x<-45&&i.x>=-135?(a.x=-r.o,h=4):(a.x=0,h=5);const e=n*Math.sqrt((0,r.a)(t.xmin-t.xmax)+(0,r.a)(t.ymin-t.ymax)),s=a.clone(),_=t.getCenter();if(_.scale(n),h<2&&(s.x=_.x),r.P.distance(s,_)+.5*e>r.o)return null}const o=P[h];if(null!==o&&o.getGCS().equalHorizontal(e))return o;const m=e.getText(),l=a.x,u=a.y;let p=0,c=-1;6!==h?c=_.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:((0,s.g)(false),p=0,c=_.aG.PE_PRJ_CYLINDRICAL_EQAREA);const g=(0,_.v)("EqualAreaPCS");let d;c===_.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?d=`PROJCS["${g}",${m},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${l}],PARAMETER["Latitude_of_Origin",${u}],UNIT["Meter",1.0]]`:c===_.aG.PE_PRJ_CYLINDRICAL_EQAREA?d=`PROJCS["${g}",${m},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${l}],PARAMETER["Standard_Parallel_1",${p}],PARAMETER["Latitude_of_Origin",${u}],UNIT["Meter",1.0]]`:(0,s.d)("getEqualAreaPcsFixed");const E=(0,_.o)(d);return P[h]&&P[h].destroy(),P[h]=E,E}(e,t);if(null!==n)return(0,r.k)(n,!1);const i=e.getText(),a=e.getUnit().getUnitToBaseFactor(),h=(t.xmin+t.width()/2)*a,o=(t.ymin+t.height()/2)*a;let m=0,l=0,u=-1;t.ymin*a>=75*Math.PI/180||t.ymax*a<=-60*Math.PI/180?u=_.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:t.ymin>0||t.ymax<0?(m=(t.ymin+1/3*t.height())*a,l=(t.ymin+2/3*t.height())*a,u=_.aG.PE_PRJ_ALBERS):(m=(t.ymin+2/3*t.height())*a,u=_.aG.PE_PRJ_CYLINDRICAL_EQAREA);const p=(0,_.v)("EqualAreaPCS");let c;return u===_.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?c=`PROJCS["${p}",${i},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${h}],PARAMETER["Latitude_of_Origin",${o}],UNIT["Meter",1.0]]`:u===_.aG.PE_PRJ_ALBERS?c=`PROJCS["${p}",${i},PROJECTION["Albers"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${h}],PARAMETER["Standard_Parallel_1",${m}],PARAMETER["Standard_Parallel_2",${l}],PARAMETER["Latitude_of_Origin",${o}],UNIT["Meter",1.0]]`:u===_.aG.PE_PRJ_CYLINDRICAL_EQAREA?c=`PROJCS["${p}",${i},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${h}],PARAMETER["Standard_Parallel_1",${m}],PARAMETER["Latitude_of_Origin",${o}],UNIT["Meter",1.0]]`:(0,s.d)("getEqualAreaPCSInstance"),(0,r.k)((0,_.o)(c),!0)}(n,e),m=(0,_.g)(n,t,null),l=(new _.O).execute(a,m,i).calculateArea2D();return o&&t.destroy(),l}return 0}const P=[null,null,null,null,null,null,null];class f{getOperatorType(){return 10314}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n){if(0===t.getCoordinateSystemType()&&(0,s.a)(""),e.isEmpty()||e.getDimension()<2)return 0;if((0,s.c)(e),e.getGeometryType()===s.G.enumEnvelope){const s=new i.a;return s.addEnvelope(e,!1),this.execute(s,t,n)}let u=e;e.getDescription().getAttributeCount()>1&&(u=e.clone(),u.dropAllAttributes());const p=(new a.O).execute(u,0,t.getTolerance(0),0,n);let c=null;const E=t.getGCS();E!==t&&(c=(0,_.g)(t,E));let P=(new _.L).execute(p,t,!1,n);return P.isEmpty()?0:(P===e&&(P=e.clone()),t.isPannable()?function(e,t,n){const s=new h.Envelope2D;e.queryEnvelope(s);const a=(0,o.c)(t,s,!0).total(),l=t.getPannableExtent();l.xmin=s.xmin-10*a,l.xmax=s.xmax+10*a;const u=(new m.O).execute(e,l,t,n).getImpl().querySegmentIterator();u.stripAttributes();const p=(0,_.F)();t.querySpheroidData(p);const c=p.e2,d=0===c?2:1,E=new r.P(0,0),P=new r.P(0,0),f=new r.K(0),S=new g(E,P,t,c,100);for(;u.nextPath();)for(;u.hasNextSegment();){const e=u.nextSegment();E.assign(e.getStartXY()),P.assign(e.getEndXY()),S.setSegmentEndPoints(E,P);const t=(0,i.x)(6,0,1,1e-12,1e-15,S.makeFunctor());f.pe((P.x-E.x)*t)}const y=p.majorSemiAxis;return d*y*y*(1-c)*Math.PI*f.getResult()/t.getPannableExtent().width()}(P,t,n):function(e,t,n,s,i){const a=function(e,t,n){const s=e.calculateLength2D(),i=(new l.O).execute(e,t,n)/25e3,a=s/e.getSegmentCount()*2;let _=Math.min(a,s/i);return 0===_&&(_=1),(0,r.k)(_,s/_)}(e,t,i);let _=d(e,a.first,n,s,i),h=1,o=0,m=0;do{if(h++,a.first*=.5,a.first<50*t.getTolerance(0))return _;a.second*=2,m=d(e,a.first,n,s,i),o=Math.abs(m-_),_=m}while(Math.abs(_)>1&&o>1e-8*Math.abs(_)&&(a.second<65e3&&h<8||h<4));return m}(P,t,E,c,n))}}function S(){return{m_p_PCS:new r.P,m_factor:Number.NaN,setValues:y,assign:x}}function y(e,t){this.m_factor=e,this.m_p_PCS.assign(t)}function x(e){this.m_factor=e.m_factor,this.m_p_PCS.assign(e.m_p_PCS)}class A{constructor(e,t,n,s){this.m_ptStart=new o.d,this.m_ptEnd=new o.d,this.m_ptStart.assign(t),this.m_ptEnd.assign(n),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y,this.m_e=Math.sqrt(e),this.m_e2=e,this.m_c1MinusE2=1-e;const i=Math.sin(s);let a;a=0===this.m_e2?2*i:i*((0,r.y)(this.m_e*i)+1/(1-this.m_e2*i*i)),this.m_baseA=a}setSegmentEndPoints(e,t){this.m_ptStart.assign(e),this.m_ptEnd.assign(t),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y}makeFunctor(){return e=>{const t=1-e,n=t*this.m_ptStart.x+e*this.m_ptEnd.x,s=t*this.m_ptStart.y+e*this.m_ptEnd.y,i=t*this.m_ptStart.z+e*this.m_ptEnd.z,a=n*n+s*s,_=i/Math.sqrt(i*i+this.m_c1MinusE2*this.m_c1MinusE2*a);let h;return h=0===this.m_e2?2*_:_*((0,r.y)(this.m_e*_)+1/(1-this.m_e2*_*_)),(this.m_deltaY*n-this.m_deltaX*s)/a*(h-this.m_baseA)}}}function R(){return{sin_phi:Number.NaN,one_p_sin_phi:Number.NaN,one_m_sin_phi:Number.NaN,one_m_e_2_sin_2_phi:Number.NaN,sin_half_phi_pf:Number.NaN,sin_half_phi_pz:Number.NaN,sin_half_asin_e_sin_phi_pf:Number.NaN,sin_half_asin_e_sin_phi_pz:Number.NaN,atanh_sin_phi:Number.NaN,atanh_esin_phi:Number.NaN,make_negative:!1,initialize:C,changeSign:M,assign:T,clone:w}}function C(e,t,n,s){const i=.5*e;this.sin_phi=Math.sin(e);const a=t*this.sin_phi,_=.5*Math.asin(a);this.one_p_sin_phi=1+this.sin_phi,this.one_m_sin_phi=1-this.sin_phi,this.one_m_e_2_sin_2_phi=(1+a)*(1-a),this.sin_half_phi_pf=Math.sin(i+n),this.sin_half_phi_pz=Math.sin(i+s),this.sin_half_asin_e_sin_phi_pf=Math.sin(_+n),this.sin_half_asin_e_sin_phi_pz=Math.sin(_+s),this.atanh_sin_phi=Math.log(this.sin_half_phi_pf/this.sin_half_phi_pz),this.atanh_esin_phi=Math.log(this.sin_half_asin_e_sin_phi_pf/this.sin_half_asin_e_sin_phi_pz)}function M(){this.sin_phi=-this.sin_phi;let e=this.one_p_sin_phi;this.one_p_sin_phi=this.one_m_sin_phi,this.one_m_sin_phi=e,e=this.sin_half_phi_pf,this.sin_half_phi_pf=this.sin_half_phi_pz,this.sin_half_phi_pz=e,e=this.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pf=this.sin_half_asin_e_sin_phi_pz,this.sin_half_asin_e_sin_phi_pz=e,this.atanh_sin_phi=-this.atanh_sin_phi,this.atanh_esin_phi=-this.atanh_esin_phi}function T(e){this.sin_phi=e.sin_phi,this.one_p_sin_phi=e.one_p_sin_phi,this.one_m_sin_phi=e.one_m_sin_phi,this.one_m_e_2_sin_2_phi=e.one_m_e_2_sin_2_phi,this.sin_half_phi_pf=e.sin_half_phi_pf,this.sin_half_phi_pz=e.sin_half_phi_pz,this.sin_half_asin_e_sin_phi_pf=e.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pz=e.sin_half_asin_e_sin_phi_pz,this.atanh_sin_phi=e.atanh_sin_phi,this.atanh_esin_phi=e.atanh_esin_phi,this.make_negative=e.make_negative}function w(){return{...this}}class N{constructor(e,t,n){this.m_transformPCS2GCS=null,this.m_scaleToRadians=new p.T,this.m_scaleToDegrees=new p.T,this.m_progressTracker=n,(0,s.g)(4!==t),this.m_curveType=t,this.m_inputSR=e,e&&0!==e.getCoordinateSystemType()||(0,s.a)(""),this.m_inputGCS=e.getGCS(),this.m_a=0,this.m_eSquared=0,this.m_b=0,this.m_rpu=0}executePolygonGeodeticArea(e){let t,n=e.clone();if(n.dropAllAttributes(),e.hasNonLinearSegments()&&(n=(new a.O).execute(n,0,this.m_inputSR.getTolerance(0),0,this.m_progressTracker)),this.m_inputSR.isPannable()){const e=new h.Envelope2D;n.queryEnvelope(e);const t=this.m_inputSR.getPannableExtent();if(!t.containsEnvelope(e)){const s=t.getCenterX()-e.getCenterX(),i=new p.T;i.setShiftCoords(s,0),n.applyTransformation(i),e.move(s,0);const a=new r.E;t.queryIntervalX(a);const h=new r.E;e.queryIntervalX(h),n=a.contains(h)?(0,_.af)(n,this.m_inputSR):(new _.O).foldInto360RangeGeodetic(n,this.m_inputSR,this.m_curveType)}}if(this.m_transformPCS2GCS?(n=(new _.L).execute(n,this.m_inputSR,!1,this.m_progressTracker),t=n.createInstance(),(0,_.am)(this.m_transformPCS2GCS,n,t,this.m_progressTracker)||(t=(new _.O).execute(n,this.m_transformPCS2GCS,this.m_progressTracker))):t=(new _.L).execute(n,this.m_inputGCS,!1,this.m_progressTracker),t.isEmpty())return 0;if(1===this.m_curveType){const e=(0,_.F)();return this.m_inputGCS.querySpheroidData(e),this.m_a=e.majorSemiAxis,this.m_eSquared=e.e2,this.loxodromeArea(t)}const s=t.getImpl();this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_scaleToRadians.setScale(this.m_rpu),s.applyTransformation(this.m_scaleToRadians),this.m_scaleToDegrees=this.m_scaleToRadians,this.m_scaleToDegrees.invertThis();const i=(0,_.F)();if(this.m_inputGCS.querySpheroidData(i),this.m_a=i.majorSemiAxis,this.m_b=i.minorSemiAxis,this.m_eSquared=i.e2,2===this.m_curveType)return this.executeClippedPolygonGreatEllipticArea(t);{const e={stack:[],error:void 0,hasError:!1};try{const n=_.aY.unit(9101),s=this.m_inputGCS.getPECoordSys(),i=(0,u.mS)(e,s.cloneAlterUnits(n),!1);let a,r,h=this.executeClippedPolygonGeodeticArea(t,i,0),o=0;do{o++,a=this.executeClippedPolygonGeodeticArea(t,i,o),r=Math.abs(a-h),h=a}while(Math.abs(a)>1&&r>1e-8*Math.abs(a)&&o<7);return a}catch(t){e.error=t,e.hasError=!0}finally{(0,u.hk)(e)}}}executeClippedPolygonGeodeticArea(e,t,n){const s={stack:[],error:void 0,hasError:!1};try{const i=new h.Envelope2D;e.queryEnvelope(i);const a=(0,u.mS)(s,this.getEqualAreaPCSInstance(t,i),!1),o=e.clone();(0,_.aZ)(a,o);const m=50,l=o.getImpl().getAttributeStreamRef(0),p=e.getImpl().getAttributeStreamRef(0),c=(0,u.mS)(s,new _.a7,!1),g=(0,u.mS)(s,new _.a7,!1),d=40,E=[0,0],P=(0,r.n)(S,d),f=(0,r.d)(d,-1),y=S(),x=S();let A,R;const C=a;let M=o.calculateArea2D();const T=new r.K(0),w=.5*Math.PI,N=1e-10*Math.abs(M)+1e-6,q=e.getPathCount();let b,v,I,G;const L=new r.P,z=new r.P,D=new r.P,O=new r.P,k=new r.P,F=new r.P;let $,Y;for(v=e.getPathStart(0),b=0;b<q;b++,v=I)for(I=e.getPathEnd(b),l.queryPoint2D(I-1<<1,D),p.queryPoint2D(I-1<<1,L),Math.abs(L.y)>w&&(L.y=(0,r.f)(w,L.y)),G=v;G<I;G++,D.assign(O),L.assign(z)){if(l.queryPoint2D(G<<1,O),p.queryPoint2D(G<<1,z),Math.abs(z.y)>w&&(z.y=(0,r.f)(w,z.y)),$=r.P.distance(D,O),$<m||0===L.y&&0===z.y)continue;_.a8.geodeticDistance(this.m_a,this.m_eSquared,L.x,L.y,z.x,z.y,c,g,null,this.m_curveType);const e=c.val,t=g.val;for(y.setValues(0,D),x.setValues(1,O),R=n,P[0].assign(x),f[0]=n,A=0;A>=0;){Y=.5*(y.m_factor+x.m_factor),_.a8.geodeticCoordinate(this.m_a,this.m_eSquared,L.x,L.y,e*Y,t,c,g,this.m_curveType),k.x=c.val,k.y=g.val,E[0]=k.x,E[1]=k.y,_.aj.geogToProj(C,1,E),F.x=E[0],F.y=E[1];const n=.5*-F.offset(y.m_p_PCS,x.m_p_PCS)*r.P.distance(y.m_p_PCS,x.m_p_PCS);if(T.pe(n),Math.abs(n)>N||Math.abs(n)>0&&R>0)x.setValues(Y,F),A++,P[A].assign(x),Math.abs(n)<=N?(R--,f[A-1]=R,f[A]=R):(R=f[A-1],f[A]=R);else{if(A<=0)break;y.assign(x),A--,x.assign(P[A]),R=f[A]}}}return M+=T.getResult(),Math.abs(M)}catch(e){s.error=e,s.hasError=!0}finally{(0,u.hk)(s)}}executeClippedPolygonGreatEllipticArea(e){const t=[],n=[],s=new r.P,i=new r.P,a=(0,_.a9)(1,this.m_eSquared,new r.P(0,.5*Math.PI)),m=new r.K(0),l=new r.K(0),u=new r.K(0),p=new o.d,c=new o.d,g=new h.Envelope2D;e.queryLooseEnvelope(g);let d=0;g.containsCoords(g.xmin,0)||(d=Math.abs(g.ymin)<Math.abs(g.ymax)?g.ymin:g.ymax);const E=new A(this.m_eSquared,p,c,d),P=this.m_a*this.m_a,f=e.getImpl().querySegmentIterator();for(f.stripAttributes();f.nextPath();)for(;f.hasNextSegment();){const e=f.nextSegment();s.assign(e.getStartXY()),i.assign(e.getEndXY()),i.x-s.x>Math.PI?s.x+=2*Math.PI:i.x-s.x<-Math.PI&&(i.x+=2*Math.PI),this.splitSegmentCrossingItegralThreshold(e,t,n);for(let e of t)p.assign((0,_.a9)(this.m_a,this.m_eSquared,e.getStartXY())),c.assign((0,_.a9)(this.m_a,this.m_eSquared,e.getEndXY())),E.setSegmentEndPoints(p,c),this.adaptiveIntegrationWithRomberg(E,m);for(let e of n){let t=e.getStartXY(),n=e.getEndXY(),s=d;t.y<0&&(n=(0,r.c)(t,t=n),t.y=-t.y,n.y=-n.y,s=-s);const i=(0,_.a9)(1,this.m_eSquared,t),h=(0,_.a9)(1,this.m_eSquared,n),m=Math.min(t.y,n.y),p=(0,_.a_)(this.m_eSquared,t.x,n.x,s,m);l.pe(p);const c=Math.abs((0,_.a_)(this.m_eSquared,t.x,n.x,m,r.o)),g=new o.d;g.setSub(i,a);const E=new o.d;E.setSub(h,a);const f=new o.d;f.setCrossProductVector(g,E);let S=P*(c-.5*f.length());S=(0,r.f)(S,n.x-t.x),u.pe(S)}t.length=0,n.length=0}return u.getResult()+P*(.5*(1-this.m_eSquared)*m.getResult()+l.getResult())}getEqualAreaPCSInstance(e,t){const n=t.getCenterX();let s,i;const a=t.height();let h,o;(h=t.ymin>45*Math.PI/180||t.ymax<45*-Math.PI/180)?s=(0,r.f)(.5*Math.PI,t.getCenterY()):(s=t.getCenterY(),i=t.ymin+a*(2/3));const m=(0,_.v)("EqualAreaPCS"),l=e.toString();return o=h?_.aY.fromString(_.aG.PE_TYPE_PROJCS,`PROJCS["${m}", ${l}, PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing", 0],PARAMETER["Central_Meridian", ${n}], PARAMETER["Latitude_of_Origin", ${s}], UNIT["Meter",1.0]]`):_.aY.fromString(_.aG.PE_TYPE_PROJCS,`PROJCS["${m}", ${l}, PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting", 0],PARAMETER["False_Northing", 0],PARAMETER["Central_Meridian", ${n}],PARAMETER["Standard_Parallel_1", ${i}],PARAMETER["Latitude_of_Origin", ${s}],UNIT["Meter",1.0]]`),o}splitSegmentCrossingItegralThreshold(e,t,n){const s=100,a=400,h=(0,_.a9)(this.m_a,this.m_eSquared,new r.P(0,r.o)),m=(0,_.a9)(this.m_a,this.m_eSquared,new r.P(0,-r.o)),l=this.splitSegmentPassingThroughPole(e);for(let e of l){const l=e.getStartXY(),u=e.getEndXY(),p=(0,_.a9)(this.m_a,this.m_eSquared,l),c=(0,_.a9)(this.m_a,this.m_eSquared,u),g=new r.P,d=new o.d;let E=o.d.sqrDistance(h,p),P=o.d.sqrDistance(p,c);if(E<=s){if(!(P>a)){n.push(new i.L({start:l,end:u}));continue}d.assign(c.sub(p)),d.normalizeThis(),d.assign(p.add(d.mul(20))),g.assign((0,_.ah)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:l,end:g})),l.assign(g)}if(p.assign((0,_.a9)(this.m_a,this.m_eSquared,l)),E=o.d.sqrDistance(h,c),P=o.d.sqrDistance(p,c),E<=s){if(!(P>a)){n.push(new i.L({start:l,end:u}));continue}d.assign(c.sub(p)),d.normalizeThis(),d.assign(c.sub(d.mul(20))),g.assign((0,_.ah)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:g,end:u})),u.assign(g)}if(p.assign((0,_.a9)(this.m_a,this.m_eSquared,l)),c.assign((0,_.a9)(this.m_a,this.m_eSquared,u)),E=o.d.sqrDistance(m,p),P=o.d.sqrDistance(p,c),E<=s){if(!(P>a)){n.push(new i.L({start:l,end:u}));continue}d.assign(c.sub(p)),d.normalizeThis(),d.assign(p.add(d.mul(20))),g.assign((0,_.ah)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:l,end:g})),l.assign(g)}if(p.assign((0,_.a9)(this.m_a,this.m_eSquared,l)),c.assign((0,_.a9)(this.m_a,this.m_eSquared,u)),E=o.d.sqrDistance(m,c),P=o.d.sqrDistance(p,c),E<=s){if(!(P>a)){n.push(new i.L({start:l,end:u}));continue}d.assign(c.sub(p)),d.normalizeThis(),d.assign(c.sub(d.mul(20))),g.assign((0,_.ah)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:g,end:u})),u.assign(g)}t.push(new i.L({start:l,end:u}))}}splitSegmentPassingThroughPole(e){const t={stack:[],error:void 0,hasError:!1};try{const n=[],s=new o.d,a=new o.d,h=new o.d,m=new r.P,l=20,p=3.124139361,g=10,d=e.getStartXY(),E=e.getEndXY(),P=(0,u.mS)(t,new _.a7,!1);if(_.a8.geodeticDistance(this.m_a,this.m_eSquared,d.x,d.y,E.x,E.y,P,null,null,2),Math.abs(E.x-d.x)>p&&P.val>l){const e=new c.a(new r.P(0,90),d.divide(this.m_rpu),E.divide(this.m_rpu),this.m_inputGCS,2,2);let t=(0,_.ac)(e.makeFunctor(),0,1,1e-10);if(t.second<=g&&t.first>0&&t.first<1)return s.assign((0,_.a9)(this.m_a,this.m_eSquared,d)),a.assign((0,_.a9)(this.m_a,this.m_eSquared,E)),(0,r.x)(s,a,t.first,h),m.assign((0,_.ah)(this.m_a,this.m_eSquared,h)),n.push(new i.L({start:d,end:m})),n.push(new i.L({start:m,end:E})),n;if(e.setPointDistFrom(new r.P(0,-90)),t=(0,_.ac)(e.makeFunctor(),0,1,1e-10),t.second<=g&&t.first>0&&t.first<1)return s.assign((0,_.a9)(this.m_a,this.m_eSquared,d)),a.assign((0,_.a9)(this.m_a,this.m_eSquared,E)),(0,r.x)(s,a,t.first,h),m.assign((0,_.ah)(this.m_a,this.m_eSquared,h)),n.push(new i.L({start:d,end:m})),n.push(new i.L({start:m,end:E})),n}return n.push(new i.L({start:d,end:E})),n}catch(e){t.error=e,t.hasError=!0}finally{(0,u.hk)(t)}}adaptiveIntegrationWithRomberg(e,t){const n=e.makeFunctor();let s=0,a=1,_=n(s),r=n(a);const h=1e-17,o=1e-14;let m=(s+a)/2,l=n(m),u=Math.abs(l-_),p=Math.abs(r-l),c=0;for(;c++<32&&(u/p<.1||p/u<.1);)u<p?(t.pe((0,i.x)(5,s,m,o,h,n)),s=m,_=l):(t.pe((0,i.x)(5,m,a,o,h,n)),a=m,r=l),m=(s+a)/2,l=Math.abs(n(m)),u=Math.abs(l-_),p=Math.abs(r-l);t.pe((0,i.x)(5,s,a,o,h,n))}loxodromeAreaHemi(e,t,n,s,i){const a=n.clone(),_=i.clone();let h,o,m,l,u,p,c,g,d,E,P,f,S,y,x,A;return a.make_negative&&a.changeSign(),_.make_negative&&_.changeSign(),P=s-t,1===Math.abs(a.sin_phi)||1===Math.abs(_.sin_phi)?e.half_qp*P:a.sin_phi===_.sin_phi?(E=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+(0,r.y)(e.e*a.sin_phi))*P,E):(x=Math.log(_.sin_half_phi_pf*a.sin_half_phi_pz/(_.sin_half_phi_pz*a.sin_half_phi_pf)),A=Math.log(_.sin_half_asin_e_sin_phi_pf*a.sin_half_asin_e_sin_phi_pz/(_.sin_half_asin_e_sin_phi_pz*a.sin_half_asin_e_sin_phi_pf)),1===this.m_eSquared?(u=0,h=.5*(x+_.sin_phi/_.one_m_e_2_sin_2_phi-a.sin_phi/a.one_m_e_2_sin_2_phi),o=0):(u=-2*e.atanh_e_over_e*(Math.log(_.one_p_sin_phi/a.one_p_sin_phi)-e.e*A),h=(x-e.e*A)/e.one_m_e_2,o=(Math.log(_.one_m_e_2_sin_2_phi/a.one_m_e_2_sin_2_phi)+u/e.atanh_e_over_e)/e.one_m_e_2),m=-A*(a.atanh_esin_phi+_.atanh_esin_phi),l=1/a.one_m_e_2_sin_2_phi-1/_.one_m_e_2_sin_2_phi,p=(0,r.z)(_.one_m_sin_phi/e.one_p_e,e.e)-(0,r.z)(a.one_m_sin_phi/e.one_p_e,e.e),c=(0,r.z)(_.one_p_sin_phi/e.one_p_e,e.e)-(0,r.z)(a.one_p_sin_phi/e.one_p_e,e.e),g=(0,r.z)(a.one_m_sin_phi/-e.one_m_e,e.e)-(0,r.z)(_.one_m_sin_phi/-e.one_m_e,e.e),d=(0,r.z)(a.one_p_sin_phi/-e.one_m_e,e.e)-(0,r.z)(_.one_p_sin_phi/-e.one_m_e,e.e),E=.25/h*(o+m+l+u+.5*(p+c+g+d)),E+=e.half_qp,f=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+(0,r.y)(e.e*a.sin_phi)),S=.5*e.one_m_e_2*_.sin_phi*(1/_.one_m_e_2_sin_2_phi+(0,r.y)(e.e*_.sin_phi)),S<f&&(y=f,f=S,S=y),E<f&&(E=f),E>S&&(E=S),E*=P,E)}loxodromeArea(e){const t=Math.PI/180;let n=0;const s={e:Number.NaN,one_p_e:Number.NaN,one_m_e:Number.NaN,one_m_e_2:Number.NaN,atanh_e_over_e:Number.NaN,half_qp:Number.NaN,f:Number.NaN,z:Number.NaN},i=R(),a=R();s.e=Math.sqrt(this.m_eSquared),s.one_p_e=1+s.e,s.one_m_e=1-s.e,s.one_m_e_2=1-this.m_eSquared,s.atanh_e_over_e=(0,r.y)(s.e),this.m_eSquared>=1?s.half_qp=1:s.half_qp=.5*(1+s.atanh_e_over_e*s.one_m_e_2),s.f=.25*Math.PI,s.z=.75*Math.PI,a.initialize(0,s.e,s.f,s.z);const _=e.getPathCount(),h=new r.P,o=new r.P,m=e.getImpl().getAttributeStreamRef(0);for(let r=0;r<_;r++){const _=e.getPathStart(r),l=e.getPathEnd(r);if(!(l-_<=1)){m.queryPoint2D(2*(l-1),h);for(let e=_;e<l;e++){m.queryPoint2D(2*e,o);const r=h.y*t,l=o.y*t;if(e===_?(i.initialize(r,s.e,s.f,s.z),i.make_negative=!1):i.assign(a),a.initialize(l,s.e,s.f,s.z),a.make_negative=!1,h.y*o.y<0){if(h.y>=90&&o.y<=-90||o.y>=90&&h.y<=-90)return Number.NaN;const e=R();e.initialize(0,s.e,s.f,s.z),e.make_negative=!1;const _=i.atanh_sin_phi-s.e*i.atanh_esin_phi,m=a.atanh_sin_phi-s.e*a.atanh_esin_phi,l=(m*h.x-_*o.x)/(m-_);r<0?(i.make_negative=!0,n-=this.loxodromeAreaHemi(s,h.x*t,i,l*t,e),i.make_negative=!1,n+=this.loxodromeAreaHemi(s,l*t,e,o.x*t,a)):(n+=this.loxodromeAreaHemi(s,h.x*t,i,l*t,e),a.make_negative=!0,n-=this.loxodromeAreaHemi(s,l*t,e,o.x*t,a),a.make_negative=!1)}else h.y>=0?n+=this.loxodromeAreaHemi(s,h.x*t,i,o.x*t,a):(i.make_negative=!0,a.make_negative=!0,n-=this.loxodromeAreaHemi(s,h.x*t,i,o.x*t,a),i.make_negative=!1,a.make_negative=!1);h.assign(o)}}}return this.m_a*n*this.m_a}calculate(e){if(e.isEmpty()||e.getDimension()<2)return 0;if(e.getGeometryType()===s.G.enumEnvelope){const t=new i.a;return t.addEnvelope(e,!1),this.calculate(t)}return this.m_inputSR!==this.m_inputGCS&&null===this.m_transformPCS2GCS&&(this.m_transformPCS2GCS=(0,_.g)(this.m_inputSR,this.m_inputGCS,null)),this.executePolygonGeodeticArea(e)}}class q{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,i){return(0,s.c)(e),4===n?(new f).execute(e,t,i):new N(t,n,i).calculate(e)}}},47591:(e,t,n)=>{n.d(t,{O:()=>g});var s=n(55537),i=n(39117),a=n(88885),_=n(83661),r=n(95213),h=n(79187),o=n(5247),m=n(31139);function l(){return{m_pGcs:new _.P,m_xyz:new r.d,m_factor:Number.NaN,m_geoLength:Number.NaN,setValues:u,setLength:p,assign:c}}function u(e,t,n,s){this.m_factor=e,this.m_pGcs.assign(t),this.m_xyz.assign(s),this.m_geoLength=n}function p(e){this.m_geoLength=e}function c(e){this.m_pGcs.assign(e.m_pGcs),this.m_xyz.assign(e.m_xyz),this.m_factor=e.m_factor,this.m_geoLength=e.m_geoLength}class g{getOperatorType(){return 10315}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}_ExecuteShapePreservingLength(e,t,n,s,a){if(e.hasNonLinearSegments()&&(e=(new o.O).execute(e,0,t.getTolerance(0),0,a)),t.isPannable()){let s=90,_=-90;if(1===n.getUnit().getUnitToBaseFactor()&&(s*=Math.PI/180,_*=Math.PI/180),2===t.getCoordinateSystemType()){let e=null;const n=[0,0,0,0];e=t.getPECoordSys(),n[0]=0,n[1]=s,n[2]=0,n[3]=_,i.aj.geogToProj(e,2,n),s=n[1],_=n[3]}const r=new h.Envelope2D;e.queryEnvelope(r),r.ymin=_,r.ymax=s,e=(new m.O).execute(e,r,t,a)}else{const n=t.getPCSHorizon();if((e=(new i.Q).execute(e,n,t,a))===n){const t=e.clone();e=t}}return e.isEmpty()?0:this._ExecuteIterativeApproach(e,t,n,s,1,a)}_ExecuteIterativeApproach(e,t,n,a,h,o){const m=(0,i.F)();n.querySpheroidData(m);const u=m.majorSemiAxis,p=m.e2,c=n.getUnit().getUnitToBaseFactor(),g=(0,_.n)(l,40),P=(0,_.d)(40,Number.NaN),f=l(),S=l();let y;const x=[0,0,0,0],A=t.getPECoordSys(),R=new _.P,C=new _.P,M=new _.P,T=new _.P,w=new _.P;let N=0;const q=e.querySegmentIterator();for(;q.nextPath();)for(;q.hasNextSegment();){const e=q.nextSegment();R.assign(e.getStartXY()),C.assign(e.getEndXY()),2===t.getCoordinateSystemType()?(x[0]=R.x,x[1]=R.y,x[2]=C.x,x[3]=C.y,i.aj.projToGeog(A,2,x),M.x=x[0]*c,M.y=x[1]*c,T.x=x[2]*c,T.y=x[3]*c):(M.setCoordsPoint2D(R),T.setCoordsPoint2D(C),M.scale(c),T.scale(c));const n=new r.d,a=new r.d;d(u,p,M,n),d(u,p,T,a);let _=E(u,n,a);f.setValues(0,M,Number.NaN,n),S.setValues(1,T,_,a),y=h,g[0].assign(S),P[0]=h;let o=0;for(;;){o>128&&(0,s.d)("iterations exceeded");const n=.5*(f.m_factor+S.m_factor),a=e.getCoord2D(n);2===t.getCoordinateSystemType()?(x[0]=a.x,x[1]=a.y,i.aj.projToGeog(A,1,x),w.x=x[0]*c,w.y=x[1]*c):(w.setCoordsPoint2D(a),w.scale(c)),M.setCoordsPoint2D(f.m_pGcs),T.setCoordsPoint2D(S.m_pGcs);const m=new r.d;d(u,p,w,m);const l=E(u,f.m_xyz,m),R=E(u,S.m_xyz,m);_=S.m_geoLength,Number.isNaN(_)&&(_=E(u,f.m_xyz,S.m_xyz));const C=l+R,q=y===h&&C>=20&&Math.abs(C-_)>1e-8*(_+C);if(o+2<40&&(q||Math.abs(C-_)>0&&y>0))S.setLength(R),g[o].assign(S),S.setValues(n,w,l,m),g[++o].assign(S),q?(y=h,P[o]=h):(y--,P[o-1]=y,P[o]=y);else{if(N+=C,0===o)break;f.assign(S),S.assign(g[--o]),y=P[o]}}}return N}execute(e,t,n){if(t&&0!==t.getCoordinateSystemType()||(0,s.a)(""),e.isEmpty()||e.getDimension()<1)return 0;let _=null;const r=t.getGCS();r!==t&&(_=(0,i.g)(t,r,null));const h=e.getGeometryType();if(h===s.G.enumEnvelope){const s=new a.a;return s.addEnvelope(e,!1),this._ExecuteShapePreservingLength(s,t,r,_,n)}if((0,s.f)(h)){const s=new a.P;return s.addSegment(e,!0),this._ExecuteShapePreservingLength(s,t,r,_,n)}return this._ExecuteShapePreservingLength(e,t,r,_,n)}}function d(e,t,n,s){s.assign((0,i.a9)(e,t,n))}function E(e,t,n){const s=e,i=new r.d;i.setSub(t,n);const a=i.length();return 2*s*Math.asin(a/(2*s))}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6558],{6558:(e,t,n)=>{n.r(t),n.d(t,{OperatorGeodeticArea:()=>b});var s=n(55537),i=n(88885),a=n(5247),_=n(39117),r=n(83661),h=n(79187),o=n(95213),m=n(31139),l=n(47591),u=n(31635),p=n(11878),c=n(16859);class g{constructor(e,t,n,s,i=100){this.m_startPt=e.clone(),this.m_endPt=t.clone(),this.m_cE2=s,this.m_cE=Math.sqrt(this.m_cE2),this.m_c1By2e=1/(2*this.m_cE),this.m_cRpu=n.getGCS().getUnit().getUnitToBaseFactor(),this.isPcs=2===n.getCoordinateSystemType(),this.PEProjcs=n.getPECoordSys(),this.m_points=(0,r.d)(2*i,Number.NaN)}setSegmentEndPoints(e,t){this.m_startPt.assign(e),this.m_endPt.assign(t)}makeFunctor(){return e=>{const t=[0,0];t[0]=this.m_startPt.x*(1-e)+this.m_endPt.x*e,t[1]=this.m_startPt.y*(1-e)+this.m_endPt.y*e,this.isPcs&&_.ac.projToGeogCenter(this.PEProjcs,1,t,0);const n=Math.sin(t[1]*this.m_cRpu);return 0===this.m_cE2?n:-Math.log((1-this.m_cE*n)/(1+this.m_cE*n))*this.m_c1By2e+n/(1-this.m_cE2*n*n)}}}function d(e,t,n,s,i){const r=(new a.O).execute(e,t,0,0,i);let o;o=s?(new _.O).execute(r,s,i):r;const m=1===n.getUnit().getUnitToBaseFactor()?Math.PI/180:1,l=new h.Envelope2D;o.queryEnvelope(l);const u=new h.Envelope2D,p=new h.Envelope2D,c=new h.Envelope2D;u.setCoords({xmin:l.xmin,ymin:75*m,xmax:l.xmax,ymax:90*m}),p.setCoords({xmin:l.xmin,ymin:-60*m,xmax:l.xmax,ymax:75*m}),c.setCoords({xmin:l.xmin,ymin:-90*m,xmax:l.xmax,ymax:-60*m}),u.inflateCoords(.01*u.width(),0),p.inflateCoords(.01*p.width(),0),c.inflateCoords(.01*c.width(),0);let g=0;return g+=E(o,u,n,i),g+=E(o,p,n,i),g+=E(o,c,n,i),g}function E(e,t,n,i){const a=(new m.O).execute(e,t,n,i);if(null!==a&&!a.isEmpty()){const e=new h.Envelope2D;a.queryEnvelope(e);const{first:t,second:o}=function(e,t){const n=function(e,t){const n=e.getUnit().getUnitToBaseFactor(),i=t.getCenter();i.scale(180*n/Math.PI);const a=new r.P;a.x=0,a.y=0;let h=0;if(0===h){i.y>45?(a.y=r.o,h=0):i.y<-45?(a.y=-r.o,h=1):i.x>=45&&i.x<135?(a.x=r.o,h=2):i.x>=135||i.x<-135?(a.x=r.o,h=3):i.x<-45&&i.x>=-135?(a.x=-r.o,h=4):(a.x=0,h=5);const e=n*Math.sqrt((0,r.a)(t.xmin-t.xmax)+(0,r.a)(t.ymin-t.ymax)),s=a.clone(),_=t.getCenter();if(_.scale(n),h<2&&(s.x=_.x),r.P.distance(s,_)+.5*e>r.o)return null}const o=P[h];if(null!==o&&o.getGCS().equalHorizontal(e))return o;const m=e.getText(),l=a.x,u=a.y;let p=0,c=-1;6!==h?c=_.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:((0,s.g)(false),p=0,c=_.aG.PE_PRJ_CYLINDRICAL_EQAREA);const g=(0,_.i)("EqualAreaPCS");let d;c===_.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?d=`PROJCS["${g}",${m},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${l}],PARAMETER["Latitude_of_Origin",${u}],UNIT["Meter",1.0]]`:c===_.aG.PE_PRJ_CYLINDRICAL_EQAREA?d=`PROJCS["${g}",${m},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${l}],PARAMETER["Standard_Parallel_1",${p}],PARAMETER["Latitude_of_Origin",${u}],UNIT["Meter",1.0]]`:(0,s.d)("getEqualAreaPcsFixed");const E=(0,_.b)(d);return P[h]&&P[h].destroy(),P[h]=E,E}(e,t);if(null!==n)return(0,r.l)(n,!1);const i=e.getText(),a=e.getUnit().getUnitToBaseFactor(),h=(t.xmin+t.width()/2)*a,o=(t.ymin+t.height()/2)*a;let m=0,l=0,u=-1;t.ymin*a>=75*Math.PI/180||t.ymax*a<=-60*Math.PI/180?u=_.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:t.ymin>0||t.ymax<0?(m=(t.ymin+1/3*t.height())*a,l=(t.ymin+2/3*t.height())*a,u=_.aG.PE_PRJ_ALBERS):(m=(t.ymin+2/3*t.height())*a,u=_.aG.PE_PRJ_CYLINDRICAL_EQAREA);const p=(0,_.i)("EqualAreaPCS");let c;return u===_.aG.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?c=`PROJCS["${p}",${i},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${h}],PARAMETER["Latitude_of_Origin",${o}],UNIT["Meter",1.0]]`:u===_.aG.PE_PRJ_ALBERS?c=`PROJCS["${p}",${i},PROJECTION["Albers"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${h}],PARAMETER["Standard_Parallel_1",${m}],PARAMETER["Standard_Parallel_2",${l}],PARAMETER["Latitude_of_Origin",${o}],UNIT["Meter",1.0]]`:u===_.aG.PE_PRJ_CYLINDRICAL_EQAREA?c=`PROJCS["${p}",${i},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${h}],PARAMETER["Standard_Parallel_1",${m}],PARAMETER["Latitude_of_Origin",${o}],UNIT["Meter",1.0]]`:(0,s.d)("getEqualAreaPCSInstance"),(0,r.l)((0,_.b)(c),!0)}(n,e),m=(0,_.E)(n,t,null),l=(new _.O).execute(a,m,i).calculateArea2D();return o&&t.destroy(),l}return 0}const P=[null,null,null,null,null,null,null];class f{getOperatorType(){return 10314}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n){if(0===t.getCoordinateSystemType()&&(0,s.a)(""),e.isEmpty()||e.getDimension()<2)return 0;if((0,s.c)(e),e.getGeometryType()===s.G.enumEnvelope){const s=new i.a;return s.addEnvelope(e,!1),this.execute(s,t,n)}let u=e;e.getDescription().getAttributeCount()>1&&(u=e.clone(),u.dropAllAttributes());const p=(new a.O).execute(u,0,t.getTolerance(0),0,n);let c=null;const E=t.getGCS();E!==t&&(c=(0,_.E)(t,E));let P=(new _.L).execute(p,t,!1,n);return P.isEmpty()?0:(P===e&&(P=e.clone()),t.isPannable()?function(e,t,n){const s=new h.Envelope2D;e.queryEnvelope(s);const a=(0,o.c)(t,s,!0).total(),l=t.getPannableExtent();l.xmin=s.xmin-10*a,l.xmax=s.xmax+10*a;const u=(new m.O).execute(e,l,t,n).getImpl().querySegmentIterator();u.stripAttributes();const p=(0,_.r)();t.querySpheroidData(p);const c=p.e2,d=0===c?2:1,E=new r.P(0,0),P=new r.P(0,0),f=new r.K(0),S=new g(E,P,t,c,100);for(;u.nextPath();)for(;u.hasNextSegment();){const e=u.nextSegment();E.assign(e.getStartXY()),P.assign(e.getEndXY()),S.setSegmentEndPoints(E,P);const t=(0,i.x)(6,0,1,1e-12,1e-15,S.makeFunctor());f.pe((P.x-E.x)*t)}const y=p.majorSemiAxis;return d*y*y*(1-c)*Math.PI*f.getResult()/t.getPannableExtent().width()}(P,t,n):function(e,t,n,s,i){const a=function(e,t,n){const s=e.calculateLength2D(),i=(new l.O).execute(e,t,n)/25e3,a=s/e.getSegmentCount()*2;let _=Math.min(a,s/i);return 0===_&&(_=1),(0,r.l)(_,s/_)}(e,t,i);let _=d(e,a.first,n,s,i),h=1,o=0,m=0;do{if(h++,a.first*=.5,a.first<50*t.getTolerance(0))return _;a.second*=2,m=d(e,a.first,n,s,i),o=Math.abs(m-_),_=m}while(Math.abs(_)>1&&o>1e-8*Math.abs(_)&&(a.second<65e3&&h<8||h<4));return m}(P,t,E,c,n))}}function S(){return{m_p_PCS:new r.P,m_factor:Number.NaN,setValues:y,assign:x}}function y(e,t){this.m_factor=e,this.m_p_PCS.assign(t)}function x(e){this.m_factor=e.m_factor,this.m_p_PCS.assign(e.m_p_PCS)}class A{constructor(e,t,n,s){this.m_ptStart=new o.d,this.m_ptEnd=new o.d,this.m_ptStart.assign(t),this.m_ptEnd.assign(n),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y,this.m_e=Math.sqrt(e),this.m_e2=e,this.m_c1MinusE2=1-e;const i=Math.sin(s);let a;a=0===this.m_e2?2*i:i*((0,r.y)(this.m_e*i)+1/(1-this.m_e2*i*i)),this.m_baseA=a}setSegmentEndPoints(e,t){this.m_ptStart.assign(e),this.m_ptEnd.assign(t),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y}makeFunctor(){return e=>{const t=1-e,n=t*this.m_ptStart.x+e*this.m_ptEnd.x,s=t*this.m_ptStart.y+e*this.m_ptEnd.y,i=t*this.m_ptStart.z+e*this.m_ptEnd.z,a=n*n+s*s,_=i/Math.sqrt(i*i+this.m_c1MinusE2*this.m_c1MinusE2*a);let h;return h=0===this.m_e2?2*_:_*((0,r.y)(this.m_e*_)+1/(1-this.m_e2*_*_)),(this.m_deltaY*n-this.m_deltaX*s)/a*(h-this.m_baseA)}}}function R(){return{sin_phi:Number.NaN,one_p_sin_phi:Number.NaN,one_m_sin_phi:Number.NaN,one_m_e_2_sin_2_phi:Number.NaN,sin_half_phi_pf:Number.NaN,sin_half_phi_pz:Number.NaN,sin_half_asin_e_sin_phi_pf:Number.NaN,sin_half_asin_e_sin_phi_pz:Number.NaN,atanh_sin_phi:Number.NaN,atanh_esin_phi:Number.NaN,make_negative:!1,initialize:C,changeSign:M,assign:T,clone:w}}function C(e,t,n,s){const i=.5*e;this.sin_phi=Math.sin(e);const a=t*this.sin_phi,_=.5*Math.asin(a);this.one_p_sin_phi=1+this.sin_phi,this.one_m_sin_phi=1-this.sin_phi,this.one_m_e_2_sin_2_phi=(1+a)*(1-a),this.sin_half_phi_pf=Math.sin(i+n),this.sin_half_phi_pz=Math.sin(i+s),this.sin_half_asin_e_sin_phi_pf=Math.sin(_+n),this.sin_half_asin_e_sin_phi_pz=Math.sin(_+s),this.atanh_sin_phi=Math.log(this.sin_half_phi_pf/this.sin_half_phi_pz),this.atanh_esin_phi=Math.log(this.sin_half_asin_e_sin_phi_pf/this.sin_half_asin_e_sin_phi_pz)}function M(){this.sin_phi=-this.sin_phi;let e=this.one_p_sin_phi;this.one_p_sin_phi=this.one_m_sin_phi,this.one_m_sin_phi=e,e=this.sin_half_phi_pf,this.sin_half_phi_pf=this.sin_half_phi_pz,this.sin_half_phi_pz=e,e=this.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pf=this.sin_half_asin_e_sin_phi_pz,this.sin_half_asin_e_sin_phi_pz=e,this.atanh_sin_phi=-this.atanh_sin_phi,this.atanh_esin_phi=-this.atanh_esin_phi}function T(e){this.sin_phi=e.sin_phi,this.one_p_sin_phi=e.one_p_sin_phi,this.one_m_sin_phi=e.one_m_sin_phi,this.one_m_e_2_sin_2_phi=e.one_m_e_2_sin_2_phi,this.sin_half_phi_pf=e.sin_half_phi_pf,this.sin_half_phi_pz=e.sin_half_phi_pz,this.sin_half_asin_e_sin_phi_pf=e.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pz=e.sin_half_asin_e_sin_phi_pz,this.atanh_sin_phi=e.atanh_sin_phi,this.atanh_esin_phi=e.atanh_esin_phi,this.make_negative=e.make_negative}function w(){return{...this}}class N{constructor(e,t,n){this.m_transformPCS2GCS=null,this.m_scaleToRadians=new p.T,this.m_scaleToDegrees=new p.T,this.m_progressTracker=n,(0,s.g)(4!==t),this.m_curveType=t,this.m_inputSR=e,e&&0!==e.getCoordinateSystemType()||(0,s.a)(""),this.m_inputGCS=e.getGCS(),this.m_a=0,this.m_eSquared=0,this.m_b=0,this.m_rpu=0}executePolygonGeodeticArea(e){let t,n=e.clone();if(n.dropAllAttributes(),e.hasNonLinearSegments()&&(n=(new a.O).execute(n,0,this.m_inputSR.getTolerance(0),0,this.m_progressTracker)),this.m_inputSR.isPannable()){const e=new h.Envelope2D;n.queryEnvelope(e);const t=this.m_inputSR.getPannableExtent();if(!t.containsEnvelope(e)){const s=t.getCenterX()-e.getCenterX(),i=new p.T;i.setShiftCoords(s,0),n.applyTransformation(i),e.move(s,0);const a=new r.E;t.queryIntervalX(a);const h=new r.E;e.queryIntervalX(h),n=a.contains(h)?(0,_.a7)(n,this.m_inputSR):(new _.O).foldInto360RangeGeodetic(n,this.m_inputSR,this.m_curveType)}}if(this.m_transformPCS2GCS?(n=(new _.L).execute(n,this.m_inputSR,!1,this.m_progressTracker),t=n.createInstance(),(0,_.a9)(this.m_transformPCS2GCS,n,t,this.m_progressTracker)||(t=(new _.O).execute(n,this.m_transformPCS2GCS,this.m_progressTracker))):t=(new _.L).execute(n,this.m_inputGCS,!1,this.m_progressTracker),t.isEmpty())return 0;if(1===this.m_curveType){const e=(0,_.r)();return this.m_inputGCS.querySpheroidData(e),this.m_a=e.majorSemiAxis,this.m_eSquared=e.e2,this.loxodromeArea(t)}const s=t.getImpl();this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_scaleToRadians.setScale(this.m_rpu),s.applyTransformation(this.m_scaleToRadians),this.m_scaleToDegrees=this.m_scaleToRadians,this.m_scaleToDegrees.invertThis();const i=(0,_.r)();if(this.m_inputGCS.querySpheroidData(i),this.m_a=i.majorSemiAxis,this.m_b=i.minorSemiAxis,this.m_eSquared=i.e2,2===this.m_curveType)return this.executeClippedPolygonGreatEllipticArea(t);{const e={stack:[],error:void 0,hasError:!1};try{const n=_.aY.unit(9101),s=this.m_inputGCS.getPECoordSys(),i=(0,u.mS)(e,s.cloneAlterUnits(n),!1);let a,r,h=this.executeClippedPolygonGeodeticArea(t,i,0),o=0;do{o++,a=this.executeClippedPolygonGeodeticArea(t,i,o),r=Math.abs(a-h),h=a}while(Math.abs(a)>1&&r>1e-8*Math.abs(a)&&o<7);return a}catch(t){e.error=t,e.hasError=!0}finally{(0,u.hk)(e)}}}executeClippedPolygonGeodeticArea(e,t,n){const s={stack:[],error:void 0,hasError:!1};try{const i=new h.Envelope2D;e.queryEnvelope(i);const a=(0,u.mS)(s,this.getEqualAreaPCSInstance(t,i),!1),o=e.clone();(0,_.aZ)(a,o);const m=50,l=o.getImpl().getAttributeStreamRef(0),p=e.getImpl().getAttributeStreamRef(0),c=(0,u.mS)(s,new _.aa,!1),g=(0,u.mS)(s,new _.aa,!1),d=40,E=[0,0],P=(0,r.k)(S,d),f=(0,r.d)(d,-1),y=S(),x=S();let A,R;const C=a;let M=o.calculateArea2D();const T=new r.K(0),w=.5*Math.PI,N=1e-10*Math.abs(M)+1e-6,b=e.getPathCount();let q,v,I,G;const L=new r.P,z=new r.P,D=new r.P,k=new r.P,O=new r.P,$=new r.P;let F,Y;for(v=e.getPathStart(0),q=0;q<b;q++,v=I)for(I=e.getPathEnd(q),l.queryPoint2D(I-1<<1,D),p.queryPoint2D(I-1<<1,L),Math.abs(L.y)>w&&(L.y=(0,r.f)(w,L.y)),G=v;G<I;G++,D.assign(k),L.assign(z)){if(l.queryPoint2D(G<<1,k),p.queryPoint2D(G<<1,z),Math.abs(z.y)>w&&(z.y=(0,r.f)(w,z.y)),F=r.P.distance(D,k),F<m||0===L.y&&0===z.y)continue;_.ab.geodeticDistance(this.m_a,this.m_eSquared,L.x,L.y,z.x,z.y,c,g,null,this.m_curveType);const e=c.val,t=g.val;for(y.setValues(0,D),x.setValues(1,k),R=n,P[0].assign(x),f[0]=n,A=0;A>=0;){Y=.5*(y.m_factor+x.m_factor),_.ab.geodeticCoordinate(this.m_a,this.m_eSquared,L.x,L.y,e*Y,t,c,g,this.m_curveType),O.x=c.val,O.y=g.val,E[0]=O.x,E[1]=O.y,_.ac.geogToProj(C,1,E),$.x=E[0],$.y=E[1];const n=.5*-$.offset(y.m_p_PCS,x.m_p_PCS)*r.P.distance(y.m_p_PCS,x.m_p_PCS);if(T.pe(n),Math.abs(n)>N||Math.abs(n)>0&&R>0)x.setValues(Y,$),A++,P[A].assign(x),Math.abs(n)<=N?(R--,f[A-1]=R,f[A]=R):(R=f[A-1],f[A]=R);else{if(A<=0)break;y.assign(x),A--,x.assign(P[A]),R=f[A]}}}return M+=T.getResult(),Math.abs(M)}catch(e){s.error=e,s.hasError=!0}finally{(0,u.hk)(s)}}executeClippedPolygonGreatEllipticArea(e){const t=[],n=[],s=new r.P,i=new r.P,a=(0,_.ad)(1,this.m_eSquared,new r.P(0,.5*Math.PI)),m=new r.K(0),l=new r.K(0),u=new r.K(0),p=new o.d,c=new o.d,g=new h.Envelope2D;e.queryLooseEnvelope(g);let d=0;g.containsCoords(g.xmin,0)||(d=Math.abs(g.ymin)<Math.abs(g.ymax)?g.ymin:g.ymax);const E=new A(this.m_eSquared,p,c,d),P=this.m_a*this.m_a,f=e.getImpl().querySegmentIterator();for(f.stripAttributes();f.nextPath();)for(;f.hasNextSegment();){const e=f.nextSegment();s.assign(e.getStartXY()),i.assign(e.getEndXY()),i.x-s.x>Math.PI?s.x+=2*Math.PI:i.x-s.x<-Math.PI&&(i.x+=2*Math.PI),this.splitSegmentCrossingItegralThreshold(e,t,n);for(let e of t)p.assign((0,_.ad)(this.m_a,this.m_eSquared,e.getStartXY())),c.assign((0,_.ad)(this.m_a,this.m_eSquared,e.getEndXY())),E.setSegmentEndPoints(p,c),this.adaptiveIntegrationWithRomberg(E,m);for(let e of n){let t=e.getStartXY(),n=e.getEndXY(),s=d;t.y<0&&(n=(0,r.c)(t,t=n),t.y=-t.y,n.y=-n.y,s=-s);const i=(0,_.ad)(1,this.m_eSquared,t),h=(0,_.ad)(1,this.m_eSquared,n),m=Math.min(t.y,n.y),p=(0,_.a_)(this.m_eSquared,t.x,n.x,s,m);l.pe(p);const c=Math.abs((0,_.a_)(this.m_eSquared,t.x,n.x,m,r.o)),g=new o.d;g.setSub(i,a);const E=new o.d;E.setSub(h,a);const f=new o.d;f.setCrossProductVector(g,E);let S=P*(c-.5*f.length());S=(0,r.f)(S,n.x-t.x),u.pe(S)}t.length=0,n.length=0}return u.getResult()+P*(.5*(1-this.m_eSquared)*m.getResult()+l.getResult())}getEqualAreaPCSInstance(e,t){const n=t.getCenterX();let s,i;const a=t.height();let h,o;(h=t.ymin>45*Math.PI/180||t.ymax<45*-Math.PI/180)?s=(0,r.f)(.5*Math.PI,t.getCenterY()):(s=t.getCenterY(),i=t.ymin+a*(2/3));const m=(0,_.i)("EqualAreaPCS"),l=e.toString();return o=h?_.aY.fromString(_.aG.PE_TYPE_PROJCS,`PROJCS["${m}", ${l}, PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing", 0],PARAMETER["Central_Meridian", ${n}], PARAMETER["Latitude_of_Origin", ${s}], UNIT["Meter",1.0]]`):_.aY.fromString(_.aG.PE_TYPE_PROJCS,`PROJCS["${m}", ${l}, PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting", 0],PARAMETER["False_Northing", 0],PARAMETER["Central_Meridian", ${n}],PARAMETER["Standard_Parallel_1", ${i}],PARAMETER["Latitude_of_Origin", ${s}],UNIT["Meter",1.0]]`),o}splitSegmentCrossingItegralThreshold(e,t,n){const s=100,a=400,h=(0,_.ad)(this.m_a,this.m_eSquared,new r.P(0,r.o)),m=(0,_.ad)(this.m_a,this.m_eSquared,new r.P(0,-r.o)),l=this.splitSegmentPassingThroughPole(e);for(let e of l){const l=e.getStartXY(),u=e.getEndXY(),p=(0,_.ad)(this.m_a,this.m_eSquared,l),c=(0,_.ad)(this.m_a,this.m_eSquared,u),g=new r.P,d=new o.d;let E=o.d.sqrDistance(h,p),P=o.d.sqrDistance(p,c);if(E<=s){if(!(P>a)){n.push(new i.L({start:l,end:u}));continue}d.assign(c.sub(p)),d.normalizeThis(),d.assign(p.add(d.mul(20))),g.assign((0,_.ak)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:l,end:g})),l.assign(g)}if(p.assign((0,_.ad)(this.m_a,this.m_eSquared,l)),E=o.d.sqrDistance(h,c),P=o.d.sqrDistance(p,c),E<=s){if(!(P>a)){n.push(new i.L({start:l,end:u}));continue}d.assign(c.sub(p)),d.normalizeThis(),d.assign(c.sub(d.mul(20))),g.assign((0,_.ak)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:g,end:u})),u.assign(g)}if(p.assign((0,_.ad)(this.m_a,this.m_eSquared,l)),c.assign((0,_.ad)(this.m_a,this.m_eSquared,u)),E=o.d.sqrDistance(m,p),P=o.d.sqrDistance(p,c),E<=s){if(!(P>a)){n.push(new i.L({start:l,end:u}));continue}d.assign(c.sub(p)),d.normalizeThis(),d.assign(p.add(d.mul(20))),g.assign((0,_.ak)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:l,end:g})),l.assign(g)}if(p.assign((0,_.ad)(this.m_a,this.m_eSquared,l)),c.assign((0,_.ad)(this.m_a,this.m_eSquared,u)),E=o.d.sqrDistance(m,c),P=o.d.sqrDistance(p,c),E<=s){if(!(P>a)){n.push(new i.L({start:l,end:u}));continue}d.assign(c.sub(p)),d.normalizeThis(),d.assign(c.sub(d.mul(20))),g.assign((0,_.ak)(this.m_a,this.m_eSquared,d)),n.push(new i.L({start:g,end:u})),u.assign(g)}t.push(new i.L({start:l,end:u}))}}splitSegmentPassingThroughPole(e){const t={stack:[],error:void 0,hasError:!1};try{const n=[],s=new o.d,a=new o.d,h=new o.d,m=new r.P,l=20,p=3.124139361,g=10,d=e.getStartXY(),E=e.getEndXY(),P=(0,u.mS)(t,new _.aa,!1);if(_.ab.geodeticDistance(this.m_a,this.m_eSquared,d.x,d.y,E.x,E.y,P,null,null,2),Math.abs(E.x-d.x)>p&&P.val>l){const e=new c.a(new r.P(0,90),d.divide(this.m_rpu),E.divide(this.m_rpu),this.m_inputGCS,2,2);let t=(0,_.ag)(e.makeFunctor(),0,1,1e-10);if(t.second<=g&&t.first>0&&t.first<1)return s.assign((0,_.ad)(this.m_a,this.m_eSquared,d)),a.assign((0,_.ad)(this.m_a,this.m_eSquared,E)),(0,r.x)(s,a,t.first,h),m.assign((0,_.ak)(this.m_a,this.m_eSquared,h)),n.push(new i.L({start:d,end:m})),n.push(new i.L({start:m,end:E})),n;if(e.setPointDistFrom(new r.P(0,-90)),t=(0,_.ag)(e.makeFunctor(),0,1,1e-10),t.second<=g&&t.first>0&&t.first<1)return s.assign((0,_.ad)(this.m_a,this.m_eSquared,d)),a.assign((0,_.ad)(this.m_a,this.m_eSquared,E)),(0,r.x)(s,a,t.first,h),m.assign((0,_.ak)(this.m_a,this.m_eSquared,h)),n.push(new i.L({start:d,end:m})),n.push(new i.L({start:m,end:E})),n}return n.push(new i.L({start:d,end:E})),n}catch(e){t.error=e,t.hasError=!0}finally{(0,u.hk)(t)}}adaptiveIntegrationWithRomberg(e,t){const n=e.makeFunctor();let s=0,a=1,_=n(s),r=n(a);const h=1e-17,o=1e-14;let m=(s+a)/2,l=n(m),u=Math.abs(l-_),p=Math.abs(r-l),c=0;for(;c++<32&&(u/p<.1||p/u<.1);)u<p?(t.pe((0,i.x)(5,s,m,o,h,n)),s=m,_=l):(t.pe((0,i.x)(5,m,a,o,h,n)),a=m,r=l),m=(s+a)/2,l=Math.abs(n(m)),u=Math.abs(l-_),p=Math.abs(r-l);t.pe((0,i.x)(5,s,a,o,h,n))}loxodromeAreaHemi(e,t,n,s,i){const a=n.clone(),_=i.clone();let h,o,m,l,u,p,c,g,d,E,P,f,S,y,x,A;return a.make_negative&&a.changeSign(),_.make_negative&&_.changeSign(),P=s-t,1===Math.abs(a.sin_phi)||1===Math.abs(_.sin_phi)?e.half_qp*P:a.sin_phi===_.sin_phi?(E=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+(0,r.y)(e.e*a.sin_phi))*P,E):(x=Math.log(_.sin_half_phi_pf*a.sin_half_phi_pz/(_.sin_half_phi_pz*a.sin_half_phi_pf)),A=Math.log(_.sin_half_asin_e_sin_phi_pf*a.sin_half_asin_e_sin_phi_pz/(_.sin_half_asin_e_sin_phi_pz*a.sin_half_asin_e_sin_phi_pf)),1===this.m_eSquared?(u=0,h=.5*(x+_.sin_phi/_.one_m_e_2_sin_2_phi-a.sin_phi/a.one_m_e_2_sin_2_phi),o=0):(u=-2*e.atanh_e_over_e*(Math.log(_.one_p_sin_phi/a.one_p_sin_phi)-e.e*A),h=(x-e.e*A)/e.one_m_e_2,o=(Math.log(_.one_m_e_2_sin_2_phi/a.one_m_e_2_sin_2_phi)+u/e.atanh_e_over_e)/e.one_m_e_2),m=-A*(a.atanh_esin_phi+_.atanh_esin_phi),l=1/a.one_m_e_2_sin_2_phi-1/_.one_m_e_2_sin_2_phi,p=(0,r.z)(_.one_m_sin_phi/e.one_p_e,e.e)-(0,r.z)(a.one_m_sin_phi/e.one_p_e,e.e),c=(0,r.z)(_.one_p_sin_phi/e.one_p_e,e.e)-(0,r.z)(a.one_p_sin_phi/e.one_p_e,e.e),g=(0,r.z)(a.one_m_sin_phi/-e.one_m_e,e.e)-(0,r.z)(_.one_m_sin_phi/-e.one_m_e,e.e),d=(0,r.z)(a.one_p_sin_phi/-e.one_m_e,e.e)-(0,r.z)(_.one_p_sin_phi/-e.one_m_e,e.e),E=.25/h*(o+m+l+u+.5*(p+c+g+d)),E+=e.half_qp,f=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+(0,r.y)(e.e*a.sin_phi)),S=.5*e.one_m_e_2*_.sin_phi*(1/_.one_m_e_2_sin_2_phi+(0,r.y)(e.e*_.sin_phi)),S<f&&(y=f,f=S,S=y),E<f&&(E=f),E>S&&(E=S),E*=P,E)}loxodromeArea(e){const t=Math.PI/180;let n=0;const s={e:Number.NaN,one_p_e:Number.NaN,one_m_e:Number.NaN,one_m_e_2:Number.NaN,atanh_e_over_e:Number.NaN,half_qp:Number.NaN,f:Number.NaN,z:Number.NaN},i=R(),a=R();s.e=Math.sqrt(this.m_eSquared),s.one_p_e=1+s.e,s.one_m_e=1-s.e,s.one_m_e_2=1-this.m_eSquared,s.atanh_e_over_e=(0,r.y)(s.e),this.m_eSquared>=1?s.half_qp=1:s.half_qp=.5*(1+s.atanh_e_over_e*s.one_m_e_2),s.f=.25*Math.PI,s.z=.75*Math.PI,a.initialize(0,s.e,s.f,s.z);const _=e.getPathCount(),h=new r.P,o=new r.P,m=e.getImpl().getAttributeStreamRef(0);for(let r=0;r<_;r++){const _=e.getPathStart(r),l=e.getPathEnd(r);if(!(l-_<=1)){m.queryPoint2D(2*(l-1),h);for(let e=_;e<l;e++){m.queryPoint2D(2*e,o);const r=h.y*t,l=o.y*t;if(e===_?(i.initialize(r,s.e,s.f,s.z),i.make_negative=!1):i.assign(a),a.initialize(l,s.e,s.f,s.z),a.make_negative=!1,h.y*o.y<0){if(h.y>=90&&o.y<=-90||o.y>=90&&h.y<=-90)return Number.NaN;const e=R();e.initialize(0,s.e,s.f,s.z),e.make_negative=!1;const _=i.atanh_sin_phi-s.e*i.atanh_esin_phi,m=a.atanh_sin_phi-s.e*a.atanh_esin_phi,l=(m*h.x-_*o.x)/(m-_);r<0?(i.make_negative=!0,n-=this.loxodromeAreaHemi(s,h.x*t,i,l*t,e),i.make_negative=!1,n+=this.loxodromeAreaHemi(s,l*t,e,o.x*t,a)):(n+=this.loxodromeAreaHemi(s,h.x*t,i,l*t,e),a.make_negative=!0,n-=this.loxodromeAreaHemi(s,l*t,e,o.x*t,a),a.make_negative=!1)}else h.y>=0?n+=this.loxodromeAreaHemi(s,h.x*t,i,o.x*t,a):(i.make_negative=!0,a.make_negative=!0,n-=this.loxodromeAreaHemi(s,h.x*t,i,o.x*t,a),i.make_negative=!1,a.make_negative=!1);h.assign(o)}}}return this.m_a*n*this.m_a}calculate(e){if(e.isEmpty()||e.getDimension()<2)return 0;if(e.getGeometryType()===s.G.enumEnvelope){const t=new i.a;return t.addEnvelope(e,!1),this.calculate(t)}return this.m_inputSR!==this.m_inputGCS&&null===this.m_transformPCS2GCS&&(this.m_transformPCS2GCS=(0,_.E)(this.m_inputSR,this.m_inputGCS,null)),this.executePolygonGeodeticArea(e)}}class b{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,i){return(0,s.c)(e),4===n?(new f).execute(e,t,i):new N(t,n,i).calculate(e)}}},47591:(e,t,n)=>{n.d(t,{O:()=>g});var s=n(55537),i=n(39117),a=n(88885),_=n(83661),r=n(95213),h=n(79187),o=n(5247),m=n(31139);function l(){return{m_pGcs:new _.P,m_xyz:new r.d,m_factor:Number.NaN,m_geoLength:Number.NaN,setValues:u,setLength:p,assign:c}}function u(e,t,n,s){this.m_factor=e,this.m_pGcs.assign(t),this.m_xyz.assign(s),this.m_geoLength=n}function p(e){this.m_geoLength=e}function c(e){this.m_pGcs.assign(e.m_pGcs),this.m_xyz.assign(e.m_xyz),this.m_factor=e.m_factor,this.m_geoLength=e.m_geoLength}class g{getOperatorType(){return 10315}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}_ExecuteShapePreservingLength(e,t,n,s,a){if(e.hasNonLinearSegments()&&(e=(new o.O).execute(e,0,t.getTolerance(0),0,a)),t.isPannable()){let s=90,_=-90;if(1===n.getUnit().getUnitToBaseFactor()&&(s*=Math.PI/180,_*=Math.PI/180),2===t.getCoordinateSystemType()){let e=null;const n=[0,0,0,0];e=t.getPECoordSys(),n[0]=0,n[1]=s,n[2]=0,n[3]=_,i.ac.geogToProj(e,2,n),s=n[1],_=n[3]}const r=new h.Envelope2D;e.queryEnvelope(r),r.ymin=_,r.ymax=s,e=(new m.O).execute(e,r,t,a)}else{const n=t.getPCSHorizon();if((e=(new i.Q).execute(e,n,t,a))===n){const t=e.clone();e=t}}return e.isEmpty()?0:this._ExecuteIterativeApproach(e,t,n,s,1,a)}_ExecuteIterativeApproach(e,t,n,a,h,o){const m=(0,i.r)();n.querySpheroidData(m);const u=m.majorSemiAxis,p=m.e2,c=n.getUnit().getUnitToBaseFactor(),g=(0,_.k)(l,40),P=(0,_.d)(40,Number.NaN),f=l(),S=l();let y;const x=[0,0,0,0],A=t.getPECoordSys(),R=new _.P,C=new _.P,M=new _.P,T=new _.P,w=new _.P;let N=0;const b=e.querySegmentIterator();for(;b.nextPath();)for(;b.hasNextSegment();){const e=b.nextSegment();R.assign(e.getStartXY()),C.assign(e.getEndXY()),2===t.getCoordinateSystemType()?(x[0]=R.x,x[1]=R.y,x[2]=C.x,x[3]=C.y,i.ac.projToGeog(A,2,x),M.x=x[0]*c,M.y=x[1]*c,T.x=x[2]*c,T.y=x[3]*c):(M.setCoordsPoint2D(R),T.setCoordsPoint2D(C),M.scale(c),T.scale(c));const n=new r.d,a=new r.d;d(u,p,M,n),d(u,p,T,a);let _=E(u,n,a);f.setValues(0,M,Number.NaN,n),S.setValues(1,T,_,a),y=h,g[0].assign(S),P[0]=h;let o=0;for(;;){o>128&&(0,s.d)("iterations exceeded");const n=.5*(f.m_factor+S.m_factor),a=e.getCoord2D(n);2===t.getCoordinateSystemType()?(x[0]=a.x,x[1]=a.y,i.ac.projToGeog(A,1,x),w.x=x[0]*c,w.y=x[1]*c):(w.setCoordsPoint2D(a),w.scale(c)),M.setCoordsPoint2D(f.m_pGcs),T.setCoordsPoint2D(S.m_pGcs);const m=new r.d;d(u,p,w,m);const l=E(u,f.m_xyz,m),R=E(u,S.m_xyz,m);_=S.m_geoLength,Number.isNaN(_)&&(_=E(u,f.m_xyz,S.m_xyz));const C=l+R,b=y===h&&C>=20&&Math.abs(C-_)>1e-8*(_+C);if(o+2<40&&(b||Math.abs(C-_)>0&&y>0))S.setLength(R),g[o].assign(S),S.setValues(n,w,l,m),g[++o].assign(S),b?(y=h,P[o]=h):(y--,P[o-1]=y,P[o]=y);else{if(N+=C,0===o)break;f.assign(S),S.assign(g[--o]),y=P[o]}}}return N}execute(e,t,n){if(t&&0!==t.getCoordinateSystemType()||(0,s.a)(""),e.isEmpty()||e.getDimension()<1)return 0;let _=null;const r=t.getGCS();r!==t&&(_=(0,i.E)(t,r,null));const h=e.getGeometryType();if(h===s.G.enumEnvelope){const s=new a.a;return s.addEnvelope(e,!1),this._ExecuteShapePreservingLength(s,t,r,_,n)}if((0,s.f)(h)){const s=new a.P;return s.addSegment(e,!0),this._ExecuteShapePreservingLength(s,t,r,_,n)}return this._ExecuteShapePreservingLength(e,t,r,_,n)}}function d(e,t,n,s){s.assign((0,i.ad)(e,t,n))}function E(e,t,n){const s=e,i=new r.d;i.setSub(t,n);const a=i.length();return 2*s*Math.asin(a/(2*s))}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2657,3169,8125],{15546:(e,t,n)=>{n.d(t,{a:()=>s,c:()=>o});var r=n(55537),a=n(83661);function o(e,t){if(!e.isEmpty())switch(e.getGeometryType()){case r.G.enumPolygon:return u(e);case r.G.enumPolyline:return m(e.getImpl());case r.G.enumLine:case r.G.enumBezier:case r.G.enumEllipticArc:return function(e){const t=e.calculateLength2D();return 0===t?e.getStartXY():e.calculateWeightedCentroid2D().mul(1/t)}(e);case r.G.enumMultiPoint:return function(e){const t=new a.K(0),n=new a.K(0),r=e.getImpl(),o=r.getAttributeStreamRef(0),s=r.getPointCount(),u=new a.P;for(let e=0;e<s;e++)o.queryPoint2D(2*e,u),t.add(u.x),n.add(u.y);const c=new a.P;return c.setCoords(t.getResult(),n.getResult()),c.divThis(s)}(e);case r.G.enumEnvelope:return e.getCenterXY();case r.G.enumPoint:return e.getXY();default:return a.P.construct(Number.NaN,Number.NaN)}return a.P.construct(Number.NaN,Number.NaN)}function s(e,t){return u(e,t)}function u(e,t=-1){const n=new a.K(0),r=new a.K(0),o=e.getImpl();let s;const u=o.hasNonLinearSegments();let m;const g=o.getXY(0);if(-1===t){if(m=o.calculateArea2D(),0===m)return l(e);u&&(s=o.querySegmentIterator());for(let e=0,t=o.getPathCount();e<t;e++)c(g,o,e,n,r),u&&i(g,s,n,r)}else{if(m=o.calculateRingArea2D(t),0===m)return l(e,t);u&&(s=o.querySegmentIterator(),s.resetToPath(t)),c(g,o,t,n,r),u&&i(g,s,n,r)}const h=new a.P,f=new a.P;return h.setCoords(n.getResult(),r.getResult()),f.assign(h.mul(1/m).add(g)),f}function c(e,t,n,r,o){const s=t.getPathStart(n),u=t.getPathEnd(n);if(u-s<3)return;const c=t.getAttributeStreamRef(0),i=c.readPoint2D(2*s),l=c.readPoint2D(2*(s+1));l.subThis(i);const m=new a.K(0),g=t.hasNonLinearSegments(),h=1/3,f=new a.P;for(let e=s+2;e<u;e++){c.queryPoint2D(2*e,f),f.subThis(i);const t=.5*f.crossProduct(l);g&&m.add(t);const n=h*t;r.add((l.x+f.x)*n),o.add((l.y+f.y)*n),l.setCoordsPoint2D(f)}const d=g?m.getResult():t.calculateRingArea2D(n),y=i.sub(e).mul(d);r.add(y.x),o.add(y.y)}function i(e,t,n,a){let o;for(t.nextPath()||(0,r.d)("centroid");null!==(o=t.nextCurve());){const t=o.calculateWeightedAreaCentroid2D(e);n.add(t.x),a.add(t.y)}}function l(e,t=-1){return m(e.getImpl(),t)}function m(e,t=-1){const n=-1===t?e.calculateLength2D():e.calculatePathLength2D(t);if(0===n)return function(e,t=-1){if(-1!==t)return e.getXY(e.getPathStart(t));const n=new a.K(0),r=new a.K(0);for(let t=0;t<e.getPathCount();++t){const a=e.getXY(e.getPathStart(t));n.add(a.x),r.add(a.y)}return a.P.construct(n.getResult(),r.getResult()).mul(1/e.getPathCount())}(e,t);const r=new a.K(0),o=new a.K(0),s=e.querySegmentIterator();for(-1!==t&&s.resetToPath(t);s.nextPath();){const n=s.getPathIndex(),a=e.getXY(e.getPathStart(n));for(;s.hasNextSegment();){const e=s.nextSegment(),t=e.calculateLength2D();if(0===t)continue;const n=e.calculateWeightedCentroid2D().sub(a.mul(t));r.add(n.x),o.add(n.y)}const u=a.mul(e.calculatePathLength2D(n));if(r.add(u.x),o.add(u.y),-1!==t)break}const u=new a.P;return u.setCoords(r.getResult(),o.getResult()),u.mul(1/n)}},17077:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,supportsCurves:()=>r.s});var r=n(48265);n(78125)},48265:(e,t,n)=>{n.d(t,{c:()=>c,e:()=>s,s:()=>u});var r=n(15546),a=n(78125);const o=new class{getOperatorType(){return 10205}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t){return(0,r.c)(e)}};function s(e){const t=o.execute((0,a.fromGeometry)(e),null);return(0,a.toPoint)(t,(0,a.getSpatialReference)(e))}const u=o.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:u},Symbol.toStringTag,{value:"Module"}))},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>a});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class a extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const 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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>x,fromGeometry:()=>P,fromMultipoint:()=>C,fromPoint:()=>G,fromPolygon:()=>w,fromPolyline:()=>R,fromSpatialReference:()=>v,getSpatialReference:()=>p,toExtent:()=>S,toGeometry:()=>M,toMultipoint:()=>V,toPoint:()=>D,toPolygon:()=>N,toPolyline:()=>b});var r=n(83661),a=(n(79187),n(55537)),o=n(95213),s=n(88885),u=n(39117),c=n(5443),i=n(48526),l=n(86738),m=n(39829),g=n(82799),h=(n(90293),n(83299));const f="_gxVersion",d=2,y=1;function p(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function P(e){switch(e.type){case"point":return G(e);case"multipoint":return C(e);case"polyline":return R(e);case"polygon":return w(e);case"extent":return x(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(f)){const t=new o.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(d,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function C(e){if(!e.getCacheValue(f)){const t=new s.M,n=new o.P,r=e.points,a=e.hasM,u=e.hasZ,c=u?3:2;for(let e=0,o=r.length;e<o;e++){const o=r[e];n.setXYCoords(o[0],o[1]),u&&n.setZ(o[2]??0),a&&n.setM(o[c]??NaN),t.add(n)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function G(e){if(!e.getCacheValue(f)){const t=new o.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,o=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(f,o)}return e.getCacheValue(f)}function R(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,o=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(f,o)}return e.getCacheValue(f)}function v(e){if(e.wkid)return(0,u.n)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.o)(t):null}function M(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return D(e,t);case a.G.enumEnvelope:return S(e,t);case a.G.enumMultiPoint:return V(e,t);case a.G.enumPolyline:return b(e,t);case a.G.enumPolygon:return N(e,t)}return null}function S(e,t){if(e.isEmpty())return null;const n=new c.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(d,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(y,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(f,e),n}function V(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),s=[],u=new o.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];a&&n.push(u.getZ()),r&&n.push(u.getM()),s.push(n)}const c=new i.A({hasM:r,hasZ:a,points:s,spatialReference:t});return c.setCacheValue(f,e),c}function D(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(f,e),n}function N(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(f,e),n}function b(e,t){if(e.isEmpty())return null;const n=g.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(f,e),n}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2657,3169,8125],{15546:(e,t,n)=>{n.d(t,{a:()=>s,c:()=>o});var r=n(55537),a=n(83661);function o(e,t){if(!e.isEmpty())switch(e.getGeometryType()){case r.G.enumPolygon:return u(e);case r.G.enumPolyline:return m(e.getImpl());case r.G.enumLine:case r.G.enumBezier:case r.G.enumEllipticArc:return function(e){const t=e.calculateLength2D();return 0===t?e.getStartXY():e.calculateWeightedCentroid2D().mul(1/t)}(e);case r.G.enumMultiPoint:return function(e){const t=new a.K(0),n=new a.K(0),r=e.getImpl(),o=r.getAttributeStreamRef(0),s=r.getPointCount(),u=new a.P;for(let e=0;e<s;e++)o.queryPoint2D(2*e,u),t.add(u.x),n.add(u.y);const c=new a.P;return c.setCoords(t.getResult(),n.getResult()),c.divThis(s)}(e);case r.G.enumEnvelope:return e.getCenterXY();case r.G.enumPoint:return e.getXY();default:return a.P.construct(Number.NaN,Number.NaN)}return a.P.construct(Number.NaN,Number.NaN)}function s(e,t){return u(e,t)}function u(e,t=-1){const n=new a.K(0),r=new a.K(0),o=e.getImpl();let s;const u=o.hasNonLinearSegments();let m;const g=o.getXY(0);if(-1===t){if(m=o.calculateArea2D(),0===m)return l(e);u&&(s=o.querySegmentIterator());for(let e=0,t=o.getPathCount();e<t;e++)c(g,o,e,n,r),u&&i(g,s,n,r)}else{if(m=o.calculateRingArea2D(t),0===m)return l(e,t);u&&(s=o.querySegmentIterator(),s.resetToPath(t)),c(g,o,t,n,r),u&&i(g,s,n,r)}const h=new a.P,f=new a.P;return h.setCoords(n.getResult(),r.getResult()),f.assign(h.mul(1/m).add(g)),f}function c(e,t,n,r,o){const s=t.getPathStart(n),u=t.getPathEnd(n);if(u-s<3)return;const c=t.getAttributeStreamRef(0),i=c.readPoint2D(2*s),l=c.readPoint2D(2*(s+1));l.subThis(i);const m=new a.K(0),g=t.hasNonLinearSegments(),h=1/3,f=new a.P;for(let e=s+2;e<u;e++){c.queryPoint2D(2*e,f),f.subThis(i);const t=.5*f.crossProduct(l);g&&m.add(t);const n=h*t;r.add((l.x+f.x)*n),o.add((l.y+f.y)*n),l.setCoordsPoint2D(f)}const d=g?m.getResult():t.calculateRingArea2D(n),y=i.sub(e).mul(d);r.add(y.x),o.add(y.y)}function i(e,t,n,a){let o;for(t.nextPath()||(0,r.d)("centroid");null!==(o=t.nextCurve());){const t=o.calculateWeightedAreaCentroid2D(e);n.add(t.x),a.add(t.y)}}function l(e,t=-1){return m(e.getImpl(),t)}function m(e,t=-1){const n=-1===t?e.calculateLength2D():e.calculatePathLength2D(t);if(0===n)return function(e,t=-1){if(-1!==t)return e.getXY(e.getPathStart(t));const n=new a.K(0),r=new a.K(0);for(let t=0;t<e.getPathCount();++t){const a=e.getXY(e.getPathStart(t));n.add(a.x),r.add(a.y)}return a.P.construct(n.getResult(),r.getResult()).mul(1/e.getPathCount())}(e,t);const r=new a.K(0),o=new a.K(0),s=e.querySegmentIterator();for(-1!==t&&s.resetToPath(t);s.nextPath();){const n=s.getPathIndex(),a=e.getXY(e.getPathStart(n));for(;s.hasNextSegment();){const e=s.nextSegment(),t=e.calculateLength2D();if(0===t)continue;const n=e.calculateWeightedCentroid2D().sub(a.mul(t));r.add(n.x),o.add(n.y)}const u=a.mul(e.calculatePathLength2D(n));if(r.add(u.x),o.add(u.y),-1!==t)break}const u=new a.P;return u.setCoords(r.getResult(),o.getResult()),u.mul(1/n)}},17077:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,supportsCurves:()=>r.s});var r=n(48265);n(78125)},48265:(e,t,n)=>{n.d(t,{c:()=>c,e:()=>s,s:()=>u});var r=n(15546),a=n(78125);const o=new class{getOperatorType(){return 10205}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t){return(0,r.c)(e)}};function s(e){const t=o.execute((0,a.fromGeometry)(e),null);return(0,a.toPoint)(t,(0,a.getSpatialReference)(e))}const u=o.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:u},Symbol.toStringTag,{value:"Module"}))},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>a});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class a extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const 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}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>x,fromGeometry:()=>P,fromMultipoint:()=>C,fromPoint:()=>G,fromPolygon:()=>w,fromPolyline:()=>R,fromSpatialReference:()=>v,getSpatialReference:()=>p,toExtent:()=>S,toGeometry:()=>M,toMultipoint:()=>V,toPoint:()=>D,toPolygon:()=>N,toPolyline:()=>b});var r=n(83661),a=(n(79187),n(55537)),o=n(95213),s=n(88885),u=n(39117),c=n(5443),i=n(48526),l=n(86738),m=n(39829),g=n(82799),h=(n(90293),n(83299));const f="_gxVersion",d=2,y=1;function p(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function P(e){switch(e.type){case"point":return G(e);case"multipoint":return C(e);case"polyline":return R(e);case"polygon":return w(e);case"extent":return x(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(f)){const t=new o.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(d,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function C(e){if(!e.getCacheValue(f)){const t=new s.M,n=new o.P,r=e.points,a=e.hasM,u=e.hasZ,c=u?3:2;for(let e=0,o=r.length;e<o;e++){const o=r[e];n.setXYCoords(o[0],o[1]),u&&n.setZ(o[2]??0),a&&n.setM(o[c]??NaN),t.add(n)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function G(e){if(!e.getCacheValue(f)){const t=new o.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,o=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(f,o)}return e.getCacheValue(f)}function R(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,o=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(f,o)}return e.getCacheValue(f)}function v(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.b)(t):null}function M(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return D(e,t);case a.G.enumEnvelope:return S(e,t);case a.G.enumMultiPoint:return V(e,t);case a.G.enumPolyline:return b(e,t);case a.G.enumPolygon:return N(e,t)}return null}function S(e,t){if(e.isEmpty())return null;const n=new c.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(d,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(y,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(f,e),n}function V(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),s=[],u=new o.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];a&&n.push(u.getZ()),r&&n.push(u.getM()),s.push(n)}const c=new i.A({hasM:r,hasZ:a,points:s,spatialReference:t});return c.setCacheValue(f,e),c}function D(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(f,e),n}function N(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(f,e),n}function b(e,t){if(e.isEmpty())return null;const n=g.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(f,e),n}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2568],{35448:(e,t,r)=>{r.d(t,{Eq:()=>n,bV:()=>a,nP:()=>s,r5:()=>o,ti:()=>d,vy:()=>l,wr:()=>i});const n={Regular:0,Provenance:1,Document:2},o={esriFieldTypeSmallInteger:0,esriFieldTypeInteger:1,esriFieldTypeSingle:2,esriFieldTypeDouble:3,esriFieldTypeString:4,esriFieldTypeDate:5,esriFieldTypeOID:6,esriFieldTypeGeometry:7,esriFieldTypeBlob:8,esriFieldTypeRaster:9,esriFieldTypeGUID:10,esriFieldTypeGlobalID:11,esriFieldTypeXML:12,esriFieldTypeBigInteger:13,esriFieldTypeDateOnly:14,esriFieldTypeTimeOnly:15,esriFieldTypeTimestampOffset:16},a={esriGeometryNull:0,esriGeometryPoint:1,esriGeometryMultipoint:2,esriGeometryPolyline:3,esriGeometryPolygon:4,esriGeometryEnvelope:5,esriGeometryAny:7,esriGeometryMultiPatch:9},i={esriMethodHintUNSPECIFIED:0,esriUUIDESRI:1,esriUUIDRFC4122:2},s={esriTypeUNSPECIFIED:0,esriTypeEntity:1,esriTypeRelationship:2,esriTypeBoth:4,esriTypeMetaEntityProvenance:8},d={esriGraphPropertyUNSPECIFIED:0,esriGraphPropertyRegular:1,esriGraphPropertyDocumentName:2,esriGraphPropertyDocumentTitle:3,esriGraphPropertyDocumentUrl:4,esriGraphPropertyDocumentText:5,esriGraphPropertyDocumentKeywords:6,esriGraphPropertyDocumentContentType:7,esriGraphPropertyDocumentMetadata:8,esriGraphPropertyDocumentFileExtension:9,esriGraphPropertyProvenanceInstanceId:10,esriGraphPropertyProvenanceSourceType:11,esriGraphPropertyProvenanceSourceName:12,esriGraphPropertyProvenanceSource:13,esriGraphPropertyProvenanceComment:14,esriGraphPropertyProvenanceTypeName:15,esriGraphPropertyProvenancePropertyName:16},l={esriIdentifierInfoTypeUNSPECIFIED:0,esriIdentifierInfoTypeDatabaseNative:1,esriIdentifierInfoTypeUniformProperty:2}},45724:(e,t,r)=>{r.d(t,{I:()=>d});var n=r(2741),o=r(44208);const a="esri/rest/knowledgeGraph/wasmInterface/";let i,s;async function d(){const e=i??s;if(e)return e;const t=!!(0,o.A)("wasm-simd");return s=l(t),s}async function l(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then(e=>e.a);return e({locateFile:e=>(0,n.s)(a+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then(e=>e.a);return t({locateFile:e=>(0,n.s)(a+e)})}},62568:(e,t,r)=>{r.r(t),r.d(t,{_checkAuthentication:()=>ar,_esriRequestWrapper:()=>or,_fetchWrapper:()=>rr,_getClientDataCacheCopy:()=>jt,_setMaxQueryParsingDurationForTesting:()=>pr,_submitJobWrapper:()=>nr,clearClientDataCache:()=>tr,clientDataCache:()=>kt,executeAddGraphFieldIndex:()=>$t,executeAddGraphProperties:()=>Ft,executeAddNamedTypes:()=>Dt,executeApplyEdits:()=>It,executeDeleteGraphFieldIndex:()=>qt,executeDeleteGraphProperty:()=>Ot,executeDeleteNamedType:()=>Zt,executeFindPaths:()=>Xt,executeFindPathsAsynchronous:()=>Yt,executeQuery:()=>Lt,executeQueryStreaming:()=>zt,executeSearch:()=>Jt,executeSearchStreaming:()=>Kt,executeUpdateGraphProperty:()=>Nt,executeUpdateNamedType:()=>Et,executeUpdateSearchIndex:()=>Ut,fetchAllClientDataKeys:()=>Vt,fetchAsynchronousFindPathsResultData:()=>er,fetchClientDataAtKeys:()=>Qt,fetchKnowledgeGraph:()=>Bt,kgRestServices:()=>Rt,refreshDataModel:()=>Ht,refreshServiceDefinition:()=>Wt});var n,o=r(70333),a=r(78888),i=r(49186),s=r(53966),d=r(74887),l=r(34275),p=r(91075),u=r(16930),c=r(31635),h=r(65008),y=r(10107),g=r(56507),f=(r(44208),r(87811),r(40608)),w=r(5443);let m=n=class extends h.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,g.PZ)(n,e)}};(0,c.Cg)([(0,y.MZ)({type:u.A})],m.prototype,"outSpatialReference",void 0),(0,c.Cg)([(0,y.MZ)({type:w.A})],m.prototype,"processExtent",void 0),(0,c.Cg)([(0,y.MZ)({type:u.A})],m.prototype,"processSpatialReference",void 0),(0,c.Cg)([(0,y.MZ)({nonNullable:!0})],m.prototype,"returnColumnName",void 0),(0,c.Cg)([(0,y.MZ)({nonNullable:!0})],m.prototype,"returnFeatureCollection",void 0),(0,c.Cg)([(0,y.MZ)({nonNullable:!0})],m.prototype,"returnM",void 0),(0,c.Cg)([(0,y.MZ)({nonNullable:!0})],m.prototype,"returnZ",void 0),m=n=(0,c.Cg)([(0,f.$)("esri.rest.geoprocessor.GPOptions")],m);var _=r(17136),v=r(20437),b=r(25482);let C=class extends b.o{constructor(e){super(e),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,c.Cg)([(0,y.MZ)({type:w.A})],C.prototype,"extent",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"height",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"href",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"opacity",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"rotation",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"scale",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"visible",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"width",void 0),C=(0,c.Cg)([(0,f.$)("esri.layers.support.MapImage")],C);var A=r(2272),G=r(93223),M=r(2073);let x=class extends b.o{constructor(e){super(e),this.area=0,this.units=null}};(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],x.prototype,"area",void 0),(0,c.Cg)([(0,G.e)(M.UO)],x.prototype,"units",void 0),x=(0,c.Cg)([(0,f.$)("esri.rest.support.ArealUnit")],x);let T=class extends b.o{constructor(e){super(e),this.itemId=null,this.url=null}};(0,c.Cg)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],T.prototype,"itemId",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],T.prototype,"url",void 0),T=(0,c.Cg)([(0,f.$)("esri.rest.support.DataFile")],T);var P=r(22671);let S=class extends b.o{constructor(e){super(e),this.distance=0,this.units=null}};(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],S.prototype,"distance",void 0),(0,c.Cg)([(0,G.e)(M.Y8)],S.prototype,"units",void 0),S=(0,c.Cg)([(0,f.$)("esri.rest.support.LinearUnit")],S);var k=r(66552);const j="multi-value-",R=new k.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${j}areal-unit`,"GPMultiValue:GPBoolean":`${j}boolean`,"GPMultiValue:GPComposite":`${j}composite`,"GPMultiValue:GPDataFile":`${j}data-file`,"GPMultiValue:GPDate":`${j}date`,"GPMultiValue:GPDouble":`${j}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${j}feature-record-set-layer`,"GPMultiValue:Field":`${j}field`,"GPMultiValue:GPLinearUnit":`${j}linear-unit`,"GPMultiValue:GPLong":`${j}long`,"GPMultiValue:GPRasterData":`${j}raster-data`,"GPMultiValue:GPRasterDataLayer":`${j}raster-data-layer`,"GPMultiValue:GPRecordSet":`${j}record-set`,"GPMultiValue:GPString":`${j}string`});let I=class extends b.o{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,c.Cg)([(0,G.e)(R,{ignoreUnknown:!1})],I.prototype,"dataType",void 0),(0,c.Cg)([(0,y.MZ)()],I.prototype,"paramName",void 0),(0,c.Cg)([(0,y.MZ)()],I.prototype,"value",void 0),I=(0,c.Cg)([(0,f.$)("esri.rest.support.ParameterValue")],I);var D=r(36005);let Z=class extends b.o{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};async function E(e,t){switch(e){case"areal-unit":return x.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return T.fromJSON(t);case"linear-unit":return S.fromJSON(t);case"feature-record-set-layer":if("url"in t)return T.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(8096),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(8761),r.e(8506),r.e(9784),r.e(5294)]).then(r.bind(r,29784))).default),{layerDefinition:n,featureSet:o}=t;return e.read({layerDefinition:n,featureSet:o},{origin:"portal-item"}),e.spatialReference=u.A.fromJSON(o.spatialReference??n.spatialReference??n.extent.spatialReference),e}return P.A.fromJSON(t);case"record-set":return"url"in t?T.fromJSON(t):P.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?C.fromJSON(t.mapImage):Z.fromJSON(t);case"field":return v.A.fromJSON(t)}}async function F(e){const t=R.fromJSON(e.dataType),{paramName:r}=e,n=function(e){return e.startsWith(j)}(t)?await async function(e,t){const r=function(e){return e.replace(j,"")}(e),n="composite"===r?t.map(e=>E(R.fromJSON(e.dataType),e.value)):t.map(e=>E(r,e));return Promise.all(n)}(t,e.value):await E(t,e.value);return new I({dataType:t,paramName:r,value:n})}function O(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map(e=>O({item:e},!0).item)):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}(0,c.Cg)([(0,y.MZ)()],Z.prototype,"format",void 0),(0,c.Cg)([(0,y.MZ)({json:{name:"itemID",write:!0}})],Z.prototype,"itemId",void 0),(0,c.Cg)([(0,y.MZ)()],Z.prototype,"type",void 0),(0,c.Cg)([(0,D.w)("type")],Z.prototype,"readType",null),(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],Z.prototype,"url",void 0),Z=(0,c.Cg)([(0,f.$)("esri.rest.support.RasterData")],Z);var N,$=r(37807);const q=(0,k.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),U=1e3;let L=class extends b.o{static{N=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:n}=(0,A.Dl)(r),o={...this.requestOptions,...e,query:{f:"json"}},i=`${n}/jobs/${t}/cancel`,{data:s}=await(0,a.A)(i,o),{messages:l,jobStatus:p,progress:u}=N.fromJSON(s);return this.set({messages:l,jobStatus:p,progress:u}),"job-cancelled"===p?this:new Promise((t,r)=>{(0,d.u7)(o.signal,()=>{this.clearCancelJobTimer(),r((0,d.NK)())}),this.clearCancelJobTimer();const n=()=>{this._cancelJobTimer||r((0,d.NK)()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(n,U);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}).catch(e=>{r(e)})};this._cancelJobTimer=setTimeout(n,U)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:o}=await(0,a.A)(n,r),{messages:i,jobStatus:s,progress:d}=N.fromJSON(o);return this.set({messages:i,jobStatus:s,progress:d}),this}async fetchResultData(e,t,r){t=m.from(t||{});const{returnColumnName:n,returnFeatureCollection:o,returnM:i,returnZ:s,outSpatialReference:d}=t,{path:l}=(0,A.Dl)(this.sourceUrl),p=O({returnColumnName:n||null,returnFeatureCollection:o||null,returnM:i||null,returnZ:s||null,outSR:d,returnType:"data",f:"json"},null),u={...this.requestOptions,...r,query:p},c=`${l}/jobs/${this.jobId}/results/${e}`,{data:h}=await(0,a.A)(c,u);return F(h)}async fetchResultImage(e,t,r){const{path:n}=(0,A.Dl)(this.sourceUrl),o=O({...t.toJSON(),f:"json"}),i={...this.requestOptions,...r,query:o},s=`${n}/jobs/${this.jobId}/results/${e}`,{data:d}=await(0,a.A)(s,i);return F(d)}async fetchResultMapImageLayer(){const{path:e}=(0,A.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),n=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(8096),r.e(13),r.e(1214),r.e(1956),r.e(4796),r.e(8761),r.e(364),r.e(3249),r.e(7656),r.e(8407)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=U,signal:r,statusCallback:n}=e;return new Promise((e,o)=>{(0,d.u7)(r,()=>{this.clearJobCompletionTimer(),o((0,d.NK)())}),this.clearJobCompletionTimer();const a=()=>{this._jobCompletionTimer||o((0,d.NK)()),this.checkJobStatus().then(({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":n&&n(this),this._jobCompletionTimer=setTimeout(a,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":o(this);break;default:this._jobCompletionTimer=setTimeout(a,t)}}).catch(e=>{o(e)})};this._jobCompletionTimer=setTimeout(a,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,c.Cg)([(0,y.MZ)()],L.prototype,"jobId",void 0),(0,c.Cg)([(0,G.e)(q,{ignoreUnknown:!1})],L.prototype,"jobStatus",void 0),(0,c.Cg)([(0,y.MZ)({type:[$.A]})],L.prototype,"messages",void 0),(0,c.Cg)([(0,y.MZ)()],L.prototype,"progress",void 0),(0,c.Cg)([(0,y.MZ)()],L.prototype,"requestOptions",void 0),(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],L.prototype,"sourceUrl",void 0),L=N=(0,c.Cg)([(0,f.$)("esri.rest.support.JobInfo")],L);let z=class extends h.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,c.Cg)([(0,y.MZ)()],z.prototype,"headerKeys",void 0),(0,c.Cg)([(0,y.MZ)()],z.prototype,"outSpatialReference",void 0),(0,c.Cg)([(0,y.MZ)()],z.prototype,"exceededTransferLimit",void 0),z=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],z);let J=class extends h.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new z}};(0,c.Cg)([(0,y.MZ)()],J.prototype,"resultRows",void 0),(0,c.Cg)([(0,y.MZ)()],J.prototype,"resultHeader",void 0),J=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResult")],J);let K=class extends h.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new z}};(0,c.Cg)([(0,y.MZ)()],K.prototype,"resultRowsStream",void 0),(0,c.Cg)([(0,y.MZ)()],K.prototype,"resultHeader",void 0),K=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],K);let V=class extends b.o{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"name",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"unique",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"ascending",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"description",void 0),(0,c.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],V.prototype,"fieldNames",void 0),V=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.FieldIndex")],V);let Q=class extends b.o{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"name",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"alias",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"fieldType",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"geometryType",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"hasM",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"hasZ",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"nullable",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"editable",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"required",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"defaultVisibility",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"systemMaintained",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"role",void 0),(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],Q.prototype,"defaultValue",void 0),Q=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphProperty")],Q);let B=class extends b.o{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"name",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"alias",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"role",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"strict",void 0),(0,c.Cg)([(0,y.MZ)({type:[Q],json:{write:!0}})],B.prototype,"properties",void 0),(0,c.Cg)([(0,y.MZ)({type:[V],json:{write:!0}})],B.prototype,"fieldIndexes",void 0),B=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphObjectType")],B);let H=class extends B{constructor(e){super(e),this.type="entity"}};H=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.EntityType")],H);let W=class extends B{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],W.prototype,"endPoints",void 0),W=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.RelationshipType")],W);let Y=class extends b.o{constructor(e){super(e),this.value=null,this.behavior=null}};(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"value",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"behavior",void 0),Y=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],Y);let X=class extends b.o{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,c.Cg)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],X.prototype,"timestamp",void 0),(0,c.Cg)([(0,y.MZ)({type:u.A,json:{write:!0}})],X.prototype,"spatialReference",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"strict",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"objectIdField",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"globalIdField",void 0),(0,c.Cg)([(0,y.MZ)()],X.prototype,"arcgisManaged",void 0),(0,c.Cg)([(0,y.MZ)()],X.prototype,"identifierInfo",void 0),(0,c.Cg)([(0,y.MZ)()],X.prototype,"searchIndexes",void 0),(0,c.Cg)([(0,y.MZ)({type:[H],json:{write:!0}})],X.prototype,"entityTypes",void 0),(0,c.Cg)([(0,y.MZ)({type:[W],json:{write:!0}})],X.prototype,"relationshipTypes",void 0),(0,c.Cg)([(0,y.MZ)({type:[H],json:{write:!0}})],X.prototype,"metaEntityTypes",void 0),(0,c.Cg)([(0,y.MZ)({type:[Y],json:{write:!0}})],X.prototype,"provenanceSourceTypeValues",void 0),X=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.DataModel")],X);let ee=class extends b.o{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,c.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ee.prototype,"capabilities",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"supportsSearch",void 0),(0,c.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ee.prototype,"supportedQueryFormats",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"allowGeometryUpdates",void 0),(0,c.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ee.prototype,"searchMaxRecordCount",void 0),(0,c.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ee.prototype,"serviceCapabilities",void 0),(0,c.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ee.prototype,"maxRecordCount",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"copyrightText",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"units",void 0),(0,c.Cg)([(0,y.MZ)({type:u.A,json:{write:!0}})],ee.prototype,"spatialReference",void 0),(0,c.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ee.prototype,"currentVersion",void 0),(0,c.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ee.prototype,"dateFieldsTimeReference",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"serviceItemId",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"supportsDocuments",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"dataEditingNotSupported",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"schemaEditingNotSupported",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"supportsProvenance",void 0),ee=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.ServiceDefinition")],ee);let te=class extends b.o{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function re(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function ne(e){return e?.error_code?new i.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function oe(e,t,r,n=!1){const o=new r.ClientDataFetchRequestEncoder;o.deleteLater();for(const a of e){const e=ae(a,t,r,n);o.add_client_data_fetch_request_parameter(e)}o.encode();const a=o.get_encoding_result();return re(a.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(a.get_byte_buffer())}function ae(e,t,r,n){const o=new r.ClientDataKey;o.deleteLater(),o.key_string=e;const a=new r.ClientDataFetchRequestParameter;a.deleteLater(),a.set_key(o);const i=t.get(e);return i&&!n&&(a.v_tag={v_tag:i.version}),a}(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"url",void 0),(0,c.Cg)([(0,y.MZ)({type:X,json:{write:!0}})],te.prototype,"dataModel",void 0),(0,c.Cg)([(0,y.MZ)({type:ee,json:{write:!0}})],te.prototype,"serviceDefinition",void 0),te=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],te);var ie=r(45724),se=r(48526),de=r(86738),le=r(39829),pe=r(82799);const ue={exclude:0,include:1};function ce(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ge(e,t))}),r}function he(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,o]of Object.entries(e))r.set_key_value(n,ge(o,t));return r}function ye(e,t){if(e instanceof se.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=e.points.length;let a=0;return e.points.forEach(e=>{e.forEach(e=>{n[a]=e,a++})}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof de.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=1,n[0]=e.x,n[1]=e.y;let a=2;return e.hasZ&&(n[a]=e.z,a++),e.hasM&&(n[a]=e.m,a++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof pe.A||e instanceof le.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];let a=[];e instanceof pe.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,a=e.paths):e instanceof le.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,a=e.rings);let i=0,s=0;return a.forEach(e=>{let t=0;e.forEach(e=>{t++,e.forEach(e=>{n[s]=e,s++})}),o[i]=t,i++}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);throw new i.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function ge(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof p.A)return ye(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ge(e,t))}),r}return he(e,t)}var fe=r(35448);function we(e,t){if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,Ce(o,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,Ce(o,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new i.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function me(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:fe.r5[e.fieldType]},r.geometry_type={value:e.geometryType?fe.bV[e.geometryType]:fe.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:fe.ti[e.role]},r.default_value=Ce(e.defaultValue,t),r}function _e(e,t){const r=new t.SearchIndexProperties;r.deleteLater();for(const t of e.propertyNames)r.add_search_property_name(t);return r}function ve(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:fe.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=me(n,t);r.add_property(e)}return r}function be(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function Ce(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof p.A?ye(e,t):null}let Ae=class extends h.A{constructor(e){super(e),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};(0,c.Cg)([(0,y.MZ)()],Ae.prototype,"decoderError",void 0),(0,c.Cg)([(0,y.MZ)()],Ae.prototype,"resultsCount",void 0),(0,c.Cg)([(0,y.MZ)()],Ae.prototype,"results",void 0),(0,c.Cg)([(0,y.MZ)()],Ae.prototype,"updatedKnowledgeGraph",void 0),Ae=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],Ae);const Ge=Ae;let Me=class extends Ge{constructor(e){super(e)}};Me=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],Me);const xe=Me;let Te=class extends Ge{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};(0,c.Cg)([(0,y.MZ)()],Te.prototype,"entityAddResultsCount",void 0),(0,c.Cg)([(0,y.MZ)()],Te.prototype,"relationshipAddResultsCount",void 0),(0,c.Cg)([(0,y.MZ)()],Te.prototype,"entityAddResults",void 0),(0,c.Cg)([(0,y.MZ)()],Te.prototype,"relationshipAddResults",void 0),Te=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],Te);const Pe=Te;let Se=class extends Ge{constructor(e){super(e)}};Se=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Se);const ke=Se;let je=class extends Ge{constructor(e){super(e)}};je=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],je);const Re=je;let Ie=class extends Ge{constructor(e){super(e)}};Ie=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],Ie);const De=Ie;let Ze=class extends Ge{constructor(e){super(e)}};Ze=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],Ze);const Ee=Ze;let Fe=class extends Ge{constructor(e){super(e)}};Fe=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],Fe);const Oe=Fe;let Ne=class extends Ge{constructor(e){super(e)}};Ne=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],Ne);const $e=Ne;let qe=class extends Ge{constructor(e){super(e)}};qe=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],qe);const Ue=qe;function Le(e,t){const r=[];for(let n=0;n<t;n++){const t=e.get_result_at(n);r.push({name:t.get_name(),error:ne(t.get_error())})}return r}function ze(e){const t=e.get_results_count(),r=e.get_entity_type_add_results_count(),n=e.get_relationship_type_add_results_count(),o=new Pe({resultsCount:t,results:Le(e,t),decoderError:ne(e.error),entityAddResultsCount:r,relationshipAddResultsCount:n});for(let t=0;t<r;t++){const r=e.get_entity_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.entityAddResults.push({name:n,error:ne(a)})}for(let t=0;t<n;t++){const r=e.get_relationship_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.relationshipAddResults.push({name:n,error:ne(a)})}return o}function Je(e){const t=e.get_results_count();return new Oe({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Ke(e){const t=e.get_results_count();return new De({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Ve(e){const t=e.get_results_count();return new ke({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Qe(e){const t=e.get_results_count();return new Ee({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Be(e){const t=e.get_results_count();return new $e({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function He(e){const t=e.get_results_count();return new Ue({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function We(e){const t=e.get_results_count();return new xe({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Ye(e){const t=e.get_results_count();return new Re({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}var Xe=r(93637);let et=class extends h.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,c.Cg)([(0,y.MZ)()],et.prototype,"name",void 0),(0,c.Cg)([(0,y.MZ)()],et.prototype,"supportedCategory",void 0),(0,c.Cg)([(0,y.MZ)()],et.prototype,"analyzers",void 0),(0,c.Cg)([(0,y.MZ)()],et.prototype,"searchProperties",void 0),et=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.SearchIndex")],et);let tt=!1;function rt(e){return e.deleteLater(),new H(ot(e))}function nt(e){return e.deleteLater(),new V({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:lt(e.fields)})}function ot(e){return{name:e.name,alias:e.alias,role:(0,Xe.i7)(fe.Eq,e.role.value),strict:e.strict,properties:pt(e.properties),fieldIndexes:ut(e.field_indexes)}}function at(e){return e.deleteLater(),new Q({alias:e.alias,name:e.name,fieldType:(0,Xe.i7)(fe.r5,e.field_type.value)??void 0,geometryType:(0,Xe.i7)(fe.bV,e.geometry_type.value)??null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:(0,Xe.i7)(fe.ti,e.role.value),defaultValue:e.default_value})}function it(e){e.deleteLater();const t=ot(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new W(Object.assign({endPoints:r},t))}function st(e){return new Y({behavior:e.behavior,value:e.value})}function dt(e){const t=[];for(let r=0;r<e.size();r++)t.push(rt(e.get(r)));return e.delete(),t}function lt(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function pt(e){const t=[];for(let r=0;r<e.size();r++){const n=at(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(tt=!0),t.push(n)}return e.delete(),t}function ut(e){const t=[];for(let r=0;r<e.size();r++)t.push(nt(e.get(r)));return e.delete(),t}function ct(e){const t=[];for(let r=0;r<e.size();r++)t.push(it(e.get(r)));return e.delete(),t}function ht(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(st(n))}return e.delete(),t}function yt(e){const t=[];for(let r=0;r<e.size();r++){const n=new et,o=e.get(r);n.name=o.name,n.supportedCategory=(0,Xe.i7)(fe.nP,o.supported_category.value);const a=o.analyzers.size();for(let e=0;e<a;e++)n.analyzers.push({name:o.analyzers.get(e).name});o.analyzers.delete();for(let e=0;e<o.search_properties.keys().size();e++){const t=o.search_properties.keys().get(e),r=o.search_properties.get(t),a=[];for(let e=0;e<r.property_names.size();e++)a.push(r.property_names.get(e));n.searchProperties.set(t,{propertyNames:a})}t.push(n)}return e.delete(),t}var gt=r(25927),ft=(r(77901),r(40662)),wt=r(42095),mt=r(23150);function _t(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=vt(e,r),{coords:o,geometry_type:a,lengths:s}=e;if(a.value!==t)throw new i.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let d=0;return s.forEach(e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=o[d],d++;t.push(e)}r.paths.push(t)}),r}function vt(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}const bt=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function Ct(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case 1:return function(e,t){const r={spatialReference:t};let n=2;vt(e,r);const o=e.coords;return r.x=o[0],r.y=o[1],e.has_z&&(r.z=o[n],n++),e.has_m&&(r.m=o[n]),new de.A(r)}(e,r);case 2:return function(e,t){const r={spatialReference:t},n=vt(e,r),o=e.lengths,a=e.coords,i=o[0];r.points=[];let s=0;for(let e=0;e<i;e++){const e=[];for(let t=0;t<n;t++)e[t]=a[s],s++;r.points.push(e)}return new se.A(r)}(e,r);case 3:return function(e,t){const{paths:r,hasM:n,hasZ:o}=_t(e,3);return new pe.A({paths:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 4:return function(e,t){const{paths:r,hasM:n,hasZ:o}=_t(e,4);return new le.A({rings:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 5:case 7:return bt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;default:return bt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return bt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case 0:return function(e,t,r){return new ft.A(Gt(e,t,r))}(e,t,r);case 1:return At(e,t,r);case 2:return Mt(e,t,r);case 3:return function(e,t,r){const n=e.entity_count(),o=e.relationship_count(),a=[];for(let i=0;i<n;i++)a.push(At(e.get_entity_at(i),t,r)),i<o&&a.push(Mt(e.get_relationship_at(i),t,r));return new wt.A({path:a})}(e,t,r);case 4:return function(e,t,r){const n=[],o=e.count();for(let a=0;a<o;a++){const o=e.get_value_at(a);n.push(Ct(o,t,r))}return n}(e,t,r);default:return bt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function At(e,t,r){const n=e.type_name,o=Gt(e,t,r),a=e.get_id();return new gt.A(Object.assign({typeName:n,id:a},o))}function Gt(e,t,r){const n={},o=e.key_count();for(let a=0;a<o;a++)n[e.get_key_at(a)]=Ct(e.get_value_at(a),t,r);return{properties:n}}function Mt(e,t,r){const n=e.type_name,o=Gt(e,t,r);return new mt.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},o))}function xt(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new u.A(e.get_out_sr());return new z({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let Tt=class extends h.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[]}};(0,c.Cg)([(0,y.MZ)()],Tt.prototype,"hasError",void 0),(0,c.Cg)([(0,y.MZ)()],Tt.prototype,"error",void 0),(0,c.Cg)([(0,y.MZ)()],Tt.prototype,"editResults",void 0),Tt=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],Tt);const Pt=Tt;function St(e){const t=e.has_error(),r=new Pt({hasError:t,error:t?ne(e.error):null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t),o=e.get_edit_results_type_name_at(t),a=[],i=[],s=[],d=n.get_add_results_count(),l=n.get_update_results_count(),p=n.get_delete_results_count();for(let e=0;e<d;e++){const t=n.get_add_result_at(e);a.push({id:t.id,error:ne(t.error)})}for(let e=0;e<l;e++){const t=n.get_update_result_at(e);i.push({id:t.id,error:ne(t.error)})}for(let e=0;e<p;e++){const t=n.get_delete_result_at(e);s.push({id:t.id,error:ne(t.error)})}r.editResults.push({typeName:o,adds:a,updates:i,deletes:s})}return r}const kt=new Map,jt=()=>new Map(kt.entries()),Rt={fetchKnowledgeGraph:async e=>{const t=new te({url:e}),r=[];return r.push(Ht(t)),r.push(Wt(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await hr(e)},refreshServiceDefinition:async e=>{const t=(await(0,a.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new ee(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await or(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`;return await nr(`${n}${a}`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await or(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,s=await or(`${n}${a}`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(s.data.results.length<1)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",s);let d;for(const e of s.data.results)if("out_results_string"===e.paramName){d=e.value;break}if(!d)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",s);return d},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await ar(e);const o=await sr(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new i.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");o.data.body=await async function(e,t){const r=await(0,ie.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,o]of Object.entries(e.bindParameters))ir(t,o,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await Ht(t),4326!==t.dataModel?.spatialReference?.wkid)throw new i.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:ue[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const o=n.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return(0,l.OO)(structuredClone(o.get_byte_buffer()))}(t,e);const a=await rr(o.data.url,o.data);if(e.dataModel){const t=await cr(a,e.dataModel);return new K({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new i.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await ar(e);const o=await sr(n,r);return o.data.body=await async function(e,t){if(t.dataModel||await Ht(t),!t.dataModel)throw new i.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,ie.I)(),n=!!e.options?.cascadeDelete,o=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());o.deleteLater(),o.cascade_delete=n;try{let t;e.entityAdds?.forEach(e=>{t=o.add_entity(we(e,r)),re(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipAdds?.forEach(e=>{if(!e.originId||!e.destinationId)throw new i.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=o.add_relationship(we(e,r)),re(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_entity(we(e,r)),re(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_relationship(we(e,r)),re(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach(e=>{t.delete_by_id(e)})}),e.relationshipDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!1);e.ids?.forEach(e=>{t.delete_by_id(e)})}),o.encode()}catch(e){throw new i.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const a=o.get_encoding_result();return re(a.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),(0,l.OO)(structuredClone(a.get_byte_buffer()))}(t,e),async function(e){return dr(e,(await(0,ie.I)()).GraphApplyEditsDecoder,St)}(await rr(o.data.url,o.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new i.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");const n=`${e.url}/dataModel/edit/namedTypes/add`;await ar(e);const o=await sr(n,r);o.data.body=await async function(e){const t=await(0,ie.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach(e=>{r.add_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),ve(e,t,r)}(e,t))}),e.newRelationshipTypes?.forEach(e=>{r.add_relationship_type(function(e,t){const r=new t.RelationshipType;r.deleteLater();for(const n of e.endPoints){const e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=n.originEntityType,e.dest_entity_type=n.destinationEntityType,r.add_end_point(e)}return ve(e,t,r)}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}const n=r.get_encoding_result();return re(n.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),(0,l.OO)(structuredClone(n.get_byte_buffer()))}(t);const a=await rr(o.data.url,o.data),s=await async function(e){return dr(e,(await(0,ie.I)()).GraphNamedObjectTypeAddsResponseDecoder,ze)}(a);return s.updatedKnowledgeGraph=await Bt(e.url),s},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");const n=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await ar(e);const o=await sr(n,r);o.data.body="";const a=await rr(o.data.url,o.data),s=await async function(e){return dr(e,(await(0,ie.I)()).GraphNamedObjectTypeDeleteResponseDecoder,Ke)}(a);return s.updatedKnowledgeGraph=await Bt(e.url),s},executeUpdateNamedType:async(e,t,r,n)=>{if(!t&&!Object.keys(r).length)throw new i.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e,t,r){const n=await(0,ie.I)(),o=new n.GraphNamedObjectTypeUpdateRequestEncoder;if(o.deleteLater(),r.entityTypes.some(e=>e.name===t))o.update_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),be(e,r)}(e,n));else{if(!r.relationshipTypes.some(e=>e.name===t))throw new i.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");o.update_relationship_type(function(e,t){const r=new t.RelationshipType;return r.deleteLater(),be(e,r)}(e,n))}o.update_alias=e.hasOwnProperty("alias");try{o.encode()}catch(e){throw new i.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}const a=o.get_encoding_result();return re(a.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),(0,l.OO)(structuredClone(a.get_byte_buffer()))}(r,t,e.dataModel);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphNamedObjectTypeUpdateResponseDecoder,Je)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeAddGraphProperties:async(e,t,r,n)=>{if(!t&&!r.length)throw new i.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e){const t=await(0,ie.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_graph_property(me(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}const n=r.get_encoding_result();return re(n.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),(0,l.OO)(structuredClone(n.get_byte_buffer()))}(r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphPropertyAddsResponseDecoder,Ve)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeDeleteGraphProperty:async(e,t,r,n)=>{if(!t&&!r)throw new i.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e){const t=new((await(0,ie.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}const r=t.get_encoding_result();return re(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),(0,l.OO)(structuredClone(r.get_byte_buffer()))}(r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphPropertyDeleteResponseDecoder,Qe)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeUpdateGraphProperty:async(e,t,r,n,o)=>{if(!t&&!r&&!Object.keys(n).length)throw new i.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await ar(e);const s=await sr(a,o);s.data.body=await async function(e,t){const r=await(0,ie.I)(),n=new r.GraphPropertyUpdateRequestEncoder;n.deleteLater(),n.update_graph_property(function(e,t){const r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=Ce(e.defaultValue,t)),r}(t,r)),n.set_property_name(e),n.update_alias=t.hasOwnProperty("alias"),n.update_editable=t.hasOwnProperty("editable"),n.update_required=t.hasOwnProperty("required"),n.update_visible=t.hasOwnProperty("defaultVisibility"),n.update_default_value=t.hasOwnProperty("defaultValue");try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}const o=n.get_encoding_result();return re(o.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),(0,l.OO)(structuredClone(o.get_byte_buffer()))}(r,n);const d=await rr(s.data.url,s.data),p=await async function(e){return dr(e,(await(0,ie.I)()).GraphPropertyUpdateResponseDecoder,Be)}(d);return p.updatedKnowledgeGraph=await Bt(e.url),p},executeAddGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/add`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e){const t=await(0,ie.I)(),r=new t.GraphIndexAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_field_index(function(e,t){const r=new t.FieldIndex;r.deleteLater(),r.name=e.name,r.unique=e.unique,r.ascending=e.ascending,r.description=e.description??"";for(const t of e.fieldNames)r.add_field(t);return r}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed",{error:e})}const n=r.get_encoding_result();return re(n.error,"knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed"),(0,l.OO)(structuredClone(n.get_byte_buffer()))}(r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphIndexAddsResponseDecoder,We)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeDeleteGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/delete`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e){const t=new((await(0,ie.I)()).GraphIndexDeleteRequestEncoder);t.deleteLater(),e.forEach(e=>{t.add_index_name(e)});try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed",{error:e})}const r=t.get_encoding_result();return re(r.error,"knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed"),(0,l.OO)(structuredClone(r.get_byte_buffer()))}(r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphIndexDeleteResponseDecoder,Ye)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeUpdateSearchIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");const o=`${e.url}/dataModel/searchIndex/update`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e,t){const r=await(0,ie.I)(),n=new r.GraphUpdateSearchIndexRequestEncoder;n.deleteLater(),t.hasOwnProperty("addSearchProperties")&&n.insert_add_search_property(e,_e(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&n.insert_delete_search_property(e,_e(t.removeSearchProperties,r));try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}const o=n.get_encoding_result();return re(o.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),(0,l.OO)(structuredClone(o.get_byte_buffer()))}(t,r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphUpdateSearchIndexResponseDecoder,He)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,o=await(0,a.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=o.getHeader?.("content-type"),d=o.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,ie.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ur({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:o.data})},executeSearch:async(e,t,r)=>{const n=t.typeCategoryFilter,o=`${e.url}/graph/search`,s=await(0,a.A)(o,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),d=s.getHeader?.("content-type"),l=s.data;if(d?.includes("application/x-protobuf")){const t=new((await(0,ie.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ur({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:d,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await ar(e);const o=await sr(n,r);o.data.body=await async function(e){const t=await(0,ie.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(ce(e.idsFilter,t))}catch(e){throw new i.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach(e=>{r.add_named_type_filter(e)});try{r.encode()}catch(e){throw new i.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const n=r.get_encoding_result();if(0!==n.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return(0,l.OO)(structuredClone(n.get_byte_buffer()))}(t);const a=await rr(o.data.url,o.data);if(e.dataModel){const t=await cr(a,e.dataModel);return new K({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let n=kt.get(e.url||"");n||(n=new Map,kt.set(e.url||"",n));const o=new Map(n.entries()),a=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,ie.I)(),d=oe(t,n,s,r.ignoreCache),l=await sr(a,r.requestOptions);l.data.body=d;const p=await rr(l.data.url,l.data),u=p.headers.get("content-type");if(u?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await p.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&re(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const o=new Map;for(let a=0;a<e.get_results_count();a++){const i=e.get_result_at(a);if(2!==i.get_fetch_result_case().value||0!==i.error().error_code){const e=i.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=i.get_value(),d=i.get_key().key_string,l=r.get(d);let p;if(2===s.get_data_case().value&&l)p=l.value;else{if(1!==s.get_data_case().value)continue;{p=s.get_data().client_data_string;const e=i.get_value().get_v_tag().v_tag;n||t.set(d,{key:d,version:e,value:p})}}o.set(d,p)}return o}(e,n,o,r.ignoreCache)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:u,data:p})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,n=await(0,a.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),o=n.getHeader?.("content-type"),s=n.data;if(o?.includes("application/x-protobuf")){const e=new((await(0,ie.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&re(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);1===n.get_client_data_key_type().value&&r.push(n.key_string)}return r}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:o,data:n.data})},clearClientDataCache:()=>kt.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=m.from(r||{}),async function(e,t,r,n,o){const i={},s={},d=[];return function(e,t,r){for(const n in e){const o=e[n];if(o&&"object"==typeof o&&o instanceof P.A){const{features:e}=o;r[n]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}}}(n,d,i),(0,_.el)(d).then(d=>{const{outSpatialReference:l,processExtent:p,processSpatialReference:u,returnColumnName:c,returnFeatureCollection:h,returnM:y,returnZ:g}=r,{path:f}=(0,A.Dl)(e);for(const e in i){const[t,r]=i[e];s[e]=d.slice(t,r)}const w=l?l.wkid||l:null,m=u?u.wkid||u:null,_="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:h||void 0,returnM:y||void 0,returnZ:g||void 0}:null,v=O({...p?{context:{extent:p,outSR:w,processSR:m}}:{"env:outSR":w,"env:processSR":m},...n,..._,f:"json"},null,s),b={...o,query:v};return(0,a.A)(`${f}/${t}`,b)})}(e,"submitJob",r,t??{},n).then(({data:t})=>{const r=L.fromJSON(t);return r.sourceUrl=e,r})}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,a.A)(e,t)};async function It(e,t,r){return Rt.executeApplyEdits(e,t,r)}async function Dt(e,t,r){return Rt.executeAddNamedTypes(e,t,r)}async function Zt(e,t,r){return Rt.executeDeleteNamedType(e,t,r)}async function Et(e,t,r,n){return Rt.executeUpdateNamedType(e,t,r,n)}async function Ft(e,t,r,n){return Rt.executeAddGraphProperties(e,t,r,n)}async function Ot(e,t,r,n){return Rt.executeDeleteGraphProperty(e,t,r,n)}async function Nt(e,t,r,n,o){return Rt.executeUpdateGraphProperty(e,t,r,n,o)}async function $t(e,t,r,n){return Rt.executeAddGraphFieldIndex(e,t,r,n)}async function qt(e,t,r,n){return Rt.executeDeleteGraphFieldIndex(e,t,r,n)}async function Ut(e,t,r,n){return Rt.executeUpdateSearchIndex(e,t,r,n)}async function Lt(e,t,r){return Rt.executeQuery(e,t,r)}async function zt(e,t,r){return Rt.executeQueryStreaming(e,t,r)}async function Jt(e,t,r){return Rt.executeSearch(e,t,r)}async function Kt(e,t,r){return Rt.executeSearchStreaming(e,t,r)}function Vt(e,t){return Rt.fetchAllClientDataKeys(e,t)}function Qt(e,t,r){return Rt.fetchClientDataAtKeys(e,t,r)}async function Bt(e){return Rt.fetchKnowledgeGraph(e)}async function Ht(e){return Rt.refreshDataModel(e)}async function Wt(e){return Rt.refreshServiceDefinition(e)}async function Yt(e,t){return Rt.executeFindPathsAsynchronous(e,t)}async function Xt(e,t){return Rt.executeFindPaths(e,t)}async function er(e,t){return Rt.fetchAsynchronousFindPathsResultData(e,t)}function tr(){return Rt.clearClientDataCache()}async function rr(e,t){return Rt._fetchWrapper(e,t)}async function nr(e,t,r,n){return Rt._submitJobWrapper(e,t,r,n)}async function or(e,t){return Rt._esriRequestWrapper(e,t)}async function ar(e){const t=o.id?.findCredential(e.url);t||(e.dataModel?await hr(e):await Ht(e))}function ir(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof p.A?r.set_param_key_value(e,ye(t,n)):Array.isArray(t)?r.set_param_key_value(e,ce(t,n)):r.set_param_key_value(e,he(t,n))}async function sr(e,t){return(0,a.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}async function dr(e,t,r){const n=e.headers.get("content-type");if(n?.includes("application/x-protobuf")){const n=await e.arrayBuffer(),o=new t;try{return o.decode(new Uint8Array(n)),r(o)}finally{o.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:await e.text()})}let lr=50;function pr(e){lr=e}function ur({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:o=!1}){t&&e.push_buffer(new Uint8Array(t));const a=[];let s,d,l=0;const p=Date.now();let c=!0;for(;e.next_row();){s&&d||(s=n??xt(e),d=s.outSpatialReference??new u.A({wkid:4326})),l||(l=e.get_header_keys().size());const t=new Array(l);for(let n=0;n<l;n++){const o=e.get_value(n);t[n]=Ct(o,r,d)}if(a.push(t),o&&Date.now()-p>lr){c=!1;break}}if(e.has_error())throw new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:s,resultRows:a,parsedAllResultsFromBuffer:c}}async function cr(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,ie.I)()).GraphQueryDecoder);let o,a,l;n.deleteLater();const p=new Promise((e,t)=>{a=e,l=t});let u=!1,c=null;const h=new ReadableStream({pull:async function e(p){if(!r){const e=new i.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw l(e),e}const{done:h,value:y}=c?{done:!1,value:null}:await r.read().catch(e=>{throw l(e),r.releaseLock(),e});y&&(c=y);try{if(h){let e;if(n.has_error()?e=new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):u||a(new z),r.releaseLock(),e)throw p.error(e),l(e),e;return void p.close()}const{resultHeader:s,resultRows:d,parsedAllResultsFromBuffer:g}=ur({wasmQueryDecoder:n,newArrayBufferToParse:y,dataModel:t,decodedHeader:o,limitMaxProcessingTime:!0});return g&&(c=null),!o&&s&&(o=s,a(s),u=!0),d.length>0?void p.enqueue(d):await e(p)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),l(e),r.releaseLock(),(0,d.zf)(e)?e:new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:h,resultHeader:await p}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function hr(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,a.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),o=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,ie.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(o));if(!e)throw new i.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),tt=!1;const t=new X({timestamp:e.timestamp,spatialReference:new u.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:(0,Xe.i7)(fe.vy,e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value),databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:(0,Xe.i7)(fe.wr,e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value)}},searchIndexes:yt(e.search_indexes),entityTypes:dt(e.entity_types),relationshipTypes:ct(e.relationship_types),metaEntityTypes:dt(e.meta_entity_types),provenanceSourceTypeValues:ht(e.provenance_source_type_values.value_behavior_array)});return tt&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2568],{35448:(e,t,r)=>{r.d(t,{Eq:()=>n,bV:()=>a,nP:()=>s,r5:()=>o,ti:()=>d,vy:()=>l,wr:()=>i});const n={Regular:0,Provenance:1,Document:2},o={esriFieldTypeSmallInteger:0,esriFieldTypeInteger:1,esriFieldTypeSingle:2,esriFieldTypeDouble:3,esriFieldTypeString:4,esriFieldTypeDate:5,esriFieldTypeOID:6,esriFieldTypeGeometry:7,esriFieldTypeBlob:8,esriFieldTypeRaster:9,esriFieldTypeGUID:10,esriFieldTypeGlobalID:11,esriFieldTypeXML:12,esriFieldTypeBigInteger:13,esriFieldTypeDateOnly:14,esriFieldTypeTimeOnly:15,esriFieldTypeTimestampOffset:16},a={esriGeometryNull:0,esriGeometryPoint:1,esriGeometryMultipoint:2,esriGeometryPolyline:3,esriGeometryPolygon:4,esriGeometryEnvelope:5,esriGeometryAny:7,esriGeometryMultiPatch:9},i={esriMethodHintUNSPECIFIED:0,esriUUIDESRI:1,esriUUIDRFC4122:2},s={esriTypeUNSPECIFIED:0,esriTypeEntity:1,esriTypeRelationship:2,esriTypeBoth:4,esriTypeMetaEntityProvenance:8},d={esriGraphPropertyUNSPECIFIED:0,esriGraphPropertyRegular:1,esriGraphPropertyDocumentName:2,esriGraphPropertyDocumentTitle:3,esriGraphPropertyDocumentUrl:4,esriGraphPropertyDocumentText:5,esriGraphPropertyDocumentKeywords:6,esriGraphPropertyDocumentContentType:7,esriGraphPropertyDocumentMetadata:8,esriGraphPropertyDocumentFileExtension:9,esriGraphPropertyProvenanceInstanceId:10,esriGraphPropertyProvenanceSourceType:11,esriGraphPropertyProvenanceSourceName:12,esriGraphPropertyProvenanceSource:13,esriGraphPropertyProvenanceComment:14,esriGraphPropertyProvenanceTypeName:15,esriGraphPropertyProvenancePropertyName:16},l={esriIdentifierInfoTypeUNSPECIFIED:0,esriIdentifierInfoTypeDatabaseNative:1,esriIdentifierInfoTypeUniformProperty:2}},45724:(e,t,r)=>{r.d(t,{I:()=>d});var n=r(2741),o=r(44208);const a="esri/rest/knowledgeGraph/wasmInterface/";let i,s;async function d(){const e=i??s;if(e)return e;const t=!!(0,o.A)("wasm-simd");return s=l(t),s}async function l(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then(e=>e.a);return e({locateFile:e=>(0,n.s)(a+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then(e=>e.a);return t({locateFile:e=>(0,n.s)(a+e)})}},62568:(e,t,r)=>{r.r(t),r.d(t,{_checkAuthentication:()=>ar,_esriRequestWrapper:()=>or,_fetchWrapper:()=>rr,_getClientDataCacheCopy:()=>jt,_setMaxQueryParsingDurationForTesting:()=>pr,_submitJobWrapper:()=>nr,clearClientDataCache:()=>tr,clientDataCache:()=>kt,executeAddGraphFieldIndex:()=>$t,executeAddGraphProperties:()=>Ft,executeAddNamedTypes:()=>Dt,executeApplyEdits:()=>It,executeDeleteGraphFieldIndex:()=>qt,executeDeleteGraphProperty:()=>Ot,executeDeleteNamedType:()=>Zt,executeFindPaths:()=>Xt,executeFindPathsAsynchronous:()=>Yt,executeQuery:()=>Lt,executeQueryStreaming:()=>zt,executeSearch:()=>Jt,executeSearchStreaming:()=>Kt,executeUpdateGraphProperty:()=>Nt,executeUpdateNamedType:()=>Et,executeUpdateSearchIndex:()=>Ut,fetchAllClientDataKeys:()=>Vt,fetchAsynchronousFindPathsResultData:()=>er,fetchClientDataAtKeys:()=>Qt,fetchKnowledgeGraph:()=>Bt,kgRestServices:()=>Rt,refreshDataModel:()=>Ht,refreshServiceDefinition:()=>Wt});var n,o=r(70333),a=r(78888),i=r(49186),s=r(53966),d=r(74887),l=r(34275),p=r(91075),u=r(16930),c=r(31635),h=r(65008),y=r(10107),g=r(56507),f=(r(44208),r(87811),r(40608)),w=r(5443);let m=n=class extends h.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,g.PZ)(n,e)}};(0,c.Cg)([(0,y.MZ)({type:u.A})],m.prototype,"outSpatialReference",void 0),(0,c.Cg)([(0,y.MZ)({type:w.A})],m.prototype,"processExtent",void 0),(0,c.Cg)([(0,y.MZ)({type:u.A})],m.prototype,"processSpatialReference",void 0),(0,c.Cg)([(0,y.MZ)({nonNullable:!0})],m.prototype,"returnColumnName",void 0),(0,c.Cg)([(0,y.MZ)({nonNullable:!0})],m.prototype,"returnFeatureCollection",void 0),(0,c.Cg)([(0,y.MZ)({nonNullable:!0})],m.prototype,"returnM",void 0),(0,c.Cg)([(0,y.MZ)({nonNullable:!0})],m.prototype,"returnZ",void 0),m=n=(0,c.Cg)([(0,f.$)("esri.rest.geoprocessor.GPOptions")],m);var _=r(17136),v=r(20437),b=r(25482);let C=class extends b.o{constructor(e){super(e),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,c.Cg)([(0,y.MZ)({type:w.A})],C.prototype,"extent",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"height",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"href",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"opacity",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"rotation",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"scale",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"visible",void 0),(0,c.Cg)([(0,y.MZ)()],C.prototype,"width",void 0),C=(0,c.Cg)([(0,f.$)("esri.layers.support.MapImage")],C);var A=r(2272),G=r(93223),M=r(2073);let x=class extends b.o{constructor(e){super(e),this.area=0,this.units=null}};(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],x.prototype,"area",void 0),(0,c.Cg)([(0,G.e)(M.UO)],x.prototype,"units",void 0),x=(0,c.Cg)([(0,f.$)("esri.rest.support.ArealUnit")],x);let T=class extends b.o{constructor(e){super(e),this.itemId=null,this.url=null}};(0,c.Cg)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],T.prototype,"itemId",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],T.prototype,"url",void 0),T=(0,c.Cg)([(0,f.$)("esri.rest.support.DataFile")],T);var P=r(22671);let S=class extends b.o{constructor(e){super(e),this.distance=0,this.units=null}};(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],S.prototype,"distance",void 0),(0,c.Cg)([(0,G.e)(M.Y8)],S.prototype,"units",void 0),S=(0,c.Cg)([(0,f.$)("esri.rest.support.LinearUnit")],S);var k=r(66552);const j="multi-value-",R=new k.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${j}areal-unit`,"GPMultiValue:GPBoolean":`${j}boolean`,"GPMultiValue:GPComposite":`${j}composite`,"GPMultiValue:GPDataFile":`${j}data-file`,"GPMultiValue:GPDate":`${j}date`,"GPMultiValue:GPDouble":`${j}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${j}feature-record-set-layer`,"GPMultiValue:Field":`${j}field`,"GPMultiValue:GPLinearUnit":`${j}linear-unit`,"GPMultiValue:GPLong":`${j}long`,"GPMultiValue:GPRasterData":`${j}raster-data`,"GPMultiValue:GPRasterDataLayer":`${j}raster-data-layer`,"GPMultiValue:GPRecordSet":`${j}record-set`,"GPMultiValue:GPString":`${j}string`});let I=class extends b.o{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,c.Cg)([(0,G.e)(R,{ignoreUnknown:!1})],I.prototype,"dataType",void 0),(0,c.Cg)([(0,y.MZ)()],I.prototype,"paramName",void 0),(0,c.Cg)([(0,y.MZ)()],I.prototype,"value",void 0),I=(0,c.Cg)([(0,f.$)("esri.rest.support.ParameterValue")],I);var D=r(36005);let Z=class extends b.o{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};async function E(e,t){switch(e){case"areal-unit":return x.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return T.fromJSON(t);case"linear-unit":return S.fromJSON(t);case"feature-record-set-layer":if("url"in t)return T.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(8096),r.e(13),r.e(1214),r.e(9953),r.e(1956),r.e(3926),r.e(3029),r.e(4111),r.e(8506),r.e(9784),r.e(5294)]).then(r.bind(r,29784))).default),{layerDefinition:n,featureSet:o}=t;return e.read({layerDefinition:n,featureSet:o},{origin:"portal-item"}),e.spatialReference=u.A.fromJSON(o.spatialReference??n.spatialReference??n.extent.spatialReference),e}return P.A.fromJSON(t);case"record-set":return"url"in t?T.fromJSON(t):P.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?C.fromJSON(t.mapImage):Z.fromJSON(t);case"field":return v.A.fromJSON(t)}}async function F(e){const t=R.fromJSON(e.dataType),{paramName:r}=e,n=function(e){return e.startsWith(j)}(t)?await async function(e,t){const r=function(e){return e.replace(j,"")}(e),n="composite"===r?t.map(e=>E(R.fromJSON(e.dataType),e.value)):t.map(e=>E(r,e));return Promise.all(n)}(t,e.value):await E(t,e.value);return new I({dataType:t,paramName:r,value:n})}function O(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map(e=>O({item:e},!0).item)):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}(0,c.Cg)([(0,y.MZ)()],Z.prototype,"format",void 0),(0,c.Cg)([(0,y.MZ)({json:{name:"itemID",write:!0}})],Z.prototype,"itemId",void 0),(0,c.Cg)([(0,y.MZ)()],Z.prototype,"type",void 0),(0,c.Cg)([(0,D.w)("type")],Z.prototype,"readType",null),(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],Z.prototype,"url",void 0),Z=(0,c.Cg)([(0,f.$)("esri.rest.support.RasterData")],Z);var N,$=r(37807);const q=(0,k.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),U=1e3;let L=class extends b.o{static{N=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:n}=(0,A.Dl)(r),o={...this.requestOptions,...e,query:{f:"json"}},i=`${n}/jobs/${t}/cancel`,{data:s}=await(0,a.A)(i,o),{messages:l,jobStatus:p,progress:u}=N.fromJSON(s);return this.set({messages:l,jobStatus:p,progress:u}),"job-cancelled"===p?this:new Promise((t,r)=>{(0,d.u7)(o.signal,()=>{this.clearCancelJobTimer(),r((0,d.NK)())}),this.clearCancelJobTimer();const n=()=>{this._cancelJobTimer||r((0,d.NK)()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(n,U);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}).catch(e=>{r(e)})};this._cancelJobTimer=setTimeout(n,U)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:o}=await(0,a.A)(n,r),{messages:i,jobStatus:s,progress:d}=N.fromJSON(o);return this.set({messages:i,jobStatus:s,progress:d}),this}async fetchResultData(e,t,r){t=m.from(t||{});const{returnColumnName:n,returnFeatureCollection:o,returnM:i,returnZ:s,outSpatialReference:d}=t,{path:l}=(0,A.Dl)(this.sourceUrl),p=O({returnColumnName:n||null,returnFeatureCollection:o||null,returnM:i||null,returnZ:s||null,outSR:d,returnType:"data",f:"json"},null),u={...this.requestOptions,...r,query:p},c=`${l}/jobs/${this.jobId}/results/${e}`,{data:h}=await(0,a.A)(c,u);return F(h)}async fetchResultImage(e,t,r){const{path:n}=(0,A.Dl)(this.sourceUrl),o=O({...t.toJSON(),f:"json"}),i={...this.requestOptions,...r,query:o},s=`${n}/jobs/${this.jobId}/results/${e}`,{data:d}=await(0,a.A)(s,i);return F(d)}async fetchResultMapImageLayer(){const{path:e}=(0,A.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),n=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(8096),r.e(13),r.e(1214),r.e(1956),r.e(3926),r.e(4111),r.e(364),r.e(3249),r.e(7656),r.e(8407)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=U,signal:r,statusCallback:n}=e;return new Promise((e,o)=>{(0,d.u7)(r,()=>{this.clearJobCompletionTimer(),o((0,d.NK)())}),this.clearJobCompletionTimer();const a=()=>{this._jobCompletionTimer||o((0,d.NK)()),this.checkJobStatus().then(({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":n&&n(this),this._jobCompletionTimer=setTimeout(a,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":o(this);break;default:this._jobCompletionTimer=setTimeout(a,t)}}).catch(e=>{o(e)})};this._jobCompletionTimer=setTimeout(a,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,c.Cg)([(0,y.MZ)()],L.prototype,"jobId",void 0),(0,c.Cg)([(0,G.e)(q,{ignoreUnknown:!1})],L.prototype,"jobStatus",void 0),(0,c.Cg)([(0,y.MZ)({type:[$.A]})],L.prototype,"messages",void 0),(0,c.Cg)([(0,y.MZ)()],L.prototype,"progress",void 0),(0,c.Cg)([(0,y.MZ)()],L.prototype,"requestOptions",void 0),(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],L.prototype,"sourceUrl",void 0),L=N=(0,c.Cg)([(0,f.$)("esri.rest.support.JobInfo")],L);let z=class extends h.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,c.Cg)([(0,y.MZ)()],z.prototype,"headerKeys",void 0),(0,c.Cg)([(0,y.MZ)()],z.prototype,"outSpatialReference",void 0),(0,c.Cg)([(0,y.MZ)()],z.prototype,"exceededTransferLimit",void 0),z=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],z);let J=class extends h.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new z}};(0,c.Cg)([(0,y.MZ)()],J.prototype,"resultRows",void 0),(0,c.Cg)([(0,y.MZ)()],J.prototype,"resultHeader",void 0),J=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResult")],J);let K=class extends h.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new z}};(0,c.Cg)([(0,y.MZ)()],K.prototype,"resultRowsStream",void 0),(0,c.Cg)([(0,y.MZ)()],K.prototype,"resultHeader",void 0),K=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],K);let V=class extends b.o{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"name",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"unique",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"ascending",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"description",void 0),(0,c.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],V.prototype,"fieldNames",void 0),V=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.FieldIndex")],V);let Q=class extends b.o{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"name",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"alias",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"fieldType",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"geometryType",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"hasM",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"hasZ",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"nullable",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"editable",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"required",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"defaultVisibility",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"systemMaintained",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"role",void 0),(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],Q.prototype,"defaultValue",void 0),Q=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphProperty")],Q);let B=class extends b.o{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"name",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"alias",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"role",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"strict",void 0),(0,c.Cg)([(0,y.MZ)({type:[Q],json:{write:!0}})],B.prototype,"properties",void 0),(0,c.Cg)([(0,y.MZ)({type:[V],json:{write:!0}})],B.prototype,"fieldIndexes",void 0),B=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphObjectType")],B);let H=class extends B{constructor(e){super(e),this.type="entity"}};H=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.EntityType")],H);let W=class extends B{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,c.Cg)([(0,y.MZ)({json:{write:!0}})],W.prototype,"endPoints",void 0),W=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.RelationshipType")],W);let Y=class extends b.o{constructor(e){super(e),this.value=null,this.behavior=null}};(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"value",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"behavior",void 0),Y=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],Y);let X=class extends b.o{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,c.Cg)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],X.prototype,"timestamp",void 0),(0,c.Cg)([(0,y.MZ)({type:u.A,json:{write:!0}})],X.prototype,"spatialReference",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"strict",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"objectIdField",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"globalIdField",void 0),(0,c.Cg)([(0,y.MZ)()],X.prototype,"arcgisManaged",void 0),(0,c.Cg)([(0,y.MZ)()],X.prototype,"identifierInfo",void 0),(0,c.Cg)([(0,y.MZ)()],X.prototype,"searchIndexes",void 0),(0,c.Cg)([(0,y.MZ)({type:[H],json:{write:!0}})],X.prototype,"entityTypes",void 0),(0,c.Cg)([(0,y.MZ)({type:[W],json:{write:!0}})],X.prototype,"relationshipTypes",void 0),(0,c.Cg)([(0,y.MZ)({type:[H],json:{write:!0}})],X.prototype,"metaEntityTypes",void 0),(0,c.Cg)([(0,y.MZ)({type:[Y],json:{write:!0}})],X.prototype,"provenanceSourceTypeValues",void 0),X=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.DataModel")],X);let ee=class extends b.o{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,c.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ee.prototype,"capabilities",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"supportsSearch",void 0),(0,c.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ee.prototype,"supportedQueryFormats",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"allowGeometryUpdates",void 0),(0,c.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ee.prototype,"searchMaxRecordCount",void 0),(0,c.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ee.prototype,"serviceCapabilities",void 0),(0,c.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ee.prototype,"maxRecordCount",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"copyrightText",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"units",void 0),(0,c.Cg)([(0,y.MZ)({type:u.A,json:{write:!0}})],ee.prototype,"spatialReference",void 0),(0,c.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ee.prototype,"currentVersion",void 0),(0,c.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ee.prototype,"dateFieldsTimeReference",void 0),(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"serviceItemId",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"supportsDocuments",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"dataEditingNotSupported",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"schemaEditingNotSupported",void 0),(0,c.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"supportsProvenance",void 0),ee=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.ServiceDefinition")],ee);let te=class extends b.o{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function re(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function ne(e){return e?.error_code?new i.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function oe(e,t,r,n=!1){const o=new r.ClientDataFetchRequestEncoder;o.deleteLater();for(const a of e){const e=ae(a,t,r,n);o.add_client_data_fetch_request_parameter(e)}o.encode();const a=o.get_encoding_result();return re(a.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(a.get_byte_buffer())}function ae(e,t,r,n){const o=new r.ClientDataKey;o.deleteLater(),o.key_string=e;const a=new r.ClientDataFetchRequestParameter;a.deleteLater(),a.set_key(o);const i=t.get(e);return i&&!n&&(a.v_tag={v_tag:i.version}),a}(0,c.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"url",void 0),(0,c.Cg)([(0,y.MZ)({type:X,json:{write:!0}})],te.prototype,"dataModel",void 0),(0,c.Cg)([(0,y.MZ)({type:ee,json:{write:!0}})],te.prototype,"serviceDefinition",void 0),te=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],te);var ie=r(45724),se=r(48526),de=r(86738),le=r(39829),pe=r(82799);const ue={exclude:0,include:1};function ce(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ge(e,t))}),r}function he(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,o]of Object.entries(e))r.set_key_value(n,ge(o,t));return r}function ye(e,t){if(e instanceof se.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=e.points.length;let a=0;return e.points.forEach(e=>{e.forEach(e=>{n[a]=e,a++})}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof de.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=1,n[0]=e.x,n[1]=e.y;let a=2;return e.hasZ&&(n[a]=e.z,a++),e.hasM&&(n[a]=e.m,a++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof pe.A||e instanceof le.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];let a=[];e instanceof pe.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,a=e.paths):e instanceof le.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,a=e.rings);let i=0,s=0;return a.forEach(e=>{let t=0;e.forEach(e=>{t++,e.forEach(e=>{n[s]=e,s++})}),o[i]=t,i++}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);throw new i.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function ge(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof p.A)return ye(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(ge(e,t))}),r}return he(e,t)}var fe=r(35448);function we(e,t){if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,Ce(o,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,Ce(o,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new i.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function me(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:fe.r5[e.fieldType]},r.geometry_type={value:e.geometryType?fe.bV[e.geometryType]:fe.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:fe.ti[e.role]},r.default_value=Ce(e.defaultValue,t),r}function _e(e,t){const r=new t.SearchIndexProperties;r.deleteLater();for(const t of e.propertyNames)r.add_search_property_name(t);return r}function ve(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:fe.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=me(n,t);r.add_property(e)}return r}function be(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function Ce(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof p.A?ye(e,t):null}let Ae=class extends h.A{constructor(e){super(e),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};(0,c.Cg)([(0,y.MZ)()],Ae.prototype,"decoderError",void 0),(0,c.Cg)([(0,y.MZ)()],Ae.prototype,"resultsCount",void 0),(0,c.Cg)([(0,y.MZ)()],Ae.prototype,"results",void 0),(0,c.Cg)([(0,y.MZ)()],Ae.prototype,"updatedKnowledgeGraph",void 0),Ae=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],Ae);const Ge=Ae;let Me=class extends Ge{constructor(e){super(e)}};Me=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],Me);const xe=Me;let Te=class extends Ge{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};(0,c.Cg)([(0,y.MZ)()],Te.prototype,"entityAddResultsCount",void 0),(0,c.Cg)([(0,y.MZ)()],Te.prototype,"relationshipAddResultsCount",void 0),(0,c.Cg)([(0,y.MZ)()],Te.prototype,"entityAddResults",void 0),(0,c.Cg)([(0,y.MZ)()],Te.prototype,"relationshipAddResults",void 0),Te=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],Te);const Pe=Te;let Se=class extends Ge{constructor(e){super(e)}};Se=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Se);const ke=Se;let je=class extends Ge{constructor(e){super(e)}};je=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],je);const Re=je;let Ie=class extends Ge{constructor(e){super(e)}};Ie=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],Ie);const De=Ie;let Ze=class extends Ge{constructor(e){super(e)}};Ze=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],Ze);const Ee=Ze;let Fe=class extends Ge{constructor(e){super(e)}};Fe=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],Fe);const Oe=Fe;let Ne=class extends Ge{constructor(e){super(e)}};Ne=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],Ne);const $e=Ne;let qe=class extends Ge{constructor(e){super(e)}};qe=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],qe);const Ue=qe;function Le(e,t){const r=[];for(let n=0;n<t;n++){const t=e.get_result_at(n);r.push({name:t.get_name(),error:ne(t.get_error())})}return r}function ze(e){const t=e.get_results_count(),r=e.get_entity_type_add_results_count(),n=e.get_relationship_type_add_results_count(),o=new Pe({resultsCount:t,results:Le(e,t),decoderError:ne(e.error),entityAddResultsCount:r,relationshipAddResultsCount:n});for(let t=0;t<r;t++){const r=e.get_entity_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.entityAddResults.push({name:n,error:ne(a)})}for(let t=0;t<n;t++){const r=e.get_relationship_type_add_results_at(t),n=r.get_name(),a=r.get_error();o.relationshipAddResults.push({name:n,error:ne(a)})}return o}function Je(e){const t=e.get_results_count();return new Oe({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Ke(e){const t=e.get_results_count();return new De({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Ve(e){const t=e.get_results_count();return new ke({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Qe(e){const t=e.get_results_count();return new Ee({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Be(e){const t=e.get_results_count();return new $e({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function He(e){const t=e.get_results_count();return new Ue({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function We(e){const t=e.get_results_count();return new xe({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}function Ye(e){const t=e.get_results_count();return new Re({resultsCount:t,results:Le(e,t),decoderError:ne(e.error)})}var Xe=r(93637);let et=class extends h.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,c.Cg)([(0,y.MZ)()],et.prototype,"name",void 0),(0,c.Cg)([(0,y.MZ)()],et.prototype,"supportedCategory",void 0),(0,c.Cg)([(0,y.MZ)()],et.prototype,"analyzers",void 0),(0,c.Cg)([(0,y.MZ)()],et.prototype,"searchProperties",void 0),et=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.SearchIndex")],et);let tt=!1;function rt(e){return e.deleteLater(),new H(ot(e))}function nt(e){return e.deleteLater(),new V({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:lt(e.fields)})}function ot(e){return{name:e.name,alias:e.alias,role:(0,Xe.i7)(fe.Eq,e.role.value),strict:e.strict,properties:pt(e.properties),fieldIndexes:ut(e.field_indexes)}}function at(e){return e.deleteLater(),new Q({alias:e.alias,name:e.name,fieldType:(0,Xe.i7)(fe.r5,e.field_type.value)??void 0,geometryType:(0,Xe.i7)(fe.bV,e.geometry_type.value)??null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:(0,Xe.i7)(fe.ti,e.role.value),defaultValue:e.default_value})}function it(e){e.deleteLater();const t=ot(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new W(Object.assign({endPoints:r},t))}function st(e){return new Y({behavior:e.behavior,value:e.value})}function dt(e){const t=[];for(let r=0;r<e.size();r++)t.push(rt(e.get(r)));return e.delete(),t}function lt(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function pt(e){const t=[];for(let r=0;r<e.size();r++){const n=at(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(tt=!0),t.push(n)}return e.delete(),t}function ut(e){const t=[];for(let r=0;r<e.size();r++)t.push(nt(e.get(r)));return e.delete(),t}function ct(e){const t=[];for(let r=0;r<e.size();r++)t.push(it(e.get(r)));return e.delete(),t}function ht(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(st(n))}return e.delete(),t}function yt(e){const t=[];for(let r=0;r<e.size();r++){const n=new et,o=e.get(r);n.name=o.name,n.supportedCategory=(0,Xe.i7)(fe.nP,o.supported_category.value);const a=o.analyzers.size();for(let e=0;e<a;e++)n.analyzers.push({name:o.analyzers.get(e).name});o.analyzers.delete();for(let e=0;e<o.search_properties.keys().size();e++){const t=o.search_properties.keys().get(e),r=o.search_properties.get(t),a=[];for(let e=0;e<r.property_names.size();e++)a.push(r.property_names.get(e));n.searchProperties.set(t,{propertyNames:a})}t.push(n)}return e.delete(),t}var gt=r(25927),ft=(r(77901),r(40662)),wt=r(42095),mt=r(23150);function _t(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=vt(e,r),{coords:o,geometry_type:a,lengths:s}=e;if(a.value!==t)throw new i.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let d=0;return s.forEach(e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=o[d],d++;t.push(e)}r.paths.push(t)}),r}function vt(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}const bt=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function Ct(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case 1:return function(e,t){const r={spatialReference:t};let n=2;vt(e,r);const o=e.coords;return r.x=o[0],r.y=o[1],e.has_z&&(r.z=o[n],n++),e.has_m&&(r.m=o[n]),new de.A(r)}(e,r);case 2:return function(e,t){const r={spatialReference:t},n=vt(e,r),o=e.lengths,a=e.coords,i=o[0];r.points=[];let s=0;for(let e=0;e<i;e++){const e=[];for(let t=0;t<n;t++)e[t]=a[s],s++;r.points.push(e)}return new se.A(r)}(e,r);case 3:return function(e,t){const{paths:r,hasM:n,hasZ:o}=_t(e,3);return new pe.A({paths:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 4:return function(e,t){const{paths:r,hasM:n,hasZ:o}=_t(e,4);return new le.A({rings:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case 5:case 7:return bt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;default:return bt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return bt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case 0:return function(e,t,r){return new ft.A(Gt(e,t,r))}(e,t,r);case 1:return At(e,t,r);case 2:return Mt(e,t,r);case 3:return function(e,t,r){const n=e.entity_count(),o=e.relationship_count(),a=[];for(let i=0;i<n;i++)a.push(At(e.get_entity_at(i),t,r)),i<o&&a.push(Mt(e.get_relationship_at(i),t,r));return new wt.A({path:a})}(e,t,r);case 4:return function(e,t,r){const n=[],o=e.count();for(let a=0;a<o;a++){const o=e.get_value_at(a);n.push(Ct(o,t,r))}return n}(e,t,r);default:return bt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function At(e,t,r){const n=e.type_name,o=Gt(e,t,r),a=e.get_id();return new gt.A(Object.assign({typeName:n,id:a},o))}function Gt(e,t,r){const n={},o=e.key_count();for(let a=0;a<o;a++)n[e.get_key_at(a)]=Ct(e.get_value_at(a),t,r);return{properties:n}}function Mt(e,t,r){const n=e.type_name,o=Gt(e,t,r);return new mt.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},o))}function xt(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new u.A(e.get_out_sr());return new z({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let Tt=class extends h.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[]}};(0,c.Cg)([(0,y.MZ)()],Tt.prototype,"hasError",void 0),(0,c.Cg)([(0,y.MZ)()],Tt.prototype,"error",void 0),(0,c.Cg)([(0,y.MZ)()],Tt.prototype,"editResults",void 0),Tt=(0,c.Cg)([(0,f.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],Tt);const Pt=Tt;function St(e){const t=e.has_error(),r=new Pt({hasError:t,error:t?ne(e.error):null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t),o=e.get_edit_results_type_name_at(t),a=[],i=[],s=[],d=n.get_add_results_count(),l=n.get_update_results_count(),p=n.get_delete_results_count();for(let e=0;e<d;e++){const t=n.get_add_result_at(e);a.push({id:t.id,error:ne(t.error)})}for(let e=0;e<l;e++){const t=n.get_update_result_at(e);i.push({id:t.id,error:ne(t.error)})}for(let e=0;e<p;e++){const t=n.get_delete_result_at(e);s.push({id:t.id,error:ne(t.error)})}r.editResults.push({typeName:o,adds:a,updates:i,deletes:s})}return r}const kt=new Map,jt=()=>new Map(kt.entries()),Rt={fetchKnowledgeGraph:async e=>{const t=new te({url:e}),r=[];return r.push(Ht(t)),r.push(Wt(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await hr(e)},refreshServiceDefinition:async e=>{const t=(await(0,a.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new ee(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await or(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`;return await nr(`${n}${a}`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],o=(await or(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,a=`/rest/services/${o&&o<12?"System":"Utilities"}/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,s=await or(`${n}${a}`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(s.data.results.length<1)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",s);let d;for(const e of s.data.results)if("out_results_string"===e.paramName){d=e.value;break}if(!d)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",s);return d},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await ar(e);const o=await sr(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new i.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");o.data.body=await async function(e,t){const r=await(0,ie.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,o]of Object.entries(e.bindParameters))ir(t,o,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await Ht(t),4326!==t.dataModel?.spatialReference?.wkid)throw new i.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:ue[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const o=n.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return(0,l.OO)(structuredClone(o.get_byte_buffer()))}(t,e);const a=await rr(o.data.url,o.data);if(e.dataModel){const t=await cr(a,e.dataModel);return new K({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new i.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await ar(e);const o=await sr(n,r);return o.data.body=await async function(e,t){if(t.dataModel||await Ht(t),!t.dataModel)throw new i.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,ie.I)(),n=!!e.options?.cascadeDelete,o=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());o.deleteLater(),o.cascade_delete=n;try{let t;e.entityAdds?.forEach(e=>{t=o.add_entity(we(e,r)),re(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipAdds?.forEach(e=>{if(!e.originId||!e.destinationId)throw new i.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=o.add_relationship(we(e,r)),re(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_entity(we(e,r)),re(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_relationship(we(e,r)),re(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach(e=>{t.delete_by_id(e)})}),e.relationshipDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!1);e.ids?.forEach(e=>{t.delete_by_id(e)})}),o.encode()}catch(e){throw new i.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const a=o.get_encoding_result();return re(a.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),(0,l.OO)(structuredClone(a.get_byte_buffer()))}(t,e),async function(e){return dr(e,(await(0,ie.I)()).GraphApplyEditsDecoder,St)}(await rr(o.data.url,o.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new i.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");const n=`${e.url}/dataModel/edit/namedTypes/add`;await ar(e);const o=await sr(n,r);o.data.body=await async function(e){const t=await(0,ie.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach(e=>{r.add_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),ve(e,t,r)}(e,t))}),e.newRelationshipTypes?.forEach(e=>{r.add_relationship_type(function(e,t){const r=new t.RelationshipType;r.deleteLater();for(const n of e.endPoints){const e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=n.originEntityType,e.dest_entity_type=n.destinationEntityType,r.add_end_point(e)}return ve(e,t,r)}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}const n=r.get_encoding_result();return re(n.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),(0,l.OO)(structuredClone(n.get_byte_buffer()))}(t);const a=await rr(o.data.url,o.data),s=await async function(e){return dr(e,(await(0,ie.I)()).GraphNamedObjectTypeAddsResponseDecoder,ze)}(a);return s.updatedKnowledgeGraph=await Bt(e.url),s},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");const n=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await ar(e);const o=await sr(n,r);o.data.body="";const a=await rr(o.data.url,o.data),s=await async function(e){return dr(e,(await(0,ie.I)()).GraphNamedObjectTypeDeleteResponseDecoder,Ke)}(a);return s.updatedKnowledgeGraph=await Bt(e.url),s},executeUpdateNamedType:async(e,t,r,n)=>{if(!t&&!Object.keys(r).length)throw new i.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e,t,r){const n=await(0,ie.I)(),o=new n.GraphNamedObjectTypeUpdateRequestEncoder;if(o.deleteLater(),r.entityTypes.some(e=>e.name===t))o.update_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),be(e,r)}(e,n));else{if(!r.relationshipTypes.some(e=>e.name===t))throw new i.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");o.update_relationship_type(function(e,t){const r=new t.RelationshipType;return r.deleteLater(),be(e,r)}(e,n))}o.update_alias=e.hasOwnProperty("alias");try{o.encode()}catch(e){throw new i.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}const a=o.get_encoding_result();return re(a.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),(0,l.OO)(structuredClone(a.get_byte_buffer()))}(r,t,e.dataModel);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphNamedObjectTypeUpdateResponseDecoder,Je)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeAddGraphProperties:async(e,t,r,n)=>{if(!t&&!r.length)throw new i.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e){const t=await(0,ie.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_graph_property(me(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}const n=r.get_encoding_result();return re(n.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),(0,l.OO)(structuredClone(n.get_byte_buffer()))}(r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphPropertyAddsResponseDecoder,Ve)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeDeleteGraphProperty:async(e,t,r,n)=>{if(!t&&!r)throw new i.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e){const t=new((await(0,ie.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}const r=t.get_encoding_result();return re(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),(0,l.OO)(structuredClone(r.get_byte_buffer()))}(r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphPropertyDeleteResponseDecoder,Qe)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeUpdateGraphProperty:async(e,t,r,n,o)=>{if(!t&&!r&&!Object.keys(n).length)throw new i.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await ar(e);const s=await sr(a,o);s.data.body=await async function(e,t){const r=await(0,ie.I)(),n=new r.GraphPropertyUpdateRequestEncoder;n.deleteLater(),n.update_graph_property(function(e,t){const r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=Ce(e.defaultValue,t)),r}(t,r)),n.set_property_name(e),n.update_alias=t.hasOwnProperty("alias"),n.update_editable=t.hasOwnProperty("editable"),n.update_required=t.hasOwnProperty("required"),n.update_visible=t.hasOwnProperty("defaultVisibility"),n.update_default_value=t.hasOwnProperty("defaultValue");try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}const o=n.get_encoding_result();return re(o.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),(0,l.OO)(structuredClone(o.get_byte_buffer()))}(r,n);const d=await rr(s.data.url,s.data),p=await async function(e){return dr(e,(await(0,ie.I)()).GraphPropertyUpdateResponseDecoder,Be)}(d);return p.updatedKnowledgeGraph=await Bt(e.url),p},executeAddGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/add`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e){const t=await(0,ie.I)(),r=new t.GraphIndexAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_field_index(function(e,t){const r=new t.FieldIndex;r.deleteLater(),r.name=e.name,r.unique=e.unique,r.ascending=e.ascending,r.description=e.description??"";for(const t of e.fieldNames)r.add_field(t);return r}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed",{error:e})}const n=r.get_encoding_result();return re(n.error,"knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed"),(0,l.OO)(structuredClone(n.get_byte_buffer()))}(r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphIndexAddsResponseDecoder,We)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeDeleteGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/delete`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e){const t=new((await(0,ie.I)()).GraphIndexDeleteRequestEncoder);t.deleteLater(),e.forEach(e=>{t.add_index_name(e)});try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed",{error:e})}const r=t.get_encoding_result();return re(r.error,"knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed"),(0,l.OO)(structuredClone(r.get_byte_buffer()))}(r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphIndexDeleteResponseDecoder,Ye)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeUpdateSearchIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");const o=`${e.url}/dataModel/searchIndex/update`;await ar(e);const a=await sr(o,n);a.data.body=await async function(e,t){const r=await(0,ie.I)(),n=new r.GraphUpdateSearchIndexRequestEncoder;n.deleteLater(),t.hasOwnProperty("addSearchProperties")&&n.insert_add_search_property(e,_e(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&n.insert_delete_search_property(e,_e(t.removeSearchProperties,r));try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}const o=n.get_encoding_result();return re(o.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),(0,l.OO)(structuredClone(o.get_byte_buffer()))}(t,r);const s=await rr(a.data.url,a.data),d=await async function(e){return dr(e,(await(0,ie.I)()).GraphUpdateSearchIndexResponseDecoder,He)}(s);return d.updatedKnowledgeGraph=await Bt(e.url),d},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,o=await(0,a.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=o.getHeader?.("content-type"),d=o.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,ie.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ur({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:o.data})},executeSearch:async(e,t,r)=>{const n=t.typeCategoryFilter,o=`${e.url}/graph/search`,s=await(0,a.A)(o,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),d=s.getHeader?.("content-type"),l=s.data;if(d?.includes("application/x-protobuf")){const t=new((await(0,ie.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ur({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:d,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await ar(e);const o=await sr(n,r);o.data.body=await async function(e){const t=await(0,ie.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(ce(e.idsFilter,t))}catch(e){throw new i.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach(e=>{r.add_named_type_filter(e)});try{r.encode()}catch(e){throw new i.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const n=r.get_encoding_result();if(0!==n.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return(0,l.OO)(structuredClone(n.get_byte_buffer()))}(t);const a=await rr(o.data.url,o.data);if(e.dataModel){const t=await cr(a,e.dataModel);return new K({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let n=kt.get(e.url||"");n||(n=new Map,kt.set(e.url||"",n));const o=new Map(n.entries()),a=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,ie.I)(),d=oe(t,n,s,r.ignoreCache),l=await sr(a,r.requestOptions);l.data.body=d;const p=await rr(l.data.url,l.data),u=p.headers.get("content-type");if(u?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await p.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&re(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const o=new Map;for(let a=0;a<e.get_results_count();a++){const i=e.get_result_at(a);if(2!==i.get_fetch_result_case().value||0!==i.error().error_code){const e=i.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=i.get_value(),d=i.get_key().key_string,l=r.get(d);let p;if(2===s.get_data_case().value&&l)p=l.value;else{if(1!==s.get_data_case().value)continue;{p=s.get_data().client_data_string;const e=i.get_value().get_v_tag().v_tag;n||t.set(d,{key:d,version:e,value:p})}}o.set(d,p)}return o}(e,n,o,r.ignoreCache)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:u,data:p})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,n=await(0,a.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),o=n.getHeader?.("content-type"),s=n.data;if(o?.includes("application/x-protobuf")){const e=new((await(0,ie.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&re(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);1===n.get_client_data_key_type().value&&r.push(n.key_string)}return r}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:o,data:n.data})},clearClientDataCache:()=>kt.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=m.from(r||{}),async function(e,t,r,n,o){const i={},s={},d=[];return function(e,t,r){for(const n in e){const o=e[n];if(o&&"object"==typeof o&&o instanceof P.A){const{features:e}=o;r[n]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}}}(n,d,i),(0,_.el)(d).then(d=>{const{outSpatialReference:l,processExtent:p,processSpatialReference:u,returnColumnName:c,returnFeatureCollection:h,returnM:y,returnZ:g}=r,{path:f}=(0,A.Dl)(e);for(const e in i){const[t,r]=i[e];s[e]=d.slice(t,r)}const w=l?l.wkid||l:null,m=u?u.wkid||u:null,_="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:h||void 0,returnM:y||void 0,returnZ:g||void 0}:null,v=O({...p?{context:{extent:p,outSR:w,processSR:m}}:{"env:outSR":w,"env:processSR":m},...n,..._,f:"json"},null,s),b={...o,query:v};return(0,a.A)(`${f}/${t}`,b)})}(e,"submitJob",r,t??{},n).then(({data:t})=>{const r=L.fromJSON(t);return r.sourceUrl=e,r})}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,a.A)(e,t)};async function It(e,t,r){return Rt.executeApplyEdits(e,t,r)}async function Dt(e,t,r){return Rt.executeAddNamedTypes(e,t,r)}async function Zt(e,t,r){return Rt.executeDeleteNamedType(e,t,r)}async function Et(e,t,r,n){return Rt.executeUpdateNamedType(e,t,r,n)}async function Ft(e,t,r,n){return Rt.executeAddGraphProperties(e,t,r,n)}async function Ot(e,t,r,n){return Rt.executeDeleteGraphProperty(e,t,r,n)}async function Nt(e,t,r,n,o){return Rt.executeUpdateGraphProperty(e,t,r,n,o)}async function $t(e,t,r,n){return Rt.executeAddGraphFieldIndex(e,t,r,n)}async function qt(e,t,r,n){return Rt.executeDeleteGraphFieldIndex(e,t,r,n)}async function Ut(e,t,r,n){return Rt.executeUpdateSearchIndex(e,t,r,n)}async function Lt(e,t,r){return Rt.executeQuery(e,t,r)}async function zt(e,t,r){return Rt.executeQueryStreaming(e,t,r)}async function Jt(e,t,r){return Rt.executeSearch(e,t,r)}async function Kt(e,t,r){return Rt.executeSearchStreaming(e,t,r)}function Vt(e,t){return Rt.fetchAllClientDataKeys(e,t)}function Qt(e,t,r){return Rt.fetchClientDataAtKeys(e,t,r)}async function Bt(e){return Rt.fetchKnowledgeGraph(e)}async function Ht(e){return Rt.refreshDataModel(e)}async function Wt(e){return Rt.refreshServiceDefinition(e)}async function Yt(e,t){return Rt.executeFindPathsAsynchronous(e,t)}async function Xt(e,t){return Rt.executeFindPaths(e,t)}async function er(e,t){return Rt.fetchAsynchronousFindPathsResultData(e,t)}function tr(){return Rt.clearClientDataCache()}async function rr(e,t){return Rt._fetchWrapper(e,t)}async function nr(e,t,r,n){return Rt._submitJobWrapper(e,t,r,n)}async function or(e,t){return Rt._esriRequestWrapper(e,t)}async function ar(e){const t=o.id?.findCredential(e.url);t||(e.dataModel?await hr(e):await Ht(e))}function ir(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof p.A?r.set_param_key_value(e,ye(t,n)):Array.isArray(t)?r.set_param_key_value(e,ce(t,n)):r.set_param_key_value(e,he(t,n))}async function sr(e,t){return(0,a.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}async function dr(e,t,r){const n=e.headers.get("content-type");if(n?.includes("application/x-protobuf")){const n=await e.arrayBuffer(),o=new t;try{return o.decode(new Uint8Array(n)),r(o)}finally{o.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:await e.text()})}let lr=50;function pr(e){lr=e}function ur({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:o=!1}){t&&e.push_buffer(new Uint8Array(t));const a=[];let s,d,l=0;const p=Date.now();let c=!0;for(;e.next_row();){s&&d||(s=n??xt(e),d=s.outSpatialReference??new u.A({wkid:4326})),l||(l=e.get_header_keys().size());const t=new Array(l);for(let n=0;n<l;n++){const o=e.get_value(n);t[n]=Ct(o,r,d)}if(a.push(t),o&&Date.now()-p>lr){c=!1;break}}if(e.has_error())throw new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:s,resultRows:a,parsedAllResultsFromBuffer:c}}async function cr(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,ie.I)()).GraphQueryDecoder);let o,a,l;n.deleteLater();const p=new Promise((e,t)=>{a=e,l=t});let u=!1,c=null;const h=new ReadableStream({pull:async function e(p){if(!r){const e=new i.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw l(e),e}const{done:h,value:y}=c?{done:!1,value:null}:await r.read().catch(e=>{throw l(e),r.releaseLock(),e});y&&(c=y);try{if(h){let e;if(n.has_error()?e=new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):u||a(new z),r.releaseLock(),e)throw p.error(e),l(e),e;return void p.close()}const{resultHeader:s,resultRows:d,parsedAllResultsFromBuffer:g}=ur({wasmQueryDecoder:n,newArrayBufferToParse:y,dataModel:t,decodedHeader:o,limitMaxProcessingTime:!0});return g&&(c=null),!o&&s&&(o=s,a(s),u=!0),d.length>0?void p.enqueue(d):await e(p)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),l(e),r.releaseLock(),(0,d.zf)(e)?e:new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:h,resultHeader:await p}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function hr(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,a.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),o=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,ie.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(o));if(!e)throw new i.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),tt=!1;const t=new X({timestamp:e.timestamp,spatialReference:new u.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:(0,Xe.i7)(fe.vy,e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value),databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:(0,Xe.i7)(fe.wr,e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value)}},searchIndexes:yt(e.search_indexes),entityTypes:dt(e.entity_types),relationshipTypes:ct(e.relationship_types),metaEntityTypes:dt(e.meta_entity_types),provenanceSourceTypeValues:ht(e.provenance_source_type_values.value_behavior_array)});return tt&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4167],{28879:(e,t,n)=>{n.r(t),n.d(t,{OperatorGeodeticLength:()=>m});var s=n(31635),o=n(55537),r=n(47591),a=n(88885),i=n(83661),c=n(39117),g=n(5247);class m{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,s){if(4===n)return(new r.O).execute(e,t,s);if(0===t.getCoordinateSystemType()&&(0,o.a)(""),(0,o.c)(e),e.isEmpty()||e.getDimension()<1)return 0;const m=t.getGCS(),u=(0,c.F)();m.querySpheroidData(u);const l=u.majorSemiAxis,h=u.e2,y=m.getUnit().getUnitToBaseFactor();let x;const p=e.getGeometryType();if(p===o.G.enumPolygon?x=e.getBoundary():p===o.G.enumEnvelope?x=(0,a.c)(e):(0,o.f)(p)?(x=new a.P({vd:e.getDescription()}),x.addSegment(e,!0)):x=e,x.hasNonLinearSegments()&&(x=(new g.O).execute(x,0,t.getTolerance(0),0,s)),m!==t){const n=t.getSRToGCSTransform();if(t.isPannable()){x=(0,c.af)(x,t),p===o.G.enumPolyline&&x===e&&(x=e.clone());const n=new i.E;t.getPannableExtent().queryIntervalX(n);for(let e=0,t=x.getPointCount();e<t;e++){const t=x.getXY(e);t.x=(0,c.al)(t.x,n),x.setXY(e,t)}}const r=x.createInstance();x=(0,c.am)(n,x,r,s)?r:(new c.O).execute(x,n,s)}return this._ExecuteMultiPathGeodeticLength(x,n,l,h,y)}_ExecuteMultiPathGeodeticLength(e,t,n,o,r){const a={stack:[],error:void 0,hasError:!1};try{const i=(0,s.mS)(a,new c.a7,!1);let g=0;const m=e.querySegmentIterator();for(;m.nextPath();)for(;m.hasNextSegment();){const e=m.nextSegment(),s=e.getStartXY(),a=e.getEndXY();s.scale(r),a.scale(r),c.a8.geodeticDistance(n,o,s.x,s.y,a.x,a.y,i,null,null,t),g+=i.val}return g}catch(e){a.error=e,a.hasError=!0}finally{(0,s.hk)(a)}}}},47591:(e,t,n)=>{n.d(t,{O:()=>x});var s=n(55537),o=n(39117),r=n(88885),a=n(83661),i=n(95213),c=n(79187),g=n(5247),m=n(31139);function u(){return{m_pGcs:new a.P,m_xyz:new i.d,m_factor:Number.NaN,m_geoLength:Number.NaN,setValues:l,setLength:h,assign:y}}function l(e,t,n,s){this.m_factor=e,this.m_pGcs.assign(t),this.m_xyz.assign(s),this.m_geoLength=n}function h(e){this.m_geoLength=e}function y(e){this.m_pGcs.assign(e.m_pGcs),this.m_xyz.assign(e.m_xyz),this.m_factor=e.m_factor,this.m_geoLength=e.m_geoLength}class x{getOperatorType(){return 10315}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}_ExecuteShapePreservingLength(e,t,n,s,r){if(e.hasNonLinearSegments()&&(e=(new g.O).execute(e,0,t.getTolerance(0),0,r)),t.isPannable()){let s=90,a=-90;if(1===n.getUnit().getUnitToBaseFactor()&&(s*=Math.PI/180,a*=Math.PI/180),2===t.getCoordinateSystemType()){let e=null;const n=[0,0,0,0];e=t.getPECoordSys(),n[0]=0,n[1]=s,n[2]=0,n[3]=a,o.aj.geogToProj(e,2,n),s=n[1],a=n[3]}const i=new c.Envelope2D;e.queryEnvelope(i),i.ymin=a,i.ymax=s,e=(new m.O).execute(e,i,t,r)}else{const n=t.getPCSHorizon();if((e=(new o.Q).execute(e,n,t,r))===n){const t=e.clone();e=t}}return e.isEmpty()?0:this._ExecuteIterativeApproach(e,t,n,s,1,r)}_ExecuteIterativeApproach(e,t,n,r,c,g){const m=(0,o.F)();n.querySpheroidData(m);const l=m.majorSemiAxis,h=m.e2,y=n.getUnit().getUnitToBaseFactor(),x=(0,a.n)(u,40),_=(0,a.d)(40,Number.NaN),f=u(),S=u();let G;const P=[0,0,0,0],w=t.getPECoordSys(),C=new a.P,E=new a.P,v=new a.P,N=new a.P,T=new a.P;let L=0;const b=e.querySegmentIterator();for(;b.nextPath();)for(;b.hasNextSegment();){const e=b.nextSegment();C.assign(e.getStartXY()),E.assign(e.getEndXY()),2===t.getCoordinateSystemType()?(P[0]=C.x,P[1]=C.y,P[2]=E.x,P[3]=E.y,o.aj.projToGeog(w,2,P),v.x=P[0]*y,v.y=P[1]*y,N.x=P[2]*y,N.y=P[3]*y):(v.setCoordsPoint2D(C),N.setCoordsPoint2D(E),v.scale(y),N.scale(y));const n=new i.d,r=new i.d;p(l,h,v,n),p(l,h,N,r);let a=d(l,n,r);f.setValues(0,v,Number.NaN,n),S.setValues(1,N,a,r),G=c,x[0].assign(S),_[0]=c;let g=0;for(;;){g>128&&(0,s.d)("iterations exceeded");const n=.5*(f.m_factor+S.m_factor),r=e.getCoord2D(n);2===t.getCoordinateSystemType()?(P[0]=r.x,P[1]=r.y,o.aj.projToGeog(w,1,P),T.x=P[0]*y,T.y=P[1]*y):(T.setCoordsPoint2D(r),T.scale(y)),v.setCoordsPoint2D(f.m_pGcs),N.setCoordsPoint2D(S.m_pGcs);const m=new i.d;p(l,h,T,m);const u=d(l,f.m_xyz,m),C=d(l,S.m_xyz,m);a=S.m_geoLength,Number.isNaN(a)&&(a=d(l,f.m_xyz,S.m_xyz));const E=u+C,b=G===c&&E>=20&&Math.abs(E-a)>1e-8*(a+E);if(g+2<40&&(b||Math.abs(E-a)>0&&G>0))S.setLength(C),x[g].assign(S),S.setValues(n,T,u,m),x[++g].assign(S),b?(G=c,_[g]=c):(G--,_[g-1]=G,_[g]=G);else{if(L+=E,0===g)break;f.assign(S),S.assign(x[--g]),G=_[g]}}}return L}execute(e,t,n){if(t&&0!==t.getCoordinateSystemType()||(0,s.a)(""),e.isEmpty()||e.getDimension()<1)return 0;let a=null;const i=t.getGCS();i!==t&&(a=(0,o.g)(t,i,null));const c=e.getGeometryType();if(c===s.G.enumEnvelope){const s=new r.a;return s.addEnvelope(e,!1),this._ExecuteShapePreservingLength(s,t,i,a,n)}if((0,s.f)(c)){const s=new r.P;return s.addSegment(e,!0),this._ExecuteShapePreservingLength(s,t,i,a,n)}return this._ExecuteShapePreservingLength(e,t,i,a,n)}}function p(e,t,n,s){s.assign((0,o.a9)(e,t,n))}function d(e,t,n){const s=e,o=new i.d;o.setSub(t,n);const r=o.length();return 2*s*Math.asin(r/(2*s))}},76061:(e,t,n)=>{n.d(t,{G:()=>s,S:()=>o});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends s{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const 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}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4167],{28879:(e,t,n)=>{n.r(t),n.d(t,{OperatorGeodeticLength:()=>m});var s=n(31635),o=n(55537),r=n(47591),a=n(88885),i=n(83661),c=n(39117),g=n(5247);class m{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,s){if(4===n)return(new r.O).execute(e,t,s);if(0===t.getCoordinateSystemType()&&(0,o.a)(""),(0,o.c)(e),e.isEmpty()||e.getDimension()<1)return 0;const m=t.getGCS(),u=(0,c.r)();m.querySpheroidData(u);const l=u.majorSemiAxis,h=u.e2,y=m.getUnit().getUnitToBaseFactor();let x;const p=e.getGeometryType();if(p===o.G.enumPolygon?x=e.getBoundary():p===o.G.enumEnvelope?x=(0,a.c)(e):(0,o.f)(p)?(x=new a.P({vd:e.getDescription()}),x.addSegment(e,!0)):x=e,x.hasNonLinearSegments()&&(x=(new g.O).execute(x,0,t.getTolerance(0),0,s)),m!==t){const n=t.getSRToGCSTransform();if(t.isPannable()){x=(0,c.a7)(x,t),p===o.G.enumPolyline&&x===e&&(x=e.clone());const n=new i.E;t.getPannableExtent().queryIntervalX(n);for(let e=0,t=x.getPointCount();e<t;e++){const t=x.getXY(e);t.x=(0,c.a8)(t.x,n),x.setXY(e,t)}}const r=x.createInstance();x=(0,c.a9)(n,x,r,s)?r:(new c.O).execute(x,n,s)}return this._ExecuteMultiPathGeodeticLength(x,n,l,h,y)}_ExecuteMultiPathGeodeticLength(e,t,n,o,r){const a={stack:[],error:void 0,hasError:!1};try{const i=(0,s.mS)(a,new c.aa,!1);let g=0;const m=e.querySegmentIterator();for(;m.nextPath();)for(;m.hasNextSegment();){const e=m.nextSegment(),s=e.getStartXY(),a=e.getEndXY();s.scale(r),a.scale(r),c.ab.geodeticDistance(n,o,s.x,s.y,a.x,a.y,i,null,null,t),g+=i.val}return g}catch(e){a.error=e,a.hasError=!0}finally{(0,s.hk)(a)}}}},47591:(e,t,n)=>{n.d(t,{O:()=>x});var s=n(55537),o=n(39117),r=n(88885),a=n(83661),i=n(95213),c=n(79187),g=n(5247),m=n(31139);function u(){return{m_pGcs:new a.P,m_xyz:new i.d,m_factor:Number.NaN,m_geoLength:Number.NaN,setValues:l,setLength:h,assign:y}}function l(e,t,n,s){this.m_factor=e,this.m_pGcs.assign(t),this.m_xyz.assign(s),this.m_geoLength=n}function h(e){this.m_geoLength=e}function y(e){this.m_pGcs.assign(e.m_pGcs),this.m_xyz.assign(e.m_xyz),this.m_factor=e.m_factor,this.m_geoLength=e.m_geoLength}class x{getOperatorType(){return 10315}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}_ExecuteShapePreservingLength(e,t,n,s,r){if(e.hasNonLinearSegments()&&(e=(new g.O).execute(e,0,t.getTolerance(0),0,r)),t.isPannable()){let s=90,a=-90;if(1===n.getUnit().getUnitToBaseFactor()&&(s*=Math.PI/180,a*=Math.PI/180),2===t.getCoordinateSystemType()){let e=null;const n=[0,0,0,0];e=t.getPECoordSys(),n[0]=0,n[1]=s,n[2]=0,n[3]=a,o.ac.geogToProj(e,2,n),s=n[1],a=n[3]}const i=new c.Envelope2D;e.queryEnvelope(i),i.ymin=a,i.ymax=s,e=(new m.O).execute(e,i,t,r)}else{const n=t.getPCSHorizon();if((e=(new o.Q).execute(e,n,t,r))===n){const t=e.clone();e=t}}return e.isEmpty()?0:this._ExecuteIterativeApproach(e,t,n,s,1,r)}_ExecuteIterativeApproach(e,t,n,r,c,g){const m=(0,o.r)();n.querySpheroidData(m);const l=m.majorSemiAxis,h=m.e2,y=n.getUnit().getUnitToBaseFactor(),x=(0,a.k)(u,40),_=(0,a.d)(40,Number.NaN),f=u(),S=u();let G;const P=[0,0,0,0],w=t.getPECoordSys(),E=new a.P,C=new a.P,v=new a.P,N=new a.P,T=new a.P;let L=0;const b=e.querySegmentIterator();for(;b.nextPath();)for(;b.hasNextSegment();){const e=b.nextSegment();E.assign(e.getStartXY()),C.assign(e.getEndXY()),2===t.getCoordinateSystemType()?(P[0]=E.x,P[1]=E.y,P[2]=C.x,P[3]=C.y,o.ac.projToGeog(w,2,P),v.x=P[0]*y,v.y=P[1]*y,N.x=P[2]*y,N.y=P[3]*y):(v.setCoordsPoint2D(E),N.setCoordsPoint2D(C),v.scale(y),N.scale(y));const n=new i.d,r=new i.d;p(l,h,v,n),p(l,h,N,r);let a=d(l,n,r);f.setValues(0,v,Number.NaN,n),S.setValues(1,N,a,r),G=c,x[0].assign(S),_[0]=c;let g=0;for(;;){g>128&&(0,s.d)("iterations exceeded");const n=.5*(f.m_factor+S.m_factor),r=e.getCoord2D(n);2===t.getCoordinateSystemType()?(P[0]=r.x,P[1]=r.y,o.ac.projToGeog(w,1,P),T.x=P[0]*y,T.y=P[1]*y):(T.setCoordsPoint2D(r),T.scale(y)),v.setCoordsPoint2D(f.m_pGcs),N.setCoordsPoint2D(S.m_pGcs);const m=new i.d;p(l,h,T,m);const u=d(l,f.m_xyz,m),E=d(l,S.m_xyz,m);a=S.m_geoLength,Number.isNaN(a)&&(a=d(l,f.m_xyz,S.m_xyz));const C=u+E,b=G===c&&C>=20&&Math.abs(C-a)>1e-8*(a+C);if(g+2<40&&(b||Math.abs(C-a)>0&&G>0))S.setLength(E),x[g].assign(S),S.setValues(n,T,u,m),x[++g].assign(S),b?(G=c,_[g]=c):(G--,_[g-1]=G,_[g]=G);else{if(L+=C,0===g)break;f.assign(S),S.assign(x[--g]),G=_[g]}}}return L}execute(e,t,n){if(t&&0!==t.getCoordinateSystemType()||(0,s.a)(""),e.isEmpty()||e.getDimension()<1)return 0;let a=null;const i=t.getGCS();i!==t&&(a=(0,o.E)(t,i,null));const c=e.getGeometryType();if(c===s.G.enumEnvelope){const s=new r.a;return s.addEnvelope(e,!1),this._ExecuteShapePreservingLength(s,t,i,a,n)}if((0,s.f)(c)){const s=new r.P;return s.addSegment(e,!0),this._ExecuteShapePreservingLength(s,t,i,a,n)}return this._ExecuteShapePreservingLength(e,t,i,a,n)}}function p(e,t,n,s){s.assign((0,o.ad)(e,t,n))}function d(e,t,n){const s=e,o=new i.d;o.setSub(t,n);const r=o.length();return 2*s*Math.asin(r/(2*s))}},76061:(e,t,n)=>{n.d(t,{G:()=>s,S:()=>o});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends s{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const 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}}}}]);