@arcgis/core 4.34.0-next.33 → 4.34.0-next.35

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 (254) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/ArcadeDate.js +1 -1
  3. package/arcade/ArcadeModuleResolver.js +1 -1
  4. package/arcade/featureset/actions/GroupBy.js +1 -1
  5. package/arcade/functions/date.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{28e04ef3575f164f611a.js → 00870a35b254295bc408.js} +1 -1
  8. package/assets/esri/core/workers/chunks/017adbbb77c9c9b4d49f.js +1 -0
  9. package/assets/esri/core/workers/chunks/{c6edf028dd04d47d7580.js → 087ae1e3e767f0e678e5.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{b4b30a7f1b673461dc55.js → 0997e09fe5b0aba1f804.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{341507901f3858559c82.js → 125fdea50620d4db2678.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{9bc6d974b0fce9db64ef.js → 15a5a89cd228a9364332.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{847455bf4fc33d6e6efc.js → 1dc410bc070cabb7198d.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{971b16677b66c16fb6b9.js → 20aed6e1d9b6bf06a398.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{94a3474e3f45efa4a4fe.js → 2c816d3a737e39e6eb84.js} +1 -1
  16. package/assets/esri/core/workers/chunks/2de11a8e5d426c381991.js +1 -0
  17. package/assets/esri/core/workers/chunks/{fb71e533995c54cd806f.js → 319fe6a02ec630a827ea.js} +1 -1
  18. package/assets/esri/core/workers/chunks/3a7e43675163f7bed6ac.js +1 -0
  19. package/assets/esri/core/workers/chunks/{1aa6719be3afbdc7c880.js → 3cd1ab26396052f17832.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{359c282fd67148fda5fa.js → 3d5954478864a975e65e.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{2fdf457786d2d5d7414f.js → 3eb792863a789b97ec58.js} +1 -1
  22. package/assets/esri/core/workers/chunks/40b0c5368b8322498189.js +1 -0
  23. package/assets/esri/core/workers/chunks/{89999baefa341bd3329c.js → 4193691ca076948f4f90.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{4778acd0cfaf0cebeec7.js → 439128f23fa091633d2d.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{057df92b981c9b311d68.js → 43fba9d6be5971ec20a9.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{74f3bc6c6b82de49d6ee.js → 4ac6bf9ff1cfbde87c7b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{0b3a200b97d790d08248.js → 4b9003ddfe61dc3729f4.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{5192f38682f1f9be7da0.js → 549e073fe276363a9896.js} +1 -1
  29. package/assets/esri/core/workers/chunks/6000a302369799ea42a6.js +1 -0
  30. package/assets/esri/core/workers/chunks/{5d0c92aaa5891e6cb8f0.js → 641ca71d7c1a07bde66a.js} +1 -1
  31. package/assets/esri/core/workers/chunks/646227b500b92999f2c8.js +1 -0
  32. package/assets/esri/core/workers/chunks/{50b0d96e1a5ccffeb803.js → 64fab4e1e28c06c83403.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{d3cb21cdc5b9483dd1f4.js → 69ae235423f0b1bdfcb4.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{3323646096474740fed5.js → 6c72e2c09ed62cb2fd79.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{63cb3dcd359e96733b1b.js → 6ce2f86b9b1d2f2b8675.js} +1 -1
  36. package/assets/esri/core/workers/chunks/752eabfbed7b8b65cf3f.js +1 -0
  37. package/assets/esri/core/workers/chunks/{98f6d4ea026ed96fd3f3.js → 773feb0e0fad26df57ef.js} +1 -1
  38. package/assets/esri/core/workers/chunks/7b1d14a921d30c95d68b.js +1 -0
  39. package/assets/esri/core/workers/chunks/{b78d00c4e493086741e1.js → 7d25f57299c642e727a6.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{3a0da512562ba492609d.js → 827bebb4bcdde23adc91.js} +1 -1
  41. package/assets/esri/core/workers/chunks/8b7f6f2d1692b6b6dbd5.js +1 -0
  42. package/assets/esri/core/workers/chunks/{9152d62c55d3396763bd.js → 8be81e1530b952c97936.js} +1 -1
  43. package/assets/esri/core/workers/chunks/90a0c1c5c851cc9b6d6d.js +1 -0
  44. package/assets/esri/core/workers/chunks/91d48c32bf11ad1405c8.js +1 -0
  45. package/assets/esri/core/workers/chunks/9228f760129e48585b54.js +1 -0
  46. package/assets/esri/core/workers/chunks/9a54c96b48e94d816881.js +1 -0
  47. package/assets/esri/core/workers/chunks/a36be186ad10200c420c.js +1 -0
  48. package/assets/esri/core/workers/chunks/{c18167a0790241f80bf7.js → a6767d75e718f2e1e714.js} +1 -1
  49. package/assets/esri/core/workers/chunks/aa12ba96fb8c91105473.js +1 -0
  50. package/assets/esri/core/workers/chunks/{ea240d9e594bfbd8af68.js → aaf696a1026de569c82d.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{b1ef40ef898a8c7f43a2.js → acb95ae6203f708d71b4.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{22f38cad0213f2112394.js → b1982490762972ae023d.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{bc0f5477b4491ab48b3a.js → b28855db6a30d4d4f348.js} +1 -1
  54. package/assets/esri/core/workers/chunks/b331543767c35e5edcc6.js +1 -0
  55. package/assets/esri/core/workers/chunks/{6ccd6171d3c572883034.js → b877142a275188a16e17.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{7d852617e91b51121ea7.js → ba29c535128c4e8ae2d3.js} +1 -1
  57. package/assets/esri/core/workers/chunks/bf60d4da0dff1e14da8e.js +1 -0
  58. package/assets/esri/core/workers/chunks/{39bff604d4b4a1295038.js → c038472cb7f60af9426e.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{ca46f78aac1133d127fa.js → c1e5e2a6e7e2d7a1d63c.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{1c3578d5e956a4587973.js → c30adbead0ba4722acf9.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{0260b33daf48fc207880.js → c9b11c7170c99f9e0e93.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{a809042fdce7ced2a415.js → cc3ca1729af33688c1e3.js} +1 -1
  63. package/assets/esri/core/workers/chunks/cde79c3644166d4798a8.js +1 -0
  64. package/assets/esri/core/workers/chunks/{181f8bbe670b4468307a.js → ce8f0ed9179c0d314df8.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{58393ab52d0b8f718241.js → d3fd11da3a823e148957.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{ac30cf2f9a94597f7665.js → d6b2ab614f308db50c4a.js} +2 -2
  67. package/assets/esri/core/workers/chunks/{41d36b87e3dfc01be38d.js → d7b3e81cc313fd0a33b0.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{abe2cdfc2eda46b00812.js → d9045b964f536695840b.js} +1 -1
  69. package/assets/esri/core/workers/chunks/dde6000aa2f69f6ecad0.js +1 -0
  70. package/assets/esri/core/workers/chunks/dec9656997683ef01ba6.js +1 -0
  71. package/assets/esri/core/workers/chunks/{1e20e43d1dc5273708c7.js → e1472dbf0795d737d6f8.js} +1 -1
  72. package/assets/esri/core/workers/chunks/e18bb372457cedbf4f8c.js +1 -0
  73. package/assets/esri/core/workers/chunks/e892ed8b0b990d7eba28.js +1 -0
  74. package/assets/esri/core/workers/chunks/{dc5a8cf2a44a5ac201c5.js → ed05399f9a07fea66685.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{300a5257969d3835ceeb.js → f19426eb53d8430ded51.js} +1 -1
  76. package/assets/esri/core/workers/chunks/f3358b19af0f03f16543.js +1 -0
  77. package/assets/esri/core/workers/chunks/{1b5923dfd70d464dfb25.js → f4c38a9c01c29b5a6244.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{c854c3bb4440fd942c12.js → f6c1854f36b029fa6c37.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{039979cbf35a241ed0a4.js → fdc8300b6374ef2b8b3e.js} +1 -1
  80. package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
  81. package/chunks/OperatorCrosses.js +1 -1
  82. package/chunks/OperatorGeodesicBuffer.js +1 -1
  83. package/chunks/OperatorIntersects.js +1 -1
  84. package/chunks/OperatorOverlaps.js +1 -1
  85. package/chunks/OperatorProximity.js +1 -1
  86. package/chunks/OperatorShapePreservingLength.js +1 -1
  87. package/chunks/OperatorShapePreservingProject.js +1 -1
  88. package/chunks/OperatorTouches.js +1 -1
  89. package/chunks/OperatorWithin.js +1 -1
  90. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  91. package/chunks/UnitFactory.js +1 -1
  92. package/chunks/equalsOperator.js +1 -1
  93. package/config.js +1 -1
  94. package/core/BidiEngine.js +1 -1
  95. package/core/Clonable.js +1 -1
  96. package/core/Promise.js +1 -1
  97. package/core/promiseUtils.js +1 -1
  98. package/core/sql/SqlInterval.js +1 -1
  99. package/core/sql/sqlDateParsingUtils.js +1 -1
  100. package/core/unitUtils.js +1 -1
  101. package/geometry/operators/gx/operatorDifference.js +1 -1
  102. package/geometry/operators/gx/operatorIntersection.js +1 -1
  103. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  104. package/geometry/support/coordinateSystem.js +1 -1
  105. package/graphic/BuildingGraphicOrigin.d.ts +4 -0
  106. package/graphic/BuildingGraphicOrigin.js +5 -0
  107. package/graphic/CSVGraphicOrigin.d.ts +4 -0
  108. package/graphic/CSVGraphicOrigin.js +5 -0
  109. package/graphic/CatalogGraphicOrigin.d.ts +4 -0
  110. package/graphic/CatalogGraphicOrigin.js +5 -0
  111. package/graphic/FeatureGraphicOrigin.d.ts +4 -0
  112. package/graphic/FeatureGraphicOrigin.js +5 -0
  113. package/graphic/GeoJSONGraphicOrigin.d.ts +4 -0
  114. package/graphic/GeoJSONGraphicOrigin.js +5 -0
  115. package/graphic/GraphicOrigin.d.ts +4 -0
  116. package/graphic/GraphicOrigin.js +5 -0
  117. package/graphic/IntegratedMesh3DTilesGraphicOrigin.d.ts +4 -0
  118. package/graphic/IntegratedMesh3DTilesGraphicOrigin.js +5 -0
  119. package/graphic/IntegratedMeshGraphicOrigin.d.ts +4 -0
  120. package/graphic/IntegratedMeshGraphicOrigin.js +5 -0
  121. package/graphic/OGCFeatureGraphicOrigin.d.ts +4 -0
  122. package/graphic/OGCFeatureGraphicOrigin.js +5 -0
  123. package/graphic/PointCloudGraphicOrigin.d.ts +4 -0
  124. package/graphic/PointCloudGraphicOrigin.js +5 -0
  125. package/graphic/SceneGraphicOrigin.d.ts +4 -0
  126. package/graphic/SceneGraphicOrigin.js +5 -0
  127. package/graphic/StreamGraphicOrigin.d.ts +4 -0
  128. package/graphic/StreamGraphicOrigin.js +5 -0
  129. package/graphic/VectorTileGraphicOrigin.d.ts +4 -0
  130. package/graphic/VectorTileGraphicOrigin.js +5 -0
  131. package/graphic/VoxelGraphicOrigin.d.ts +4 -0
  132. package/graphic/VoxelGraphicOrigin.js +5 -0
  133. package/graphic/WFSGraphicOrigin.d.ts +4 -0
  134. package/graphic/WFSGraphicOrigin.js +5 -0
  135. package/graphic/graphicOriginUtils.js +5 -0
  136. package/graphic/graphicOrigins.d.ts +14 -0
  137. package/graphic/graphicOrigins.js +5 -0
  138. package/graphic/isBuildingGraphicOrigin.js +5 -0
  139. package/graphic/isCSVGraphicOrigin.js +5 -0
  140. package/graphic/isCatalogGraphicOrigin.js +5 -0
  141. package/graphic/isFeatureGraphicOrigin.js +5 -0
  142. package/graphic/isGeoJSONGraphicOrigin.js +5 -0
  143. package/graphic/isIntegratedMesh3DTilesGraphicOrigin.js +5 -0
  144. package/graphic/isIntegratedMeshGraphicOrigin.js +5 -0
  145. package/graphic/isOGCFeatureGraphicOrigin.js +5 -0
  146. package/graphic/isPointCloudGraphicOrigin.js +5 -0
  147. package/graphic/isSceneGraphicOrigin.js +5 -0
  148. package/graphic/isStreamGraphicOrigin.js +5 -0
  149. package/graphic/isVectorTileGraphicOrigin.js +5 -0
  150. package/graphic/isVoxelGraphicOrigin.js +5 -0
  151. package/graphic/isWFSGraphicOrigin.js +5 -0
  152. package/interfaces.d.ts +354 -13
  153. package/kernel.js +1 -1
  154. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  155. package/layers/support/Field.js +1 -1
  156. package/layers/support/featurePopupQueryUtils.js +1 -1
  157. package/layers/voxel/NCTimeParser.js +1 -1
  158. package/package.json +3 -3
  159. package/rest/knowledgeGraphService.js +1 -1
  160. package/smartMapping/statistics/support/utils.js +1 -1
  161. package/support/arcadeExpressionUtils.js +1 -1
  162. package/support/revision.js +1 -1
  163. package/symbols/support/svgUtils.js +1 -1
  164. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  165. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  166. package/views/2d/engine/webgl/Painter.js +1 -1
  167. package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
  168. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  169. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  170. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  171. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  172. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  173. package/views/2d/layers/TileLayerView2D.js +1 -1
  174. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  175. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  176. package/views/3d/analysis/Slice/SliceController.js +1 -1
  177. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  178. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementComputation.js +5 -0
  179. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +1 -1
  180. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  181. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  182. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  183. package/views/3d/layers/CSVLayerView3D.js +1 -1
  184. package/views/3d/layers/CatalogFootprintLayerView3D.js +1 -1
  185. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  186. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  187. package/views/3d/layers/FlowSubView3D.js +1 -1
  188. package/views/3d/layers/GeoJSONLayerView3D.js +1 -1
  189. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  190. package/views/3d/layers/GraphicsView3D.js +1 -1
  191. package/views/3d/layers/I3SMeshView3D.js +1 -1
  192. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  193. package/views/3d/layers/MediaLayerView3D.js +1 -1
  194. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  195. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  196. package/views/3d/layers/RouteLayerView3D.js +1 -1
  197. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  198. package/views/3d/layers/SceneLayerView3D.js +1 -1
  199. package/views/3d/layers/StreamLayerView3D.js +1 -1
  200. package/views/3d/layers/WFSLayerView3D.js +1 -1
  201. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  202. package/views/3d/layers/graphics/StreamController.js +1 -1
  203. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  204. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  205. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  206. package/views/3d/layers/support/FeatureTileDescriptor.js +1 -1
  207. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  208. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  209. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  210. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  211. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  212. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  213. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  214. package/views/3d/state/ConstraintsManager.js +1 -1
  215. package/views/3d/support/flow/geometryUtils.js +1 -1
  216. package/views/3d/terrain/OverlayManager.js +1 -1
  217. package/views/3d/terrain/TerrainSurface.js +1 -1
  218. package/views/3d/terrain/Tile.js +1 -1
  219. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  220. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  221. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  222. package/views/SceneView.js +1 -1
  223. package/views/interactive/Tooltip.js +1 -1
  224. package/views/layers/FeatureLayerView.js +1 -1
  225. package/views/layers/support/popupUtils.js +1 -1
  226. package/views/support/Scheduler.js +1 -1
  227. package/views/support/highlightOptionsUtils.js +1 -1
  228. package/views/webgl/FramebufferObject.js +1 -1
  229. package/views/webgl/RenderbufferDescriptor.js +1 -1
  230. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  231. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  232. package/assets/esri/core/workers/chunks/07b2cc0f6b064277632f.js +0 -1
  233. package/assets/esri/core/workers/chunks/0fc620d6d0c4ac282d72.js +0 -1
  234. package/assets/esri/core/workers/chunks/0fe32bdf2055bcd1e928.js +0 -1
  235. package/assets/esri/core/workers/chunks/13f9e92e7e5d44d9f95c.js +0 -1
  236. package/assets/esri/core/workers/chunks/140efe4735605258ecc9.js +0 -1
  237. package/assets/esri/core/workers/chunks/23eae849ee0ca7b3fd81.js +0 -1
  238. package/assets/esri/core/workers/chunks/2b76e716f478468b6798.js +0 -1
  239. package/assets/esri/core/workers/chunks/386ab72a45102c2d47f2.js +0 -1
  240. package/assets/esri/core/workers/chunks/3fb6146d914f9b410c2e.js +0 -1
  241. package/assets/esri/core/workers/chunks/432365fcd7becd508541.js +0 -1
  242. package/assets/esri/core/workers/chunks/439ce953a25b2776cb7f.js +0 -1
  243. package/assets/esri/core/workers/chunks/4c8d2334fcdb1354ff43.js +0 -1
  244. package/assets/esri/core/workers/chunks/5f321be63ed5447b04a1.js +0 -1
  245. package/assets/esri/core/workers/chunks/6006fbdb90c3bfc493a6.js +0 -1
  246. package/assets/esri/core/workers/chunks/7c35c61e3673cf94cdfd.js +0 -1
  247. package/assets/esri/core/workers/chunks/7c75876a0c6460585055.js +0 -1
  248. package/assets/esri/core/workers/chunks/949dc266ac6f3505d357.js +0 -1
  249. package/assets/esri/core/workers/chunks/99e3f7b3ea0bfe9b8d34.js +0 -1
  250. package/assets/esri/core/workers/chunks/a84af1b8b64b86b49bd3.js +0 -1
  251. package/assets/esri/core/workers/chunks/a9d83a442d8d7a376fc0.js +0 -1
  252. package/assets/esri/core/workers/chunks/ba1b21a90b257ac9a342.js +0 -1
  253. package/assets/esri/core/workers/chunks/c50c2f014e8567870686.js +0 -1
  254. package/assets/esri/core/workers/chunks/f9ad37dfbe1d14c6a352.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5804,6183],{4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(31635),n=r(78888),s=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),p=r(84952),d=r(10107),h=(r(44208),r(87811),r(40608)),g=r(5443),y=r(16930),m=r(92602),f=r(64272);let v=0,b=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new g.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,d.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i.Cg)([(0,d.MZ)({type:g.A})],b.prototype,"fullExtent",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i.Cg)([(0,d.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i.Cg)([(0,d.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,d.MZ)({type:y.A})],b.prototype,"spatialReference",void 0),(0,i.Cg)([(0,d.MZ)({type:String})],b.prototype,"title",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i.Cg)([(0,d.MZ)()],b.prototype,"url",void 0),(0,i.Cg)([(0,d.MZ)({type:f.T})],b.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i.Cg)([(0,h.$)("esri.layers.Layer")],b)},8303:(e,t,r)=>{r.d(t,{A:()=>M});var i=r(31635),n=r(92602),s=r(70333),o=r(78888),a=r(60999),l=r(49186),u=r(53966),c=r(97768),p=r(74887),d=r(84952),h=r(10107),g=(r(44208),r(87811),r(36005)),y=r(40608),m=r(43937),f=r(77548),v=r(20655),b=r(80812),w=r(41318),S=r(10407);const M=e=>{const t=e;let M=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(n)o=r.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(n?await r.reload():(r=new b.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,S.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?w.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,h.MZ)({type:b.default})],M.prototype,"portalItem",null),(0,i.Cg)([(0,g.w)("web-document","portalItem",["itemId"])],M.prototype,"readPortalItem",null),(0,i.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],M.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],M.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasUpdateItemPrivileges",void 0),M=(0,i.Cg)([(0,y.$)("esri.layers.mixins.PortalLayer")],M),M},x={credential:null,user:null}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},15804:(e,t,r)=>{r.d(t,{addOrUpdateResources:()=>a,bg:()=>d,cL:()=>p,fetchResources:()=>o,removeAllResources:()=>u,removeResource:()=>l});var i=r(78888),n=r(49186),s=r(84952);async function o(e,t={},r){await e.load(r);const i=(0,s.fj)(e.itemUrl,"resources"),{start:n=1,num:o=10,sortOrder:a="asc",sortField:l="resource"}=t,u={query:{start:n,num:o,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},c=await e.portal.request(i,u);return{total:c.total,nextStart:c.nextStart,resources:c.resources.map(({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)}))}}async function a(e,t,r,i){const o=new Map;for(const{resource:e,content:i,compress:s,access:a}of t){if(!e.hasPath())throw new n.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,l]=c(e.path),u=`${t}/${s??""}/${a??""}`;o.has(u)||o.set(u,{prefix:t,compress:s,access:a,files:[]}),o.get(u).files.push({fileName:l,content:i})}await e.load(i);const a=(0,s.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:n,files:s}of o.values()){const o=25;for(let l=0;l<s.length;l+=o){const u=s.slice(l,l+o),c=new FormData;t&&"."!==t&&c.append("resourcesPrefix",t),r&&c.append("compress","true"),n&&c.append("access",n);let p=0;for(const{fileName:e,content:t}of u)c.append("file"+ ++p,t,e);c.append("f","json"),await e.portal.request(a,{method:"post",body:c,signal:i?.signal})}}}async function l(e,t,r){if(!t.hasPath())throw new n.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,s.fj)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,s.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function c(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.A)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,i]=function(e){const[t,r]=function(e){const t=(0,s.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,n]=c(t);return[i,n,r]}(e.path);return e.portalItem.resourceFromPath((0,s.fj)(r,t+i))}},16183:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Le});var i=r(31635),n=r(13874),s=r(7762),o=r(49186),a=r(53966),l=r(92071),u=r(74887),c=r(10107),p=r(56507),d=(r(44208),r(87811),r(36005)),h=r(40608),g=r(38954),y=r(51850),m=r(5443),f=r(4146),v=r(52136),b=r(18768),w=r(69208),S=r(16131),M=r(8303),x=r(25036),C=r(58947),A=r(60694),I=r(10873),j=r(20437),Z=r(95466),T=r(96184),N=r(69540),R=r(69052),_=r(25482),V=r(87024),P=r(67026),O=r(82534),F=r(34304);const z=(0,y.vt)(),U=(0,O.vt)(),E=(0,O.vt)(),L=(0,O.vt)(),q=(0,y.fA)(0,0,1),D=(0,y.fA)(0,1,0),$=(0,y.fA)(1,0,0);function B(e){(0,g.c)(z,e),(0,g.n)(z,z);const t=Math.atan2(z[1],z[0]),r=(0,P.x8)((0,O.vt)(),q,-t);(0,g.v)(z,z,r);const i=-1*Math.atan2(z[2],z[0]);return[(0,F.ct)(t)+270,(0,F.ct)(i)+90]}function k(e,t){return(0,P.x8)(E,q,(0,F.DF)(e-270)),(0,P.x8)(L,D,(0,F.DF)(t-90)),(0,P.lw)(U,E,L),(0,g.c)(z,$),(0,g.v)(z,z,U),(0,g.n)(z,z),[z[0],z[1],z[2]]}var H=r(79901);let J=class extends(N.A.ClonableMixin(_.A)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(e),0,!0)}set orientation(e){const t=k(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(t),0,!0)}set tilt(e){const t=k(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],J.prototype,"enabled",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],J.prototype,"label",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,H.w)(e=>R.ie.normalize((0,p.GB)(e),0,!0))],J.prototype,"orientation",null),(0,i.Cg)([(0,c.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,H.w)(e=>R.ie.normalize((0,p.GB)(e),0,!0))],J.prototype,"tilt",null),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],J.prototype,"normal",void 0),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],J.prototype,"point",void 0),J=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelSlice")],J);var K=r(97159);let G=class extends(N.A.ClonableMixin(_.A)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(t),0,!0)}};(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{default:!0,write:!0}})],G.prototype,"enabled",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{origins:{service:{read:K.r},"web-scene":{write:{isRequired:!0}}},write:!0}}),(0,V.P)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],G.prototype,"href",void 0),(0,i.Cg)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],G.prototype,"label",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],G.prototype,"orientation",null),(0,i.Cg)([(0,c.MZ)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],G.prototype,"tilt",null),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"normal",void 0),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"point",void 0),(0,i.Cg)([(0,c.MZ)({type:[p.jz],json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"sizeInPixel",void 0),(0,i.Cg)([(0,c.MZ)({type:[J],json:{write:!0}})],G.prototype,"slices",void 0),(0,i.Cg)([(0,c.MZ)({type:p.jz,json:{default:0,write:!0}})],G.prototype,"timeId",void 0),(0,i.Cg)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"variableId",void 0),G=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelSection")],G);let W=class extends _.A{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],W.prototype,"diffuseFactor",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],W.prototype,"specularFactor",void 0),W=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelSimpleShading")],W);let Y=class extends _.A{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i.Cg)([(0,c.MZ)({type:["discrete","continuous"],json:{write:!0}})],Y.prototype,"continuity",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],Y.prototype,"hasNoData",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],Y.prototype,"noData",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],Y.prototype,"offset",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],Y.prototype,"scale",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Y.prototype,"type",void 0),Y=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelFormat")],Y);const Q=Y;let X=class extends _.A{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"name",void 0),(0,i.Cg)([(0,c.MZ)({type:Q,json:{write:!0}})],X.prototype,"originalFormat",void 0),(0,i.Cg)([(0,c.MZ)({type:Q,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"renderingFormat",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],X.prototype,"unit",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],X.prototype,"volumeId",void 0),(0,i.Cg)([(0,c.MZ)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],X.prototype,"type",void 0),X=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelVariable")],X);const ee=X;var te=r(4718),re=r(68197);let ie=class extends(N.A.ClonableMixin(_.A)){constructor(){super(...arguments),this.color=re.A.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i.Cg)([(0,c.MZ)({type:re.A,json:{type:[p.jz],write:{enabled:!0,isRequired:!0}}})],ie.prototype,"color",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ie.prototype,"value",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{default:!0,write:!0}})],ie.prototype,"enabled",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],ie.prototype,"label",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{default:!1,write:!0}})],ie.prototype,"colorLocked",void 0),ie=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelIsosurface")],ie);var ne=r(62885),se=r(34727);let oe=class extends(N.A.ClonableMixin(_.A)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i.Cg)([(0,c.MZ)({type:re.A,json:{type:[p.jz],write:{enabled:!0,isRequired:!0}}})],oe.prototype,"color",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],oe.prototype,"position",void 0),oe=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelColorStop")],oe);const ae=oe;let le=class extends(N.A.ClonableMixin(_.A)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],le.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],le.prototype,"position",void 0),le=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelOpacityStop")],le);const ue=le;let ce=class extends(N.A.ClonableMixin(_.A)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{default:!1,write:!0}})],ce.prototype,"enabled",void 0),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],ce.prototype,"range",void 0),ce=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelRangeFilter")],ce);const pe=ce;let de=class extends(N.A.ClonableMixin(_.A)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(s.A.ofType(ae)),this.opacityStops=new(s.A.ofType(ue))}set colorStops(e){this._set("colorStops",(0,ne.V)(e,this._get("colorStops"),s.A.ofType(ae)))}set opacityStops(e){this._set("opacityStops",(0,ne.V)(e,this._get("opacityStops"),s.A.ofType(ue)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&3!==t[i].type;);let n=e;const s=t.length;for(;++n<s&&t[n].type!==r&&3!==t[n].type;);return[i,n]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:1})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,se.qE)(e.position,0,1),i=Math.round(255*(0,se.qE)(1-e.opacity,0,1));let n=!1;for(const e of r)if(1===e.type&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=3,n=!0;break}n||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:2})}r.sort((e,t)=>e.position<t.position?-1:1);const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(3!==i.type)if(1===i.type){const[n,s]=this.getPreviousNext(t,r,2);if(-1!==n&&s!==e){const e=(i.position-r[n].position)/(r[s].position-r[n].position);i.color.a=Math.round((0,se.Cc)(r[n].color.a,r[s].color.a,e))}else i.color.a=-1!==n?r[n].color.a:r[s].color.a}else{const[n,s]=this.getPreviousNext(t,r,1);if(-1!==n&&s!==e){const e=(i.position-r[n].position)/(r[s].position-r[n].position),t=r[n].color,o=r[s].color;ge.forEach(r=>{i.color[r]=Math.round((0,se.Cc)(t[r],o[r],e))})}else-1!==n?ge.forEach(e=>{i.color[e]=r[n].color[e]}):ge.forEach(e=>{i.color[e]=r[s].color[e]})}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,n=1;for(let r=0;r<this._colorMapSize;++r){const s=r/this._colorMapSize;for(;s>t[n].position;)i=n++;const o=(s-t[i].position)/(t[n].position-t[i].position),a=t[i].color,l=t[n].color,u=new re.A;ge.forEach(e=>{u[e]=Math.round((0,se.Cc)(a[e],l[e],o))}),u.a=(0,se.qE)(1-(0,se.Cc)(a.a,l.a,o)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],n=this.stretchRange[1];if(i>n){const e=i;i=n,n=e}e=(0,se.qE)(e,i,n);const s=r[Math.round((e-i)/(n-i)*(this._colorMapSize-1))].clone();return t||(s.a=1),s}};(0,i.Cg)([(0,c.MZ)({type:["linear","nearest"],json:{write:!0}})],de.prototype,"interpolation",void 0),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],de.prototype,"stretchRange",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(ae),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],de.prototype,"colorStops",null),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(ue),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],de.prototype,"opacityStops",null),(0,i.Cg)([(0,c.MZ)({type:pe,json:{write:!0}})],de.prototype,"rangeFilter",void 0),(0,i.Cg)([(0,c.MZ)({type:[re.A],clonable:!1,json:{read:!1}})],de.prototype,"rasterizedTransferFunction",null),de=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelTransferFunctionStyle")],de);const he=de,ge=["r","g","b"];let ye=class extends(N.A.ClonableMixin(_.A)){constructor(){super(...arguments),this.color=re.A.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};var me;(0,i.Cg)([(0,c.MZ)({type:re.A,json:{type:[p.jz],write:{enabled:!0,isRequired:!0}}})],ye.prototype,"color",void 0),(0,i.Cg)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],ye.prototype,"value",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{default:!0,write:!0}})],ye.prototype,"enabled",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],ye.prototype,"label",void 0),ye=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelUniqueValue")],ye);let fe=me=class extends _.A{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(s.A.ofType(ye)),this.isosurfaces=new(s.A.ofType(ie))}clone(){return new me({variableId:this.variableId,label:this.label,transferFunction:(0,te.o8)(this.transferFunction),uniqueValues:(0,te.o8)(this.uniqueValues),isosurfaces:(0,te.o8)(this.isosurfaces)})}};(0,i.Cg)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],fe.prototype,"variableId",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],fe.prototype,"label",void 0),(0,i.Cg)([(0,c.MZ)({type:he,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],fe.prototype,"transferFunction",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(ye),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],fe.prototype,"uniqueValues",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(ie),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],fe.prototype,"isosurfaces",void 0),fe=me=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelVariableStyle")],fe);var ve=r(88930),be=r(86738),we=r(16930),Se=r(21325);function Me(e){const t=/^(days?|hours?|minutes?|seconds?|d|h|m|s) since (\d{1,4})-(\d{1,2})-(\d{1,2})[ |T](\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[\s|Z]?(([+|\-\s?])(\d{1,2}):(\d{1,2}))?$/i.exec(e);if(null==t)return{didParse:!1};const[,r,i,n,s,o,a,l,u,c,p,d,h]=t;let g="seconds";const y=r.charAt(0).toLowerCase();"d"===y?g="days":"h"===y?g="hours":"m"===y&&(g="minutes");const m=parseInt(i,10);if(Number.isNaN(m))return{didParse:!1};const f=parseInt(n,10);if(Number.isNaN(f)||f<1||f>12)return{didParse:!1};const v=parseInt(s,10);if(Number.isNaN(v)||v<1||v>31)return{didParse:!1};if(2===f){const e=m%4==0&&(m%100!=0||m%400==0);if(e&&v>29||!e&&v>28)return{didParse:!1}}else if((4===f||6===f||9===f||11===f)&&v>30)return{didParse:!1};const b=parseInt(o,10);if(Number.isNaN(b)||b<0||b>23)return{didParse:!1};const w=parseInt(a,10);if(Number.isNaN(w)||w<0||w>59)return{didParse:!1};const S=parseInt(l,10);if(Number.isNaN(S)||S<0||S>59)return{didParse:!1};let M=1,x=0,C=0;if(p&&(M="-"===p?-1:1),d){if(x=parseInt(d,10),Number.isNaN(x)||x<0)return{didParse:!1};if(0!==x){const e=M*x;if(e<-12||e>14)return{didParse:!1}}}if(h&&(C=parseInt(h,10),Number.isNaN(C)||C<0||C>59))return{didParse:!1};const A=`${m}`.padStart(4,"0"),I=`${f}`.padStart(2,"0"),j=`${v}`.padStart(2,"0"),Z=`${b}`.padStart(2,"0"),T=`${w}`.padStart(2,"0"),N=`${S}`.padStart(2,"0");let R="Z";return 0===x&&0===C||(R=M>0?"+":"-",R+=`${x}`.padStart(2,"0"),R+=":",R+=`${C}`.padStart(2,"0")),{didParse:!0,unit:g,reference:new Date(`${A}-${I}-${j}T${Z}:${T}:${N}.000${R}`)}}let xe=class extends _.A{constructor(){super(...arguments),this.values=null}};(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:!0}})],xe.prototype,"values",void 0),xe=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelIrregularSpacing")],xe);const Ce=xe;let Ae=class extends _.A{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],Ae.prototype,"scale",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],Ae.prototype,"offset",void 0),Ae=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelRegularSpacing")],Ae);const Ie=Ae;let je=class extends _.A{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i.Cg)([(0,c.MZ)({type:Ce,json:{write:!0}})],je.prototype,"irregularSpacing",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],je.prototype,"isPositiveUp",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],je.prototype,"isWrappedDateLine",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],je.prototype,"label",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],je.prototype,"name",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],je.prototype,"quantity",void 0),(0,i.Cg)([(0,c.MZ)({type:Ie,json:{write:!0}})],je.prototype,"regularSpacing",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],je.prototype,"size",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],je.prototype,"unit",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1}})],je.prototype,"isRegular",null),je=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelDimension")],je);const Ze=je;let Te=class extends _.A{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=we.A.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)n[e]<2?n[e]=1:n[e]-=1;return r.isRegular&&!r.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(i[1]-i[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0;let t=this.dimensions[3].size>0;if(t){const e=this.dimensions[3];t="time"===e.quantity,t&&null!==e.unit&&(t=Me(e.unit).didParse)}if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}get timeStops(){if("xyzt"!==this.volumeType)return[];const e=this.dimensions[3],t=[],r=Me(e.unit);if(r.didParse)if(e.isRegular){const i=e.regularSpacing?.offset??0,n=e.regularSpacing?.scale||1;for(let s=0;s<e.size;++s){const e=i+n*s;t.push((0,ve.mi)(r.reference,e,r.unit))}}else if(Array.isArray(e.irregularSpacing?.values)&&e.irregularSpacing.values.length>0)for(let i=0;i<e.irregularSpacing.values.length;++i){const n=e.irregularSpacing.values[i];t.push((0,ve.mi)(r.reference,n,r.unit))}return t}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return a.A.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Se.aI)(this.spatialReference,e.spatialReference))return a.A.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,y.fA)(e.x,e.y,e.z??0);(0,g.d)(t,t,this.originInLayerSpace3D),(0,g.D)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,n=r.irregularSpacing.values,s=r.isPositiveUp?1:-1,o=n.reduce((e,t)=>Math.abs(s*t-i)<Math.abs(s*e-i)?t:e);for(let e=0;e<n.length;++e)if(n[e]===o){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new be.A({x:0,y:0,spatialReference:this.spatialReference});const t=(0,y.ci)(e);if((0,g.C)(t,t,this.voxelSizeInLayerSpaceSigned),(0,g.f)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new be.A({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new be.A({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};var Ne;(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Te.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:[Ze],json:{write:{enabled:!0,isRequired:!0}}})],Te.prototype,"dimensions",void 0),(0,i.Cg)([(0,c.MZ)({type:we.A,json:{read:{enabled:!1}}})],Te.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{read:!1}})],Te.prototype,"zDimension",null),(0,i.Cg)([(0,c.MZ)({type:[Boolean],json:{read:!1}})],Te.prototype,"isValid",null),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{read:!1}})],Te.prototype,"originInLayerSpace3D",null),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{read:!1}})],Te.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i.Cg)([(0,c.MZ)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Te.prototype,"volumeType",null),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{read:!1}})],Te.prototype,"sizeInVoxels",null),(0,i.Cg)([(0,c.MZ)({type:[Date],json:{read:!1,write:!1}})],Te.prototype,"timeStops",null),Te=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelVolume")],Te);let Re=Ne=class extends _.A{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Ne;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"apronWidth",void 0),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"brickSize",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"maxLodLevel",void 0),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"nodeSize",void 0),Re=Ne=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelVolumeIndex")],Re);const _e=Re;let Ve=class extends(N.A.ClonableMixin(_.A)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(e),0,!0)}set orientation(e){const t=k(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(t),0,!0)}set tilt(e){const t=k(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};var Pe;(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{default:!0,write:!0}})],Ve.prototype,"enabled",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],Ve.prototype,"label",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,H.w)(e=>R.ie.normalize((0,p.GB)(e),0,!0))],Ve.prototype,"orientation",null),(0,i.Cg)([(0,c.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,H.w)(e=>R.ie.normalize((0,p.GB)(e),0,!0))],Ve.prototype,"tilt",null),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],Ve.prototype,"normal",void 0),(0,i.Cg)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],Ve.prototype,"point",void 0),Ve=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelDynamicSection")],Ve);let Oe=Pe=class extends _.A{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(s.A.ofType(J)),this.dynamicSections=new(s.A.ofType(Ve))}set slices(e){this._set("slices",(0,ne.V)(e,this._get("slices"),s.A.ofType(J)))}set dynamicSections(e){this._set("dynamicSections",(0,ne.V)(e,this._get("dynamicSections"),s.A.ofType(Ve)))}clone(){return new Pe({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,te.o8)(this.slices),dynamicSections:(0,te.o8)(this.dynamicSections)})}};(0,i.Cg)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],Oe.prototype,"volumeId",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{default:1,write:!0}})],Oe.prototype,"verticalExaggeration",void 0),(0,i.Cg)([(0,c.MZ)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Oe.prototype,"exaggerationMode",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{default:0,write:!0}})],Oe.prototype,"verticalOffset",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(J),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Oe.prototype,"slices",null),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(Ve),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Oe.prototype,"dynamicSections",null),Oe=Pe=(0,i.Cg)([(0,h.$)("esri.layers.voxel.VoxelVolumeStyle")],Oe);var Fe=r(30291),ze=r(64272),Ue=r(26253);let Ee=class extends((0,C.w)((0,b.b)((0,S.q)((0,M.A)((0,x.j)((0,l.P)((0,w.d)((0,v.p)(f.A))))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new W,this.opacity=1,this.variables=new s.A,this.volumes=new s.A,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.popupTemplate=null,this.test=null,this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0,this.volumeStyles=new(s.A.ofType(Oe)),this.variableStyles=new(s.A.ofType(fe)),this.sections=new(s.A.ofType(G))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,A.Jf)(e,a.A.getLogger(this)))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.QP).then(()=>this._fetchService(t)).then(()=>this.serviceRoot=this.url);return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t),"service"===t?.origin&&this.version.major<=3&&this.version.minor<=0&&!this.getAtOrigin("popupTemplate","service")&&this.setAtOrigin("popupTemplate",this.createPopupTemplate(),"service");for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new o.A("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new o.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new o.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=m.A.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Te.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get fields(){const e=[new j.A({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"}),new j.A({name:"Voxel.CurrentVariable",alias:"Current Variable",domain:null,editable:!1,length:128,type:"string"})];for(const t of this.variables){const r=new j.A({name:t.name,alias:t.description,domain:null,editable:!1,length:128,type:"discrete"===t.renderingFormat.continuity?"string":"double"});e.push(r)}const t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new j.A({name:"Voxel.LocalTime",alias:"Local Time",domain:null,editable:!1,length:256,type:"date"});e.push(t);const r=new j.A({name:"Voxel.SourceTime",alias:"Source Time",domain:null,editable:!1,length:256,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new j.A({name:"Voxel.Depth",alias:"Depth",domain:null,editable:!1,length:128,type:"double"});e.push(t)}}return e}get fieldsIndex(){return this.loaded?new Z.A(this.fields):null}getField(e){return this.fieldsIndex?.get(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.fields;return(0,Fe.tn)({fields:t,title:"{Voxel.Position}"},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex(e=>e.variableId===t);return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex(e=>e.id===t);return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find(({id:e})=>e===t.volumeId):null}get timeInfo(){const e=this.getVolume(null);if("xyzt"!==e?.volumeType)return null;const t=e.timeStops;if(!t?.length)return null;const r=new ze.T({start:t[0],end:t.at(-1)});return new T.A({fullTimeExtent:r,stops:t})}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find(({volumeId:e})=>e===t.volumeId):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const n=this.variableStyles.findIndex(t=>t.variableId===e);if(n<0)return null;const s=this.variableStyles.at(n);return s?.transferFunction?s.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new G({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),a.A.getLogger(this).error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null==t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&a.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(a.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)a.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else a.A.getLogger(this).error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else a.A.getLogger(this).error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,y.fA)(e.normal[0],e.normal[1],e.normal[2]);return(0,g.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i.Cg)([(0,c.MZ)({type:["Voxel"]})],Ee.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)(I.fV)],Ee.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({json:{write:!0}})],Ee.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)(I.OZ)],Ee.prototype,"url",null),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(G),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],Ee.prototype,"sections",void 0),(0,i.Cg)([(0,c.MZ)({type:p.jz,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],Ee.prototype,"currentVariableId",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(Oe),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],Ee.prototype,"volumeStyles",void 0),(0,i.Cg)([(0,c.MZ)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],Ee.prototype,"renderMode",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(fe),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],Ee.prototype,"variableStyles",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],Ee.prototype,"enableSlices",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],Ee.prototype,"enableSections",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],Ee.prototype,"enableDynamicSections",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],Ee.prototype,"enableIsosurfaces",void 0),(0,i.Cg)([(0,c.MZ)({type:W,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],Ee.prototype,"shading",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],Ee.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Ee.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(ee)})],Ee.prototype,"variables",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(Te)})],Ee.prototype,"volumes",void 0),(0,i.Cg)([(0,c.MZ)({type:_e})],Ee.prototype,"index",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],Ee.prototype,"minScale",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],Ee.prototype,"maxScale",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0})],Ee.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{name:"serviceVersion"}})],Ee.prototype,"version",void 0),(0,i.Cg)([(0,d.w)("service","version")],Ee.prototype,"readVersion",null),(0,i.Cg)([(0,c.MZ)({type:m.A})],Ee.prototype,"fullExtent",void 0),(0,i.Cg)([(0,d.w)("service","fullExtent",["fullExtent"])],Ee.prototype,"readFullExtent",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1,json:{read:!1}})],Ee.prototype,"fields",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Ee.prototype,"fieldsIndex",null),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,r){t[r]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],Ee.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],Ee.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Ee.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,c.MZ)({type:T.A,readOnly:!0,json:{read:!1}})],Ee.prototype,"timeInfo",null),(0,i.Cg)([(0,c.MZ)({type:ze.T,json:{read:!1}})],Ee.prototype,"timeExtent",void 0),(0,i.Cg)([(0,c.MZ)({type:Ue.T,json:{read:!1}})],Ee.prototype,"timeOffset",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0,json:{origins:{"web-scene":{name:"timeAnimation",write:!0},service:{read:!1}}}})],Ee.prototype,"useViewTime",void 0),Ee=(0,i.Cg)([(0,h.$)("esri.layers.VoxelLayer")],Ee);const Le=Ee},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(31635),n=r(53966),s=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,n.A.getLogger(this)))}};return(0,i.Cg)([(0,s.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.ArcGISService")],r),r}},25036:(e,t,r)=>{r.d(t,{j:()=>o});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],r),r}},26121:(e,t,r)=>{r.d(t,{ci:()=>o,dL:()=>n});var i=r(49186);async function n(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}r(77548);const s=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function o(e,t,r){let n=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map(e=>new i.A("url:unsupported",`Relative url '${e}' is not supported`)))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(n=n.filter(({name:e})=>!(s.has(e)||t.includes(e)))),i&&(n=n.filter(e=>"web-document-write:property-required"!==e.name))}if(n.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}},26253:(e,t,r)=>{r.d(t,{T:()=>p});var i=r(31635),n=r(69540),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),c=r(73133);let p=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i.Cg)([(0,l.e)(c.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i.Cg)([(0,u.$)("esri.time.TimeInterval")],p)},29242:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function n(e,t,r,i,n,s,o,a,l){return[e,t,r,i,n,s,o,a,l]}r.d(t,{fA:()=>n,vt:()=>i,zK:()=>s});const s=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,fromValues:n},Symbol.toStringTag,{value:"Module"}))},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var i=r(13874),n=r(30524),s=r(89893),o=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(47582),r(41227)),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},h){if(!r)return null;const y=function(e,t){const r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){const i=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===i&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||g,sortDisabled:t?.sortDisabled}).map(t=>new a.A({fieldName:t.name,isEditable:(0,n.R$)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})}))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!y.length)return null;const m=function(e){const t=(0,n.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new o.A,new s.A];return new i.A({title:m,content:f,fieldInfos:y})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,n.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function h(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const g=["geometry","blob","raster","guid","xml"]},38954:(e,t,r)=>{r.d(t,{A:()=>g,B:()=>h,C:()=>c,D:()=>p,E:()=>V,F:()=>z,H:()=>E,a:()=>P,b:()=>f,c:()=>o,d:()=>u,e:()=>C,f:()=>l,g:()=>m,h:()=>A,i:()=>a,j:()=>v,k:()=>w,l:()=>s,m:()=>I,n:()=>x,o:()=>Z,q:()=>_,r:()=>M,s:()=>b,t:()=>j,u:()=>S,v:()=>T,w:()=>d,x:()=>U,y:()=>L,z:()=>y});var i=r(51850),n=r(34304);function s(e){const t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function p(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function h(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function g(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function y(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function f(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function v(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function b(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function w(e){const t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function S(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function M(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function x(e,t){const r=t[0],i=t[1],n=t[2];let s=r*r+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function C(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function A(e,t,r){const i=t[0],n=t[1],s=t[2],o=r[0],a=r[1],l=r[2];return e[0]=n*l-s*a,e[1]=s*o-i*l,e[2]=i*a-n*o,e}function I(e,t,r,i){const n=t[0],s=t[1],o=t[2];return e[0]=n+i*(r[0]-n),e[1]=s+i*(r[1]-s),e[2]=o+i*(r[2]-o),e}function j(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=r[0]*i+r[4]*n+r[8]*s+r[12],e[1]=r[1]*i+r[5]*n+r[9]*s+r[13],e[2]=r[2]*i+r[6]*n+r[10]*s+r[14],e}function Z(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=i*r[0]+n*r[3]+s*r[6],e[1]=i*r[1]+n*r[4]+s*r[7],e[2]=i*r[2]+n*r[5]+s*r[8],e}function T(e,t,r){const i=r[0],n=r[1],s=r[2],o=r[3],a=t[0],l=t[1],u=t[2],c=n*u-s*l,p=s*a-i*u,d=i*l-n*a,h=n*d-s*p,g=s*c-i*d,y=i*p-n*c,m=2*o;return e[0]=a+c*m+2*h,e[1]=l+p*m+2*g,e[2]=u+d*m+2*y,e}const N=(0,i.vt)(),R=(0,i.vt)();function _(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function V(e,t,r){const i=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2];let o=i*i+n*n+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=i*o,e[1]=n*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const P=u,O=c,F=p,z=v,U=b,E=s,L=w;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){x(N,e),x(R,t);const r=C(N,R);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(e,t,r,i,n,s){const o=1-s,a=o*o,l=s*s,u=a*o,c=3*s*a,p=3*l*o,d=l*s;return e[0]=t[0]*u+r[0]*c+i[0]*p+n[0]*d,e[1]=t[1]*u+r[1]*c+i[1]*p+n[1]*d,e[2]=t[2]*u+r[2]*c+i[2]*p+n[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:o,cross:A,crossAndNormalize:function(e,t,r){const i=t[0],n=t[1],s=t[2],o=r[0],a=r[1],l=r[2],u=n*l-s*a,c=s*o-i*l,p=i*a-n*o,d=Math.sqrt(u*u+c*c+p*p);return e[0]=u/d,e[1]=c/d,e[2]=p/d,e},direction:V,dist:z,distance:v,div:F,divide:p,dot:C,equals:function(e,t){if(e===t)return!0;const r=e[0],i=e[1],s=e[2],o=t[0],a=t[1],l=t[2],u=(0,n.FD)();return Math.abs(r-o)<=u*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-a)<=u*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))},exactEquals:_,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,r,i,n,s){const o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,u=o*(s-1),c=o*(3-2*s);return e[0]=t[0]*a+r[0]*l+i[0]*u+n[0]*c,e[1]=t[1]*a+r[1]*l+i[1]*u+n[1]*c,e[2]=t[2]*a+r[2]*l+i[2]*u+n[2]*c,e},inverse:M,len:E,length:s,lerp:I,max:y,min:g,mul:O,multiply:c,negate:S,normalize:x,random:function(e,t=1){const r=n.Ov,i=2*r()*Math.PI,s=2*r()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(i)*o,e[1]=Math.sin(i)*o,e[2]=s*t,e},rotateX:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0],s[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),s[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateY:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),s[1]=n[1],s[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateZ:function(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),s[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),s[2]=n[2],e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:m,scaleAndAdd:f,set:a,sign:h,sqrDist:U,sqrLen:L,squaredDistance:b,squaredLength:w,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:P,subtract:u,transformMat3:Z,transformMat4:j,transformQuat:T},Symbol.toStringTag,{value:"Module"}))},46130:(e,t,r)=>{r.d(t,{v:()=>n});var i=r(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],r),r}},54239:(e,t,r)=>{r.d(t,{A:()=>f});var i,n=r(31635),s=r(4576),o=r(66552),a=r(25482),l=r(83047),u=r(67076),c=r(10107),p=(r(44208),r(53966),r(36005)),d=r(40608),h=r(43937);const g=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=g.jsonValues.slice();(0,s.Xy)(y,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return g.write(e,t,r)}readHeightModel(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n.Cg)([(0,c.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0}}}}})],f.prototype,"heightModel",void 0),(0,n.Cg)([(0,h.K)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,n.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,n.Cg)([(0,c.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],f.prototype,"heightUnit",void 0),(0,n.Cg)([(0,p.w)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,n.Cg)([(0,p.w)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,n.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,n.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,n.Cg)([(0,d.$)("esri.geometry.HeightModelInfo")],f)},58947:(e,t,r)=>{r.d(t,{w:()=>C});var i=r(31635),n=r(78888),s=r(49186),o=r(53966),a=r(74887),l=r(10107),u=(r(44208),r(87811),r(36005)),c=r(40608),p=r(46130),d=r(5443),h=r(54239),g=r(16930),y=r(60694),m=r(10873),f=r(83898),v=r(73179);var b=r(20655),w=r(80812),S=r(88788),M=r(91682),x=r(26121);const C=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.url=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.sg)(async(e,t,r)=>{switch(e){case 0:return this._save(t);case 1:return this._saveAs(r,t)}})}readSpatialReference(e,t){return I(t)}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:I(t)}:e;return d.A.fromJSON(i,r)}const i=t.store,n=I(t);return null==n||null==i?.extent||!Array.isArray(i.extent)||i.extent.some(e=>e<A)?null:new d.A({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:n})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,y.yG)(this.url,t.name):t.name;let i=t.name;if(!i&&this.url){const e=(0,y.qg)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,y.cr)(i)}get parsedUrl(){return(0,v.h)(this,{separator:"layers"})}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,f.F)(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,o.A.getLogger(this),t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r?.obb?.center||null==r.obb.halfSize)throw new s.A("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<A||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,n=r.obb.center[2],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=n-o,this.fullExtent.zmax=n+o}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<A)return;const r=t[2],i=t[3],{fullExtent:n}=this;n&&(n.zmin=r-i,n.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new s.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,n.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,n.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,n.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){const r={...T,...t};let i=w.default.from(e);if(!i)throw new s.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");i.id&&(i=i.clone(),i.id=null);const n=i.portal||b.A.getDefault();await this._ensureLoadBeforeSave(),i.type=Z,i.portal=n;const o=(0,S.m)(i,"portal-item",!0),a={layers:[this.write({},o)]};return await Promise.all(o.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,o,r),this.url&&(i.url=this.url),i.title||(i.title=this.title),j(i,r,1),await n.signIn(),await n.user.addItem({item:i,folder:r?.folder,data:a}),await(0,M.r)(this.resourceReferences,o),this.portalItem=i,(0,p.v)(o),o.portalItem=i,i}async _save(e){const t={...T,...e};if(!this.portalItem)throw new s.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==Z)throw new s.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${Z}"`);await this._ensureLoadBeforeSave();const r=(0,S.m)(this.portalItem,"portal-item",!0),i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.url&&(this.portalItem.url=this.url),this.portalItem.title||(this.portalItem.title=this.title),j(this.portalItem,t,0),await(0,M.S)(this.portalItem,i,this.resourceReferences,r),(0,p.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){const i=r?.validationOptions;(0,x.ci)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:i?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const n=i?.enabled,a=null;if(n&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(!t.length)return;const n=`Layer item did not validate:\n${t.join("\n")}`;if(o.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${n}`),"throw"===i.failPolicy){const e=t.map(e=>new s.A("sceneservice:schema-validation",e));throw new s.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,i.Cg)([(0,l.MZ)(m.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({type:g.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readSpatialReference",null),(0,i.Cg)([(0,l.MZ)({type:d.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,u.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readFullExtent",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:h.A})],r.prototype,"heightModelInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,u.w)("version",["store.version"])],r.prototype,"readVersion",null),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:!1}})],r.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],r.prototype,"title",void 0),(0,i.Cg)([(0,u.w)("portal-item","title")],r.prototype,"readTitlePortalItem",null),(0,i.Cg)([(0,u.w)("service","title",["name"])],r.prototype,"readTitleService",null),(0,i.Cg)([(0,l.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],r.prototype,"layerId",void 0),(0,i.Cg)([(0,l.MZ)((0,v.b)({separator:"layers"}))],r.prototype,"url",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"store",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],r.prototype,"rootNode",void 0),r=(0,i.Cg)([(0,c.$)("esri.layers.mixins.SceneService")],r),r},A=-1e38;function I(e){if(null!=e.spatialReference)return g.A.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null!=i?new g.A(i):null}function j(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),1===r&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}const Z="Scene Service",T={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}}},62885:(e,t,r)=>{r.d(t,{H:()=>s,V:()=>n});var i=r(7762);function n(e,t,r=i.A){return t||(t=new r),t===e||t.destroyed||(t.removeAll(),(n=e)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?t.addMany(e):e&&t.add(e)),t;var n}function s(e){return e}},64272:(e,t,r)=>{r.d(t,{T:()=>d});var i,n=r(31635),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),p=r(98623);let d=class extends s.A{static{i=this}static get allTime(){return h}static get empty(){return g}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let n=this.end;if(n){const r=(0,o.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,e,t,r)),null!=a&&(n.end=(0,o.S1)(a,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,l.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],d.prototype,"writeStart",null),d=i=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],d);const h=new d,g=new d({start:void 0,end:void 0})},67026:(e,t,r)=>{r.d(t,{A6:()=>y,Xd:()=>c,Xr:()=>h,hZ:()=>f,lw:()=>p,t2:()=>Z,x8:()=>u});var i=r(29242),n=r(82534),s=r(51850),o=r(34304),a=r(38954),l=r(87317);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,o.FD)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=r[0],l=r[1],u=r[2],c=r[3];return e[0]=i*c+o*a+n*u-s*l,e[1]=n*c+o*l+s*a-i*u,e[2]=s*c+o*u+i*l-n*a,e[3]=o*c-i*a-n*l-s*u,e}function d(e,t,r,i){const n=t[0],s=t[1],a=t[2],l=t[3];let u,c,p,d,h,g=r[0],y=r[1],m=r[2],f=r[3];return c=n*g+s*y+a*m+l*f,c<0&&(c=-c,g=-g,y=-y,m=-m,f=-f),1-c>(0,o.FD)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-i)*u)/p,h=Math.sin(i*u)/p):(d=1-i,h=i),e[0]=d*n+h*g,e[1]=d*s+h*y,e[2]=d*a+h*m,e[3]=d*l+h*f,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function g(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const n=(r+1)%3,s=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*s+s]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+s]-t[3*s+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[s]=(t[3*s+r]+t[3*r+s])*i}return e}function y(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const s=Math.sin(t),o=Math.cos(t),a=Math.sin(r),l=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=s*l*c-o*a*u,e[1]=o*a*c+s*l*u,e[2]=o*l*u-s*a*c,e[3]=o*l*c+s*a*u,e}const m=l.c,f=l.s,v=l.g,b=p,w=l.d,S=l.h,M=l.l,x=l.j,C=x,A=l.b,I=A,j=l.n,Z=l.a,T=l.e,N=(0,s.vt)(),R=(0,s.fA)(1,0,0),_=(0,s.fA)(0,1,0),V=(0,n.vt)(),P=(0,n.vt)(),O=(0,i.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e},conjugate:h,copy:m,dot:S,equals:T,exactEquals:Z,fromEuler:y,fromMat3:g,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],n=t[2],s=t[3],o=r*r+i*i+n*n+s*s,a=o?1/o:0;return e[0]=-r*a,e[1]=-i*a,e[2]=-n*a,e[3]=s*a,e},len:C,length:x,lerp:M,mul:b,multiply:p,normalize:j,random:function(e){const t=o.Ov,r=t(),i=t(),n=t(),s=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=s*Math.sin(2*Math.PI*i),e[1]=s*Math.cos(2*Math.PI*i),e[2]=a*Math.sin(2*Math.PI*n),e[3]=a*Math.cos(2*Math.PI*n),e},rotateX:function(e,t,r){r*=.5;const i=t[0],n=t[1],s=t[2],o=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+o*a,e[1]=n*l+s*a,e[2]=s*l-n*a,e[3]=o*l-i*a,e},rotateY:function(e,t,r){r*=.5;const i=t[0],n=t[1],s=t[2],o=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l-s*a,e[1]=n*l+o*a,e[2]=s*l+i*a,e[3]=o*l-n*a,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],n=t[1],s=t[2],o=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+n*a,e[1]=n*l-i*a,e[2]=s*l+o*a,e[3]=o*l-s*a,e},rotationTo:function(e,t,r){const i=(0,a.e)(t,r);return i<-.999999?((0,a.h)(N,R,t),(0,a.H)(N)<1e-6&&(0,a.h)(N,_,t),(0,a.n)(N,N),u(e,N,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.h)(N,t,r),e[0]=N[0],e[1]=N[1],e[2]=N[2],e[3]=1+i,j(e,e))},scale:w,set:f,setAxes:function(e,t,r,i){const n=O;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],j(e,g(e,n))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,n,s){return d(V,t,n,s),d(P,r,i,s),d(e,V,P,2*s*(1-s)),e},sqrLen:I,squaredLength:A,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},68197:(e,t,r)=>{r.d(t,{A:()=>l});var i=r(40876),n=r(34727),s=r(56507);function o(e){return(0,n.qE)((0,s.Vr)(e),0,255)}function a(e,t){const r=e.toString(16).padStart(2,"0");return t?r.slice(0,1):r}class l{static blendColors(e,t,r,i=new l){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=(0,i.lT)(e);return r?l.fromArray(r,t):null}static fromHex(e,t=new l){const r=(0,i.oW)(e);return r?l.fromArray(r,t):null}static fromArray(e,t=new l){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,i.Eq)(e);return r?l.fromArray(r,t):null}static fromJSON(e){return null!=e?new l([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?l.fromString(e,this):Array.isArray(e)?l.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof l||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,i=3===r||4===r,n=4===r||8===r,s=`#${a(this.r,i)}${a(this.g,i)}${a(this.b,i)}${n?a(Math.round(255*this.a),i):""}`;return t?s.toUpperCase():s}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){const t=o(this.r),r=o(this.g),i=o(this.b);return 0===e||1!==this.a?[t,r,i,o(255*this.a)]:[t,r,i]}clone(){return new l(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,i.c1)(this.r),this.g=(0,i.c1)(this.g),this.b=(0,i.c1)(this.b),this.a=(0,i.G1)(this.a),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}l.prototype.declaredClass="esri.Color"},69052:(e,t,r)=>{r.d(t,{hr:()=>n,ie:()=>l,uC:()=>a});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+o(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function s(e,t,r,i,n=0,s=!1){return(i-=n)<t?i+=o(e,t-i):i>r&&(i-=o(e,i-r)),s&&i===r&&(i=t),i+n}function o(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360))},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},69540:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),n=r(69622),s=(r(44208),r(4718)),o=(r(53966),r(97768)),a=r(88620),l=r(40608);const u=e=>{const t=e;let r=class extends t{clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const r=t.metadata,i=t.store,n={},l=new Map;for(const t in r){const o=r[t],a=i?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[t];let p=null;if("function"==typeof u)p=u(c,e);else if("reference"===u)p=c;else if(p=(0,s.TU)(c,e),null!=c&&null==p)continue;0===a?l.set(t,p):n[t]=p}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,r]of l)e.set(t,r,0)}return u}};return r=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],r),r};let c=class extends(u(n.A)){};c=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=u;const p=c},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},73179:(e,t,r)=>{r.d(t,{b:()=>l,h:()=>u});var i=r(4718),n=r(53966),s=r(84952),o=r(60694),a=r(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:r}=e??{},s=(0,i.o8)(a.OZ),l=s.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,n){(0,o.LS)(this,e,r,t,n)}),{...s,set:function(e){if(null==e)return void this._set("url",e);const r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:n.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function u(e,t){const{separator:r}=t??{},i=(0,s.An)(e.url);return null!=i&&(null!=e.dynamicDataSource?i.path=(0,s.fj)(i.path,"dynamicLayer"):null!=e.layerId&&(i.path=(0,s.fj)(i.path,r??"",e.layerId.toString()))),i}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>y});const i={Base64:0,Hex:1,String:2,Raw:3},n=8,s=(1<<n)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*n;r<i;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&s)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&s));return t.join("")}function u(e,t,r,i,n,s){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,s)),n),r)}function c(e,t,r,i,n,s,o){return u(t&r|~t&i,e,t,n,s,o)}function p(e,t,r,i,n,s,o){return u(t&i|r&~i,e,t,n,s,o)}function d(e,t,r,i,n,s,o){return u(t^r^i,e,t,n,s,o)}function h(e,t,r,i,n,s,o){return u(r^(t|~i),e,t,n,s,o)}function g(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,s=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,u=n,g=s;r=c(r,i,n,s,e[t],7,-680876936),s=c(s,r,i,n,e[t+1],12,-389564586),n=c(n,s,r,i,e[t+2],17,606105819),i=c(i,n,s,r,e[t+3],22,-1044525330),r=c(r,i,n,s,e[t+4],7,-176418897),s=c(s,r,i,n,e[t+5],12,1200080426),n=c(n,s,r,i,e[t+6],17,-1473231341),i=c(i,n,s,r,e[t+7],22,-45705983),r=c(r,i,n,s,e[t+8],7,1770035416),s=c(s,r,i,n,e[t+9],12,-1958414417),n=c(n,s,r,i,e[t+10],17,-42063),i=c(i,n,s,r,e[t+11],22,-1990404162),r=c(r,i,n,s,e[t+12],7,1804603682),s=c(s,r,i,n,e[t+13],12,-40341101),n=c(n,s,r,i,e[t+14],17,-1502002290),i=c(i,n,s,r,e[t+15],22,1236535329),r=p(r,i,n,s,e[t+1],5,-165796510),s=p(s,r,i,n,e[t+6],9,-1069501632),n=p(n,s,r,i,e[t+11],14,643717713),i=p(i,n,s,r,e[t],20,-373897302),r=p(r,i,n,s,e[t+5],5,-701558691),s=p(s,r,i,n,e[t+10],9,38016083),n=p(n,s,r,i,e[t+15],14,-660478335),i=p(i,n,s,r,e[t+4],20,-405537848),r=p(r,i,n,s,e[t+9],5,568446438),s=p(s,r,i,n,e[t+14],9,-1019803690),n=p(n,s,r,i,e[t+3],14,-187363961),i=p(i,n,s,r,e[t+8],20,1163531501),r=p(r,i,n,s,e[t+13],5,-1444681467),s=p(s,r,i,n,e[t+2],9,-51403784),n=p(n,s,r,i,e[t+7],14,1735328473),i=p(i,n,s,r,e[t+12],20,-1926607734),r=d(r,i,n,s,e[t+5],4,-378558),s=d(s,r,i,n,e[t+8],11,-2022574463),n=d(n,s,r,i,e[t+11],16,1839030562),i=d(i,n,s,r,e[t+14],23,-35309556),r=d(r,i,n,s,e[t+1],4,-1530992060),s=d(s,r,i,n,e[t+4],11,1272893353),n=d(n,s,r,i,e[t+7],16,-155497632),i=d(i,n,s,r,e[t+10],23,-1094730640),r=d(r,i,n,s,e[t+13],4,681279174),s=d(s,r,i,n,e[t],11,-358537222),n=d(n,s,r,i,e[t+3],16,-722521979),i=d(i,n,s,r,e[t+6],23,76029189),r=d(r,i,n,s,e[t+9],4,-640364487),s=d(s,r,i,n,e[t+12],11,-421815835),n=d(n,s,r,i,e[t+15],16,530742520),i=d(i,n,s,r,e[t+2],23,-995338651),r=h(r,i,n,s,e[t],6,-198630844),s=h(s,r,i,n,e[t+7],10,1126891415),n=h(n,s,r,i,e[t+14],15,-1416354905),i=h(i,n,s,r,e[t+5],21,-57434055),r=h(r,i,n,s,e[t+12],6,1700485571),s=h(s,r,i,n,e[t+3],10,-1894986606),n=h(n,s,r,i,e[t+10],15,-1051523),i=h(i,n,s,r,e[t+1],21,-2054922799),r=h(r,i,n,s,e[t+8],6,1873313359),s=h(s,r,i,n,e[t+15],10,-30611744),n=h(n,s,r,i,e[t+6],15,-1560198380),i=h(i,n,s,r,e[t+13],21,1309151649),r=h(r,i,n,s,e[t+4],6,-145523070),s=h(s,r,i,n,e[t+11],10,-1120210379),n=h(n,s,r,i,e[t+2],15,718787259),i=h(i,n,s,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),n=o(n,u),s=o(s,g)}return[r,i,n,s]}function y(e,t=i.Hex){const r=t||i.Base64,s=g(a(e),e.length*n);switch(r){case i.Raw:return s;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(s);case i.String:return l(s);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-n)&63))}return t.join("")}(s)}}},82534:(e,t,r)=>{function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>n,vt:()=>i,zK:()=>s});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:n,create:i,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},83898:(e,t,r)=>{r.d(t,{F:()=>s});var i=r(78888),n=r(49186);async function s(e,t,r,s,o,a,l){let u=null;if(null!=r){const t=`${e}/nodepages/`,n=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.A)(n,{query:{f:"json",...s,token:o},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=a&&a.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",n,e),u=e}}if(!t)return null;const c=t?.split("/").pop(),p=`${e}/nodes/`,d=p+c;try{return{type:"node",rootNode:(await(0,i.A)(d,{query:{f:"json",...s,token:o},responseType:"json",signal:l})).data,urlPrefix:p}}catch(e){throw new n.A("sceneservice:root-node-missing","Root node missing.",{pageError:u,nodeError:e,url:d})}}},85648:(e,t,r)=>{r.d(t,{n:()=>n});var i=r(84952);function n(e){return s[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const s={},o="text/plain",a=s[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)s[l[e]]=e},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),n=r(80200),s=r(76553),o=r(84952),a=r(13069),l=r(96156),u=r(35666),c=r(10107),p=r(85648),d=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const n=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{const n=(0,d.r)(e,t,r);return i.type===String?n:"function"==typeof i.type?new i.type({url:n}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,n,a,l){if(!l?.resources)return"string"==typeof t?void(n[a]=(0,d.t)(t,l)):void(n[a]=t.write({},l));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),f=i.type!==String&&(!(0,s.H)(this)||l?.origin&&this.originIdOf(r)>(0,u.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:n,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,o.oP)(h)?f&&e?.contentAddressed?g(v):f?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:s,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=m(n,r,t),c=(0,p.n)(u),d=(0,o.Zo)(l.path),h=i?.compress??!1;c===d?(t.resources&&y({...e,resource:l,content:u,compress:h,updates:t.resources.toUpdate}),s[a]=r):g(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,d.i)(h)||(0,o.w8)(h)||f)?g(v):n[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,c.rM)(r,e,i);for(const e in n)t[e]=n[e]}}}function g(e){const{targetUrl:t,params:r,value:s,context:l,dest:u,targetPropertyName:c}=e;if(!l.portalItem)return;const h=(0,d.p)(t),g=m(s,t,l);if(r?.contentAddressed&&"json"!==g.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${g.type} with content addressing. Content addressing is only supported for json resources.`,{content:g}));const f=r?.contentAddressed&&"json"===g.type?(0,n.d)(g.jsonString):h?.filename??(0,a.lk)(),v=(0,o.fj)(r?.prefix??h?.prefix,f),b=`${v}.${(0,p.n)(g)}`;if(r?.contentAddressed&&l.resources&&"json"===g.type){const e=l.resources.toKeep.find(({resource:e})=>e.path===b)??l.resources.toAdd.find(({resource:e})=>e.path===b);if(e)return void(u[c]=e.resource.itemRelativeUrl)}const w=l.portalItem.resourceFromPath(b);(0,o.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.tk)(t).then(e=>{w.path=`${v}.${(0,p.n)({type:"blob",blob:e})}`,u[c]=w.itemRelativeUrl}).catch(()=>{}));const S=r?.compress??!1;l.resources&&y({...e,resource:w,content:g,compress:S,updates:l.resources.toAdd}),u[c]=w.itemRelativeUrl}function y({object:e,propertyName:t,updates:r,resource:i,content:n,compress:s}){r.push({resource:i,content:n,compress:s,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function m(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},88788:(e,t,r)=>{r.d(t,{m:()=>o,v:()=>s});var i=r(84952),n=r(20655);function s(e,t){return{...a(e,t),readResourcePaths:[]}}function o(e,t,r){const n=(0,i.An)(e.itemUrl);return{...a(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function a(e,t){return{origin:t,url:(0,i.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},91682:(e,t,r)=>{r.d(t,{S:()=>l,r:()=>a});var i=r(49186),n=r(74887),s=r(13069),o=r(15804);async function a(e,t,r){const i=await u(e,t,r);await c(i,t,r)}async function l(e,t,r,i,n){const s=await u(r,i,n);await e.update({data:t}),await c(s,i,n)}async function u(e,t,a){if(!t?.resources)return;const l=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const u=new Set(t.resources.toKeep.map(e=>e.resource.path)),c=new Set,p=[];u.forEach(t=>{l.delete(t),e.paths.push(t)});const d=[],h=[],g=[];for(const r of t.resources.toUpdate)if(l.delete(r.resource.path),u.has(r.resource.path)||c.has(r.resource.path)){const{resource:t,content:i,finish:n}=r,a=(0,o.bg)(t,(0,s.lk)());e.paths.push(a.path),d.push({resource:a,content:await(0,o.cL)(i),compress:r.compress}),n&&g.push(()=>n(a))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});const t=r.finish;t&&g.push(()=>t(r.resource)),c.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{d.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});const e=r.finish;e&&g.push(()=>e(r.resource))}if(d.length||h.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,15804));await e(t.portalItem,d,"add",a),await e(t.portalItem,h,"update",a)}if(g.forEach(e=>e()),0===p.length)return l;const y=await(0,n.Ol)(p);if((0,n.Te)(a),y.length>0)throw new i.A("save:resources","Failed to save one or more resources",{errors:y});return l}async function c(e,t,r){if(!e||!t.portalItem)return;const i=[];for(const n of e){const e=t.portalItem.resourceFromPath(n);i.push(e.portalItem.removeResource(e,r))}await(0,n.Lx)(i)}},92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>w});var i=r(31635),n=r(69622),s=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[0];r&&r.forEach((e,r)=>{t.set(r,(0,o.o8)(e),0)});for(let r=2;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,n)=>{e&&e.has(n)||t.set(n,(0,o.o8)(i),r)})}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=7){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=7){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),n=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),n!==i}originOf(e){return this._propertyOriginMap.get(e)||0}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var u=r(45917),c=r(88620),p=r(40608);const d=e=>{const t=e;let r=class extends t{constructor(...e){super(...e);const t=(0,c.oY)(this),r=t.store,i=new l;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const n={};return e.forEach(e=>{n[e]=r.get(e,i)}),n}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,a.aB)(t),n=(0,c.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach(e=>{n.invalidate(e),r.revert(e,i),n.commit(e)})}};return r=(0,i.Cg)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],r),r};function h(e){return(0,c.oY)(e).store}let g=class extends(d(n.A)){};g=(0,i.Cg)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],g);var y=r(16649),m=r(49422);const f=e=>{const t=e;let r=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,c.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,c.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=v(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),7)}updateOrigin(e,t){const r=v(this),i=(0,a.aB)(t),n=(0,y.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,n,i)}toJSON(e){return this.write({},e)}};return r=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function v(e){return(0,c.oY)(e).store}const b=e=>{const t=f(d(e));let r=class extends t{constructor(...e){super(...e)}};return r=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport")],r),r};let w=class extends(b(n.A)){};w=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport")],w)},95466:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(49186),n=r(53966),s=r(91869),o=r(3330),a=r(12195),l=r(30524),u=r(98623),c=r(56400),p=r(96285);const d=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],f(e))}static fromLayerJSON(e){return new h(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=y(t);if(t&&i){const n=g(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(g(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?p.mQ.utcInstance:(0,s.tE)(d,t,()=>p.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,a.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function g(e){return e.trim().toLowerCase()}function y(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,c.ZS)(n.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,c.ZS)(i.timeReference):a:null,d=new Map([[g(n?.creationDateField??""),l],[g(n?.editDateField??""),l],[g(s),p],[g(o),p]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(g(i??""))??a;t.set(i,e)}return t}},96184:(e,t,r)=>{r.d(t,{A:()=>g});var i=r(31635),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(64272),p=r(26253),d=r(56400);function h(e,t){return p.T.fromJSON({value:e,unit:t})}let g=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?c.T.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],g.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],g.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:c.T,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,a.w)("fullTimeExtent",["timeExtent"])],g.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,u.K)("fullTimeExtent")],g.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"interval",void 0),(0,i.Cg)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],g.prototype,"readInterval",null),(0,i.Cg)([(0,u.K)("interval")],g.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],g.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,d.P6)("timeReference",!0))],g.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],g.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],g.prototype,"stops",void 0),g=(0,i.Cg)([(0,l.$)("esri.layers.support.TimeInfo")],g)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1088,6859],{16859:(t,e,i)=>{i.d(e,{G:()=>M,a:()=>f,m:()=>D});var n=i(31635),s=i(55537),o=i(88885),r=i(39117),m=i(95213),a=i(79187),u=i(83661),c=i(11878),h=i(26640),l=i(76061),_=i(31088);class g{getOperatorType(){return 10317}supportsCurves(){return!0}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}executeMany(t,e,i,n,s,o){return new _.OperatorGeodeticDensifyCursor(t,e,4,i,n,s,o)}execute(t,e,i,n,o,r){const m=new l.S([t]),a=this.executeMany(m,e,i,n,o,r).next();return a||(0,s.d)("null output"),a}}var p=i(31139);class y{[Symbol.dispose](){this.m_peR1.destroy(),this.m_peR2.destroy(),this.m_peR3.destroy(),this.m_peR1=null,this.m_peR2=null,this.m_peR3=null}constructor(t,e,i){this.m_peR1=new r.a7,this.m_peR2=new r.a7,this.m_peR3=new r.a7,void 0!==t?this.reset(t,e,i):this.reset(1,0,1)}reset(t,e,i){this.m_a=t,this.m_e2=e,this.m_b=this.m_a*Math.sqrt(1-this.m_e2),this.m_unitToDegree=i,this.m_unitToRad=.017453292519943295*i,this.m_u180=180/this.m_unitToDegree,this.m_u360=360/this.m_unitToDegree}calculateBbox(t,e,i,n){const s=this.m_peR1,o=this.m_peR2,m=this.m_peR3;r.a8.geodeticDistance(this.m_a,this.m_e2,t*this.m_unitToRad,e*this.m_unitToRad,i*this.m_unitToRad,n*this.m_unitToRad,m,s,o,0);const c=Math.cos(s.val),h=Math.cos(o.val+3.141592653589793),l=e*this.m_unitToRad,_=r.ai.phiToEta(this.m_e2,l),g=Math.sin(s.val)*Math.cos(_);let p=e;if(c*h<0){const t=c<0?-1:1,e=Math.acos(Math.abs(g))*t;p=r.ai.etaToPhi(this.m_e2,e)/this.m_unitToRad}let y=(0,u.l)((i-t)*this.m_unitToRad,2*Math.PI);Math.abs(y)>Math.PI&&(y=y>0?y-2*Math.PI:y+2*Math.PI),y/=this.m_unitToRad,i=t+y;const d=new a.Envelope2D;return d.xmin=Math.min(t,i),d.xmax=Math.max(t,i),d.ymin=Math.min(e,n),d.ymin=Math.min(d.ymin,p),d.ymax=Math.max(e,n),d.ymax=Math.max(d.ymax,p),d}minDistanceGeodesic(t,e){const i=d(t),n=d(e);if(i&&n)return this.lowerDistanceGeodetic_(t.xmin,t.ymin,e.xmin,e.ymin);const s=this.normalizeGeodesic_(e,t);return function(t,e){return e.xmax<t.xmin||e.xmin>t.xmax||e.ymax<t.ymin||e.ymin>t.ymax}(t,s)?t.ymin>=s.ymax?this.minDistanceGeodesicUpDown_(t,s):s.ymin>=t.ymax?this.minDistanceGeodesicUpDown_(s,t):t.xmin>s.xmax?this.minDistanceGeodesicLeftRight_(s,t):this.minDistanceGeodesicLeftRight_(t,s):0}normalizeGeodesic_(t,e){const i=t.clone(),n=t.clone();let s=x(i,e);if(0===s)return i;for(;n.xmax>e.xmin;){n.xmin-=this.m_u360,n.xmax-=this.m_u360;const t=x(n,e);if(t<s&&(i.assign(n),s=t,0===s))return i}for(n.assign(t);n.xmin<e.xmax;){n.xmin+=this.m_u360,n.xmax+=this.m_u360;const t=x(n,e);if(t<s&&(i.assign(n),s=t,0===s))return i}return i}lowerDistanceGeodetic_(t,e,i,n){const s=this.m_peR1;{const o=this.m_b*this.m_b/this.m_a,m=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*e),a=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*n);r.a8.geodeticDistance(o,0,this.m_unitToRad*t,m,this.m_unitToRad*i,a,s,null,null,0)}return s.val}minDistanceGeodesicUpDown_(t,e){if(e.xmin<=t.xmin?e.xmax>=t.xmin:t.xmax>=e.xmin)return this.lowerDistanceGeodetic_(0,t.ymin,0,e.ymax);if(e.xmin>t.xmax){const i=this.lowerDistanceGeodeticSegMeridional_(t.xmax,t.ymin,t.ymax,e.xmin,e.ymin,e.ymax);if(e.xmax-t.xmin<this.m_u180)return i;const n=this.lowerDistanceGeodeticSegMeridional_(t.xmin,t.ymin,t.ymax,e.xmax,e.ymin,e.ymax);return Math.min(i,n)}{const i=this.lowerDistanceGeodeticSegMeridional_(t.xmin,t.ymin,t.ymax,e.xmax,e.ymin,e.ymax);if(t.xmax-e.xmin<this.m_u180)return i;const n=this.lowerDistanceGeodeticSegMeridional_(t.xmax,t.ymin,t.ymax,e.xmin,e.ymin,e.ymax);return Math.min(i,n)}}minDistanceGeodesicLeftRight_(t,e){let i=Math.abs(t.xmax-e.xmin);for(;i>this.m_u180;)i-=this.m_u360;let n=Math.abs(t.xmin-e.xmax);for(;n>this.m_u180;)n-=this.m_u360;return Math.abs(i)<=Math.abs(n)?this.minDistanceGeodesicLeftRightNormalized_(t,e):this.minDistanceGeodesicLeftRightNormalized_(e,t)}minDistanceGeodesicLeftRightNormalized_(t,e){let i,n;return i=this.lowerDistanceGeodetic_(t.xmax,t.ymin,e.xmin,e.ymin),t.ymin>=e.ymin&&t.ymin<=e.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(t.xmax,t.ymin,e.xmin,e.ymin,e.ymax),i=Math.min(i,n)),e.ymin>=t.ymin&&e.ymin<=t.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(e.xmin,e.ymin,t.xmax,t.ymin,t.ymax),i=Math.min(i,n)),n=this.lowerDistanceGeodetic_(t.xmax,t.ymax,e.xmin,e.ymax),i=Math.min(i,n),t.ymax>=e.ymin&&t.ymax<=e.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(t.xmax,t.ymax,e.xmin,e.ymin,e.ymax),i=Math.min(i,n)),e.ymax>=t.ymin&&e.ymax<=t.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(e.xmin,e.ymax,t.xmax,t.ymin,t.ymax),i=Math.min(i,n)),i}lowerDistanceGeodeticSegMeridional_(t,e,i,n,s,o){let r=this.lowerDistanceGeodeticPtMeridional_(t,e,n,s,o);const m=this.lowerDistanceGeodeticPtMeridional_(t,i,n,s,o);let a=this.lowerDistanceGeodeticPtMeridional_(n,s,t,e,i);const u=this.lowerDistanceGeodeticPtMeridional_(n,o,t,e,i);return r=Math.min(r,m),a=Math.min(a,u),Math.min(r,a)}lowerDistanceGeodeticPtMeridional_(t,e,i,n,s){const o=this.m_b*this.m_b/this.m_a,a=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*e),c=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*n),h=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*s),l=this.m_peR1,_=this.m_peR2;r.a8.geodeticDistance(o,0,this.m_unitToRad*i,c,this.m_unitToRad*t,a,l,null,null,0),r.a8.geodeticDistance(o,0,this.m_unitToRad*i,h,this.m_unitToRad*t,a,_,null,null,0);const g=(0,r.a9)(1,0,new u.P(this.m_unitToRad*t,a)),p=(0,r.a9)(1,0,new u.P(this.m_unitToRad*i,c)),y=(0,r.a9)(1,0,new u.P(this.m_unitToRad*i,h));let d=new m.d;d.setCrossProductVector(p,y);const x=p.dotProduct(y);if(d.length()<1.568e-10)return x>=0?Math.min(l.val,_.val):0;d=d.getUnitVector();let P=new m.d;if(P.setCrossProductVector(d,g),P.length()<1.568e-10)return Math.min(l.val,_.val)-1e-5*o;P=P.getUnitVector();let D=g.sub(d.mul(g.dotProduct(d)));{const e=new m.d;e.setCrossProductVector(p,D);const i=new m.d;i.setCrossProductVector(D,y);let n=d.dotProduct(e)>0&&d.dotProduct(i)>0;if(n||(D.negateThis(),e.setCrossProductVector(p,D),i.setCrossProductVector(D,y),n=d.dotProduct(e)>0&&d.dotProduct(i)>0),n){D=D.getUnitVector();const e=(0,r.ah)(1,0,D),i=this.m_peR3;r.a8.geodeticDistance(o,0,this.m_unitToRad*t,a,e.x,e.y,i,null,null,0);const n=Math.min(l.val,_.val);return Math.min(n,i.val)}}return Math.min(l.val,_.val)}}function d(t){return t.xmin===t.xmax&&t.ymin===t.ymax}function x(t,e){let i,n=0;return i=t.xmin-e.xmax,i>n&&(n=i),i=e.xmin-t.xmax,i>n&&(n=i),n}class P{}function D(t){return{outPoint:void 0===t?new u.P:t.clone()}}function v(t,e){t.outPoint.assign(e.outPoint)}function G(){return new a.Envelope2D}class f{constructor(t,e,i,n,s=0,o=4){this.m_ptDistFrom=new u.P,this.m_segStartPt=new u.P,this.m_segEndPt=new u.P,this.m_geodeticLength=new r.a7,this.m_az12=new r.a7,this.m_minGeodeticDist=new r.a7,this.m_segStartPt3d=new m.d,this.m_segEndPt3d=new m.d,this.m_sr=n,this.m_distCurveType=s,this.m_segCurveType=o,this.m_inputGCS=this.m_sr.getGCS(),this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_bIsPannablePcs=2===this.m_sr.getCoordinateSystemType()&&this.m_sr.isPannable();const a=(0,r.F)();this.m_inputGCS.querySpheroidData(a),this.m_a=a.majorSemiAxis,this.m_eSquared=a.e2,this.setPointDistFrom(t),this.setSegmentEndPoints(e,i)}setSegmentEndPoints(t,e){this.m_segStartPt.assign(t),this.m_segEndPt.assign(e),this.m_bIsPannablePcs||(this.m_segStartPt.mulThis(this.m_rpu),this.m_segEndPt.mulThis(this.m_rpu)),2===this.m_segCurveType&&(this.m_segStartPt3d.assign((0,r.a9)(this.m_a,this.m_eSquared,this.m_segStartPt)),this.m_segEndPt3d.assign((0,r.a9)(this.m_a,this.m_eSquared,this.m_segEndPt))),this.calculateAndUpdateSegmentLength()}setPointDistFrom(t){this.m_ptDistFrom.assign(t),this.m_ptDistFrom.scale(this.m_rpu)}setSegmentCurveType(t){this.m_segCurveType=t}setDistanceCurveType(t){this.m_distCurveType=t}makeFunctor(){return t=>{let e;switch(this.m_segCurveType){case 0:case 1:case 3:{const i={stack:[],error:void 0,hasError:!1};try{const s=(0,n.mS)(i,new r.a7,!1),o=(0,n.mS)(i,new r.a7,!1);r.a8.geodeticCoordinate(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_geodeticLength.val*t,this.m_az12.val,s,o,this.m_segCurveType),e=new u.P(s.val,o.val);break}catch(t){i.error=t,i.hasError=!0}finally{(0,n.hk)(i)}}case 2:{const i=m.d.lerp(this.m_segStartPt3d,this.m_segEndPt3d,t);e=(0,r.ah)(this.m_a,this.m_eSquared,i);break}case 4:e=u.P.lerp(this.m_segStartPt,this.m_segEndPt,t),this.m_bIsPannablePcs&&((0,r.ab)(this.m_sr,0,[e],1),e.mulThis(this.m_rpu));break;default:(0,s.d)("Invalid curve type")}return r.a8.geodeticDistance(this.m_a,this.m_eSquared,this.m_ptDistFrom.x,this.m_ptDistFrom.y,e.x,e.y,this.m_minGeodeticDist,null,null,this.m_distCurveType),this.m_minGeodeticDist.val}}calculateAndUpdateSegmentLength(){switch(this.m_segCurveType){case 0:case 2:case 1:case 3:r.a8.geodeticDistance(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_segEndPt.x,this.m_segEndPt.y,this.m_geodeticLength,this.m_az12,null,this.m_segCurveType);break;case 4:this.m_geodeticLength.val=u.P.distance(this.m_segStartPt,this.m_segEndPt);break;default:(0,s.d)("Invalid curve type")}}[Symbol.dispose](){this.m_geodeticLength[Symbol.dispose](),this.m_az12[Symbol.dispose](),this.m_minGeodeticDist[Symbol.dispose]()}}function S(){return new P}class M{[Symbol.dispose](){this.m_envHelper[Symbol.dispose]()}constructor(t,e,i,n,s){this.m_boxGeomA=G(),this.m_boxGeomB=G(),this.m_envGeomA=new a.Envelope2D,this.m_envGeomB=new a.Envelope2D,this.m_progressCounter=0,this.m_transformPCS2GCS=null,this.m_segmentBoxesA=new Map,this.m_segmentBoxesB=new Map,this.m_boundaryPtsA=[],this.m_boundaryPtsB=[],this.m_scaleToRadians=new c.T,this.m_scaleToDegrees=new c.T,this.m_inputSR=t,this.m_distCurveType=e,this.m_progressTracker=i,this.m_maxDistance=n,this.m_maxDeviation=s,this.m_inputGCS=t.getGCS(),this.m_peGeogcs=this.m_inputGCS.getPECoordSys(),this.m_tolerance=0;const o=(0,r.F)();this.m_inputGCS.querySpheroidData(o),this.m_a=o.majorSemiAxis,this.m_eSquared=o.e2,this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_envHelper=new y(this.m_a,this.m_eSquared,1),4===this.m_distCurveType&&(this.m_distCurveType=0),this.m_boxGeomA.setEmpty(),this.m_boxGeomB.setEmpty(),this.m_envGeomA.setEmpty(),this.m_envGeomB.setEmpty(),this.m_bIsPannablePcs=2===this.m_inputSR.getCoordinateSystemType()&&this.m_inputSR.isPannable()}progress(t=!1){}calculate(t,e,i,n){const s=D(),o=D();if(t.queryEnvelope(this.m_envGeomA),e.queryEnvelope(this.m_envGeomB),this.checkGeometriesIntersect(t,e,s,o))return i&&v(i,s),n&&v(n,o),0;const r=this.prepareGeometry(t);if(r.isEmpty())return Number.NaN;const m=this.prepareGeometry(e);if(m.isEmpty())return Number.NaN;this.m_tolerance=this.computeTolerance(r,m);const a=this._ExecuteBruteForce(r,m,s,o);return a>=this.m_maxDistance?Number.NaN:(i&&(this.prepareOutput(s),v(i,s)),n&&(this.prepareOutput(o),v(n,o)),a)}createDistanceFunctor(t,e,i){const n=new f(t,e,i,this.m_inputSR,this.m_distCurveType);return this.m_bIsPannablePcs||1===this.m_inputSR.getCoordinateSystemType()||n.setSegmentCurveType(2),n}_NormalizeAndProject(t){if(this.m_inputSR.isPannable()&&(t=(new r.O).foldInto360Range(t,this.m_inputSR)),2===this.m_inputSR.getCoordinateSystemType()){const e=(0,r.g)(this.m_inputSR,this.m_inputGCS,null);t=(new r.O).execute(t,e,this.m_progressTracker)}return t}_ExecuteBruteForce(t,e,i,n){switch(t.getGeometryType()){case s.G.enumPoint:return this.calculateDistanceGeodeticPointGeometry(t,e,i,n);case s.G.enumMultiPoint:return this.calculateDistanceGeodeticMultipointGeometry(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:case s.G.enumEnvelope:return this.calculateDistanceGeodeticMultipathGeometry(t,e,i,n);default:(0,s.a)("")}}calculateDistanceGeodeticPointGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.calculateDistanceGeodeticPointPoint(t,e,i,n);case s.G.enumMultiPoint:return this.calculateDistanceGeodeticPointMultipoint(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:return this.calculateDistanceGeodeticPointMultipath(t,e,i,n);default:(0,s.a)("")}}calculateDistanceGeodeticPointPoint(t,e,i,s){const o={stack:[],error:void 0,hasError:!1};try{const m=t.getXY();m.scale(this.m_rpu);const a=e.getXY();a.scale(this.m_rpu),i.outPoint.assign(m),s.outPoint.assign(a);const u=(0,n.mS)(o,new r.a7,!1);return r.a8.geodeticDistance(this.m_a,this.m_eSquared,m.x,m.y,a.x,a.y,u,null,null,this.m_distCurveType),u.val}catch(t){o.error=t,o.hasError=!0}finally{(0,n.hk)(o)}}calculateDistanceGeodeticPointMultipoint(t,e,i,s){const o={stack:[],error:void 0,hasError:!1};try{this.computeEnvelopesAndBoxes(t,e);const a=this.estimateMinimumDistance(i,s);let c=a<this.m_maxDistance?a:this.m_maxDistance;const h=t.getXY();h.scale(this.m_rpu),i.outPoint.assign(h);const l=(0,r.a9)(this.m_a,this.m_eSquared,h),_=new u.P,g=e.getImpl(),p=(0,n.mS)(o,new r.a7,!1),y=g.getPointCount();for(let t=0;t<y;++t){g.queryXY(t,_),_.scale(this.m_rpu);const e=(0,r.a9)(this.m_a,this.m_eSquared,_);if(!(m.d.distance(l,e)>c)&&!(this.m_envHelper.minDistanceGeodesic(this.m_boxGeomA,this.m_boxGeomB)>c)&&(r.a8.geodeticDistance(this.m_a,this.m_eSquared,h.x,h.y,_.x,_.y,p,null,null,this.m_distCurveType),p.val<c&&(c=p.val,s.outPoint=_,0===c)))return c}return c===this.m_maxDistance?Number.POSITIVE_INFINITY:c}catch(t){o.error=t,o.hasError=!0}finally{(0,n.hk)(o)}}calculateDistanceGeodeticPointMultipath(t,e,i,o){const m={stack:[],error:void 0,hasError:!1};try{const a=new u.P,c=new u.P;a.assign(t.getXY()),c.assign(t.getXY()),i.outPoint.assign(c.mul(this.m_rpu)),this.m_bIsPannablePcs&&(0,r.aa)(this.m_inputSR,[a],1,!1),this.computeEnvelopesAndBoxes(t,e);const h=this.estimateMinimumDistance(i,o);let l=h<this.m_maxDistance?h:this.m_maxDistance;const _=e.getImpl(),g=new u.P(0,0),p=new u.P(0,0),y=[1],d=this.canUseSpatialTree(t,e),x=S();d&&this.buildSpatialTree(x,e);const P=G();P.setCoords({xmin:c.x,ymin:c.y,xmax:c.x,ymax:c.y});const D=(0,n.mS)(m,this.createDistanceFunctor(c,g,p),!1),v=_.querySegmentIterator();if(v.stripAttributes(),d)(0,s.g)(0);else for(;v.nextPath();)for(;v.hasNextSegment();){const t=v.nextSegment(),e=this.findOrComputeBoxSegment(v.getStartPointIndex(),t,this.m_segmentBoxesB);if(this.m_envHelper.minDistanceGeodesic(P,e)>l)continue;const i=this.calculateDistanceGeodeticPointSegment(a,c,t,y,D);if(i.second<l&&(this.updateOutputSegment(o,t,i.first),l=i.second,0===l))return 0}return l===this.m_maxDistance?Number.POSITIVE_INFINITY:l}catch(t){m.error=t,m.hasError=!0}finally{(0,n.hk)(m)}}calculateDistanceGeodeticMultipointGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.calculateDistanceGeodeticPointMultipoint(e,t,n,i);case s.G.enumMultiPoint:return this.calculateDistanceGeodeticMultipointMultipoint(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:case s.G.enumEnvelope:return this.calculateDistanceGeodeticMultipointMultipath(t,e,i,n);default:(0,s.a)("")}}calculateDistanceGeodeticMultipointMultipoint(t,e,i,s){const o={stack:[],error:void 0,hasError:!1};try{const a=(0,n.mS)(o,new r.a7,!1);this.computeEnvelopesAndBoxes(t,e);const c=this.estimateMinimumDistance(i,s);let h=c<this.m_maxDistance?c:this.m_maxDistance;const l=new u.P,_=new u.P,g=t.getImpl(),p=e.getImpl(),y=G(),d=g.getPointCount(),x=p.getPointCount();for(let t=0;t<d;++t){if(l.assign(g.getXY(t)),y.setCoords({xmin:l.x,ymin:l.y,xmax:l.x,ymax:l.y}),this.m_envHelper.minDistanceGeodesic(y,this.m_boxGeomB)>h)continue;l.scale(this.m_rpu);const e=(0,r.a9)(this.m_a,this.m_eSquared,l);for(let t=0;t<x;++t){_.assign(p.getXY(t)),_.scale(this.m_rpu);const n=(0,r.a9)(this.m_a,this.m_eSquared,_);if(!(m.d.distance(e,n)>=h)&&(r.a8.geodeticDistance(this.m_a,this.m_eSquared,l.x,l.y,_.x,_.y,a,null,null,this.m_distCurveType),a.val<h&&(i.outPoint.assign(l),s.outPoint.assign(_),h=a.val,0===h)))return h}}return h===this.m_maxDistance?Number.POSITIVE_INFINITY:h}catch(t){o.error=t,o.hasError=!0}finally{(0,n.hk)(o)}}calculateDistanceGeodeticMultipointMultipath(t,e,i,o){const m={stack:[],error:void 0,hasError:!1};try{const a=e.getImpl().querySegmentIterator();a.stripAttributes(),this.computeEnvelopesAndBoxes(t,e);const c=this.estimateMinimumDistance(i,o);let h=c<this.m_maxDistance?c:this.m_maxDistance;const l=new u.P,_=new u.P(0,0),g=new u.P(0,0),p=new u.P(0,0),y=[0],d=G(),x=(0,n.mS)(m,this.createDistanceFunctor(_,g,p),!1),P=S(),D=this.canUseSpatialTree(t,e);D&&this.buildSpatialTree(P,e);const v=t.getPointCount();for(let e=0;e<v;++e)if(l.assign(t.getXY(e)),_.assign(t.getXY(e)),this.m_bIsPannablePcs&&(0,r.aa)(this.m_inputSR,[l],1,!1),d.setCoords({xmin:_.x,ymin:_.y,xmax:_.x,ymax:_.y}),!(this.m_envHelper.minDistanceGeodesic(d,this.m_boxGeomB)>h))if(x.setPointDistFrom(_),D)(0,s.g)(0);else{for(;a.nextPath();)for(;a.hasNextSegment();){const t=a.nextSegment();if(this.m_envHelper.minDistanceGeodesic(d,this.findOrComputeBoxSegment(a.getStartPointIndex(),t,this.m_segmentBoxesB))>h)continue;const e=this.calculateDistanceGeodeticPointSegment(l,_,t,y,x);if(e.second<h&&(i.outPoint.assign(_.mul(this.m_rpu)),this.updateOutputSegment(o,t,e.first),h=e.second,0===h))return 0}a.resetToFirstPath()}return h===this.m_maxDistance?Number.POSITIVE_INFINITY:h}catch(t){m.error=t,m.hasError=!0}finally{(0,n.hk)(m)}}calculateDistanceGeodeticMultipathGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.calculateDistanceGeodeticPointMultipath(e,t,n,i);case s.G.enumMultiPoint:return this.calculateDistanceGeodeticMultipointMultipath(e,t,n,i);case s.G.enumPolyline:case s.G.enumPolygon:case s.G.enumEnvelope:return this.calculateDistanceGeodeticMultipathMultipath(t,e,i,n);default:(0,s.a)("")}}calculateDistanceGeodeticMultipathMultipath(t,e,i,n){const s=[t],o=[e],r=this.swapGeometries(s,o),m=s[0],a=o[0];this.computeEnvelopesAndBoxes(s[0],o[0]);const c=this.estimateMinimumDistance(i,n),h=this.calculateDistanceGeodeticMultipathMultipath_(m,a,i,n,c);return r&&(n.outPoint=(0,u.c)(i.outPoint,i.outPoint=n.outPoint)),h}calculateDistanceGeodeticMultipathMultipath_(t,e,i,m,a=Number.MAX_VALUE){const c={stack:[],error:void 0,hasError:!1};try{let l=a;const _=new u.P(0,0),g=new u.P,p=new u.P(0,0),y=new u.P,d=new u.P(0,0),x=new u.P,P=new u.P,D=new u.P,v=[new u.P],f=[0],M=[0],b=G(),E=G(),T=(0,n.mS)(c,this.createDistanceFunctor(d,_,p),!1),I=S(),N=this.canUseSpatialTree(t,e);N&&this.buildSpatialTree(I,e);const w=e.querySegmentIterator();w.stripAttributes();const B=new o.S,C=(0,h.s)(t);for(let e=0;e<C.length;++e){const n=C[e];t.getSegmentBuffer(n,B,!0);const o=B.get();if(b.assign(this.findOrComputeBoxSegment(n,o,this.m_segmentBoxesA)),N)(0,s.g)(0);else{if(d.assign(o.getStartXY()),x.assign(o.getStartXY()),P.assign(o.getEndXY()),D.assign(o.getEndXY()),this.m_bIsPannablePcs&&((0,r.ab)(this.m_inputSR,0,[x],1),(0,r.ab)(this.m_inputSR,0,[D],1)),this.m_envHelper.minDistanceGeodesic(b,this.m_boxGeomB)>l)continue;for(;w.nextPath();){for(;w.hasNextSegment();){const t=w.nextSegment();if(_.assign(t.getStartXY()),g.assign(t.getStartXY()),p.assign(t.getEndXY()),y.assign(t.getEndXY()),o.intersect(t,v,f,M,this.m_tolerance))return this.updateOutputSegment(i,o,f[0]),this.updateOutputSegment(m,t,M[0]),0;if(this.m_bIsPannablePcs&&((0,r.ab)(this.m_inputSR,0,[g],1),(0,r.ab)(this.m_inputSR,0,[y],1)),E.assign(this.findOrComputeBoxPoint(w.getStartPointIndex(),g,y,this.m_segmentBoxesB)),this.m_envHelper.minDistanceGeodesic(b,E)>l)continue;T.setSegmentEndPoints(_,p),T.setPointDistFrom(x);let e=(0,r.ac)(T.makeFunctor(),0,1,1e-10);if(e.second<l&&(i.outPoint.assign(x.mul(this.m_rpu)),this.updateOutputSegment(m,t,e.first),l=e.second,0===l))break;if(T.setPointDistFrom(D),e=(0,r.ac)(T.makeFunctor(),0,1,1e-10),e.second<l&&(i.outPoint.assign(D.mul(this.m_rpu)),this.updateOutputSegment(m,t,e.first),l=e.second,0===l))break;if(T.setSegmentEndPoints(d,P),T.setPointDistFrom(g),e=(0,r.ac)(T.makeFunctor(),0,1,1e-10),e.second<l&&(this.updateOutputSegment(i,o,e.first),m.outPoint.assign(g.mul(this.m_rpu)),l=e.second,0===l))break;if(T.setPointDistFrom(y),e=(0,r.ac)(T.makeFunctor(),0,1,1e-10),e.second<l&&(this.updateOutputSegment(i,o,e.first),m.outPoint.assign(y.mul(this.m_rpu)),l=e.second,0===l))break}if(0===l)return 0}w.resetToFirstPath()}}return l===this.m_maxDistance?Number.POSITIVE_INFINITY:l}catch(t){c.error=t,c.hasError=!0}finally{(0,n.hk)(c)}}calculateDistanceGeodeticPointSegment(t,e,i,n,s){const o=i.getStartXY(),m=i.getEndXY();return i.intersectPoint(t,n,this.m_tolerance)?(0,u.k)(n[0],0):(s.setPointDistFrom(e),s.setSegmentEndPoints(o,m),(0,r.ac)(s.makeFunctor(),0,1,1e-10))}prepareGeometry(t){let e=t.clone();const i=t.getGeometryType();if(i===s.G.enumPoint||i===s.G.enumMultiPoint)return this._NormalizeAndProject(e);if(i===s.G.enumEnvelope&&(e=this.envelopeToPolygon(e)),this.m_inputSR.isPannable())return this.prepareGeometryPannable(e,4);if(2===this.m_inputSR.getCoordinateSystemType()){if(e=(0,r.ad)(e,this.m_inputSR,0,null),e.isEmpty())return e;e=(new g).execute(e,this.m_inputSR,5e4,this.m_maxDeviation/2,0,null);const t=this.m_inputSR.getSRToGCSTransform();return(new r.O).execute(e,t,this.m_progressTracker)}const n=new a.Envelope2D;e.queryLooseEnvelope(n);const o=this.m_inputSR.getPannableExtent();if(n.ymin<o.ymin||n.ymax>o.ymax){const t=new a.Envelope2D(n.xmin-1,o.ymin,n.xmax+1,o.ymax);if(e=(new p.O).execute(e,t,this.m_inputSR,this.m_progressTracker),e.isEmpty())return e}return n.width()>2*o.width()?(e=(0,r.ae)(e,-2*o.width(),2*o.width(),this.m_inputSR,!0,0,!0,this.m_progressTracker),e):e}prepareGeometryPannable(t,e){const i=new a.Envelope2D;t.queryEnvelope(i);const n=this.m_inputSR.getPannableExtent();if(n.containsEnvelope(i))return t;const s=new u.E;n.queryIntervalX(s);const o=new u.E;return i.queryIntervalX(o),s.contains(o)?(0,r.af)(t,this.m_inputSR):(new r.O).foldInto360RangeGeodetic(t,this.m_inputSR,e)}prepareOutput(t){t.outPoint.scale(1/this.m_rpu),2===this.m_inputSR.getCoordinateSystemType()&&(0,r.aa)(this.m_inputSR,[t.outPoint],1,!1)}updateOutputSegment(t,e,i){e.queryCoord2D(i,t.outPoint),this.m_bIsPannablePcs&&(0,r.ab)(this.m_inputSR,0,[t.outPoint],1),t.outPoint.mulThis(this.m_rpu)}computeTolerance(t,e){t.queryEnvelope(this.m_envGeomA),e.queryEnvelope(this.m_envGeomB);const i=new a.Envelope2D(this.m_envGeomA);return i.mergeEnvelope2D(this.m_envGeomB),(0,m.a)(null,i)}envelopeToPolygon(t){const e=new o.a;return e.addEnvelope(t,!1),e}computeEnvelopesAndBoxes(t,e){t.queryEnvelope(this.m_envGeomA),e.queryEnvelope(this.m_envGeomB),this.m_boxGeomA=this.computeBoxGeometry(t,this.m_boundaryPtsA,this.m_segmentBoxesA),this.m_boxGeomB=this.computeBoxGeometry(e,this.m_boundaryPtsB,this.m_segmentBoxesB)}computeBoxGeometry(t,e,i){switch(t.getGeometryType()){case s.G.enumPoint:return this.computeBoxPoint(t,e);case s.G.enumMultiPoint:return this.computeBoxMultiPoint(t,e);case s.G.enumPolyline:case s.G.enumPolygon:return this.computeBoxMultiPath(t,e,i);default:(0,s.d)("Invalid geometry type")}}computeBoxPoint(t,e){const i=t.getXY();e.length=0,e.push(i.mul(this.m_rpu));const n=G();return n.setCoords({xmin:i.x,ymin:i.y,xmax:i.x,ymax:i.y}),n}computeBoxMultiPoint(t,e){let i=!0;for(let n=0;n<t.getPointCount();++n){const s=t.getXY(n);if(i){e.length=0;for(let t=0;t<4;++t)e.push(s.clone());i=!1}s.x<e[0].x&&e[0].assign(s),s.y>e[1].y&&e[1].assign(s),s.x>e[2].x&&e[2].assign(s),s.y<e[3].y&&e[3].assign(s)}for(let t=0;t<e.length;++t)e[t].mulThis(this.m_rpu);const n=G();return t.queryEnvelope(n),n}computeBoxMultiPath(t,e,i){let n=!0;const s=G();s.setEmpty();const o=t.querySegmentIterator();for(o.stripAttributes();o.nextPath();)for(;o.hasNextSegment();){const t=o.nextSegment(),m=t.getStartXY(),a=t.getEndXY();if(this.m_bIsPannablePcs&&((0,r.ab)(this.m_inputSR,0,[m],1),(0,r.ab)(this.m_inputSR,0,[a],1)),n){for(let t=0;t<4;++t)e.push(m.clone());n=!1}m.x<e[0].x&&e[0].assign(m),m.y>e[1].y&&e[1].assign(m),m.x>e[2].x&&e[2].assign(m),m.y<e[3].y&&e[3].assign(m),a.x<e[0].x&&e[0].assign(a),a.y>e[1].y&&e[1].assign(a),a.x>e[2].x&&e[2].assign(a),a.y<e[3].y&&e[3].assign(a);const u=this.findOrComputeBoxPoint(o.getStartPointIndex(),m,a,i);s.mergeEnvelope2D(u)}for(let t=0;t<e.length;++t)e[t].mulThis(this.m_rpu);return s}findOrComputeBoxSegment(t,e,i){if(!i.has(t)){let n=G();if(e.queryEnvelope(n),this.m_bIsPannablePcs){const t=u.P.construct(n.xmin,n.ymin),e=u.P.construct(n.xmax,n.ymax);(0,r.ab)(this.m_inputSR,0,[t],1),(0,r.ab)(this.m_inputSR,0,[e],1),n=this.m_envHelper.calculateBbox(t.x,t.y,e.x,e.y)}return i.set(t,n),n}return i.get(t)}findOrComputeBoxPoint(t,e,i,n){if(!n.has(t)){let s=G();return s.setCoords({xmin:e.x,ymin:e.y,xmax:i.x,ymax:i.y}),this.m_bIsPannablePcs&&(s=this.m_envHelper.calculateBbox(s.xmin,s.ymin,s.xmax,s.ymax)),n.set(t,s),s}return n.get(t)}estimateMinimumDistance(t,e){const i={stack:[],error:void 0,hasError:!1};try{const s=t=>(0,r.a9)(this.m_a,this.m_eSquared,t),o=this.m_boundaryPtsA.map(s),a=this.m_boundaryPtsB.map(s);let u=Number.MAX_VALUE,c=0,h=0;for(let t=0;t<o.length;++t)for(let e=0;e<a.length;++e){const i=m.d.distance(o[t],a[e]);i<u&&(u=i,c=t,h=e)}t.outPoint.assign(this.m_boundaryPtsA[c]),e.outPoint.assign(this.m_boundaryPtsB[h]);const l=(0,n.mS)(i,new r.a7,!1);return r.a8.geodeticDistance(this.m_a,this.m_eSquared,this.m_boundaryPtsA[c].x,this.m_boundaryPtsA[c].y,this.m_boundaryPtsB[h].x,this.m_boundaryPtsB[h].y,l,null,null,this.m_distCurveType),l.val}catch(t){i.error=t,i.hasError=!0}finally{(0,n.hk)(i)}}swapGeometries(t,e){return(0,s.v)(t[0])>(0,s.v)(e[0])&&(e[0]=(0,u.c)(t[0],t[0]=e[0]),this.m_envGeomB=(0,u.c)(this.m_envGeomA,this.m_envGeomA=this.m_envGeomB),!0)}canUseSpatialTree(t,e){return!1}checkGeometriesIntersect(t,e,i,n){let o=t.getGeometryType(),m=e.getGeometryType();if(this.m_envGeomA.isIntersecting(this.m_envGeomB)){if(o===s.G.enumPoint&&2===e.getDimension()){const s=[0],o=[t.getXY()];if((0,r.ag)(e,o,1,this.m_tolerance,s),0!==s[0])return i.outPoint.assign(o[0]),n.outPoint.assign(o[0]),!0}else if(m===s.G.enumPoint&&2===t.getDimension()){const s=[2],o=[e.getXY()];if((0,r.ag)(t,o,1,this.m_tolerance,s),0!==s[0])return i.outPoint.assign(o[0]),n.outPoint.assign(o[0]),!0}if(o===s.G.enumMultiPoint&&2===e.getDimension())return this.multipointIntersectsArea(t,e,i,n);if(m===s.G.enumMultiPoint&&2===t.getDimension())return this.multipointIntersectsArea(e,t,n,i);let a,u,c=t,l=e;if(o===s.G.enumEnvelope&&(a=this.envelopeToPolygon(t),c=a,o=s.G.enumPolygon),m===s.G.enumEnvelope&&(u=this.envelopeToPolygon(e),l=u,m=s.G.enumPolygon),(0,s.h)(o)&&(0,s.h)(m)){const t=c.querySegmentIterator(),e=l.querySegmentIterator(),s=(0,h.m)(),o=(0,h.m)();if((0,h.w)(c,l,t,e,s,o))return i.outPoint.assign(s.outPoint),n.outPoint.assign(s.outPoint),!0}}return!1}multipointIntersectsArea(t,e,i,n){const s=t.getPointCount();for(let o=0;o<s;++o){const s=[2],m=t.getXY(o);if((0,r.ag)(e,[m],1,this.m_tolerance,s),0!==s[0])return i.outPoint.assign(m),n.outPoint.assign(m),!0}return!1}getNearestNeighbourVisitor(t,e,i,n,o,r,m){return(0,s.g)(0),{}}buildSpatialTree(t,e){(0,s.g)(0)}}},26640:(t,e,i)=>{i.d(e,{D:()=>D,m:()=>c,s:()=>d,w:()=>y});var n=i(31635),s=i(55537),o=i(88885),r=i(39117),m=i(83661),a=i(79187),u=i(95213);function c(){return{outPoint:new m.P,index:-1,t:Number.NaN}}function h(t,e,i){return{outPoint:t.clone(),index:e,t:i}}function l(t,e,i,n){t.outPoint.assign(e),t.index=i,t.t=n}function _(t,e){t.outPoint.assign(e.outPoint),t.index=e.index,t.t=e.t}function g(t,e,i,n){t.index=i,t.t=n,e.queryCoord2D(t.t,t.outPoint)}function p(t,e){const i=c();_(i,t),_(t,e),_(e,i)}function y(t,e,i,n,o,m){if(t.getGeometryType()===s.G.enumPolygon){for(;n.nextPath();)if(n.hasNextSegment()){const e=n.nextSegment();if(0!==(0,r.V)(t,e.getEndXY(),0))return l(o,e.getEndXY(),-1,Number.NaN),l(m,e.getEndXY(),-1,Number.NaN),!0}n.resetToFirstPath()}if(e.getGeometryType()===s.G.enumPolygon){for(;i.nextPath();)if(i.hasNextSegment()){const t=i.nextSegment();if(0!==(0,r.V)(e,t.getEndXY(),0))return l(o,t.getEndXY(),-1,Number.NaN),l(m,t.getEndXY(),-1,Number.NaN),!0}i.resetToFirstPath()}return!1}function d(t){const e=t.getPathCount(),i=(0,m.d)(t.getSegmentCount(),0);let n=0;for(let s=0;s<e;++s){const e=n+t.getSegmentCountPath(s);for(let o=n,r=t.getPathStart(s);o<e;++o,++r)i[o]=r;n=e}return(0,o.s)(t.getPointCount(),i),i}function x(t,e){return!!Number.isNaN(e)||t<=e}function P(t){const e=new o.a;return e.addEnvelope(t,!1),e}class D{constructor(t,e){if(this.m_env2DgeometryA=null,this.m_env2DgeometryB=null,this.m_progressCounter=0,this.m_progressTracker=e,this.m_maxSqrDistance=t*t,this.m_maxDistance=t,this.m_bIsNearCalc=!1,Number.isNaN(this.m_maxDistance)?this.m_maxDistance=Number.POSITIVE_INFINITY:this.m_maxDistance=t,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let t=Math.sqrt(this.m_maxSqrDistance);for(;t<this.m_maxDistance;)this.m_maxSqrDistance*=1+Number.EPSILON,t=Math.sqrt(this.m_maxSqrDistance)}}calculate(t,e,i,n){if((t.getGeometryType()!==u.P.type||e.getGeometryType()!==u.P.type)&&(this.m_env2DgeometryA=new a.Envelope2D,this.m_env2DgeometryB=new a.Envelope2D,t.queryEnvelope(this.m_env2DgeometryA),e.queryEnvelope(this.m_env2DgeometryB),!x(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance)))return Number.POSITIVE_INFINITY;const s=h(new m.P,(0,m.j)(),Number.NaN),o=h(new m.P,(0,m.j)(),Number.NaN),r=this._ExecuteBruteForce(t,e,s,o);return x(r,this.m_maxDistance)?(null!==i&&_(i,s),null!==n&&_(n,o),r):Number.POSITIVE_INFINITY}isNear(t,e){if(this.m_bIsNearCalc=!0,t.isEmpty()||e.isEmpty())return!1;if(t===e)return!0;let i=!0;if(t.getGeometryType()!==u.P.type&&t.getGeometryType()!==u.E.type||e.getGeometryType()!==u.P.type&&e.getGeometryType()!==u.E.type||(i=!1),i){if(this.m_env2DgeometryA=new a.Envelope2D,this.m_env2DgeometryB=new a.Envelope2D,t.queryEnvelope(this.m_env2DgeometryA),e.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}const n=h(new m.P,(0,m.j)(),Number.NaN),s=h(new m.P,(0,m.j)(),Number.NaN);return this._ExecuteBruteForce(t,e,n,s)<=this.m_maxDistance}progress_(t=!1){}_ExecuteBruteForce(t,e,i,n){switch(t.getGeometryType()){case s.G.enumPoint:return this.distancePointGeometry(t,e,i,n);case s.G.enumMultiPoint:return this.distanceMultipointGeometry(t,e,i,n);case s.G.enumEnvelope:return this.distanceEnvelopeGeometry(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathGeometry(t,e,i,n);default:return Number.NaN}}distancePointGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.distancePointPoint(t,e,i,n);case s.G.enumMultiPoint:return this.distancePointMultipoint(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:return this.distancePointMultipath(t,e,i,n);case s.G.enumEnvelope:return this.distancePointEnvelope(t,e,i,n);default:return Number.NaN}}distancePointPoint(t,e,i,n){const s=t.getXY(),o=e.getXY();return l(i,s,0,0),l(n,o,0,0),Math.sqrt(m.P.sqrDistance(s,o))}distancePointMultipoint(t,e,i,n){const s=t.getXY();let o=this.m_maxSqrDistance,r=o,a=!1;const u=e.getPointCount(),c=new m.P;for(let t=0;t<u;++t)if(e.queryXY(t,c),r=m.P.sqrDistance(s,c),this.m_bIsNearCalc){if(r<=o)return 0}else if(!(r>o)&&(!a&&r===o||r<o)&&(o=r,l(i,s,0,0),l(n,c,t,0),a=!0,0===o))return 0;return a?Math.sqrt(o):Number.POSITIVE_INFINITY}distancePointMultipath(t,e,i,n){const o=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),u=t.getXY();if(!o&&e.getGeometryType()===s.G.enumPolygon&&0!==(0,r.V)(e,u,0))return l(i,u,0,0),l(n,u,-1,Number.NaN),0;e.getImpl().getAccelerators();let c=this.m_maxSqrDistance,h=c,_=-1;const g=new a.Envelope2D,p=e.querySegmentIterator();let y=!1;for(;p.nextPath();)for(;p.hasNextSegment();){const t=p.nextSegment();t.queryEnvelope(g);const e=g.sqrDistance(u);if(e>c)continue;if(!this.m_bIsNearCalc&&y&&e===c)continue;_=t.getClosestCoordinate(u,!1);const s=t.getCoord2D(_);if(h=m.P.sqrDistance(u,s),this.m_bIsNearCalc){if(h<=c)return 0}else if(!(h>c)&&(!y||h<c)&&(c=h,l(i,u,0,0),l(n,s,p.getStartPointIndex(),_),y=!0,0===c))return 0}return y?Math.sqrt(c):Number.POSITIVE_INFINITY}distancePointEnvelope(t,e,i,n){const s=t.getXY();l(i,s,0,0),l(n,s,-1,Number.NaN);const o=e.asEnvelope2D();return o.contains(s)?0:Math.sqrt(o.sqrDistance(s,n.outPoint))}distanceMultipointGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distancePointMultipoint(e,t,n,i);return this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumMultiPoint:return this.distanceMultipointMultipoint(t,e,i,n,1,1);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipointMultipath(t,e,i,n);case s.G.enumEnvelope:return this.distanceMultipointMultipath(t,P(e),i,n);default:return Number.NaN}}distanceMultipointMultipoint(t,e,i,s,o,r){const a={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===o&&1===r){const n=Math.trunc((0,m.s)(Math.sqrt(t.getPointCount())+1,1,(0,m.i)())),o=Math.trunc((0,m.s)(Math.sqrt(e.getPointCount())+1,1,(0,m.i)()));if((n>=4||o>=4)&&this.distanceMultipointMultipoint(t,e,i,s,n,o)<=this.m_maxSqrDistance)return 0}let u=this.m_maxSqrDistance;const c=[t],h=[e],_=this.swapGeometriesIfBGtA(c,h);_&&(this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),r=(0,m.c)(o,o=r),p(i,s)),(0,n.mS)(a,(0,m.h)(()=>{p(i,s),this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!_),!1);const g=c[0].getImpl(),y=h[0].getImpl(),d=g.getPointCount(),x=y.getPointCount(),P=x>1;let D=!1;const v=new m.P,G=new m.P;for(let t=0;t<d;t+=o){if(g.queryXY(t,v),P){const t=this.m_env2DgeometryB.sqrDistance(v);if(this.m_bIsNearCalc){if(t>u)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(v)<=u)return 0}else if(t>=u)continue}for(let e=0;e<x;e+=r){y.queryXY(e,G);const n=m.P.sqrDistance(v,G);if(this.m_bIsNearCalc){if(n<=u)return 0}else if(!(n>u||D&&n===u)&&(!D||n<u)&&(l(i,v,t,0),l(s,G,e,0),D=!0,u=n,0===u))return D?Math.sqrt(u):Number.POSITIVE_INFINITY}}return D?Math.sqrt(u):Number.POSITIVE_INFINITY}catch(t){a.error=t,a.hasError=!0}finally{(0,n.hk)(a)}}distanceMultipointMultipath(t,e,i,n){let o=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&e.getGeometryType()===s.G.enumPolygon;const u=e.querySegmentIterator();u.stripAttributes();const c=new a.Envelope2D,h=new m.P;let _=this.m_maxSqrDistance;const g=t.getImpl(),p=g.getPointCount(),y=p>1;let d=!1;for(;u.nextPath();)for(;u.hasNextSegment();){const t=u.nextSegment();if(t.queryLooseEnvelope(c),y){const t=c.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(t>_)continue}else if(t>_||d&&t===_)continue}for(let s=0;s<p;s++){if(g.queryXY(s,h),o&&0!==(0,r.V)(e,h,0))return l(i,h,-1,Number.NaN),l(n,h,s,0),0;{const t=c.sqrDistance(h);if(this.m_bIsNearCalc){if(t>_)continue}else if(t>_)continue}const m=t.getClosestCoordinate(h,!1),a=t.getCoord2D(m);h.subThis(a);const p=h.sqrLength();if(this.m_bIsNearCalc){if(p<=_)return 0}else if(!(p>_)&&(!d||p<_)&&(_=p,l(i,g.getXY(s),s,0),l(n,a,u.getStartPointIndex(),m),d=!0,0===_))return 0}o=!1}return d?Math.sqrt(_):Number.POSITIVE_INFINITY}distanceEnvelopeGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.distancePointEnvelope(e,t,n,i);case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distanceMultipointMultipath(e,P(t),n,i);return this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(P(t),e,i,n);case s.G.enumEnvelope:return this.distanceEnvelopeEnvelope(t,e,i,n);default:return Number.NaN}}distanceEnvelopeEnvelope(t,e,i,n){i.t=Number.NaN,i.index=-1,n.t=Number.NaN,n.index=-1;const s=t.asEnvelope2D(),o=e.asEnvelope2D();return Math.sqrt(s.sqrDistanceEnvelope(o,i.outPoint,n.outPoint))}distanceMultipathGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distancePointMultipath(e,t,n,i);return this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distanceMultipointMultipath(e,t,n,i);return this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(t,e,i,n);case s.G.enumEnvelope:return this.distanceMultipathMultipath(t,P(e),i,n);default:return Number.NaN}}distanceMultipathMultipath(t,e,i,s){const r={stack:[],error:void 0,hasError:!1};try{const u=[t],h=[e],l=this.swapGeometriesIfAGtB(u,h);l&&(this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),p(i,s)),(0,n.mS)(r,(0,m.h)(()=>{p(i,s),this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!l),!1);const x=u[0],P=h[0],D=x.querySegmentIterator();D.stripAttributes();const v=P.querySegmentIterator();if(v.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){const t=Math.trunc((0,m.s)(Math.sqrt(x.getPointCount())+1,1,(0,m.i)())),e=Math.trunc((0,m.s)(Math.sqrt(x.getPointCount())+1,1,(0,m.i)()));if(this.distanceMultipointMultipoint(x,P,i,s,t,e)<=this.m_maxSqrDistance)return 0}if(this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){const t=c(),e=c();if(y(x,P,D,v,t,e))return _(i,t),_(s,e),0}const G=d(x),f=[],S=new o.S,M=new a.Envelope2D,b=new a.Envelope2D,E=new a.Envelope2D;let T=this.m_maxSqrDistance,I=!0,N=!1;for(let t=0,e=G.length;t<e;++t){x.querySegment(G[t],S,!0);const e=S.get();if(e.queryEnvelope(M),!(M.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>T)){if(this.m_bIsNearCalc&&M.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=T)return 0;for(;v.nextPath();){if(this.progress_(),I)P.queryPathEnvelope(v.getPathIndex(),E),f[v.getPathIndex()]=E.clone();else if(M.sqrDistanceEnvelope(f[v.getPathIndex()],null,null)>T)continue;for(;v.hasNextSegment();){const n=v.nextSegment();if(n.queryEnvelope(b),M.sqrDistanceEnvelope(b,null,null)<=T){const o=!M.isIntersecting(b),r=[0],m=[0];let a=e.distance(n,o,r,m);if(a*=a,this.m_bIsNearCalc&&a<=this.m_maxSqrDistance)return 0;if(a<T||a===T&&G[t]<i.index){if(N=!0,g(i,e,G[t],r[0]),g(s,n,v.getStartPointIndex(),m[0]),0===a)return 0;T=a}}}}v.resetToFirstPath(),I=!1}}return N?Math.sqrt(T):Number.POSITIVE_INFINITY}catch(t){r.error=t,r.hasError=!0}finally{(0,n.hk)(r)}}swapGeometriesIfAGtB(t,e){return(0,s.v)(t[0])>(0,s.v)(e[0])&&(e[0]=(0,m.c)(t[0],t[0]=e[0]),!0)}swapGeometriesIfBGtA(t,e){return this.swapGeometriesIfAGtB(e,t)}}},31088:(t,e,i)=>{i.r(e),i.d(e,{OperatorGeodeticDensifyByLength:()=>r,OperatorGeodeticDensifyCursor:()=>m});var n=i(76061),s=i(55537),o=i(39117);class r{getOperatorType(){return 10310}supportsCurves(){return!0}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}executeMany(t,e,i,n,s){return new m(t,i,n,e,-1,-1,s)}execute(t,e,i,o,r){const m=new n.S([t]),a=this.executeMany(m,e,i,o,r).next();return a||(0,s.d)("null output"),a}}class m extends n.G{constructor(t,e,i,n,o,r,m){super(),this.m_progressTracker=m,r>0&&(0,s.t)(""),4!==i&&o>0&&(0,s.t)(""),e||(0,s.a)(""),0===e.getCoordinateSystemType()&&(0,s.a)(""),n>0||o>0||(0,s.a)(""),this.m_index=-1,this.m_inputGeoms=t,this.m_spatialReference=e,this.m_curveType=i,this.m_maxLengthMeters=n,this.m_maxDeviationMeters=o,this.m_maxAngle=r}next(){{let t;for(;t=this.m_inputGeoms.next();)return(0,s.c)(t),this.m_index=this.m_inputGeoms.getGeometryID(),this.geodeticDensify(t);return null}}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}geodeticDensify(t){return(0,o.ak)(t,this.m_spatialReference,this.m_curveType,this.m_maxLengthMeters,this.m_maxDeviationMeters,this.m_progressTracker)}}},76061:(t,e,i)=>{i.d(e,{G:()=>n,S:()=>s});class n{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}class s extends n{constructor(t){super(),this.m_iGeom=-1,this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1088,6859],{16859:(t,e,i)=>{i.d(e,{G:()=>M,a:()=>f,m:()=>D});var n=i(31635),s=i(55537),o=i(88885),r=i(39117),m=i(95213),a=i(79187),u=i(83661),c=i(11878),h=i(26640),l=i(76061),_=i(31088);class g{getOperatorType(){return 10317}supportsCurves(){return!0}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}executeMany(t,e,i,n,s,o){return new _.OperatorGeodeticDensifyCursor(t,e,4,i,n,s,o)}execute(t,e,i,n,o,r){const m=new l.S([t]),a=this.executeMany(m,e,i,n,o,r).next();return a||(0,s.d)("null output"),a}}var p=i(31139);class y{[Symbol.dispose](){this.m_peR1.destroy(),this.m_peR2.destroy(),this.m_peR3.destroy(),this.m_peR1=null,this.m_peR2=null,this.m_peR3=null}constructor(t,e,i){this.m_peR1=new r.a7,this.m_peR2=new r.a7,this.m_peR3=new r.a7,void 0!==t?this.reset(t,e,i):this.reset(1,0,1)}reset(t,e,i){this.m_a=t,this.m_e2=e,this.m_b=this.m_a*Math.sqrt(1-this.m_e2),this.m_unitToDegree=i,this.m_unitToRad=.017453292519943295*i,this.m_u180=180/this.m_unitToDegree,this.m_u360=360/this.m_unitToDegree}calculateBbox(t,e,i,n){const s=this.m_peR1,o=this.m_peR2,m=this.m_peR3;r.a8.geodeticDistance(this.m_a,this.m_e2,t*this.m_unitToRad,e*this.m_unitToRad,i*this.m_unitToRad,n*this.m_unitToRad,m,s,o,0);const c=Math.cos(s.val),h=Math.cos(o.val+3.141592653589793),l=e*this.m_unitToRad,_=r.ai.phiToEta(this.m_e2,l),g=Math.sin(s.val)*Math.cos(_);let p=e;if(c*h<0){const t=c<0?-1:1,e=Math.acos(Math.abs(g))*t;p=r.ai.etaToPhi(this.m_e2,e)/this.m_unitToRad}let y=(0,u.l)((i-t)*this.m_unitToRad,2*Math.PI);Math.abs(y)>Math.PI&&(y=y>0?y-2*Math.PI:y+2*Math.PI),y/=this.m_unitToRad,i=t+y;const d=new a.Envelope2D;return d.xmin=Math.min(t,i),d.xmax=Math.max(t,i),d.ymin=Math.min(e,n),d.ymin=Math.min(d.ymin,p),d.ymax=Math.max(e,n),d.ymax=Math.max(d.ymax,p),d}minDistanceGeodesic(t,e){const i=d(t),n=d(e);if(i&&n)return this.lowerDistanceGeodetic_(t.xmin,t.ymin,e.xmin,e.ymin);const s=this.normalizeGeodesic_(e,t);return function(t,e){return e.xmax<t.xmin||e.xmin>t.xmax||e.ymax<t.ymin||e.ymin>t.ymax}(t,s)?t.ymin>=s.ymax?this.minDistanceGeodesicUpDown_(t,s):s.ymin>=t.ymax?this.minDistanceGeodesicUpDown_(s,t):t.xmin>s.xmax?this.minDistanceGeodesicLeftRight_(s,t):this.minDistanceGeodesicLeftRight_(t,s):0}normalizeGeodesic_(t,e){const i=t.clone(),n=t.clone();let s=x(i,e);if(0===s)return i;for(;n.xmax>e.xmin;){n.xmin-=this.m_u360,n.xmax-=this.m_u360;const t=x(n,e);if(t<s&&(i.assign(n),s=t,0===s))return i}for(n.assign(t);n.xmin<e.xmax;){n.xmin+=this.m_u360,n.xmax+=this.m_u360;const t=x(n,e);if(t<s&&(i.assign(n),s=t,0===s))return i}return i}lowerDistanceGeodetic_(t,e,i,n){const s=this.m_peR1;{const o=this.m_b*this.m_b/this.m_a,m=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*e),a=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*n);r.a8.geodeticDistance(o,0,this.m_unitToRad*t,m,this.m_unitToRad*i,a,s,null,null,0)}return s.val}minDistanceGeodesicUpDown_(t,e){if(e.xmin<=t.xmin?e.xmax>=t.xmin:t.xmax>=e.xmin)return this.lowerDistanceGeodetic_(0,t.ymin,0,e.ymax);if(e.xmin>t.xmax){const i=this.lowerDistanceGeodeticSegMeridional_(t.xmax,t.ymin,t.ymax,e.xmin,e.ymin,e.ymax);if(e.xmax-t.xmin<this.m_u180)return i;const n=this.lowerDistanceGeodeticSegMeridional_(t.xmin,t.ymin,t.ymax,e.xmax,e.ymin,e.ymax);return Math.min(i,n)}{const i=this.lowerDistanceGeodeticSegMeridional_(t.xmin,t.ymin,t.ymax,e.xmax,e.ymin,e.ymax);if(t.xmax-e.xmin<this.m_u180)return i;const n=this.lowerDistanceGeodeticSegMeridional_(t.xmax,t.ymin,t.ymax,e.xmin,e.ymin,e.ymax);return Math.min(i,n)}}minDistanceGeodesicLeftRight_(t,e){let i=Math.abs(t.xmax-e.xmin);for(;i>this.m_u180;)i-=this.m_u360;let n=Math.abs(t.xmin-e.xmax);for(;n>this.m_u180;)n-=this.m_u360;return Math.abs(i)<=Math.abs(n)?this.minDistanceGeodesicLeftRightNormalized_(t,e):this.minDistanceGeodesicLeftRightNormalized_(e,t)}minDistanceGeodesicLeftRightNormalized_(t,e){let i,n;return i=this.lowerDistanceGeodetic_(t.xmax,t.ymin,e.xmin,e.ymin),t.ymin>=e.ymin&&t.ymin<=e.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(t.xmax,t.ymin,e.xmin,e.ymin,e.ymax),i=Math.min(i,n)),e.ymin>=t.ymin&&e.ymin<=t.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(e.xmin,e.ymin,t.xmax,t.ymin,t.ymax),i=Math.min(i,n)),n=this.lowerDistanceGeodetic_(t.xmax,t.ymax,e.xmin,e.ymax),i=Math.min(i,n),t.ymax>=e.ymin&&t.ymax<=e.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(t.xmax,t.ymax,e.xmin,e.ymin,e.ymax),i=Math.min(i,n)),e.ymax>=t.ymin&&e.ymax<=t.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(e.xmin,e.ymax,t.xmax,t.ymin,t.ymax),i=Math.min(i,n)),i}lowerDistanceGeodeticSegMeridional_(t,e,i,n,s,o){let r=this.lowerDistanceGeodeticPtMeridional_(t,e,n,s,o);const m=this.lowerDistanceGeodeticPtMeridional_(t,i,n,s,o);let a=this.lowerDistanceGeodeticPtMeridional_(n,s,t,e,i);const u=this.lowerDistanceGeodeticPtMeridional_(n,o,t,e,i);return r=Math.min(r,m),a=Math.min(a,u),Math.min(r,a)}lowerDistanceGeodeticPtMeridional_(t,e,i,n,s){const o=this.m_b*this.m_b/this.m_a,a=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*e),c=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*n),h=r.ai.phiToPhig(this.m_e2,this.m_unitToRad*s),l=this.m_peR1,_=this.m_peR2;r.a8.geodeticDistance(o,0,this.m_unitToRad*i,c,this.m_unitToRad*t,a,l,null,null,0),r.a8.geodeticDistance(o,0,this.m_unitToRad*i,h,this.m_unitToRad*t,a,_,null,null,0);const g=(0,r.a9)(1,0,new u.P(this.m_unitToRad*t,a)),p=(0,r.a9)(1,0,new u.P(this.m_unitToRad*i,c)),y=(0,r.a9)(1,0,new u.P(this.m_unitToRad*i,h));let d=new m.d;d.setCrossProductVector(p,y);const x=p.dotProduct(y);if(d.length()<1.568e-10)return x>=0?Math.min(l.val,_.val):0;d=d.getUnitVector();let P=new m.d;if(P.setCrossProductVector(d,g),P.length()<1.568e-10)return Math.min(l.val,_.val)-1e-5*o;P=P.getUnitVector();let D=g.sub(d.mul(g.dotProduct(d)));{const e=new m.d;e.setCrossProductVector(p,D);const i=new m.d;i.setCrossProductVector(D,y);let n=d.dotProduct(e)>0&&d.dotProduct(i)>0;if(n||(D.negateThis(),e.setCrossProductVector(p,D),i.setCrossProductVector(D,y),n=d.dotProduct(e)>0&&d.dotProduct(i)>0),n){D=D.getUnitVector();const e=(0,r.ah)(1,0,D),i=this.m_peR3;r.a8.geodeticDistance(o,0,this.m_unitToRad*t,a,e.x,e.y,i,null,null,0);const n=Math.min(l.val,_.val);return Math.min(n,i.val)}}return Math.min(l.val,_.val)}}function d(t){return t.xmin===t.xmax&&t.ymin===t.ymax}function x(t,e){let i,n=0;return i=t.xmin-e.xmax,i>n&&(n=i),i=e.xmin-t.xmax,i>n&&(n=i),n}class P{}function D(t){return{outPoint:void 0===t?new u.P:t.clone()}}function v(t,e){t.outPoint.assign(e.outPoint)}function G(){return new a.Envelope2D}class f{constructor(t,e,i,n,s=0,o=4){this.m_ptDistFrom=new u.P,this.m_segStartPt=new u.P,this.m_segEndPt=new u.P,this.m_geodeticLength=new r.a7,this.m_az12=new r.a7,this.m_minGeodeticDist=new r.a7,this.m_segStartPt3d=new m.d,this.m_segEndPt3d=new m.d,this.m_sr=n,this.m_distCurveType=s,this.m_segCurveType=o,this.m_inputGCS=this.m_sr.getGCS(),this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_bIsPannablePcs=2===this.m_sr.getCoordinateSystemType()&&this.m_sr.isPannable();const a=(0,r.F)();this.m_inputGCS.querySpheroidData(a),this.m_a=a.majorSemiAxis,this.m_eSquared=a.e2,this.setPointDistFrom(t),this.setSegmentEndPoints(e,i)}setSegmentEndPoints(t,e){this.m_segStartPt.assign(t),this.m_segEndPt.assign(e),this.m_bIsPannablePcs||(this.m_segStartPt.mulThis(this.m_rpu),this.m_segEndPt.mulThis(this.m_rpu)),2===this.m_segCurveType&&(this.m_segStartPt3d.assign((0,r.a9)(this.m_a,this.m_eSquared,this.m_segStartPt)),this.m_segEndPt3d.assign((0,r.a9)(this.m_a,this.m_eSquared,this.m_segEndPt))),this.calculateAndUpdateSegmentLength()}setPointDistFrom(t){this.m_ptDistFrom.assign(t),this.m_ptDistFrom.scale(this.m_rpu)}setSegmentCurveType(t){this.m_segCurveType=t}setDistanceCurveType(t){this.m_distCurveType=t}makeFunctor(){return t=>{let e;switch(this.m_segCurveType){case 0:case 1:case 3:{const i={stack:[],error:void 0,hasError:!1};try{const s=(0,n.mS)(i,new r.a7,!1),o=(0,n.mS)(i,new r.a7,!1);r.a8.geodeticCoordinate(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_geodeticLength.val*t,this.m_az12.val,s,o,this.m_segCurveType),e=new u.P(s.val,o.val);break}catch(t){i.error=t,i.hasError=!0}finally{(0,n.hk)(i)}}case 2:{const i=m.d.lerp(this.m_segStartPt3d,this.m_segEndPt3d,t);e=(0,r.ah)(this.m_a,this.m_eSquared,i);break}case 4:e=u.P.lerp(this.m_segStartPt,this.m_segEndPt,t),this.m_bIsPannablePcs&&((0,r.ab)(this.m_sr,0,[e],1),e.mulThis(this.m_rpu));break;default:(0,s.d)("Invalid curve type")}return r.a8.geodeticDistance(this.m_a,this.m_eSquared,this.m_ptDistFrom.x,this.m_ptDistFrom.y,e.x,e.y,this.m_minGeodeticDist,null,null,this.m_distCurveType),this.m_minGeodeticDist.val}}calculateAndUpdateSegmentLength(){switch(this.m_segCurveType){case 0:case 2:case 1:case 3:r.a8.geodeticDistance(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_segEndPt.x,this.m_segEndPt.y,this.m_geodeticLength,this.m_az12,null,this.m_segCurveType);break;case 4:this.m_geodeticLength.val=u.P.distance(this.m_segStartPt,this.m_segEndPt);break;default:(0,s.d)("Invalid curve type")}}[Symbol.dispose](){this.m_geodeticLength[Symbol.dispose](),this.m_az12[Symbol.dispose](),this.m_minGeodeticDist[Symbol.dispose]()}}function S(){return new P}class M{[Symbol.dispose](){this.m_envHelper[Symbol.dispose]()}constructor(t,e,i,n,s){this.m_boxGeomA=G(),this.m_boxGeomB=G(),this.m_envGeomA=new a.Envelope2D,this.m_envGeomB=new a.Envelope2D,this.m_progressCounter=0,this.m_transformPCS2GCS=null,this.m_segmentBoxesA=new Map,this.m_segmentBoxesB=new Map,this.m_boundaryPtsA=[],this.m_boundaryPtsB=[],this.m_scaleToRadians=new c.T,this.m_scaleToDegrees=new c.T,this.m_inputSR=t,this.m_distCurveType=e,this.m_progressTracker=i,this.m_maxDistance=n,this.m_maxDeviation=s,this.m_inputGCS=t.getGCS(),this.m_peGeogcs=this.m_inputGCS.getPECoordSys(),this.m_tolerance=0;const o=(0,r.F)();this.m_inputGCS.querySpheroidData(o),this.m_a=o.majorSemiAxis,this.m_eSquared=o.e2,this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_envHelper=new y(this.m_a,this.m_eSquared,1),4===this.m_distCurveType&&(this.m_distCurveType=0),this.m_boxGeomA.setEmpty(),this.m_boxGeomB.setEmpty(),this.m_envGeomA.setEmpty(),this.m_envGeomB.setEmpty(),this.m_bIsPannablePcs=2===this.m_inputSR.getCoordinateSystemType()&&this.m_inputSR.isPannable()}progress(t=!1){}calculate(t,e,i,n){const s=D(),o=D();if(t.queryEnvelope(this.m_envGeomA),e.queryEnvelope(this.m_envGeomB),this.checkGeometriesIntersect(t,e,s,o))return i&&v(i,s),n&&v(n,o),0;const r=this.prepareGeometry(t);if(r.isEmpty())return Number.NaN;const m=this.prepareGeometry(e);if(m.isEmpty())return Number.NaN;this.m_tolerance=this.computeTolerance(r,m);const a=this._ExecuteBruteForce(r,m,s,o);return a>=this.m_maxDistance?Number.NaN:(i&&(this.prepareOutput(s),v(i,s)),n&&(this.prepareOutput(o),v(n,o)),a)}createDistanceFunctor(t,e,i){const n=new f(t,e,i,this.m_inputSR,this.m_distCurveType);return this.m_bIsPannablePcs||1===this.m_inputSR.getCoordinateSystemType()||n.setSegmentCurveType(2),n}_NormalizeAndProject(t){if(this.m_inputSR.isPannable()&&(t=(new r.O).foldInto360Range(t,this.m_inputSR)),2===this.m_inputSR.getCoordinateSystemType()){const e=(0,r.g)(this.m_inputSR,this.m_inputGCS,null);t=(new r.O).execute(t,e,this.m_progressTracker)}return t}_ExecuteBruteForce(t,e,i,n){switch(t.getGeometryType()){case s.G.enumPoint:return this.calculateDistanceGeodeticPointGeometry(t,e,i,n);case s.G.enumMultiPoint:return this.calculateDistanceGeodeticMultipointGeometry(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:case s.G.enumEnvelope:return this.calculateDistanceGeodeticMultipathGeometry(t,e,i,n);default:(0,s.a)("")}}calculateDistanceGeodeticPointGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.calculateDistanceGeodeticPointPoint(t,e,i,n);case s.G.enumMultiPoint:return this.calculateDistanceGeodeticPointMultipoint(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:return this.calculateDistanceGeodeticPointMultipath(t,e,i,n);default:(0,s.a)("")}}calculateDistanceGeodeticPointPoint(t,e,i,s){const o={stack:[],error:void 0,hasError:!1};try{const m=t.getXY();m.scale(this.m_rpu);const a=e.getXY();a.scale(this.m_rpu),i.outPoint.assign(m),s.outPoint.assign(a);const u=(0,n.mS)(o,new r.a7,!1);return r.a8.geodeticDistance(this.m_a,this.m_eSquared,m.x,m.y,a.x,a.y,u,null,null,this.m_distCurveType),u.val}catch(t){o.error=t,o.hasError=!0}finally{(0,n.hk)(o)}}calculateDistanceGeodeticPointMultipoint(t,e,i,s){const o={stack:[],error:void 0,hasError:!1};try{this.computeEnvelopesAndBoxes(t,e);const a=this.estimateMinimumDistance(i,s);let c=a<this.m_maxDistance?a:this.m_maxDistance;const h=t.getXY();h.scale(this.m_rpu),i.outPoint.assign(h);const l=(0,r.a9)(this.m_a,this.m_eSquared,h),_=new u.P,g=e.getImpl(),p=(0,n.mS)(o,new r.a7,!1),y=g.getPointCount();for(let t=0;t<y;++t){g.queryXY(t,_),_.scale(this.m_rpu);const e=(0,r.a9)(this.m_a,this.m_eSquared,_);if(!(m.d.distance(l,e)>c)&&!(this.m_envHelper.minDistanceGeodesic(this.m_boxGeomA,this.m_boxGeomB)>c)&&(r.a8.geodeticDistance(this.m_a,this.m_eSquared,h.x,h.y,_.x,_.y,p,null,null,this.m_distCurveType),p.val<c&&(c=p.val,s.outPoint=_,0===c)))return c}return c===this.m_maxDistance?Number.POSITIVE_INFINITY:c}catch(t){o.error=t,o.hasError=!0}finally{(0,n.hk)(o)}}calculateDistanceGeodeticPointMultipath(t,e,i,o){const m={stack:[],error:void 0,hasError:!1};try{const a=new u.P,c=new u.P;a.assign(t.getXY()),c.assign(t.getXY()),i.outPoint.assign(c.mul(this.m_rpu)),this.m_bIsPannablePcs&&(0,r.aa)(this.m_inputSR,[a],1,!1),this.computeEnvelopesAndBoxes(t,e);const h=this.estimateMinimumDistance(i,o);let l=h<this.m_maxDistance?h:this.m_maxDistance;const _=e.getImpl(),g=new u.P(0,0),p=new u.P(0,0),y=[1],d=this.canUseSpatialTree(t,e),x=S();d&&this.buildSpatialTree(x,e);const P=G();P.setCoords({xmin:c.x,ymin:c.y,xmax:c.x,ymax:c.y});const D=(0,n.mS)(m,this.createDistanceFunctor(c,g,p),!1),v=_.querySegmentIterator();if(v.stripAttributes(),d)(0,s.g)(0);else for(;v.nextPath();)for(;v.hasNextSegment();){const t=v.nextSegment(),e=this.findOrComputeBoxSegment(v.getStartPointIndex(),t,this.m_segmentBoxesB);if(this.m_envHelper.minDistanceGeodesic(P,e)>l)continue;const i=this.calculateDistanceGeodeticPointSegment(a,c,t,y,D);if(i.second<l&&(this.updateOutputSegment(o,t,i.first),l=i.second,0===l))return 0}return l===this.m_maxDistance?Number.POSITIVE_INFINITY:l}catch(t){m.error=t,m.hasError=!0}finally{(0,n.hk)(m)}}calculateDistanceGeodeticMultipointGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.calculateDistanceGeodeticPointMultipoint(e,t,n,i);case s.G.enumMultiPoint:return this.calculateDistanceGeodeticMultipointMultipoint(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:case s.G.enumEnvelope:return this.calculateDistanceGeodeticMultipointMultipath(t,e,i,n);default:(0,s.a)("")}}calculateDistanceGeodeticMultipointMultipoint(t,e,i,s){const o={stack:[],error:void 0,hasError:!1};try{const a=(0,n.mS)(o,new r.a7,!1);this.computeEnvelopesAndBoxes(t,e);const c=this.estimateMinimumDistance(i,s);let h=c<this.m_maxDistance?c:this.m_maxDistance;const l=new u.P,_=new u.P,g=t.getImpl(),p=e.getImpl(),y=G(),d=g.getPointCount(),x=p.getPointCount();for(let t=0;t<d;++t){if(l.assign(g.getXY(t)),y.setCoords({xmin:l.x,ymin:l.y,xmax:l.x,ymax:l.y}),this.m_envHelper.minDistanceGeodesic(y,this.m_boxGeomB)>h)continue;l.scale(this.m_rpu);const e=(0,r.a9)(this.m_a,this.m_eSquared,l);for(let t=0;t<x;++t){_.assign(p.getXY(t)),_.scale(this.m_rpu);const n=(0,r.a9)(this.m_a,this.m_eSquared,_);if(!(m.d.distance(e,n)>=h)&&(r.a8.geodeticDistance(this.m_a,this.m_eSquared,l.x,l.y,_.x,_.y,a,null,null,this.m_distCurveType),a.val<h&&(i.outPoint.assign(l),s.outPoint.assign(_),h=a.val,0===h)))return h}}return h===this.m_maxDistance?Number.POSITIVE_INFINITY:h}catch(t){o.error=t,o.hasError=!0}finally{(0,n.hk)(o)}}calculateDistanceGeodeticMultipointMultipath(t,e,i,o){const m={stack:[],error:void 0,hasError:!1};try{const a=e.getImpl().querySegmentIterator();a.stripAttributes(),this.computeEnvelopesAndBoxes(t,e);const c=this.estimateMinimumDistance(i,o);let h=c<this.m_maxDistance?c:this.m_maxDistance;const l=new u.P,_=new u.P(0,0),g=new u.P(0,0),p=new u.P(0,0),y=[0],d=G(),x=(0,n.mS)(m,this.createDistanceFunctor(_,g,p),!1),P=S(),D=this.canUseSpatialTree(t,e);D&&this.buildSpatialTree(P,e);const v=t.getPointCount();for(let e=0;e<v;++e)if(l.assign(t.getXY(e)),_.assign(t.getXY(e)),this.m_bIsPannablePcs&&(0,r.aa)(this.m_inputSR,[l],1,!1),d.setCoords({xmin:_.x,ymin:_.y,xmax:_.x,ymax:_.y}),!(this.m_envHelper.minDistanceGeodesic(d,this.m_boxGeomB)>h))if(x.setPointDistFrom(_),D)(0,s.g)(0);else{for(;a.nextPath();)for(;a.hasNextSegment();){const t=a.nextSegment();if(this.m_envHelper.minDistanceGeodesic(d,this.findOrComputeBoxSegment(a.getStartPointIndex(),t,this.m_segmentBoxesB))>h)continue;const e=this.calculateDistanceGeodeticPointSegment(l,_,t,y,x);if(e.second<h&&(i.outPoint.assign(_.mul(this.m_rpu)),this.updateOutputSegment(o,t,e.first),h=e.second,0===h))return 0}a.resetToFirstPath()}return h===this.m_maxDistance?Number.POSITIVE_INFINITY:h}catch(t){m.error=t,m.hasError=!0}finally{(0,n.hk)(m)}}calculateDistanceGeodeticMultipathGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.calculateDistanceGeodeticPointMultipath(e,t,n,i);case s.G.enumMultiPoint:return this.calculateDistanceGeodeticMultipointMultipath(e,t,n,i);case s.G.enumPolyline:case s.G.enumPolygon:case s.G.enumEnvelope:return this.calculateDistanceGeodeticMultipathMultipath(t,e,i,n);default:(0,s.a)("")}}calculateDistanceGeodeticMultipathMultipath(t,e,i,n){const s=[t],o=[e],r=this.swapGeometries(s,o),m=s[0],a=o[0];this.computeEnvelopesAndBoxes(s[0],o[0]);const c=this.estimateMinimumDistance(i,n),h=this.calculateDistanceGeodeticMultipathMultipath_(m,a,i,n,c);return r&&(n.outPoint=(0,u.c)(i.outPoint,i.outPoint=n.outPoint)),h}calculateDistanceGeodeticMultipathMultipath_(t,e,i,m,a=Number.MAX_VALUE){const c={stack:[],error:void 0,hasError:!1};try{let l=a;const _=new u.P(0,0),g=new u.P,p=new u.P(0,0),y=new u.P,d=new u.P(0,0),x=new u.P,P=new u.P,D=new u.P,v=[new u.P],f=[0],M=[0],b=G(),E=G(),T=(0,n.mS)(c,this.createDistanceFunctor(d,_,p),!1),I=S(),N=this.canUseSpatialTree(t,e);N&&this.buildSpatialTree(I,e);const w=e.querySegmentIterator();w.stripAttributes();const B=new o.S,C=(0,h.s)(t);for(let e=0;e<C.length;++e){const n=C[e];t.getSegmentBuffer(n,B,!0);const o=B.get();if(b.assign(this.findOrComputeBoxSegment(n,o,this.m_segmentBoxesA)),N)(0,s.g)(0);else{if(d.assign(o.getStartXY()),x.assign(o.getStartXY()),P.assign(o.getEndXY()),D.assign(o.getEndXY()),this.m_bIsPannablePcs&&((0,r.ab)(this.m_inputSR,0,[x],1),(0,r.ab)(this.m_inputSR,0,[D],1)),this.m_envHelper.minDistanceGeodesic(b,this.m_boxGeomB)>l)continue;for(;w.nextPath();){for(;w.hasNextSegment();){const t=w.nextSegment();if(_.assign(t.getStartXY()),g.assign(t.getStartXY()),p.assign(t.getEndXY()),y.assign(t.getEndXY()),o.intersect(t,v,f,M,this.m_tolerance))return this.updateOutputSegment(i,o,f[0]),this.updateOutputSegment(m,t,M[0]),0;if(this.m_bIsPannablePcs&&((0,r.ab)(this.m_inputSR,0,[g],1),(0,r.ab)(this.m_inputSR,0,[y],1)),E.assign(this.findOrComputeBoxPoint(w.getStartPointIndex(),g,y,this.m_segmentBoxesB)),this.m_envHelper.minDistanceGeodesic(b,E)>l)continue;T.setSegmentEndPoints(_,p),T.setPointDistFrom(x);let e=(0,r.ac)(T.makeFunctor(),0,1,1e-10);if(e.second<l&&(i.outPoint.assign(x.mul(this.m_rpu)),this.updateOutputSegment(m,t,e.first),l=e.second,0===l))break;if(T.setPointDistFrom(D),e=(0,r.ac)(T.makeFunctor(),0,1,1e-10),e.second<l&&(i.outPoint.assign(D.mul(this.m_rpu)),this.updateOutputSegment(m,t,e.first),l=e.second,0===l))break;if(T.setSegmentEndPoints(d,P),T.setPointDistFrom(g),e=(0,r.ac)(T.makeFunctor(),0,1,1e-10),e.second<l&&(this.updateOutputSegment(i,o,e.first),m.outPoint.assign(g.mul(this.m_rpu)),l=e.second,0===l))break;if(T.setPointDistFrom(y),e=(0,r.ac)(T.makeFunctor(),0,1,1e-10),e.second<l&&(this.updateOutputSegment(i,o,e.first),m.outPoint.assign(y.mul(this.m_rpu)),l=e.second,0===l))break}if(0===l)return 0}w.resetToFirstPath()}}return l===this.m_maxDistance?Number.POSITIVE_INFINITY:l}catch(t){c.error=t,c.hasError=!0}finally{(0,n.hk)(c)}}calculateDistanceGeodeticPointSegment(t,e,i,n,s){const o=i.getStartXY(),m=i.getEndXY();return i.intersectPoint(t,n,this.m_tolerance)?(0,u.k)(n[0],0):(s.setPointDistFrom(e),s.setSegmentEndPoints(o,m),(0,r.ac)(s.makeFunctor(),0,1,1e-10))}prepareGeometry(t){let e=t.clone();const i=t.getGeometryType();if(i===s.G.enumPoint||i===s.G.enumMultiPoint)return this._NormalizeAndProject(e);if(i===s.G.enumEnvelope&&(e=this.envelopeToPolygon(e)),this.m_inputSR.isPannable())return this.prepareGeometryPannable(e,4);if(2===this.m_inputSR.getCoordinateSystemType()){if(e=(0,r.ad)(e,this.m_inputSR,0,null),e.isEmpty())return e;e=(new g).execute(e,this.m_inputSR,5e4,this.m_maxDeviation/2,0,null);const t=this.m_inputSR.getSRToGCSTransform();return(new r.O).execute(e,t,this.m_progressTracker)}const n=new a.Envelope2D;e.queryLooseEnvelope(n);const o=this.m_inputSR.getPannableExtent();if(n.ymin<o.ymin||n.ymax>o.ymax){const t=new a.Envelope2D(n.xmin-1,o.ymin,n.xmax+1,o.ymax);if(e=(new p.O).execute(e,t,this.m_inputSR,this.m_progressTracker),e.isEmpty())return e}return n.width()>2*o.width()?(e=(0,r.ae)(e,-2*o.width(),2*o.width(),this.m_inputSR,!0,0,!0,this.m_progressTracker),e):e}prepareGeometryPannable(t,e){const i=new a.Envelope2D;t.queryEnvelope(i);const n=this.m_inputSR.getPannableExtent();if(n.containsEnvelope(i))return t;const s=new u.E;n.queryIntervalX(s);const o=new u.E;return i.queryIntervalX(o),s.contains(o)?(0,r.af)(t,this.m_inputSR):(new r.O).foldInto360RangeGeodetic(t,this.m_inputSR,e)}prepareOutput(t){t.outPoint.scale(1/this.m_rpu),2===this.m_inputSR.getCoordinateSystemType()&&(0,r.aa)(this.m_inputSR,[t.outPoint],1,!1)}updateOutputSegment(t,e,i){e.queryCoord2D(i,t.outPoint),this.m_bIsPannablePcs&&(0,r.ab)(this.m_inputSR,0,[t.outPoint],1),t.outPoint.mulThis(this.m_rpu)}computeTolerance(t,e){t.queryEnvelope(this.m_envGeomA),e.queryEnvelope(this.m_envGeomB);const i=new a.Envelope2D(this.m_envGeomA);return i.mergeEnvelope2D(this.m_envGeomB),(0,m.a)(null,i)}envelopeToPolygon(t){const e=new o.a;return e.addEnvelope(t,!1),e}computeEnvelopesAndBoxes(t,e){t.queryEnvelope(this.m_envGeomA),e.queryEnvelope(this.m_envGeomB),this.m_boxGeomA=this.computeBoxGeometry(t,this.m_boundaryPtsA,this.m_segmentBoxesA),this.m_boxGeomB=this.computeBoxGeometry(e,this.m_boundaryPtsB,this.m_segmentBoxesB)}computeBoxGeometry(t,e,i){switch(t.getGeometryType()){case s.G.enumPoint:return this.computeBoxPoint(t,e);case s.G.enumMultiPoint:return this.computeBoxMultiPoint(t,e);case s.G.enumPolyline:case s.G.enumPolygon:return this.computeBoxMultiPath(t,e,i);default:(0,s.d)("Invalid geometry type")}}computeBoxPoint(t,e){const i=t.getXY();e.length=0,e.push(i.mul(this.m_rpu));const n=G();return n.setCoords({xmin:i.x,ymin:i.y,xmax:i.x,ymax:i.y}),n}computeBoxMultiPoint(t,e){let i=!0;for(let n=0;n<t.getPointCount();++n){const s=t.getXY(n);if(i){e.length=0;for(let t=0;t<4;++t)e.push(s.clone());i=!1}s.x<e[0].x&&e[0].assign(s),s.y>e[1].y&&e[1].assign(s),s.x>e[2].x&&e[2].assign(s),s.y<e[3].y&&e[3].assign(s)}for(let t=0;t<e.length;++t)e[t].mulThis(this.m_rpu);const n=G();return t.queryEnvelope(n),n}computeBoxMultiPath(t,e,i){let n=!0;const s=G();s.setEmpty();const o=t.querySegmentIterator();for(o.stripAttributes();o.nextPath();)for(;o.hasNextSegment();){const t=o.nextSegment(),m=t.getStartXY(),a=t.getEndXY();if(this.m_bIsPannablePcs&&((0,r.ab)(this.m_inputSR,0,[m],1),(0,r.ab)(this.m_inputSR,0,[a],1)),n){for(let t=0;t<4;++t)e.push(m.clone());n=!1}m.x<e[0].x&&e[0].assign(m),m.y>e[1].y&&e[1].assign(m),m.x>e[2].x&&e[2].assign(m),m.y<e[3].y&&e[3].assign(m),a.x<e[0].x&&e[0].assign(a),a.y>e[1].y&&e[1].assign(a),a.x>e[2].x&&e[2].assign(a),a.y<e[3].y&&e[3].assign(a);const u=this.findOrComputeBoxPoint(o.getStartPointIndex(),m,a,i);s.mergeEnvelope2D(u)}for(let t=0;t<e.length;++t)e[t].mulThis(this.m_rpu);return s}findOrComputeBoxSegment(t,e,i){if(!i.has(t)){let n=G();if(e.queryEnvelope(n),this.m_bIsPannablePcs){const t=u.P.construct(n.xmin,n.ymin),e=u.P.construct(n.xmax,n.ymax);(0,r.ab)(this.m_inputSR,0,[t],1),(0,r.ab)(this.m_inputSR,0,[e],1),n=this.m_envHelper.calculateBbox(t.x,t.y,e.x,e.y)}return i.set(t,n),n}return i.get(t)}findOrComputeBoxPoint(t,e,i,n){if(!n.has(t)){let s=G();return s.setCoords({xmin:e.x,ymin:e.y,xmax:i.x,ymax:i.y}),this.m_bIsPannablePcs&&(s=this.m_envHelper.calculateBbox(s.xmin,s.ymin,s.xmax,s.ymax)),n.set(t,s),s}return n.get(t)}estimateMinimumDistance(t,e){const i={stack:[],error:void 0,hasError:!1};try{const s=t=>(0,r.a9)(this.m_a,this.m_eSquared,t),o=this.m_boundaryPtsA.map(s),a=this.m_boundaryPtsB.map(s);let u=Number.MAX_VALUE,c=0,h=0;for(let t=0;t<o.length;++t)for(let e=0;e<a.length;++e){const i=m.d.distance(o[t],a[e]);i<u&&(u=i,c=t,h=e)}t.outPoint.assign(this.m_boundaryPtsA[c]),e.outPoint.assign(this.m_boundaryPtsB[h]);const l=(0,n.mS)(i,new r.a7,!1);return r.a8.geodeticDistance(this.m_a,this.m_eSquared,this.m_boundaryPtsA[c].x,this.m_boundaryPtsA[c].y,this.m_boundaryPtsB[h].x,this.m_boundaryPtsB[h].y,l,null,null,this.m_distCurveType),l.val}catch(t){i.error=t,i.hasError=!0}finally{(0,n.hk)(i)}}swapGeometries(t,e){return(0,s.v)(t[0])>(0,s.v)(e[0])&&(e[0]=(0,u.c)(t[0],t[0]=e[0]),this.m_envGeomB=(0,u.c)(this.m_envGeomA,this.m_envGeomA=this.m_envGeomB),!0)}canUseSpatialTree(t,e){return!1}checkGeometriesIntersect(t,e,i,n){let o=t.getGeometryType(),m=e.getGeometryType();if(this.m_envGeomA.isIntersecting(this.m_envGeomB)){if(o===s.G.enumPoint&&2===e.getDimension()){const s=[0],o=[t.getXY()];if((0,r.ag)(e,o,1,this.m_tolerance,s),0!==s[0])return i.outPoint.assign(o[0]),n.outPoint.assign(o[0]),!0}else if(m===s.G.enumPoint&&2===t.getDimension()){const s=[2],o=[e.getXY()];if((0,r.ag)(t,o,1,this.m_tolerance,s),0!==s[0])return i.outPoint.assign(o[0]),n.outPoint.assign(o[0]),!0}if(o===s.G.enumMultiPoint&&2===e.getDimension())return this.multipointIntersectsArea(t,e,i,n);if(m===s.G.enumMultiPoint&&2===t.getDimension())return this.multipointIntersectsArea(e,t,n,i);let a,u,c=t,l=e;if(o===s.G.enumEnvelope&&(a=this.envelopeToPolygon(t),c=a,o=s.G.enumPolygon),m===s.G.enumEnvelope&&(u=this.envelopeToPolygon(e),l=u,m=s.G.enumPolygon),(0,s.h)(o)&&(0,s.h)(m)){const t=c.querySegmentIterator(),e=l.querySegmentIterator(),s=(0,h.m)(),o=(0,h.m)();if((0,h.w)(c,l,t,e,s,o))return i.outPoint.assign(s.outPoint),n.outPoint.assign(s.outPoint),!0}}return!1}multipointIntersectsArea(t,e,i,n){const s=t.getPointCount();for(let o=0;o<s;++o){const s=[2],m=t.getXY(o);if((0,r.ag)(e,[m],1,this.m_tolerance,s),0!==s[0])return i.outPoint.assign(m),n.outPoint.assign(m),!0}return!1}getNearestNeighbourVisitor(t,e,i,n,o,r,m){return(0,s.g)(0),{}}buildSpatialTree(t,e){(0,s.g)(0)}}},26640:(t,e,i)=>{i.d(e,{D:()=>D,m:()=>c,s:()=>d,w:()=>y});var n=i(31635),s=i(55537),o=i(88885),r=i(39117),m=i(83661),a=i(79187),u=i(95213);function c(){return{outPoint:new m.P,index:-1,t:Number.NaN}}function h(t,e,i){return{outPoint:t.clone(),index:e,t:i}}function l(t,e,i,n){t.outPoint.assign(e),t.index=i,t.t=n}function _(t,e){t.outPoint.assign(e.outPoint),t.index=e.index,t.t=e.t}function g(t,e,i,n){t.index=i,t.t=n,e.queryCoord2D(t.t,t.outPoint)}function p(t,e){const i=c();_(i,t),_(t,e),_(e,i)}function y(t,e,i,n,o,m){if(t.getGeometryType()===s.G.enumPolygon){for(;n.nextPath();)if(n.hasNextSegment()){const e=n.nextSegment();if(0!==(0,r.R)(t,e.getEndXY(),0))return l(o,e.getEndXY(),-1,Number.NaN),l(m,e.getEndXY(),-1,Number.NaN),!0}n.resetToFirstPath()}if(e.getGeometryType()===s.G.enumPolygon){for(;i.nextPath();)if(i.hasNextSegment()){const t=i.nextSegment();if(0!==(0,r.R)(e,t.getEndXY(),0))return l(o,t.getEndXY(),-1,Number.NaN),l(m,t.getEndXY(),-1,Number.NaN),!0}i.resetToFirstPath()}return!1}function d(t){const e=t.getPathCount(),i=(0,m.d)(t.getSegmentCount(),0);let n=0;for(let s=0;s<e;++s){const e=n+t.getSegmentCountPath(s);for(let o=n,r=t.getPathStart(s);o<e;++o,++r)i[o]=r;n=e}return(0,o.s)(t.getPointCount(),i),i}function x(t,e){return!!Number.isNaN(e)||t<=e}function P(t){const e=new o.a;return e.addEnvelope(t,!1),e}class D{constructor(t,e){if(this.m_env2DgeometryA=null,this.m_env2DgeometryB=null,this.m_progressCounter=0,this.m_progressTracker=e,this.m_maxSqrDistance=t*t,this.m_maxDistance=t,this.m_bIsNearCalc=!1,Number.isNaN(this.m_maxDistance)?this.m_maxDistance=Number.POSITIVE_INFINITY:this.m_maxDistance=t,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let t=Math.sqrt(this.m_maxSqrDistance);for(;t<this.m_maxDistance;)this.m_maxSqrDistance*=1+Number.EPSILON,t=Math.sqrt(this.m_maxSqrDistance)}}calculate(t,e,i,n){if((t.getGeometryType()!==u.P.type||e.getGeometryType()!==u.P.type)&&(this.m_env2DgeometryA=new a.Envelope2D,this.m_env2DgeometryB=new a.Envelope2D,t.queryEnvelope(this.m_env2DgeometryA),e.queryEnvelope(this.m_env2DgeometryB),!x(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance)))return Number.POSITIVE_INFINITY;const s=h(new m.P,(0,m.j)(),Number.NaN),o=h(new m.P,(0,m.j)(),Number.NaN),r=this._ExecuteBruteForce(t,e,s,o);return x(r,this.m_maxDistance)?(null!==i&&_(i,s),null!==n&&_(n,o),r):Number.POSITIVE_INFINITY}isNear(t,e){if(this.m_bIsNearCalc=!0,t.isEmpty()||e.isEmpty())return!1;if(t===e)return!0;let i=!0;if(t.getGeometryType()!==u.P.type&&t.getGeometryType()!==u.E.type||e.getGeometryType()!==u.P.type&&e.getGeometryType()!==u.E.type||(i=!1),i){if(this.m_env2DgeometryA=new a.Envelope2D,this.m_env2DgeometryB=new a.Envelope2D,t.queryEnvelope(this.m_env2DgeometryA),e.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}const n=h(new m.P,(0,m.j)(),Number.NaN),s=h(new m.P,(0,m.j)(),Number.NaN);return this._ExecuteBruteForce(t,e,n,s)<=this.m_maxDistance}progress_(t=!1){}_ExecuteBruteForce(t,e,i,n){switch(t.getGeometryType()){case s.G.enumPoint:return this.distancePointGeometry(t,e,i,n);case s.G.enumMultiPoint:return this.distanceMultipointGeometry(t,e,i,n);case s.G.enumEnvelope:return this.distanceEnvelopeGeometry(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathGeometry(t,e,i,n);default:return Number.NaN}}distancePointGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.distancePointPoint(t,e,i,n);case s.G.enumMultiPoint:return this.distancePointMultipoint(t,e,i,n);case s.G.enumPolyline:case s.G.enumPolygon:return this.distancePointMultipath(t,e,i,n);case s.G.enumEnvelope:return this.distancePointEnvelope(t,e,i,n);default:return Number.NaN}}distancePointPoint(t,e,i,n){const s=t.getXY(),o=e.getXY();return l(i,s,0,0),l(n,o,0,0),Math.sqrt(m.P.sqrDistance(s,o))}distancePointMultipoint(t,e,i,n){const s=t.getXY();let o=this.m_maxSqrDistance,r=o,a=!1;const u=e.getPointCount(),c=new m.P;for(let t=0;t<u;++t)if(e.queryXY(t,c),r=m.P.sqrDistance(s,c),this.m_bIsNearCalc){if(r<=o)return 0}else if(!(r>o)&&(!a&&r===o||r<o)&&(o=r,l(i,s,0,0),l(n,c,t,0),a=!0,0===o))return 0;return a?Math.sqrt(o):Number.POSITIVE_INFINITY}distancePointMultipath(t,e,i,n){const o=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),u=t.getXY();if(!o&&e.getGeometryType()===s.G.enumPolygon&&0!==(0,r.R)(e,u,0))return l(i,u,0,0),l(n,u,-1,Number.NaN),0;e.getImpl().getAccelerators();let c=this.m_maxSqrDistance,h=c,_=-1;const g=new a.Envelope2D,p=e.querySegmentIterator();let y=!1;for(;p.nextPath();)for(;p.hasNextSegment();){const t=p.nextSegment();t.queryEnvelope(g);const e=g.sqrDistance(u);if(e>c)continue;if(!this.m_bIsNearCalc&&y&&e===c)continue;_=t.getClosestCoordinate(u,!1);const s=t.getCoord2D(_);if(h=m.P.sqrDistance(u,s),this.m_bIsNearCalc){if(h<=c)return 0}else if(!(h>c)&&(!y||h<c)&&(c=h,l(i,u,0,0),l(n,s,p.getStartPointIndex(),_),y=!0,0===c))return 0}return y?Math.sqrt(c):Number.POSITIVE_INFINITY}distancePointEnvelope(t,e,i,n){const s=t.getXY();l(i,s,0,0),l(n,s,-1,Number.NaN);const o=e.asEnvelope2D();return o.contains(s)?0:Math.sqrt(o.sqrDistance(s,n.outPoint))}distanceMultipointGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distancePointMultipoint(e,t,n,i);return this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumMultiPoint:return this.distanceMultipointMultipoint(t,e,i,n,1,1);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipointMultipath(t,e,i,n);case s.G.enumEnvelope:return this.distanceMultipointMultipath(t,P(e),i,n);default:return Number.NaN}}distanceMultipointMultipoint(t,e,i,s,o,r){const a={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===o&&1===r){const n=Math.trunc((0,m.s)(Math.sqrt(t.getPointCount())+1,1,(0,m.i)())),o=Math.trunc((0,m.s)(Math.sqrt(e.getPointCount())+1,1,(0,m.i)()));if((n>=4||o>=4)&&this.distanceMultipointMultipoint(t,e,i,s,n,o)<=this.m_maxSqrDistance)return 0}let u=this.m_maxSqrDistance;const c=[t],h=[e],_=this.swapGeometriesIfBGtA(c,h);_&&(this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),r=(0,m.c)(o,o=r),p(i,s)),(0,n.mS)(a,(0,m.h)(()=>{p(i,s),this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!_),!1);const g=c[0].getImpl(),y=h[0].getImpl(),d=g.getPointCount(),x=y.getPointCount(),P=x>1;let D=!1;const v=new m.P,G=new m.P;for(let t=0;t<d;t+=o){if(g.queryXY(t,v),P){const t=this.m_env2DgeometryB.sqrDistance(v);if(this.m_bIsNearCalc){if(t>u)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(v)<=u)return 0}else if(t>=u)continue}for(let e=0;e<x;e+=r){y.queryXY(e,G);const n=m.P.sqrDistance(v,G);if(this.m_bIsNearCalc){if(n<=u)return 0}else if(!(n>u||D&&n===u)&&(!D||n<u)&&(l(i,v,t,0),l(s,G,e,0),D=!0,u=n,0===u))return D?Math.sqrt(u):Number.POSITIVE_INFINITY}}return D?Math.sqrt(u):Number.POSITIVE_INFINITY}catch(t){a.error=t,a.hasError=!0}finally{(0,n.hk)(a)}}distanceMultipointMultipath(t,e,i,n){let o=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&e.getGeometryType()===s.G.enumPolygon;const u=e.querySegmentIterator();u.stripAttributes();const c=new a.Envelope2D,h=new m.P;let _=this.m_maxSqrDistance;const g=t.getImpl(),p=g.getPointCount(),y=p>1;let d=!1;for(;u.nextPath();)for(;u.hasNextSegment();){const t=u.nextSegment();if(t.queryLooseEnvelope(c),y){const t=c.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(t>_)continue}else if(t>_||d&&t===_)continue}for(let s=0;s<p;s++){if(g.queryXY(s,h),o&&0!==(0,r.R)(e,h,0))return l(i,h,-1,Number.NaN),l(n,h,s,0),0;{const t=c.sqrDistance(h);if(this.m_bIsNearCalc){if(t>_)continue}else if(t>_)continue}const m=t.getClosestCoordinate(h,!1),a=t.getCoord2D(m);h.subThis(a);const p=h.sqrLength();if(this.m_bIsNearCalc){if(p<=_)return 0}else if(!(p>_)&&(!d||p<_)&&(_=p,l(i,g.getXY(s),s,0),l(n,a,u.getStartPointIndex(),m),d=!0,0===_))return 0}o=!1}return d?Math.sqrt(_):Number.POSITIVE_INFINITY}distanceEnvelopeGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:return this.distancePointEnvelope(e,t,n,i);case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distanceMultipointMultipath(e,P(t),n,i);return this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(P(t),e,i,n);case s.G.enumEnvelope:return this.distanceEnvelopeEnvelope(t,e,i,n);default:return Number.NaN}}distanceEnvelopeEnvelope(t,e,i,n){i.t=Number.NaN,i.index=-1,n.t=Number.NaN,n.index=-1;const s=t.asEnvelope2D(),o=e.asEnvelope2D();return Math.sqrt(s.sqrDistanceEnvelope(o,i.outPoint,n.outPoint))}distanceMultipathGeometry(t,e,i,n){switch(e.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distancePointMultipath(e,t,n,i);return this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const s=this.distanceMultipointMultipath(e,t,n,i);return this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(t,e,i,n);case s.G.enumEnvelope:return this.distanceMultipathMultipath(t,P(e),i,n);default:return Number.NaN}}distanceMultipathMultipath(t,e,i,s){const r={stack:[],error:void 0,hasError:!1};try{const u=[t],h=[e],l=this.swapGeometriesIfAGtB(u,h);l&&(this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),p(i,s)),(0,n.mS)(r,(0,m.h)(()=>{p(i,s),this.m_env2DgeometryB=(0,m.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!l),!1);const x=u[0],P=h[0],D=x.querySegmentIterator();D.stripAttributes();const v=P.querySegmentIterator();if(v.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){const t=Math.trunc((0,m.s)(Math.sqrt(x.getPointCount())+1,1,(0,m.i)())),e=Math.trunc((0,m.s)(Math.sqrt(x.getPointCount())+1,1,(0,m.i)()));if(this.distanceMultipointMultipoint(x,P,i,s,t,e)<=this.m_maxSqrDistance)return 0}if(this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){const t=c(),e=c();if(y(x,P,D,v,t,e))return _(i,t),_(s,e),0}const G=d(x),f=[],S=new o.S,M=new a.Envelope2D,b=new a.Envelope2D,E=new a.Envelope2D;let T=this.m_maxSqrDistance,I=!0,N=!1;for(let t=0,e=G.length;t<e;++t){x.querySegment(G[t],S,!0);const e=S.get();if(e.queryEnvelope(M),!(M.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>T)){if(this.m_bIsNearCalc&&M.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=T)return 0;for(;v.nextPath();){if(this.progress_(),I)P.queryPathEnvelope(v.getPathIndex(),E),f[v.getPathIndex()]=E.clone();else if(M.sqrDistanceEnvelope(f[v.getPathIndex()],null,null)>T)continue;for(;v.hasNextSegment();){const n=v.nextSegment();if(n.queryEnvelope(b),M.sqrDistanceEnvelope(b,null,null)<=T){const o=!M.isIntersecting(b),r=[0],m=[0];let a=e.distance(n,o,r,m);if(a*=a,this.m_bIsNearCalc&&a<=this.m_maxSqrDistance)return 0;if(a<T||a===T&&G[t]<i.index){if(N=!0,g(i,e,G[t],r[0]),g(s,n,v.getStartPointIndex(),m[0]),0===a)return 0;T=a}}}}v.resetToFirstPath(),I=!1}}return N?Math.sqrt(T):Number.POSITIVE_INFINITY}catch(t){r.error=t,r.hasError=!0}finally{(0,n.hk)(r)}}swapGeometriesIfAGtB(t,e){return(0,s.v)(t[0])>(0,s.v)(e[0])&&(e[0]=(0,m.c)(t[0],t[0]=e[0]),!0)}swapGeometriesIfBGtA(t,e){return this.swapGeometriesIfAGtB(e,t)}}},31088:(t,e,i)=>{i.r(e),i.d(e,{OperatorGeodeticDensifyByLength:()=>r,OperatorGeodeticDensifyCursor:()=>m});var n=i(76061),s=i(55537),o=i(39117);class r{getOperatorType(){return 10310}supportsCurves(){return!0}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}executeMany(t,e,i,n,s){return new m(t,i,n,e,-1,-1,s)}execute(t,e,i,o,r){const m=new n.S([t]),a=this.executeMany(m,e,i,o,r).next();return a||(0,s.d)("null output"),a}}class m extends n.G{constructor(t,e,i,n,o,r,m){super(),this.m_progressTracker=m,r>0&&(0,s.t)(""),4!==i&&o>0&&(0,s.t)(""),e||(0,s.a)(""),0===e.getCoordinateSystemType()&&(0,s.a)(""),n>0||o>0||(0,s.a)(""),this.m_index=-1,this.m_inputGeoms=t,this.m_spatialReference=e,this.m_curveType=i,this.m_maxLengthMeters=n,this.m_maxDeviationMeters=o,this.m_maxAngle=r}next(){{let t;for(;t=this.m_inputGeoms.next();)return(0,s.c)(t),this.m_index=this.m_inputGeoms.getGeometryID(),this.geodeticDensify(t);return null}}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}geodeticDensify(t){return(0,o.ak)(t,this.m_spatialReference,this.m_curveType,this.m_maxLengthMeters,this.m_maxDeviationMeters,this.m_progressTracker)}}},76061:(t,e,i)=>{i.d(e,{G:()=>n,S:()=>s});class n{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}class s extends n{constructor(t){super(),this.m_iGeom=-1,this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3633],{2272:(e,t,r)=>{r.d(t,{Dl:()=>u,gf:()=>d,jV:()=>c,lF:()=>l});var s=r(92602),n=r(70333),o=r(4718),i=r(84952),a=r(926);function c(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,i.An)(e):(0,o.o8)(e)}function l(e,t,r){const s={};for(const n in e){if("declaredClass"===n)continue;const o=e[n];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))s[n]=o.map(e=>l(e));else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(r?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?o:JSON.stringify(o);else s[n]=o}return s}async function d(e,t,o){const i=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(i)return i;!n.id&&s.A.request.useIdentity&&await Promise.all([r.e(7330),r.e(4813),r.e(3747)]).then(r.bind(r,73747));const c=await n.id.getCredential(e,o);return c?.token}},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>i,Y4:()=>o});var s=r(96285);class n{static{this.instance=new s.oh("Etc/UTC")}}function o(e){return e instanceof s.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function i(e){return o(e)?n.instance:e}},15032:(e,t,r)=>{r.d(t,{k:()=>c});var s=r(78502),n=r(73444),o=r(96285);function i(e){if(!e)return"";const t=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g;let r="";for(const s of e.match(t)||[])switch(s){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":r+=s;break;case"A":case"a":r+="a";break;default:r+=`'${s}'`}return r}const a="esri.core.sql.timeonly";class c{constructor(e,t,r,s){this._hour=e,this._minute=t,this._second=r,this._millisecond=s,this.declaredRootClass=a}static isTimeOnly(e){return"object"==typeof e&&null!=e&&"declaredRootClass"in e&&e.declaredRootClass===a}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return c.isTimeOnly(e)&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new c(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,s.Fq)(this.hour)&&(0,s.Fq)(this.minute)&&(0,s.Fq)(this.second)&&(0,s.Fq)(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return null===e||""===e?this.toString():(e=i(e))?o.c9.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,n.JK)(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,r,s){const n=new c(e,t,r,s);return n.isValid()?n:null}static fromReader(e){if(!e)return null;const t=e.split(":");return 3!==t.length?null:new c(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;const t=Math.floor(e/1e3%60),r=Math.floor(e/6e4%60),s=Math.floor(e/36e5%24),n=Math.floor(e%1e3);return new c(s,r,t,n)}static fromDateJS(e){return new c(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new c(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const r=[];t?(t=i(t))&&r.push(t):null!==t&&""!==t||(r.push("HH:mm:ss"),r.push("HH:mm:ss.SSS"),r.push("hh:mm:ss a"),r.push("hh:mm:ss.SSS a"),r.push("HH:mm"),r.push("hh:mm a"),r.push("H:mm"),r.push("h:mm a"),r.push("H:mm:ss"),r.push("h:mm:ss a"),r.push("H:mm:ss.SSS"),r.push("h:mm:ss.SSS a"));for(const t of r){const r=o.c9.fromFormat(e,t);if(r.isValid)return new c(r.hour,r.minute,r.second,r.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return c.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return o.c9.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}},44729:(e,t,r)=>{r.d(t,{n:()=>c});var s=r(66131),n=r(73444),o=r(96285);function i(e){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="";const r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const s of e.match(r)||[])switch(s){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=s;break;default:s.length>=2&&"["===s.slice(0,1)&&"]"===s.slice(-1)?t+=`'${s.slice(1,-1)}'`:t+=`'${s}'`}return t}const a="esri.core.sql.dateonly";class c{constructor(e,t,r){this._year=e,this._month=t,this._day=r,this.declaredRootClass=a}static isDateOnly(e){return"object"==typeof e&&null!=e&&"declaredRootClass"in e&&e.declaredRootClass===a}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return c.isDateOnly(e)&&e.day===this.day&&e.month===this.month&&e.year===this.year}clone(){return new c(this._year,this._month,this._day)}toDateTime(e){return o.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,s.mT)(e)})}toDateTimeLuxon(e){return o.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,s.mT)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null,t=!0){if(null===e||""===e)return this.toString();if(t&&(e=i(e)),!e)return"";const r=this.toDateTime("unknown");return s.lY.dateTimeToArcadeDate(r).toFormat(e,{locale:(0,n.JK)(),numberingSystem:"latn"})}toArcadeDate(){const e=this.toDateTime("unknown");return s.lY.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(e,t){return c.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return o.c9.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){const t=o.c9.fromMillis(e,{zone:o.mQ.utcInstance});return t.isValid?c.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){const t=o.c9.fromSeconds(e,{zone:o.mQ.utcInstance});return t.isValid?c.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;const t=e.split("-");return 3!==t.length?null:new c(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))}static fromParts(e,t,r){const s=new c(e,t,r);return!1===s.isValid?null:s}static fromDateJS(e){return c.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return c.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const r=[];if(t)(t=i(t))&&r.push(t);else if(null===t||""===t){const t=o.c9.fromISO(e,{setZone:!0});return t.isValid?c.fromParts(t.year,t.month,t.day):null}for(const s of r){const r=o.c9.fromFormat(e,t??s);if(r.isValid)return new c(r.year,r.month,r.day)}return null}static fromNow(e="system"){const t=o.c9.fromJSDate(new Date).setZone((0,s.mT)(e));return new c(t.year,t.month,t.day)}}},59534:(e,t,r)=>{r.d(t,{B:()=>n,b:()=>o});var s=r(85935);function n(e){return e.toLowerCase().replaceAll(/[\s-]+/g,"")}class o{constructor(e,t){const r=new Map;for(const t of e){const e=n(t);if(r.has(e))throw new Error(`${t} already added as ${r.get(e)}`);r.set(e,t)}if(null!=t)for(const[e,s]of t){const t=n(e);if(r.has(t))throw new Error(`${e} already associated with ${r.get(t)}`);r.set(t,s)}this._enumMap=r}lookup(e){return this._enumMap.get(n(e))}get(e){const t=this.lookup(e);if(null==t)throw new s.D$(null,"InvalidParameter",null);return t}}},66131:(e,t,r)=>{r.d(t,{lY:()=>d,mT:()=>m});var s=r(59534),n=r(799),o=r(3330),i=r(96285);const a={TimeZoneNotRecognized:"Timezone identifier has not been recognized."};class c extends Error{constructor(e,t){super((0,n.HC)(a[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,c)}}function u(e,t,r){return e<t?e-t:e>r?e-r:0}function l(e,t,r){return e<t?t:e>r?r:e}class d{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,r=1,s=0,n=0,o=0,a=0,c){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(s)||isNaN(n)||isNaN(o)||isNaN(a))return null;const h=i.c9.local(e,t).daysInMonth;let f=i.c9.fromObject({day:l(r,1,h),year:e,month:l(t,1,12),hour:l(s,0,23),minute:l(n,0,59),second:l(o,0,59),millisecond:l(a,0,999)},{zone:m(c)});return f=f.plus({months:u(t,1,12),days:u(r,1,h),hours:u(s,0,23),minutes:u(n,0,59),seconds:u(o,0,59),milliseconds:u(a,0,999)}),new d(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){const r=m(t);return e.isUnknownTimeZone||r===o.GB.instance?d.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,r):new d(e._date.setZone(r))}static dateJSToArcadeDate(e){return new d(i.c9.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){const r=m(t);return new d(i.c9.fromJSDate(e,{zone:r}))}static unknownEpochToArcadeDate(e){return new d(i.c9.fromMillis(e,{zone:o.GB.instance}))}static unknownDateJSToArcadeDate(e){return new d(i.c9.fromMillis(e.getTime(),{zone:o.GB.instance}))}static epochToArcadeDate(e,t="system"){const r=m(t);return new d(i.c9.fromMillis(e,{zone:r}))}static dateTimeToArcadeDate(e){return new d(e)}clone(){return new d(this._date)}changeTimeZone(e){const t=m(e);return d.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){const r=m(t);return e.zone===o.GB.instance||r===o.GB.instance?d.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,r):new d(e.setZone(r))}static nowToArcadeDate(e){const t=m(e);return new d(i.c9.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new d(i.c9.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===d.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===o.GB.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";const e=this.zone;return"fixed"===e.type?0===e.fixed?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new d(this._date.plus(e))}diff(e,t){return this._date.diff(e._date,t)[t]}toISODate(){return this._date.toISODate()}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(e,t){return this._date.toISOTime({suppressMilliseconds:e,includeOffset:t&&!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new d(this._date.toUTC())}toLocal(){return new d(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;const t=i.c9.fromISO(e,{setZone:!0});return new d(t)}}function m(e,t=!0){if(e instanceof i.bo)return e;switch((0,s.B)(e)){case"system":return"system";case"utc":return"UTC";case"unknown":return o.GB.instance}if(/^[+-]?[0-9]{1,2}([:][0-9]{2})?$/.test(e)){const t=i.mQ.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}const r=i.oh.create(e);if(!r.isValid){if(t)throw new c("TimeZoneNotRecognized");return null}return r}},78502:(e,t,r)=>{r.d(t,{Fq:()=>i,Yc:()=>n,Yq:()=>o});var s=r(5443);function n(e){if(null==e)return null;switch(e.type){case"polygon":case"multipoint":case"polyline":return e.extent;case"point":return new s.A({xmin:e.x,ymin:e.y,xmax:e.x,ymax:e.y,spatialReference:e.spatialReference});case"extent":return e}return null}function o(e){if(null==e)return null;const t=e.clone();return void 0!==e.cache._geVersion&&(t.cache._geVersion=e.cache._geVersion),t}function i(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}},85935:(e,t,r)=>{r.d(t,{D$:()=>a,Nh:()=>d,O$:()=>l,mT:()=>u,ps:()=>h});var s=r(799);const n={TypeNotAllowedInFeature:"Feature attributes only support dates, numbers, strings, guids.",LogicError:"Logic error - {reason}",CannotCompareDateAndTime:"Cannot compare date or dateonly with timeonly types",NeverReach:"Encountered unreachable logic",AsyncNotEnabled:"Async Arcade must be enabled for this script",ModuleAccessorMustBeString:"Module accessor must be a string",ModuleExportNotFound:"Module has no export with provided identifier",ModulesNotSupported:"Current profile does not support modules",ArrayAccessMustBeNumber:"Array accessor must be a number",FunctionNotFound:"Function not found",FieldNotFound:"Key not found - {key}",CircularModules:"Circular module dependencies are not allowed",Cancelled:"Execution cancelled",UnsupportedHashType:"Type not supported in hash function",IllegalResult:"Value is not a supported return type",PortalRequired:"Portal is required",InvalidParameter:"Invalid parameter",WrongNumberOfParameters:"Call with wrong number of parameters",Unrecognized:"Unrecognized code structure",UnrecognizedType:"Unrecognized type",WrongSpatialReference:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",BooleanConditionRequired:"Conditions must use booleans",NoFunctionInDictionary:"Dictionaries cannot contain functions.",NoFunctionInArray:"Arrays cannot contain functions.",NoFunctionInTemplateLiteral:"Template Literals do not expect functions by value.",KeyAccessorMustBeString:"Accessor must be a string",KeyMustBeString:"Object keys must be a string",Immutable:"Object is immutable",UnexpectedToken:"Unexpected token",MemberOfNull:"Cannot access property of null object",MaximumCallDepth:"Exceeded maximum function depth",OutOfBounds:"Out of bounds",InvalidIdentifier:"Identifier not recognized",CallNonFunction:"Expression is not a function",InvalidMemberAccessKey:"Cannot access value using a key of this type",AssignModuleFunction:"Cannot assign function to module variable",UnsupportUnaryOperator:"Unsupported unary operator",UnsupportedOperator:"Unsupported operator",LogicalExpressionOnlyBoolean:"Logical expressions must be boolean",LogicExpressionOrAnd:"Logical expression can only be combined with || or &&",CannotChangeTimeZoneTime:"Cannot change the timezone of a Time",CannotChangeTimeZoneDateOnly:"Cannot change the timezone of a DateOnly",FeatureSetDoesNotHaveSubtypes:"FeatureSet does not have subtypes"};class o extends Error{constructor(...e){super(...e)}}class i extends o{constructor(e,t){super(c(t)+e.message,{cause:e}),this.loc=null,Error.captureStackTrace&&Error.captureStackTrace(this,i),t?.loc&&(this.loc=t.loc)}}class a extends Error{constructor(e,t,r,o){super("Execution error - "+c(r)+(0,s.HC)(n[t],o)),this.loc=null,this.declaredRootClass="esri.arcade.arcadeexecutionerror",Error.captureStackTrace&&Error.captureStackTrace(this,a),r?.loc&&(this.loc=r.loc)}}function c(e){return e&&e.loc?`Line : ${e.loc.start?.line}, ${e.loc.start?.column}: `:""}class u extends Error{constructor(e,t,r,o){super("Compilation error - "+c(r)+(0,s.HC)(n[t],o)),this.loc=null,this.declaredRootClass="esri.arcade.arcadecompilationerror",Error.captureStackTrace&&Error.captureStackTrace(this,u),r?.loc&&(this.loc=r.loc)}}class l extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror",Error.captureStackTrace&&Error.captureStackTrace(this,l)}}function d(e,t,r){return"esri.arcade.arcadeexecutionerror"===r.declaredRootClass||"esri.arcade.arcadecompilationerror"===r.declaredRootClass?null===r.loc&&t?.loc?new i(r,{cause:r}):r:("esri.arcade.featureset.support.featureseterror"===r.declaredRootClass||"esri.arcade.featureset.support.sqlerror"===r.declaredRootClass||r.declaredRootClass,t?.loc?new i(r,{cause:r}):r)}const m={UnrecognizedUri:"Unrecognized uri - {uri}",UnsupportedUriProtocol:"Unrecognized uri protocol"};class h extends Error{constructor(e,t){super((0,s.HC)(m[e],t)),this.declaredRootClass="esri.arcade.arcademoduleerror",Error.captureStackTrace&&Error.captureStackTrace(this,h)}}},98453:(e,t,r)=>{r.d(t,{m:()=>s});const s=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3633],{2272:(e,t,r)=>{r.d(t,{Dl:()=>u,gf:()=>d,jV:()=>c,lF:()=>l});var s=r(92602),n=r(70333),o=r(4718),i=r(84952),a=r(926);function c(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,i.An)(e):(0,o.o8)(e)}function l(e,t,r){const s={};for(const n in e){if("declaredClass"===n)continue;const o=e[n];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))s[n]=o.map(e=>l(e));else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(r?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?o:JSON.stringify(o);else s[n]=o}return s}async function d(e,t,o){const i=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(i)return i;!n.id&&s.A.request.useIdentity&&await Promise.all([r.e(7330),r.e(4813),r.e(3747)]).then(r.bind(r,73747));const c=await n.id.getCredential(e,o);return c?.token}},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>i,Y4:()=>o});var s=r(96285);class n{static{this.instance=new s.oh("Etc/UTC")}}function o(e){return e instanceof s.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function i(e){return o(e)?n.instance:e}},15032:(e,t,r)=>{r.d(t,{k:()=>c});var s=r(78502),n=r(73444),o=r(96285);function i(e){if(!e)return"";const t=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g;let r="";for(const s of e.match(t)||[])switch(s){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":r+=s;break;case"A":case"a":r+="a";break;default:r+=`'${s}'`}return r}const a="esri.core.sql.timeonly";class c{constructor(e,t,r,s){this._hour=e,this._minute=t,this._second=r,this._millisecond=s,this.declaredRootClass=a}static isTimeOnly(e){return"object"==typeof e&&null!=e&&"declaredRootClass"in e&&e.declaredRootClass===a}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return c.isTimeOnly(e)&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new c(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,s.Fq)(this.hour)&&(0,s.Fq)(this.minute)&&(0,s.Fq)(this.second)&&(0,s.Fq)(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return null===e||""===e?this.toString():(e=i(e))?o.c9.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,n.JK)(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,r,s){const n=new c(e,t,r,s);return n.isValid()?n:null}static fromReader(e){if(!e)return null;const t=e.split(":");return 3!==t.length?null:new c(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;const t=Math.floor(e/1e3%60),r=Math.floor(e/6e4%60),s=Math.floor(e/36e5%24),n=Math.floor(e%1e3);return new c(s,r,t,n)}static fromDateJS(e){return new c(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new c(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const r=[];t?(t=i(t))&&r.push(t):null!==t&&""!==t||(r.push("HH:mm:ss"),r.push("HH:mm:ss.SSS"),r.push("hh:mm:ss a"),r.push("hh:mm:ss.SSS a"),r.push("HH:mm"),r.push("hh:mm a"),r.push("H:mm"),r.push("h:mm a"),r.push("H:mm:ss"),r.push("h:mm:ss a"),r.push("H:mm:ss.SSS"),r.push("h:mm:ss.SSS a"));for(const t of r){const r=o.c9.fromFormat(e,t);if(r.isValid)return new c(r.hour,r.minute,r.second,r.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return c.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return o.c9.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}},44729:(e,t,r)=>{r.d(t,{n:()=>c});var s=r(66131),n=r(73444),o=r(96285);function i(e){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="";const r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const s of e.match(r)||[])switch(s){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=s;break;default:s.length>=2&&"["===s.slice(0,1)&&"]"===s.slice(-1)?t+=`'${s.slice(1,-1)}'`:t+=`'${s}'`}return t}const a="esri.core.sql.dateonly";class c{constructor(e,t,r){this._year=e,this._month=t,this._day=r,this.declaredRootClass=a}static isDateOnly(e){return"object"==typeof e&&null!=e&&"declaredRootClass"in e&&e.declaredRootClass===a}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return c.isDateOnly(e)&&e.day===this.day&&e.month===this.month&&e.year===this.year}clone(){return new c(this._year,this._month,this._day)}toDateTime(e){return o.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,s.mT)(e)})}toDateTimeLuxon(e){return o.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,s.mT)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null,t=!0){if(null===e||""===e)return this.toString();if(t&&(e=i(e)),!e)return"";const r=this.toDateTime("unknown");return s.lY.dateTimeToArcadeDate(r).toFormat(e,{locale:(0,n.JK)(),numberingSystem:"latn"})}toArcadeDate(){const e=this.toDateTime("unknown");return s.lY.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(e,t){return c.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return o.c9.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){const t=o.c9.fromMillis(e,{zone:o.mQ.utcInstance});return t.isValid?c.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){const t=o.c9.fromSeconds(e,{zone:o.mQ.utcInstance});return t.isValid?c.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;const t=e.split("-");return 3!==t.length?null:new c(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))}static fromParts(e,t,r){const s=new c(e,t,r);return!1===s.isValid?null:s}static fromDateJS(e){return c.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return c.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const r=[];if(t)(t=i(t))&&r.push(t);else if(null===t||""===t){const t=o.c9.fromISO(e,{setZone:!0});return t.isValid?c.fromParts(t.year,t.month,t.day):null}for(const s of r){const r=o.c9.fromFormat(e,t??s);if(r.isValid)return new c(r.year,r.month,r.day)}return null}static fromNow(e="system"){const t=o.c9.fromJSDate(new Date).setZone((0,s.mT)(e));return new c(t.year,t.month,t.day)}}},59534:(e,t,r)=>{r.d(t,{B:()=>n,b:()=>o});var s=r(85935);function n(e){return e.toLowerCase().replaceAll(/[\s-]+/g,"")}class o{constructor(e,t){const r=new Map;for(const t of e){const e=n(t);if(r.has(e))throw new Error(`${t} already added as ${r.get(e)}`);r.set(e,t)}if(null!=t)for(const[e,s]of t){const t=n(e);if(r.has(t))throw new Error(`${e} already associated with ${r.get(t)}`);r.set(t,s)}this._enumMap=r}lookup(e){return this._enumMap.get(n(e))}get(e){const t=this.lookup(e);if(null==t)throw new s.D$(null,"InvalidParameter",null);return t}}},66131:(e,t,r)=>{r.d(t,{lY:()=>d,mT:()=>m});var s=r(59534),n=r(799),o=r(3330),i=r(96285);const a={TimeZoneNotRecognized:"Timezone identifier has not been recognized."};class c extends Error{constructor(e,t){super((0,n.HC)(a[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,c)}}function u(e,t,r){return e<t?e-t:e>r?e-r:0}function l(e,t,r){return e<t?t:e>r?r:e}class d{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,r=1,s=0,n=0,o=0,a=0,c){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(s)||isNaN(n)||isNaN(o)||isNaN(a))return null;const h=i.c9.local(e,t).daysInMonth;let f=i.c9.fromObject({day:l(r,1,h),year:e,month:l(t,1,12),hour:l(s,0,23),minute:l(n,0,59),second:l(o,0,59),millisecond:l(a,0,999)},{zone:m(c)});return f=f.plus({months:u(t,1,12),days:u(r,1,h),hours:u(s,0,23),minutes:u(n,0,59),seconds:u(o,0,59),milliseconds:u(a,0,999)}),new d(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){const r=m(t);return e.isUnknownTimeZone||r===o.GB.instance?d.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,r):new d(e._date.setZone(r))}static dateJSToArcadeDate(e){return new d(i.c9.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){const r=m(t);return new d(i.c9.fromJSDate(e,{zone:r}))}static unknownEpochToArcadeDate(e){return new d(i.c9.fromMillis(e,{zone:o.GB.instance}))}static unknownDateJSToArcadeDate(e){return new d(i.c9.fromMillis(e.getTime(),{zone:o.GB.instance}))}static epochToArcadeDate(e,t="system"){const r=m(t);return new d(i.c9.fromMillis(e,{zone:r}))}static dateTimeToArcadeDate(e){return new d(e)}clone(){return new d(this._date)}changeTimeZone(e){const t=m(e);return d.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){const r=m(t);return e.zone===o.GB.instance||r===o.GB.instance?d.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,r):new d(e.setZone(r))}static nowToArcadeDate(e){const t=m(e);return new d(i.c9.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new d(i.c9.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===d.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===o.GB.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";const e=this.zone;return"fixed"===e.type?0===e.fixed?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new d(this._date.plus(e))}diff(e,t){return this._date.diff(e._date,t)[t]}toISODate(){return this._date.toISODate()}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(e,t){return this._date.toISOTime({suppressMilliseconds:e,includeOffset:t&&!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new d(this._date.toUTC())}toLocal(){return new d(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;const t=i.c9.fromISO(e,{setZone:!0});return new d(t)}}function m(e,t=!0){if(e instanceof i.bo)return e;switch((0,s.B)(e)){case"system":return"system";case"utc":return"UTC";case"unknown":return o.GB.instance}if(/^[+-]?[0-9]{1,2}(:[0-9]{2})?$/.test(e)){const t=i.mQ.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}const r=i.oh.create(e);if(!r.isValid){if(t)throw new c("TimeZoneNotRecognized");return null}return r}},78502:(e,t,r)=>{r.d(t,{Fq:()=>i,Yc:()=>n,Yq:()=>o});var s=r(5443);function n(e){if(null==e)return null;switch(e.type){case"polygon":case"multipoint":case"polyline":return e.extent;case"point":return new s.A({xmin:e.x,ymin:e.y,xmax:e.x,ymax:e.y,spatialReference:e.spatialReference});case"extent":return e}return null}function o(e){if(null==e)return null;const t=e.clone();return void 0!==e.cache._geVersion&&(t.cache._geVersion=e.cache._geVersion),t}function i(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}},85935:(e,t,r)=>{r.d(t,{D$:()=>a,Nh:()=>d,O$:()=>l,mT:()=>u,ps:()=>h});var s=r(799);const n={TypeNotAllowedInFeature:"Feature attributes only support dates, numbers, strings, guids.",LogicError:"Logic error - {reason}",CannotCompareDateAndTime:"Cannot compare date or dateonly with timeonly types",NeverReach:"Encountered unreachable logic",AsyncNotEnabled:"Async Arcade must be enabled for this script",ModuleAccessorMustBeString:"Module accessor must be a string",ModuleExportNotFound:"Module has no export with provided identifier",ModulesNotSupported:"Current profile does not support modules",ArrayAccessMustBeNumber:"Array accessor must be a number",FunctionNotFound:"Function not found",FieldNotFound:"Key not found - {key}",CircularModules:"Circular module dependencies are not allowed",Cancelled:"Execution cancelled",UnsupportedHashType:"Type not supported in hash function",IllegalResult:"Value is not a supported return type",PortalRequired:"Portal is required",InvalidParameter:"Invalid parameter",WrongNumberOfParameters:"Call with wrong number of parameters",Unrecognized:"Unrecognized code structure",UnrecognizedType:"Unrecognized type",WrongSpatialReference:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",BooleanConditionRequired:"Conditions must use booleans",NoFunctionInDictionary:"Dictionaries cannot contain functions.",NoFunctionInArray:"Arrays cannot contain functions.",NoFunctionInTemplateLiteral:"Template Literals do not expect functions by value.",KeyAccessorMustBeString:"Accessor must be a string",KeyMustBeString:"Object keys must be a string",Immutable:"Object is immutable",UnexpectedToken:"Unexpected token",MemberOfNull:"Cannot access property of null object",MaximumCallDepth:"Exceeded maximum function depth",OutOfBounds:"Out of bounds",InvalidIdentifier:"Identifier not recognized",CallNonFunction:"Expression is not a function",InvalidMemberAccessKey:"Cannot access value using a key of this type",AssignModuleFunction:"Cannot assign function to module variable",UnsupportUnaryOperator:"Unsupported unary operator",UnsupportedOperator:"Unsupported operator",LogicalExpressionOnlyBoolean:"Logical expressions must be boolean",LogicExpressionOrAnd:"Logical expression can only be combined with || or &&",CannotChangeTimeZoneTime:"Cannot change the timezone of a Time",CannotChangeTimeZoneDateOnly:"Cannot change the timezone of a DateOnly",FeatureSetDoesNotHaveSubtypes:"FeatureSet does not have subtypes"};class o extends Error{constructor(...e){super(...e)}}class i extends o{constructor(e,t){super(c(t)+e.message,{cause:e}),this.loc=null,Error.captureStackTrace&&Error.captureStackTrace(this,i),t?.loc&&(this.loc=t.loc)}}class a extends Error{constructor(e,t,r,o){super("Execution error - "+c(r)+(0,s.HC)(n[t],o)),this.loc=null,this.declaredRootClass="esri.arcade.arcadeexecutionerror",Error.captureStackTrace&&Error.captureStackTrace(this,a),r?.loc&&(this.loc=r.loc)}}function c(e){return e&&e.loc?`Line : ${e.loc.start?.line}, ${e.loc.start?.column}: `:""}class u extends Error{constructor(e,t,r,o){super("Compilation error - "+c(r)+(0,s.HC)(n[t],o)),this.loc=null,this.declaredRootClass="esri.arcade.arcadecompilationerror",Error.captureStackTrace&&Error.captureStackTrace(this,u),r?.loc&&(this.loc=r.loc)}}class l extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror",Error.captureStackTrace&&Error.captureStackTrace(this,l)}}function d(e,t,r){return"esri.arcade.arcadeexecutionerror"===r.declaredRootClass||"esri.arcade.arcadecompilationerror"===r.declaredRootClass?null===r.loc&&t?.loc?new i(r,{cause:r}):r:("esri.arcade.featureset.support.featureseterror"===r.declaredRootClass||"esri.arcade.featureset.support.sqlerror"===r.declaredRootClass||r.declaredRootClass,t?.loc?new i(r,{cause:r}):r)}const m={UnrecognizedUri:"Unrecognized uri - {uri}",UnsupportedUriProtocol:"Unrecognized uri protocol"};class h extends Error{constructor(e,t){super((0,s.HC)(m[e],t)),this.declaredRootClass="esri.arcade.arcademoduleerror",Error.captureStackTrace&&Error.captureStackTrace(this,h)}}},98453:(e,t,r)=>{r.d(t,{m:()=>s});const s=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2503],{46810:(e,t,r)=>{r.d(t,{O:()=>n});var s=r(39117);class n extends s.Q{getOperatorType(){return 5}execute(e,t,r,n){return(0,s.R)(e,t,r,8,n)}}},76061:(e,t,r)=>{r.d(t,{G:()=>s,S:()=>n});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class n 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}}},83547:(e,t,r)=>{r.r(t),r.d(t,{execute:()=>m});var s=r(46810),n=r(83299);const o=new s.O;function m(e,t){const r=(0,n.fromGeometry)(e);return o.execute(r.getGeometry(),(0,n.fromGeometryToGXGeometry)(t),r.getSpatialReference(),null)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2503],{46810:(e,t,r)=>{r.d(t,{O:()=>n});var s=r(39117);class n extends s.T{getOperatorType(){return 5}execute(e,t,r,n){return(0,s.U)(e,t,r,8,n)}}},76061:(e,t,r)=>{r.d(t,{G:()=>s,S:()=>n});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class n 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}}},83547:(e,t,r)=>{r.r(t),r.d(t,{execute:()=>m});var s=r(46810),n=r(83299);const o=new s.O;function m(e,t){const r=(0,n.fromGeometry)(e);return o.execute(r.getGeometry(),(0,n.fromGeometryToGXGeometry)(t),r.getSpatialReference(),null)}}}]);