@arcgis/core 5.2.0-next.111 → 5.2.0-next.113

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 (644) hide show
  1. package/Ground.d.ts +4 -5
  2. package/Ground.js +1 -1
  3. package/arcgisGlobal.d.ts +5 -0
  4. package/assets/components/assets/icon/alignBottom16.json +1 -0
  5. package/assets/components/assets/icon/alignBottom24.json +1 -0
  6. package/assets/components/assets/icon/alignBottom32.json +1 -0
  7. package/assets/components/assets/icon/alignCenterHorizontal16.json +1 -0
  8. package/assets/components/assets/icon/alignCenterHorizontal24.json +1 -0
  9. package/assets/components/assets/icon/alignCenterHorizontal32.json +1 -0
  10. package/assets/components/assets/icon/alignCenterVertical16.json +1 -0
  11. package/assets/components/assets/icon/alignCenterVertical24.json +1 -0
  12. package/assets/components/assets/icon/alignCenterVertical32.json +1 -0
  13. package/assets/components/assets/icon/alignLeft16.json +1 -0
  14. package/assets/components/assets/icon/alignLeft24.json +1 -0
  15. package/assets/components/assets/icon/alignLeft32.json +1 -0
  16. package/assets/components/assets/icon/alignRight16.json +1 -0
  17. package/assets/components/assets/icon/alignRight24.json +1 -0
  18. package/assets/components/assets/icon/alignRight32.json +1 -0
  19. package/assets/components/assets/icon/alignTop16.json +1 -0
  20. package/assets/components/assets/icon/alignTop24.json +1 -0
  21. package/assets/components/assets/icon/alignTop32.json +1 -0
  22. package/assets/components/assets/icon/columnGroup16.json +1 -0
  23. package/assets/components/assets/icon/columnGroup24.json +1 -0
  24. package/assets/components/assets/icon/columnGroup32.json +1 -0
  25. package/assets/components/assets/icon/columnRemove16.json +1 -0
  26. package/assets/components/assets/icon/columnRemove24.json +1 -0
  27. package/assets/components/assets/icon/columnRemove32.json +1 -0
  28. package/assets/components/assets/icon/columnUngroup16.json +1 -0
  29. package/assets/components/assets/icon/columnUngroup24.json +1 -0
  30. package/assets/components/assets/icon/columnUngroup32.json +1 -0
  31. package/assets/components/assets/icon/envelopeOpen16.json +1 -0
  32. package/assets/components/assets/icon/envelopeOpen24.json +1 -0
  33. package/assets/components/assets/icon/envelopeOpen32.json +1 -0
  34. package/assets/components/assets/icon/handDraw16.json +1 -0
  35. package/assets/components/assets/icon/handDraw24.json +1 -0
  36. package/assets/components/assets/icon/handDraw32.json +1 -0
  37. package/assets/components/assets/icon/monitorShare16.json +1 -0
  38. package/assets/components/assets/icon/monitorShare24.json +1 -0
  39. package/assets/components/assets/icon/monitorShare32.json +1 -0
  40. package/assets/components/assets/icon/pi16.json +1 -0
  41. package/assets/components/assets/icon/pi24.json +1 -0
  42. package/assets/components/assets/icon/pi32.json +1 -0
  43. package/assets/components/assets/icon/rowGroup16.json +1 -0
  44. package/assets/components/assets/icon/rowGroup24.json +1 -0
  45. package/assets/components/assets/icon/rowGroup32.json +1 -0
  46. package/assets/components/assets/icon/rowRemove16.json +1 -0
  47. package/assets/components/assets/icon/rowRemove24.json +1 -0
  48. package/assets/components/assets/icon/rowRemove32.json +1 -0
  49. package/assets/components/assets/icon/rowUngroup16.json +1 -0
  50. package/assets/components/assets/icon/rowUngroup24.json +1 -0
  51. package/assets/components/assets/icon/rowUngroup32.json +1 -0
  52. package/assets/components/assets/icon/sdCard16.json +1 -0
  53. package/assets/components/assets/icon/sdCard24.json +1 -0
  54. package/assets/components/assets/icon/sdCard32.json +1 -0
  55. package/assets/components/assets/icon/spaceAroundHorizontal16.json +1 -0
  56. package/assets/components/assets/icon/spaceAroundHorizontal24.json +1 -0
  57. package/assets/components/assets/icon/spaceAroundHorizontal32.json +1 -0
  58. package/assets/components/assets/icon/spaceAroundVertical16.json +1 -0
  59. package/assets/components/assets/icon/spaceAroundVertical24.json +1 -0
  60. package/assets/components/assets/icon/spaceAroundVertical32.json +1 -0
  61. package/assets/components/assets/icon/spaceBetweenHorizontal16.json +1 -0
  62. package/assets/components/assets/icon/spaceBetweenHorizontal24.json +1 -0
  63. package/assets/components/assets/icon/spaceBetweenHorizontal32.json +1 -0
  64. package/assets/components/assets/icon/spaceBetweenVertical16.json +1 -0
  65. package/assets/components/assets/icon/spaceBetweenVertical24.json +1 -0
  66. package/assets/components/assets/icon/spaceBetweenVertical32.json +1 -0
  67. package/assets/components/assets/icon/spacedEvenlyHorizontal16.json +1 -0
  68. package/assets/components/assets/icon/spacedEvenlyHorizontal24.json +1 -0
  69. package/assets/components/assets/icon/spacedEvenlyHorizontal32.json +1 -0
  70. package/assets/components/assets/icon/spacedEvenlyVertical16.json +1 -0
  71. package/assets/components/assets/icon/spacedEvenlyVertical24.json +1 -0
  72. package/assets/components/assets/icon/spacedEvenlyVertical32.json +1 -0
  73. package/assets/components/assets/icon/stretchHorizontal16.json +1 -0
  74. package/assets/components/assets/icon/stretchHorizontal24.json +1 -0
  75. package/assets/components/assets/icon/stretchHorizontal32.json +1 -0
  76. package/assets/components/assets/icon/stretchVertical16.json +1 -0
  77. package/assets/components/assets/icon/stretchVertical24.json +1 -0
  78. package/assets/components/assets/icon/stretchVertical32.json +1 -0
  79. package/assets/components/assets/icon/swatchPalette16.json +1 -0
  80. package/assets/components/assets/icon/swatchPalette24.json +1 -0
  81. package/assets/components/assets/icon/swatchPalette32.json +1 -0
  82. package/assets/components/assets/icon/thermometer16.json +1 -0
  83. package/assets/components/assets/icon/thermometer24.json +1 -0
  84. package/assets/components/assets/icon/thermometer32.json +1 -0
  85. package/assets/components/assets/icon/webCamera16.json +1 -0
  86. package/assets/components/assets/icon/webCamera24.json +1 -0
  87. package/assets/components/assets/icon/webCamera32.json +1 -0
  88. package/assets/esri/core/workers/RemoteClient.js +1 -1
  89. package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +1 -0
  90. package/assets/esri/core/workers/chunks/{f5a988bb850f7a7af143.js → 05b373a663cb5d4d722f.js} +1 -1
  91. package/assets/esri/core/workers/chunks/078ed48eb055dd213ee6.js +1 -0
  92. package/assets/esri/core/workers/chunks/{36f8caeb574dcd5c0ed5.js → 0b727d7bf3e36e146725.js} +1 -1
  93. package/assets/esri/core/workers/chunks/0c65862e3dd810015491.js +1 -0
  94. package/assets/esri/core/workers/chunks/0e3e58ba8e2d358121a5.js +1 -0
  95. package/assets/esri/core/workers/chunks/0edebc6c516f0b9dac7b.js +1 -0
  96. package/assets/esri/core/workers/chunks/1004e77593dfa506cd5d.js +1 -0
  97. package/assets/esri/core/workers/chunks/184942ea601237c8241a.js +1 -0
  98. package/assets/esri/core/workers/chunks/20de0ea9fa08a6545978.js +1 -0
  99. package/assets/esri/core/workers/chunks/214d63813d268afc265d.js +1 -0
  100. package/assets/esri/core/workers/chunks/21c0743b2f612e7e7de3.js +1 -0
  101. package/assets/esri/core/workers/chunks/22e85819e23202a8ba90.js +1 -0
  102. package/assets/esri/core/workers/chunks/{6e677505d257e0848075.js → 23f9ab77e4e263f82636.js} +1 -1
  103. package/assets/esri/core/workers/chunks/25cc6d7178a52f2f46b7.js +1 -0
  104. package/assets/esri/core/workers/chunks/28a04887ecaee5445d14.js +1 -0
  105. package/assets/esri/core/workers/chunks/{2fc5c1504691badc7792.js → 2ac2d0a7623dd060c144.js} +1 -1
  106. package/assets/esri/core/workers/chunks/2afce71e8b6ae86e0792.js +1 -0
  107. package/assets/esri/core/workers/chunks/{4c9df8ae9238454969b8.js → 2c21f4744e19b925a6ae.js} +1 -1
  108. package/assets/esri/core/workers/chunks/32fc7d1db4b311f6b880.js +1 -0
  109. package/assets/esri/core/workers/chunks/36792b8a85e88044cb49.js +1 -0
  110. package/assets/esri/core/workers/chunks/36a7e19f43517aa94577.js +1 -0
  111. package/assets/esri/core/workers/chunks/{6e6cdff4bbe1ff2f44ac.js → 3ab25279aaa30f035038.js} +1 -1
  112. package/assets/esri/core/workers/chunks/3acc1299c1382c3b034d.js +1 -0
  113. package/assets/esri/core/workers/chunks/{abcda435bc83ef4240f9.js → 3b499cfc89c8f87cdb20.js} +1 -1
  114. package/assets/esri/core/workers/chunks/{c2684fcde2923c9830e0.js → 42c4d0c1c08bf111e5a4.js} +1 -1
  115. package/assets/esri/core/workers/chunks/430802108b63194b7ddd.js +2 -0
  116. package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +1 -0
  117. package/assets/esri/core/workers/chunks/49c6dc487714f9cd55c7.js +1 -0
  118. package/assets/esri/core/workers/chunks/{70e0ead69a722fd964b8.js → 49e8ff5ed079a9e3be4b.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 4bf2cc4d092601ff2b86.js} +1 -1
  120. package/assets/esri/core/workers/chunks/{72be81c1394285b51ed3.js → 4bfd63f3cf9208eb839b.js} +225 -229
  121. package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +1 -0
  122. package/assets/esri/core/workers/chunks/510a190a6f0a60ae38c3.js +1 -0
  123. package/assets/esri/core/workers/chunks/{89a785f8b61263e2d592.js → 552c92b01a5f02a115c5.js} +1 -1
  124. package/assets/esri/core/workers/chunks/564fdf0d663b773806cc.js +1 -0
  125. package/assets/esri/core/workers/chunks/{d9270f4935eb0d044db3.js → 57328c206f1e699ac06f.js} +1 -1
  126. package/assets/esri/core/workers/chunks/{50951fb13013b11b8a24.js → 58e62c8ce1292f4d3b06.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{434c5b54e89ace974cbd.js → 5965a947f68b707eaa6b.js} +2 -2
  128. package/assets/esri/core/workers/chunks/5aee7739afb5160d4ace.js +1 -0
  129. package/assets/esri/core/workers/chunks/5b9925f23d4b10a7087e.js +1 -0
  130. package/assets/esri/core/workers/chunks/5f79ba5639067f734791.js +1 -0
  131. package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 60c61f34733063730386.js} +1 -1
  132. package/assets/esri/core/workers/chunks/62b1f94f4fa978d4da48.js +1 -0
  133. package/assets/esri/core/workers/chunks/6b264006b96cbf93d8ed.js +1 -0
  134. package/assets/esri/core/workers/chunks/6b9d29ca568590358478.js +1 -0
  135. package/assets/esri/core/workers/chunks/6c25c929bcde7e3a2af1.js +1 -0
  136. package/assets/esri/core/workers/chunks/{7c5310e0104c22da0261.js → 6c7cb7974969e3167f2b.js} +1 -1
  137. package/assets/esri/core/workers/chunks/6c82cbcd504c711a7450.js +1 -0
  138. package/assets/esri/core/workers/chunks/{e98b785e8f4edc8bd3ff.js → 6eceeca33fac8e900d9d.js} +1 -1
  139. package/assets/esri/core/workers/chunks/7232fc11b23777b6be94.js +1 -0
  140. package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +1 -0
  141. package/assets/esri/core/workers/chunks/785206da3962ba23de16.js +1 -0
  142. package/assets/esri/core/workers/chunks/{1c70620f40be02f532b5.js → 7b169eabafcc03bfaee6.js} +1 -1
  143. package/assets/esri/core/workers/chunks/7bbc3d22383388d11345.js +1 -0
  144. package/assets/esri/core/workers/chunks/{082069f80eee0407b828.js → 7edf57e31ff07af9032b.js} +1 -1
  145. package/assets/esri/core/workers/chunks/7f2ac03efaa4a4898ba2.js +2 -0
  146. package/assets/esri/core/workers/chunks/83ed38468e316302b157.js +1 -0
  147. package/assets/esri/core/workers/chunks/85c876ee9e63d5732937.js +1 -0
  148. package/assets/esri/core/workers/chunks/8f0ecf4d06ec7b67d4ed.js +1 -0
  149. package/assets/esri/core/workers/chunks/8f1c5f5e70d4b33d021d.js +1 -0
  150. package/assets/esri/core/workers/chunks/{a1916bca1af5c65be4b0.js → 90ab3c47138875070a53.js} +1 -1
  151. package/assets/esri/core/workers/chunks/{10389c87d9c6a43363ce.js → 917dec9c004218c58950.js} +1 -1
  152. package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +1 -0
  153. package/assets/esri/core/workers/chunks/943d0026ca4d49eb3ac2.js +1 -0
  154. package/assets/esri/core/workers/chunks/982a396bd4fffa62e911.js +1 -0
  155. package/assets/esri/core/workers/chunks/98a5327fd96d9542b39f.js +1 -0
  156. package/assets/esri/core/workers/chunks/9b9a60f1e0c48aa701f0.js +1 -0
  157. package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +1 -0
  158. package/assets/esri/core/workers/chunks/9df379041e8860fe7f01.js +1 -0
  159. package/assets/esri/core/workers/chunks/{847781aefed049493444.js → 9f760dc4492a03e0504c.js} +1 -1
  160. package/assets/esri/core/workers/chunks/{013c9cc198736a72f7f2.js → 9fb46ccd4be4c3b61c31.js} +1 -1
  161. package/assets/esri/core/workers/chunks/{1e8ceb4a4b28625236e3.js → a42505b978d54d36d3b6.js} +1 -1
  162. package/assets/esri/core/workers/chunks/{bfbe6ff786435fe1e7cf.js → a86a4e550a92f770d6d5.js} +1 -1
  163. package/assets/esri/core/workers/chunks/{a34eee4c9d4c1c2b8c49.js → ab60f3bc18b5ea504f70.js} +1 -1
  164. package/assets/esri/core/workers/chunks/{18b9ec6ba7a6c0fa2ac6.js → b1880d9f5eafd50ce84b.js} +1 -1
  165. package/assets/esri/core/workers/chunks/{777fc163530448eea13e.js → b4222152efaf73b37b53.js} +1 -1
  166. package/assets/esri/core/workers/chunks/b6ca73c1384f07b30b74.js +1 -0
  167. package/assets/esri/core/workers/chunks/bb4cbf6b7c35e8c78cc7.js +1 -0
  168. package/assets/esri/core/workers/chunks/bb831d23422acfb00ae2.js +1 -0
  169. package/assets/esri/core/workers/chunks/bdcca906fdfb8e179abb.js +2 -0
  170. package/assets/esri/core/workers/chunks/c0855be20ffcd52c7026.js +1 -0
  171. package/assets/esri/core/workers/chunks/c5ceceb0683671f92efa.js +1 -0
  172. package/assets/esri/core/workers/chunks/c5e288d57bacb8451e2d.js +2 -0
  173. package/assets/esri/core/workers/chunks/{a0f742fd947104662d37.js → c6277236ec47586dca00.js} +1 -1
  174. package/assets/esri/core/workers/chunks/{3be33a129d3ae7dc4f06.js → caf38cf4d8542fb11c46.js} +1 -1
  175. package/assets/esri/core/workers/chunks/{10d33b4f248864225f85.js → cd0f5cd0fefe7f49e3d8.js} +1 -1
  176. package/assets/esri/core/workers/chunks/{b92b7d6c1e693c97a3eb.js → d1f54b0079fb71a15612.js} +1 -1
  177. package/assets/esri/core/workers/chunks/{48a53bfeef11c32dadcc.js → d25fb32a233d2128afbe.js} +1 -1
  178. package/assets/esri/core/workers/chunks/d5e3f8e5b8d2576d3cb3.js +2 -0
  179. package/assets/esri/core/workers/chunks/d629708bf23da24ee523.js +1 -0
  180. package/assets/esri/core/workers/chunks/{21d4219844ae5654618b.js → d926bffc3ff9f87e9081.js} +1 -1
  181. package/assets/esri/core/workers/chunks/db141122060d8d9b38da.js +1 -0
  182. package/assets/esri/core/workers/chunks/dc1944a7601b518a9c48.js +1 -0
  183. package/assets/esri/core/workers/chunks/{573ee2e59d26bc75201e.js → dc8670f32bb0b93c1473.js} +1 -1
  184. package/assets/esri/core/workers/chunks/e1f2b07be33e33117313.js +1 -0
  185. package/assets/esri/core/workers/chunks/e52f30dfb7c82491a7f2.js +1 -0
  186. package/assets/esri/core/workers/chunks/e5906b28b981199fd489.js +1 -0
  187. package/assets/esri/core/workers/chunks/{b3293ee9f221423a6825.js → e611e452f04a9ce64cf8.js} +1 -1
  188. package/assets/esri/core/workers/chunks/e755075ac2e02e881fad.js +1 -0
  189. package/assets/esri/core/workers/chunks/{058d4c927486a361e633.js → ea9e770efc85594e4dd2.js} +1 -1
  190. package/assets/esri/core/workers/chunks/{0f20c458f873564faff2.js → ec4f887153c24ab83f2c.js} +1 -1
  191. package/assets/esri/core/workers/chunks/{707b4ae689c4329cad3b.js → f40ceb5e03c699605302.js} +1 -1
  192. package/assets/esri/core/workers/chunks/{547a073c789fdfb78310.js → f42243c62dd0b6993816.js} +1 -1
  193. package/assets/esri/core/workers/chunks/{a49147203e55609630cc.js → f453dc4a075d2f900c7d.js} +1 -1
  194. package/assets/esri/core/workers/chunks/f465fb26541372fdc908.js +2 -0
  195. package/assets/esri/core/workers/chunks/f91cab9904020cf25d50.js +1 -0
  196. package/assets/esri/core/workers/chunks/f9b29d2ce1cd31c0fce1.js +1 -0
  197. package/assets/esri/core/workers/chunks/fdf5ceffec9d5185953d.js +1 -0
  198. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +1 -0
  199. package/assets/esri/themes/base/widgets/_Bookmarks.scss +1 -0
  200. package/assets/esri/themes/dark/main.css +1 -1
  201. package/assets/esri/themes/light/main.css +1 -1
  202. package/assets/esri/themes/light/view.css +1 -1
  203. package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
  204. package/chunks/ChapmanAtmosphere.glsl.js +1 -1
  205. package/chunks/Component.glsl.js +57 -56
  206. package/chunks/DeepSky.glsl.js +1 -1
  207. package/chunks/DefaultMaterial.glsl.js +19 -23
  208. package/chunks/FocusArea.glsl.js +1 -1
  209. package/chunks/GaussianSplat.glsl.js +13 -11
  210. package/chunks/GaussianSplatDepth.glsl.js +3 -3
  211. package/chunks/GlobalIllumination.glsl.js +1 -1
  212. package/chunks/Haze.glsl.js +1 -1
  213. package/chunks/Path.glsl.js +21 -24
  214. package/chunks/RealisticTree.glsl.js +42 -41
  215. package/chunks/RibbonLine.glsl.js +72 -61
  216. package/chunks/SimpleAtmosphere.glsl.js +1 -1
  217. package/chunks/Terrain.glsl.js +25 -25
  218. package/chunks/Water.glsl.js +4 -4
  219. package/config.js +1 -1
  220. package/core/units.js +1 -1
  221. package/geometry/Extent.js +1 -1
  222. package/geometry/operators/affineTransformOperator.d.ts +9 -3
  223. package/geometry/operators/affineTransformOperator.js +1 -1
  224. package/geometry/operators/alphaShapeOperator.d.ts +14 -4
  225. package/geometry/operators/alphaShapeOperator.js +1 -1
  226. package/geometry/operators/areaOperator.d.ts +11 -3
  227. package/geometry/operators/areaOperator.js +1 -1
  228. package/geometry/operators/autoCompleteOperator.d.ts +6 -2
  229. package/geometry/operators/autoCompleteOperator.js +1 -1
  230. package/geometry/operators/boundaryOperator.d.ts +9 -3
  231. package/geometry/operators/boundaryOperator.js +1 -1
  232. package/geometry/operators/bufferOperator.d.ts +19 -5
  233. package/geometry/operators/bufferOperator.js +1 -1
  234. package/geometry/operators/centroidOperator.d.ts +6 -2
  235. package/geometry/operators/centroidOperator.js +1 -1
  236. package/geometry/operators/clipOperator.d.ts +9 -3
  237. package/geometry/operators/clipOperator.js +1 -1
  238. package/geometry/operators/containsOperator.d.ts +9 -3
  239. package/geometry/operators/containsOperator.js +1 -1
  240. package/geometry/operators/convexHullOperator.d.ts +17 -5
  241. package/geometry/operators/convexHullOperator.js +1 -1
  242. package/geometry/operators/crossesOperator.d.ts +9 -3
  243. package/geometry/operators/crossesOperator.js +1 -1
  244. package/geometry/operators/cutOperator.d.ts +6 -2
  245. package/geometry/operators/cutOperator.js +1 -1
  246. package/geometry/operators/densifyOperator.d.ts +14 -4
  247. package/geometry/operators/densifyOperator.js +1 -1
  248. package/geometry/operators/differenceOperator.d.ts +9 -3
  249. package/geometry/operators/differenceOperator.js +1 -1
  250. package/geometry/operators/disjointOperator.d.ts +9 -3
  251. package/geometry/operators/disjointOperator.js +1 -1
  252. package/geometry/operators/distanceOperator.d.ts +11 -3
  253. package/geometry/operators/distanceOperator.js +1 -1
  254. package/geometry/operators/equalsOperator.d.ts +9 -3
  255. package/geometry/operators/equalsOperator.js +1 -1
  256. package/geometry/operators/extendOperator.d.ts +11 -3
  257. package/geometry/operators/extendOperator.js +1 -1
  258. package/geometry/operators/generalizeOperator.d.ts +14 -4
  259. package/geometry/operators/generalizeOperator.js +1 -1
  260. package/geometry/operators/geodesicBufferOperator.d.ts +25 -7
  261. package/geometry/operators/geodesicBufferOperator.js +1 -1
  262. package/geometry/operators/geodesicProximityOperator.d.ts +28 -8
  263. package/geometry/operators/geodesicProximityOperator.js +1 -1
  264. package/geometry/operators/geodeticAreaOperator.d.ts +17 -5
  265. package/geometry/operators/geodeticAreaOperator.js +1 -1
  266. package/geometry/operators/geodeticDensifyOperator.d.ts +20 -6
  267. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  268. package/geometry/operators/geodeticDistanceOperator.d.ts +17 -5
  269. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  270. package/geometry/operators/geodeticLengthOperator.d.ts +17 -5
  271. package/geometry/operators/geodeticLengthOperator.js +1 -1
  272. package/geometry/operators/geodeticUtilsOperator.d.ts +17 -5
  273. package/geometry/operators/geodeticUtilsOperator.js +1 -1
  274. package/geometry/operators/graphicBufferOperator.d.ts +11 -3
  275. package/geometry/operators/graphicBufferOperator.js +1 -1
  276. package/geometry/operators/integrateOperator.d.ts +6 -2
  277. package/geometry/operators/integrateOperator.js +1 -1
  278. package/geometry/operators/intersectionOperator.d.ts +12 -4
  279. package/geometry/operators/intersectionOperator.js +1 -1
  280. package/geometry/operators/intersectsOperator.d.ts +9 -3
  281. package/geometry/operators/intersectsOperator.js +1 -1
  282. package/geometry/operators/isNearOperator.d.ts +11 -3
  283. package/geometry/operators/isNearOperator.js +1 -1
  284. package/geometry/operators/json/bufferOperator.js +1 -1
  285. package/geometry/operators/json/containsOperator.js +1 -1
  286. package/geometry/operators/json/convexHullOperator.js +1 -1
  287. package/geometry/operators/json/crossesOperator.js +1 -1
  288. package/geometry/operators/json/disjointOperator.js +1 -1
  289. package/geometry/operators/json/generalizeOperator.js +1 -1
  290. package/geometry/operators/json/geodesicBufferOperator.js +1 -1
  291. package/geometry/operators/json/graphicBufferOperator.js +1 -1
  292. package/geometry/operators/json/intersectionOperator.js +1 -1
  293. package/geometry/operators/json/intersectsOperator.js +1 -1
  294. package/geometry/operators/json/lengthOperator.js +1 -1
  295. package/geometry/operators/json/offsetOperator.js +1 -1
  296. package/geometry/operators/json/overlapsOperator.js +1 -1
  297. package/geometry/operators/json/projectOperator.js +1 -1
  298. package/geometry/operators/json/simplifyOperator.js +1 -1
  299. package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
  300. package/geometry/operators/json/touchesOperator.js +1 -1
  301. package/geometry/operators/json/unionOperator.js +1 -1
  302. package/geometry/operators/json/withinOperator.js +1 -1
  303. package/geometry/operators/labelPointOperator.d.ts +9 -3
  304. package/geometry/operators/labelPointOperator.js +1 -1
  305. package/geometry/operators/lengthOperator.d.ts +11 -3
  306. package/geometry/operators/lengthOperator.js +1 -1
  307. package/geometry/operators/linesToPolygonsOperator.d.ts +6 -2
  308. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  309. package/geometry/operators/locateBetweenOperator.d.ts +6 -2
  310. package/geometry/operators/locateBetweenOperator.js +1 -1
  311. package/geometry/operators/minimumBoundingCircleOperator.d.ts +14 -4
  312. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  313. package/geometry/operators/multiPartToSinglePartOperator.d.ts +11 -3
  314. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  315. package/geometry/operators/offsetOperator.d.ts +14 -4
  316. package/geometry/operators/offsetOperator.js +1 -1
  317. package/geometry/operators/overlapsOperator.d.ts +9 -3
  318. package/geometry/operators/overlapsOperator.js +1 -1
  319. package/geometry/operators/polygonOverlayOperator.d.ts +11 -3
  320. package/geometry/operators/polygonOverlayOperator.js +1 -1
  321. package/geometry/operators/polygonSlicerOperator.d.ts +22 -6
  322. package/geometry/operators/polygonSlicerOperator.js +1 -1
  323. package/geometry/operators/projectOperator.d.ts +15 -5
  324. package/geometry/operators/projectOperator.js +1 -1
  325. package/geometry/operators/proximityOperator.d.ts +22 -6
  326. package/geometry/operators/proximityOperator.js +1 -1
  327. package/geometry/operators/relateOperator.d.ts +12 -4
  328. package/geometry/operators/relateOperator.js +1 -1
  329. package/geometry/operators/reshapeOperator.d.ts +6 -2
  330. package/geometry/operators/reshapeOperator.js +1 -1
  331. package/geometry/operators/shapePreservingProjectOperator.d.ts +20 -6
  332. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  333. package/geometry/operators/simplifyOGCOperator.d.ts +3 -1
  334. package/geometry/operators/simplifyOGCOperator.js +1 -1
  335. package/geometry/operators/simplifyOperator.d.ts +12 -4
  336. package/geometry/operators/simplifyOperator.js +1 -1
  337. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  338. package/geometry/operators/support/deprecatedOperator.js +2 -0
  339. package/geometry/operators/symmetricDifferenceOperator.d.ts +9 -3
  340. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  341. package/geometry/operators/touchesOperator.d.ts +9 -3
  342. package/geometry/operators/touchesOperator.js +1 -1
  343. package/geometry/operators/unionOperator.d.ts +9 -3
  344. package/geometry/operators/unionOperator.js +1 -1
  345. package/geometry/operators/withinOperator.d.ts +9 -3
  346. package/geometry/operators/withinOperator.js +1 -1
  347. package/geometry/support/heightModelInfoUtils.js +1 -1
  348. package/geometry/support/intersectsBase.js +1 -1
  349. package/geometry/support/normalizeUtils.js +1 -1
  350. package/kernel.js +1 -1
  351. package/layers/GaussianSplatLayer.js +1 -1
  352. package/layers/ImageryTileLayer.js +1 -1
  353. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  354. package/layers/IntegratedMeshLayer.js +1 -1
  355. package/layers/SceneLayer.js +1 -1
  356. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  357. package/layers/list/BasemapItemCollection.d.ts +40 -14
  358. package/layers/list/BasemapItemCollection.js +1 -1
  359. package/layers/list/CatalogItemCollection.d.ts +29 -11
  360. package/layers/list/CatalogItemCollection.js +1 -1
  361. package/layers/list/Item.d.ts +66 -122
  362. package/layers/list/Item.js +1 -1
  363. package/layers/list/ItemPanel.d.ts +23 -34
  364. package/layers/list/LayerItemCollection.d.ts +33 -43
  365. package/layers/list/LayerItemCollection.js +1 -1
  366. package/layers/list/TableItem.d.ts +42 -53
  367. package/layers/list/TableItem.js +1 -1
  368. package/layers/list/TableItemCollection.d.ts +25 -55
  369. package/layers/list/TableItemCollection.js +1 -1
  370. package/layers/list/TableItemPanel.d.ts +25 -23
  371. package/layers/list/support/layerListUtils.js +1 -1
  372. package/layers/list/types.d.ts +158 -37
  373. package/layers/mixins/TiledImagery.d.ts +6 -0
  374. package/layers/mixins/TiledImagery.js +1 -1
  375. package/layers/raster/datasets/ImageServerRaster.js +1 -1
  376. package/layers/raster/datasets/RasterFactory.js +1 -1
  377. package/layers/support/ElevationQuery.js +1 -1
  378. package/layers/support/FeatureFilter.d.ts +2 -1
  379. package/layers/support/FeatureFilter.js +1 -1
  380. package/layers/support/domainUtils.d.ts +2 -0
  381. package/layers/support/domainUtils.js +1 -1
  382. package/layers/support/fieldUtils.d.ts +10 -0
  383. package/layers/support/fieldUtils.js +1 -1
  384. package/package.json +6 -6
  385. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +0 -1
  386. package/support/revision.js +1 -1
  387. package/symbols/LineStyleMarker3D.d.ts +3 -4
  388. package/symbols/LineSymbol3D.d.ts +19 -2
  389. package/symbols/LineSymbol3D.js +1 -1
  390. package/symbols/LineSymbol3DLayer.d.ts +22 -9
  391. package/symbols/Symbol3DLayer.d.ts +1 -1
  392. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  393. package/symbols/cim/CIMSymbolHelper.js +1 -1
  394. package/symbols/cim/OverrideHelper.js +1 -1
  395. package/symbols/cim/Rasterizer.js +1 -1
  396. package/symbols/cim/cimAnalyzer.js +1 -1
  397. package/symbols/cim/dashUtils.js +2 -0
  398. package/symbols/cim/effects/EffectDashes.js +1 -1
  399. package/symbols/cim/fromCIMFontStyle.js +2 -0
  400. package/symbols/cim/richTextUtils.js +1 -1
  401. package/symbols/cim/utils.js +1 -1
  402. package/symbols/patterns/LinePattern3D.d.ts +10 -4
  403. package/symbols/patterns/LinePattern3D.js +1 -1
  404. package/symbols/patterns/LineTemplatePattern3D.d.ts +48 -0
  405. package/symbols/patterns/LineTemplatePattern3D.js +2 -0
  406. package/symbols/patterns/utils.js +1 -1
  407. package/symbols/support/Symbol3DOutline.js +1 -1
  408. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  409. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  410. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  411. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  412. package/views/2d/engine/webgl/TextureManager.js +1 -1
  413. package/views/2d/engine/webgl/decorGlyphRect.js +2 -0
  414. package/views/2d/engine/webgl/definitions.js +1 -1
  415. package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
  416. package/views/2d/engine/webgl/effects/highlight/MultiHighlightGradient.js +1 -1
  417. package/views/2d/engine/webgl/hashMosaic.js +2 -0
  418. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  419. package/views/2d/engine/webgl/shaderGraph/techniques/animated/clipping.js +2 -0
  420. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  421. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  422. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHighlight.js +1 -1
  423. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  424. package/views/2d/input/MapViewInputManager.js +1 -1
  425. package/views/2d/input/handlers/KeyPan.js +1 -1
  426. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  427. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  428. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  429. package/views/2d/layers/LayerView2D.js +1 -1
  430. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  431. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  432. package/views/2d/layers/RouteLayerView2D.js +1 -1
  433. package/views/2d/layers/TileLayerView2D.js +1 -1
  434. package/views/2d/layers/features/FeatureContainer.js +1 -1
  435. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  436. package/views/2d/layers/features/Processor.js +1 -1
  437. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  438. package/views/2d/layers/features/processor/AggregateStrategy.js +1 -1
  439. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  440. package/views/2d/layers/features/processor/bins/BinLevelState.js +1 -1
  441. package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +1 -1
  442. package/views/2d/layers/features/processor/tracks/TrackLevelState.js +1 -1
  443. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  444. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  445. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  446. package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
  447. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  448. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  449. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  450. package/views/2d/layers/support/FilterSchema.js +2 -0
  451. package/views/2d/layers/support/HighlightRegistry.js +2 -0
  452. package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
  453. package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
  454. package/views/2d/layers/support/util.js +1 -1
  455. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  456. package/views/3d/input/SceneInputManager.js +1 -1
  457. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  458. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  459. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  460. package/views/3d/layers/I3SMeshView3D.js +1 -1
  461. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  462. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  463. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  464. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  465. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  466. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  467. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  468. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  469. package/views/3d/navigation/Navigation3D.d.ts +16 -0
  470. package/views/3d/navigation/Navigation3D.js +2 -0
  471. package/views/3d/navigation/modes/DefaultNavigationMode3D.d.ts +4 -0
  472. package/views/3d/navigation/modes/DefaultNavigationMode3D.js +2 -0
  473. package/views/3d/navigation/modes/GroundNavigationMode3D.d.ts +4 -0
  474. package/views/3d/navigation/modes/GroundNavigationMode3D.js +2 -0
  475. package/views/3d/navigation/modes/NavigationMode3D.d.ts +4 -0
  476. package/views/3d/navigation/modes/NavigationMode3D.js +2 -0
  477. package/views/3d/navigation/modes/NavigationMode3DUnion.d.ts +5 -0
  478. package/views/3d/state/ConstraintsManager.js +1 -1
  479. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  480. package/views/3d/support/MemoryController.js +1 -1
  481. package/views/3d/support/QualityProfile.js +1 -1
  482. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  483. package/views/3d/support/hitTest.js +1 -1
  484. package/views/3d/terrain/ExtentHelper.js +1 -1
  485. package/views/3d/webgl-engine/collections/Component/ComponentDrawParameters.js +1 -1
  486. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  487. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  488. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +3 -3
  489. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  490. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +4 -4
  491. package/views/3d/webgl-engine/core/shaderLibrary/output/getEmissions.glsl.js +2 -2
  492. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +57 -58
  493. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +5 -3
  494. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  495. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +7 -6
  496. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +3 -3
  497. package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +5 -10
  498. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +10 -48
  499. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +16 -22
  500. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -6
  501. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +5 -3
  502. package/views/3d/webgl-engine/core/shaderLibrary/shading/pbrGlobals.glsl.js +19 -0
  503. package/views/3d/webgl-engine/core/shaderLibrary/shading/pbrShadingInfo.glsl.js +24 -0
  504. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  505. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +2 -2
  506. package/views/3d/webgl-engine/effects/AmbientIllumination.js +2 -0
  507. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  508. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  509. package/views/3d/webgl-engine/effects/glow/BlurEmission.js +1 -1
  510. package/views/3d/webgl-engine/effects/snowcover/SnowCover.glsl.js +4 -4
  511. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  512. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  513. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  514. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  515. package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
  516. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  517. package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
  518. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  519. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  520. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  521. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  522. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  523. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  524. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  525. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  526. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  527. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  528. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  529. package/views/3d/webgl-engine/materials/VisualVariablePassParameters.js +1 -1
  530. package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
  531. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  532. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  533. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  534. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +23 -22
  535. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  536. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  537. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  538. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  539. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechniqueConfiguration.js +1 -1
  540. package/views/MapView.d.ts +1 -0
  541. package/views/PopupView.js +1 -1
  542. package/views/SceneView.d.ts +1 -0
  543. package/views/SceneView.js +1 -1
  544. package/views/View.js +1 -1
  545. package/views/layers/FeatureLikeLayerView.js +1 -1
  546. package/views/support/DefaultsFromMap.js +1 -1
  547. package/widgets/BasemapLayerList.js +1 -1
  548. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
  549. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  550. package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.js +1 -1
  551. package/widgets/BatchAttributeForm.js +1 -1
  552. package/widgets/Bookmarks.js +1 -1
  553. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  554. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  555. package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
  556. package/widgets/LayerList/LayerListViewModel.js +1 -1
  557. package/widgets/LayerList/ListItem.d.ts +4 -0
  558. package/widgets/LayerList/ListItemPanel.d.ts +3 -0
  559. package/widgets/OrientedImageryViewer/types.d.ts +2 -2
  560. package/widgets/OrientedImageryViewer.d.ts +20 -1
  561. package/widgets/OrientedImageryViewer.js +1 -1
  562. package/widgets/Search/LocatorSearchSource.d.ts +4 -3
  563. package/widgets/Sketch/SketchViewModel.js +1 -1
  564. package/widgets/support/forms/formUtils.d.ts +5 -0
  565. package/widgets/support/forms/formUtils.js +1 -1
  566. package/widgets/support/forms/types.d.ts +7 -1
  567. package/widgets/support/iconUtils.js +1 -1
  568. package/assets/esri/core/workers/chunks/03601be8b0763f82e88f.js +0 -1
  569. package/assets/esri/core/workers/chunks/075eb62465edb9cbf907.js +0 -1
  570. package/assets/esri/core/workers/chunks/0bff8d589312be6588fe.js +0 -1
  571. package/assets/esri/core/workers/chunks/0de90b1ad8118457fd5a.js +0 -1
  572. package/assets/esri/core/workers/chunks/0e1a067ab243900d0371.js +0 -1
  573. package/assets/esri/core/workers/chunks/0ee6109e6578395a7900.js +0 -1
  574. package/assets/esri/core/workers/chunks/0ee7376c29e0fd8f676c.js +0 -1
  575. package/assets/esri/core/workers/chunks/0ff13f7a18b0123d253e.js +0 -1
  576. package/assets/esri/core/workers/chunks/1082bb0858585bd4fa21.js +0 -2
  577. package/assets/esri/core/workers/chunks/13551987fbeaae154df8.js +0 -1
  578. package/assets/esri/core/workers/chunks/19ac6f4664f97fb3821c.js +0 -1
  579. package/assets/esri/core/workers/chunks/1ec01fd6330d011c76d6.js +0 -1
  580. package/assets/esri/core/workers/chunks/262052dfaec3af8a58b9.js +0 -1
  581. package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +0 -1
  582. package/assets/esri/core/workers/chunks/2e2349387a2b9903f13c.js +0 -2
  583. package/assets/esri/core/workers/chunks/307297e025eed110095f.js +0 -1
  584. package/assets/esri/core/workers/chunks/33422dca6f4bcaa0ea74.js +0 -1
  585. package/assets/esri/core/workers/chunks/33e583166ab3943ecf0e.js +0 -1
  586. package/assets/esri/core/workers/chunks/349e9f3d3e3267d02988.js +0 -1
  587. package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +0 -1
  588. package/assets/esri/core/workers/chunks/3daddcb106a7009c5a70.js +0 -1
  589. package/assets/esri/core/workers/chunks/3de6e54b6ed0feae1940.js +0 -1
  590. package/assets/esri/core/workers/chunks/3ffc852db1a820ed143b.js +0 -1
  591. package/assets/esri/core/workers/chunks/411bbdecba340df11d95.js +0 -2
  592. package/assets/esri/core/workers/chunks/4490dd8bae0dd2769d99.js +0 -1
  593. package/assets/esri/core/workers/chunks/476535cfb06ced74d611.js +0 -2
  594. package/assets/esri/core/workers/chunks/4c088c26d5d546c95c90.js +0 -1
  595. package/assets/esri/core/workers/chunks/54bb3678570ca032f051.js +0 -1
  596. package/assets/esri/core/workers/chunks/56163189fbe63aa11e94.js +0 -1
  597. package/assets/esri/core/workers/chunks/571cf99c3eab8e517542.js +0 -1
  598. package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +0 -1
  599. package/assets/esri/core/workers/chunks/58e4aecabca047f1d229.js +0 -1
  600. package/assets/esri/core/workers/chunks/5c8f423812a23c02c1fd.js +0 -1
  601. package/assets/esri/core/workers/chunks/5e56a004b4407b8066eb.js +0 -1
  602. package/assets/esri/core/workers/chunks/5eb726317b6602f1e206.js +0 -1
  603. package/assets/esri/core/workers/chunks/6010799e05d239073de0.js +0 -1
  604. package/assets/esri/core/workers/chunks/69921d068add041b5dcb.js +0 -1
  605. package/assets/esri/core/workers/chunks/6df29716f75696434807.js +0 -1
  606. package/assets/esri/core/workers/chunks/6e2075bd4832ff0db68c.js +0 -1
  607. package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +0 -1
  608. package/assets/esri/core/workers/chunks/7737ab739eba6d81282d.js +0 -1
  609. package/assets/esri/core/workers/chunks/7d9468e38f3bf006f86e.js +0 -1
  610. package/assets/esri/core/workers/chunks/7efc51324cfc8e08c756.js +0 -1
  611. package/assets/esri/core/workers/chunks/84dc2afd89263a311b81.js +0 -1
  612. package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +0 -1
  613. package/assets/esri/core/workers/chunks/a322afbb48898ce35851.js +0 -1
  614. package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +0 -1
  615. package/assets/esri/core/workers/chunks/b7809ef3e1dabd921339.js +0 -1
  616. package/assets/esri/core/workers/chunks/b82b523b6837ed1f28d3.js +0 -2
  617. package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +0 -1
  618. package/assets/esri/core/workers/chunks/be69e2dda75b079362b2.js +0 -1
  619. package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +0 -1
  620. package/assets/esri/core/workers/chunks/c18de0f6cbeecee4ce34.js +0 -1
  621. package/assets/esri/core/workers/chunks/c7b762bae945f383c723.js +0 -1
  622. package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +0 -1
  623. package/assets/esri/core/workers/chunks/d33d08cb6856cd2eb35e.js +0 -1
  624. package/assets/esri/core/workers/chunks/e688e6e816824b53a25e.js +0 -1
  625. package/assets/esri/core/workers/chunks/ea068c797e3e462f4518.js +0 -1
  626. package/assets/esri/core/workers/chunks/eaf1d38f09744b7e84f5.js +0 -1
  627. package/assets/esri/core/workers/chunks/ef24fd6c0322e5de9fdf.js +0 -2
  628. package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +0 -1
  629. package/assets/esri/core/workers/chunks/f5e8ccbd6b4c0a386903.js +0 -1
  630. package/assets/esri/core/workers/chunks/f60d5ce49c173d5381ec.js +0 -1
  631. package/assets/esri/core/workers/chunks/f834aa732c3f06525089.js +0 -1
  632. package/assets/esri/core/workers/chunks/f9e5740b05de24ba81be.js +0 -1
  633. package/assets/esri/core/workers/chunks/fae14e30fa7d81bf706e.js +0 -1
  634. package/assets/esri/core/workers/chunks/fb6f1b562ee0983c8c6e.js +0 -1
  635. package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +0 -1
  636. package/assets/esri/core/workers/chunks/fc622f9e33e3b48113c8.js +0 -1
  637. package/views/2d/engine/webgl/Utils.js +0 -2
  638. package/views/2d/layers/support/HighlightCounter.js +0 -2
  639. /package/assets/esri/core/workers/chunks/{476535cfb06ced74d611.js.LICENSE.txt → 430802108b63194b7ddd.js.LICENSE.txt} +0 -0
  640. /package/assets/esri/core/workers/chunks/{b82b523b6837ed1f28d3.js.LICENSE.txt → 7f2ac03efaa4a4898ba2.js.LICENSE.txt} +0 -0
  641. /package/assets/esri/core/workers/chunks/{ef24fd6c0322e5de9fdf.js.LICENSE.txt → bdcca906fdfb8e179abb.js.LICENSE.txt} +0 -0
  642. /package/assets/esri/core/workers/chunks/{1082bb0858585bd4fa21.js.LICENSE.txt → c5e288d57bacb8451e2d.js.LICENSE.txt} +0 -0
  643. /package/assets/esri/core/workers/chunks/{2e2349387a2b9903f13c.js.LICENSE.txt → d5e3f8e5b8d2576d3cb3.js.LICENSE.txt} +0 -0
  644. /package/assets/esri/core/workers/chunks/{411bbdecba340df11d95.js.LICENSE.txt → f465fb26541372fdc908.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8659,8768],{66344(e,t,i){i.d(t,{q:()=>n});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,o){t=e.id+t;const n=this._db.get(t);if(n&&(this._size-=n.size,e.size-=n.size,this._db.delete(t),n.entry!==i&&this._notifyRemove(t,n.entry,n.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const a=1+Math.max(o,-4)- -3;this._db.set(t,new l(i,s,a)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){const e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._clients.forEach(i=>{const{id:s,name:l}=i;if(r.startsWith(s)){const i=t[l]||0;t[l]=i+e.size}})});const r={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._clients.get(e.split(o)[0])?.removeFunc,l=s?.(t,r,i);return"number"==typeof l?l:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[l,n]of this._db)if(0===n.lifetime&&(!r||l.startsWith(r))){const r=t??this._clients.get(l.split(o)[0]);if(this._purgeItem(l,n,r),i.size<=.9*e)return;s||=this._db.has(l)}}for(const[s,l]of this._db)if(!r||s.startsWith(r)){const r=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,l,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class l{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class n{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new s(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>y,Ke:()=>d,QA:()=>f,Tj:()=>u,UT:()=>m,aD:()=>v,jJ:()=>h});var r=i(32198),s=i(69622),l=i(97768),o=i(17676),n=i(10107),a=i(64108);function h(e,t,i){return(0,o.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function u(e,t,i){return(await(0,o.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function p(e){return{ok:!1,error:e}}async function d(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return p(e)}}async function y(e){try{return c(await e)}catch(e){return(0,o.QP)(e),p(e)}}function f(e){if(!0===e.ok)return e.value;throw e.error}function m(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,l.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=p(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,l.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,n.MZ)()],g.prototype,"value",null),(0,r.Cg)([(0,n.MZ)()],g.prototype,"error",null),(0,r.Cg)([(0,n.MZ)()],g.prototype,"finished",null),(0,r.Cg)([(0,n.MZ)()],g.prototype,"promise",void 0),(0,r.Cg)([(0,n.MZ)()],g.prototype,"_result",void 0),g=(0,r.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],g);class v{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},90629(e,t,i){i.d(t,{Lz:()=>s,PN:()=>l,cr:()=>o,gs:()=>a,r_:()=>h,tc:()=>n}),i(39829);const r=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function s(e){return e?e/72*96:0}function l(e){return e?72*e/96:0}function o(e){if("string"==typeof e){const t=e.match(r);if(t){const i=Number(t[1]),r=t[3]&&t[3].toLowerCase(),s=e.startsWith("-"),o="px"===r?l(i):i;return s?-o:o}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function n(e=0,t=0){return{x:e,y:t}}function a(e=0,t=0){return[e,t]}function h(e=0,t=0,i=0){return[e,t,i]}},83027(e,t,i){const r=i(29953).ho;i.d(t,["h",0,r])},48526(e,t,i){i.d(t,{A:()=>m});var r,s=i(32198),l=i(4576),o=i(4718),n=i(91429),a=i(5443),h=i(91075),u=i(86738),c=i(16930),p=i(90634),d=i(47610),y=i(56993),f=i(43937);let m=r=class extends h.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:i,hasZ:r,spatialReference:s}=e;switch(t??=[],t?.at(0)?.length){case 4:r??=!0,i??=!0;break;case 3:r??=!0!==i,i??=!r;break;default:r??=!1,i??=!1}return s??=c.A.WGS84,{...e,hasM:i,hasZ:r,points:t,spatialReference:s}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=(0,p.ge)(this);return e?new a.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,o.o8)(this.points)}clone(){const{points:e,spatialReference:t,hasM:i,hasZ:s}=this;return new r({points:(0,o.o8)(e),spatialReference:t.clone(),hasM:i,hasZ:s})}equals(e){if(this===e)return!0;if(null==e)return!1;const t=this.spatialReference,i=e.spatialReference;return null!=t==(null!=i)&&!(null!=t&&null!=i&&!t.equals(i))&&(0,l.aI)(this.points,e.points,d.v6)}addPoint(e){return(0,y.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],i={x:t[0],y:t[1],spatialReference:this.spatialReference};let r=2;return this.hasZ&&(i.z=t[2],r=3),this.hasM&&(i.m=t[r]),new u.A(i)}removePoint(e){if(!this._validateInputs(e))return null;const t=new u.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?((0,y.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,s.Cg)([(0,n.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,s.Cg)([(0,n.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,s.Cg)([(0,n.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],m.prototype,"points",void 0),(0,s.Cg)([(0,f.K)("points")],m.prototype,"writePoints",null),m=r=(0,s.Cg)([(0,n.$K)("esri.geometry.Multipoint")],m),m.prototype.toJSON.isDefaultToJSON=!0},82799(e,t,i){i.d(t,{A:()=>y});var r,s=i(32198),l=i(4718),o=i(91429),n=i(5443),a=i(91075),h=i(86738),u=i(16930),c=i(90634),p=i(56993),d=i(43937);let y=r=class extends a.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:i,hasZ:r,spatialReference:s}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:r??=!0,i??=!0;break;case 3:r??=!0!==i,i??=!r;break;default:r??=!1,i??=!1}return s??=u.A.WGS84,{...e,hasM:i,hasZ:r,paths:t,spatialReference:s}}(e)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(e,t){t.curvePaths=(0,l.o8)(e)}get extent(){const e=(0,c.Z3)(this),{spatialReference:t}=this;return e?new n.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,l.o8)(this.paths)}addPath(e){if(!e)return;const t=this.paths,i=t.length;if(function(e){return!Array.isArray(e[0])}(e)){const r=[];for(let t=0,i=e.length;t<i;t++)r[t]=e[t].toArray();t[i]=r}else t[i]=e.slice();return this.notifyChange("paths"),this}clone(){const e=new r;return e.spatialReference=this.spatialReference,e.paths=(0,l.o8)(this.paths),e.curvePaths=(0,l.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;const i=this.paths[e][t],r=this.hasZ,s=this.hasM;return r&&!s?new h.A(i[0],i[1],i[2],void 0,this.spatialReference):s&&!r?new h.A(i[0],i[1],void 0,i[2],this.spatialReference):r&&s?new h.A(i[0],i[1],i[2],i[3],this.spatialReference):new h.A(i[0],i[1],this.spatialReference)}insertPoint(e,t,i){return this._validateInputs(e,t,!0)?((0,p.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e].splice(t,0,i),this.notifyChange("paths"),this):this}removePath(e){if(!this._validateInputs(e,null))return null;const t=this.paths.splice(e,1)[0],i=this.spatialReference,r=t.map(e=>new h.A(e,i));return this.notifyChange("paths"),r}removePoint(e,t){if(!this._validateInputs(e,t))return null;const i=new h.A(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(e,t,i){return this._validateInputs(e,t)?((0,p.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e][t]=i,this.notifyChange("paths"),this):this}_validateInputs(e,t,i=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){const r=this.paths[e];if(i&&(t<0||t>r.length))return!1;if(!i&&(t<0||t>=r.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,s.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,s.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],y.prototype,"curvePaths",void 0),(0,s.Cg)([(0,d.K)("curvePaths")],y.prototype,"writeCurvePaths",null),(0,s.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,s.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],y.prototype,"paths",void 0),(0,s.Cg)([(0,d.K)("paths")],y.prototype,"writePaths",null),y=r=(0,s.Cg)([(0,o.$K)("esri.geometry.Polyline")],y),y.prototype.toJSON.isDefaultToJSON=!0},50638(e,t,i){i.r(t),i.d(t,{default:()=>be});var r=i(32198),s=i(56507),l=i(60999),o=i(4718),n=i(25728),a=i(17676),h=i(84952),u=i(91429),c=i(5443),p=i(16930),d=i(4146),y=i(52136),f=i(89186),m=i(18768),g=i(63074),v=i(69208),w=i(34287),_=i(8303),A=i(54310),S=i(25036),b=i(10873);let x=null;var C=i(49186),I=i(53966),M=i(34275);class R{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:i,data:r,json:s}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(s);if(!l||0===l.length||!r)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=s,this.width=t,this.height=i;const o=Math.max(this._maxTextureSize,4096);if(t>o||i>o){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${o} pixels}`;throw I.A.getLogger("esri.layers.support.SpriteSource").error(e),new C.A("SpriteSource",e)}let n;for(let e=0;e<r.length;e+=4)n=r[e+3]/255,r[e]=r[e]*n,r[e+1]=r[e+1]*n,r[e+2]=r[e+2]*n;this.image=r}async _getSpriteData(e,t){if("image"===e.type){let t,i;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new C.A("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,i=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new C.A("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,i=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,M.mw)(t.data)||(0,M.UR)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:i}:{...P(t),json:i}}const i=(0,h.An)(this.baseURL),r=i.query?"?"+(0,h.x0)(i.query):"",l=this._isRetina?"@2x":"",o=`${i.path}${l}.${this._spriteImageFormat}${r}`,n=`${i.path}${l}.json${r}`,[a,u]=await Promise.all([(0,s.A)(n,t),(0,s.A)(o,{responseType:"image",...t})]);return{...P(u.data),json:a.data}}}function P(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.width=e.width,t.height=e.height,i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(r.data)}}var z=i(87045),T=i(25943),O=i(21325),L=i(28735),E=i(83027);class U{constructor(e,t,i){this.tileServers=[],this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=e,this.sourceUrl=t;const r=(0,o.o8)(i),s=i.capabilities&&i.capabilities.split(",").map(e=>e.toLowerCase().trim()),l=!0===i?.exportTilesAllowed,n=!0===s?.includes("tilemap"),a=l&&i.hasOwnProperty("maxExportTilesCount")?i.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:l,supportsTileMap:n},exportTiles:l?{maxExportTilesCount:+a}:null},this.tileInfo=z.A.fromJSON(r.tileInfo),this.fullExtent=c.A.fromJSON(i.fullExtent),this.initialExtent=c.A.fromJSON(i.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return this.tilemap?this.tilemap.dataKey(e,t):e}isCompatibleWith(e){const t=this.tileInfo,i=e.tileInfo;if(!t.spatialReference.equals(i.spatialReference))return!1;if(!t.origin.equals(i.origin))return!1;if(Math.round(t.dpi)!==Math.round(i.dpi))return!1;const r=t.lods,s=i.lods,l=Math.min(r.length,s.length);for(let e=0;e<l;e++){const t=r[e],i=s[e];if(t.level!==i.level||Math.round(t.scale)!==Math.round(i.scale))return!1}return!0}}var D=i(44159);class Z extends U{static async create(e,t,i,r,s){if(!0===r.cluster)throw new Error("Clustered GeoJSON vector tile sources are not supported.");if(null==r.data)throw new Error(`GeoJSON source '${e}' must define a data property.`);const l=r.maxzoom??18,o=await(0,E.h)("GeoJSONVectorTileSourceWorker",{signal:s?.signal,strategy:"dedicated"});let n;try{n=await o.invoke("initialize",{definition:r,name:e,requestOptions:$(s)},{signal:s?.signal}),(0,a.Te)(s)}catch(e){throw o.close(),e}return new Z(e,t,i,o,r.minzoom??0,l,n.geometryTypes)}constructor(e,t,i,r,s,l,o){super(e,t,i),this._connection=r,this._minZoom=s,this._maxZoom=l,this.geometryTypes=o}destroy(){super.destroy(),this._connection?.close(),this._connection=null}async getRefKey(e,t){if((0,a.Te)(t),e.level<this._minZoom)return null;if(e.level<=this._maxZoom)return e;const i=e.level-this._maxZoom;return new D.A(this._maxZoom,e.row>>i,e.col>>i,e.world)}requestTile(e,t,i,r){return(0,a.Te)(r),this._connection?this._connection.invoke("requestTile",{col:i,level:e,row:t},r):Promise.reject((0,a.NK)())}}function $(e){if(!e)return{};const{signal:t,...i}=e;return i}class j{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this.url).then(e=>e.data.index)),this._tileIndexPromise}async dataKey(e,t){const i=await this.fetchTileIndex();return(0,a.Te)(t),this._getIndexedDataKey(i,e)}_getIndexedDataKey(e,t){const i=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let r=t;for(;0!==r.level;)r=new D.A(r.level-1,r.row>>1,r.col>>1,r.world),i.push(r);let s,l,o=e,n=i.pop();if(1===o)return n;for(;i.length;)if(s=i.pop(),l=(1&s.col)+((1&s.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=s;break}n=s,o=o[l]}return n}}var k=i(97768);class N{constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this._tileIndexUrl,{query:{...e?.query}}).then(e=>e.data.index)),this._tileIndexPromise}dataKey(e,t){const{level:i,row:r,col:s}=e,l=new D.A(e);return this._tilemap.fetchAvailabilityUpsample(i,r,s,l,t).then(()=>(l.world=e.world,l)).catch(e=>{if((0,a.zf)(e))throw e;return null})}}var K=i(91869);class F{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){(null==this._promise||(0,a.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const t=this._abortOptions;return t.push(e),(0,a.u7)(e,()=>{t.every(e=>(0,a.G4)(e))&&this._abortController.abort()}),this._promise.then(e=>(0,o.o8)(e))}async _makeRequest(e){this._abortController=new AbortController;const{data:t}=await(0,s.A)(e,{responseType:"array-buffer",signal:this._abortController.signal});return t}}const B=new Map;function G(e,t){return(0,K.tE)(B,e,()=>new F(e)).getData(t).finally(()=>B.delete(e))}class q extends U{constructor(e,t,i){super(e,t,i);const r=(0,h.An)(this.sourceUrl),s=(0,o.o8)(i),l=s.tiles;if(r)for(let e=0;e<l.length;e++){const t=(0,h.An)(l[e]);t&&((0,h.oP)(t.path)||(t.path=(0,h.fj)(r.path,t.path)),l[e]=(0,h.a6)(t.path,{...r.query,...t.query}))}this.tileServers=l;const n=i.tileMap&&r?(0,h.a6)((0,h.fj)(r.path,i.tileMap),r.query??{}):null;this.capabilities.operations.supportsTileMap?(this.type="vector-tile",this.tilemap=new N(new T.d({layer:{parsedUrl:r,tileInfo:this.tileInfo},minLOD:s.minLOD??this.tileInfo.lods[0].level,maxLOD:s.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),n)):n&&(this.tilemap=new j(n))}requestTile(e,t,i,r){return function(e,t,i,r,s){const l=(0,h.An)(e),o=l.query;if(o)for(const[e,s]of Object.entries(o))switch(s){case"{x}":o[e]=r.toString();break;case"{y}":o[e]=i.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return G((0,h.a6)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,i.toString()).replaceAll(/\{x\}/gi,r.toString()),{...l.query}),s)}(this.tileServers[t%this.tileServers.length],e,t,i,r)}}function H(...e){let t;for(const i of e)if(null!=i)if((0,h.BQ)(i)){if(t){const e=t.split("://")[0];t=e+":"+i.trim()}}else t=(0,h.oP)(i)?i:(0,h.fj)(t,i);return t?(0,h.UC)(t):void 0}async function J(e,t,i,r,l){let o,n,u;if((0,a.Te)(l),"string"==typeof i){const e=(0,h.S8)(i);u=await(0,s.A)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),u.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=i&&(u={data:i},o=i.jsonUrl||null,n=r);const c=u?.data;switch(c?.type){case"Feature":case"FeatureCollection":return e.sourceUrl=o||null,W(e,function(e){return{version:8,sprite:"",glyphs:"",sources:{geojson:{type:"geojson",data:e}},layers:[]}}(c),n,l)}if(V(c))return e.styleUrl=o||null,W(e,c,n,l);if(function(e){return!!e&&!V(e)}(c))return e.primarySourceName?ee(e,c,n,!1,t,l):(e.sourceUrl=o||null,Q(c)&&null==e.style&&(t="tilejson"),ee(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function Q(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function V(e){return!!e&&"sources"in e&&!!e.sources}async function W(e,t,i,r){const s=i?(0,h.nM)(i):(0,h.gd)(),l=null==t.layers||0===t.layers.length,o=l?{...t,layers:[]}:t;e.styleBase=s,e.style=o,"webp"===o["sprite-format"]?.toLowerCase()&&(e.spriteFormat="webp");const n=[];if(o.sources&&o.sources.esri&&"geojson"!==o.sources.esri.type){const t=o.sources.esri;t.url?await J(e,"esri",H(s,t.url),void 0,r):n.push(J(e,"esri",t,s,r))}for(const t of Object.keys(o.sources))"esri"!==t&&"tilejson"!==t&&"vector"===o.sources[t].type&&(o.sources[t].url?n.push(J(e,t,H(s,o.sources[t].url),void 0,r)):o.sources[t].tiles&&n.push(J(e,t,o.sources[t],s,r)));await Promise.all(n);for(const t of Object.keys(o.sources)){const i=o.sources[t];if("geojson"===i.type){const n=await Y(e,t,i,s,r);l&&o.layers.push(...X(t,n.geometryTypes))}}}async function Y(e,t,i,r,s){if(null==i.data)throw new Error(`GeoJSON source '${t}' must define a data property.`);const l={...i,type:"geojson",data:"string"==typeof i.data?H(r,i.data):i.data},o=ie({maxzoom:l.maxzoom,minzoom:l.minzoom},e),n=await Z.create(t,r,o,l,s);return te(e,t,i,o,n,!e.primarySourceName,r),n}function X(e,t){return t.map(t=>{switch(t){case"polygon":return{id:`${e}_polygon`,type:"fill",source:e,filter:["==","$type","Polygon"],paint:{"fill-color":"#808080"}};case"line":return{id:`${e}_line`,type:"line",source:e,filter:["==","$type","LineString"],paint:{"line-color":"#808080","line-width":1}};case"point":return{id:`${e}_point`,type:"circle",source:e,filter:["==","$type","Point"],paint:{"circle-color":"#808080","circle-radius":3}}}})}async function ee(e,t,i,r,s,l){const o=i?(0,h.UC)(i)+"/":(0,h.gd)(),n=ie(t,e);if(te(e,s,t,n,new q(s,(0,h.a6)(o,l?.query??{}),n),r,o),!Q(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?J(e,"",H(o,t.defaultStyles,"root.json"),void 0,l):J(e,"",t.defaultStyles,H(o,"root.json"),l)}if(Q(t)&&null==e.style&&n.defaultStyles)return J(e,"",n.defaultStyles,H(o,"root.json"),l)}function te(e,t,i,r,s,l,o){if(!l&&e.primarySourceName in e.sourceNameToSource){const i=e.sourceNameToSource[e.primarySourceName];if(!i.isCompatibleWith(s))return I.A.getLogger("esri.layers.support.vectorTileLayerLoader").warn(`Ignoring source '${t}' because its tiling scheme is incompatible with the primary source '${e.primarySourceName}'.`),void s.destroy();null!=s.fullExtent&&(null!=i.fullExtent?i.fullExtent.union(s.fullExtent):i.fullExtent=s.fullExtent.clone()),i.tileInfo&&s.tileInfo&&i.tileInfo.lods.length<s.tileInfo.lods.length&&(i.tileInfo=s.tileInfo)}l&&(e.sourceBase=o,e.source=i,e.validatedSource=r,e.primarySourceName=t),e.sourceNameToSource[t]=s}function ie(e,t){const i=512;if(function(e){return e.hasOwnProperty("tileInfo")}(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=i),null==t.cols&&(t.cols=i)),e}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let s,l=null;if(Q(e)){const{bounds:i,vector_layers:r}=e;if(i){const e=(0,L.Gh)({x:i[0],y:i[1],spatialReference:(0,o.o8)(O.KK)}),t=(0,L.Gh)({x:i[2],y:i[3],spatialReference:(0,o.o8)(O.KK)});l={xmin:e.x,ymin:e.y,xmax:t.x,ymax:t.y,spatialReference:(0,o.o8)(O.ch)}}if(r&&r.length>0)s={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:re(r)};else if(null==t.style)throw new Error("The TileJSON source does not contain any vector_layers. This VectorTileLayer cannot be loaded.")}null===l&&(l=r);let n=78271.51696400007,a=295828763.7957775;const h=[],u=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22;for(let e=0;e<=u;e++)h.push({level:e,scale:a,resolution:n}),n/=2,a/=2;return{capabilities:"TilesOnly",initialExtent:l,fullExtent:r,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:i,cols:i,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:h,spatialReference:(0,o.o8)(O.ch)},defaultStyles:s}}function re(e){const t=[];for(const i of e)i.geometry_type?t.push(se(i.geometry_type.toLowerCase(),i,!1)):(t.push(se("polygon",i,!0)),t.push(se("line",i,!0)),t.push(se("circle",i,!0)));return t}function se(e,t,i){const{id:r,minzoom:s,maxzoom:l}=t,o={type:"polygon"===e||"polygons"===e?"fill":"line"===e||"lines"===e?"line":"circle",id:r,source:"tilejson","source-layer":r,minzoom:s,maxzoom:l};switch(e){case"fill":i&&(o.id+="_polygon",o.filter='(["==", "$type", "Polygon"])'),o.paint={"fill-color":"#808080"};break;case"line":i&&(o.id+="_line",o.filter='(["==", "$type", "LineString"])');break;case"circle":i&&(o.id+="_point",o.filter='(["==", "$type", "Point"])')}return o}var le=i(88788),oe=i(39131),ne=i(97159),ae=i(86738),he=i(91806);const ue=1e-6;function ce(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const i=e.origin,r=t.origin;if(Math.abs(i.x-r.x)>=ue||Math.abs(i.y-r.y)>=ue)return!1;let s,l;e.lods[0].scale>t.lods[0].scale?(s=e,l=t):(l=e,s=t);for(let e=s.lods[0].scale;e>=l.lods[l.lods.length-1].scale-ue;e/=2)if(Math.abs(e-l.lods[0].scale)<ue)return!0;return!1}function pe(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const i=e.size[0],r=e.format,s=e.dpi,l=new ae.A({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],h=n.scale,u=n.resolution,c=a.scale,p=[];let d=h,y=u,f=0;for(;d>=c;)p.push(new he.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new z.A({size:[i,i],dpi:s,format:r||"pbf",origin:l,lods:p,spatialReference:o})}var de=i(45013);class ye{constructor(e){this.getUnmaskedRenderer=e}}function fe(e){const t=e.getExtension("WEBGL_debug_renderer_info");return t?new ye(()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL)):null}let me;function ge(){return me??=function(){const e=new ve,t=function(e){if("undefined"==typeof WebGL2RenderingContext)return null;const t=document.createElement("canvas");if(!t)return null;let i=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==i&&(i=t.getContext("webgl2"),null!=i&&(e.majorPerformanceCaveat=!0,e.unmaskedRenderer=fe(i)?.getUnmaskedRenderer()??"unknown")),null==i)return i;e.available=!0,e.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const r=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);return r&&(e.supportsHighPrecisionFragment=r.precision>0),i}(e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}(),me}class ve{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}var we=i(59923),_e=i(43937),Ae=i(36005);let Se=class extends((0,g.dM)((0,S.j)((0,A.J)((0,f.f)((0,m.b)((0,w.q)((0,_.A)((0,v.d)((0,y.p)((0,n.M)(d.A))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.graphicOrigin=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(a.QP).then(async()=>{if(!this.portalItem?.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,s.A)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:t},(0,le.v)(this.portalItem,"portal-item"))}).catch(a.QP).then(()=>this._loadStyle(e));return this.addResolvingPromise(t),Promise.resolve(this)}get apiKey(){return super.apiKey}set apiKey(e){super.apiKey=e}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&(0,h.An)(e.serviceUrl);if(!t)return null;const i=this._getDefaultAttribution(t.path);return i?(0,h.a6)(i,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.BQ)(e)&&(e=`https:${e}`);const i=(0,oe.py)(e);t.styleUrl=(0,ne.e)(e,i)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new z.A;if(e.length>1)for(let i=0;i<e.length;i++)ce(t,e[i].tileInfo)&&(t=pe(t,e[i].tileInfo));return t}readTilemapCache(e,t){const i=t.capabilities?.includes("Tilemap");return i?new T.d({layer:this}):null}set url(e){if(!e)return void this._set("url",e);const t=(0,h.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const i=ge().maxTextureSize,r=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new R({type:"url",spriteUrl:r,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},i);await s.load(t),this._spriteSourceMap.set(e,s)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const i=ge().maxTextureSize,r=e.spriteUrl,s=r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null;if(!s&&"url"===e.type)return null;const l=new R(e,i);try{await l.load(t);const i=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(i,l),s&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=s),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,a.QP)(e)}return null}async loadStyle(e,t){const i=e||this.style||this.url;return this._loadingTask&&"string"==typeof i&&this.url===i||(this._loadingTask?.abort(),this._loadingTask=(0,l.UT)(e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(i,{signal:e})),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,o.o8)(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const i=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const r=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:i||r})}getStyleLayer(e){return(0,o.o8)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,o.o8)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)?"visible":"none"}write(e,t){return t?.origin&&!this.styleUrl?((0,we.U4)(t,this,"style defined by JSON only are not supported"),null):super.write(e,t)}getTileUrl(e,t,i){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const i=await async function(e,t){const i={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,s]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await J(i,"esri",e,s,t),{layerDefinition:i.validatedSource,url:r,serviceUrl:i.sourceUrl,style:i.style,styleUrl:i.styleUrl,spriteUrl:i.style&&i.style.sprite&&H(i.styleBase,i.style.sprite),spriteFormat:i.spriteFormat,glyphsUrl:i.style&&i.style.glyphs&&H(i.styleBase,i.style.glyphs),sourceNameToSource:i.sourceNameToSource,primarySourceName:i.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===i.spriteFormat&&(await function(){if(x)return x;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return x=new Promise(t=>{const i=new Image;i.onload=()=>{i.onload=i.onerror=null,t(i.width>0&&i.height>0)},i.onerror=()=>{i.onload=i.onerror=null,t(!1)},i.src="data:image/webp;base64,"+e.lossy}),x}()||(i.spriteFormat="png")),this._set("currentStyleInfo",{...i}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",i.sourceNameToSource),this._set("primarySource",i.sourceNameToSource[i.primarySourceName]),this._set("styleRepository",new de.A(i.style,!1)),this.read(i.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),i=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!t)return;const r=t[2]&&t[2].toLowerCase();if(!r)return;const s=t[1]||"";for(const e of i)if(e.toLowerCase().includes(r))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${s}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"attributionDataUrl",null),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],Se.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!0,write:!0}})],Se.prototype,"blendMode",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"capabilities",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"currentStyleInfo",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},readOnly:!0,type:c.A})],Se.prototype,"fullExtent",null),(0,r.Cg)([(0,u.MZ)({json:{read:!1},readOnly:!0,type:c.A})],Se.prototype,"initialExtent",null),(0,r.Cg)([(0,u.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Se.prototype,"isReference",void 0),(0,r.Cg)([(0,u.MZ)({type:["VectorTileLayer"]})],Se.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"parsedUrl",null),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Se.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],Se.prototype,"refreshInterval",void 0),(0,r.Cg)([(0,u.MZ)()],Se.prototype,"style",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"serviceUrl",null),(0,r.Cg)([(0,u.MZ)({type:p.A,readOnly:!0})],Se.prototype,"spatialReference",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"styleRepository",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"sourceNameToSource",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"primarySource",void 0),(0,r.Cg)([(0,u.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],Se.prototype,"styleUrl",null),(0,r.Cg)([(0,_e.K)(["portal-item","web-document"],"styleUrl")],Se.prototype,"writeStyleUrl",null),(0,r.Cg)([(0,u.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.A})],Se.prototype,"tileInfo",null),(0,r.Cg)([(0,u.MZ)()],Se.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,Ae.w)("service","tilemapCache",["capabilities","tileInfo"])],Se.prototype,"readTilemapCache",null),(0,r.Cg)([(0,u.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],Se.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,clonable:!1})],Se.prototype,"graphicOrigin",void 0),(0,r.Cg)([(0,u.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}}),(0,u.MZ)(b.OZ)],Se.prototype,"url",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"version",void 0),(0,r.Cg)([(0,Ae.w)("version",["version","currentVersion"])],Se.prototype,"readVersion",null),Se=(0,r.Cg)([(0,u.$K)("esri.layers.VectorTileLayer")],Se);const be=Se},52136(e,t,i){var r=i(32198),s=i(91429);i.d(t,["p",0,e=>{const t=e;let i=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,r.Cg)([(0,s.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},89186(e,t,i){var r=i(32198),s=i(91429),l=i(16930),o=i(87045),n=i(65509),a=i(25943),h=i(36005);i.d(t,["f",0,e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const r=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:s,maxLOD:l,minScale:h,maxScale:u}=t;if(null==s&&null==l&&(0!==h||0!==u)){const e=e=>Math.round(1e4*e)/1e4;h=e(h||t.tileInfo.lods[0].scale),u=e(u||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=h?i.level:s,l=t>=u?i.level:l}}if(r)return new a.d({layer:this,minLOD:s,maxLOD:l});if(t.tileInfo){const e=new o.A;return e.read(t.tileInfo,i),new n.A(e,s,l)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:l.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:o.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}])},18768(e,t,i){var r=i(32198),s=i(53966),l=i(91429),o=i(60694);i.d(t,["b",0,e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.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,o.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,l.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISService")],i),i}])},69208(e,t,i){var r=i(32198),s=i(91429);i.d(t,["d",0,e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,r.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],i.prototype,"customParameters",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.CustomParametersMixin")],i),i}])},8303(e,t,i){var r=i(32198),s=i(92602),l=i(70333),o=i(56507),n=i(60999),a=i(49186),h=i(36563),u=i(53966),c=i(97768),p=i(17676),d=i(84952),y=i(91429),f=i(77548),m=i(20655),g=i(80812),v=i(41318),w=i(10407),_=i(36005),A=i(43937);const S={credential:null,user:null};i.d(t,["A",0,e=>{const t=e;let b=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(()=>i(41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,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 reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await i.e(1204).then(()=>i(41204)),r=new AbortController,s=(0,h.rE)(r);return this.addHandles(s,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:r.signal})}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!l.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let o,n;if(s)o=i.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,d.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(l.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,h=!1,u=!1;if(!n)return{features:{edit:a,fullEdit:h},content:{updateItem:u}};try{if(s?await i.reload():(i=new g.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:h},content:{updateItem:u}}}_getUserPrivileges(e,t){const i=(0,w.It)(e);return t&&(i.features.edit=!0),i}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?l.id?.findCredential(this.url):null;if(!t)return!0;const i=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=l.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=m.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(r))return s.user;const a=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,n.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?v.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return i&&r&&!(0,d.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,y.MZ)({type:g.default})],b.prototype,"portalItem",null),(0,r.Cg)([(0,_.w)("web-document","portalItem",["itemId"])],b.prototype,"readPortalItem",null),(0,r.Cg)([(0,A.K)("web-document","portalItem",{itemId:{type:String}})],b.prototype,"writePortalItem",null),(0,r.Cg)([(0,y.MZ)({clonable:!1})],b.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasUpdateItemPrivileges",void 0),b=(0,r.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],b),b}])},91806(e,t,i){i.d(t,{A:()=>a});var r,s=i(32198),l=i(25482),o=i(91429),n=i(78888);let a=class extends l.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"cols",void 0),(0,s.Cg)([(0,o.MZ)({type:n.jz,json:{write:!0}})],a.prototype,"level",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"levelValue",void 0),(0,s.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"origin",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"resolution",void 0),(0,s.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"rows",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"scale",void 0),a=r=(0,s.Cg)([(0,o.$K)("esri.layers.support.LOD")],a)},87045(e,t,i){i.d(t,{A:()=>w});var r,s=i(32198),l=i(66552),o=i(25482),n=i(86211),a=i(91429),h=i(78888),u=i(86738),c=i(16930),p=i(21325),d=i(28735),y=i(91806),f=i(72802),m=i(36005),g=i(43937);const v=new l.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=class extends o.o{static{r=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:l=c.A.WebMercator,numLODs:o=24}=e;if(!(0,p.fn)(l)){const e=[];if(i)for(let t=0;t<i.length;t++){const r=i[t];e.push(new y.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new y.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new u.A(0,0,l),size:[s,s],spatialReference:l})}const a=(0,p.Vp)(l),h=e.origin?new u.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):new u.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:l}:{x:0,y:0,spatialReference:l}),d=1/(39.37*(0,n.GA)(l)*96),f=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],r=t*d;f.push(new y.A({level:e,scale:t,resolution:r}))}else{let e=(0,p.EA)(l)?512/s*591657527.5917094:256/s*591657527.591555;const i=Math.ceil(o/t);f.push(new y.A({level:0,scale:e,resolution:e*d}));for(let r=1;r<i;r++){const i=e/2**t,s=i*d;f.push(new y.A({level:r,scale:i,resolution:s})),e=i}}return new r({dpi:96,lods:f,origin:h,size:[s,s],spatialReference:l})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,p.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const r=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let r=0;for(;r<i;r++){const i=t[r],s=t[r+1];if(i<=e)return r;if(s===e)return r+1;if(i>e&&s<e)return r+Math.log(i/e)/Math.log(i/s)}return r}tileAt(e,t,i,r){const s=this.lodAt(e);if(!s)return null;let l,o;if("number"==typeof t)l=t,o=i;else if((0,p.aI)(t.spatialReference,this.spatialReference))l=t.x,o=t.y,r=i;else{const e=(0,d.Cv)(t,this.spatialReference);if(null==e)return null;l=e.x,o=e.y,r=i}const n=s.resolution*this.size[0],a=s.resolution*this.size[1];return r??=new f.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-o)/a+.001),r.col=Math.floor((l-this.origin.x)/n+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const r=e.level-i.level,s=i.resolution*this.size[0]/2**r,l=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+l,!0}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:r}=i,s=r*this.size[0],l=r*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+s,e[3]=e[1]+l,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],s=this.lods.length-t;for(let e=0;e<s;e++){const r=e+t,{scale:s,resolution:l}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new y.A({level:e,scale:s,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,s.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,s.Cg)([(0,a.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,s.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,s.Cg)([(0,m.w)("origin")],w.prototype,"readOrigin",null),(0,s.Cg)([(0,a.MZ)({type:[y.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,s.Cg)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,s.Cg)([(0,m.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,s.Cg)([(0,g.K)("size",{cols:{type:h.jz},rows:{type:h.jz}})],w.prototype,"writeSize",null),(0,s.Cg)([(0,a.MZ)({type:c.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=r=(0,s.Cg)([(0,a.$K)("esri.layers.support.TileInfo")],w)},65509(e,t,i){i.d(t,{A:()=>l});var r=i(49186),s=i(17676);class l{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,l){await(0,s.NO)(l);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,r,l){await(0,s.NO)(l),r.level=e,r.row=t,r.col=i;const o=this.tileInfo;return o.updateTileInfo(r),this.fetchAvailability(e,t,i,l).catch(e=>{if((0,s.zf)(e))throw e;if(o.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e})}}},72802(e,t,i){i.d(t,{U:()=>s});var r=i(19419);class s{constructor(e,t,i,s=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=s}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new s(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>S});var r,s=i(32198),l=i(56507),o=i(69622),n=i(49186),a=i(36563),h=(i(44208),i(66344)),u=i(15142),c=i(17676),p=i(36708),d=i(76030),y=i(84952),f=i(91429),m=i(72802),g=i(4718),v=i(69397);class w{constructor(e){!function(e){if(!e?.location)throw new n.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new n.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new n.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new n.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new n.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,g.o8)(t));const r=this.location.width,s=this.location.height;let l=!0,o=!0;const a=function(e,t=!1){return e<=1024?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(r*s/32));let h=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(o=!1,a[h]|=1<<t):l=!1,31===t&&++h}o?(this._availability="unavailable",this.byteSize=40):l?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,v.Qf)(a))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,l=this._availability;return s<0||s>l.length?"unknown":l[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||l.A,{row:r,col:s,width:o,height:a}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:o,height:a},valid:!0,data:new Array(o*a).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==o||e.location.height!==a))throw new n.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:o,height:a}});return w.fromJSON(e)})}static fromJSON(e){return Object.freeze(new w(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function A(e,t,i){return new n.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let S=class extends o.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=l.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,p.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(A(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof w){const s=r.getAvailability(t,i);if("unavailable"===s)throw A(e,t,i);return s}if((0,c.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;const l=this.layer.tileInfo;l.updateTileInfo(r);const o=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,c.zf)(e))throw e;if(l.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,l){if(!this._prefetchingEnabled)return;const o=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(o))return;const n=new AbortController;l.then(()=>n.abort(),()=>n.abort());let h=!1;const u=(0,a.hA)(()=>{h||(h=!0,n.abort())});if(this.addHandles(u,o),await(0,d.md)(10,n.signal).catch(()=>{}),h||(h=!0,this.removeHandles(o)),(0,c.G4)(n))return;const p=new m.U(e,t,i),y={...s,signal:n.signal},f=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&f.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,y);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new n.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,l=this._tilemapFromCache(e,t,i,s);if(l)return Promise.resolve(l);const o=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,c.u7)(o,()=>t((0,c.NK)()));const i=_(s);let l=this._pendingTilemapRequests[i];if(!l){l=w.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=l,l.then(e,e)}l.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,y.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const s=_(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],S.prototype,"layer",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],S.prototype,"minLOD",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],S.prototype,"maxLOD",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],S.prototype,"request",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],S.prototype,"size",void 0),S=r=(0,s.Cg)([(0,f.$K)("esri.layers.support.TilemapCache")],S)},88788(e,t,i){i.d(t,{m:()=>o,v:()=>l});var r=i(84952),s=i(20655);function l(e,t){return{...n(e,t),readResourcePaths:[]}}function o(e,t,i){const s=(0,r.An)(i?.forceNewItemContext?null:e.itemUrl);return{...n(e,t,i),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:i?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(e,t,i){return{origin:t,url:(0,r.An)(i?.forceNewItemContext?null:e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}},10407(e,t,i){i.d(t,{It:()=>d,LG:()=>o,OM:()=>h,Sm:()=>u,Y:()=>n,bK:()=>a,sQ:()=>c});var r=i(99917),s=i(16930),l=i(28735);function o(e,t){if(!n(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function n(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return n(e,p.HOSTED_SERVICE)}function h(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function u(e,t,i){i?o(e,t):h(e,t)}async function c(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,l.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const p={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function d(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let l=!s||s.includes("features:user:edit"),o=!!i&&!!s?.includes("features:user:fullEdit");const n="update"===r||"admin"===r;return n?o=l=!0:o&&(l=!0),{features:{edit:l,fullEdit:o},content:{updateItem:n}}}i.d(t,["mm",0,p])},44159(e,t,i){i.d(t,{A:()=>s});var r=i(93687);class s{static{this.pool=new r.A(()=>new s(""),null,null,25,50)}static getId(e,t,i,r){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${i}/${r}`}constructor(e,t,i,r){this.set(e,t,i,r)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,i=63&this.level;return(3&this.world)<<30|t<<22|e<<8|i}acquire(e,t,i,r){this.set(e,t,i,r)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}containsChild(e){const t=e.level-this.level;return t>0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new s(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,i,r){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,i,r,s]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(i),this.col=parseFloat(r),this.world=parseFloat(s)}else this.level=+e,this.row=+t,this.col=+i,this.world=+r||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new s(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(e,t,i){const r=this.clone();return r.col+=e,r.row+=t,i.normalizeKey(r),r}getChildKeys(){const e=this.level+1,t=this.row<<1,i=this.col<<1,r=this.world;return[new s(e,t,i,r),new s(e,t,i+1,r),new s(e,t+1,i,r),new s(e,t+1,i+1,r)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}},78553(e,t,i){i.d(t,{D:()=>l,p:()=>s});var r=i(78888);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1359],{1359(e,t,n){n.d(t,{createSampler:()=>_,query:()=>E});var i=n(60999),a=n(49186),s=n(44208),o=n(97768),l=n(17676),r=n(86211),c=n(99917),u=n(19419),h=n(4576),p=n(72802);class f{constructor(e,t){this.layer=e,this.parameters=t}}class m extends f{constructor(e,t,n){super(e,n),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:n}=this.layer,i=x(t,n)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(i,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const n=t.tile?.id;t.tile=n?e[n]:null}}getTilesToFetch(){return(0,h.Am)(this.geometry.coordinates.filter(({tile:e,elevationTile:t})=>e?.id&&!t),(e,t)=>e.tile?.id===t.tile?.id).map(({tile:e})=>e)}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>t.tile=null)}}class d extends f{constructor(e,t,n,i){super(e,n),this.maskExtents=i,this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent)}selectTilesAtLOD(e,t){const n=this._maximumLodForRequests(t),i=Math.min(n,e);i<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(i)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:n}=this.layer,i=x(t,n);if(!e)return i.length-1;const a=this.extent;if(null==a)return-1;for(let n=i.length-1;n>=0;n--){const s=i[n],o=s.resolution*t.size[0],l=s.resolution*t.size[1];if(Math.ceil(a.width/o)*Math.ceil(a.height/l)<=e)return n}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const n=t.id&&e[t.id];n&&(this._fetchedCandidates.add(t),this.elevationTiles.push(n))}}remapTiles(e){this._candidateTiles=v(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const n=this._candidateTiles;this._candidateTiles=[],n.forEach(n=>{if(this._fetchedCandidates.has(n))return void t?.(n);let i=!1;e(n,()=>i=!0),i?t?.(n):this._candidateTiles.push(n)}),this._candidateTiles=v(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:n,tilemapCache:i}=this.layer,a=x(n,i)[e],s=n.tileAt(a.level,t.xmin,t.ymin),o=s.extent,l=a.resolution*n.size[0],r=a.resolution*n.size[1],c=Math.ceil((t.xmax-o[0])/l),u=Math.ceil((t.ymax-o[1])/r);for(let e=0;e<u;e++)for(let t=0;t<c;t++){const i=new p.U(s.level,s.row-e,s.col+t);n.updateTileInfo(i),this._tileIsMasked(i)||this._candidateTiles.push(i)}}_tileIsMasked(e){return this.maskExtents?.some(t=>(0,u.gR)(t,e.extent))??!1}}function y(e){return null!=e?.tileInfo}function x(e,t){const n=e.lods;if(y(t)){const{effectiveMinLOD:e,effectiveMaxLOD:i}=t;return n.filter(t=>t.level>=e&&t.level<=i)}return n}function v(e,t){const n={},i=[];for(const a of e){const e=a.id;e&&!n[e]?(n[e]=a,i.push(a)):t?.(a)}const a=i.sort((e,t)=>e.level-t.level);return a.filter((e,n)=>{for(let i=0;i<n;i++){const n=a[i].extent;if(n&&(0,u.gR)(n,e.extent))return t?.(e),!1}return!0})}class w{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class g{constructor(e,t=null){if(this.key=e,null!=t){const n=e.extent;this._samplerData=new w(t,n)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:n,data:i,dx:a,dy:s,y1:o,x0:l}=this._samplerData,{width:r,values:c,noDataValue:u}=i,h=T(s*(o-t),0,n),p=T(a*(e-l),0,n),f=Math.floor(h),m=Math.floor(p),d=f*r+m,y=d+r,x=c[d],v=c[y],w=c[d+1],g=c[y+1];if(x!==u&&v!==u&&w!==u&&g!==u){const e=p-m,t=x+(w-x)*e;return t+(v+(g-v)*e-t)*(h-f)}}}function T(e,t,n){return e<t?t:e>n?n:e}var R=n(87378),A=n(10292),D=n(57984);async function E(e,t,n){if(!e)throw new a.A(j,"Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof A.q)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new a.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const i={...b,...n},l=i.signal;if("integrated-mesh-3dtiles"===e.type){const a=A.q.fromGeometry(t);if(e.queryElevationCallback&&((0,s.A)("enable-feature:im-as-ground")?e.isUsedAsGroundLayer:e.replacesTerrain)){const s=12.9*(n?.minDemResolution||0)+.71,o=await e.queryElevationCallback(a,{signal:l,maxGeometricError:s}),r=a.coordinates.map(()=>({demResolution:1,source:e})),c=await o.project(t.spatialReference,l);if(c){if(void 0!==i.noDataValue&&i.noDataValue!==Number.MAX_VALUE)for(const e of c.coordinates)e.z===Number.MAX_VALUE&&(e.z=i.noDataValue);return{geometry:c.export(),noDataValue:i.noDataValue??Number.MAX_VALUE,sampleInfo:r}}}const o=a.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:a.export(),noDataValue:Number.MAX_VALUE,sampleInfo:o}}if("integrated-mesh"===e.type){const n=A.q.fromGeometry(t),i=n.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:n.export(),noDataValue:Number.MAX_VALUE,sampleInfo:i}}const u=new m(e,t.spatialReference,i);return await e.load({signal:l}),await async function(e,t,n){let i;const s=e.layer.tileInfo.spatialReference;if(t instanceof A.q?i=await t.project(s,n):(await(0,c.initializeProjection)([{source:t.spatialReference,dest:s}],{signal:n}),i=(0,c.project)(t,s)),!i)throw new a.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${s.wkid}'`);e.geometry=A.q.fromGeometry(i)}(u,t,l),await q(u,l),await L(u,l),function(e){e.geometry.coordinates.forEach(t=>{const n=t.elevationTile;let i=e.parameters.noDataValue;if(n){const e=n.sample(t.x,t.y);null==e?t.elevationTile=null:i=e}t.z=i})}(u),async function(e,t){const n=await e.geometry.project(e.outSpatialReference,t);(0,o.Lw)(n);const i={geometry:n.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(i.sampleInfo=function(e){const t=e.layer.tileInfo,n=(0,r.GA)(t.spatialReference);return e.geometry.coordinates.map(i=>{let a=-1;return i.elevationTile&&i.elevationTile!==e.outsideExtentTile&&(a=t.lodAt(i.elevationTile.key.level).resolution*n),{demResolution:a,source:-1===a?void 0:e.layer}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),i}(u,l)}async function _(e,t,n){if(e=Array.isArray(e)?e:[e],0===(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new a.A(j,"Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new a.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...b,...n,returnSampleInfo:!0},s=I(e[e.length-1],t,i);return 1===e.length?s:V(e,t,await s,i)}async function I(e,t,n,i){const a=n.signal;await e.load({signal:a});const s=t.spatialReference,o=e.tileInfo.spatialReference;s.equals(o)||(await(0,c.initializeProjection)([{source:s,dest:o}],{signal:a}),t=(0,c.project)(t,o));const l=new d(e,t,n,i);await q(l,a),await L(l,a);const r=l.elevationTiles,u=l.layer.tileInfo,h=l.parameters.noDataValue;return new D.C({noDataValue:h,tiles:r,tileInfo:u})}async function V(e,t,n,i){if(e.pop(),!e.length)return n;const a=n.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,u.VY)(e.extent)),s=await I(e[e.length-1],t,i,a);if(0===s.samplers.length)return n;const o=n.samplers.concat(s.samplers),l=i.noDataValue;return V(e,t,new D.C({samplers:o,noDataValue:l}),i)}async function q(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new g(new p.U(-1,-1,-1));t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;const n=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const i=e.x,a=e.y;(i<n.xmin||i>n.xmax||a<n.ymin||a>n.ymax)&&(e.elevationTile=t)})}(e);const n=e.parameters.demResolution;if("number"==typeof n)!function(e,t){const n=function(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,a=t/(0,r.GA)(n.spatialReference),s=x(n,i);let o=s[0],l=0;for(let e=1;e<s.length;e++){const t=s[e];Math.abs(t.resolution-a)<Math.abs(o.resolution-a)&&(o=t,l=e)}return l}(e,t);e.selectTilesAtLOD(n)}(e,n);else if("finest-contiguous"===n)await async function(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,a=k(n,i,e.parameters.minDemResolution);await C(e,a,t)}(e,t);else{if("auto"!==n)throw new a.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await M(e,t)}}async function C(e,t,n){const i=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const s=i.tilemapCache,o=e.getTilesToFetch();try{if(s&&!y(s))await(0,l.qr)(Promise.all(o.map(e=>s.fetchAvailability(e.level,e.row,e.col,{signal:n}))),n);else if(await L(e,n),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new a.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(i){(0,l.QP)(i),await C(e,t-1,n)}}async function M(e,t){(function(e){const{tileInfo:t,tilemapCache:n}=e.layer,i=k(t,n,e.parameters.minDemResolution);e.selectTilesAtLOD(i,e.parameters.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let n=0;const i={},a=e=>{null!=e.id&&(e.id in i?i[e.id]++:(i[e.id]=1,n++))},s=e=>{if(null==e.id)return;const t=i[e.id];1===t?(delete i[e.id],n--):i[e.id]=t-1};e.forEachTileToFetch(a,s);let o=!0;for(;o&&(o=!1,e.forEachTileToFetch(i=>{n<=e.parameters.maximumAutoTileRequests||(s(i),t.upsampleTile(i)&&(o=!0),a(i))},s),o););}(e);const n=e.layer.tilemapCache;if(!n||y(n))return z(e,t);const a=e.getTilesToFetch(),s={},o=a.map(async e=>{const a=new p.U(0,0,0),o=await(0,i.Ke)(n.fetchAvailabilityUpsample(e.level,e.row,e.col,a,{signal:t}));!1!==o.ok?null!=e.id&&(s[e.id]=a):(0,l.QP)(o.error)});await(0,l.qr)(Promise.all(o),t),e.remapTiles(s)}async function z(e,t){const n=e.layer.tileInfo;await L(e,t);let i=!1;e.forEachTileToFetch((e,t)=>{n.upsampleTile(e)?i=!0:t()}),i&&await z(e,t)}function k(e,t,n=0){const i=x(e,t);let a=i.length-1;if(n>0){const t=n/(0,r.GA)(e.spatialReference),s=i.findIndex(e=>e.resolution<t);0===s?a=0:s>0&&(a=s-1)}return a}const b={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};async function L(e,t){const n=e.getTilesToFetch(),i={},a=e.parameters.cache,s=e.parameters.noDataValue,o={noDataValue:s,signal:t},r=n.map(async t=>{if(null==t.id)return;const n=`${e.layer.uid}:${t.id}:${s}`,l=a?.get(n),r=l??R.A.from(await e.layer.fetchTile(t.level,t.row,t.col,o));a?.put(n,r),i[t.id]=new g(t,r)});await(0,l.qr)(Promise.allSettled(r),t),e.populateElevationTiles(i)}const j="elevation-query:invalid-layer"},7236(e,t,n){n.d(t,{A:()=>c});var i=n(32198),a=n(65529),s=n(53966),o=n(91429),l=n(86738),r=n(28735);let c=class extends a.nJ{queryElevation(e){const t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;switch(e.type){case"point":return function(e,t,n){return e.hasZ=!0,e.z=n.elevationAt(t.x,t.y),e}(e,t,this);case"polyline":return function(e,t,n){u.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let a=0;a<e.paths.length;a++){const s=e.paths[a],o=t.paths[a];for(let e=0;e<s.length;e++){const t=s[e],a=o[e];u.x=a[0],u.y=a[1],i&&(t[3]=t[2]),t[2]=n.elevationAt(u.x,u.y)}}return e.hasZ=!0,e}(e,t,this);case"multipoint":return function(e,t,n){u.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let a=0;a<e.points.length;a++){const s=e.points[a],o=t.points[a];u.x=o[0],u.y=o[1],i&&(s[3]=s[2]),s[2]=n.elevationAt(u.x,u.y)}return e.hasZ=!0,e}(e,t,this);default:return null}}projectIfRequired(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const i=(0,r.Cv)(e,t);return i||s.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),i}};c=(0,i.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],c);const u=new l.A},10292(e,t,n){n.d(t,{q:()=>l});var i=n(48526),a=n(86738),s=n(82799),o=n(99917);class l{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new l(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,o.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const n=new i.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),a=(0,o.project)(n,e);if(!a)return null;const s=this.coordinates.map((e,t)=>{const n=e.clone(),i=a.points[t];return n.x=i[0],n.y=i[1],n}),l=this.clone(s);return l.spatialReference=e,l}projectSync(e){if(this.spatialReference.equals(e))return this.clone();const t=new i.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),n=(0,o.project)(t,e);if(!n)return null;const a=this.coordinates.map((e,t)=>{const i=e.clone(),a=n.points[t];return i.x=a[0],i.y=a[1],i}),s=this.clone(a);return s.spatialReference=e,s}static fromGeometry(e){const t=new l(e);if(e instanceof l)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,n)=>{const i=e.clone(t);return i.spatialReference=n,i},t;switch(e.type){case"point":{const n=e,{hasZ:i,hasM:s}=n;return t.coordinates=i&&s?[new r(n.x,n.y,n.z,n.m)]:i?[new r(n.x,n.y,n.z)]:s?[new r(n.x,n.y,null,n.m)]:[new r(n.x,n.y)],t._exporter=(t,n)=>e.hasM?new a.A(t[0].x,t[0].y,t[0].z,t[0].m,n):new a.A(t[0].x,t[0].y,t[0].z,n),t}case"multipoint":{const n=e,{hasZ:a,hasM:s}=n;return t.coordinates=a&&s?n.points.map(e=>new r(e[0],e[1],e[2],e[3])):a?n.points.map(e=>new r(e[0],e[1],e[2])):s?n.points.map(e=>new r(e[0],e[1],null,e[2])):n.points.map(e=>new r(e[0],e[1])),t._exporter=(t,n)=>e.hasM?new i.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:n}):new i.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:n}),t}case"polyline":{const n=e,i=[],a=[],{hasZ:o,hasM:l}=e;let c=0;for(const e of n.paths)if(a.push([c,c+e.length]),c+=e.length,o&&l)for(const t of e)i.push(new r(t[0],t[1],t[2],t[3]));else if(o)for(const t of e)i.push(new r(t[0],t[1],t[2]));else if(l)for(const t of e)i.push(new r(t[0],t[1],null,t[2]));else for(const t of e)i.push(new r(t[0],t[1]));return t.coordinates=i,t._exporter=(t,n)=>{const i=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),o=a.map(e=>i.slice(e[0],e[1]));return new s.A({paths:o,hasM:e.hasM,hasZ:!0,spatialReference:n})},t}}}}class r{constructor(e,t,n=null,i=null,a=null,s=null){this.x=e,this.y=t,this.z=n,this.m=i,this.tile=a,this.elevationTile=s}clone(){return new r(this.x,this.y,this.z,this.m)}}},57984(e,t,n){n.d(t,{C:()=>u});var i=n(32198),a=n(53966),s=n(86211),o=n(91429),l=n(16930),r=n(19419),c=n(7236);let u=class extends c.A{get spatialReference(){return this.extent.spatialReference}constructor(e){const t=e.noDataValue,n="tiles"in e?e.tiles.map(n=>new h({tile:n,tileInfo:e.tileInfo,noDataValue:t})):e.samplers;super({noDataValue:t,samplers:n});const i=n[0];if(i){this.extent=i.extent.clone();const{min:e,max:t}=i.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<n.length;e++){const t=n[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else{const t="tileInfo"in e?e.tileInfo:null;this.extent=(0,r.w1)((0,r.vt)(),t?.spatialReference??l.A.WGS84),this.demResolution={min:0,max:0}}}elevationAt(e,t){let n;for(const i of this.samplers)if(i.containsAt(e,t)&&(n=i.elevationAt(e,t),n!==i.noDataValue))return n;return null!=n?n:(a.A.getLogger(this).warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}};(0,i.Cg)([(0,o.MZ)({constructOnly:!0})],u.prototype,"noDataValue",void 0),(0,i.Cg)([(0,o.MZ)({constructOnly:!0})],u.prototype,"samplers",void 0),u=(0,i.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler")],u);let h=class extends c.A{get spatialReference(){return this.extent.spatialReference}constructor(e){super(e);const t=e.tile.key.extent;this.extent=(0,r.w1)(t,e.tileInfo.spatialReference),this.extent.zmin=e.tile.zmin,this.extent.zmax=e.tile.zmax;const n=(0,s.GA)(e.tileInfo.spatialReference),i=e.tileInfo.lodAt(e.tile.key.level).resolution*n;this.demResolution={min:i,max:i}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,r.Rj)(this.tile.key.extent,e,t)}elevationAt(e,t){return this.containsAt(e,t)?this.tile.sample(e,t)??this.noDataValue:this.noDataValue}};(0,i.Cg)([(0,o.MZ)({constructOnly:!0})],h.prototype,"tile",void 0),(0,i.Cg)([(0,o.MZ)({constructOnly:!0})],h.prototype,"noDataValue",void 0),(0,i.Cg)([(0,o.MZ)({constructOnly:!0})],h.prototype,"tileInfo",void 0),h=(0,i.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler.SingleTileElevationSampler")],h)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6247,8628],{69052(t,e,n){n.d(e,{hr:()=>a});var r=n(34727);class a{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,n=!1){return s(this.range,this.min,this.max,t,e,n)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,n){return t<e?e:e+i(this.range,t-e,n)}minimalMonotonic(t,e,n){return s(this.range,t,t+this.range,e,n)}center(t,e,n){return e=this.monotonic(t,e,n),this.normalize((t+e)/2,n)}diff(t,e,n){return this.monotonic(t,e,n)-t}shortestSignedDiff(t,e){t=this.normalize(t);const n=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(n)<Math.abs(r)?n:r}contains(t,e,n){return e=this.minimalMonotonic(t,e),(n=this.minimalMonotonic(t,n))>t&&n<e}}function s(t,e,n,r,a=0,s=!1){return(r-=a)<e?r+=i(t,e-r):r>n&&(r-=i(t,r-n)),s&&r===n&&(r=e),r+a}function i(t,e,n=0){return Math.ceil((e-n)/t)*t+n}const o=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360));n.d(e,["ie",0,l,"uC",0,o])},18370(t,e,n){n.d(e,{z:()=>a});class r{constructor(t){this._import=t,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async t=>(this.module=t,t))),this._promise}}function a(t){return new r(t)}},56512(t,e,n){function r(t){let e,n,r=[],a=!1;return function(...s){return a&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}(s,r)||(n=t.apply(this,s),e=this,r=s,a=!0),n}}n.d(e,{B:()=>r})},31411(t,e,n){n.d(e,{GS:()=>E,gh:()=>I});var r=n(49186),a=n(56512),s=n(65864),i=n(4305),o=n(50954),l=n(52006),u=n(49663),d=n(46068),c=n(15507);const h=1e-6,p=[0,0];function f(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class m{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:n,maxSegmentsPerCurve:r,minSegmentsPerCurve:a}){const s=n*n,i=e*e,o=1/r,l=this.interpolate(0),u=this.interpolate(1);(0,c.kb)(this.curveStart,l)>h&&t.push(l),this.initialize(l,u);const d=1/a;for(let t=a-1;t>0;t--){const e=t*d;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===s||!isFinite(s)||(0,c.kb)(this.arcStart,this.arcEnd)<s)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,c.kb)(this.curveEnd,u)>h&&t.push([...this.curveEnd]),t}}class g extends m{constructor(t,e){const[n,r,a]=e.b;super(t,n),this._controlPointsStack=[],this._curveControlPoints=[r,a],this._arcControlPoints=[r,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:n,tStart:r,tEnd:a}=this,[s,i]=this._arcControlPoints,o=(t-r)/(a-r),l=(0,c.RS)([],e,s,o),u=(0,c.RS)(p,s,i,o),d=(0,c.RS)([],i,n,o),h=(0,c.RS)([],l,u,o),f=(0,c.RS)([],u,d,o),m=(0,c.RS)([],h,f,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,d]),this.tEndStack.push(t),this.arcEndStack.push(m),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:n}=this,[r,a]=this._curveControlPoints;return(0,i.B4)(e,r,a,n,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[n,r]=this._arcControlPoints;return Math.max((0,c.yE)(n,t,e),(0,c.yE)(r,t,e))}}class y extends m{constructor(t,e){const[n]=e.a;super(t,n),this._derivedEllipse=(0,d.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,d.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,c.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function b(t,e,n,{cx:r,cy:a,radius:s,thetaStart:i,thetaEnd:o,isInvalid:l},{maxDeviation:u,maxSegmentLength:d,maxSegmentsPerCurve:p,minSegmentsPerCurve:f}){if(l)return t.push([...n]),t;const m=2*s,g=[r+s*Math.cos(i),a+s*Math.sin(i)],y=[r+s*Math.cos(o),a+s*Math.sin(o)];(0,c.kb)(e,g)>h&&t.push(g);const b=Math.abs(o-i),w=d>0&&d<m?2*Math.asin(d/m):b,S=u>0&&u<=s?2*Math.acos(1-u/s):b,F=Math.min(w,S),v=Math.min(p,Math.max(f,Math.ceil(Math.abs(b/F)))),A=1/v;for(let e=1;e<v;e++){const n=e*A,l=i*(1-n)+o*n;t.push([r+s*Math.cos(l),a+s*Math.sin(l)])}return t.push(y),(0,c.kb)(n,y)>h&&t.push([...n]),t}function w(t,e,n,r){return new g(e,n).densify(t,r)}function S(t,e,n,r){const a=(0,o.pM)(e,n),[s]=n.c;return b(t,e,s,a,r)}function F(t,e,n,r){const a=(0,u.io)(e,n),[s]=n.a;return b(t,e,s,a,r)}function v(t,e,n,r){const[a,s,i,o,l,u,d]=n.a;return 0===u||0===d?(t.push([...a]),t):new y(e,n).densify(t,r)}function A(t,e,n,r){return(0,l.Xq)(n)?(t.push([...n]),t):(0,l.n1)(n)?w(t,e,n,r):(0,l.aO)(n)?S(t,e,n,r):(0,l.DA)(n)?F(t,e,n,r):v(t,e,n,r)}function E(t,e={}){if(!(0,l.Ed)(t))return t;const n=f(e),r=(0,l.FD)(t),a=[];for(const t of r){const e=[];for(let r=0;r<t.length-1;r++){const a=r+1,s=[...(0,l.yP)(t[r])];0===r&&e.push(s),A(e,s,t[a],n)}a.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:a,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:a,spatialReference:t.spatialReference}}const M=(0,a.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function I(t,e,a){const i=new Set(e);return await async function(t,e,a){let s=null;for(const i of t)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,e)){const t=i.spatialReference;if(!t)throw new r.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=k(t);if(a.has(e))i.spatialReference=a.get(e);else{s||(s=await Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(3299),n.e(1550)]).then(()=>n(78125)));const o=s.fromSpatialReference(t),l=o?.getTolerance();if(null==l)throw new r.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const u=i.spatialReference.clone();u.read({xyTolerance:l}),i.spatialReference=u,a.set(e,u)}}}(t,i,a),t.map(t=>{if(!t||!(0,l.Ed)(t))return t;const n=t.spatialReference.xyTolerance;if(null==n)return t;const r=M(n);return(0,s.rS)(function(t,e,n){if(!(0,l.Ed)(t))return t;const r=new Set(e),a=f(n),s=(0,l.FD)(t),i=[];let o=!1;for(const t of s){const e=[];for(let n=0;n<t.length-1;n++){const s=n+1,i=[...(0,l.yP)(t[n])];0===n&&e.push(i);const u=t[s];(0,l.Xq)(u)?e.push([...u]):(0,l.n1)(u)&&!r.has("cubic-bezier")?w(e,i,u,a):(0,l.aO)(u)&&!r.has("circular-arc")?S(e,i,u,a):(0,l.DA)(u)&&!r.has("elliptic-arc")?F(e,i,u,a):(0,l.wY)(u)&&!r.has("elliptic-arc")?v(e,i,u,a):(e.push((0,l.tk)(u)),o=!0)}i.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...o?{curvePaths:i}:{paths:i}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...o?{curveRings:i}:{rings:i}}}(t,e,r))})}function k(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},52039(t,e,n){n.d(e,{O7:()=>h,el:()=>u});var r=n(69052),a=(n(49186),n(18370)),s=n(17676),i=(n(5443),n(39829)),o=(n(82799),n(16930)),l=(n(80754),n(21325));async function u(t,e,n){Array.isArray(t)||(t=[t]),null!=e&&"object"==typeof e&&"authMode"in e&&(n=e);let r=null;for(const e of t)r??=e?.spatialReference;if(!r)return t;const a=(0,l.Vp)(r);if(!a)return t;if(1===t.length&&"extent"===t[0]?.type){const e=t[0].clone().normalizeAsSingleGeometry(a);return["xmin"in e?e:new i.A(e)]}const[o,u]=a.valid;let h=!1;for(const e of t){if(!e)continue;if("point"===e.type){h||=e.x>=u,h||=e.x<=o;continue}const{extent:t}=e;if(null==t){h=!0;break}h||=t.xmin>=u,h||=t.xmin<=o,h||=t.xmax>=u,h||=t.xmax<=o}if(!h)return t;const[{foldInto360Range:p},f]=await(0,s.qr)(Promise.all([d.getImportPromise(),c.getImportPromise()]),n),m=f.fromSpatialReference(r);return t.map(t=>{if(null==t||"mesh"===t.type)return t;const e=f.fromGeometry(t),n=f.toGeometry(p(e,m),r);return"extent"===t.type&&1===n?.rings.length?n.extent:n})}const d=(0,a.z)(()=>n.e(4144).then(()=>n(4144)).then(t=>t.load().then(()=>t))),c=(0,a.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(3299),n.e(1550)]).then(()=>n(78125)));function h(t,e,n){const r=(0,l.Vp)(n);if(null==r)return t;const[a,s]=r.valid,i=2*s;let o=0,u=0;e>s?o=Math.ceil(Math.abs(e-s)/i):e<a&&(o=-Math.ceil(Math.abs(e-a)/i)),t>s?u=Math.ceil(Math.abs(t-s)/i):t<a&&(u=-Math.ceil(Math.abs(t-a)/i));let d=t+(o-u)*i;const c=d-e;return c>s?d-=i:c<a&&(d+=i),d}function p(t){const e=(0,l.Vp)(t);if(null==e)return null;const[n,a]=e.valid;return new r.hr(n,a)}const f=p(o.A.WGS84);p(o.A.WebMercator),n.d(e,["Y_",0,f])},80754(t,e,n){n.d(e,{kS:()=>u,kd:()=>l});var r=n(82799),a=n(16930),s=n(60408),i=n(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(t,e){return Math.ceil((t-e)/(2*e))}function u(t,e){if((0,i.Ed)(t))for(const n of function(t){return(0,s.Bi)(t)?t.curveRings:t.curvePaths}(t))for(const t of n){if((0,i.aO)(t)){const[n,r]=t.c;n[0]+=e,r[0]+=e;continue}if((0,i.FG)(t)){const[n,r]=t.a;n[0]+=e,r[0]+=e;continue}if((0,i.n1)(t)){const[n,r,a]=t.b;n[0]+=e,r[0]+=e,a[0]+=e;continue}t[0]+=e}for(const n of function(t){return(0,s.Bi)(t)?t.rings:t.paths}(t))for(const t of n)t[0]+=e;return t}n.d(e,["j7",0,o])},78628(t,e,n){n.d(e,{applyEdits:()=>S,uploadAssets:()=>k});var r=n(52106),a=n(7762),s=n(49186),i=n(4718),o=n(53966),l=n(91869),u=n(84952),d=n(13069),c=n(52039),h=n(21325),p=n(31411),f=n(47685),m=n(30524),g=n(20557),y=n(77548);function b(t){return null!=t?.applyEdits}const w=new WeakMap;async function S(t,e,n,r={}){let u;const c="gdbVersion"in t?t.gdbVersion:null,h=r.gdbVersion??c;if((0,f.Mk)(t)&&t.url)u=(0,f.Zk)(t.url,t.layerId,h,"original-and-current-features"===r.returnServiceEditsOption);else{u=Promise.withResolvers(),u.promise.then(e=>{(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length)&&t.emit("edits",e)},()=>{});const e={result:u.promise};t.emit("apply-edits",e)}try{const{results:c,edits:h}=await async function(t,e,n,r){if(await t.load(),!b(e))throw new s.A(`${t.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:t});if(!(0,y.tk)(t))throw new s.A(`${t.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:t});const{edits:i,options:u}=await async function(t,e,n){const r=(0,y.BR)(t),i=e&&(e.addFeatures||e.updateFeatures||e.deleteFeatures),u=e&&(e.addAttachments||e.updateAttachments||e.deleteAttachments),c=null!=t.infoFor3D;if(function(t,e,n,r,a,i){if(!(t&&(r||a)||n?.usingTelecomOperations))throw new s.A(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const o=e.editing.supportsGlobalId||n?.usingFeatureServiceEndpoint;if(!o&&n?.globalIdUsed)throw new s.A(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!o&&a)throw new s.A(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!n?.globalIdUsed&&a)throw new s.A(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(e,r,n,!!i,!!u,`${t.type}-layer`),!r.data.isVersioned&&n?.gdbVersion)throw new s.A(`${t.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!r.editing.supportsRollbackOnFailure&&n?.rollbackOnFailureEnabled)throw new s.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const h={...n};if(null!=h.rollbackOnFailureEnabled||r.editing.supportsRollbackOnFailure||(h.rollbackOnFailureEnabled=!0),h.rollbackOnFailureEnabled||"original-and-current-features"!==h.returnServiceEditsOption||(!1===h.rollbackOnFailureEnabled&&o.A.getLogger("esri.layers.graphics.editingSupport").warn(`${t.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),h.rollbackOnFailureEnabled=!0),!r.editing.supportsReturnServiceEditsInSourceSpatialReference&&h.returnServiceEditsInSourceSR)throw new s.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(h.returnServiceEditsInSourceSR&&"original-and-current-features"!==h.returnServiceEditsOption)throw new s.A(`${t.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(t,e,n){const r=function(t){return{addFeatures:Array.from(t?.addFeatures??[]),updateFeatures:Array.from(t?.updateFeatures??[]),deleteFeatures:t&&a.A.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():t.deleteFeatures||[],addAttachments:t.addAttachments||[],updateAttachments:t.updateAttachments||[],deleteAttachments:t.deleteAttachments||[]}}(t);if(r.addFeatures?.length&&!e.operations.supportsAdd)throw new s.A(`${n}:unsupported-operation`,"Layer does not support adding features.");if(r.updateFeatures?.length&&!e.operations.supportsUpdate)throw new s.A(`${n}:unsupported-operation`,"Layer does not support updating features.");if(r.deleteFeatures?.length&&!e.operations.supportsDelete)throw new s.A(`${n}:unsupported-operation`,"Layer does not support deleting features.");return r.addFeatures=r.addFeatures.map(M),r.updateFeatures=r.updateFeatures.map(M),r.addAssetFeatures=[],r}(e,r,`${t.type}-layer`),f=n?.globalIdUsed||c,m=t.fields.filter(t=>"big-integer"===t.type||"oid"===t.type&&(t.length||0)>=8);if(f){const{globalIdField:e}=t;if(null==e)throw new s.A(`${t.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach(t=>function(t,e){const{attributes:n}=t;null==n[e]&&(n[e]=(0,d.yS)())}(t,e))}p.addFeatures.forEach(e=>function(t,e,n,r){F(t,e,n,r),v(t,e)}(e,t,f,m)),p.updateFeatures.forEach(e=>function(t,e,n,r){F(t,e,n,r),v(t,e);const a=(0,y.BR)(e);if("geometry"in t&&null!=t.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.A(`${e.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(e,t,f,m)),p.deleteFeatures.forEach(e=>function(t,e,n,r){F(t,e,n,r)}(e,t,f,m)),p.addAttachments.forEach(e=>A(e,t)),p.updateAttachments.forEach(e=>A(e,t)),c&&await async function(t,e){const{infoFor3D:n}=e;if(null==n)return;if(!(0,g.JQ)(n))throw new s.A(`${e.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");t.addAssetFeatures??=[];const{addAssetFeatures:r}=t;for(const e of t.addFeatures??[])I(e)&&r.push(e);for(const e of t.updateFeatures??[])I(e)&&r.push(e)}(p,t);const b=(0,l.tE)(w,t,()=>new Map);return{edits:await E(p,r.data.supportedCurveTypes??[],b),options:h}}(t,n,r);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await e.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(t,e,n,r),p=t=>t.filter(t=>!t.error).map(i.o8),f={edits:h,addedFeatures:p(c.addFeatureResults),updatedFeatures:p(c.updateFeatureResults),deletedFeatures:p(c.deleteFeatureResults),addedAttachments:p(c.addAttachmentResults),updatedAttachments:p(c.updateAttachmentResults),deletedAttachments:p(c.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:c.editMoment?new Date(c.editMoment):null,globalIdToObjectId:r.globalIdToObjectId};return c.editedFeatureResults?.length&&(f.editedFeatures=c.editedFeatureResults),u.resolve(f),c}catch(t){throw u.reject(t),t}}function F(t,e,n,r){if(n){if("attributes"in t&&!t.attributes[e.globalIdField])throw new s.A(`${e.type}-layer:invalid-parameter`,`Feature should have '${e.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in t)&&!t.globalId)throw new s.A(`${e.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(r.length&&"attributes"in t)for(const n of r){const r=t.attributes[n.name];if(void 0!==r&&!(0,m.OG)(n,r))throw new s.A(`${e.type}-layer:invalid-parameter`,`Big-integer field '${n.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:t})}if("geometry"in t&&null!=t.geometry){if(t.geometry.hasZ&&!1===e.capabilities?.data.supportsZ)throw new s.A(`${e.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(t.geometry.hasM&&!1===e.capabilities?.data.supportsM)throw new s.A(`${e.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(t,e){if("geometry"in t&&"mesh"===t.geometry?.type&&null!=e.infoFor3D&&null!=e.spatialReference){const{geometry:n}=t,{spatialReference:r,vertexSpace:a}=n,i=e.spatialReference,o="local"===a.type,l=(0,h.EA)(i),u=(0,h.aI)(i,r),d=u||(0,h.oT)(i)&&((0,h.oT)(r)||(0,h.K8)(r));if(!(o&&l&&d||!o&&!l&&u))throw new s.A(`${e.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${a.type} vertex space and a spatial reference wkid:${r.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function A(t,e){const{feature:n,attachment:r}=t;if(!n||"attributes"in n&&!n.attributes[e.globalIdField])throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in n)&&!n.globalId)throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new s.A(`${e.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!e.capabilities?.editing.supportsUploadWithItemId&&r.uploadId)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const t=(0,u.r$)(r.data);if(t&&!t.isBase64)throw new s.A(`${e.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function E(t,e,n){const r=t.addFeatures??[],a=t.updateFeatures??[],s=r.concat(a).map(t=>t.geometry),i=await(0,p.gh)(s,e,n),o=await(0,c.el)(i),l=r.length,u=a.length;return o.slice(0,l).forEach((t,e)=>r[e].geometry=t),o.slice(l,l+u).forEach((t,e)=>a[e].geometry=t),t}function M(t){const e=new r.A;return t.attributes||(t.attributes={}),e.geometry=t.geometry,e.attributes=t.attributes,e}function I(t){return"mesh"===t?.geometry?.type}function k(t,e,n,r){if(!b(e))throw new s.A(`${t.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:t});if(!e.uploadAssets)throw new s.A(`${t.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:t});return e.uploadAssets(n,r)}},47685(t,e,n){n.d(e,{Mk:()=>p,Zk:()=>c});var r=n(32198),a=n(65529),s=n(4718),i=n(91429),o=n(20816);const l=new a.bk;function u(t){return l.on("apply-edits",new WeakRef(t))}function d(t){return l.on("update-moment",new WeakRef(t))}function c(t,e,n=null,r=!1){const a=Promise.withResolvers();return r=null==e||r,l.emit("apply-edits",{serviceUrl:t,layerId:e,gdbVersion:n,mayReceiveServiceEdits:r,result:a.promise}),a}const h=Symbol();function p(t){return null!=t&&"object"==typeof t&&h in t}function f(t){return null!=t&&"object"==typeof t&&"gdbVersion"in t}function m(t,e,n){const r=new URL(t).host,a=o.Z3.get(r),s=t=>!t||t===a;return s(e)&&s(n)||e===n}n.d(e,["w6",0,t=>{var e;const n=t;let a=class extends n{static{e=h}constructor(...t){super(...t),this[e]=!0,this._applyEditsHandler=t=>{const{serviceUrl:e,layerId:n,gdbVersion:r,mayReceiveServiceEdits:a,result:i}=t,o=e===this.url,l=null!=n&&null!=this.layerId&&n===this.layerId,u=null!=n&&this.relationships?.some(t=>t.relatedTableId===n),d=f(this),c=f(this)&&m(e,r,this.gdbVersion);if(!o||d&&!c||!l&&!u&&!a)return;const h=i.then(t=>{if(this.lastEditsEventDate=new Date,l&&(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length))return this.emit("edits",(0,s.o8)(t)),t;const n=t.editedFeatures?.find(({layerId:t})=>t===this.layerId);if(n){const{adds:e,updates:r,deletes:a}=n.editedFeatures,i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e?e.map(({attributes:t})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],deletedFeatures:a?a.map(({attributes:t})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],updatedFeatures:r?r.map(({current:{attributes:t}})=>({objectId:this.objectIdField&&t[this.objectIdField],globalId:this.globalIdField&&t[this.globalIdField]})):[],editedFeatures:(0,s.o8)(t.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(t.historicMoment)};return this.emit("edits",i),i}const a={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,s.o8)(t.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(t.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(e,r,a.historicMoment)&&this.emit("edits",a),a}).then(t=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(e,r,t.historicMoment)&&(this.historicMoment=t.historicMoment),t));h.catch(()=>{}),this.emit("apply-edits",{result:h})},this._updateMomentHandler=t=>{const{serviceUrl:e,gdbVersion:n,moment:r}=t,a=e===this.url,s=f(this),i=f(this)&&m(e,n,this.gdbVersion),o=f(this)&&!m(e,this.gdbVersion,null);a&&s&&i&&o&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then(()=>{this.addHandles(u(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(d(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(t,e,n){return"historicMoment"in this&&this.historicMoment!==n&&(0,o.w5)(t,e)}};return(0,r.Cg)([(0,i.MZ)()],a.prototype,"lastEditsEventDate",void 0),a=(0,r.Cg)([(0,i.$K)("esri.layers.mixins.EditBusLayer")],a),a}])},20557(t,e,n){n.d(e,{Fm:()=>l,Hz:()=>g,JQ:()=>m,JZ:()=>M,ND:()=>b,R_:()=>i,U9:()=>f,_h:()=>S,be:()=>c,fE:()=>p,fu:()=>a,nr:()=>y,oF:()=>s,qv:()=>E,rP:()=>h,rq:()=>u,z$:()=>d});const r=[["binary","application/octet-stream","bin",""]];function a(t,e){return null!=F(e.name,t?.supportedFormats??[])}function s(t,e){if(!t)return!1;const n=u(e,t.supportedFormats??[]);return null!=n&&t.editFormats.includes(n)}function i(t,e){return v(function(t,e){const n=t.toLowerCase();return w(e).find(t=>A(t)===n)}(t,e))}function o(t,e){return v(F(t,e))}function l(t,e){return A(S(t,e))}function u(t,e){return o(t.name,e)??i(t.type,e)}function d(t,e,n){return i(t,n)??o(e,n)}function c(t,e){if(!t||!S(t,e))return;const n=/^3d_(.+)$/iu.exec(t)?.[1]?.toLowerCase();return n||void 0}function h(t,e){return(t??[]).map(t=>c(t,e)).filter(t=>!!t)}function p(t,e){return v(e.find(n=>c(v(n),e)===t))}function f({supportedFormats:t}){return d("model/gltf-binary","glb",t)}function m(t){const e=f(t);return null!=e&&t.editFormats.includes(e)}function g(t){if(!t)return null;const e=f(t),n=function({supportedFormats:t}){return d("model/gltf+json","gltf",t)}(t);let r=null;for(const a of t.queryFormats){if(a===e)return a;a===n&&(r=a)}return r}function y({supportedFormats:t}){return d("application/esri3do-SR_world","wld",t)}function b({supportedFormats:t}){return d("application/esri3do-SR_prj","prj",t)}function w(t){return[...r,...t]}function S(t,e){return w(e).find(e=>v(e)===t)}function F(t,e){const n=t.toLowerCase();return w(e).find(t=>E(t).some(t=>n.endsWith(t)))}function v(t){return t?.[0]}function A(t){return t?.[1].toLowerCase()}function E(t){return t?.[2].split(",").map(t=>t.toLowerCase())??[]}function M(t){return t.tables?.find(t=>"assetMaps"===t.role)}},20816(t,e,n){n.d(e,{We:()=>o,ZJ:()=>l,w5:()=>u});var r=n(56507);const a=(0,n(13069).vD)(),s=new Map,i=new Map;async function o(t,e,n){if(!t||!n)return!1;if(!e)return!0;const a=new URL(t).host;let i=s.get(a);if(!i){const e=t.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");i=(await(0,r.A)(e,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return i===e}async function l(t,e,r=!1){if(!t||!e)return!0;const s=t.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),o=i.get(s)?.entries();if(o)for(const[t,i]of o)if(i.name===e){const e=!i.stack?.hasForwardEdits();if(!e&&r){const[{deleteForwardEdits:e},{default:r}]=await Promise.all([n.e(2186).then(()=>n(32186)),n.e(2558).then(()=>n(32558))]),o=await e(s,t,new r({sessionId:a,moment:i.moment}));return o.success&&i.stack?.clearForwardEdits(),o.success}return e}return!0}function u(t,e){if(!t)return!1;const n=t.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=i.get(n)?.entries();if(r)for(const[t,n]of r)if(n.name===e)return"edit"===n.lockType;return!1}new Map,n.d(e,["TA",0,a,"Z3",0,s])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1577,1948,6491],{61691(e,t,r){r.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,r){r.d(t,{S:()=>s});var n=r(61691);class s extends n.G{m_aGeoms;m_iGeom=-1;constructor(e){super(),this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){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}}},87992(e,t,r){r.d(t,{JR:()=>_,ME:()=>M,MY:()=>O,NO:()=>C,Nh:()=>P,V2:()=>A,_s:()=>I,e6:()=>R,gh:()=>E,jm:()=>G,tr:()=>X,uX:()=>x});var n=r(32198),s=r(16930),i=r(19419),o=r(60408),a=r(21325),u=r(513),c=r(50954),h=r(79567),l=r(52006),m=r(49663),g=r(46068),f=r(92722);class x{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:n,vertexZ:s,vertexM:i,partCount:o,partOffsets:a,partFlags:u,segmentFlags:c,segmentIndices:h,segmentParams:l,segmentCountArc:m,segmentCountBezier:g}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=n,this.vertexZ=s,this.vertexM=i,this.partCount=o,this.partOffsets=a,this.partFlags=u,this.segmentFlags=c,this.segmentIndices=h,this.segmentParams=l,this.segmentCountArc=m,this.segmentCountBezier=g}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:r,hasZ:n,hasM:s,segmentCountArc:i,segmentCountBezier:o}=this,a=A(e,t,r,n,s,this.hasCurves(),i,o);a.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:c,vertexM:h}=this;if(a.vertexXY.set(u.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(h.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,r+1)),a.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:r,segmentParams:n,segmentParamCount:s}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(r.subarray(0,t),0),a.segmentParams.set(n.subarray(0,s),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,a.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new p(this):[][Symbol.iterator]()}}class p{constructor(e){this.geometry=e,this.value=new y(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class y{constructor(e){this.geometry=e,this.index=-1,this._readVertex=Y(e),this._segments=new v(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class v{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new d(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class d{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=Y(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[r++],n=t[r++],s=t[r++],i=t[r++];return{b:[this.end,[e,n],[s,i]]}}const n=t[r++],s=t[r++],i=t[r++],o=t[r++],a=t[r++],u=t[r++];r++,r++;const c=t[r++],h=t[r++];if(!Boolean(4&n)&&1===i)return{c:[this.end,[c,h]]};const l=2&n?0:1,m=1&n?0:1;return{a:[this.end,[a,u],l,m,o,s,i]}}}function C(e,t){const r={stack:[],error:void 0,hasError:!1};try{return t??=(0,i.Ie)(),(0,n.mS)(r,new S(e,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(t,function(e){let t;const{vertexCount:r,vertexXY:s,vertexZ:o,vertexM:a}=e,u=w(e);if(e.hasCurves()){const r={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(r,new S(e,["vertexZ","vertexM"]),!1);const s=(0,i.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:r}of t.segments)(0,h.e)(s,e,r),e=(0,l.yP)(r)}const[o,a,c,m]=s;t={xmin:o,ymin:a,xmax:c,ymax:m,spatialReference:u}}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}else{let e,n,i,o;e=n=1/0,i=o=-1/0;for(let t=0;t<r;++t){const r=s[2*t],a=s[2*t+1];e=Math.min(e,r),i=Math.max(i,r),n=Math.min(n,a),o=Math.max(o,a)}t={xmin:e,ymin:n,xmax:i,ymax:o,spatialReference:u}}if(o){let e=1/0,r=-1/0;for(const t of o)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(a){let e=1/0,r=-1/0;for(const t of a)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}function M(e){let t,r,n;if((0,o.fT)(e)){n="point";const{x:s,y:i,z:o,m:a}=e,u=[s,i];null!=o&&u.push(o),null!=a&&u.push(a),r=[[u]],t=1}else(0,o.U9)(e)?(n="multipoint",r=[e.points],t=e.points.length):(0,o.Rg)(e)?(n="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(n="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,b(t[0],(0,l.yP)(t.at(-1)))&&--e),e),0));const s=A(n,t,n.includes("point")?0:r.length,(0,o.Pv)(e),(0,o.W0)(e),(0,l.Ed)(e)),{hasZ:i,hasM:a,vertexXY:u,vertexZ:c,vertexM:h}=s;function m(e){u[2*f]=e[0],u[2*f+1]=e[1],i&&(c[f]=e[2]),a&&(h[f]=e[g]),++f}s.spatialReference=e.spatialReference??void 0;const g=s.hasZ?3:2;let f=0;if(!s.isMultipart()){if(!i&&!a){for(const[e,t]of r[0])u[2*f]=e,u[2*f+1]=t,++f;return s}for(const e of r[0])m(e);return s}const x="polygon"===n,{partOffsets:p}=s;let y=0;if(!(0,l.Ed)(e)){for(const e of r){if(p[y++]=f,0===e.length)continue;let t=e.length;if(x&&b(e[0],e.at(-1))&&--t,i||a)for(let r=0;r<t;++r)m(e[r]);else for(let r=0;r<t;++r){const[t,n]=e[r];u[2*f]=t,u[2*f+1]=n,++f}}return p[y]=f,s}function v(e){const t=d+e;if(t<=(s.segmentParams?.length??0))return;let r=t*Z;r=20*Math.ceil(r/20);const n=s.segmentParams;s.segmentParams=new Float64Array(r),null!=n&&s.segmentParams.set(n)}let d=0;for(const e of r){if(s.partOffsets[y++]=f,0===e.length)continue;const t=e[0];let r=t;for(let t=1;t<e.length;++t){const n=e[t];m(r);const i=f-1;(0,l.wY)(n)?(v(10),++s.segmentCountArc,d=I(r,n,s,i,d),r=n.a[0]):(0,l.DA)(n)?(v(10),++s.segmentCountArc,d=F(r,n,s,i,d),r=n.a[0]):(0,l.aO)(n)?(v(10),++s.segmentCountArc,d=R(r,n,s,i,d),r=n.c[0]):(0,l.n1)(n)?(v(4),++s.segmentCountBezier,d=X(0,n,s,i,d),r=n.b[0]):r=n}x&&b(t,r)||m(r)}return s.partOffsets[y]=f,s}function E(e){const t=Y(e),{vertexCount:r,partCount:n,hasZ:s,hasM:i}=e,o=w(e);if("point"===e.type){const[t,r]=e.vertexXY,n=e.vertexZ?.[0],s=e.vertexM?.[0];return{x:t,y:r,z:n,m:s,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<r;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:s,hasM:i}}const u="polygon"===e.type;if(!e.hasCurves()){const r=new Array;for(let s=0;s<n;++s){const n=e.partOffsets[s+1],i=new Array;for(;a<n;)i.push(t(a++));u&&i.length>0&&i.push(i[0]),r.push(i)}return u?{rings:r,hasZ:s,hasM:i,spatialReference:o}:{paths:r,hasZ:s,hasM:i,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:r}of e.parts){const e=[r];for(const{curve:r}of t)e.push(r);c.push(e)}return u?{rings:[],curveRings:c,hasZ:s,hasM:i,spatialReference:o}:{paths:[],curvePaths:c,hasZ:s,hasM:i,spatialReference:o}}function P(e,{lengths:t,coords:r,hasZ:n,hasM:s},i){const o=e.includes("point")?0:t.length,a="polygon"===e,u="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);n??=!1,s??=!1;const c=A(e,u,o,n,s,!1,0,0);if(c.spatialReference=i??void 0,!c.isMultipart()){for(let e=0,t=0;e<u;++e)c.vertexXY[2*e]=r[t++],c.vertexXY[2*e+1]=r[t++],n&&(c.vertexZ[e]=r[t++]),s&&(c.vertexM[e]=r[t++]);return c}const h=2+Number(n)+Number(s);let l=0,m=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[m],i=t+e-Number(a);c.partOffsets[++m]=i;for(let e=t;e<i;++e)c.vertexXY[2*e]=r[l++],c.vertexXY[2*e+1]=r[l++],n&&(c.vertexZ[e]=r[l++]),s&&(c.vertexM[e]=r[l++]);a&&(l+=h)}return c}function _({type:e,vertexCount:t,vertexXY:r,vertexZ:n,vertexM:s,partCount:i,partOffsets:o,hasZ:a,hasM:u}){const c=new f.A([],[],a,u);i=Math.max(i,1);const h="polygon"===e;let l=0;for(let e=0;e<i;++e){const i=o?.[e+1]??t,m=c.coords.length;for(let e=l;e<i;++e)c.coords.push(r[2*e],r[2*e+1]),a&&c.coords.push(n[e]),u&&c.coords.push(s[e]);if(h){const e=l;c.coords.push(r[2*e],r[2*e+1]),a&&c.coords.push(n[e]),u&&c.coords.push(s[e])}c.lengths.push((c.coords.length-m)/c.stride),l=i}return"point"===e&&(c.lengths.length=0),c}function G(...e){const t=new Set;for(const r of e){if(!r)continue;const e=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(const r of e){const e=r?.buffer;e&&t.add(e)}}return Array.from(t)}function O(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===r)&&(n=void 0);const s=e.getVCS();if(null==s)return{wkid:r,latestWkid:n,wkt:t};const i=s.isCustomWkid()?0:s.getOldID();if(i<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===i)&&(o=void 0),{wkid:r,wkt:t,latestWkid:n,vcsWkid:i,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new x({...e.toFlatGeometry(),spatialReference:t})}class S{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function w({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function Y({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?n=>[e[2*n],e[2*n+1],t[n],r[n]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function b(e,t){return e.every((e,r)=>e===t[r])}function A(e,t,r,n,s,i,o,a){o??=0,a??=0;const u=new x({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(c+=Float64Array.BYTES_PER_ELEMENT*t),s&&(c+=Float64Array.BYTES_PER_ELEMENT*t),u.isMultipart()&&(c+=(r+1)*Int32Array.BYTES_PER_ELEMENT,c+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=u.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const h=new ArrayBuffer(c);let l=0;return u.vertexXY=new Float64Array(h,l,2*t),l+=u.vertexXY.byteLength,n&&(u.vertexZ=new Float64Array(h,l,t),l+=u.vertexZ.byteLength),s&&(u.vertexM=new Float64Array(h,l,t),l+=u.vertexM.byteLength),i&&(u.segmentParams=new Float64Array(h,l,u.segmentParamCount),l+=u.segmentParams.byteLength,u.segmentIndices=new Int32Array(h,l,t),u.segmentIndices.fill(T),l+=u.segmentIndices.byteLength),u.isMultipart()&&(u.partOffsets=new Int32Array(h,l,r+1),l+=u.partOffsets.byteLength,u.partFlags=new Int8Array(h,l,r+1),l+=u.partFlags.byteLength,"polygon"===u.type&&u.partFlags.subarray(0,r).fill(1)),i&&(u.segmentFlags=new Int8Array(h,l,t),u.segmentFlags.fill(1),l+=u.segmentFlags.byteLength),u}function I(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const[a,[u,c],h,l,m,f,x]=t.a;let p=4;l||(p|=1),h||(p|=2);const y=(0,g.SW)(e,t),[v,d]=(0,g.Uk)(y,.5);return s[o++]=p,s[o++]=f,s[o++]=x,s[o++]=m,s[o++]=u,s[o++]=c,s[o++]=y.u2-y.u1,s[o++]=y.u1,s[o++]=v,s[o++]=d,o}function F(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const a=(0,m.io)(e,t);return V(a,4,...(0,u.mq)(a,.5),s,o)}function R(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){return r[i]=4,n[i]=o,V((0,c.pM)(e,t),0,...t.c[1],s,o)}function V(e,t,r,n,s,i){const{cx:o,cy:a,thetaStart:u,thetaEnd:c,radius:h}=e;return u>c||(t|=1),Math.abs(c-u)<=Math.PI||(t|=2),s[i++]=t,s[i++]=h,s[i++]=1,s[i++]=0,s[i++]=o,s[i++]=a,s[i++]=c-u,s[i++]=u,s[i++]=r,s[i++]=n,i}function X(e,{b:[t,[r,n],[s,i]]},{segmentFlags:o,segmentIndices:a,segmentParams:u},c,h){return o[c]=2,a[c]=h,u[h++]=r,u[h++]=n,u[h++]=s,u[h++]=i,h}const Z=1.61803,T=-1},91577(e,t,r){r.d(t,{execute:()=>f,qT:()=>p,zo:()=>x});var n=r(76061),s=r(61691),i=r(55537),o=r(95213),a=r(88885),u=r(79187);class c extends s.G{m_progressTracker;m_bMerge;m_bDone;m_inputGeometryCursor;m_index;constructor(e,t,r){super(),t||(0,i.a)(""),this.m_progressTracker=r,this.m_index=-1,this.m_bMerge=e,this.m_bDone=!1,this.m_inputGeometryCursor=t}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge){if(!this.m_bDone){const e=h(this.m_inputGeometryCursor);return this.m_bDone=!0,e}return null}if(!this.m_bDone){const e=this.m_inputGeometryCursor.next();if(null!==e)return(0,i.p)(e),(0,i.c)(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),l(e);this.m_bDone=!0}return null}}function h(e,t){const r=new a.C;let n;for(;n=e.next();)(0,i.p)(n),(0,i.c)(n),r.addGeometry(n);return r.getBoundingGeometry()}function l(e,t){if((0,i.c)(e),e.isEmpty())return e.createInstance();const r=e.getGeometryType();if((0,i.h)(r)){const t=e;if(t.isDegenerate(0)){const e=new o.P;return t.queryStart(e),e}if(t.getGeometryType()===i.G.enumLine){const r=new o.P,n=new a.a({vd:e.getDescription()});return t.queryStart(r),n.startPathPoint(r),t.queryEnd(r),n.lineToPoint(r),n}{const r=new a.a({vd:e.getDescription()});return r.addSegment(t,!0),l(r)}}if(r===i.G.enumEnvelope){const t=e,r=new u.Envelope2D;if(t.queryEnvelope(r),r.xmin===r.xmax&&r.ymin===r.ymax){const e=new o.P;return t.queryCornerByVal(0,e),e}if(r.xmin===r.xmax||r.ymin===r.ymax){const r=new o.P,n=new a.a({vd:e.getDescription()});return t.queryCornerByVal(0,r),n.startPathPoint(r),t.queryCornerByVal(1,r),n.lineToPoint(r),n}{const r=new a.P({vd:e.getDescription()});return r.addEnvelope(t,!1),r}}if(r===i.G.enumGeometryCollection)return h((0,a.g)(e,-1));if(m(e)){if(r===i.G.enumMultiPoint){const t=e,r=new o.P;return t.getPointByVal(0,r),r}return e}return(0,i.g)((0,i.i)(r)),(0,a.f)(e)}function m(e,t){if((0,i.c)(e),e.isEmpty())return!0;const r=e.getGeometryType();if(r===i.G.enumPoint)return!0;if(r===i.G.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,i.h)(r)){const t=e;if(t.isDegenerate(0))return!1;if(r===i.G.enumLine)return!0;const n=new a.a;return n.addSegment(t,!0),m(n)}if(r===i.G.enumMultiPoint)return 1===e.getPointCount();if(r===i.G.enumPolyline){const t=e;return!t.hasNonLinearSegments()&&1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(r===i.G.enumGeometryCollection){const t=e;return 1===t.getGeometryCount()&&m(t.getGeometry(0))}const n=e;return!(1!==n.getPathCount()||n.getPointCount()<3)&&(0,a.i)(n,0)}const g=new class{getOperatorType(){return 10102}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r){return new c(t,e,r)}execute(e,t){return l(e)}isConvex(e,t){if((0,i.c)(e),e.isEmpty())return!0;const r=e.getGeometryType();if(r===i.G.enumPoint)return!0;if(r===i.G.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,i.h)(r)){const t=e;return!t.getStartXY().equals(t.getEndXY())}if(r===i.G.enumMultiPoint)return 1===e.getPointCount();if(r===i.G.enumPolyline){const t=e;return 1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(r===i.G.enumGeometryCollection){const r=e;return 1===r.getGeometryCount()&&this.isConvex(r.getGeometry(0),t)}const n=e;return!(1!==n.getPathCount()||n.getPointCount()<3)&&(0,a.i)(n,0)}constructOrientedMinimumBoundingBox(e,t,r,n,s){(0,a.e)(e,t,r,n,s)}};function f(e){return g.execute(e,null)}function x(e,t){const r=g.executeMany(new n.S(e),t,null);return Array.from(r)}function p(e){return g.isConvex(e,null)}},55666(e,t,r){r.r(t),r.d(t,{convexHullExecute:()=>a,convexHullExecuteMany:()=>c,convexHullIsConvex:()=>l,execute:()=>u,executeMany:()=>h,isConvex:()=>m});var n=r(51447),s=r(53966),i=r(91577),o=r(83299);function a(e){const t=(0,o.fromGeometry)(e);return(0,o.toGeometry)((0,i.execute)(t.getGeometry()),t.getSpatialReference())}function u(e){return(0,n.eO)(s.A.getLogger("esri.geometry.operators.json.convexHullOperator"),"execute is deprecated. Use convexHullExecute instead.",{replacement:"convexHullExecute",warnOnce:!0}),a(e)}function c(e,t={}){const{merge:r=!1}=t,[n,s]=(0,o.fromGeometries)(e);return(0,i.zo)(n,r).map(e=>(0,o.toGeometry)(e,s))}function h(e,t={}){return(0,n.eO)(s.A.getLogger("esri.geometry.operators.json.convexHullOperator"),"executeMany is deprecated. Use convexHullExecuteMany instead.",{replacement:"convexHullExecuteMany",warnOnce:!0}),c(e,t)}function l(e){return(0,i.qT)((0,o.fromGeometryToGXGeometry)(e))}function m(e){return(0,n.eO)(s.A.getLogger("esri.geometry.operators.json.convexHullOperator"),"isConvex is deprecated. Use convexHullIsConvex instead.",{replacement:"convexHullIsConvex",warnOnce:!0}),l(e)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1577,1948,6491],{61691(e,t,r){r.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,r){r.d(t,{S:()=>s});var n=r(61691);class s extends n.G{m_aGeoms;m_iGeom=-1;constructor(e){super(),this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){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}}},87992(e,t,r){r.d(t,{JR:()=>_,ME:()=>M,MY:()=>O,NO:()=>C,Nh:()=>P,V2:()=>A,_s:()=>R,e6:()=>I,gh:()=>E,jm:()=>G,tr:()=>X,uX:()=>x});var n=r(32198),s=r(16930),i=r(19419),o=r(60408),a=r(21325),u=r(513),c=r(50954),h=r(79567),m=r(52006),l=r(49663),g=r(46068),f=r(92722);class x{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:n,vertexZ:s,vertexM:i,partCount:o,partOffsets:a,partFlags:u,segmentFlags:c,segmentIndices:h,segmentParams:m,segmentCountArc:l,segmentCountBezier:g}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=n,this.vertexZ=s,this.vertexM=i,this.partCount=o,this.partOffsets=a,this.partFlags=u,this.segmentFlags=c,this.segmentIndices=h,this.segmentParams=m,this.segmentCountArc=l,this.segmentCountBezier=g}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:r,hasZ:n,hasM:s,segmentCountArc:i,segmentCountBezier:o}=this,a=A(e,t,r,n,s,this.hasCurves(),i,o);a.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:c,vertexM:h}=this;if(a.vertexXY.set(u.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(h.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,r+1)),a.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:r,segmentParams:n,segmentParamCount:s}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(r.subarray(0,t),0),a.segmentParams.set(n.subarray(0,s),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,a.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new p(this):[][Symbol.iterator]()}}class p{constructor(e){this.geometry=e,this.value=new y(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class y{constructor(e){this.geometry=e,this.index=-1,this._readVertex=Y(e),this._segments=new v(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class v{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new d(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class d{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=Y(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[r++],n=t[r++],s=t[r++],i=t[r++];return{b:[this.end,[e,n],[s,i]]}}const n=t[r++],s=t[r++],i=t[r++],o=t[r++],a=t[r++],u=t[r++];r++,r++;const c=t[r++],h=t[r++];if(!Boolean(4&n)&&1===i)return{c:[this.end,[c,h]]};const m=2&n?0:1,l=1&n?0:1;return{a:[this.end,[a,u],m,l,o,s,i]}}}function C(e,t){const r={stack:[],error:void 0,hasError:!1};try{return t??=(0,i.Ie)(),(0,n.mS)(r,new S(e,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(t,function(e){let t;const{vertexCount:r,vertexXY:s,vertexZ:o,vertexM:a}=e,u=w(e);if(e.hasCurves()){const r={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(r,new S(e,["vertexZ","vertexM"]),!1);const s=(0,i.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:r}of t.segments)(0,h.e)(s,e,r),e=(0,m.yP)(r)}const[o,a,c,l]=s;t={xmin:o,ymin:a,xmax:c,ymax:l,spatialReference:u}}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}else{let e,n,i,o;e=n=1/0,i=o=-1/0;for(let t=0;t<r;++t){const r=s[2*t],a=s[2*t+1];e=Math.min(e,r),i=Math.max(i,r),n=Math.min(n,a),o=Math.max(o,a)}t={xmin:e,ymin:n,xmax:i,ymax:o,spatialReference:u}}if(o){let e=1/0,r=-1/0;for(const t of o)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(a){let e=1/0,r=-1/0;for(const t of a)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}function M(e){let t,r,n;if((0,o.fT)(e)){n="point";const{x:s,y:i,z:o,m:a}=e,u=[s,i];null!=o&&u.push(o),null!=a&&u.push(a),r=[[u]],t=1}else(0,o.U9)(e)?(n="multipoint",r=[e.points],t=e.points.length):(0,o.Rg)(e)?(n="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(n="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,b(t[0],(0,m.yP)(t.at(-1)))&&--e),e),0));const s=A(n,t,n.includes("point")?0:r.length,(0,o.Pv)(e),(0,o.W0)(e),(0,m.Ed)(e)),{hasZ:i,hasM:a,vertexXY:u,vertexZ:c,vertexM:h}=s;function l(e){u[2*f]=e[0],u[2*f+1]=e[1],i&&(c[f]=e[2]),a&&(h[f]=e[g]),++f}s.spatialReference=e.spatialReference??void 0;const g=s.hasZ?3:2;let f=0;if(!s.isMultipart()){if(!i&&!a){for(const[e,t]of r[0])u[2*f]=e,u[2*f+1]=t,++f;return s}for(const e of r[0])l(e);return s}const x="polygon"===n,{partOffsets:p}=s;let y=0;if(!(0,m.Ed)(e)){for(const e of r){if(p[y++]=f,0===e.length)continue;let t=e.length;if(x&&b(e[0],e.at(-1))&&--t,i||a)for(let r=0;r<t;++r)l(e[r]);else for(let r=0;r<t;++r){const[t,n]=e[r];u[2*f]=t,u[2*f+1]=n,++f}}return p[y]=f,s}function v(e){const t=d+e;if(t<=(s.segmentParams?.length??0))return;let r=t*Z;r=20*Math.ceil(r/20);const n=s.segmentParams;s.segmentParams=new Float64Array(r),null!=n&&s.segmentParams.set(n)}let d=0;for(const e of r){if(s.partOffsets[y++]=f,0===e.length)continue;const t=e[0];let r=t;for(let t=1;t<e.length;++t){const n=e[t];l(r);const i=f-1;(0,m.wY)(n)?(v(10),++s.segmentCountArc,d=R(r,n,s,i,d),r=n.a[0]):(0,m.DA)(n)?(v(10),++s.segmentCountArc,d=F(r,n,s,i,d),r=n.a[0]):(0,m.aO)(n)?(v(10),++s.segmentCountArc,d=I(r,n,s,i,d),r=n.c[0]):(0,m.n1)(n)?(v(4),++s.segmentCountBezier,d=X(0,n,s,i,d),r=n.b[0]):r=n}x&&b(t,r)||l(r)}return s.partOffsets[y]=f,s}function E(e){const t=Y(e),{vertexCount:r,partCount:n,hasZ:s,hasM:i}=e,o=w(e);if("point"===e.type){const[t,r]=e.vertexXY,n=e.vertexZ?.[0],s=e.vertexM?.[0];return{x:t,y:r,z:n,m:s,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<r;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:s,hasM:i}}const u="polygon"===e.type;if(!e.hasCurves()){const r=new Array;for(let s=0;s<n;++s){const n=e.partOffsets[s+1],i=new Array;for(;a<n;)i.push(t(a++));u&&i.length>0&&i.push(i[0]),r.push(i)}return u?{rings:r,hasZ:s,hasM:i,spatialReference:o}:{paths:r,hasZ:s,hasM:i,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:r}of e.parts){const e=[r];for(const{curve:r}of t)e.push(r);c.push(e)}return u?{rings:[],curveRings:c,hasZ:s,hasM:i,spatialReference:o}:{paths:[],curvePaths:c,hasZ:s,hasM:i,spatialReference:o}}function P(e,{lengths:t,coords:r,hasZ:n,hasM:s},i){const o=e.includes("point")?0:t.length,a="polygon"===e,u="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);n??=!1,s??=!1;const c=A(e,u,o,n,s,!1,0,0);if(c.spatialReference=i??void 0,!c.isMultipart()){for(let e=0,t=0;e<u;++e)c.vertexXY[2*e]=r[t++],c.vertexXY[2*e+1]=r[t++],n&&(c.vertexZ[e]=r[t++]),s&&(c.vertexM[e]=r[t++]);return c}const h=2+Number(n)+Number(s);let m=0,l=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[l],i=t+e-Number(a);c.partOffsets[++l]=i;for(let e=t;e<i;++e)c.vertexXY[2*e]=r[m++],c.vertexXY[2*e+1]=r[m++],n&&(c.vertexZ[e]=r[m++]),s&&(c.vertexM[e]=r[m++]);a&&(m+=h)}return c}function _({type:e,vertexCount:t,vertexXY:r,vertexZ:n,vertexM:s,partCount:i,partOffsets:o,hasZ:a,hasM:u}){const c=new f.A([],[],a,u);i=Math.max(i,1);const h="polygon"===e;let m=0;for(let e=0;e<i;++e){const i=o?.[e+1]??t,l=c.coords.length;for(let e=m;e<i;++e)c.coords.push(r[2*e],r[2*e+1]),a&&c.coords.push(n[e]),u&&c.coords.push(s[e]);if(h){const e=m;c.coords.push(r[2*e],r[2*e+1]),a&&c.coords.push(n[e]),u&&c.coords.push(s[e])}c.lengths.push((c.coords.length-l)/c.stride),m=i}return"point"===e&&(c.lengths.length=0),c}function G(...e){const t=new Set;for(const r of e){if(!r)continue;const e=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(const r of e){const e=r?.buffer;e&&t.add(e)}}return Array.from(t)}function O(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===r)&&(n=void 0);const s=e.getVCS();if(null==s)return{wkid:r,latestWkid:n,wkt:t};const i=s.isCustomWkid()?0:s.getOldID();if(i<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===i)&&(o=void 0),{wkid:r,wkt:t,latestWkid:n,vcsWkid:i,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new x({...e.toFlatGeometry(),spatialReference:t})}class S{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function w({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function Y({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?n=>[e[2*n],e[2*n+1],t[n],r[n]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function b(e,t){return e.every((e,r)=>e===t[r])}function A(e,t,r,n,s,i,o,a){o??=0,a??=0;const u=new x({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(c+=Float64Array.BYTES_PER_ELEMENT*t),s&&(c+=Float64Array.BYTES_PER_ELEMENT*t),u.isMultipart()&&(c+=(r+1)*Int32Array.BYTES_PER_ELEMENT,c+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=u.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const h=new ArrayBuffer(c);let m=0;return u.vertexXY=new Float64Array(h,m,2*t),m+=u.vertexXY.byteLength,n&&(u.vertexZ=new Float64Array(h,m,t),m+=u.vertexZ.byteLength),s&&(u.vertexM=new Float64Array(h,m,t),m+=u.vertexM.byteLength),i&&(u.segmentParams=new Float64Array(h,m,u.segmentParamCount),m+=u.segmentParams.byteLength,u.segmentIndices=new Int32Array(h,m,t),u.segmentIndices.fill(T),m+=u.segmentIndices.byteLength),u.isMultipart()&&(u.partOffsets=new Int32Array(h,m,r+1),m+=u.partOffsets.byteLength,u.partFlags=new Int8Array(h,m,r+1),m+=u.partFlags.byteLength,"polygon"===u.type&&u.partFlags.subarray(0,r).fill(1)),i&&(u.segmentFlags=new Int8Array(h,m,t),u.segmentFlags.fill(1),m+=u.segmentFlags.byteLength),u}function R(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const[a,[u,c],h,m,l,f,x]=t.a;let p=4;m||(p|=1),h||(p|=2);const y=(0,g.SW)(e,t),[v,d]=(0,g.Uk)(y,.5);return s[o++]=p,s[o++]=f,s[o++]=x,s[o++]=l,s[o++]=u,s[o++]=c,s[o++]=y.u2-y.u1,s[o++]=y.u1,s[o++]=v,s[o++]=d,o}function F(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const a=(0,l.io)(e,t);return V(a,4,...(0,u.mq)(a,.5),s,o)}function I(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){return r[i]=4,n[i]=o,V((0,c.pM)(e,t),0,...t.c[1],s,o)}function V(e,t,r,n,s,i){const{cx:o,cy:a,thetaStart:u,thetaEnd:c,radius:h}=e;return u>c||(t|=1),Math.abs(c-u)<=Math.PI||(t|=2),s[i++]=t,s[i++]=h,s[i++]=1,s[i++]=0,s[i++]=o,s[i++]=a,s[i++]=c-u,s[i++]=u,s[i++]=r,s[i++]=n,i}function X(e,{b:[t,[r,n],[s,i]]},{segmentFlags:o,segmentIndices:a,segmentParams:u},c,h){return o[c]=2,a[c]=h,u[h++]=r,u[h++]=n,u[h++]=s,u[h++]=i,h}const Z=1.61803,T=-1},91577(e,t,r){r.d(t,{execute:()=>f,qT:()=>p,zo:()=>x});var n=r(76061),s=r(61691),i=r(55537),o=r(95213),a=r(88885),u=r(79187);class c extends s.G{m_progressTracker;m_bMerge;m_bDone;m_inputGeometryCursor;m_index;constructor(e,t,r){super(),t||(0,i.a)(""),this.m_progressTracker=r,this.m_index=-1,this.m_bMerge=e,this.m_bDone=!1,this.m_inputGeometryCursor=t}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge){if(!this.m_bDone){const e=h(this.m_inputGeometryCursor);return this.m_bDone=!0,e}return null}if(!this.m_bDone){const e=this.m_inputGeometryCursor.next();if(null!==e)return(0,i.p)(e),(0,i.c)(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),m(e);this.m_bDone=!0}return null}}function h(e,t){const r=new a.C;let n;for(;n=e.next();)(0,i.p)(n),(0,i.c)(n),r.addGeometry(n);return r.getBoundingGeometry()}function m(e,t){if((0,i.c)(e),e.isEmpty())return e.createInstance();const r=e.getGeometryType();if((0,i.h)(r)){const t=e;if(t.isDegenerate(0)){const e=new o.P;return t.queryStart(e),e}if(t.getGeometryType()===i.G.enumLine){const r=new o.P,n=new a.a({vd:e.getDescription()});return t.queryStart(r),n.startPathPoint(r),t.queryEnd(r),n.lineToPoint(r),n}{const r=new a.a({vd:e.getDescription()});return r.addSegment(t,!0),m(r)}}if(r===i.G.enumEnvelope){const t=e,r=new u.Envelope2D;if(t.queryEnvelope(r),r.xmin===r.xmax&&r.ymin===r.ymax){const e=new o.P;return t.queryCornerByVal(0,e),e}if(r.xmin===r.xmax||r.ymin===r.ymax){const r=new o.P,n=new a.a({vd:e.getDescription()});return t.queryCornerByVal(0,r),n.startPathPoint(r),t.queryCornerByVal(1,r),n.lineToPoint(r),n}{const r=new a.P({vd:e.getDescription()});return r.addEnvelope(t,!1),r}}if(r===i.G.enumGeometryCollection)return h((0,a.g)(e,-1));if(l(e)){if(r===i.G.enumMultiPoint){const t=e,r=new o.P;return t.getPointByVal(0,r),r}return e}return(0,i.g)((0,i.i)(r)),(0,a.f)(e)}function l(e,t){if((0,i.c)(e),e.isEmpty())return!0;const r=e.getGeometryType();if(r===i.G.enumPoint)return!0;if(r===i.G.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,i.h)(r)){const t=e;if(t.isDegenerate(0))return!1;if(r===i.G.enumLine)return!0;const n=new a.a;return n.addSegment(t,!0),l(n)}if(r===i.G.enumMultiPoint)return 1===e.getPointCount();if(r===i.G.enumPolyline){const t=e;return!t.hasNonLinearSegments()&&1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(r===i.G.enumGeometryCollection){const t=e;return 1===t.getGeometryCount()&&l(t.getGeometry(0))}const n=e;return!(1!==n.getPathCount()||n.getPointCount()<3)&&(0,a.i)(n,0)}const g=new class{getOperatorType(){return 10102}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r){return new c(t,e,r)}execute(e,t){return m(e)}isConvex(e,t){if((0,i.c)(e),e.isEmpty())return!0;const r=e.getGeometryType();if(r===i.G.enumPoint)return!0;if(r===i.G.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,i.h)(r)){const t=e;return!t.getStartXY().equals(t.getEndXY())}if(r===i.G.enumMultiPoint)return 1===e.getPointCount();if(r===i.G.enumPolyline){const t=e;return 1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(r===i.G.enumGeometryCollection){const r=e;return 1===r.getGeometryCount()&&this.isConvex(r.getGeometry(0),t)}const n=e;return!(1!==n.getPathCount()||n.getPointCount()<3)&&(0,a.i)(n,0)}constructOrientedMinimumBoundingBox(e,t,r,n,s){(0,a.e)(e,t,r,n,s)}};function f(e){return g.execute(e,null)}function x(e,t){const r=g.executeMany(new n.S(e),t,null);return Array.from(r)}function p(e){return g.isConvex(e,null)}},55666(e,t,r){r.r(t),r.d(t,{convexHullExecute:()=>o,convexHullExecuteMany:()=>u,convexHullIsConvex:()=>h,execute:()=>a,executeMany:()=>c,isConvex:()=>m});var n=r(91577),s=r(85036),i=r(83299);function o(e){const t=(0,i.fromGeometry)(e);return(0,i.toGeometry)((0,n.execute)(t.getGeometry()),t.getSpatialReference())}function a(e){return(0,s.Q)("json.convexHullOperator","execute","convexHullExecute"),o(e)}function u(e,t={}){const{merge:r=!1}=t,[s,o]=(0,i.fromGeometries)(e);return(0,n.zo)(s,r).map(e=>(0,i.toGeometry)(e,o))}function c(e,t={}){return(0,s.Q)("json.convexHullOperator","executeMany","convexHullExecuteMany"),u(e,t)}function h(e){return(0,n.qT)((0,i.fromGeometryToGXGeometry)(e))}function m(e){return(0,s.Q)("json.convexHullOperator","isConvex","convexHullIsConvex"),h(e)}},85036(e,t,r){r.d(t,{Q:()=>i});var n=r(51447),s=r(53966);function i(e,t,r){(0,n.io)(s.A.getLogger(`esri.geometry.operators.${e}`),`${t} is deprecated. Refactor using @arcgis/codemod or manually replace usages with ${r} instead.`,{replacement:r,warnOnce:!0})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1003],{1003(e,t,s){s.r(t),s.d(t,{default:()=>pe});var i=s(49186),n=s(32198),a=s(91429),r=s(49859),o=s(68197),l=s(5443),c=s(16930),f=s(73444),u=s(94778),h=s(14140);function p(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function d(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function m(e){const{axes:t}=e.domain,s=Object.keys(t),i=[],n=[];let a=-1,r=-1,o=[];for(let e=0;e<s.length;e++){const l=s[e];p(l)?a=e:d(l)&&(r=e);const c=t[l],f=[];if("values"in c){c.values.forEach(e=>f.push("string"==typeof e?new Date(e).getTime():e));const e=f[1]-f[0];i.push([f[0]-.5*e,f[f.length-1]+.5*e]),n.push(e)}else{const{start:e,stop:t,num:s}=c,a=(t-e)/(s-1);i.push([e-.5*a,t+.5*a]),n.push(a);for(let t=0;t<s;t++)f.push(e+a*t)}o.push({name:l,values:f,extent:[f[0],f[f.length-1]]})}a>-1&&-1===r?r=0===a?1:0:r>-1&&-1===a?a=0===r?1:0:-1===r&&-1===a&&(a=0,r=1),o=o.filter((e,t)=>!(t===a||t===r));const{referencing:f}=e.domain,u=f.find(e=>e.coordinates.includes(s[a])).system.id,h=u?.slice(u.lastIndexOf("/")+1),m=null==h||"CRS84"===h?4326:Number(h),g=new c.A({wkid:m}),[y,x]=i[a],[w,I]=i[r],b=new l.A({xmin:y,xmax:x,ymin:w,ymax:I,spatialReference:g});return{width:Math.round(b.width/n[a]),height:Math.round(b.height/n[r]),extent:b,dimensions:o}}function g(e){const t=(0,f.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function y(){return Math.round(255*Math.random())}function x(e){const t={},{parameters:s}=e;if(!s)return t;for(const[e,i]of Object.entries(s)){const{type:s,description:n,unit:a,categoryEncoding:r,observedProperty:l}=i;if("Parameter"===s&&(t[e]={},n&&(t[e].description=g(n)),a&&(t[e].unit=a.label?g(a.label):null,t[e].symbol=a.symbol?.value),r)){const s=Object.entries(r).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1}));let i=!1;l?.categories?.length&&(l.categories.forEach(e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),n=s.find(e=>e.ClassName===t);if(!n)return;const a=e.label?g(e.label):null;if(n.Label=a,e.preferredColor){const t=o.A.fromHex(e.preferredColor);t&&(i=!0,n.Red=t.r,n.Green=t.g,n.Blue=t.b)}}),i&&s.forEach(e=>{null==e.Red&&(e.Red=y(),e.Green=y(),e.Blue=y())}));const n={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:s.map(e=>({attributes:e}))};i&&n.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=n}}return t}function w(e){let t=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(let i=0;i<e.length;i++){const n=e[i];null!=n&&(n<t&&(t=n),n>s&&(s=n))}return(0,u.X1)(t,s)}function I(e,t,s){const i=e.map((e,s)=>({name:e,count:t[s]})).sort((e,t)=>e.name>t.name?-1:1),n=(a=1,e=>a*=e.count);var a;const r=[...i.slice(1),{name:"",count:1}].reverse().map(n).reverse();let o=0;for(let n=e.length-1;n>=0;n--)o+=r[i.findIndex(({name:t})=>t===e[n])]*(s%t[n]),s=Math.floor(s/t[n]);return o}var b=s(17676),v=s(4366),C=s(47520),S=s(51927),T=s(45617),A=s(87186);let R=class extends r.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.preGenerateTiles=!0,this.source=null}get url(){return""}fetchRawTile(e,t,s,i={}){if(!this._pixelBlockTiles){const{rasterInfo:n}=this,[a,r]=n.storageInfo.tileInfo.size,{sliceId:o}=i,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==n.dataType,tileSize:{width:a,height:r},level:e,row:t,col:s},f=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,i):(0,C.J$)(c);return Promise.resolve(f)}const n=this._pixelBlockTiles.get(`${e}/${t}/${s}`);return Promise.resolve(n)}async _open(e){const t=this.source,{pixelBlocks:s,attributeTable:i,statistics:n,histograms:a,name:r,nativeExtent:o,transform:f,colormap:u}=t,h=s[0],{width:p,height:d,pixelType:m}=h,g=t.extent??new l.A({xmin:-.5,ymin:.5,xmax:p-.5,ymax:d-.5,spatialReference:new c.A({wkid:3857})}),y=t.isPseudoSpatialReference??!t.extent,x={x:g.width/p,y:g.height/d},w={...t.keyProperties};t.dataType&&(w.DataType=t.dataType),t.bandInfos&&(w.BandProperties=t.bandInfos.map(e=>e.toJSON())),i&&(w.DataType="Thematic");const I=new A.A({width:p,height:d,pixelType:m,extent:g,nativeExtent:o,attributeTable:i,colormap:u,transform:f,pixelSize:x,spatialReference:g.spatialReference,bandCount:h.pixels.length,keyProperties:w,multidimensionalInfo:t.multidimensionalInfo,statistics:n,isPseudoSpatialReference:y,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(I),this.createRemoteDatasetStorageInfo(I,512,512),this._set("rasterInfo",I),this.updateTileInfo(),I.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,I.multidimensionalInfo):this.preGenerateTiles&&await this._buildInMemoryRaster(h,{width:512,height:512},e),I.multidimensionalInfo||(this.source=null),this.datasetName=r}async _buildInMemoryRaster(e,t,s){const{rasterInfo:n}=this,a=n.storageInfo.maximumPyramidLevel??0,r="thematic"!==n.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:a,useBilinear:r},s):Promise.resolve((0,C.lD)(e,t,a,r)),l=null!=n.statistics,c=null!=n.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},s):Promise.resolve((0,S.f4)(e)),u=await(0,b.Lx)([o,f]);if(!u[0].value&&u[1].value)throw new i.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=u[0].value,l||(n.statistics=u[1].value?.statistics),c||(n.histograms=u[1].value?.histograms)}async _buildMDimStats(e,t,s){for(let i=0;i<t.variables.length;i++){const n=t.variables[i];if(n.statistics)continue;const a=n.dimensions.map(e=>new T.A({variableName:n.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),r=(0,v.NG)(a,t),o=null==r?null:e[r];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},s):(0,S.eH)(o);n.statistics=l.statistics,n.histograms||(n.histograms=l.histograms)}}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],R.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,a.MZ)({constructOnly:!0})],R.prototype,"preGenerateTiles",void 0),(0,n.Cg)([(0,a.MZ)()],R.prototype,"source",void 0),(0,n.Cg)([(0,a.MZ)()],R.prototype,"url",null),R=(0,n.Cg)([(0,a.$K)("esri.layers.raster.datasets.InMemoryRaster")],R);const M=R;var O=s(22671);let _=class extends r.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,s,i={}){return this._inMemoryRaster.fetchRawTile(e,t,s,i)}async _open(e){const{extent:t,pixelBlocks:s,multidimensionalInfo:i,attributeTable:n,bandNames:a}=await this._fetchData(e),{statistics:r,histograms:o}=(0,S.eH)(s[0]),l=a?.map(e=>({BandName:e})),c={DataType:n?"Thematic":i?"Scientific":"Generic",BandProperties:l},f=new M({source:{extent:t,pixelBlocks:s,attributeTable:n?O.A.fromJSON(n):null,multidimensionalInfo:i,statistics:r,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await f.open(),this._inMemoryRaster=f;const u=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",u.slice(0,u.indexOf("."))),this._set("rasterInfo",f.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,s="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new i.A(s,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new i.A(s,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new i.A(s,"Missing domain referencing in the grid coverage data");const n=Object.values(t.ranges);for(let e=0;e<n.length;e++){const{axisNames:t,shape:a,type:r,values:o}=n[e];if(!("ndarray"===r.toLowerCase()&&o?.length&&t?.length&&a?.length))throw new i.A(s,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!p(t[t.length-1])||!d(t[t.length-2]))throw new i.A(s,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:s,extent:i,dimensions:n}=m(e),{ranges:a}=e,r=Object.keys(a).sort((e,t)=>e<t?-1:1),o=[];for(let e=0;e<r.length;e++){const t=r[e];n?.length&&o.push({name:t,dimensions:n})}const l=x(e);o.forEach(e=>l[e.name]&&Object.assign(e,l[e.name]));const c=o.length?{variables:o}:void 0,f=[];for(let e=0;e<r.length;e++){const i=r[e],{values:o,dataType:l,axisNames:c,shape:u}=a[i],p=u.length>2?e*u.slice(0,-2).reduce((e,t)=>e*t):0,d=c.slice(0,-2),m=u.slice(0,-2),g="float"===l?"f32":w(o),y=t*s,x=o.length/y;for(let i=0;i<x;i++){const a=h.A.createEmptyBand(g,y),r=new Uint8Array(y).fill(255);let l=!1;const c=i*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(r[e]=0,l=!0):a[e]=t}if(0===e||n?.length){const e=new h.A({width:t,height:s,mask:l?r:null,pixels:[a],pixelType:g});e.updateStatistics(),n?.length?f[I(d,m,i)+p]=e:f.push(e)}else{const e=f[i];e.pixels.push(a),l?e.mask&&(e.mask=h.A.combineBandMasks([e.mask,r])):e.mask=l?r:null}}}const u=Object.values(l).find(e=>e.attributeTable)?.attributeTable;return{extent:i,pixelBlocks:f,multidimensionalInfo:c,attributeTable:u,bandNames:c?void 0:r}}(t)}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],_.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,a.MZ)({constructOnly:!0})],_.prototype,"source",void 0),_=(0,n.Cg)([(0,a.$K)("esri.layers.raster.datasets.CovJSONRaster")],_);const k=_;var F=s(4576),P=s(21325),B=s(330),D=s(43163);function N(e,t){if(!e||!t)return null;const s=[];for(let i=0;i<e.length;i++)s.push(e[i]),s.push(t[i]);return s}function E(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new c.A({wkid:t});if(e=String(e).trim(),(0,P.jp)(e))return new c.A({wkt2:e});const s=e.toUpperCase();if(s.startsWith("COMPD_CS")){if(!s.includes("VERTCS")||!s.includes("GEOGCS")&&!s.startsWith("PROJCS"))return null;const i=s.indexOf("VERTCS"),n=s.indexOf("PROJCS"),a=n>-1?n:s.indexOf("GEOGCS");if(-1===a)return null;const r=e.slice(a,e.lastIndexOf("]",i)+1).trim(),o=e.slice(i,e.lastIndexOf("]")).trim();t=L(r);const l=new c.A(t?{wkid:t}:{wkt:r}),f=L(o);return f&&(l.vcsWkid=f),l}return s.startsWith("GEOGCS")||s.startsWith("PROJCS")?(t=L(e),new c.A(0!==t?{wkid:t}:{wkt:e})):null}function L(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),s=t[t.length-1].split(","),i=s[0]?.toLowerCase();if(("epsg"===i||"esri"===i)&&e.endsWith('"]]')){const e=Number(s[1]);if(!isNaN(e)&&0!==e)return e}return 0}function J(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,B.g7)(e,"SRS")){if(!t.spatialReference){const s=(0,B.mX)(e);t.spatialReference=E(s)}}else if((0,B.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:s,transform:i}=function(e){const t=(0,B.V6)(e,"GeodataXform"),s=E((0,B.v7)(t,"SpatialReference/WKID")||(0,B.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:s,transform:null};const i=(0,B.v7)(t,"PolynomialOrder")??1,n=(0,B.Ui)(t,"CoeffX/Double"),a=(0,B.Ui)(t,"CoeffY/Double"),r=(0,B.Ui)(t,"InverseCoeffX/Double"),o=(0,B.Ui)(t,"InverseCoeffY/Double"),l=N(n,a),c=N(r,o);return{spatialReference:s,transform:l&&c&&l.length&&c.length?new D.A({spatialReference:s,polynomialOrder:i,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=i,t.spatialReference||(t.spatialReference=s)}else(0,B.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,B.mX)(e));else if((0,B.g7)(e,"PAMRasterBand")){const s=function(e){const t=(0,B.v7)(e,"NoDataValue"),s=(0,B.V6)(e,"Histograms/HistItem"),i=(0,B.v7)(s,"HistMin"),n=(0,B.v7)(s,"HistMax"),a=(0,B.v7)(s,"BucketCount"),r=(0,B.mX)(s,"HistCounts")?.split("|").map(e=>Number(e));let o,l,c,f;(0,B.IC)(e,"Metadata/MDI").forEach(e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":f=t}});const u=(0,B.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:r?.length&&null!=i&&null!=n?{min:i,max:n,size:a||r.length,counts:r}:null,sourceBandIndex:u,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:f}:null}}(e);null!=s.sourceBandIndex&&null==t.rasterBands[s.sourceBandIndex]?t.rasterBands[s.sourceBandIndex]=s:t.rasterBands.push(s)}});const s=t.rasterBands;if(s.length){const e=!!s[0].statistics;t.statistics=e?s.map(e=>e.statistics).filter(F.Ru):null;const i=!!s[0].histogram;t.histograms=i?s.map(e=>e.histogram).filter(F.Ru):null}return t}var z=s(96271);let H=class extends r.A{set rasterJobHandler(e){this._set("rasterJobHandler",e),this._inMemoryRaster&&(this._inMemoryRaster.rasterJobHandler=e)}fetchRawTile(e,t,s,i={}){if(this._imageBlob){const{blockWidth:i,blockHeight:n}=this.rasterInfo.storageInfo;return this.decodePixelBlock(this._imageBlob,{tileSize:[i,n],tileIndex:[e,t,s],canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0})}return this._inMemoryRaster.fetchRawTile(e,t,s,i)}async _open(e){const t=await this._fetchData(e);if(null==t)throw new i.A("image-aux-raster:open","the data cannot be decoded");let{spatialReference:s,statistics:n,histograms:a,transform:r}=await this._fetchAuxiliaryData(e);const o=!s;o&&(s=new c.A({wkid:3857})),a?.length&&null==n&&(n=(0,S.Pg)(a));const{width:f,height:u}=t;let h=new l.A({xmin:-.5,ymin:.5-u,xmax:f-.5,ymax:.5,spatialReference:s});const p=r?r.forwardTransform(h):h;let d=!0;if(r){const e=r.forwardCoefficients;d=e&&0===e[1]&&0===e[2],d&&(r=null,h=p)}const{rasterJobHandler:m,ioConfig:g}=this,y=new M({preGenerateTiles:!1,rasterJobHandler:m,source:{extent:p,nativeExtent:h,transform:r,pixelBlocks:[t],statistics:n,histograms:a,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:o},ioConfig:{...g,sampling:"closest",skipStatistics:!0}});await y.open(),y.source=null,this._set("rasterInfo",y.rasterInfo),this._inMemoryRaster=y}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),s=(0,z.g)(t);if("jpg"!==s&&"png"!==s&&"gif"!==s&&"bmp"!==s)throw new i.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",s.toUpperCase());const n=s.toLowerCase();try{const e=await this.decodePixelBlock(t,{format:n,canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0});return this._imageBlob=t,e}catch{return this.decodePixelBlock(t,{format:n,canvasUsage:"no-canvas",skipStatistics:!0})}}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:s=[],skipMapInfo:i}=this.ioConfig,n=i||s.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),a=this.datasetFormat,r="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,o=r&&s.includes(r)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+r,{responseType:"text",signal:t}),l=await(0,b.Lx)([n,o]);if(t?.aborted)throw(0,b.NK)();const c=J(l[0].value?.data);if(!c.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;c.transform=6===e?.length?new D.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return c}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],H.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,a.MZ)()],H.prototype,"rasterJobHandler",null),H=(0,n.Cg)([(0,a.$K)("esri.layers.raster.datasets.ImageAuxRaster")],H);const U=H;var G=s(97768),q=s(84952),j=s(86738),V=s(75414),W=s(20223),Z=s(87045),X=s(25943),$=s(82371);let Y=class extends r.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,s,i={}){const{storageInfo:n,extent:a}=this.rasterInfo,{transposeInfo:r}=n,o=null!=r&&!!i.transposedVariableName;if(this._slices&&!o&&null==i.sliceId)return null;const l=o?0:n.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${s}`,f={...this._slices?o?{variable:i.transposedVariableName}:{sliceId:i.sliceId||0}:null,...i.refreshParameters};let u,h;if(n.isBsqTile){const e=(i.bandIds?.length?i.bandIds:[0,1,2]).map(e=>this.request(c,{query:{...f,bandId:e},responseType:"array-buffer",signal:i.signal})),t=await Promise.all(e),s=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),n=new Uint8Array(s);h=[];let a=0;for(const{data:e}of t)h.push(a),n.set(new Uint8Array(e),a),a+=e.byteLength;u=n.buffer}else u=(await this.request(c,{query:f,responseType:"array-buffer",signal:i.signal})).data;if(!u)return null;const{tileInfo:p}=n,d=o?r.tileSize:p.size,m=/^(mixed|jp)/i.test(p.format),g=await this.decodePixelBlock(u,{width:d[0],height:d[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue,applyJpegMask:m});if(null==g)return null;const y=n.blockBoundary[e];if("jpg"!==n.compression||s>y.minCol&&s<y.maxCol&&t>y.minRow&&t<y.maxRow)return g;const{origin:x,blockWidth:w,blockHeight:I}=n,{x:b,y:v}=this.getPyramidPixelSize(e),S=Math.round((a.xmin-x.x)/b)%w,T=Math.round((a.xmax-x.x)/b)%w||w,A=Math.round((x.y-a.ymax)/v)%I,R=Math.round((x.y-a.ymin)/v)%I||I,M=s===y.minCol?S:0,O=t===y.minRow?A:0,_=s===y.maxCol?T:w,k=t===y.maxRow?R:I;return(0,C.z$)(g,{x:M,y:O},{width:_-M,height:k-O}),g}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const s=this._slices[e].multidimensionalDefinition;if(s.length===t.length&&!s.some(e=>{const s=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!s||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(s.values[0])?`${s.values[0][0]}-${s.values[0][1]}`:s.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){const s=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),i=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),n=await Promise.all([s,i]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),n[1]?.[0]?.counts?.length||(n[1]=null),{statistics:n[0]||null,histograms:n[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let s=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===s)return null;let i=0;const{maximumPyramidLevel:n}=this.rasterInfo.storageInfo;let a=n-i+this._levelOffset;const r=s.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,s.row,s.col,t))break}catch{}if(a--,i++,s=this.identifyPixelLocation(r,i,t.datumTransformation),null===s)return null}return-1===a||null==s?null:i}async _open(e){const t=e?.signal,s=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});s.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const n=s.data;if(this.sourceJSON=n,!n)throw new i.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!n.tileInfo)throw new i.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=n.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(n.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===n.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=n.name?.slice(n.name.indexOf("/")+1)??"";const a=this.rasterInfo??await this._fetchRasterInfo({signal:t});if(null==a)throw new i.A("image-server-raster:open","cannot initialize image service");(0,$.E9)(a,n);const r="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:s,maxScale:i,minLOD:n,maxLOD:a}=t;if(null!=n&&null!=a)return Z.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=n&&e<=a)});if(0!==s&&0!==i){const t=e=>Math.round(1e4*e)/1e4,n=s?t(s):1/0,a=i?t(i):-1/0;return Z.A.fromJSON({...e,lods:e.lods.filter(e=>{const s=t(e.scale);return s<=n&&s>=a})})}return Z.A.fromJSON(e)}(n.tileInfo,n):Z.A.fromJSON(n.tileInfo);(0,G.Lw)(r);const[o,l]=this._computeMinMaxLOD(a,r),{extent:c,pixelSize:f}=a,u=.001*Math.min(f.x,f.y);(f.x!==f.y||Math.abs(o.resolution-f.x)>u)&&(f.x=f.y=o.resolution,a.width=Math.ceil((c.xmax-c.xmin)/f.x-.1),a.height=Math.ceil((c.ymax-c.ymin)/f.y-.1));const h=o.level-l.level,[p,d]=r.size,m=[],g=[],{lods:y}=r;y.forEach((e,t)=>{e.level>=l.level&&e.level<=o.level&&m.push({x:e.resolution,y:e.resolution}),t<y.length-1&&g.push(Math.round(10*e.resolution/y[t+1].resolution)/10)}),m.sort((e,t)=>e.x-t.x);const x=this.computeBlockBoundary(c,p,d,r.origin,m,h),w=m.length>1?m.slice(1):null;let I;n.transposeInfo&&(I={tileSize:[n.transposeInfo.rows,n.transposeInfo.cols],packetSize:a.keyProperties?._yxs.PacketSize??0});const b=g.length<=1||g.length>=3&&g.slice(0,-1).every(e=>e===g[0])?g[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/h))/10,v=!!n.bsq&&"Raster"===this.tileType;if(a.storageInfo=new W.A({blockWidth:r.size[0],blockHeight:r.size[1],pyramidBlockWidth:r.size[0],pyramidBlockHeight:r.size[1],pyramidResolutions:w,pyramidScalingFactor:b,compression:r.format,origin:r.origin,firstPyramidLevel:1,maximumPyramidLevel:h,tileInfo:r,isBsqTile:v,transposeInfo:I,blockBoundary:x}),function(e){const{extent:t,spatialReference:s}=e;t.xmin>-1&&t.xmax>181&&s?.wkid&&s.isGeographic&&(e.nativeExtent=e.extent,e.transform=new V.A,e.extent=e.transform.forwardTransform(t))}(a),this._set("rasterInfo",a),n.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:a.storageInfo.tileInfo,parsedUrl:(0,q.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new X.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,s=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),i=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),n=c.A.fromJSON(t.spatialReference||e.spatialReference),a=new j.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:n});return new A.A({width:s,height:i,bandCount:3,extent:l.A.fromJSON(e),spatialReference:n,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const s={...e,query:{...this.ioConfig.customFetchParameters,f:"json"}},i=(0,$.Tw)(this.url,this.sourceJSON,s),n=t.hasMultidimensions?this.request(`${this.url}/slices`,s).then(e=>e.data?.slices).catch(()=>null):null,a=await Promise.all([i,n]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:s}=e,i=.5/e.width*s.x,{lods:n}=t,a=t.lodAt(Math.max.apply(null,n.map(e=>e.level))),r=t.lodAt(Math.min.apply(null,n.map(e=>e.level))),{tileType:o}=this;if("Map"===o)return this._levelOffset=n[0].level,[a,r];if("Raster"===o)return[n.find(e=>e.resolution===s.x)??a,r];const{minScale:l,maxScale:c}=this.sourceJSON;let f=a;c>0&&(f=n.find(e=>Math.abs(e.scale-c)<i),f||(f=n.filter(e=>e.scale>c).sort((e,t)=>e.scale>t.scale?1:-1)[0]??a));let u=r;return l>0&&(u=n.find(e=>Math.abs(e.scale-l)<i)??r,this._levelOffset=u.level-r.level),[f,u]}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],Y.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,a.MZ)()],Y.prototype,"tileType",void 0),Y=(0,n.Cg)([(0,a.$K)("esri.layers.raster.datasets.ImageServerRaster")],Y);const K=Y;var Q=s(10713);const ee=new Map([["byte","u8"],["signedbyte","s8"],["int8","s8"],["uint8","u8"],["int16","s16"],["uint16","u16"],["int32","s32"],["uint32","u32"],["float32","f32"],["float64","f64"],["double64","f64"]]),te=new Map;te.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),te.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),te.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),te.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"}),te.set("qb3",{blobExtension:".pq3",isOneSegment:!0,decoderFormat:"qb3"});let se=class extends r.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this._isBsq=!1,this.datasetFormat="MRF"}async fetchRawTile(e,t,s,i={}){const{blockWidth:n,blockHeight:a,blockBoundary:r}=this.rasterInfo.storageInfo,o=r[e];if(!o||o.maxRow<t||o.maxCol<s||o.minRow>t||o.minCol>s)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:f,actualTileWidth:u,actualTileHeight:p}=this._getTileLocation(e,t,s);if(!f||0===f.length)return null;if(f.some(e=>e.from>e.to)){const e=new Uint8Array(n*a);return new h.A({width:n,height:a,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:d}=this.ioConfig,m=this._getBandSegmentCount(),g=[];let y=0;for(y=0;y<m;y++)d&&!d.includes(y)||g.push(this.request(this._files.data,{range:{from:f[y].from,to:f[y].to},responseType:"array-buffer",signal:i.signal}));const x=await Promise.all(g),w=x.map(e=>e.data.byteLength).reduce((e,t)=>e+t),I=new Uint8Array(w),b=[];let v=0;for(y=0;y<m;y++)b.push(v),I.set(new Uint8Array(x[y].data),v),v+=x[y].data.byteLength;const C=te.get(this.rasterInfo.storageInfo.compression).decoderFormat,S="jpg"===C&&4===l&&1===b.length,T=await this.decodePixelBlock(I.buffer,{width:n,height:a,format:C,planes:d?.length||l,offsets:b,pixelType:c,canvasUsage:S?"no-canvas":void 0,decodeJpegAsRgb:!1}).catch(()=>null);if(null==T)return null;let{noDataValue:A}=this.rasterInfo;if(null!=A&&"lerc"!==C&&!T.mask&&(A=A[0],null!=A)){const e=T.width*T.height,t=new Uint8Array(e);if(Math.abs(A)>1e24)for(y=0;y<e;y++)Math.abs((T.pixels[0][y]-A)/A)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)T.pixels[0][y]!==A&&(t[y]=1);T.mask=t}let R=0,M=0;if(u!==n||p!==a){let e=T.mask;if(e)for(y=0;y<a;y++)if(M=y*n,y<p)for(R=u;R<n;R++)e[M+R]=0;else for(R=0;R<n;R++)e[M+R]=0;else for(e=new Uint8Array(n*a),T.mask=e,y=0;y<p;y++)for(M=y*n,R=0;R<u;R++)e[M+R]=1}return T}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,s=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:i,files:n}=this._parseHeader(s.data),{skipMapInfo:a,skipExtensions:r=[]}=this.ioConfig;if(!r.includes("aux.xml")&&!a){const t=await this._fetchAuxiliaryData(e);null!=t&&(i.statistics=t.statistics??i.statistics,i.histograms=t.histograms,t.histograms&&null==i.statistics&&(i.statistics=(0,S.Pg)(t.histograms)))}a&&this.updateImageSpaceRasterInfo(i),this._set("rasterInfo",i),this._files=n;const o=await this.request(n.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t;if(Q.Z){const s=new Uint8Array(e),i=new ArrayBuffer(e.byteLength),n=new Uint8Array(i);for(let t=0;t<e.byteLength/4;t++)for(let e=0;e<4;e++)n[4*t+e]=s[4*t+3-e];t=new Uint32Array(i)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,f=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:u,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,g=-1;for(;m<this._storageIndex.length;){g++;const e=Math.ceil(u/l/f**g)-1,t=Math.ceil(h/c/f**g)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return this._isBsq?this.rasterInfo.bandCount:1}_getTileLocation(e,t,s){const{blockWidth:i,blockHeight:n,pyramidScalingFactor:a}=this.rasterInfo.storageInfo,{width:r,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,f,u,h=0,p=0;for(u=0;u<e;u++)p=a**u,c=Math.ceil(r/i/p),f=Math.ceil(o/n/p),h+=c*f;p=a**e,c=Math.ceil(r/i/p),f=Math.ceil(o/n/p),h+=t*c+s,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,g=0;const y=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],g=m+d[4*e+2]*2**32+d[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:s<c-1?i:Math.ceil(r/p)-i*(c-1),actualTileHeight:t<f-1?n:Math.ceil(o/p)-n*(f-1)}}_parseHeader(e){const t=(0,B.V6)(e,"MRF_META/Raster");if(!t)throw new i.A("mrf:open","not a valid MRF format");const s=(0,B.V6)(t,"Size"),n=parseInt(s.getAttribute("x"),10),a=parseInt(s.getAttribute("y"),10),r=parseInt(s.getAttribute("c"),10),o=((0,B.mX)(t,"Compression")||"none").toLowerCase();if(!te.has(o))throw new i.A("mrf:open","currently does not support compression "+o);const f=(0,B.mX)(t,"DataType")||"UInt8",u=ee.get(f.toLowerCase());if(null==u)throw new i.A("mrf:open","currently does not support pixel type "+f);const h=(0,B.V6)(t,"PageSize"),p=parseInt(h.getAttribute("x"),10),d=parseInt(h.getAttribute("y"),10),m=h.getAttribute("c"),g=m?m===String(r):te.get(o).isOneSegment;this._isBsq=!g;const y=(0,B.V6)(t,"DataValues");let x;if(y){const e=y.getAttribute("NoData");null!=e&&(x=e.trim().split(" ").map(e=>parseFloat(e)))}if((0,B.V6)(e,"MRF_META/CachedSource"))throw new i.A("mrf:open","currently does not support MRF referencing other data files");const w=(0,B.V6)(e,"MRF_META/GeoTags"),I=(0,B.V6)(w,"BoundingBox");let b,v=!1;if(null!=I){const e=parseFloat(I.getAttribute("minx")),t=parseFloat(I.getAttribute("miny")),s=parseFloat(I.getAttribute("maxx")),i=parseFloat(I.getAttribute("maxy")),n=(0,B.mX)(w,"Projection")||"";let a=c.A.WGS84;if("LOCAL_CS[]"!==n)if(n.toLowerCase().startsWith("epsg:")){const e=Number(n.slice(5));isNaN(e)||0===e||(a=new c.A({wkid:e}))}else a=E(n)??c.A.WGS84;else v=!0,a=new c.A({wkid:3857});b=new l.A(e,t,s,i),b.spatialReference=a}else v=!0,b=new l.A({xmin:-.5,ymin:.5-a,xmax:n-.5,ymax:.5,spatialReference:new c.A({wkid:3857})});const C=(0,B.V6)(e,"MRF_META/Rsets"),S=parseInt(C?.getAttribute("scale")||"2",10),T=b.spatialReference,R=new W.A({origin:new j.A({x:b.xmin,y:b.ymax,spatialReference:T}),blockWidth:p,blockHeight:d,pyramidBlockWidth:p,pyramidBlockHeight:d,compression:o,pyramidScalingFactor:S}),M=new j.A({x:b.width/n,y:b.height/a,spatialReference:T}),O=new A.A({width:n,height:a,extent:b,isPseudoSpatialReference:v,spatialReference:T,bandCount:r,pixelType:u,pixelSize:M,noDataValue:x,storageInfo:R}),_=this._getAuxFullPath((0,B.mX)(t,"DataFile")),k=this._getAuxFullPath((0,B.mX)(t,"IndexFile"));return{rasterInfo:O,files:{mrf:this.url,index:k||this.url.replace(".mrf",".idx"),data:_||this.url.replace(".mrf",te.get(o).blobExtension)}}}_getAuxFullPath(e){return e?e.includes("\\")?null:e.includes("/")?e.startsWith(new URL(this.url).origin)?e:null:`${this.url.slice(0,this.url.lastIndexOf("/"))}/${e}`:null}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return J(t)}catch{return null}}};(0,n.Cg)([(0,a.MZ)()],se.prototype,"_files",void 0),(0,n.Cg)([(0,a.MZ)()],se.prototype,"_storageIndex",void 0),(0,n.Cg)([(0,a.MZ)()],se.prototype,"_isBsq",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],se.prototype,"datasetFormat",void 0),se=(0,n.Cg)([(0,a.$K)("esri.layers.raster.datasets.MRFRaster")],se);const ie=se;s(44208);var ne=s(53966),ae=s(9334);function re(e){const t=e.fields,s=e.records,i=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",n=[{name:i,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),a=n.map(e=>e.name),r=[];let o=0,l=0;return s.forEach(e=>{const t={};for(t[i]=o++,l=1;l<a.length;l++)t[a[l]]=e[l-1];r.push({attributes:t})}),{displayFieldName:"",fields:n,features:r}}class oe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),s=3&t.getUint8(0);if(3!==s)return{header:{version:s},recordSet:null};const i=t.getUint32(4,!0),n=t.getUint16(8,!0),a=t.getUint16(10,!0),r={version:s,recordCount:i,headerByteCount:n,recordByteCount:a};let o=32;const l=[],c=[];let f;if(3===s){for(;13!==t.getUint8(o);)f=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,ae.w)(new Uint8Array(e,o,11)),type:f,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(f)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<i&&e.byteLength-o>a;){const s=[];32===t.getUint8(o)?(o+=1,l.forEach(t=>{if("C"===t.type)s.push((0,ae.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)s.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)s.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const i=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();s.push(new Date(parseInt(i.slice(0,4),10),parseInt(i.slice(4,6),10)-1,parseInt(i.slice(6,8),10)))}o+=t.length}),c.push(s)):o+=a}}return{header:r,fields:l,records:c,recordSet:re({fields:l,records:c})}}}var le=s(44094),ce=s(94213);let fe=class extends r.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,s,i={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,s))return null;const n=await this._fetchRawTiffTile(e,t,s,!1,i);if(null!=n&&this._headerInfo.hasMaskBand){const a=await this._fetchRawTiffTile(e,t,s,!0,i);null!=a&&a.pixels[0]instanceof Uint8Array&&(n.mask=a.pixels[0])}return n}async _open(e){const t=e?e.signal:null,{data:s}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!s)throw new i.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:n,firstIFDPos:a,isBigTiff:r}=(0,le.uT)(s),o=[],f={fileChunk:s,posIFD:a,fileOffset:0};await this._readIFDs(o,f,n,r?8:4,t);const{imageInfo:u,rasterInfo:h}=function(e){const t=(0,le.uc)(e),{width:s,height:i,tileWidth:n,tileHeight:a,planes:r,pixelType:o,compression:f,firstPyramidLevel:u,maximumPyramidLevel:h,pyramidBlockWidth:p,pyramidBlockHeight:d,pyramidResolutions:m,tileBoundary:g,affine:y,metadata:x,colormap:w}=t;let I=E(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),b=!!t.isPseudoGeographic;null==I&&(b=!0,I=new c.A({wkid:3857}));const v=new l.A({...t.extent,spatialReference:I}),C=new j.A(v?{x:v.xmin,y:v.ymax,spatialReference:I}:{x:0,y:0}),S=new W.A({blockWidth:n,blockHeight:a,pyramidBlockWidth:p,pyramidBlockHeight:d,compression:f,origin:C,firstPyramidLevel:u,maximumPyramidLevel:h,pyramidResolutions:m,blockBoundary:g}),T=new j.A({x:(v.xmax-v.xmin)/s,y:(v.ymax-v.ymin)/i,spatialReference:I}),R=x?{BandProperties:x.bandProperties,DataType:x.dataType}:{},M=new A.A({width:s,height:i,bandCount:r,pixelType:o,pixelSize:T,storageInfo:S,spatialReference:I,isPseudoSpatialReference:b,keyProperties:R,extent:v,colormap:w,statistics:x?x.statistics:null});if(y?.length&&(M.nativeExtent=new l.A({xmin:-.5,ymin:.5-i,xmax:s-.5,ymax:.5,spatialReference:I}),M.transform=new D.A({polynomialOrder:1,forwardCoefficients:[y[2]+y[0]/2,y[5]-y[3]/2,y[0],y[3],-y[1],-y[4]]}),M.extent=M.transform.forwardTransform(M.nativeExtent),M.pixelSize=new j.A({x:(v.xmax-v.xmin)/s,y:(v.ymax-v.ymin)/i,spatialReference:I}),S.origin.x=-.5,S.origin.y=.5),m){const{x:e,y:t}=M.pixelSize;m.forEach(s=>{s.x*=e,s.y*=t})}return{imageInfo:t,rasterInfo:M}}(o),p=(0,le.zS)(o),d=(0,le.r9)(o);if(this._headerInfo={littleEndian:n,isBigTiff:r,ifds:o,pyramidIFDs:p,maskIFDs:d,...u},this._set("rasterInfo",h),!u.isSupported)throw new i.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new i.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");h.isPseudoSpatialReference&&ne.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const m=o[0].get("PREDICTOR")?.values?.[0],g=o[0].get("SAMPLEFORMAT")?.values?.[0];if(3===g&&2===m)throw new i.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:y,skipExtensions:x=[]}=this.ioConfig;if(!x.includes("aux.xml")&&!y){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,S.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const s=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new j.A({x:(s.xmax-s.xmin)/t.width,y:(s.ymax-s.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=s}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,h)}x.includes("vat.dbf")||1!==h.bandCount||"u8"!==h.pixelType||y||(h.attributeTable=await this._fetchAuxiliaryTable(e),null!=h.attributeTable&&(h.keyProperties.DataType="thematic")),y&&this.updateImageSpaceRasterInfo(h),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:s,fileOffset:i,posIFD:n}=e;return(n+8>=s.byteLength||n<0)&&(i=n+i,s=(await this.request(this.url,{range:{from:i,to:i+this._bufferSize},responseType:"array-buffer",signal:t})).data,n=0),{fileChunk:s,fileOffset:i,posIFD:n}}async _readIFDs(e,t,s,n=4,a){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,a);const r=await this._readIFD(t,s,ce.NB,n,a);if(!r?.ifd)throw new i.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(r.ifd),!r.nextIFD)return null;t.posIFD=r.nextIFD-t.fileOffset,await this._readIFDs(e,t,s,n,a)}async _readIFD(e,t,s=ce.NB,i=4,n){let{fileChunk:a,posIFD:r,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,le.JM)(a,t,r,o,s,i);if(l.success){const e=[];if(l.ifd?.forEach(t=>{t.values||e.push(t)}),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,n),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),s=e?.values;if(s&&s.length>4){const i=s[0]+"."+s[1]+"."+s[2];r=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:a,posIFD:r,fileOffset:o},n),c=await this._readIFD(l,t,ce.YC,2,n);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[i]})}}return l}return l.requiredBufferSize?(a=(await this.request(this.url,{range:{from:o,to:o+r+l.requiredBufferSize+8},responseType:"array-buffer",signal:n})).data,a.byteLength<r+l.requiredBufferSize?null:(e.fileChunk=a,e.fileOffset=o,this._readIFD(e,t,s,i,n))):null}async _fillOffsets(e,t,s,i){const n=e.filter(e=>null!=e.offlineOffsetSize);if(0===n.length)return;const a=n.map(e=>e.offlineOffsetSize),r=Math.min.apply(null,a.map(e=>e[0])),o=Math.max.apply(null,a.map(e=>e[0]+e[1]));let l=1===a.length||o-r<=this._bufferSize;if(!l&&a.length>1&&(a.sort((e,t)=>e[0]-t[0]),l=a.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,a[0][0])===o),l){const e=await this._fetchOffsets(r,Math.max(o,r+this._bufferSize),i);return void n.forEach(s=>(0,le.Cr)(e,t,s,r))}const c=n.map(async e=>{const s=e.offlineOffsetSize,n=await this._fetchOffsets(s[0],s[1]+s[0],i);(0,le.Cr)(n,t,e,s[0])});await Promise.all(c)}async _fetchOffsets(e,t,s){const i=[],n=this._chunkSize,a=Math.ceil((t-e)/n);let r=e;for(let e=0;e<a;e++)i.push(this.request(this.url,{range:{from:r,to:e===a-1?t:r+n-1},responseType:"array-buffer",signal:s})),r+=n;const o=await Promise.all(i);if(1===a)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<a;e++)l.set(new Uint8Array(o[e].data),e*n);return l.buffer}async _fetchRawTiffTile(e,t,s,i,n={}){const a=this._getTileLocation(e,t,s,i);if(!a)return null;const{ranges:r,actualTileWidth:o,actualTileHeight:l,ifd:c}=a,f=r.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:n.signal})),u=await Promise.all(f),h=u.map(e=>e.data.byteLength).reduce((e,t)=>e+t),p=1===u.length?u[0].data:new ArrayBuffer(h),d=[0],m=[0];if(u.length>1){const e=new Uint8Array(p);for(let t=0,s=0;t<u.length;t++){const i=u[t].data;e.set(new Uint8Array(i),s),d[t]=s,s+=i.byteLength,m[t]=i.byteLength}}const{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),x=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:g,height:y,planes:null,pixelType:null});if(null==x)return null;if(o!==g||l!==y){let e=x.mask;if(e)for(let t=0;t<y;t++){const s=t*g;if(t<l)for(let t=o;t<g;t++)e[s+t]=0;else for(let t=0;t<g;t++)e[s+t]=0}else{e=new Uint8Array(g*y),x.mask=e;for(let t=0;t<l;t++){const s=t*g;for(let t=0;t<o;t++)e[s+t]=1}}}return x}_getTileLocation(e,t,s,i=!1){const{firstPyramidLevel:n,blockBoundary:a}=this.rasterInfo.storageInfo,r=0===e?0:e-(n-1),{_headerInfo:o}=this;if(!o)return null;const l=i?o.maskIFDs[r]:0===r?o.ifds[0]:o.pyramidIFDs[r-1];if(!l)return null;const c=(0,le.XO)(l,o),f=(0,le.wc)(l,"TILEOFFSETS"),u=(0,le.wc)(l,"TILEBYTECOUNTS");if(!f?.length||!u?.length)return null;const{minRow:h,minCol:p,maxRow:d,maxCol:m}=a[r];if(t>d||s>m||t<h||s<p)return null;const g=(0,le.LZ)(l,"IMAGEWIDTH"),y=(0,le.LZ)(l,"IMAGELENGTH"),x=(0,le.LZ)(l,"TILEWIDTH"),w=(0,le.LZ)(l,"TILELENGTH"),I=[];if(c){const{bandCount:e}=this.rasterInfo;for(let i=0;i<e;i++){const e=i*(d+1)*(m+1)+t*(m+1)+s;I[i]={from:f[e],to:f[e]+u[e]-1}}}else{const e=t*(m+1)+s;I.push({from:f[e],to:f[e]+u[e]-1})}for(let e=0;e<I.length;e++)if(null==I[e].from||!I[e].to||I[e].to<0)return null;return{ranges:I,ifd:l,actualTileWidth:s===m&&g%x||x,actualTileHeight:t===d&&y%w||w}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return J(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),s=oe.parse(t);return s?.recordSet?O.A.fromJSON(s.recordSet):null}catch{return null}}};(0,n.Cg)([(0,a.MZ)()],fe.prototype,"_files",void 0),(0,n.Cg)([(0,a.MZ)()],fe.prototype,"_headerInfo",void 0),(0,n.Cg)([(0,a.MZ)()],fe.prototype,"_bufferSize",void 0),(0,n.Cg)([(0,a.MZ)()],fe.prototype,"_chunkSize",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],fe.prototype,"datasetFormat",void 0),fe=(0,n.Cg)([(0,a.$K)("esri.layers.raster.datasets.TIFFRaster")],fe);const ue=fe,he=new Map;he.set("MRF",{desc:"Meta Raster Format",constructor:ie}),he.set("TIFF",{desc:"GeoTIFF",constructor:ue}),he.set("RasterTileServer",{desc:"Raster Tile Server",constructor:K}),he.set("JPG",{desc:"JPG Raster Format",constructor:U}),he.set("PNG",{desc:"PNG Raster Format",constructor:U}),he.set("GIF",{desc:"GIF Raster Format",constructor:U}),he.set("BMP",{desc:"BMP Raster Format",constructor:U}),he.set("CovJSON",{desc:"COVJSON Raster Format",constructor:k}),he.set("MEMORY",{desc:"In Memory Raster Format",constructor:M});class pe{static get supportedFormats(){const e=new Set;return he.forEach((t,s)=>e.add(s)),e}static async open(e){const{url:t,ioConfig:s,source:n,sourceJSON:a}=e;let r=e.datasetFormat??s?.datasetFormat;null==r&&(t.includes(".")?r=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===n?.type?.toLowerCase()?r="CovJSON":n?.extent&&n.pixelblocks&&(r="MEMORY")),"OVR"===r||"TIF"===r?r="TIFF":"JPG"===r||"JPEG"===r||"JFIF"===r?r="JPG":"COVJSON"===r&&(r="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(r="RasterTileServer");const o={url:t,source:n,sourceJSON:a,datasetFormat:r,ioConfig:s??{bandIds:null,sampling:null}};if(Object.keys(o).forEach(e=>{null==o[e]&&delete o[e]}),r){if(!this.supportedFormats.has(r))throw new i.A("rasterfactory:open","not a supported format "+r);if("CRF"===r)throw new i.A("rasterfactory:open",`cannot open raster: ${t}`);const s=new(0,he.get(r).constructor)(o);return s.rasterJobHandler=e.rasterJobHandler,s.rasterInfo=e.rasterInfo,await s.open({signal:e.signal}),s}const l=Array.from(he.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e);let c=0;const f=()=>{if(r=l[c++],!r)return null;if("CRF"===r)return null;const t=new(0,he.get(r).constructor)(o);return t.rasterJobHandler=e.rasterJobHandler,t.open({signal:e.signal}).then(()=>t).catch(()=>f())};return f()}static register(e,t,s){he.has(e.toUpperCase())||he.set(e.toUpperCase(),{desc:t,constructor:s})}}},10333(e,t,s){s.d(t,{A:()=>r});var i=s(32198),n=s(25482),a=s(91429);let r=class extends n.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,i.Cg)([(0,a.MZ)()],r.prototype,"affectsPixelSize",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],r.prototype,"spatialReference",void 0),r=(0,i.Cg)([(0,a.$K)("esri.layers.raster.transforms.BaseRasterTransform")],r)},75414(e,t,s){s.d(t,{A:()=>l});var i,n=s(32198),a=s(91429),r=s(10333),o=s(93223);let l=i=class extends r.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new i({tolerance:this.tolerance})}};(0,n.Cg)([(0,o.e)({GCSShiftXform:"gcs-shift"})],l.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)()],l.prototype,"tolerance",void 0),l=i=(0,n.Cg)([(0,a.$K)("esri.layers.raster.transforms.GCSShiftTransform")],l)},43163(e,t,s){s.d(t,{A:()=>d});var i,n=s(32198),a=s(91429),r=s(5443),o=s(86738),l=s(10333),c=s(36005),f=s(43937),u=s(93223);function h(e,t,s){const{x:i,y:n}=t;if(s<2)return{x:e[0]+i*e[2]+n*e[4],y:e[1]+i*e[3]+n*e[5]};if(2===s){const t=i*i,s=n*n,a=i*n;return{x:e[0]+i*e[2]+n*e[4]+t*e[6]+a*e[8]+s*e[10],y:e[1]+i*e[3]+n*e[5]+t*e[7]+a*e[9]+s*e[11]}}const a=i*i,r=n*n,o=i*n,l=a*i,c=a*n,f=i*r,u=n*r;return{x:e[0]+i*e[2]+n*e[4]+a*e[6]+o*e[8]+r*e[10]+l*e[12]+c*e[14]+f*e[16]+u*e[18],y:e[1]+i*e[3]+n*e[5]+a*e[7]+o*e[9]+r*e[11]+l*e[13]+c*e[15]+f*e[17]+u*e[19]}}function p(e,t,s){const{xmin:i,ymin:n,xmax:a,ymax:o,spatialReference:l}=t;let c=[];if(s<2)c.push({x:i,y:o}),c.push({x:a,y:o}),c.push({x:i,y:n}),c.push({x:a,y:n});else{let e=10;for(let t=0;t<e;t++)c.push({x:i,y:n+(o-n)*t/(e-1)}),c.push({x:a,y:n+(o-n)*t/(e-1)});e=8;for(let t=1;t<=e;t++)c.push({x:i+(a-i)*t/e,y:n}),c.push({x:i+(a-i)*t/e,y:o})}c=c.map(t=>h(e,t,s));const f=c.map(e=>e.x),u=c.map(e=>e.y);return new r.A({xmin:Math.min.apply(null,f),xmax:Math.max.apply(null,f),ymin:Math.min.apply(null,u),ymax:Math.max.apply(null,u),spatialReference:l})}let d=i=class extends l.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:s,coeffY:i}=t;if(!s?.length||!i?.length||s.length!==i.length)return null;const n=[];for(let e=0;e<s.length;e++)n.push(s[e]),n.push(i[e]);return n}writeForwardCoefficients(e,t,s){const i=[],n=[];for(let t=0;t<e?.length;t++)t%2==0?i.push(e[t]):n.push(e[t]);t.coeffX=i,t.coeffY=n}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,s,i,n,a,r]=e,o=i*r-a*n,l=a*n-i*r;return[(a*s-t*r)/o,(i*s-t*n)/l,r/o,n/l,-a/o,-i/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:s,inverseCoeffY:i}=t;if(!s?.length||!i?.length||s.length!==i.length)return null;const n=[];for(let e=0;e<s.length;e++)n.push(s[e]),n.push(i[e]);return n}writeInverseCoefficients(e,t,s){const i=[],n=[];for(let t=0;t<e?.length;t++)t%2==0?i.push(e[t]):n.push(e[t]);t.inverseCoeffX=i,t.inverseCoeffY=n}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=h(this.forwardCoefficients,e,this.polynomialOrder);return new o.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=h(this.inverseCoefficients,e,this.polynomialOrder);return new o.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new i({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"polynomialOrder",void 0),(0,n.Cg)([(0,a.MZ)()],d.prototype,"forwardCoefficients",void 0),(0,n.Cg)([(0,c.w)("forwardCoefficients",["coeffX","coeffY"])],d.prototype,"readForwardCoefficients",null),(0,n.Cg)([(0,f.K)("forwardCoefficients")],d.prototype,"writeForwardCoefficients",null),(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"inverseCoefficients",null),(0,n.Cg)([(0,c.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],d.prototype,"readInverseCoefficients",null),(0,n.Cg)([(0,f.K)("inverseCoefficients")],d.prototype,"writeInverseCoefficients",null),(0,n.Cg)([(0,a.MZ)()],d.prototype,"affectsPixelSize",null),(0,n.Cg)([(0,u.e)({PolynomialXform:"polynomial"})],d.prototype,"type",void 0),d=i=(0,n.Cg)([(0,a.$K)("esri.layers.raster.transforms.PolynomialTransform")],d)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2186],{2272(e,t,n){n.d(t,{Dl:()=>f,gf:()=>l,jV:()=>a,lF:()=>c});var i=n(92602),r=n(70333),s=n(4718),o=n(84952),u=n(926);function a(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function f(e){return"string"==typeof e?(0,o.An)(e):(0,s.o8)(e)}function c(e,t,n){const i={};for(const r in e){if("declaredClass"===r)continue;const s=e[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[r]=s.map(e=>c(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?s:JSON.stringify(s);else i[r]=s}return i}async function l(e,t,s){const o=function(e,t){return e?t&&(0,u.Qc)(e)?t:(0,u.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&i.A.request.useIdentity&&await Promise.all([n.e(5620),n.e(7393),n.e(8837)]).then(()=>n(50148));const a=await r.id.getCredential(e,s);return a?.token}},32186(e,t,n){n.r(t),n.d(t,{deleteForwardEdits:()=>o});var i=n(56507),r=n(49186),s=n(2272);async function o(e,t,n,o){if(!t)throw new r.A("post:missing-guid","guid for version is missing");const u=(0,s.Dl)(e),a=n.toJSON(),f=(0,s.jV)(u.query,{query:(0,s.lF)({...a,f:"json"}),...o,method:"post"});t.startsWith("{")&&(t=t.slice(1,-1));const c=`${u.path}/versions/${t}/deleteForwardEdits`,{data:l}=await(0,i.A)(c,f);return l}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2186],{2272(e,t,n){n.d(t,{Dl:()=>f,gf:()=>l,jV:()=>a,lF:()=>c});var i=n(92602),r=n(70333),s=n(4718),o=n(84952),u=n(926);function a(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function f(e){return"string"==typeof e?(0,o.An)(e):(0,s.o8)(e)}function c(e,t,n){const i={};for(const r in e){if("declaredClass"===r)continue;const s=e[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[r]=s.map(e=>c(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?s:JSON.stringify(s);else i[r]=s}return i}async function l(e,t,s){const o=function(e,t){return e?t&&(0,u.Qc)(e)?t:(0,u.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&i.A.request.useIdentity&&await Promise.all([n.e(5620),n.e(3954),n.e(8837)]).then(()=>n(50148));const a=await r.id.getCredential(e,s);return a?.token}},32186(e,t,n){n.r(t),n.d(t,{deleteForwardEdits:()=>o});var i=n(56507),r=n(49186),s=n(2272);async function o(e,t,n,o){if(!t)throw new r.A("post:missing-guid","guid for version is missing");const u=(0,s.Dl)(e),a=n.toJSON(),f=(0,s.jV)(u.query,{query:(0,s.lF)({...a,f:"json"}),...o,method:"post"});t.startsWith("{")&&(t=t.slice(1,-1));const c=`${u.path}/versions/${t}/deleteForwardEdits`,{data:l}=await(0,i.A)(c,f);return l}}}]);