@arcgis/core 5.1.0-next.19 → 5.1.0-next.20

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 (707) hide show
  1. package/assets/components/assets/carousel/t9n/messages.ar.json +1 -1
  2. package/assets/components/assets/carousel/t9n/messages.bg.json +1 -1
  3. package/assets/components/assets/carousel/t9n/messages.bs.json +1 -1
  4. package/assets/components/assets/carousel/t9n/messages.ca.json +1 -1
  5. package/assets/components/assets/carousel/t9n/messages.cs.json +1 -1
  6. package/assets/components/assets/carousel/t9n/messages.da.json +1 -1
  7. package/assets/components/assets/carousel/t9n/messages.de.json +1 -1
  8. package/assets/components/assets/carousel/t9n/messages.el.json +1 -1
  9. package/assets/components/assets/carousel/t9n/messages.es.json +1 -1
  10. package/assets/components/assets/carousel/t9n/messages.et.json +1 -1
  11. package/assets/components/assets/carousel/t9n/messages.fi.json +1 -1
  12. package/assets/components/assets/carousel/t9n/messages.fr.json +1 -1
  13. package/assets/components/assets/carousel/t9n/messages.he.json +1 -1
  14. package/assets/components/assets/carousel/t9n/messages.hr.json +1 -1
  15. package/assets/components/assets/carousel/t9n/messages.hu.json +1 -1
  16. package/assets/components/assets/carousel/t9n/messages.id.json +1 -1
  17. package/assets/components/assets/carousel/t9n/messages.it.json +1 -1
  18. package/assets/components/assets/carousel/t9n/messages.ja.json +1 -1
  19. package/assets/components/assets/carousel/t9n/messages.ko.json +1 -1
  20. package/assets/components/assets/carousel/t9n/messages.lt.json +1 -1
  21. package/assets/components/assets/carousel/t9n/messages.lv.json +1 -1
  22. package/assets/components/assets/carousel/t9n/messages.nl.json +1 -1
  23. package/assets/components/assets/carousel/t9n/messages.no.json +1 -1
  24. package/assets/components/assets/carousel/t9n/messages.pl.json +1 -1
  25. package/assets/components/assets/carousel/t9n/messages.pt-BR.json +1 -1
  26. package/assets/components/assets/carousel/t9n/messages.pt-PT.json +1 -1
  27. package/assets/components/assets/carousel/t9n/messages.ro.json +1 -1
  28. package/assets/components/assets/carousel/t9n/messages.ru.json +1 -1
  29. package/assets/components/assets/carousel/t9n/messages.sk.json +1 -1
  30. package/assets/components/assets/carousel/t9n/messages.sl.json +1 -1
  31. package/assets/components/assets/carousel/t9n/messages.sr.json +1 -1
  32. package/assets/components/assets/carousel/t9n/messages.sv.json +1 -1
  33. package/assets/components/assets/carousel/t9n/messages.th.json +1 -1
  34. package/assets/components/assets/carousel/t9n/messages.tr.json +1 -1
  35. package/assets/components/assets/carousel/t9n/messages.uk.json +1 -1
  36. package/assets/components/assets/carousel/t9n/messages.vi.json +1 -1
  37. package/assets/components/assets/carousel/t9n/messages.zh-CN.json +1 -1
  38. package/assets/components/assets/carousel/t9n/messages.zh-HK.json +1 -1
  39. package/assets/components/assets/carousel/t9n/messages.zh-TW.json +1 -1
  40. package/assets/esri/core/workers/RemoteClient.js +1 -1
  41. package/assets/esri/core/workers/chunks/0140dc583e20b031eac9.js +1 -0
  42. package/assets/esri/core/workers/chunks/018859b79f9ce7528ac7.js +1 -0
  43. package/assets/esri/core/workers/chunks/01dd849a2d335e9f3e16.js +1 -0
  44. package/assets/esri/core/workers/chunks/{6b3d8280a24f7a3aac40.js → 026c00ee272c64e53daf.js} +1 -1
  45. package/assets/esri/core/workers/chunks/02cab89336504e95ed99.js +1 -0
  46. package/assets/esri/core/workers/chunks/06df187a116709f69952.js +1 -0
  47. package/assets/esri/core/workers/chunks/0711c856144cd8700e7e.js +1 -0
  48. package/assets/esri/core/workers/chunks/0883c4e63424d6746ada.js +1 -0
  49. package/assets/esri/core/workers/chunks/0987cb20148f65222b44.js +1 -0
  50. package/assets/esri/core/workers/chunks/0a1f88cf16bcbb53b371.js +1 -0
  51. package/assets/esri/core/workers/chunks/0a66a2b4aaab0774c34f.js +1 -0
  52. package/assets/esri/core/workers/chunks/0bb3beedae1b73beb1fc.js +1 -0
  53. package/assets/esri/core/workers/chunks/0ca405ca26676137a4be.js +1 -0
  54. package/assets/esri/core/workers/chunks/0ce968c89c35535da63e.js +1 -0
  55. package/assets/esri/core/workers/chunks/0d56e3b3265a4470aaa6.js +1 -0
  56. package/assets/esri/core/workers/chunks/0debabe324c873066885.js +1 -0
  57. package/assets/esri/core/workers/chunks/0df585420c9cec6a7265.js +1 -0
  58. package/assets/esri/core/workers/chunks/0facd2c143a04cc7c4ff.js +1 -0
  59. package/assets/esri/core/workers/chunks/108d652a959e7de31cbf.js +1 -0
  60. package/assets/esri/core/workers/chunks/13d1cb50232ae761425b.js +2 -0
  61. package/assets/esri/core/workers/chunks/144c719d5ba9e3a30961.js +1 -0
  62. package/assets/esri/core/workers/chunks/1482262d0788ee65ddf7.js +1 -0
  63. package/assets/esri/core/workers/chunks/1503ca177e2466ec0e87.js +1 -0
  64. package/assets/esri/core/workers/chunks/1597d7b380d510ff5252.js +1 -0
  65. package/assets/esri/core/workers/chunks/15d7c9f5a55985ed00b4.js +1 -0
  66. package/assets/esri/core/workers/chunks/166652b7d69bf216d7a4.js +1 -0
  67. package/assets/esri/core/workers/chunks/179b3385c24ad8a05e1d.js +1 -0
  68. package/assets/esri/core/workers/chunks/{4f2c29168c9de0b08741.js → 1880c3b293cdfa804625.js} +1 -1
  69. package/assets/esri/core/workers/chunks/18a40606e4c39f244ecd.js +1 -0
  70. package/assets/esri/core/workers/chunks/190bc75254bc0542a6be.js +1 -0
  71. package/assets/esri/core/workers/chunks/1be4e308280149eae4fb.js +1 -0
  72. package/assets/esri/core/workers/chunks/1bea32b02d35ddb9b118.js +1 -0
  73. package/assets/esri/core/workers/chunks/1d0153c7d65bd9ea7d39.js +1 -0
  74. package/assets/esri/core/workers/chunks/1d697642fb2a6332b7f9.js +1 -0
  75. package/assets/esri/core/workers/chunks/1d78ec98eef7fef08f86.js +1 -0
  76. package/assets/esri/core/workers/chunks/1df8330823841b5bb6a5.js +1 -0
  77. package/assets/esri/core/workers/chunks/1e6062dc68c26fcf608f.js +1 -0
  78. package/assets/esri/core/workers/chunks/1e6271524602e159dbad.js +1 -0
  79. package/assets/esri/core/workers/chunks/1ee3d44e6d7add0b24cb.js +1 -0
  80. package/assets/esri/core/workers/chunks/1f54ed4a5238ba1a2551.js +1 -0
  81. package/assets/esri/core/workers/chunks/1f96d597ba736e088168.js +1 -0
  82. package/assets/esri/core/workers/chunks/1fa2bf0d6740092ec619.js +1 -0
  83. package/assets/esri/core/workers/chunks/210ef3f1cc6ef8a831bf.js +1 -0
  84. package/assets/esri/core/workers/chunks/23c856265dd24ce54fdb.js +1028 -0
  85. package/assets/esri/core/workers/chunks/241ef4a1bea20b49d812.js +1 -0
  86. package/assets/esri/core/workers/chunks/25bc7c7bc2793d209640.js +1 -0
  87. package/assets/esri/core/workers/chunks/2662750d5761ed2d0eb7.js +1 -0
  88. package/assets/esri/core/workers/chunks/26e41b08efe77d247409.js +1 -0
  89. package/assets/esri/core/workers/chunks/297b58f29c496923e1f3.js +1 -0
  90. package/assets/esri/core/workers/chunks/2a2a9fa62969644ea200.js +1 -0
  91. package/assets/esri/core/workers/chunks/2abb64323839367c9205.js +1 -0
  92. package/assets/esri/core/workers/chunks/2b296378d21e4e3c11d4.js +1 -0
  93. package/assets/esri/core/workers/chunks/2b76a8897ad7ba284d33.js +1 -0
  94. package/assets/esri/core/workers/chunks/2bd8bf6749d101d82d61.js +1 -0
  95. package/assets/esri/core/workers/chunks/2cbcf34cf896a438999b.js +1 -0
  96. package/assets/esri/core/workers/chunks/2ddb8bb00b3af83ebd7c.js +1 -0
  97. package/assets/esri/core/workers/chunks/2de299ff3a902d380be6.js +1 -0
  98. package/assets/esri/core/workers/chunks/2e06baf6469820697f17.js +1 -0
  99. package/assets/esri/core/workers/chunks/{531c55f3b8e708ccf767.js → 2f3aeaa25a76ab94b8e5.js} +1 -1
  100. package/assets/esri/core/workers/chunks/305b2a8dc6438c5fd4aa.js +1 -0
  101. package/assets/esri/core/workers/chunks/33de1d899a4fa9ab6ab1.js +1 -0
  102. package/assets/esri/core/workers/chunks/36da644678e6acf3bdb5.js +1 -0
  103. package/assets/esri/core/workers/chunks/3861644c06cfebe8f40c.js +2 -0
  104. package/assets/esri/core/workers/chunks/38d5dd4d457428244302.js +1 -0
  105. package/assets/esri/core/workers/chunks/394b645d51e7bf799382.js +1 -0
  106. package/assets/esri/core/workers/chunks/3a8320a40916c755c031.js +1 -0
  107. package/assets/esri/core/workers/chunks/3c2eb386c0165150e039.js +1 -0
  108. package/assets/esri/core/workers/chunks/3d0aa5f2db79c022243e.js +1 -0
  109. package/assets/esri/core/workers/chunks/3e26f9af6b8c75bad97a.js +1 -0
  110. package/assets/esri/core/workers/chunks/3ed7f19f77a11fa4d047.js +1 -0
  111. package/assets/esri/core/workers/chunks/3f812b0a28afb47aaaf0.js +2 -0
  112. package/assets/esri/core/workers/chunks/403060849a2573bbf110.js +1 -0
  113. package/assets/esri/core/workers/chunks/41a95ad470ec42ecd5a2.js +1 -0
  114. package/assets/esri/core/workers/chunks/43c8b1473695574c663e.js +2 -0
  115. package/assets/esri/core/workers/chunks/452d71789a1b77cff48d.js +1 -0
  116. package/assets/esri/core/workers/chunks/465cc0e00f03cdb640b2.js +1 -0
  117. package/assets/esri/core/workers/chunks/48a56b19bf825f05cc6e.js +1 -0
  118. package/assets/esri/core/workers/chunks/4d16b6ac52e25bd7e6aa.js +1 -0
  119. package/assets/esri/core/workers/chunks/4d7f7b1e7663cf6088d1.js +1 -0
  120. package/assets/esri/core/workers/chunks/50ab9a3f8bbb268fae59.js +1 -0
  121. package/assets/esri/core/workers/chunks/51ade971dda3ebe90f31.js +1 -0
  122. package/assets/esri/core/workers/chunks/{cbcb3530375e280bfeac.js → 53f8c1d56ef3b24d2226.js} +1 -1
  123. package/assets/esri/core/workers/chunks/544bfa97837770a8792f.js +1 -0
  124. package/assets/esri/core/workers/chunks/{ec63c0fa21cd3c872633.js → 54794b18edc584fd7515.js} +1 -1
  125. package/assets/esri/core/workers/chunks/561484ab6ed564e4b90f.js +1 -0
  126. package/assets/esri/core/workers/chunks/5690b49f355a5e2083a9.js +1 -0
  127. package/assets/esri/core/workers/chunks/56c7d7c7217557375fb6.js +1 -0
  128. package/assets/esri/core/workers/chunks/592f6bf0283152481f21.js +1 -0
  129. package/assets/esri/core/workers/chunks/5a6a6e7151085a3cd3dd.js +1 -0
  130. package/assets/esri/core/workers/chunks/5a6d6082c5bcb1a80eda.js +1 -0
  131. package/assets/esri/core/workers/chunks/5b2dd164dd84fd1ca4f7.js +1 -0
  132. package/assets/esri/core/workers/chunks/5b70ee8122262de5bbdf.js +1 -0
  133. package/assets/esri/core/workers/chunks/5b991b0d4ca257291cb0.js +1 -0
  134. package/assets/esri/core/workers/chunks/5e3019ba1b4c88977a19.js +1 -0
  135. package/assets/esri/core/workers/chunks/5e360f933da02d8d2455.js +1 -0
  136. package/assets/esri/core/workers/chunks/5e4ea6a2784eed1423f1.js +1 -0
  137. package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +1 -0
  138. package/assets/esri/core/workers/chunks/5f6942ac94acd7842926.js +1 -0
  139. package/assets/esri/core/workers/chunks/601e44839fd46e449aa8.js +1 -0
  140. package/assets/esri/core/workers/chunks/62c228ca16fdc7a2c695.js +1 -0
  141. package/assets/esri/core/workers/chunks/639202a461b17840a13f.js +1 -0
  142. package/assets/esri/core/workers/chunks/63934843c9f4ef779a07.js +1 -0
  143. package/assets/esri/core/workers/chunks/63b5b57f27c7c6194d44.js +1 -0
  144. package/assets/esri/core/workers/chunks/{003019c2741aef2d1aa0.js → 65520a443e3811255bea.js} +1 -1
  145. package/assets/esri/core/workers/chunks/693d269637135047a0c4.js +1 -0
  146. package/assets/esri/core/workers/chunks/{36215b2c0b1020743458.js → 6a14ec2d2de6778a4e7a.js} +1 -1
  147. package/assets/esri/core/workers/chunks/6ac84e6d33104e74398d.js +1 -0
  148. package/assets/esri/core/workers/chunks/6cdda5aa35fa12ea9345.js +1 -0
  149. package/assets/esri/core/workers/chunks/6d3467997b5d01630b08.js +1 -0
  150. package/assets/esri/core/workers/chunks/6dfcb0c804e63e87e311.js +1 -0
  151. package/assets/esri/core/workers/chunks/6f079f1fd6d00d2d174c.js +1 -0
  152. package/assets/esri/core/workers/chunks/6fde745f3a62e7f5a97d.js +1 -0
  153. package/assets/esri/core/workers/chunks/70263c2182dc43046742.js +1 -0
  154. package/assets/esri/core/workers/chunks/72cd450b24fdfcef6547.js +1 -0
  155. package/assets/esri/core/workers/chunks/7386a61f9610b8e5c608.js +1 -0
  156. package/assets/esri/core/workers/chunks/73e02f6c7ccc2013c812.js +1 -0
  157. package/assets/esri/core/workers/chunks/73e384fd93cf22503d84.js +1 -0
  158. package/assets/esri/core/workers/chunks/74a6d840813ac29b0bda.js +1 -0
  159. package/assets/esri/core/workers/chunks/{f6aa34577c5fab8cc1f5.js → 74e3c224e879edb37812.js} +1 -1
  160. package/assets/esri/core/workers/chunks/75664587bb80f4e187e1.js +1 -0
  161. package/assets/esri/core/workers/chunks/75fd96fd9557ac1f8e10.js +1 -0
  162. package/assets/esri/core/workers/chunks/7642905920e169a147f3.js +1 -0
  163. package/assets/esri/core/workers/chunks/764d080f77dec5e7a02c.js +1 -0
  164. package/assets/esri/core/workers/chunks/777b0e07f72c42470d36.js +1 -0
  165. package/assets/esri/core/workers/chunks/7873ee080c175d17a444.js +1 -0
  166. package/assets/esri/core/workers/chunks/7975abb2162a82c88edb.js +1 -0
  167. package/assets/esri/core/workers/chunks/7a2dd3d85d31dce29d94.js +1 -0
  168. package/assets/esri/core/workers/chunks/7b297a2f712361bfae2e.js +1 -0
  169. package/assets/esri/core/workers/chunks/7cec3252e3ee56424b9e.js +1 -0
  170. package/assets/esri/core/workers/chunks/7d274a077bdfa8c485e8.js +1 -0
  171. package/assets/esri/core/workers/chunks/7dd1e93469d0b1d652bc.js +1 -0
  172. package/assets/esri/core/workers/chunks/8012fdc49a7a10982f78.js +1 -0
  173. package/assets/esri/core/workers/chunks/835a929e37811d0f82cb.js +1 -0
  174. package/assets/esri/core/workers/chunks/835d6dd8c5a00682d879.js +1 -0
  175. package/assets/esri/core/workers/chunks/83d913dab3c2b0d6a7cc.js +1 -0
  176. package/assets/esri/core/workers/chunks/854fe80272b59fafc2e9.js +1 -0
  177. package/assets/esri/core/workers/chunks/85e0fd618625a639387f.js +1 -0
  178. package/assets/esri/core/workers/chunks/85f309c1888c1c8411b1.js +1 -0
  179. package/assets/esri/core/workers/chunks/86161025b53b916328ff.js +1 -0
  180. package/assets/esri/core/workers/chunks/861817be5e050e9522ab.js +1 -0
  181. package/assets/esri/core/workers/chunks/86465d4bb185d7460087.js +1 -0
  182. package/assets/esri/core/workers/chunks/87e7378b242debbfd575.js +1 -0
  183. package/assets/esri/core/workers/chunks/8838ff9668b472af16a1.js +1 -0
  184. package/assets/esri/core/workers/chunks/889835e61ea97f090082.js +1 -0
  185. package/assets/esri/core/workers/chunks/8aabc71d7f15c4407d7d.js +1 -0
  186. package/assets/esri/core/workers/chunks/8c2e5b116bac21e7d577.js +1 -0
  187. package/assets/esri/core/workers/chunks/8cf58806671ed491a456.js +1 -0
  188. package/assets/esri/core/workers/chunks/8d1d0c3f0532aa98487d.js +1 -0
  189. package/assets/esri/core/workers/chunks/8d6da6573d07385f4ed5.js +1 -0
  190. package/assets/esri/core/workers/chunks/90b19e60c056f32623e7.js +1 -0
  191. package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +1 -0
  192. package/assets/esri/core/workers/chunks/91e56959b2fddf1a9743.js +1 -0
  193. package/assets/esri/core/workers/chunks/925980d26d71987ac80c.js +1 -0
  194. package/assets/esri/core/workers/chunks/93515f52d9b5fa12bd04.js +1 -0
  195. package/assets/esri/core/workers/chunks/9461f7225c42cf15a114.js +1 -0
  196. package/assets/esri/core/workers/chunks/946698d9cefffdb63082.js +1 -0
  197. package/assets/esri/core/workers/chunks/978649cb6df99ee728be.js +1 -0
  198. package/assets/esri/core/workers/chunks/99101789035f1787c630.js +1 -0
  199. package/assets/esri/core/workers/chunks/9a2b1f0ca66c1b87c830.js +1 -0
  200. package/assets/esri/core/workers/chunks/9c6e96b1c2b0418a4f1c.js +1 -0
  201. package/assets/esri/core/workers/chunks/9f1f5fb648302c43ad12.js +1 -0
  202. package/assets/esri/core/workers/chunks/9f5f4da954228d876219.js +1 -0
  203. package/assets/esri/core/workers/chunks/a010fc1123bc0eeda478.js +1 -0
  204. package/assets/esri/core/workers/chunks/a1a12552d34ea9eea130.js +1 -0
  205. package/assets/esri/core/workers/chunks/a2323c957c8b2fe225b4.js +1 -0
  206. package/assets/esri/core/workers/chunks/a34e3c6da7d98569c052.js +1 -0
  207. package/assets/esri/core/workers/chunks/a36a33f43610c3cd985b.js +1 -0
  208. package/assets/esri/core/workers/chunks/a381932eef77f4d80292.js +1 -0
  209. package/assets/esri/core/workers/chunks/a495e60996a36ce19a32.js +1 -0
  210. package/assets/esri/core/workers/chunks/a53fa34681efff8fc024.js +1 -0
  211. package/assets/esri/core/workers/chunks/a7a9716582b256d76e5b.js +1 -0
  212. package/assets/esri/core/workers/chunks/a96c7432ca97cbeef4b8.js +1 -0
  213. package/assets/esri/core/workers/chunks/{ec0fcb1834c88090e7af.js → aa60f735ccd39cedef7e.js} +1 -1
  214. package/assets/esri/core/workers/chunks/aa9c11f25d95372998a3.js +1 -0
  215. package/assets/esri/core/workers/chunks/{128cdb4a02549abc68b5.js → aec33bdb355bd04f28ae.js} +1 -1
  216. package/assets/esri/core/workers/chunks/aece665144aed2065ffc.js +1 -0
  217. package/assets/esri/core/workers/chunks/af75e91b88e747aa76ac.js +1 -0
  218. package/assets/esri/core/workers/chunks/b089947c9a492c96ca27.js +1 -0
  219. package/assets/esri/core/workers/chunks/b35ea099334c867bde02.js +1 -0
  220. package/assets/esri/core/workers/chunks/b553264db0f10bb8c5f7.js +1 -0
  221. package/assets/esri/core/workers/chunks/b586f1021a27c5e1551a.js +2 -0
  222. package/assets/esri/core/workers/chunks/{236f8137ae505c8f0764.js → b65550b2f685ba760b2c.js} +1 -1
  223. package/assets/esri/core/workers/chunks/b6e4c35b76379088035c.js +1 -0
  224. package/assets/esri/core/workers/chunks/b730131e52f9220db031.js +1 -0
  225. package/assets/esri/core/workers/chunks/{9332db133a0925d522fe.js → b8b2f160518e3a225d99.js} +1 -1
  226. package/assets/esri/core/workers/chunks/bbf2afa05314e267893f.js +1 -0
  227. package/assets/esri/core/workers/chunks/bc982142e61598bd367c.js +1 -0
  228. package/assets/esri/core/workers/chunks/bcd701892ee120e13a18.js +1 -0
  229. package/assets/esri/core/workers/chunks/bd278f8081be8304be8d.js +1 -0
  230. package/assets/esri/core/workers/chunks/bd2f577cae61facdde4a.js +1 -0
  231. package/assets/esri/core/workers/chunks/c1a26956713262cb3cb3.js +1 -0
  232. package/assets/esri/core/workers/chunks/c1dc14b07282474a7c2d.js +1 -0
  233. package/assets/esri/core/workers/chunks/c327fe276238af60fda4.js +1 -0
  234. package/assets/esri/core/workers/chunks/c4a78ab84186c7be599a.js +1 -0
  235. package/assets/esri/core/workers/chunks/c4dc60617152d885f3da.js +1 -0
  236. package/assets/esri/core/workers/chunks/c6d5f6cfbb31a3fd11ff.js +1 -0
  237. package/assets/esri/core/workers/chunks/c7f27a84268a9b0d8cdb.js +1 -0
  238. package/assets/esri/core/workers/chunks/c80c6e60c87c3e5f5e62.js +1 -0
  239. package/assets/esri/core/workers/chunks/c91993503de5faa404f0.js +1 -0
  240. package/assets/esri/core/workers/chunks/c9a42d86185a0ad35dd1.js +1 -0
  241. package/assets/esri/core/workers/chunks/c9d600dc6b6b5aafff1c.js +1 -0
  242. package/assets/esri/core/workers/chunks/ca33847a997ccfe8ddc2.js +1 -0
  243. package/assets/esri/core/workers/chunks/ca64867bc322a354be8e.js +1 -0
  244. package/assets/esri/core/workers/chunks/cb6a7ca4ba2cf0b5ced7.js +1 -0
  245. package/assets/esri/core/workers/chunks/cc3939983cf6f78f7243.js +1 -0
  246. package/assets/esri/core/workers/chunks/cca19c9564be2d02a277.js +1 -0
  247. package/assets/esri/core/workers/chunks/ccc2f2b3db008d8a495f.js +1 -0
  248. package/assets/esri/core/workers/chunks/cce2ea441adb47d15a06.js +1 -0
  249. package/assets/esri/core/workers/chunks/ce063df750018024c9ed.js +1 -0
  250. package/assets/esri/core/workers/chunks/ce3e192fbb53a9c6eb3b.js +1 -0
  251. package/assets/esri/core/workers/chunks/d3734c8de029f1a65315.js +1 -0
  252. package/assets/esri/core/workers/chunks/d7229019876c0e4ff545.js +1 -0
  253. package/assets/esri/core/workers/chunks/d72d5031887373d35610.js +1 -0
  254. package/assets/esri/core/workers/chunks/d7840c3e792efcccee35.js +1 -0
  255. package/assets/esri/core/workers/chunks/d9f900975ac915a0f24f.js +1 -0
  256. package/assets/esri/core/workers/chunks/da780342f16e65b55ac8.js +1 -0
  257. package/assets/esri/core/workers/chunks/db005d9419bb718b3962.js +1 -0
  258. package/assets/esri/core/workers/chunks/db5bbc240a1b8cd5af52.js +1 -0
  259. package/assets/esri/core/workers/chunks/dcc8363faa22e6211351.js +1 -0
  260. package/assets/esri/core/workers/chunks/dcef87f7d06c45cd928b.js +1 -0
  261. package/assets/esri/core/workers/chunks/dd5d66f067e2386e0514.js +1 -0
  262. package/assets/esri/core/workers/chunks/dd6efa0afe879bd11a2e.js +1 -0
  263. package/assets/esri/core/workers/chunks/deaca3cd202851ecf9c2.js +1 -0
  264. package/assets/esri/core/workers/chunks/df321c37b61099f6e4c2.js +1 -0
  265. package/assets/esri/core/workers/chunks/e021b2f0e15aee5bf3ad.js +1 -0
  266. package/assets/esri/core/workers/chunks/e0344b45af88081fa186.js +1 -0
  267. package/assets/esri/core/workers/chunks/{77fc225259f1c5800095.js → e2661d39c48376163adf.js} +1 -1
  268. package/assets/esri/core/workers/chunks/e2bdb0e87422e222646e.js +1 -0
  269. package/assets/esri/core/workers/chunks/e3fe1db9380633292b27.js +1 -0
  270. package/assets/esri/core/workers/chunks/e67bdd8bf38ebe89a344.js +1 -0
  271. package/assets/esri/core/workers/chunks/e6f51f66b71e0d6525ec.js +1 -0
  272. package/assets/esri/core/workers/chunks/e7bee85f28d7ec03825a.js +1 -0
  273. package/assets/esri/core/workers/chunks/e8495c655a0a4f534636.js +1 -0
  274. package/assets/esri/core/workers/chunks/e9dd60d0220036545ebb.js +1 -0
  275. package/assets/esri/core/workers/chunks/ea245d3a6fd601fffd88.js +1 -0
  276. package/assets/esri/core/workers/chunks/eb4ffb72c9360062141c.js +1 -0
  277. package/assets/esri/core/workers/chunks/ebae903845643d60b44a.js +1 -0
  278. package/assets/esri/core/workers/chunks/ebb0372e8da0f75c09dd.js +1 -0
  279. package/assets/esri/core/workers/chunks/eef102e13fd8878eeb96.js +1 -0
  280. package/assets/esri/core/workers/chunks/ef267b938327c41727c1.js +1 -0
  281. package/assets/esri/core/workers/chunks/ef72f4822284bcad75d8.js +1 -0
  282. package/assets/esri/core/workers/chunks/efb2a8879011d2d77a81.js +1 -0
  283. package/assets/esri/core/workers/chunks/f0e6a26a3625068b08ab.js +1 -0
  284. package/assets/esri/core/workers/chunks/f12f96770a45ce6d1ed7.js +1 -0
  285. package/assets/esri/core/workers/chunks/f349f64f683620bdf9b5.js +30 -0
  286. package/assets/esri/core/workers/chunks/f379f94adbe79dc305a2.js +1 -0
  287. package/assets/esri/core/workers/chunks/f4301ea9a6cb3bcef906.js +1 -0
  288. package/assets/esri/core/workers/chunks/f5144e570952ca62a1b0.js +1 -0
  289. package/assets/esri/core/workers/chunks/f5cebeaad3e7d87d7997.js +1 -0
  290. package/assets/esri/core/workers/chunks/f6c9742691ccdaed44a2.js +1 -0
  291. package/assets/esri/core/workers/chunks/f76c2b09e6ba9d107898.js +1 -0
  292. package/assets/esri/core/workers/chunks/f7d67b7c9785a1955b17.js +1 -0
  293. package/assets/esri/core/workers/chunks/faad127dc07e54e7f6d1.js +1 -0
  294. package/assets/esri/core/workers/chunks/fcf962f3dec6b5440983.js +1 -0
  295. package/assets/esri/core/workers/chunks/feececf6809231f72c5a.js +1 -0
  296. package/chunks/Compositing.glsl.js +3 -4
  297. package/chunks/OITBlend.glsl.js +8 -7
  298. package/config.d.ts +94 -34
  299. package/config.js +1 -1
  300. package/core/SetUtils.js +1 -1
  301. package/geometry/support/curves/curveUtils.js +1 -1
  302. package/identity/IdentityManager.d.ts +11 -7
  303. package/identity/IdentityManagerBase.d.ts +13 -9
  304. package/kernel.js +1 -1
  305. package/layers/SubtypeGroupLayer.d.ts +0 -1
  306. package/layers/support/EditingCapabilities.js +1 -1
  307. package/layers/support/SubtypeSublayer.js +1 -1
  308. package/package.json +4 -4
  309. package/rest/query/operations/pbfFlatFeatureSet.js +1 -1
  310. package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
  311. package/smartMapping/raster/renderers/flow.d.ts +2 -1
  312. package/smartMapping/renderers/color.d.ts +19 -3
  313. package/smartMapping/renderers/dotDensity.d.ts +6 -1
  314. package/smartMapping/renderers/heatmap.d.ts +4 -1
  315. package/smartMapping/renderers/location.d.ts +2 -2
  316. package/smartMapping/renderers/opacity.d.ts +2 -2
  317. package/smartMapping/renderers/pieChart.d.ts +2 -2
  318. package/smartMapping/renderers/predominance.d.ts +2 -2
  319. package/smartMapping/renderers/relationship.d.ts +2 -2
  320. package/smartMapping/renderers/size.d.ts +7 -6
  321. package/smartMapping/renderers/support/rendererUtils.d.ts +2 -2
  322. package/smartMapping/renderers/type.d.ts +4 -3
  323. package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
  324. package/smartMapping/statistics/support/ageUtils.d.ts +3 -2
  325. package/smartMapping/statistics/types.d.ts +8 -7
  326. package/smartMapping/support/adapters/types.d.ts +6 -0
  327. package/smartMapping/symbology/color.d.ts +1 -1
  328. package/smartMapping/symbology/support/colorRamps.d.ts +2 -2
  329. package/smartMapping/symbology/support/colorRamps.js +1 -1
  330. package/support/revision.js +1 -1
  331. package/symbols/support/OccludedVisibility.d.ts +1 -1
  332. package/symbols/support/OccludedVisibility.js +1 -1
  333. package/symbols/support/Symbol3DEmissive.d.ts +33 -17
  334. package/views/2d/engine/webgl/MaterialManager.js +1 -1
  335. package/views/2d/engine/webgl/brushes/BrushClip.js +1 -1
  336. package/views/2d/engine/webgl/brushes/WGLBrushStencil.js +1 -1
  337. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  338. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  339. package/views/2d/interactive/SnappingVisualizer2D.js +1 -1
  340. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  341. package/views/2d/webglDeps.js +1 -1
  342. package/views/3d/environment/CloudsComposition.js +1 -1
  343. package/views/3d/environment/CloudsTechnique.js +1 -1
  344. package/views/3d/environment/Fog.js +1 -1
  345. package/views/3d/environment/FogTechnique.js +1 -1
  346. package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
  347. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  348. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  349. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  350. package/views/3d/layers/graphics/GraphicStateTracking.js +1 -1
  351. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  352. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  353. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  354. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  355. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  356. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  357. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  358. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  359. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  360. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  361. package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
  362. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  363. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  364. package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
  365. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  366. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  367. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  368. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  369. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  370. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  371. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
  372. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  373. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  374. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  375. package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
  376. package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
  377. package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
  378. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  379. package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
  380. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  381. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  382. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  383. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  384. package/views/3d/webgl-engine/effects/transparency/OITDimTechnique.js +1 -1
  385. package/views/3d/webgl-engine/lib/Compositor.js +2 -0
  386. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  387. package/views/3d/webgl-engine/lib/Program.js +1 -1
  388. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  389. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  390. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  391. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  392. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  393. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  394. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  395. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  396. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  397. package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
  398. package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
  399. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  400. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  401. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  402. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  403. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
  404. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  405. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  406. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  407. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +1 -1
  408. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  409. package/views/View.d.ts +8 -0
  410. package/views/draw/DrawTool.js +1 -1
  411. package/views/draw/plugins/PolygonPlugin.js +1 -1
  412. package/views/draw/support/InteractiveHandle.js +1 -1
  413. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  414. package/views/draw/support/managers/TooltipManager.js +1 -1
  415. package/views/interactive/sketch/constraints.js +1 -1
  416. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  417. package/views/interactive/snapping/SnappingVisualizer.js +1 -1
  418. package/views/interactive/snapping/candidates/EdgeSnappingCandidate.js +1 -1
  419. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  420. package/views/interactive/snapping/hints/CurveSnappingHint.js +2 -0
  421. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  422. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
  423. package/views/support/imageReprojection.js +1 -1
  424. package/views/webgl/AllocationTracer.js +1 -1
  425. package/views/webgl/AppleAmdDriverHelper.js +1 -1
  426. package/views/webgl/Program.js +1 -1
  427. package/views/webgl/ProgramCache.js +1 -1
  428. package/views/webgl/ProgramTemplate.js +1 -1
  429. package/views/webgl/RenderingContext.js +1 -1
  430. package/views/webgl/WebGLDriverTestModule.js +1 -1
  431. package/views/webgl/testAppleAmdDrawArrays.js +1 -1
  432. package/views/webgl/testFloatBufferBlend.js +1 -1
  433. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  434. package/webscene/Glow.d.ts +19 -14
  435. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  436. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  437. package/widgets/Editor/EditorViewModel.d.ts +15 -4
  438. package/widgets/Editor/EditorViewModel.js +1 -1
  439. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  440. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  441. package/widgets/Editor/UpdateFeatureWorkflowData.js +1 -1
  442. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  443. package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
  444. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  445. package/widgets/Editor/UpdateWorkflow.js +1 -1
  446. package/widgets/Editor/Workflow.js +1 -1
  447. package/widgets/Editor/components/Notices.js +1 -1
  448. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  449. package/widgets/Editor/support/EditorItem.js +1 -1
  450. package/widgets/Editor/support/SketchController.js +1 -1
  451. package/widgets/Editor/workflowUtils.js +1 -1
  452. package/widgets/Editor.d.ts +17 -5
  453. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +17 -5
  454. package/widgets/FeatureTable.d.ts +16 -4
  455. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +9 -1
  456. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  457. package/widgets/OrientedImageryViewer.d.ts +9 -1
  458. package/widgets/OrientedImageryViewer.js +1 -1
  459. package/widgets/Sketch/support/PluginManager.js +1 -1
  460. package/assets/esri/core/workers/chunks/00bb90a3f0560800279b.js +0 -1
  461. package/assets/esri/core/workers/chunks/02d862fe58670c1f4722.js +0 -1
  462. package/assets/esri/core/workers/chunks/033b4f9ca08791e0c001.js +0 -1
  463. package/assets/esri/core/workers/chunks/045e4e520d6dffe06ba7.js +0 -1
  464. package/assets/esri/core/workers/chunks/04f82b740325e3388d23.js +0 -1
  465. package/assets/esri/core/workers/chunks/05d6cd51ca970705e46a.js +0 -1
  466. package/assets/esri/core/workers/chunks/08d73543c713984f6ecf.js +0 -1028
  467. package/assets/esri/core/workers/chunks/0b59e5be22139387bd84.js +0 -1
  468. package/assets/esri/core/workers/chunks/0e1d559d05229ef92e35.js +0 -1
  469. package/assets/esri/core/workers/chunks/0e6ffb02a929130ddb50.js +0 -1
  470. package/assets/esri/core/workers/chunks/112227b862b935123ddf.js +0 -2
  471. package/assets/esri/core/workers/chunks/11882cbb28710e5f9fc5.js +0 -1
  472. package/assets/esri/core/workers/chunks/12cfe900ce04af22f162.js +0 -1
  473. package/assets/esri/core/workers/chunks/1336f685bae5f1251558.js +0 -1
  474. package/assets/esri/core/workers/chunks/13512a23655258fa77f4.js +0 -1
  475. package/assets/esri/core/workers/chunks/13da9e3b96d8f653cbad.js +0 -1
  476. package/assets/esri/core/workers/chunks/1469e6d1d0d4e310b8f8.js +0 -1
  477. package/assets/esri/core/workers/chunks/15d46482ec096e3ce161.js +0 -1
  478. package/assets/esri/core/workers/chunks/1757133063fac226fdd4.js +0 -1
  479. package/assets/esri/core/workers/chunks/1794db88a2006711eff3.js +0 -1
  480. package/assets/esri/core/workers/chunks/189e22df73414a1a3989.js +0 -1
  481. package/assets/esri/core/workers/chunks/1951ff6789b9a598f122.js +0 -1
  482. package/assets/esri/core/workers/chunks/1ba756289468064f6204.js +0 -1
  483. package/assets/esri/core/workers/chunks/1cfa8d404d42b9eccf78.js +0 -1
  484. package/assets/esri/core/workers/chunks/1e916e552ce7d53692d2.js +0 -1
  485. package/assets/esri/core/workers/chunks/1fb6b65d8fd21fb9a21e.js +0 -1
  486. package/assets/esri/core/workers/chunks/2011da6dfc4bb89829c6.js +0 -1
  487. package/assets/esri/core/workers/chunks/203ef5459fc5dde12851.js +0 -1
  488. package/assets/esri/core/workers/chunks/215c54520d0da638fe57.js +0 -1
  489. package/assets/esri/core/workers/chunks/22045f85e503ae0ec8f4.js +0 -1
  490. package/assets/esri/core/workers/chunks/2351b713ba3d05de0728.js +0 -1
  491. package/assets/esri/core/workers/chunks/249630af2fb01257eb75.js +0 -1
  492. package/assets/esri/core/workers/chunks/24dd404612c35f6a3fc3.js +0 -1
  493. package/assets/esri/core/workers/chunks/25d34552bfb255af9467.js +0 -1
  494. package/assets/esri/core/workers/chunks/27c34a73fb380fc57f6e.js +0 -1
  495. package/assets/esri/core/workers/chunks/27d60fd727e9a68973f6.js +0 -1
  496. package/assets/esri/core/workers/chunks/27e14277128446e76b45.js +0 -1
  497. package/assets/esri/core/workers/chunks/2a3e82a230b7ee4dfd55.js +0 -1
  498. package/assets/esri/core/workers/chunks/2c69d8bb1c950b95278d.js +0 -1
  499. package/assets/esri/core/workers/chunks/2c6dbb9a8d7cc35f5093.js +0 -1
  500. package/assets/esri/core/workers/chunks/2d376f82cdf020e1fca9.js +0 -1
  501. package/assets/esri/core/workers/chunks/2d67ab4927a968d5c8d4.js +0 -1
  502. package/assets/esri/core/workers/chunks/2e50b7651f8c037bb3b0.js +0 -1
  503. package/assets/esri/core/workers/chunks/2e63e18df96e5a2461de.js +0 -1
  504. package/assets/esri/core/workers/chunks/2e82e284bbb3ff769a0b.js +0 -1
  505. package/assets/esri/core/workers/chunks/31184dc458281af654c7.js +0 -1
  506. package/assets/esri/core/workers/chunks/3214763f268622f09986.js +0 -1
  507. package/assets/esri/core/workers/chunks/32a1ccc145c9f6091e13.js +0 -1
  508. package/assets/esri/core/workers/chunks/34691b147318b2cfdd45.js +0 -1
  509. package/assets/esri/core/workers/chunks/34b367f617a7b3db55e0.js +0 -1
  510. package/assets/esri/core/workers/chunks/37d4a0b941bb2a7f113a.js +0 -1
  511. package/assets/esri/core/workers/chunks/3875b075ffaa1ed0089f.js +0 -1
  512. package/assets/esri/core/workers/chunks/3d3b1ce112be6ea31d93.js +0 -1
  513. package/assets/esri/core/workers/chunks/3dfc088a2c5289e6c79f.js +0 -1
  514. package/assets/esri/core/workers/chunks/3f3c63420644f9522ab1.js +0 -1
  515. package/assets/esri/core/workers/chunks/3fcab49eb215a477d8c4.js +0 -1
  516. package/assets/esri/core/workers/chunks/41108f58f0f439ebba3f.js +0 -1
  517. package/assets/esri/core/workers/chunks/415957a42e45eb21aa84.js +0 -1
  518. package/assets/esri/core/workers/chunks/4375d046b041a770c871.js +0 -1
  519. package/assets/esri/core/workers/chunks/43c797bfc2191b51875b.js +0 -1
  520. package/assets/esri/core/workers/chunks/460a82f3e4838b13e3b4.js +0 -1
  521. package/assets/esri/core/workers/chunks/473e43a74f56cb9bfe65.js +0 -1
  522. package/assets/esri/core/workers/chunks/4801e48cd4a14bacab78.js +0 -1
  523. package/assets/esri/core/workers/chunks/499d594dc0d282dfe777.js +0 -1
  524. package/assets/esri/core/workers/chunks/4ad6f80488aa218b95e3.js +0 -1
  525. package/assets/esri/core/workers/chunks/4db259316b193fcc4541.js +0 -1
  526. package/assets/esri/core/workers/chunks/4e9863a11d09900baf30.js +0 -1
  527. package/assets/esri/core/workers/chunks/4fe210314813ea1f7a26.js +0 -1
  528. package/assets/esri/core/workers/chunks/51603e99469847aa3ac4.js +0 -1
  529. package/assets/esri/core/workers/chunks/52705ccbb452a3edb064.js +0 -1
  530. package/assets/esri/core/workers/chunks/53e348f5585fa8c53fe8.js +0 -2
  531. package/assets/esri/core/workers/chunks/54c545f44b7ce21fb604.js +0 -1
  532. package/assets/esri/core/workers/chunks/54db2d2418721e92fbb0.js +0 -1
  533. package/assets/esri/core/workers/chunks/552e5c413828e181f89a.js +0 -1
  534. package/assets/esri/core/workers/chunks/558e9fed2e58cbbf9947.js +0 -1
  535. package/assets/esri/core/workers/chunks/55c5c4fcec0f8c4d59b2.js +0 -1
  536. package/assets/esri/core/workers/chunks/58134617fb7530836b81.js +0 -1
  537. package/assets/esri/core/workers/chunks/58c4be467a922fe37f01.js +0 -1
  538. package/assets/esri/core/workers/chunks/5924fe7de9f5ff8984ad.js +0 -1
  539. package/assets/esri/core/workers/chunks/5cd39bb8123adc80d8a7.js +0 -1
  540. package/assets/esri/core/workers/chunks/5cd8bbb719d95cb32cab.js +0 -1
  541. package/assets/esri/core/workers/chunks/5dba08099036e69e0a04.js +0 -1
  542. package/assets/esri/core/workers/chunks/5eb5d3b2329ec648cf3f.js +0 -1
  543. package/assets/esri/core/workers/chunks/5f10f39835cb40179000.js +0 -1
  544. package/assets/esri/core/workers/chunks/5f9eeab833a6c08c76c4.js +0 -1
  545. package/assets/esri/core/workers/chunks/606b4f1be91905a10bdb.js +0 -1
  546. package/assets/esri/core/workers/chunks/628056a312d919e98fa3.js +0 -1
  547. package/assets/esri/core/workers/chunks/62e9a9821f1563515ab4.js +0 -1
  548. package/assets/esri/core/workers/chunks/639302042c30e4265694.js +0 -1
  549. package/assets/esri/core/workers/chunks/645e086291b04bc036d7.js +0 -1
  550. package/assets/esri/core/workers/chunks/651b46aeabf22ff53a38.js +0 -1
  551. package/assets/esri/core/workers/chunks/65ad8838911a6d71816b.js +0 -1
  552. package/assets/esri/core/workers/chunks/65f86594c42ff82095fe.js +0 -1
  553. package/assets/esri/core/workers/chunks/6772468d1721d6d2a529.js +0 -1
  554. package/assets/esri/core/workers/chunks/677f5e444ff588ab670f.js +0 -1
  555. package/assets/esri/core/workers/chunks/6869f975d42b5a2936e2.js +0 -1
  556. package/assets/esri/core/workers/chunks/69ab42b965bccc3bad4f.js +0 -1
  557. package/assets/esri/core/workers/chunks/6a083fde0e207625fd0b.js +0 -1
  558. package/assets/esri/core/workers/chunks/6a9a96aa811c1d3b6edb.js +0 -1
  559. package/assets/esri/core/workers/chunks/6b3494e5a32912ee6325.js +0 -1
  560. package/assets/esri/core/workers/chunks/6b5d2cef309a2581d0d1.js +0 -1
  561. package/assets/esri/core/workers/chunks/6bf7d8de86b9eb76f920.js +0 -1
  562. package/assets/esri/core/workers/chunks/6c0b7890c8eec7febe28.js +0 -1
  563. package/assets/esri/core/workers/chunks/6c85396c90941a042c33.js +0 -1
  564. package/assets/esri/core/workers/chunks/6d02fdcaa1559b741f89.js +0 -1
  565. package/assets/esri/core/workers/chunks/6f337c3ccd84d90a35e5.js +0 -1
  566. package/assets/esri/core/workers/chunks/71159f66d9867aaea6cf.js +0 -1
  567. package/assets/esri/core/workers/chunks/711bec78dc00fad0f78d.js +0 -1
  568. package/assets/esri/core/workers/chunks/71ad08a5b69cf2e6714e.js +0 -1
  569. package/assets/esri/core/workers/chunks/7382c9882525101eddad.js +0 -1
  570. package/assets/esri/core/workers/chunks/750dfcbfcadf0629daf6.js +0 -1
  571. package/assets/esri/core/workers/chunks/75907e5d009b71ce723b.js +0 -1
  572. package/assets/esri/core/workers/chunks/79c69ae86a1f4a56f7c7.js +0 -1
  573. package/assets/esri/core/workers/chunks/79ee97609f72e4cf989c.js +0 -1
  574. package/assets/esri/core/workers/chunks/7a037fbfd91dd22e3bf0.js +0 -1
  575. package/assets/esri/core/workers/chunks/7cf8fc491877d59caf3a.js +0 -1
  576. package/assets/esri/core/workers/chunks/7d2b1e5402a88b6bee85.js +0 -1
  577. package/assets/esri/core/workers/chunks/7ec83fc059325e207825.js +0 -1
  578. package/assets/esri/core/workers/chunks/7ee7529fcbd0d169047c.js +0 -1
  579. package/assets/esri/core/workers/chunks/7f385e9c88df3395e678.js +0 -1
  580. package/assets/esri/core/workers/chunks/80d51d58db09b9f96cb5.js +0 -1
  581. package/assets/esri/core/workers/chunks/81a45d7e9dadf678b584.js +0 -1
  582. package/assets/esri/core/workers/chunks/81c758bdc07ed9d9a132.js +0 -1
  583. package/assets/esri/core/workers/chunks/822a115c7d718e4e3d2b.js +0 -1
  584. package/assets/esri/core/workers/chunks/825ffcde4f224006e776.js +0 -1
  585. package/assets/esri/core/workers/chunks/83711695e16912e9b9c5.js +0 -1
  586. package/assets/esri/core/workers/chunks/8374658d17f69bde6b08.js +0 -1
  587. package/assets/esri/core/workers/chunks/84b6ac0965d83704ba5d.js +0 -1
  588. package/assets/esri/core/workers/chunks/88a02b3a802d484c08a8.js +0 -1
  589. package/assets/esri/core/workers/chunks/89cd0e3420ab31e98a77.js +0 -1
  590. package/assets/esri/core/workers/chunks/8c3bf66f8543cedc72ef.js +0 -1
  591. package/assets/esri/core/workers/chunks/8cade3af17a8bb6d4e37.js +0 -1
  592. package/assets/esri/core/workers/chunks/8eea620f770576d18809.js +0 -1
  593. package/assets/esri/core/workers/chunks/9138503cc61989b00444.js +0 -1
  594. package/assets/esri/core/workers/chunks/920d6330df72e2f01d19.js +0 -1
  595. package/assets/esri/core/workers/chunks/936974764f433eb928a8.js +0 -1
  596. package/assets/esri/core/workers/chunks/99c9f35a29f9f6c9e4ce.js +0 -1
  597. package/assets/esri/core/workers/chunks/9a52bb5949ca836b7e79.js +0 -1
  598. package/assets/esri/core/workers/chunks/9a5327d3c3658e60564d.js +0 -1
  599. package/assets/esri/core/workers/chunks/9dc7abca1d1eb9ba5b58.js +0 -1
  600. package/assets/esri/core/workers/chunks/9e054c264b17f04b7efa.js +0 -1
  601. package/assets/esri/core/workers/chunks/a143a6f8e2f21548b244.js +0 -1
  602. package/assets/esri/core/workers/chunks/a33a3c9bbe6bc7273285.js +0 -1
  603. package/assets/esri/core/workers/chunks/a48a6232fa33084cb686.js +0 -1
  604. package/assets/esri/core/workers/chunks/a4947d5d2fa6b7bd399b.js +0 -1
  605. package/assets/esri/core/workers/chunks/a49f1172b17c14527acf.js +0 -1
  606. package/assets/esri/core/workers/chunks/a7d4d257f49f3b153c26.js +0 -1
  607. package/assets/esri/core/workers/chunks/aaf3ed508d30ed583915.js +0 -1
  608. package/assets/esri/core/workers/chunks/aceec85ce64a3e6d8761.js +0 -1
  609. package/assets/esri/core/workers/chunks/b10b3eb8c2ed9be14ab2.js +0 -1
  610. package/assets/esri/core/workers/chunks/b220fedcb8a2d6450408.js +0 -1
  611. package/assets/esri/core/workers/chunks/b315b3771d0d19681aa5.js +0 -1
  612. package/assets/esri/core/workers/chunks/b397a9f87082705301a4.js +0 -2
  613. package/assets/esri/core/workers/chunks/b40e4ed067da65c3d7ce.js +0 -1
  614. package/assets/esri/core/workers/chunks/b4b16914950792c46bd3.js +0 -1
  615. package/assets/esri/core/workers/chunks/b5f291e8ed7f7cac158d.js +0 -1
  616. package/assets/esri/core/workers/chunks/b6969a42602517a6ef1c.js +0 -1
  617. package/assets/esri/core/workers/chunks/b732ad893d352db79ee1.js +0 -1
  618. package/assets/esri/core/workers/chunks/b9226dd0342cfd30ece0.js +0 -1
  619. package/assets/esri/core/workers/chunks/baad696d84ab78b3d00e.js +0 -2
  620. package/assets/esri/core/workers/chunks/bab1c3f48d089d71e983.js +0 -30
  621. package/assets/esri/core/workers/chunks/bab6dee8f4715d05d984.js +0 -1
  622. package/assets/esri/core/workers/chunks/bc2dcbdc414d157ab727.js +0 -1
  623. package/assets/esri/core/workers/chunks/bcb254cb7297fec88679.js +0 -1
  624. package/assets/esri/core/workers/chunks/bd2125e0a68378533641.js +0 -1
  625. package/assets/esri/core/workers/chunks/bdb4f216ae8881b98604.js +0 -1
  626. package/assets/esri/core/workers/chunks/bde2c3199f667b63dbe8.js +0 -1
  627. package/assets/esri/core/workers/chunks/be52d98da81b413388b3.js +0 -1
  628. package/assets/esri/core/workers/chunks/bf42b5c77f5757dc9328.js +0 -1
  629. package/assets/esri/core/workers/chunks/bf595eb10f99b8a96baa.js +0 -1
  630. package/assets/esri/core/workers/chunks/c0b6706f86665cec85f8.js +0 -1
  631. package/assets/esri/core/workers/chunks/c2ef5e5a3a4fad7f65db.js +0 -1
  632. package/assets/esri/core/workers/chunks/c3c6d337ff53e5d921e8.js +0 -1
  633. package/assets/esri/core/workers/chunks/c461c19e4fdbdd2e94d4.js +0 -1
  634. package/assets/esri/core/workers/chunks/c5fa5645f3a10dfdd7fb.js +0 -1
  635. package/assets/esri/core/workers/chunks/c66aa57b6360963bd938.js +0 -1
  636. package/assets/esri/core/workers/chunks/c873ac660e7d5dc88781.js +0 -1
  637. package/assets/esri/core/workers/chunks/c99f36159b5ed6f9267e.js +0 -1
  638. package/assets/esri/core/workers/chunks/c9a57f6d0d35b968ebea.js +0 -1
  639. package/assets/esri/core/workers/chunks/ca6a65f149e7f34dab9c.js +0 -1
  640. package/assets/esri/core/workers/chunks/cb5f4820277f3fc7ff2f.js +0 -1
  641. package/assets/esri/core/workers/chunks/cf4202ad468501ef24cf.js +0 -1
  642. package/assets/esri/core/workers/chunks/d03d50f3247327257d8b.js +0 -1
  643. package/assets/esri/core/workers/chunks/d1bfb6a229a58e2af761.js +0 -1
  644. package/assets/esri/core/workers/chunks/d2017b0b27b9e4ada922.js +0 -1
  645. package/assets/esri/core/workers/chunks/d2d9c1f32a75befe168b.js +0 -1
  646. package/assets/esri/core/workers/chunks/d309172ad61de2b3c15d.js +0 -1
  647. package/assets/esri/core/workers/chunks/d3416e6da0c1cbb53b3a.js +0 -1
  648. package/assets/esri/core/workers/chunks/d39f5d57f7e35c00ca16.js +0 -1
  649. package/assets/esri/core/workers/chunks/d4422e6e1f09d8c9352e.js +0 -1
  650. package/assets/esri/core/workers/chunks/d4770dddfbfdc3845749.js +0 -1
  651. package/assets/esri/core/workers/chunks/d5b4487a983921572e58.js +0 -1
  652. package/assets/esri/core/workers/chunks/d5f06cb4797629648997.js +0 -1
  653. package/assets/esri/core/workers/chunks/d78b2f85ec9212a973e8.js +0 -1
  654. package/assets/esri/core/workers/chunks/d7f89a3372730dacc04c.js +0 -1
  655. package/assets/esri/core/workers/chunks/d9dc8d9fc8ab2706f96b.js +0 -1
  656. package/assets/esri/core/workers/chunks/da42da04a9df651b06cc.js +0 -1
  657. package/assets/esri/core/workers/chunks/dc7860179a2d1fd05ac2.js +0 -1
  658. package/assets/esri/core/workers/chunks/dc7df2072c0ebed5602c.js +0 -1
  659. package/assets/esri/core/workers/chunks/dc96f2f6e0e02e47476f.js +0 -1
  660. package/assets/esri/core/workers/chunks/dd24cddc406f610d2483.js +0 -1
  661. package/assets/esri/core/workers/chunks/dd3789e71270a4640551.js +0 -1
  662. package/assets/esri/core/workers/chunks/dd6d4a0f1f3215ca34a5.js +0 -1
  663. package/assets/esri/core/workers/chunks/de6438fdbe38d32c4ad5.js +0 -1
  664. package/assets/esri/core/workers/chunks/ded71a656e2626a411f9.js +0 -1
  665. package/assets/esri/core/workers/chunks/df1fa0f7e8f7e2bcc2e6.js +0 -1
  666. package/assets/esri/core/workers/chunks/df80d5345765b769416f.js +0 -1
  667. package/assets/esri/core/workers/chunks/e16d542648bae86e890f.js +0 -1
  668. package/assets/esri/core/workers/chunks/e1827e86226bf9a0f4ea.js +0 -1
  669. package/assets/esri/core/workers/chunks/e2e03622936d2b35afc0.js +0 -1
  670. package/assets/esri/core/workers/chunks/e33f5780fb45ac7ca889.js +0 -1
  671. package/assets/esri/core/workers/chunks/e3ee2b699c42fd113b46.js +0 -1
  672. package/assets/esri/core/workers/chunks/e4611ebd7dba7692a914.js +0 -1
  673. package/assets/esri/core/workers/chunks/e508f8e707eb3207cfcc.js +0 -1
  674. package/assets/esri/core/workers/chunks/e52793690dff1a199647.js +0 -1
  675. package/assets/esri/core/workers/chunks/e55859fce1908c24423a.js +0 -1
  676. package/assets/esri/core/workers/chunks/e56a10a475ce128b5fce.js +0 -1
  677. package/assets/esri/core/workers/chunks/e93df239fc54af2bd6ba.js +0 -1
  678. package/assets/esri/core/workers/chunks/ea633a6a3b9ea8ce965d.js +0 -1
  679. package/assets/esri/core/workers/chunks/eae1c098c16e2faaf90d.js +0 -1
  680. package/assets/esri/core/workers/chunks/eaf5d55060ffc55aac39.js +0 -1
  681. package/assets/esri/core/workers/chunks/ece363681bb09072f379.js +0 -1
  682. package/assets/esri/core/workers/chunks/edaae0fc63d16b0f675d.js +0 -2
  683. package/assets/esri/core/workers/chunks/ee31d9f44e028df16bd5.js +0 -1
  684. package/assets/esri/core/workers/chunks/ee89564d11c077169b31.js +0 -1
  685. package/assets/esri/core/workers/chunks/ee905e24320241959965.js +0 -1
  686. package/assets/esri/core/workers/chunks/eebf59ac2dd60b9fb262.js +0 -1
  687. package/assets/esri/core/workers/chunks/ef4237dc7b67c9039826.js +0 -1
  688. package/assets/esri/core/workers/chunks/ef9106ee818ec732b670.js +0 -1
  689. package/assets/esri/core/workers/chunks/f0780abe66118b3a0bf2.js +0 -1
  690. package/assets/esri/core/workers/chunks/f121a0bf33c03abfa0b6.js +0 -1
  691. package/assets/esri/core/workers/chunks/f4329e3e4e072fac8dc0.js +0 -1
  692. package/assets/esri/core/workers/chunks/f5dbffd5e8b3c16336a1.js +0 -1
  693. package/assets/esri/core/workers/chunks/f62e37863a549f72093c.js +0 -1
  694. package/assets/esri/core/workers/chunks/f984248e2ce417e49f2f.js +0 -1
  695. package/assets/esri/core/workers/chunks/fab7e3e07d700d7bb651.js +0 -1
  696. package/assets/esri/core/workers/chunks/fcc8d0b60f7c2397e550.js +0 -1
  697. package/assets/esri/core/workers/chunks/fcf592dc8c017a08fee0.js +0 -1
  698. package/assets/esri/core/workers/chunks/fcf6a47f44c917490deb.js +0 -1
  699. package/assets/esri/core/workers/chunks/fe3c8a6fc080fdf2ad94.js +0 -1
  700. package/assets/esri/core/workers/chunks/fe5aec7e2da4465422b4.js +0 -1
  701. package/assets/esri/core/workers/chunks/fefc94944f07c768ad66.js +0 -1
  702. package/views/3d/webgl-engine/lib/CompositingHelper.js +0 -2
  703. /package/assets/esri/core/workers/chunks/{53e348f5585fa8c53fe8.js.LICENSE.txt → 13d1cb50232ae761425b.js.LICENSE.txt} +0 -0
  704. /package/assets/esri/core/workers/chunks/{b397a9f87082705301a4.js.LICENSE.txt → 3861644c06cfebe8f40c.js.LICENSE.txt} +0 -0
  705. /package/assets/esri/core/workers/chunks/{112227b862b935123ddf.js.LICENSE.txt → 3f812b0a28afb47aaaf0.js.LICENSE.txt} +0 -0
  706. /package/assets/esri/core/workers/chunks/{edaae0fc63d16b0f675d.js.LICENSE.txt → 43c8b1473695574c663e.js.LICENSE.txt} +0 -0
  707. /package/assets/esri/core/workers/chunks/{baad696d84ab78b3d00e.js.LICENSE.txt → b586f1021a27c5e1551a.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{equals as i,isSome as a}from"../../core/arrayUtils.js";import{createTask as r}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import n from"../../core/Error.js";import{EventedMixin as l}from"../../core/Evented.js";import{makeHandle as c}from"../../core/handleUtils.js";import{equalsShallow as h}from"../../core/lang.js";import d from"../../core/Logger.js";import{clamp as u}from"../../core/mathUtils.js";import{destroyMaybe as p,abortMaybe as m}from"../../core/maybe.js";import{EsriPromise as g}from"../../core/Promise.js";import{isAbortError as y,throwIfAborted as v,waitTick as f}from"../../core/promiseUtils.js";import w from"../../core/ReactiveMap.js";import{whenOnce as F,on as _,watch as M,syncAndInitial as b,initial as I,when as V}from"../../core/reactiveUtils.js";import{sqlAnd as P}from"../../core/sql.js";import{getMetersPerUnitForSR as S}from"../../core/units.js";import{property as A,subclass as C}from"../../core/accessorSupport/decorators.js";import{isSerializable as k}from"../../core/support/jsonUtils.js";import{UpdatingHandles as T}from"../../core/support/UpdatingHandles.js";import L from"../../geometry/Extent.js";import j from"../../geometry/Point.js";import{projectAsync as G}from"../../geometry/projectionUtils.js";import O from"../../geometry/SpatialReference.js";import{polygonCentroidPoint as E}from"../../geometry/support/centroid.js";import{isClockwise as x}from"../../geometry/support/coordsUtils.js";import{normalizeMapX as B}from"../../geometry/support/normalizeUtils.js";import{geographicToWebMercator as R}from"../../geometry/support/webMercatorUtils.js";import H from"../../layers/GraphicsLayer.js";import D from"../../layers/MediaLayer.js";import{searchImages as z,getSortedLayerFeatures as N}from"../../layers/orientedImagery/queries.js";import{calculateSuitabilities as U}from"../../layers/orientedImagery/core/bestImageUtils.js";import{createCoveragePolygon as q,computePolygonForInspection as $,resizePolygon as W,checkIfPolygonContainsSelectedPoint as J}from"../../layers/orientedImagery/core/coverageUtils.js";import{isElevationSource as Z}from"../../layers/orientedImagery/core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as K,convertGeographicToWebMercator as Q}from"../../layers/orientedImagery/core/utils.js";import X from"../../layers/orientedImagery/transformations/updateElevation.js";import{getElevationSampler as Y}from"../../layers/orientedImagery/transformations/updateElevationUtils.js";import{or as ee,getInitialAngle as te,convertPixelLocationToSphereVertex as ie,getUpdateElevationProps as ae,getImageToWorldProperties as re,getImageToWorldPanoramicProperties as se}from"../../layers/orientedImagery/transformations/utils.js";import oe from"../../layers/support/ExtentAndRotationGeoreference.js";import{getFloorFilterClause as ne}from"../../layers/support/floorFilterUtils.js";import le from"../../layers/support/VideoElement.js";import ce from"../../views/MapView.js";import he from"../../views/draw/Draw.js";import{scale as de}from"../../views/draw/support/drawUtils.js";import{ViewEventPriorities as ue}from"../../views/input/InputManager.js";import pe from"../PanoramicVideoViewer.js";import me from"../PanoramicViewer.js";import{defaultAngleThresholdInDegrees as ge,videoMapViewConstraint as ye,clockwiseDirections as ve,sampleExtent as fe,videoExtent as we,invalidCameraHeading as Fe,sectorsInOrder as _e,sectorsRadii as Me,fixedImageSize as be}from"./constants.js";import{isFeatureAttachment as Ie}from"./galleryUtils.js";import{crossSymbol as Ve,crossSymbol3D as Pe,measurementPolygonSymbol as Se,polylineSymbolPanoramic as Ae,measurementPolylineSymbol as Ce,cameraOverlaySymbol3D as ke,cameraOverlaySymbol as Te,diamondSymbol as Le,diamondSymbol3D as je,activeSourcePointSymbol as Ge,sourcePointSymbol as Oe}from"./symbols.js";import{registryKeys as Ee}from"./types.js";import{isNoAttachmentError as xe,extractHorizonAnglesFromMedia as Be,isTifOrMrf as Re,filterOILLayerView as He,assignElevationSampleToFeatures as De,filterByZ as ze,createPanoramicMedia as Ne,createNonPanoramicMedia as Ue,isSceneView as qe,isGraphic as $e,calculateSegment as We,calculateDirection as Je}from"./utils.js";import{disableVideoZoomAndPan as Ze,getUpdatedConstraints as Ke,getUpdatedExtentPoints as Qe}from"./videoViewerUtils.js";import Xe from"./components/ImageViewer.js";import Ye from"./components/NavigationNode.js";import et from"./components/OrientedImageryVideoViewModel.js";import{NoFeatureFoundWithObjectIdError as tt}from"./navigation/errors.js";import{queryFeatureByObjectIds as it}from"./navigation/queries.js";import{ImageMeasurementService as at}from"./services/ImageMeasurementService.js";import{configureSketchTool as rt,extractFieldsFromDataCaptureLayer as st,constructGraphicFromImageGeometry as ot}from"./support/dataCaptureUtils.js";import{imageSpaceToPoint as nt,removeZFromGeometry as lt}from"./support/geometryUtils.js";import ct from"./support/resolveMediaProps.js";import{isValidDataCaptureLayer as ht}from"./support/typeUtils.js";const dt=()=>new n("orientedimageryviewer:sketch-not-initialized","Sketch property is not initialized, call loadSketch first");let ut=class extends(l(g)){constructor(e){super(e),this.additionalFeatures=new s,this.additionalCameraLocations=new s,this.additionalFootprints=new s,this.areaMeasurementResult=0,this.areaMeasurementAccuracy=0,this.bestFeatureAngle=0,this.bestFeatureCurrentFootprint=null,this.bestFeatureFootprint=null,this.cameraHeadingThreshold=ge,this.cameraPitchThreshold=ge,this.clickAction="hittest",this.correctedLocationPointOnImage=null,this.videoViewModel=null,this.collectionId=null,this.coverageFrustums=new s,this.coveragePolygons=new s,this.currentBestFeature=null,this.currentBestFeatureMeasurementImage=null,this.currentBestFeatureLocation=null,this.currentCoverageVisible=!0,this.depthImage=null,this.featureCache=[],this.navigationNodes=new s,this.determineWorkflowForFeature=async(e,t,i)=>{const{currentBestFeature:a,selectedPoint:r}=this;if(this.emit("popup-close"),a&&r){this._initialCurrentCoverageUpdate=!0,this._updateGroundElevation=!0;try{await this._updatePointsAndPolygons(i),await this._loadDepthImage(i),await this._loadImage(i)}catch(s){y(s)||(this.loadImageError(s),d.getLogger(this).error("#loadIImage()","error occured while loading image",s))}}},this.determineWorkflowForTriangularMeasurement=async(e,t,i)=>{if(this.emit("popup-close"),this.currentBestFeatureMeasurementImage&&this.selectedPoint)try{await this._loadMeasurementViewerImage(i)}catch(a){y(a)||(this.loadImageError(a),d.getLogger(this).error("#loadIImage()","error occured while loading image",a))}},this.disabled=!1,this.displayMessage={key:"onLoadMessage",type:"info"},this.displayNewMeasurementButton=!0,this.distanceMeasurementResult=0,this.distanceAccuracyArray=[],this.dataCaptureLayer=null,this.features=new s,this.groundCoordinates=null,this.groundCoordinatesAccuracy=null,this.heightGraphic=null,this.heightMeasurementResult=0,this.heightMeasurementAccuracy=0,this.imageGeometryField=null,this.imageLocationToolState=!1,this.initialVideoMapViewExtent=null,this.imageMeasurementViewer=new Xe,this.isAdditionalCoverageVisible=!1,this.isAdditionalPointSourcesVisible=!1,this.layer=null,this.localPort=null,this.locationPointOnImage=null,this.mapImageConversionToolState=!1,this.measureType=null,this.measurementGraphic=null,this.navigatorCurrentBestFeature=null,this.oiObjectIdField=null,this.overlayedCameraLocations=new s,this.overlayedMapFeatures=new w,this.pixelCoordinates=null,this.preserveAngle="none",this.pointSources=new s,this.preloadMedia=!1,this.preloadMediaSize=5,this.previousFeatureAngle=0,this.selectedPoint=null,this.shouldShowSelectedImage=!1,this.sketch=null,this.sketchTriangular=null,this.sketchTriangularGraphicsLayer=null,this.draw=null,this.drawAdapter=null,this.polylineDrawAction=null,this.scheduledFrameId=null,this.sketchAdapter=null,this.triangularMeasurementActive=!1,this.triangulatedDistanceMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaMeasurement=null,this.triangulatedAreaAccuracy=0,this.triangulatedMeasurementGraphic=null,this.triangulatedPoint=null,this.triangulatedMeasurementAdapter=null,this.updateFootprint=async(e,t,i)=>{"default"===this.mode&&"image-loaded"!==this.state||await(this._adapter?.updateFootprint(e,t,i))},this.updateVideoFootprint=async e=>{this.mode.includes("video")&&this.videoElement?.content&&await(this._adapter?.updateVideoFootprint(e))},this.updateFootprintPanorama=async(e,t)=>{await(this._adapter?.updateFootprintPanorama(e,t))},this.updatingTriangularMeasurementState=!1,this.videoElement=null,this.videoLayer=null,this.videoMapView=new ce({map:new Map,constraints:ye}),this.verticalFilterEnabled=!1,this._adapter=null,this._highlightedFeatureHandle=null,this._imageViewer=new Xe,this._initialCurrentCoverageUpdate=!0,this._locationViewModel=null,this._measurementService=null,this._mediaPrefetcher=null,this._navigationManager=null,this._overlays=new H({listMode:"hide",internal:!0,elevationInfo:{mode:"absolute-height"},title:"OrentedImageryViewerViewModel overlays layer"}),this._panoramicVideoViewer=new pe,this._panoramicViewer=new me,this._panoramicMeasurementViewer=new me,this._referencePointOnGround=null,this._referencePointOnImage=null,this._referenceTransformationService=null,this._sectorData=null,this._transformationService=null,this._featureToSector=null,this._updatingHandles=new T,this._clickTask=null,this._crossSymbol=null,this.footprintExtent=null,this._featureChangedTask=null,this._mediaPrefetchTask=null,this._suitabilities=null,this._transformController=new AbortController,this._updateFootprintTask=null,this._updateGroundElevation=!1,this.addUpdatingPromise=e=>this._updatingHandles.addPromise(e),this.filterCapturedFeatures=e=>{const t=this.currentBestFeature?.attributes.objectId,i=this.layer?.imageReferenceField;if(!t||!e||!i)return;const a=this.overlayedMapFeatures.get(e);a?.forEach(e=>{const a=e.attributes??{},r=Object.keys(a).find(e=>e.toLowerCase()===i.toLowerCase());(r?a[r]:null)!==t&&(e.visible=!e.visible)})},this.hideImageGeometry=e=>{},this.highlight=e=>{if(!this._overlaysView)return;this.removeHighlight();const t=this.additionalFootprints.find(({attributes:{imageID:t}})=>t===Number(e));this._highlightedFeatureHandle=t?this._overlaysView?.highlight(t):null},this.loadDataCaptureAdapter=async e=>{await this.loadSketch(e);const t=import("./adapters/sketch/DataCaptureAdapter.js"),{default:i}=await t;return v(e),this.sketchAdapter=new i({viewModel:this}),this.sketchAdapter},this.loadImageFromFeature=(e,t,i)=>this._updatingHandles.addPromise(this._loadImageFromFeature(e,t,i)),this.storeImageMeasurementViewer=e=>{this.imageMeasurementViewer=e},this.storePanoramicMeasurementViewer=e=>{this._panoramicMeasurementViewer=e},this.loadImageViewer=e=>{this._imageViewer?.destroy(),this._imageViewer=e},this.loadPanoramicViewer=e=>{this._panoramicViewer?.destroy(),this._panoramicViewer=e},this.loadPanoramicVideoViewer=e=>{this._panoramicVideoViewer?.destroy(),this._panoramicVideoViewer=e},this.loadVideoViewer=e=>{this.videoMapView.container=e},this.showImageByObjectId=async(e,t)=>{const i=this.additionalFeatures.find(({attributes:t})=>t.objectId===e);if(i)this.currentBestFeature=i;else{const{layer:i,layerFloorFilterClause:r,layerTimeExtent:s}=this;if(!i)return void this.setMessage("noLayerSelected","info");this.beforeLoad();const o=this._updatingHandles.addPromise(this._queryAndLoadByObjectId(i,e,r,s,t));try{await o,await this.selectBestFeature(e,t)}catch(a){y(a)||(d.getLogger(this).error("oriented-imagery-viewer:show-image",a),"NoFeatureFoundWithObjectIdError"===a.name?this.setMessage("noFeatureFoundWithObjectId","error","",{objectId:e}):this.setMessage("imageLoadError","error",a.message))}}},this.getSectorFeatureById=e=>this._suitabilities?.find(({feature:{attributes:{objectId:t}}})=>t===e),this.getFeatureSectorById=e=>this._featureToSector?.[`${e}`],this.navigate=async(e,t)=>{const{mode:i}=this;if("default"!==i&&"panoramic"!==i)throw new n("NavigationError","Navigation is only supported in 'default' and 'panoramic' modes.");const a=e=>"default"===i&&e.declaredClass.endsWith("NavigationManager")||"panoramic"===i&&e.declaredClass.endsWith("NavigationManagerPanoramic");if(null==this._navigationManager||!a(this._navigationManager)){p(this._navigationManager);const e="default"===i?import("./navigation/NavigationManager.js"):import("./navigation/NavigationManagerPanoramic.js");this._navigationManager=new(await e).default({viewModel:this})}return this._navigationManager.navigate(e,t)},this.removeHighlight=()=>this._highlightedFeatureHandle?.remove(),this.revealImageGeometry=e=>{},this.selectBestFeature=async(e,t)=>(v(t),this.currentBestFeature=this.features?.find(({attributes:t})=>`${t.objectId}`==`${e}`),F(()=>"image-loaded"===this.state,t)),this.toggleImageAttributes=()=>{const{currentBestFeature:e,popupEnabled:i,layer:a,view:r}=this;if(this.emit("popup-close"),!(r&&e&&i&&a))return;const{attributes:s,geometry:o}=e,n=new t({geometry:o,attributes:s.toJSON(),origin:a.graphicOrigin});this.emit("popup-open",{features:[n],location:s.location.clone()})},this.updateSuitabilities=(e,t=!0)=>{e.sort((e,t)=>e.suitability-t.suitability),this._suitabilities=e;const i=this._suitabilities.map(({feature:e})=>e);this._initialCurrentCoverageUpdate=!0,this._updateFeatures(i,t),this._groupFeaturesBySectors()},this._createViewClickHandle=()=>{if(this.removeHandles(Ee.click),this.disabled||null==this.view)return;const e=this.mapImageConversionToolState&&"image-loaded"===this.state?this._mapImageConversionToolViewClickHandler:this._viewClickHandler;this.addHandles(this.view.on("click",e,ue.DEFAULT),Ee.click)},this._createImageClickHandle=()=>{this.removeHandles(Ee.imageClick);const{mapImageConversionToolState:e,mode:t,activeViewer:i,currentBestFeature:a,footprintExtent:s}=this,o=i?.imageSize;if(!(e&&"none"!==t&&o&&s&&a))return;const n=i.clickAction;this.clickAction="pixel-location";const l=c(()=>{this.clickAction=n});let h=null;const d=_(()=>i,"pixel-location",e=>{this.plotReferencePointOnImage(e),h?.abort(),h=r(async t=>{if(!e)return;const i=await this._transformationService.pixelToMapPoint(e).then(e=>{const t=this.view?.spatialReference;return ee(!t,e.spatialReference.equals(t))?e:G(e,t)});v(t),this.plotReferencePointOnGround(i)})});this.addHandles([d,l],Ee.imageClick)},this._createTriangularImageClickHandle=()=>{this.removeHandles(Ee.triangularImageClick),this.triangularMeasurementActive&&"none"!==this.mode&&this.currentBestFeature&&this.currentBestFeatureMeasurementImage&&this.activeTriangulatedViewer&&this.addHandles(this.activeTriangulatedViewer.imageRenderer.on("double-click",this._measurementImageClickHandler),Ee.triangularImageClick)},this._enablePan=()=>{this.removeHandles(Ee.videoPanHandles)},this._disablePan=()=>{this.removeHandles(Ee.videoPanHandles),this.addHandles(Ze(this.videoMapView),Ee.videoPanHandles)},this._handleImageHitTestResponse=async e=>{const{layer:t,overlayedCameraLocations:i}=this;if(!t)return;const a=e.results.find(({graphic:e,graphic:{attributes:a}})=>i.includes(e)&&a&&!a[t.imageReferenceField]&&!a[t.imageGeometryField]);if(!a)return;const r=a.graphic.attributes[t.objectIdField];await this.showImageByObjectId(r)},this._loadDepthImage=async e=>{const{currentBestFeature:t,layer:i,depthImageNotSupported:a}=this;if(this.depthImage?.destroy(),this.depthImage=null,!i||!t||a)return;const{depthImage:r}=t.attributes;if(!r)return;const s=(await import("./services/DepthImageService.js")).default;v(e),this.depthImage=new s({url:r});try{await this.depthImage.load(e)}catch(o){y(o)||(d.getLogger(this).error("error occurred while loading depth image",o),this.depthImage?.destroy(),this.depthImage=null)}},this._loadImage=async e=>{const{currentBestFeature:t,layer:i,mode:a}=this;if(this.clearGraphics(),i&&t&&"none"!==a&&"video"!==a&&"panoramic-video"!==a)try{await this.loadImageFromFeature(i,t,e),v(e),await this.transformAndPlotSelectedLocation(e)}catch(r){y(r)||this.loadImageError(r)}},this._loadVideo=async e=>{const{currentBestFeature:t,mode:i,selectedPoint:a}=this,r=t?.attributes.imagePath;if(!t||"panoramic-video"!==i||!r)return;const{attributes:s}=t,{cameraPitch:o,cameraOrientation:n,location:l}=s,c=l.spatialReference.isWGS84&&4!==n?.type?R(l):new j(l);try{this._panoramicVideoViewer.viewModel.video&&this._panoramicVideoViewer.viewModel.video.pause(),this._panoramicVideoViewer.videoSource=r;let t=0;c&&a&&(t=await te(c,a)-t),this._panoramicVideoViewer.pitch=o??0,this._panoramicVideoViewer.yaw=t,await this._panoramicVideoViewer.loadVideo(e),v(e)}catch(h){y(h)||this.loadImageError(h)}},this._loadImageFromFeature=async(e,t,i)=>{const{mode:a}=this;if("default"!==a&&"panoramic"!==a)return;let r;try{r=await ct(t.attributes,e,i),v(i)}catch(f){if(y(f))return;return xe(f)?(d.getLogger(this).error(f),void this.setMessage("noAttachment","error",`${e.objectIdField}: ${t.attributes.objectId}`)):(d.getLogger(this).error(f,{[e.objectIdField]:t.attributes.objectId,layer:e}),void this.setMessage("imageLoadError","error",`query-attachments-failed:${e.objectIdField} ${t.attributes.objectId}`))}if(!r)return;const{mediaUrl:s,datasetFormat:o,rotation:n,searchParams:l,location:c,cameraHeading:h,matrix:u,cameraPitch:p,getDataSetFormatError:m}=r,g=`${t.attributes.objectId}`;try{let r=this._mediaPrefetcher?.getCachedMedia(g);if(!r){const i=this.navigationNodes.find(e=>e.id===t.attributes.objectId);if(i){try{await(this._mediaPrefetcher?.startPrefetchForNode(i,e))}catch(w){}r=this._mediaPrefetcher?.getCachedMedia(g)}}if(r){if("panoramic"===a){const e=this.triangularMeasurementActive?this._panoramicMeasurementViewer:this._panoramicViewer;let a=0;return c&&this.selectedPoint&&(a=await te(c,this.selectedPoint)-a),await e.loadMedia(r,i),this.selectedPoint?e.set({yaw:a,pitch:p}):"viewAngle"in t.attributes&&Number.isFinite(t.attributes.viewAngle)&&e.set({yaw:t.attributes.viewAngle,pitch:p}),void(this.triangularMeasurementActive?await this.initializeReferenceTransformationService(i):await this.initializeTransformationService(i))}return await this._setImageSource(this.triangularMeasurementActive?this.imageMeasurementViewer:this._imageViewer,r,i),void(this.triangularMeasurementActive?await this.initializeReferenceTransformationService(i):await this.initializeTransformationService(i))}}catch(w){}m&&d.getLogger(this).warn("error occurred while getting dataset format",m),"panoramic"===a?await this.loadPanoramicMediaSource({lookAt:{yaw:this.selectedPoint?await te(c,this.selectedPoint):"viewAngle"in t.attributes&&Number.isFinite(t.attributes.viewAngle)?t.attributes.viewAngle:0,pitch:p},extension:o?.toUpperCase(),url:s,cameraHeading:h,matrix:u},i):await this.loadMediaSource({datasetFormat:o?.toUpperCase(),url:s,customParameters:l,rotation:n},i),this.triangularMeasurementActive?await this.initializeReferenceTransformationService(i):await this.initializeTransformationService(i)},this._loadMeasurementViewerImage=async e=>{const{currentBestFeatureMeasurementImage:t,layer:i,mode:a}=this;if(this.imageMeasurementViewer.clearGraphics(),this._panoramicMeasurementViewer.clearGraphics(),i&&t&&"none"!==a&&"video"!==a&&"panoramic-video"!==a)try{await this.loadImageFromFeature(i,t,e),v(e)}catch(r){y(r)||this.loadImageError(r)}},this._loadMediaPrefetcher=async e=>{if(!this._mediaPrefetcher){const{default:t}=await import("./support/MediaPrefetcher.js");v(e),this._mediaPrefetcher=new t({maxEntries:this.preloadMediaSize*ve.length})}return this._mediaPrefetcher},this._loadViewAdapter=async e=>{const{view:t}=this;if(t)switch(t.type){case"2d":{const{default:t}=await import("./adapters/view/MapViewAdapter.js");v(e),this._adapter=new t(this);break}case"3d":{const{default:t}=await import("./adapters/view/SceneViewAdapter.js");v(e),this._adapter=new t(this);break}}else this._adapter=null},this._mapImageConversionToolViewClickHandler=e=>{if(e.stopPropagation(),e.preventDefault(),e.mapPoint){const t=e.mapPoint;t.x=B(t.x,t.spatialReference),this.plotMapPoint(e.mapPoint)}},this._measurementImageClickHandler=e=>{e.stopPropagation(),e.preventDefault();const{sketchTriangular:t,triangularMeasurementActive:i,currentBestFeatureMeasurementImage:a,triangulatedMeasurementGraphic:r}=this;t&&i&&a&&r&&"active"!==t.state&&(t.update([r],{tool:"reshape"}),this.updatingTriangularMeasurementState=!0)},this._updateInteraction=()=>{const e=this.videoMapView.extent;if(!e)return;if(e.width<fe.xmax-fe.xmin&&e.height<fe.ymax-fe.ymin){this._enablePan();const t=Ke(e);t&&(this.videoMapView.constraints.geometry=t)}else this.initialVideoMapViewExtent&&!this.videoMapView.extent.equals(this.initialVideoMapViewExtent)&&(this.videoMapView.extent=this.initialVideoMapViewExtent),this._disablePan(),this.videoMapView.constraints.geometry=null},this._viewClickHandler=e=>{this._clickTask?.abort(),this._clickTask=r(async t=>{const{pointerType:i,button:a,mapPoint:r}=e;if("mouse"===i&&0!==a||!r)return;e.stopPropagation(),e.preventDefault();const{view:s,layer:o}=this;if(s&&o){if(this.shouldShowSelectedImage){const i=s.hitTest(e,{include:[o]});this._updatingHandles.addPromise(i);const a=await i;return v(t),await this._processHitTestResults(o,a,{signal:t})}return this._updatingHandles.addPromise(this.loadBestImage(r,{signal:t}))}})},this.plotSelectedPointOnImage=async(e,i)=>{if(await f(i),!e)return;const a=new j({...k(e)?e.toJSON():e});if("default"===this.mode)a.x-=.5,a.y=.5-a.y,a.spatialReference=this._imageViewer.imageRenderer.spatialReference.clone(),this._crossSymbol=new t({geometry:a,symbol:Ve}),this._imageViewer.addGraphic(this._crossSymbol,0);else if("panoramic"===this.mode){const{imageSize:i,media:a}=this._panoramicViewer;if(!i||!a)return;const r=Be(a),s=ie(e,...i,r);this._crossSymbol=new t({geometry:new j(s,O.WebMercator),symbol:Pe}),this._panoramicViewer.addGraphic(this._crossSymbol,0)}},this.handleSectorClick=this.handleSectorClick.bind(this),this.searchBestImage=this.searchBestImage.bind(this),this.transformAndPlotReferencePointOnImage=this.transformAndPlotReferencePointOnImage.bind(this)}initialize(){this.addHandles([M(()=>this.view,()=>this.load(),b),M(()=>this.view?.map,(e,t)=>{t?.layers.remove(this._overlays),e?.layers.add(this._overlays)},I),M(()=>this.view?.map?.allLayers?.length,e=>{e&&this.view?.map?.layers.reorder(this._overlays,e-1)},I),M(()=>[this.state,this.mapImageConversionToolState,this.view,this.disabled],()=>{this._createViewClickHandle(),this._createImageClickHandle()},b),M(()=>[this.triangularMeasurementActive,this.currentBestFeatureMeasurementImage],()=>{this._createTriangularImageClickHandle()},b),M(()=>[this.state,this.imageLocationToolState,this.view],()=>{this._initializeMeasurementService(),this._initializeLocationViewModel()},b),M(()=>this.measureType,()=>{this.clearPreviousMeasurements(),this._initializeMeasurementService()},b),M(()=>this.bestFeatureAngle,(e,t)=>{this.previousFeatureAngle=t??0},b),M(()=>this.currentBestFeature,async(e,t)=>{m(this._featureChangedTask),this._featureChangedTask=r(async i=>this.determineWorkflowForFeature.apply(this,[e,t,{signal:i}])),await this._featureChangedTask.promise},{sync:!0}),M(()=>[this.currentNode,this.preloadMedia,this.navigationMode],()=>{this._mediaPrefetchTask?.abort(),this._mediaPrefetchTask=r(async e=>{this.preloadMedia&&null!=this.navigationMode?(this._mediaPrefetcher??=await this._loadMediaPrefetcher({signal:e}),v(e),"directional"===this.navigationMode?this._mediaPrefetcher.enqueueDirectionalPrefetch(this.layer,this.currentNode,this.preloadMediaSize):this._mediaPrefetcher.enqueueSequentialPrefetch(this.layer,this.currentNode,this.preloadMediaSize)):this._mediaPrefetcher?.clear()})},b),M(()=>this.currentBestFeatureMeasurementImage,(e,t)=>{m(this._featureChangedTask),t&&e!==t&&(this.triangulatedPoint=null,this.sketchTriangularGraphicsLayer?.graphics.destroyAll(),this._measurementService?.resetMeasurementVectors()),this._featureChangedTask=r(async i=>{await this.determineWorkflowForTriangularMeasurement(e,t,{signal:i}),v(i),this._reorderTriangularSketchLayer()})},b),M(()=>this.triangularMeasurementActive,(e,t)=>{t&&!e&&(this._measurementService?.resetMeasurementVectors(),this.currentBestFeatureMeasurementImage=null,this.triangulatedDistanceMeasurement=null,this.triangulatedMeasurementGraphic=null,this.triangulatedPoint=null,this.updatingTriangularMeasurementState=!1,this.triangulatedAreaMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaAccuracy=0,this.sketchTriangularGraphicsLayer?.graphics.destroyAll(),this.clearReferencePointOnImage(),this.imageMeasurementViewer.clearImage(),this.imageMeasurementViewer.clearGraphics(),this._panoramicMeasurementViewer.clearImage(),this._panoramicMeasurementViewer.clearGraphics())}),M(()=>this.mode,e=>{switch(this.removeHandles(Ee.interactionHandles),e){case"default":this.addHandles(M(()=>{const{state:e}=this;return"image-loaded"===e?this._imageViewer.imagePointsInView:null},e=>{e&&(m(this._updateFootprintTask),this._updateFootprintTask=r(async t=>{await this.updateFootprint(e,void 0,{signal:t})}))},{...b,equals:(e,t)=>i(e,t,h)}),Ee.interactionHandles);break;case"video":this.addHandles(M(()=>{const{footprintExtent:e,videoElement:t,bestFeatureFootprint:i}=this;if(e&&t?.loaded&&i)return{videoExtent:we,bestFeatureFootprint:i}},e=>{e?.videoExtent&&e?.bestFeatureFootprint&&(m(this._updateFootprintTask),this._updateFootprintTask=r(async t=>{const i={points:e.videoExtent,feature:void 0,scale:void 0,options:{signal:t}};await this.updateVideoFootprint(i)}))},{...b,equals:(e,t)=>i(e?.videoExtent,t?.videoExtent,h)&&e?.bestFeatureFootprint===t?.bestFeatureFootprint}),Ee.interactionHandles);break;case"panoramic":this.addHandles(M(()=>{const{currentBestFeature:e,state:t,_panoramicViewer:i}=this,{imageSize:a,vfov:r,hfov:s,pitch:o,yaw:n}=i;return e&&a&&!t.includes("loading")&&null!=r&&null!=s&&null!=o&&null!=n?[r,s,n,o]:null},e=>{if(!e||this.state.includes("loading"))return;const[t,i,a,s]=e;this.currentNode&&(this.currentNode.currentHeading=a,this.currentNode.currentPitch=s),m(this._updateFootprintTask),this._updateFootprintTask=r(async e=>{await this.updateFootprintPanorama({verticalFieldOfView:t,horizontalFieldOfView:i,yaw:a,pitch:s},{signal:e}),this._updateFootprintTask=null})},{equals:(e,t)=>i(e,t,h)}),Ee.interactionHandles);break;case"panoramic-video":this.addHandles(M(()=>{const{currentBestFeature:e,state:t,_panoramicVideoViewer:i}=this,{imageSize:a,vfov:r,hfov:s,pitch:o,yaw:n,viewModel:l}=i,c=l.closestFeature??e;return c&&a&&!t.includes("loading")&&null!=r&&null!=s&&null!=o&&null!=n?[r,s,n,o,c]:null},e=>{if(!e)return;const[t,i,a,s,o]=e;m(this._updateFootprintTask),this._updateFootprintTask=r(async e=>{await this.updateFootprintPanorama({verticalFieldOfView:t,horizontalFieldOfView:i,yaw:a,pitch:s,feature:o},{signal:e}),v(e),this._updateFootprintTask=null})},{equals:(e,t)=>i(e,t,h)}),Ee.interactionHandles)}},b),M(()=>[this.brightness,this.contrast,this.sharpness],()=>{const{_imageViewer:e,brightness:t,contrast:i,mode:a,sharpness:r}=this;"default"===a&&(e.brightness=t,e.contrast=i,e.sharpness=r)},b),M(()=>this.activeViewer?.imageRenderer,()=>{this.sketch&&(this.sketch.view=this.activeViewer?.imageRenderer)}),M(()=>this.activeViewer,e=>{this.removeHandles(Ee.hittestHandles),e&&this.addHandles(_(()=>e,"hittest-response",this._handleImageHitTestResponse),Ee.hittestHandles)}),M(()=>this.videoMapView.extent,async()=>{const e=this.videoViewModel?.closestFeature;e&&(m(this._updateFootprintTask),this._updateFootprintTask=r(async t=>{const i={points:this.videoExtentPoints,feature:e,options:{signal:t}};await this.updateVideoFootprint(i)}))}),M(()=>[this.videoMapView.interacting,this.videoMapView.navigating,this.videoMapView.scale],()=>{this.scheduledFrameId||(this.scheduledFrameId=requestAnimationFrame(()=>{this.scheduledFrameId=null,this._updateInteraction()}))},{initial:!0}),V(()=>null!=this.videoMapView.extent,()=>{this.initialVideoMapViewExtent=this.videoMapView.extent},{once:!0})]),this.when().finally(()=>{this.notifyChange("state")})}destroy(){this.currentBestFeature=null,this._updateFootprintTask=m(this._updateFootprintTask),this._clickTask=m(this._clickTask),this.coverageFrustums.destroy(),this.coveragePolygons.destroy(),this.pointSources.destroy(),this.additionalFootprints.destroy(),this.additionalCameraLocations.destroy(),this.bestFeatureFootprint=p(this.bestFeatureFootprint),this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint),this.videoViewModel=p(this.videoViewModel),this._locationViewModel=p(this._locationViewModel),this._crossSymbol=p(this._crossSymbol),this._referencePointOnGround=p(this._referencePointOnGround),this._referencePointOnImage=p(this._referencePointOnImage),this._overlays&&this.view?.map?.remove(this._overlays),this._overlays.destroy(),this._imageViewer.destroy(),this.imageMeasurementViewer.destroy(),this._panoramicViewer.destroy(),this._panoramicMeasurementViewer.destroy(),this._mediaPrefetcher?.destroy()}get activeLayer(){return o(d.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){o(d.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get activeViewer(){const{_imageViewer:e,_panoramicViewer:t,mode:i}=this;switch(i){case"default":return e;case"panoramic":return t;default:return null}}get activeTriangulatedViewer(){switch(this.mode){case"default":return this.imageMeasurementViewer;case"panoramic":return this._panoramicMeasurementViewer;default:return null}}get accuracyParametersMissing(){return this.layer?.orientationAccuracy?.every(e=>0===e)??!0}get brightness(){return this._get("brightness")??0}set brightness(e){this._set("brightness",u(e,-10,10))}get contrast(){return this._get("contrast")??0}set contrast(e){this._set("contrast",u(e,-10,10))}get currentNode(){const{currentBestFeature:e,navigationNodes:t}=this;return t.find(t=>t.id===e?.attributes.objectId)}get depthImageNotSupported(){if(this.currentBestFeature?.attributes.depthImage)return!Re(this.currentBestFeature.attributes.depthImage)}get featureCount(){return this.features?.length??0}get imageGalleryEnabled(){const{currentBestFeature:e}=this;if(!e)return!1;const t=e.attributes.imagePath?.trim();return Re(t)||Ie(t)}get imageLoaded(){return o(d.getLogger(this),"imageLoaded",{replacement:'Use OrientedImageryViewer.state === "image-loaded"',version:"4.29",warnOnce:!0}),"image-loaded"===this.state}get invalidCameraHeading(){return this.currentBestFeature?.attributes?.cameraHeading===Fe}get imagePointsInView(){const{mode:e,_imageViewer:t}=this;return"default"===e?t.imagePointsInView:null}get layerView(){const{layer:e,view:t}=this;if(e&&t)return t.allLayerViews.find(He(e))}get layerFloorFilterClause(){const{layerView:e}=this;return e?ne(e):null}get layerTimeExtent(){return this.layerView?.timeExtent??null}get mode(){const e=this.currentBestFeature?.attributes;if(!e)return"none";const t=e.orientedImageryType;if(t?.includes("video"))return t.includes("360")?"panoramic-video":"video";const{horizontalFieldOfView:i,isSpherical:a}=e;return 360===i||a?"panoramic":"default"}get panoramicVideoLoaded(){const{mode:e,_panoramicVideoViewer:t}=this,{videoLoaded:i}=t.viewModel;return("panoramic-video"===e&&!0===i)??!1}get popupEnabled(){return!0===this.layer?.popupEnabled}get referencePoint(){return this._referencePointOnGround?.geometry}get sectorData(){const{_sectorData:e}=this;return e?_e.map(t=>e[t]):null}get sharpness(){return this._get("sharpness")??0}set sharpness(e){this._set("sharpness",u(e,0,1))}get sketchGraphicsLayer(){const{sketch:e}=this;return"graphics"===e?.layer?.type?e.layer:void 0}get state(){const{mode:e,_updatingHandles:{updating:t},_featureChangedTask:i}=this;if(!this.isFulfilled()||t||!1===i?.finished)return"loading";if(this.isRejected())return"error";if("error"===this.displayMessage?.type)return"image-load-error";switch(e){case"default":return this._imageViewer.state;case"panoramic":return this._panoramicViewer.state;case"video":return this.videoElement?.loaded?"video-loaded":"video-not-loaded"}return"ready"}get thumbnails(){const{features:e}=this;return e?new s(e.map(({attributes:{imagePath:e,objectId:t,cameraRoll:i,imageRotation:a}})=>{const r=e?.trim();return Re(r)||Ie(r)?{url:r,objectId:t,rotation:(i??0)+(a??0)}:null}).filter(a)):null}get videoExtentPoints(){const e=Qe(this.videoMapView.extent);return e.length?e:we}set view(e){this._set("view",e)}get _defaultGraphicsLayer(){const e={blendMode:"source-atop"};switch(this.mode){case"panoramic":return new H({...e,elevationInfo:{mode:"absolute-height"}});case"default":return new H({...e});default:return}}get _overlaysView(){return this.view?.layerViews.find(({layer:e})=>e===this._overlays)}beforeLoad(e=!0){this.emit("popup-close"),e&&(this.displayMessage=null),this.clearPreviousGroundLocation(),this.triangularMeasurementActive=!1,this.currentBestFeatureMeasurementImage=null,this.measureType=null,this.imageLocationToolState=!1,this.features.removeAll(),this.currentBestFeature=null,this.additionalFeatures.removeAll(),this.additionalFootprints.removeAll(),this.additionalCameraLocations.removeAll(),this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint),this._overlays?.removeAll()}async calculateLocationAccuracy(e){return this._measurementService?.calculateLocationAccuracy(e)}clearLocationPointOnImage(e=!1){this.locationPointOnImage&&!e&&(this._imageViewer.removeGraphic(this.locationPointOnImage),this._panoramicViewer.removeGraphic(this.locationPointOnImage),this.locationPointOnImage=p(this.locationPointOnImage)),this.correctedLocationPointOnImage&&(this.imageMeasurementViewer.removeGraphic(this.correctedLocationPointOnImage),this._panoramicMeasurementViewer.removeGraphic(this.correctedLocationPointOnImage),this.correctedLocationPointOnImage=p(this.correctedLocationPointOnImage))}clearPreviousMeasurements(){this.clearMeasurementGraphics(),this.resetMeasurementData(),this.stopMeasurement()}clearPreviousGroundLocation(){this.groundCoordinates=null,this.groundCoordinatesAccuracy=null,this.pixelCoordinates=null,this.clearLocationPointOnImage()}clearMeasurementGraphics(){this.measurementGraphic&&(this.activeViewer?.removeGraphic(this.measurementGraphic),this.measurementGraphic=null),this.heightGraphic&&(this.activeViewer?.removeGraphic(this.heightGraphic),this.heightGraphic=null),this.triangularMeasurementActive&&this.sketchTriangularGraphicsLayer?.graphics.destroyAll()}digitizeCancel(){return this.sketch?.cancel()}digitizeCanRedo(){return this.sketch?.canRedo()??!1}digitizeCanUndo(){return this.sketch?.canUndo()??!1}digitizeComplete(){return this.sketch?.complete()}async digitizeCreate(e,t){const{sketch:i,dataCaptureLayer:a}=this;if(!i)throw dt();rt(a,e,i),await i.create(e,{...t,defaultZ:0})}digitizeDelete(){if(!this.sketch)throw dt();return this.sketch.delete()}digitizeDuplicate(){if(!this.sketch)throw dt();return this.sketch.duplicate()}digitizePlace(e,t){if(!this.sketch)throw dt();return this.sketch.place(e,t)}digitizeRedo(){if(!this.sketch)throw dt();return this.sketch.redo()}digitizeUndo(){if(!this.sketch)throw dt();return this.sketch.undo()}digitizeUpdate(e,t){if(!this.sketch)throw dt();return this.sketch.update(e,t)}filterByFootprints(e,t,i=!1){const a=[],r=[],s=[];return e.forEach(e=>{const{layer:{coveragePercent:o},attributes:n}=e;let l;const{polygon:c,frustum:h}=q(n);if(l=c.clone(),n.isInspection&&(l=$(n)),o&&(l=W(l,o)),i||!t||J(l,t)){s.push(e);const{geometry:t,objectId:i,cameraHeight:o,cameraHeading:l}=n,d=t.clone();d.z=o/K(t.spatialReference),d.imageID=i,this.pointSources.push(d),l!==Fe&&(a.push(c),h&&r.push(h))}}),{features:s,polygons:a,frustums:r}}async deleteDataCaptureFeatures(e){const{dataCaptureLayer:t}=this;if(!t)throw new n("orientedimageryviewer:missing-featurelayer","Data capture layer is not available");return t.queryFeatures({objectIds:e}).then(({features:e})=>t.applyEdits({deleteFeatures:e}))}handleSectorClick(e){if(isNaN(e))return;const t=this._sectorData?.[_e[e]],i=t?.at(0);i&&(this.triangularMeasurementActive&&this.currentBestFeature?this._updateImageMeasurementBestFeature(i):this._updateCurrentBestFeature(i))}handleFeatureClick(e){const{sector:t,featureIndexInSector:i}=e;if(isNaN(i))return;const a=this._sectorData?.[t],r=a?.at(i);r&&(this.triangularMeasurementActive&&this.currentBestFeature?this._updateImageMeasurementBestFeature(r):this._updateCurrentBestFeature(r))}load(e){return this.addResolvingPromise(this._loadViewAdapter(e).catch(e=>{if(!y(e))throw e})),this}async loadBestImage(e,t){return this.selectedPoint=Q(e),this.beforeLoad(),this._fetchFeaturesWithController(e,t)}async loadHeightMeasurementAdapter(e){if(!this.drawAdapter){const t=import("./adapters/draw/HeightMeasurementAdapter.js"),{default:i}=await t;if(v(e),this.drawAdapter=new i({viewModel:this,measurementService:this._measurementService}),!this.drawAdapter.viewModel.isResolved())return}return this.drawAdapter}loadImageError(e){d.getLogger(this).error("oriented-imagery-viewer:load-image",e),this.setMessage("imageLoadError","error",e.message)}async loadSketch(e){if(!this.sketch){const t=import("../Sketch/SketchViewModel.js"),{default:i}=await t;v(e),this.sketch=new i({layer:this._defaultGraphicsLayer,view:this.activeViewer?.imageRenderer,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{edgeOperation:"none",shapeOperation:"none",vertexOperation:void 0},enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"transform"}})}return this.sketch}async loadMeasurementAdapter(e){if(!this.sketchAdapter){const t=import("./adapters/sketch/MeasurementAdapter.js"),{default:i}=await t;if(v(e),this.sketchAdapter=new i({viewModel:this,measurementService:this._measurementService}),!this.sketchAdapter.viewModel.isResolved())return}return this.sketchAdapter}async processFeatureResponse(e,t,i){const{features:a}=e;if(this._clearFeatureGeometries(),!this._checkFeatures(a))return;const{features:r,polygons:s,frustums:o}=this.filterByFootprints(a,t,i?.skipFilter);if(!this._checkFeatures(r))return;this.coveragePolygons.addMany(s),this.coverageFrustums.addMany(o);const n=await this.processElevationSample(s,r,i);v(i),await this._updateElevationOfSelectedPointAndLocations(r,t,n),v(i),De(r,n);let l=r;if(this.layer?.verticalSearchRange&&this.layer.hasZ&&this.verticalFilterEnabled&&(l=ze(r,t,this.layer.verticalSearchRange),!l.length))return void this.setMessage("noImageAtElevation","info");const c=this._processSuitableFeatures(l,t);this.updateSuitabilities(c,i?.loadBestImage)}async processFeatureElevation(e,t,i){if(!t)return;const{features:a,polygons:r}=this.filterByFootprints(e,t,!0);if(!a?.length)return;const s=await this.processElevationSample(r,a,i);return v(i),s}async startMeasurement(e,t){this.sketch||await this.loadSketch(t),await this.loadMeasurementAdapter(t);const{sketch:i,sketchAdapter:a,activeViewer:r,mode:s}=this;if(!i||!a||!r||"none"===s)return;if(this.displayNewMeasurementButton=!1,"panoramic"===s&&(i.defaultCreateOptions.defaultZ=0),await i.create(e),"panoramic"===s){const{drawOperation:e}=i.view.activeTool;e.constraintsEnabled=!1,e._set("elevationDrawSurface",null)}const o=this.activeViewer?.imageRenderer.effectiveTheme.accentColor;o&&this.sketch&&(this.sketch.polygonSymbol=Se(o),this.sketch.polylineSymbol="panoramic"===s?Ae:Ce(o,2.5))}async startHeightMeasurement(){this.displayNewMeasurementButton=!1,this.draw??=new he({view:this.activeViewer?.imageRenderer}),this.polylineDrawAction=this.draw.create("polyline"),await this.loadHeightMeasurementAdapter()}initializeMeasurement(e){switch(this.clearMeasurementGraphics(),this.resetMeasurementData(),e){case"distance":this.startMeasurement("polyline");break;case"area":this.startMeasurement("polygon");break;case"height":this.startHeightMeasurement()}}async overlayCameraLocations(e){const{activeViewer:i,currentBestFeature:a,overlayedCameraLocations:r,layer:s,mode:o,state:n,layerFloorFilterClause:l,layerTimeExtent:c}=this,h=i?.imageSize;if(!h||!a||!s||"default"!==o&&"panoramic"!==o||n.includes("loading"))return;const{polygon:d}=q(a.attributes);if(i.removeManyGraphics(r.toArray()),r.removeAll(),e){const{features:e}=await s.queryFeatures({where:P(`${s.objectIdField} <> ${a.attributes.objectId}`,P(s.definitionExpression,l)),geometry:d,returnGeometry:!0,outFields:[s.objectIdField],timeExtent:c}),n=await Promise.all(e.map(async e=>{const{attributes:i,geometry:a}=e,r=await this._transformationService.pointToImageGeometry(a),s="panoramic"===o?ke():Te();return new t({attributes:i,symbol:s,geometry:r})}));r.addMany(n),i.addManyGraphics(r.toArray())}}overlayGraphicsOnImage(e,t){this.removeOverlayedGraphicsOnImage(e),this.overlayedMapFeatures.set(e,t),this.activeViewer?.addManyGraphics(t.toArray())}async overlayMapFeatures(e,i=!1){const{activeViewer:a,currentBestFeature:r,mode:o,state:n,layer:l}=this,c=a?.imageSize;if(!c||!r||"none"===o||"video"===o||"panoramic-video"===o||n.includes("loading")||!l)return;const{polygon:h}=q(r.attributes);try{const{imageGeometryField:t,oiObjectIdField:i}=st(e,l.imageGeometryField,l.imageReferenceField);this.imageGeometryField=t.name,this.oiObjectIdField=i.name}catch(m){d.getLogger(this).warn("oriented-imagery-viewer:overlay-map-features",m)}const{features:u}=await e.queryFeatures({geometry:h,returnGeometry:!0,outFields:["*"]}),p=new s(await Promise.all(u.map(async s=>{const n=s.symbol?.clone()??e.renderer?.getSymbol(s)?.clone(),{attributes:l,geometry:h}=s,{imageGeometryField:u,oiObjectIdField:p}=this;if(u&&p&&ht(e,u,p)&&`${l[p]}`==`${r.attributes.objectId}`)try{const t=Be(a?.media);return ot(l,u,e,i,c,o,n,t)}catch(m){d.getLogger(this).warn("oriented-imagery-viewer:overlay-map-features","couldn't create graphic from attributes, geometry will be used",{error:m,feature:s,layer:e,imageGeometryField:this.imageGeometryField,imageReferenceField:this.oiObjectIdField})}const g=await this._transformationService.geometryToImageGeometry(h);return new t({attributes:l,layer:e,symbol:n,geometry:g,visible:e.visible&&i})})));this.overlayGraphicsOnImage(`${e.id}`,p)}getDepthAt(e){const{activeViewer:t,currentBestFeature:i,mode:a,state:r,depthImage:s}=this,o=t?.imageSize;if(!o||!i||"none"===a||r.includes("loading"))return d.getLogger(this).warnOnce("oriented-imagery-viewer:get-depth-at","Load an image to use depth"),null;if(!s?.loaded)return d.getLogger(this).error("oriented-imagery-viewer:get-depth-at","Depth image is not loaded"),this.emit("depth-image-service:not-loaded"),null;const n=(Array.isArray(e)?e:[e]).map(e=>s.depthAt(e,{width:o[0],height:o[1]})??null);return Array.isArray(e)?n:n[0]}getActiveSectors(){return _e.filter(e=>this._sectorData?.[e]?.length)}async plotMapPoint(e){return this.plotReferencePoint(e),this.transformAndPlotReferencePointOnImage({feature:this.currentBestFeature,selectedLocation:e,options:{signal:this._transformController?.signal}})}plotReferencePointOnGround(e){this._referencePointOnGround&&(this._overlays?.remove(this._referencePointOnGround),this._referencePointOnGround.destroy()),null!=e&&(this._referencePointOnGround=new t({geometry:new j({...e.toJSON()}),symbol:Le}),this.view?this._overlays?.add(this._referencePointOnGround):this.emit("plot-ground-point",{data:{point:this._referencePointOnGround?.geometry}}))}plotReferencePointOnImage(e){const{state:i,mode:a,activeViewer:r}=this;if("image-loaded"!==i||!r?.imageSize||"default"!==a&&"panoramic"!==a)return;this.clearReferencePointOnImage();const s=Be(r.media),o=nt(e,a,r.imageSize,s);this._referencePointOnImage=new t({geometry:o,symbol:"panoramic"===a?je.clone():Le.clone()}),r.addGraphic(this._referencePointOnImage,0)}removeAllOverlayMapFeatures(){this.overlayedMapFeatures.forEach(e=>{this._imageViewer.removeManyGraphics(e.toArray())}),this.overlayedMapFeatures.clear()}removeOverlayedGraphicsOnImage(e){const t=this.overlayedMapFeatures.get(e);t?.length&&(this.activeViewer?.removeManyGraphics(t.toArray()),this.overlayedMapFeatures.delete(e))}reset(){const{mode:e}=this;"default"===e||"panoramic"===e?this.resetImage():"video"===e?this.resetVideo():"panoramic-video"===e&&this.resetVideoPanoramic(),this.beforeLoad(!1)}resetImage(){switch(this.setMessage("onLoadMessage","info"),this.mode){case"default":this._imageViewer.clearImage(),this._imageViewer.clearGraphics();break;case"panoramic":this._panoramicViewer.clearGraphics()}this._clickTask=m(this._clickTask)}resetVideo(){this.setMessage("onLoadMessage","info"),this.videoViewModel?.resetVideoHandler(),this._overlays?.removeAll(),this.videoViewModel=null,this.featureCache=[],this.currentBestFeature=null}resetVideoPanoramic(){this.setMessage("onLoadMessage","info"),this._overlays?.removeAll(),this.currentBestFeature=null}resetMeasurementData(){this.areaMeasurementResult=0,this.areaMeasurementAccuracy=0,this.distanceMeasurementResult=0,this.distanceAccuracyArray=[],this.heightMeasurementResult=0,this.heightMeasurementAccuracy=0,this.heightGraphic=null,this.triangulatedDistanceMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaMeasurement=null,this.triangulatedMeasurementGraphic=null,this.updatingTriangularMeasurementState=!1,this.triangulatedAreaAccuracy=0,this._measurementService?.resetMeasurementVectors()}async saveDrawing(){const{dataCaptureLayer:e,sketchAdapter:t}=this;if(!e||"data-capture"!==t?.type)return;const{pendingGraphics:i,savedGraphics:a}=t,r=i.get(e.id),s=r?.toArray();if(!r||!s?.length)return;const{addFeatureResults:o}=await this.saveDataCaptureFeatures(s),n=o.reduce((t,{objectId:i,globalId:a,error:r},o)=>{const n=s[o],{attributes:l}=n;return r?t.error.push(n):(i&&(l[e.objectIdField]=i),a&&e.globalIdField&&(l[e.globalIdField]=a),t.success.push(n)),t},{success:[],error:[]});a.addMany(n.success),r.removeAll(),r.addMany(n.error)}async saveDataCaptureFeatures(e,t){const{activeViewer:i,currentBestFeature:r,dataCaptureLayer:s,mode:o}=this,l=i?.imageSize;if(!l||!r||"none"===o||"video"===o||"panoramic-video"===o)throw new n("orientedimageryviewer:missing-input","Image size, current best feature and mode are required to save data capture features");if(!s)throw new n("orientedimageryviewer:missing-featurelayer","Data capture layer is not available");const c=await Promise.all(e.map(async e=>{const i=e.clone(),{geometry:a}=i;if(!a)return;const r=a.type,o=s.hasZ,n=s.geometryType,l=r!==n,c=l?await import("./transformers.js"):null,h=c?.default[n],d=l?h?.(a):a;return d&&(i.geometry=await this._transformationService.imageGeometryToMapGeometry(d,t),i.geometry)?(o||lt(i.geometry),i):void 0})),h=c.filter(a);return s.applyEdits({addFeatures:h}).then(e=>{const{addFeatureResults:t}=e;let i=0;const a=c.map(e=>{const a=t[i++];return e?a:{error:new n("orientedimageryviewer:save-unsucccessful","Error in saving data capture features"),objectId:null,globalId:null}});return{...e,addFeatureResults:a}})}async searchBestImage(e,t){try{const i=await z(e,t);i&&await this.processFeatureResponse(i,e.point,t)}catch(i){y(i)||(this.setMessage("imageLoadError","error",i.message),d.getLogger(this).error("error occurred while finding best image",i))}}selectTriangularMeasurementFeature(e){this.currentBestFeatureMeasurementImage=this.features?.find(({attributes:t})=>t.objectId===Number(e))}setAdditionalCameraLocationsVisibility(e){this.additionalCameraLocations.forEach(t=>{t.visible=e})}setAdditionalCoverageVisibility(e){this.additionalFootprints.forEach(t=>{t.visible=e})}setCurrentCoverageVisibility(e){this.bestFeatureCurrentFootprint&&(this.bestFeatureCurrentFootprint.visible=e),this.currentBestFeatureLocation&&(this.currentBestFeatureLocation.visible=e)}setMapImageConversionToolState(e){this.mapImageConversionToolState=e}setCurrentPanoramaView(e,t){this._panoramicViewer?.set({yaw:e,pitch:t})}async startDataCapture(e,t){const i=this.activeViewer?.imageRenderer,{oiObjectIdField:a,currentBestFeature:r}=this;if(!i||!r||!a)return;const{attributes:{objectId:o}}=r,n=this.overlayedMapFeatures.get(e.id)?.toArray()??[],l=[],c=[];for(const s of n)`${s.getAttribute(a)}`==`${o}`?l.push(s):c.push(s);this.overlayGraphicsOnImage(e.id,new s(c)),this.collectionId=e.id;const h=await this.loadSketch(t),d=await this.loadDataCaptureAdapter(t);v(t),h.addGraphics(l),d.savedGraphics.addMany(l);i.ui.find("zoom").visible=!1,i.map.layers.add(this.sketchGraphicsLayer)}async stopDataCapture(e=!1){this.sketch?.cancel(),this.sketchGraphicsLayer?.removeAll(),this.sketchAdapter=p(this.sketchAdapter),this.sketch=p(this.sketch),this.collectionId=null;const{dataCaptureLayer:t}=this,i=this.activeViewer?.imageRenderer;if(!i||i.destroyed)return;i.map.layers.remove(this.sketchGraphicsLayer),e&&t&&await this.overlayMapFeatures(t,!0);const a=i.ui.find("zoom");a&&(a.visible=!0)}stopMeasurement(){this.draw?.reset(),this.sketch?.cancel()}async toggleAllOverlayMapFeatures(e){!e&&this.dataCaptureLayer&&(await this.stopDataCapture(!0),this.dataCaptureLayer=null),this.overlayedMapFeatures.forEach(t=>{this._toggleVisiblity(t,e)})}toggleOverlayMapFeatures(e,t,i){const a=this.overlayedMapFeatures.get(e);a&&i&&this._toggleVisiblity(a,t)}toggleSelection(e){const{sketch:t}=this;t&&(t.updateOnGraphicClick=e,t.cancel())}async transformAndPlotReferencePointOnImage(e){const{selectedLocation:t,options:i}=e;let a=!1,r=!1;const s=this.bestFeatureFootprint?.geometry;switch(s?.type){case"polygon":{const e=t.spatialReference.equals(s.spatialReference)?t:await G(t,s.spatialReference);a=s.contains(e);break}case"mesh":{const e=t.spatialReference.equals(s.spatialReference)?t:await G(t,s.spatialReference);r=s.extent.contains(e);break}}if(!a&&!r)return void this.clearReferencePointOnImage();const o=await this._transformationService.pointToPixel(t,i);if(o)return v(i),this.plotReferencePointOnImage(o),{x:o.x,y:o.y};this.clearReferencePointOnImage()}async updateFeatureCache(e,t){const i=await N(e,t);i.features?.length&&(this.featureCache=i.features)}async _fetchFeatures(e,t){const{layer:i,layerFloorFilterClause:a,layerTimeExtent:r,view:s}=this;if(!s||!i)return;e.x=B(e.x,e.spatialReference);const o=i.spatialReference.equals(e.spatialReference)?e:await G(e,i.spatialReference),n=o.spatialReference.isGeographic?R(o):o,l=P("1=1",P(i.definitionExpression,a)),c=n.spatialReference.isGeographic?1:S(n.spatialReference),h={layerInstanceOrURL:i,point:n,queryParams:{where:l,maximumDistance:i.maximumDistance?i.maximumDistance/c:void 0,timeExtent:r}};return await this.searchBestImage(h,t)}async _fetchFeaturesWithController(e,t){try{await this._fetchFeatures(e,t)}catch(i){if(y(i))return;this.setMessage("imageLoadError","error"),d.getLogger(this).error("error occurred while fetching features",i)}}_groupFeaturesBySectors(){const{_suitabilities:e,additionalFeatures:t,features:i,invalidCameraHeading:a}=this,r=i.at(0);if(!e||!t||!r||!i||a)return void(this._sectorData=null);this._sectorData={};const o={};this._featureToSector=o;for(const h of _e)this._sectorData[h]=new s;const n=e.map((e,t)=>({...e,featureIndex:t}));n.sort((e,t)=>e.trueSuitability-t.trueSuitability);const l=n.map(({distance:e})=>e),c=Math.max(...l);n.forEach(e=>{const{distance:t,angle:a,featureIndex:s}=e,n=t/c*Me[2],l=We(t,c),h=Je(a);if(!this._sectorData)return;const d=Me[3]+n*Math.sin(a*Math.PI/180),u=Me[3]+n*Math.cos(a*Math.PI/180);let p;const m=i.at(s),g=m===r,{cameraPitch:y}=m.attributes,v=y<5;if(g&&v)p=-90;else{const e=d-Me[3],t=u-Me[3],i=t/Math.sqrt(e**2+t**2);let a=180*Math.acos(i)/Math.PI;(e<0&&t<0||e<0&&t>0)&&(a*=-1),p=a}const f=""===l?h:`${l}_${h}`;g&&(p===this.bestFeatureAngle?this.previousFeatureAngle=p:this.bestFeatureAngle=p,this.navigatorCurrentBestFeature=v?null:{x:d,y:u,direction:h}),o[`${m.attributes.objectId}`]=f;const w=this._sectorData[f];w.add({angle:a,featureIndex:s,x:d,y:u,objectID:m.attributes.objectId,sector:f,featureIndexInSector:w.length})})}async _initializeLocationViewModel(e){if(!this._locationViewModel){const t=import("./components/ImageLocationViewModel.js"),{default:i}=await t;v(e),this._locationViewModel=new i({oiViewModel:this,referenceTransformationService:this._referenceTransformationService})}}_initializeMeasurementService(){this._measurementService||(this._measurementService=new at({transformationService:this._transformationService,referenceTransformationService:this._referenceTransformationService}))}_initializeVideo(){if(this.videoElement||!this.currentBestFeature)return;this.removeHandles(Ee.videoPlayerHandles),this.videoElement=new le({video:this.currentBestFeature.attributes.imagePath,georeference:new oe({extent:new L(fe)}),autoplay:!1}),this.videoElement.content?.loop&&(this.videoElement.content.loop=!1);const e=new D({source:this.videoElement,title:this.layer?.title,copyright:this.layer?.copyright});this.videoLayer=e,e&&this.videoMapView.map.layers.add(e),this.videoViewModel=new et({oiViewModel:this})}async getMapPoint(e,t){const i=await this._transformationService.pixelToMapPoint(Array.isArray(e)?e:[e],t);return Array.isArray(e)?i:i[0]}async getMapPointForFeature(e,t,i){const a=await this._transformationService.pixelToMapPointForFeature(Array.isArray(e)?e:[e],t,i);return Array.isArray(e)?a:a[0]}async loadPanoramicMediaSource(e,t){const{lookAt:i,...a}=e,r=Ne(a);try{await r.load(t)}catch(o){if(y(o))return;if("unsupported-format"===o.name)return void this.setMessage("unsupportedPanoramicImageryError","error",void 0,{datasetFormat:r?.extension??"UNKNOWN FORMAT"})}const s=this.triangularMeasurementActive?this._panoramicMeasurementViewer:this._panoramicViewer;await s.loadMedia(r,t),i&&s.set(i)}async loadMediaSource(e,t){const i=Ue(e);await this._setImageSource(this.triangularMeasurementActive?this.imageMeasurementViewer:this._imageViewer,i,t)}_clearFeatureGeometries(){this.coveragePolygons.removeAll(),this.coverageFrustums.removeAll(),this.pointSources.removeAll()}_checkFeatures(e){return!!e?.length||(this.setMessage("noImageError","error"),this.videoElement?.content?.pause(),this.currentBestFeature=null,!1)}async _getElevationSampleFromGround(e,t,i){if(!e[0])return;const a=(await import("../../geometry/operators/unionOperator.js")).executeMany(e);if(this._updateFootprintWithFeatures(t,a),"3d"===this.view?.type)try{return await this.view.map.ground.createElevationSampler(this.footprintExtent,i)}catch(r){y(r)||d.getLogger(this).error(r)}}async processElevationSample(e,t,i){const{elevationSource:a}=t[0].attributes,r=await this._getElevationSampleFromGround(e,t,i);return r||(a&&this.footprintExtent&&Z(a)?await Y({extent:this.footprintExtent,lod:a.lod,url:a.url,rasterFunction:a.rasterFunction}):void 0)}_processSuitableFeatures(e,t){return U({features:e,selectedPoint:t,camera:qe(this.view)?this.view.camera:null,currentImage:this.currentBestFeature})}async _processHitTestResults(e,t,i){const{results:[a]}=t;if("graphic"!==a?.type)return void this.setMessage("noImageError","error");const r=a.graphic.getAttribute(e.objectIdField);return await this.showImageByObjectId(r,i)}async _queryAndLoadByObjectId(e,t,i,a,r){this.displayMessage=null;const{response:s}=await it(e,t,i,a,r);if(v(r),!s?.features?.length)throw new tt(t);const o=q(s.features[0].attributes).polygon,n=j.fromJSON(E(o)),l=Q(n),c=S(l.spatialReference);this.selectedPoint=l;const h={layerInstanceOrURL:e,point:l,queryParams:{where:P(P("1=1",P(e.definitionExpression,i)),`${e.objectIdField} <> ${t}`),maximumDistance:e.maximumDistance?e.maximumDistance/c:void 0,timeExtent:a}},d=await z(h,r);v(r);const{features:u}=d;return u.push(s.features[0]),await this.processFeatureResponse(d,l,{...r,loadBestImage:!1})}_reorderTriangularSketchLayer(){const e=this.imageMeasurementViewer.imageRenderer.map.layers?.length;this.sketchTriangularGraphicsLayer&&e&&this.imageMeasurementViewer.imageRenderer.map.layers.reorder(this.sketchTriangularGraphicsLayer,e-1)}async _setImageSource(e,t,i){e.media=t,await e.loadMedia(t,i)}_toggleVisiblity(e,t){e.forEach(e=>{e.visible=t})}async _updateElevationOfSelectedPointAndLocations(e,t,i,a){const{location:r,cameraHeight:s}=e[0].attributes,o=await ae(r.spatialReference,r.z,s,{elevationSample:i,elevationSource:i?void 0:e[0].attributes.elevationSource,extent:this.footprintExtent},a);v(a);const[n,...l]=await X([t,...e.map(e=>e.attributes.geometry.clone())],o);v(a),t.elevation=n.z,e.forEach((e,t)=>{e.attributes.elevation=l[t].z})}_updateFeatures(e,t=!0){if(!e.length)return this.currentBestFeature=null,void this.additionalFeatures.removeAll();this.features.removeAll(),this.features.addMany(e),this.navigationNodes.removeAll(),this.navigationNodes.addMany(e.map(e=>{const{geometry:t,attributes:i}=e,{isSpherical:a,cameraHeading:r,cameraPitch:s}=i;return new Ye({geometry:t,attributes:i,currentHeading:a?0:r,currentPitch:a?0:s})})),e.length>1?this.additionalFeatures.addMany(e.slice(1)):this.additionalFeatures.removeAll(),this._updateGroundElevation=!0,t&&(this.currentBestFeature=e[0]),"video"===this.mode&&(this._initializeVideo(),this.videoElement?.loaded&&this.videoViewModel?.playVideoFromSelectedLocation(e[0])),"panoramic-video"===this.mode&&this._loadVideo()}_updateFootprintWithFeatures(e,t){const i=[];for(const{attributes:{geometry:a}}of e)t.contains(a)||i.push([a.x,a.y]);i.sort((e,t)=>+x([e,t])),t.addRing(i),this.footprintExtent=de(t.extent,2,2)}async _updatePointsAndPolygons(e){const{pointSources:i,currentBestFeature:a,currentCoverageVisible:r,isAdditionalPointSourcesVisible:s,mode:o,layer:n}=this;if(a&&(this.additionalFootprints.removeAll(),this.additionalCameraLocations.removeAll(),this.bestFeatureCurrentFootprint&&(this.bestFeatureCurrentFootprint.destroy(),this.bestFeatureCurrentFootprint=null,this.bestFeatureFootprint=null),!this.invalidCameraHeading)){await(this._adapter?.createFootprints(e)),v(e);for(const o of i){const i=this.view&&!this.view.spatialReference?.equals(o.spatialReference)?await G(o.clone(),this.view?.spatialReference,e):o.clone();o.imageID===a.attributes.objectId?this.currentBestFeatureLocation=new t({attributes:{imageID:o.imageID},geometry:i,symbol:Ge,visible:r}):this.additionalCameraLocations.push(new t({attributes:{imageID:o.imageID},geometry:i,symbol:Oe,visible:s}))}"video"!==o&&"panoramic-video"!==o||(await this.initializeTransformationService(e),n&&!this.featureCache.length&&await this.updateFeatureCache(n,a.geometry.spatialReference))}}_updateCurrentBestFeature(e){if(!e)return;if(this.currentBestFeature=this.features?.at(e.featureIndex),"video"===this.mode)return void(this.currentBestFeature&&this.videoViewModel?.playVideoFromSelectedLocation(this.currentBestFeature));if("panoramic-video"===this.mode)return void(this.currentBestFeature&&this._panoramicVideoViewer.viewModel.playPanoramicVideoFromSelectedLocation(this.currentBestFeature));const t=this.currentBestFeature?.attributes.cameraPitch&&this.currentBestFeature?.attributes.cameraPitch<5;let i;if(t)i=-90;else{const t=e.x-Me[3],a=e.y-Me[3],r=a/Math.sqrt(t**2+a**2);let s=180*Math.acos(r)/Math.PI;(t<0&&a<0||t<0&&a>0)&&(s*=-1),i=s}i===this.bestFeatureAngle?this.previousFeatureAngle=i:this.bestFeatureAngle=i,this.navigatorCurrentBestFeature=t?null:{x:e.x,y:e.y,direction:e.sector.includes("_")?e.sector.split("_")[1]:e.sector}}_updateImageMeasurementBestFeature(e){e&&(this.currentBestFeatureMeasurementImage=this.features?.at(e.featureIndex))}clearGraphics(){this._imageViewer.clearGraphics(),this._panoramicViewer.clearGraphics(),this.imageMeasurementViewer.clearGraphics(),this._panoramicMeasurementViewer.clearGraphics()}clearReferencePointOnImage(){this._referencePointOnImage&&(this._imageViewer.removeGraphic(this._referencePointOnImage),this._panoramicViewer.removeGraphic(this._referencePointOnImage),this._referencePointOnImage=p(this._referencePointOnImage))}async initializeReferenceTransformationService(e){const{currentBestFeatureMeasurementImage:t,activeTriangulatedViewer:i,mode:a}=this;if(!t||!i||!i.imageSize||"panoramic"!==a&&"default"!==a)return;const{imageSize:r}=i,{attributes:s,elevationSample:o}=t,{location:{spatialReference:n,z:l},cameraHeight:c,elevationSource:h}=s;let d=s.location;d.spatialReference.isGeographic&&(d=Q(d));const u="default"===a?re(s,r[0],r[1]):se(s,r[0],r[1]),p=await ae(n,l??0,c,{elevationSample:o,elevationSource:h,extent:this.footprintExtent},e),m=(await import("./services/TransformationService.js")).default,g={imageToWorldProperties:u,updateElevationProps:p,mode:a,imageSize:r,depthImageService:this.depthImage};this._referenceTransformationService=new m(g),this._locationViewModel&&(this._locationViewModel.referenceTransformationService=this._referenceTransformationService),this._measurementService&&(this._measurementService.referenceTransformationService=this._referenceTransformationService)}async initializeTransformationService(e){const{currentBestFeature:t,activeViewer:i,mode:a}=this,r="video"===a||"panoramic-video"===a?be:i?.imageSize;if(!t||!r||"none"===a)return;const{attributes:s,elevationSample:o}=t,{location:{spatialReference:n,z:l},cameraHeight:c,elevationSource:h}=s;let d=s.location;d.spatialReference.isGeographic&&(d=Q(d));const u="default"===a||"video"===a?"default":"panoramic",p={..."default"===u?re(s,r[0],r[1]):se(s,r[0],r[1]),cameraLocation:d},m=await ae(n,l??0,c,{elevationSample:o,elevationSource:h,extent:this.footprintExtent},e),g=(await import("./services/TransformationService.js")).default,y={imageToWorldProperties:p,updateElevationProps:m,mode:u,imageSize:r,depthImageService:this.depthImage};this._transformationService=new g(y),this._measurementService&&(this._measurementService.transformationService=this._transformationService)}plotReferencePoint(e){"mapPoint"in e?this.plotReferencePointOnGround(e.mapPoint):this.plotReferencePointOnGround(e)}setMessage(e,t,i,a){this.displayMessage={key:e,type:t,data:i,map:a}}async transformAndPlotSelectedLocation(e){const{currentBestFeature:t,invalidCameraHeading:i,selectedPoint:a,activeViewer:r}=this;if(this._crossSymbol&&(this._panoramicViewer.removeGraphic(this._crossSymbol),this._imageViewer.removeGraphic(this._crossSymbol),this._crossSymbol=p(this._crossSymbol)),!a||!t||"image-loaded"!==r?.state||i)return;let s;try{s=await this._transformationService.pointToPixel(a,{signal:e?.signal}),v(e),await this.plotSelectedPointOnImage(s,e)}catch(o){y(o)||d.getLogger(this).error("failed to transform map point to pixel, cross symbol will not be plotted on image",{error:o,selectedPoint:a,feature:t})}}updateCurrentCoveragePolygon(e){const{additionalFootprints:i,additionalCameraLocations:a,currentBestFeature:r,currentBestFeatureLocation:s,currentCoverageVisible:o,selectedPoint:n,view:l,_adapter:c,mode:h}=this;if(!r)return;const{attributes:{objectId:d},elevationSample:u}=r;if(this._initialCurrentCoverageUpdate){if(this._overlays?.removeAll(),this._initialCurrentCoverageUpdate=!1,this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint),e&&!this.invalidCameraHeading&&(e.visible=o,this.bestFeatureCurrentFootprint=e),l){const e=[...i,...a,s].filter($e);"3d"===l?.type&&u&&c?.updateGroundElevation&&(this._updateGroundElevation&&c.updateGroundElevation(e),"panoramic"===h&&c.updateGroundElevation([this.bestFeatureCurrentFootprint])),this._updateGroundElevation=!1,n&&(e.splice(-2,0,this.bestFeatureCurrentFootprint),e.push(new t({geometry:n.clone(),symbol:Ve.clone(),attributes:{imageID:d}}))),this._overlays.graphics.addMany(e)}}else if(l){if(this.invalidCameraHeading)return;this.bestFeatureCurrentFootprint&&(this._overlays?.remove(this.bestFeatureCurrentFootprint),this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint));const t=this.bestFeatureCurrentFootprint&&this._overlays?this._overlays.graphics.indexOf(this.bestFeatureCurrentFootprint):-1;e&&(this.bestFeatureCurrentFootprint=e,"3d"===l?.type&&u&&c?.updateGroundElevation&&"panoramic"===h&&c.updateGroundElevation([e]),e.visible=this.currentCoverageVisible,this._overlays?.graphics.add(this.bestFeatureCurrentFootprint,t>=0?t:this._overlays.graphics.length-1))}}};e([A()],ut.prototype,"activeLayer",null),e([A({readOnly:!0})],ut.prototype,"activeViewer",null),e([A()],ut.prototype,"activeTriangulatedViewer",null),e([A()],ut.prototype,"accuracyParametersMissing",null),e([A()],ut.prototype,"additionalFeatures",void 0),e([A({type:s.ofType(t)})],ut.prototype,"additionalCameraLocations",void 0),e([A({type:s.ofType(t)})],ut.prototype,"additionalFootprints",void 0),e([A()],ut.prototype,"areaMeasurementResult",void 0),e([A()],ut.prototype,"areaMeasurementAccuracy",void 0),e([A()],ut.prototype,"bestFeatureAngle",void 0),e([A()],ut.prototype,"bestFeatureCurrentFootprint",void 0),e([A({type:t})],ut.prototype,"bestFeatureFootprint",void 0),e([A({type:Number})],ut.prototype,"brightness",null),e([A()],ut.prototype,"cameraHeadingThreshold",void 0),e([A()],ut.prototype,"cameraPitchThreshold",void 0),e([A()],ut.prototype,"clickAction",void 0),e([A()],ut.prototype,"correctedLocationPointOnImage",void 0),e([A()],ut.prototype,"videoViewModel",void 0),e([A()],ut.prototype,"collectionId",void 0),e([A({type:Number})],ut.prototype,"contrast",null),e([A()],ut.prototype,"coverageFrustums",void 0),e([A()],ut.prototype,"coveragePolygons",void 0),e([A()],ut.prototype,"currentBestFeature",void 0),e([A()],ut.prototype,"currentBestFeatureMeasurementImage",void 0),e([A()],ut.prototype,"currentBestFeatureLocation",void 0),e([A()],ut.prototype,"currentCoverageVisible",void 0),e([A()],ut.prototype,"currentNode",null),e([A()],ut.prototype,"depthImage",void 0),e([A()],ut.prototype,"depthImageNotSupported",null),e([A()],ut.prototype,"featureCache",void 0),e([A()],ut.prototype,"navigationNodes",void 0),e([A({json:{write:!1}})],ut.prototype,"determineWorkflowForFeature",void 0),e([A({json:{write:!1}})],ut.prototype,"determineWorkflowForTriangularMeasurement",void 0),e([A()],ut.prototype,"disabled",void 0),e([A()],ut.prototype,"displayMessage",void 0),e([A()],ut.prototype,"displayNewMeasurementButton",void 0),e([A()],ut.prototype,"distanceMeasurementResult",void 0),e([A()],ut.prototype,"distanceAccuracyArray",void 0),e([A()],ut.prototype,"dataCaptureLayer",void 0),e([A({readOnly:!0})],ut.prototype,"featureCount",null),e([A()],ut.prototype,"features",void 0),e([A()],ut.prototype,"groundCoordinates",void 0),e([A()],ut.prototype,"groundCoordinatesAccuracy",void 0),e([A()],ut.prototype,"heightGraphic",void 0),e([A()],ut.prototype,"heightMeasurementResult",void 0),e([A()],ut.prototype,"heightMeasurementAccuracy",void 0),e([A({readOnly:!0})],ut.prototype,"imageGalleryEnabled",null),e([A()],ut.prototype,"imageGeometryField",void 0),e([A({readOnly:!0})],ut.prototype,"imageLoaded",null),e([A()],ut.prototype,"imageLocationToolState",void 0),e([A()],ut.prototype,"initialVideoMapViewExtent",void 0),e([A({readOnly:!0})],ut.prototype,"invalidCameraHeading",null),e([A()],ut.prototype,"imagePointsInView",null),e([A()],ut.prototype,"imageMeasurementViewer",void 0),e([A()],ut.prototype,"isAdditionalCoverageVisible",void 0),e([A()],ut.prototype,"isAdditionalPointSourcesVisible",void 0),e([A()],ut.prototype,"layer",void 0),e([A()],ut.prototype,"layerView",null),e([A({readOnly:!0})],ut.prototype,"layerFloorFilterClause",null),e([A({readOnly:!0})],ut.prototype,"layerTimeExtent",null),e([A({type:Number})],ut.prototype,"localPort",void 0),e([A()],ut.prototype,"locationPointOnImage",void 0),e([A()],ut.prototype,"mapImageConversionToolState",void 0),e([A()],ut.prototype,"measureType",void 0),e([A()],ut.prototype,"measurementGraphic",void 0),e([A({readOnly:!0,value:"none"})],ut.prototype,"mode",null),e([A()],ut.prototype,"navigationMode",void 0),e([A()],ut.prototype,"navigatorCurrentBestFeature",void 0),e([A()],ut.prototype,"oiObjectIdField",void 0),e([A({type:s.ofType(t)})],ut.prototype,"overlayedCameraLocations",void 0),e([A()],ut.prototype,"overlayedMapFeatures",void 0),e([A()],ut.prototype,"panoramicVideoLoaded",null),e([A()],ut.prototype,"pixelCoordinates",void 0),e([A()],ut.prototype,"preserveAngle",void 0),e([A()],ut.prototype,"pointSources",void 0),e([A({readOnly:!0})],ut.prototype,"popupEnabled",null),e([A()],ut.prototype,"preloadMedia",void 0),e([A()],ut.prototype,"preloadMediaSize",void 0),e([A()],ut.prototype,"previousFeatureAngle",void 0),e([A()],ut.prototype,"referencePoint",null),e([A({readOnly:!0})],ut.prototype,"sectorData",null),e([A()],ut.prototype,"selectedPoint",void 0),e([A({type:Number})],ut.prototype,"sharpness",null),e([A()],ut.prototype,"shouldShowSelectedImage",void 0),e([A()],ut.prototype,"sketch",void 0),e([A()],ut.prototype,"sketchTriangular",void 0),e([A()],ut.prototype,"sketchTriangularGraphicsLayer",void 0),e([A()],ut.prototype,"draw",void 0),e([A()],ut.prototype,"drawAdapter",void 0),e([A()],ut.prototype,"polylineDrawAction",void 0),e([A()],ut.prototype,"scheduledFrameId",void 0),e([A()],ut.prototype,"sketchAdapter",void 0),e([A({readOnly:!0})],ut.prototype,"sketchGraphicsLayer",null),e([A({readOnly:!0})],ut.prototype,"state",null),e([A({readOnly:!0})],ut.prototype,"thumbnails",null),e([A()],ut.prototype,"videoExtentPoints",null),e([A()],ut.prototype,"triangularMeasurementActive",void 0),e([A()],ut.prototype,"triangulatedDistanceMeasurement",void 0),e([A()],ut.prototype,"triangulatedDistanceAccuracy",void 0),e([A()],ut.prototype,"triangulatedAreaMeasurement",void 0),e([A()],ut.prototype,"triangulatedAreaAccuracy",void 0),e([A()],ut.prototype,"triangulatedMeasurementGraphic",void 0),e([A()],ut.prototype,"triangulatedPoint",void 0),e([A()],ut.prototype,"triangulatedMeasurementAdapter",void 0),e([A()],ut.prototype,"updateFootprint",void 0),e([A()],ut.prototype,"updateVideoFootprint",void 0),e([A()],ut.prototype,"updateFootprintPanorama",void 0),e([A()],ut.prototype,"updatingTriangularMeasurementState",void 0),e([A({value:null})],ut.prototype,"view",null),e([A()],ut.prototype,"videoElement",void 0),e([A()],ut.prototype,"videoLayer",void 0),e([A()],ut.prototype,"videoMapView",void 0),e([A()],ut.prototype,"verticalFilterEnabled",void 0),e([A()],ut.prototype,"_adapter",void 0),e([A()],ut.prototype,"_defaultGraphicsLayer",null),e([A()],ut.prototype,"_highlightedFeatureHandle",void 0),e([A()],ut.prototype,"_imageViewer",void 0),e([A()],ut.prototype,"_initialCurrentCoverageUpdate",void 0),e([A()],ut.prototype,"_locationViewModel",void 0),e([A()],ut.prototype,"_measurementService",void 0),e([A()],ut.prototype,"_mediaPrefetcher",void 0),e([A()],ut.prototype,"_navigationManager",void 0),e([A()],ut.prototype,"_overlays",void 0),e([A({readOnly:!0})],ut.prototype,"_overlaysView",null),e([A()],ut.prototype,"_panoramicVideoViewer",void 0),e([A()],ut.prototype,"_panoramicViewer",void 0),e([A()],ut.prototype,"_panoramicMeasurementViewer",void 0),e([A()],ut.prototype,"_referencePointOnGround",void 0),e([A()],ut.prototype,"_referencePointOnImage",void 0),e([A()],ut.prototype,"_referenceTransformationService",void 0),e([A()],ut.prototype,"_sectorData",void 0),e([A()],ut.prototype,"_transformationService",void 0),e([A()],ut.prototype,"_featureToSector",void 0),e([A({readOnly:!0})],ut.prototype,"_updatingHandles",void 0),e([A()],ut.prototype,"footprintExtent",void 0),e([A()],ut.prototype,"_featureChangedTask",void 0),ut=e([C("esri.widgets.OrientedImageryViewer.OrientedImageryViewerViewModel")],ut);const pt=ut;export{pt as default};
2
+ import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{equals as i,isSome as a}from"../../core/arrayUtils.js";import{createTask as r}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import n from"../../core/Error.js";import{EventedMixin as l}from"../../core/Evented.js";import{makeHandle as c}from"../../core/handleUtils.js";import{equalsShallow as h}from"../../core/lang.js";import d from"../../core/Logger.js";import{clamp as u}from"../../core/mathUtils.js";import{destroyMaybe as p,abortMaybe as m}from"../../core/maybe.js";import{EsriPromise as g}from"../../core/Promise.js";import{isAbortError as y,throwIfAborted as v,waitTick as f}from"../../core/promiseUtils.js";import w from"../../core/ReactiveMap.js";import{whenOnce as F,on as _,watch as M,syncAndInitial as b,initial as I,when as V}from"../../core/reactiveUtils.js";import{sqlAnd as P}from"../../core/sql.js";import{getMetersPerUnitForSR as S}from"../../core/units.js";import{property as A,subclass as C}from"../../core/accessorSupport/decorators.js";import{isSerializable as k}from"../../core/support/jsonUtils.js";import{UpdatingHandles as T}from"../../core/support/UpdatingHandles.js";import L from"../../geometry/Extent.js";import j from"../../geometry/Point.js";import{projectAsync as G}from"../../geometry/projectionUtils.js";import O from"../../geometry/SpatialReference.js";import{polygonCentroidPoint as E}from"../../geometry/support/centroid.js";import{isClockwise as x}from"../../geometry/support/coordsUtils.js";import{normalizeMapX as B}from"../../geometry/support/normalizeUtils.js";import{geographicToWebMercator as R}from"../../geometry/support/webMercatorUtils.js";import H from"../../layers/GraphicsLayer.js";import D from"../../layers/MediaLayer.js";import{searchImages as z,getSortedLayerFeatures as N}from"../../layers/orientedImagery/queries.js";import{calculateSuitabilities as U}from"../../layers/orientedImagery/core/bestImageUtils.js";import{createCoveragePolygon as q,computePolygonForInspection as $,resizePolygon as W,checkIfPolygonContainsSelectedPoint as J}from"../../layers/orientedImagery/core/coverageUtils.js";import{isElevationSource as Z}from"../../layers/orientedImagery/core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as K,convertGeographicToWebMercator as Q}from"../../layers/orientedImagery/core/utils.js";import X from"../../layers/orientedImagery/transformations/updateElevation.js";import{getElevationSampler as Y}from"../../layers/orientedImagery/transformations/updateElevationUtils.js";import{or as ee,getInitialAngle as te,convertPixelLocationToSphereVertex as ie,getUpdateElevationProps as ae,getImageToWorldProperties as re,getImageToWorldPanoramicProperties as se}from"../../layers/orientedImagery/transformations/utils.js";import oe from"../../layers/support/ExtentAndRotationGeoreference.js";import{getFloorFilterClause as ne}from"../../layers/support/floorFilterUtils.js";import le from"../../layers/support/VideoElement.js";import ce from"../../views/MapView.js";import he from"../../views/draw/Draw.js";import{scale as de}from"../../views/draw/support/drawUtils.js";import{ViewEventPriorities as ue}from"../../views/input/InputManager.js";import pe from"../PanoramicVideoViewer.js";import me from"../PanoramicViewer.js";import{defaultAngleThresholdInDegrees as ge,videoMapViewConstraint as ye,clockwiseDirections as ve,sampleExtent as fe,videoExtent as we,invalidCameraHeading as Fe,sectorsInOrder as _e,sectorsRadii as Me,fixedImageSize as be}from"./constants.js";import{isFeatureAttachment as Ie}from"./galleryUtils.js";import{crossSymbol as Ve,crossSymbol3D as Pe,measurementPolygonSymbol as Se,polylineSymbolPanoramic as Ae,measurementPolylineSymbol as Ce,cameraOverlaySymbol3D as ke,cameraOverlaySymbol as Te,diamondSymbol as Le,diamondSymbol3D as je,activeSourcePointSymbol as Ge,sourcePointSymbol as Oe}from"./symbols.js";import{registryKeys as Ee}from"./types.js";import{isNoAttachmentError as xe,extractHorizonAnglesFromMedia as Be,isTifOrMrf as Re,filterOILLayerView as He,assignElevationSampleToFeatures as De,filterByZ as ze,createPanoramicMedia as Ne,createNonPanoramicMedia as Ue,isSceneView as qe,isGraphic as $e,calculateSegment as We,calculateDirection as Je}from"./utils.js";import{disableVideoZoomAndPan as Ze,getUpdatedConstraints as Ke,getUpdatedExtentPoints as Qe}from"./videoViewerUtils.js";import Xe from"./components/ImageViewer.js";import Ye from"./components/NavigationNode.js";import et from"./components/OrientedImageryVideoViewModel.js";import{NoFeatureFoundWithObjectIdError as tt}from"./navigation/errors.js";import{queryFeatureByObjectIds as it}from"./navigation/queries.js";import{ImageMeasurementService as at}from"./services/ImageMeasurementService.js";import{configureSketchTool as rt,extractFieldsFromDataCaptureLayer as st,constructGraphicFromImageGeometry as ot}from"./support/dataCaptureUtils.js";import{imageSpaceToPoint as nt,removeZFromGeometry as lt}from"./support/geometryUtils.js";import ct from"./support/resolveMediaProps.js";import{isValidDataCaptureLayer as ht}from"./support/typeUtils.js";const dt=()=>new n("orientedimageryviewer:sketch-not-initialized","Sketch property is not initialized, call loadSketch first");let ut=class extends(l(g)){constructor(e){super(e),this.additionalFeatures=new s,this.additionalCameraLocations=new s,this.additionalFootprints=new s,this.areaMeasurementResult=0,this.areaMeasurementAccuracy=0,this.bestFeatureAngle=0,this.bestFeatureCurrentFootprint=null,this.bestFeatureFootprint=null,this.cameraHeadingThreshold=ge,this.cameraPitchThreshold=ge,this.clickAction="hittest",this.correctedLocationPointOnImage=null,this.videoViewModel=null,this.collectionId=null,this.coverageFrustums=new s,this.coveragePolygons=new s,this.currentBestFeature=null,this.currentBestFeatureMeasurementImage=null,this.currentBestFeatureLocation=null,this.currentCoverageVisible=!0,this.depthImage=null,this.featureCache=[],this.navigationNodes=new s,this.determineWorkflowForFeature=async(e,t,i)=>{const{currentBestFeature:a,selectedPoint:r}=this;if(this.emit("popup-close"),a&&r){this._initialCurrentCoverageUpdate=!0,this._updateGroundElevation=!0;try{await this._updatePointsAndPolygons(i),await this._loadDepthImage(i),await this._loadImage(i)}catch(s){y(s)||(this.loadImageError(s),d.getLogger(this).error("#loadIImage()","error occured while loading image",s))}}},this.determineWorkflowForTriangularMeasurement=async(e,t,i)=>{if(this.emit("popup-close"),this.currentBestFeatureMeasurementImage&&this.selectedPoint)try{await this._loadMeasurementViewerImage(i)}catch(a){y(a)||(this.loadImageError(a),d.getLogger(this).error("#loadIImage()","error occured while loading image",a))}},this.disabled=!1,this.displayMessage={key:"onLoadMessage",type:"info"},this.displayNewMeasurementButton=!0,this.distanceMeasurementResult=0,this.distanceAccuracyArray=[],this.dataCaptureLayer=null,this.features=new s,this.groundCoordinates=null,this.groundCoordinatesAccuracy=null,this.heightGraphic=null,this.heightMeasurementResult=0,this.heightMeasurementAccuracy=0,this.imageGeometryField=null,this.imageLocationToolState=!1,this.initialVideoMapViewExtent=null,this.imageMeasurementViewer=new Xe,this.isAdditionalCoverageVisible=!1,this.isAdditionalPointSourcesVisible=!1,this.layer=null,this.localPort=null,this.locationPointOnImage=null,this.mapImageConversionToolState=!1,this.measureType=null,this.measurementGraphic=null,this.navigatorCurrentBestFeature=null,this.oiObjectIdField=null,this.overlayedCameraLocations=new s,this.overlayedMapFeatures=new w,this.pixelCoordinates=null,this.preserveAngle="none",this.pointSources=new s,this.preloadMedia=!1,this.preloadMediaSize=5,this.previousFeatureAngle=0,this.selectedPoint=null,this.shouldShowSelectedImage=!1,this.sketch=null,this.sketchTriangular=null,this.sketchTriangularGraphicsLayer=null,this.draw=null,this.drawAdapter=null,this.polylineDrawAction=null,this.scheduledFrameId=null,this.sketchAdapter=null,this.triangularMeasurementActive=!1,this.triangulatedDistanceMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaMeasurement=null,this.triangulatedAreaAccuracy=0,this.triangulatedMeasurementGraphic=null,this.triangulatedPoint=null,this.triangulatedMeasurementAdapter=null,this.updateFootprint=async(e,t,i)=>{"default"===this.mode&&"image-loaded"!==this.state||await(this._adapter?.updateFootprint(e,t,i))},this.updateVideoFootprint=async e=>{this.mode.includes("video")&&this.videoElement?.content&&await(this._adapter?.updateVideoFootprint(e))},this.updateFootprintPanorama=async(e,t)=>{await(this._adapter?.updateFootprintPanorama(e,t))},this.updatingTriangularMeasurementState=!1,this.videoElement=null,this.videoLayer=null,this.videoMapView=new ce({map:new Map,constraints:ye}),this.verticalFilterEnabled=!1,this._adapter=null,this._highlightedFeatureHandle=null,this._imageViewer=new Xe,this._initialCurrentCoverageUpdate=!0,this._locationViewModel=null,this._measurementService=null,this._mediaPrefetcher=null,this._navigationManager=null,this._overlays=new H({listMode:"hide",internal:!0,elevationInfo:{mode:"absolute-height"},title:"OrentedImageryViewerViewModel overlays layer"}),this._panoramicVideoViewer=new pe,this._panoramicViewer=new me,this._panoramicMeasurementViewer=new me,this._referencePointOnGround=null,this._referencePointOnImage=null,this._referenceTransformationService=null,this._sectorData=null,this._transformationService=null,this._featureToSector=null,this._updatingHandles=new T,this._clickTask=null,this._crossSymbol=null,this.footprintExtent=null,this._featureChangedTask=null,this._mediaPrefetchTask=null,this._suitabilities=null,this._transformController=new AbortController,this._updateFootprintTask=null,this._updateGroundElevation=!1,this.addUpdatingPromise=e=>this._updatingHandles.addPromise(e),this.filterCapturedFeatures=e=>{const t=this.currentBestFeature?.attributes.objectId,i=this.layer?.imageReferenceField;if(!t||!e||!i)return;const a=this.overlayedMapFeatures.get(e);a?.forEach(e=>{const a=e.attributes??{},r=Object.keys(a).find(e=>e.toLowerCase()===i.toLowerCase());(r?a[r]:null)!==t&&(e.visible=!e.visible)})},this.hideImageGeometry=e=>{},this.highlight=e=>{if(!this._overlaysView)return;this.removeHighlight();const t=this.additionalFootprints.find(({attributes:{imageID:t}})=>t===Number(e));this._highlightedFeatureHandle=t?this._overlaysView?.highlight(t):null},this.loadDataCaptureAdapter=async e=>{await this.loadSketch(e);const t=import("./adapters/sketch/DataCaptureAdapter.js"),{default:i}=await t;return v(e),this.sketchAdapter=new i({viewModel:this}),this.sketchAdapter},this.loadImageFromFeature=(e,t,i)=>this._updatingHandles.addPromise(this._loadImageFromFeature(e,t,i)),this.storeImageMeasurementViewer=e=>{this.imageMeasurementViewer=e},this.storePanoramicMeasurementViewer=e=>{this._panoramicMeasurementViewer=e},this.loadImageViewer=e=>{this._imageViewer?.destroy(),this._imageViewer=e},this.loadPanoramicViewer=e=>{this._panoramicViewer?.destroy(),this._panoramicViewer=e},this.loadPanoramicVideoViewer=e=>{this._panoramicVideoViewer?.destroy(),this._panoramicVideoViewer=e},this.loadVideoViewer=e=>{this.videoMapView.container=e},this.showImageByObjectId=async(e,t)=>{const i=this.additionalFeatures.find(({attributes:t})=>t.objectId===e);if(i)this.currentBestFeature=i;else{const{layer:i,layerFloorFilterClause:r,layerTimeExtent:s}=this;if(!i)return void this.setMessage("noLayerSelected","info");this.beforeLoad();const o=this._updatingHandles.addPromise(this._queryAndLoadByObjectId(i,e,r,s,t));try{await o,await this.selectBestFeature(e,t)}catch(a){y(a)||(d.getLogger(this).error("oriented-imagery-viewer:show-image",a),"NoFeatureFoundWithObjectIdError"===a.name?this.setMessage("noFeatureFoundWithObjectId","error","",{objectId:e}):this.setMessage("imageLoadError","error",a.message))}}},this.getSectorFeatureById=e=>this._suitabilities?.find(({feature:{attributes:{objectId:t}}})=>t===e),this.getFeatureSectorById=e=>this._featureToSector?.[`${e}`],this.navigate=async(e,t)=>{const{mode:i}=this;if("default"!==i&&"panoramic"!==i)throw new n("NavigationError","Navigation is only supported in 'default' and 'panoramic' modes.");const a=e=>"default"===i&&e.declaredClass.endsWith("NavigationManager")||"panoramic"===i&&e.declaredClass.endsWith("NavigationManagerPanoramic");if(null==this._navigationManager||!a(this._navigationManager)){p(this._navigationManager);const e="default"===i?import("./navigation/NavigationManager.js"):import("./navigation/NavigationManagerPanoramic.js");this._navigationManager=new(await e).default({viewModel:this})}return this._navigationManager.navigate(e,t)},this.removeHighlight=()=>this._highlightedFeatureHandle?.remove(),this.revealImageGeometry=e=>{},this.selectBestFeature=async(e,t)=>(v(t),this.currentBestFeature=this.features?.find(({attributes:t})=>`${t.objectId}`==`${e}`),F(()=>"image-loaded"===this.state,t)),this.toggleImageAttributes=()=>{const{currentBestFeature:e,popupEnabled:i,layer:a,view:r}=this;if(this.emit("popup-close"),!(r&&e&&i&&a))return;const{attributes:s,geometry:o}=e,n=new t({geometry:o,attributes:s.toJSON(),origin:a.graphicOrigin});this.emit("popup-open",{features:[n],location:s.location.clone()})},this.updateSuitabilities=(e,t=!0)=>{e.sort((e,t)=>e.suitability-t.suitability),this._suitabilities=e;const i=this._suitabilities.map(({feature:e})=>e);this._initialCurrentCoverageUpdate=!0,this._updateFeatures(i,t),this._groupFeaturesBySectors()},this._createViewClickHandle=()=>{if(this.removeHandles(Ee.click),this.disabled||null==this.view)return;const e=this.mapImageConversionToolState&&"image-loaded"===this.state?this._mapImageConversionToolViewClickHandler:this._viewClickHandler;this.addHandles(this.view.on("click",e,ue.DEFAULT),Ee.click)},this._createImageClickHandle=()=>{this.removeHandles(Ee.imageClick);const{mapImageConversionToolState:e,mode:t,activeViewer:i,currentBestFeature:a,footprintExtent:s}=this,o=i?.imageSize;if(!(e&&"none"!==t&&o&&s&&a))return;const n=i.clickAction;this.clickAction="pixel-location";const l=c(()=>{this.clickAction=n});let h=null;const d=_(()=>i,"pixel-location",e=>{this.plotReferencePointOnImage(e),h?.abort(),h=r(async t=>{if(!e)return;const i=await this._transformationService.pixelToMapPoint(e).then(e=>{const t=this.view?.spatialReference;return ee(!t,e.spatialReference.equals(t))?e:G(e,t)});v(t),this.plotReferencePointOnGround(i)})});this.addHandles([d,l],Ee.imageClick)},this._createTriangularImageClickHandle=()=>{this.removeHandles(Ee.triangularImageClick),this.triangularMeasurementActive&&"none"!==this.mode&&this.currentBestFeature&&this.currentBestFeatureMeasurementImage&&this.activeTriangulatedViewer&&this.addHandles(this.activeTriangulatedViewer.imageRenderer.on("double-click",this._measurementImageClickHandler),Ee.triangularImageClick)},this._enablePan=()=>{this.removeHandles(Ee.videoPanHandles)},this._disablePan=()=>{this.removeHandles(Ee.videoPanHandles),this.addHandles(Ze(this.videoMapView),Ee.videoPanHandles)},this._handleImageHitTestResponse=async e=>{const{layer:t,overlayedCameraLocations:i}=this;if(!t)return;const a=e.results.find(({graphic:e,graphic:{attributes:a}})=>i.includes(e)&&a&&!a[t.imageReferenceField]&&!a[t.imageGeometryField]);if(!a)return;const r=a.graphic.attributes[t.objectIdField];await this.showImageByObjectId(r)},this._loadDepthImage=async e=>{const{currentBestFeature:t,layer:i,depthImageNotSupported:a}=this;if(this.depthImage?.destroy(),this.depthImage=null,!i||!t||a)return;const{depthImage:r}=t.attributes;if(!r)return;const s=(await import("./services/DepthImageService.js")).default;v(e),this.depthImage=new s({url:r});try{await this.depthImage.load(e)}catch(o){y(o)||(d.getLogger(this).error("error occurred while loading depth image",o),this.depthImage?.destroy(),this.depthImage=null)}},this._loadImage=async e=>{const{currentBestFeature:t,layer:i,mode:a}=this;if(this.clearGraphics(),i&&t&&"none"!==a&&"video"!==a&&"panoramic-video"!==a)try{await this.loadImageFromFeature(i,t,e),v(e),await this.transformAndPlotSelectedLocation(e)}catch(r){y(r)||this.loadImageError(r)}},this._loadVideo=async e=>{const{currentBestFeature:t,mode:i,selectedPoint:a}=this,r=t?.attributes.imagePath;if(!t||"panoramic-video"!==i||!r)return;const{attributes:s}=t,{cameraPitch:o,cameraOrientation:n,location:l}=s,c=l.spatialReference.isWGS84&&4!==n?.type?R(l):new j(l);try{this._panoramicVideoViewer.viewModel.video&&(this._panoramicVideoViewer.viewModel.video.pause(),this._panoramicVideoViewer.viewModel.videoPaused=!0),this._panoramicVideoViewer.videoSource=r;let t=0;c&&a&&(t=await te(c,a)-t),this._panoramicVideoViewer.pitch=o??0,this._panoramicVideoViewer.yaw=t,await this._panoramicVideoViewer.loadVideo(e),v(e)}catch(h){y(h)||this.loadImageError(h)}},this._loadImageFromFeature=async(e,t,i)=>{const{mode:a}=this;if("default"!==a&&"panoramic"!==a)return;let r;try{r=await ct(t.attributes,e,i),v(i)}catch(f){if(y(f))return;return xe(f)?(d.getLogger(this).error(f),void this.setMessage("noAttachment","error",`${e.objectIdField}: ${t.attributes.objectId}`)):(d.getLogger(this).error(f,{[e.objectIdField]:t.attributes.objectId,layer:e}),void this.setMessage("imageLoadError","error",`query-attachments-failed:${e.objectIdField} ${t.attributes.objectId}`))}if(!r)return;const{mediaUrl:s,datasetFormat:o,rotation:n,searchParams:l,location:c,cameraHeading:h,matrix:u,cameraPitch:p,getDataSetFormatError:m}=r,g=`${t.attributes.objectId}`;try{let r=this._mediaPrefetcher?.getCachedMedia(g);if(!r){const i=this.navigationNodes.find(e=>e.id===t.attributes.objectId);if(i){try{await(this._mediaPrefetcher?.startPrefetchForNode(i,e))}catch(w){}r=this._mediaPrefetcher?.getCachedMedia(g)}}if(r){if("panoramic"===a){const e=this.triangularMeasurementActive?this._panoramicMeasurementViewer:this._panoramicViewer;let a=0;return c&&this.selectedPoint&&(a=await te(c,this.selectedPoint)-a),await e.loadMedia(r,i),this.selectedPoint?e.set({yaw:a,pitch:p}):"viewAngle"in t.attributes&&Number.isFinite(t.attributes.viewAngle)&&e.set({yaw:t.attributes.viewAngle,pitch:p}),void(this.triangularMeasurementActive?await this.initializeReferenceTransformationService(i):await this.initializeTransformationService(i))}return await this._setImageSource(this.triangularMeasurementActive?this.imageMeasurementViewer:this._imageViewer,r,i),void(this.triangularMeasurementActive?await this.initializeReferenceTransformationService(i):await this.initializeTransformationService(i))}}catch(w){}m&&d.getLogger(this).warn("error occurred while getting dataset format",m),"panoramic"===a?await this.loadPanoramicMediaSource({lookAt:{yaw:this.selectedPoint?await te(c,this.selectedPoint):"viewAngle"in t.attributes&&Number.isFinite(t.attributes.viewAngle)?t.attributes.viewAngle:0,pitch:p},extension:o?.toUpperCase(),url:s,cameraHeading:h,matrix:u},i):await this.loadMediaSource({datasetFormat:o?.toUpperCase(),url:s,customParameters:l,rotation:n},i),this.triangularMeasurementActive?await this.initializeReferenceTransformationService(i):await this.initializeTransformationService(i)},this._loadMeasurementViewerImage=async e=>{const{currentBestFeatureMeasurementImage:t,layer:i,mode:a}=this;if(this.imageMeasurementViewer.clearGraphics(),this._panoramicMeasurementViewer.clearGraphics(),i&&t&&"none"!==a&&"video"!==a&&"panoramic-video"!==a)try{await this.loadImageFromFeature(i,t,e),v(e)}catch(r){y(r)||this.loadImageError(r)}},this._loadMediaPrefetcher=async e=>{if(!this._mediaPrefetcher){const{default:t}=await import("./support/MediaPrefetcher.js");v(e),this._mediaPrefetcher=new t({maxEntries:this.preloadMediaSize*ve.length})}return this._mediaPrefetcher},this._loadViewAdapter=async e=>{const{view:t}=this;if(t)switch(t.type){case"2d":{const{default:t}=await import("./adapters/view/MapViewAdapter.js");v(e),this._adapter=new t(this);break}case"3d":{const{default:t}=await import("./adapters/view/SceneViewAdapter.js");v(e),this._adapter=new t(this);break}}else this._adapter=null},this._mapImageConversionToolViewClickHandler=e=>{if(e.stopPropagation(),e.preventDefault(),e.mapPoint){const t=e.mapPoint;t.x=B(t.x,t.spatialReference),this.plotMapPoint(e.mapPoint)}},this._measurementImageClickHandler=e=>{e.stopPropagation(),e.preventDefault();const{sketchTriangular:t,triangularMeasurementActive:i,currentBestFeatureMeasurementImage:a,triangulatedMeasurementGraphic:r}=this;t&&i&&a&&r&&"active"!==t.state&&(t.update([r],{tool:"reshape"}),this.updatingTriangularMeasurementState=!0)},this._updateInteraction=()=>{const e=this.videoMapView.extent;if(!e)return;if(e.width<fe.xmax-fe.xmin&&e.height<fe.ymax-fe.ymin){this._enablePan();const t=Ke(e);t&&(this.videoMapView.constraints.geometry=t)}else this.initialVideoMapViewExtent&&!this.videoMapView.extent.equals(this.initialVideoMapViewExtent)&&(this.videoMapView.extent=this.initialVideoMapViewExtent),this._disablePan(),this.videoMapView.constraints.geometry=null},this._viewClickHandler=e=>{this._clickTask?.abort(),this._clickTask=r(async t=>{const{pointerType:i,button:a,mapPoint:r}=e;if("mouse"===i&&0!==a||!r)return;e.stopPropagation(),e.preventDefault();const{view:s,layer:o}=this;if(s&&o){if(this.shouldShowSelectedImage){const i=s.hitTest(e,{include:[o]});this._updatingHandles.addPromise(i);const a=await i;return v(t),await this._processHitTestResults(o,a,{signal:t})}return this._updatingHandles.addPromise(this.loadBestImage(r,{signal:t}))}})},this.plotSelectedPointOnImage=async(e,i)=>{if(await f(i),!e)return;const a=new j({...k(e)?e.toJSON():e});if("default"===this.mode)a.x-=.5,a.y=.5-a.y,a.spatialReference=this._imageViewer.imageRenderer.spatialReference.clone(),this._crossSymbol=new t({geometry:a,symbol:Ve}),this._imageViewer.addGraphic(this._crossSymbol,0);else if("panoramic"===this.mode){const{imageSize:i,media:a}=this._panoramicViewer;if(!i||!a)return;const r=Be(a),s=ie(e,...i,r);this._crossSymbol=new t({geometry:new j(s,O.WebMercator),symbol:Pe}),this._panoramicViewer.addGraphic(this._crossSymbol,0)}},this.handleSectorClick=this.handleSectorClick.bind(this),this.searchBestImage=this.searchBestImage.bind(this),this.transformAndPlotReferencePointOnImage=this.transformAndPlotReferencePointOnImage.bind(this)}initialize(){this.addHandles([M(()=>this.view,()=>this.load(),b),M(()=>this.view?.map,(e,t)=>{t?.layers.remove(this._overlays),e?.layers.add(this._overlays)},I),M(()=>this.view?.map?.allLayers?.length,e=>{e&&this.view?.map?.layers.reorder(this._overlays,e-1)},I),M(()=>[this.state,this.mapImageConversionToolState,this.view,this.disabled],()=>{this._createViewClickHandle(),this._createImageClickHandle()},b),M(()=>[this.triangularMeasurementActive,this.currentBestFeatureMeasurementImage],()=>{this._createTriangularImageClickHandle()},b),M(()=>[this.state,this.imageLocationToolState,this.view],()=>{this._initializeMeasurementService(),this._initializeLocationViewModel()},b),M(()=>this.measureType,()=>{this.clearPreviousMeasurements(),this._initializeMeasurementService()},b),M(()=>this.bestFeatureAngle,(e,t)=>{this.previousFeatureAngle=t??0},b),M(()=>this.currentBestFeature,async(e,t)=>{m(this._featureChangedTask),this._featureChangedTask=r(async i=>this.determineWorkflowForFeature.apply(this,[e,t,{signal:i}])),await this._featureChangedTask.promise},{sync:!0}),M(()=>[this.currentNode,this.preloadMedia,this.navigationMode],()=>{this._mediaPrefetchTask?.abort(),this._mediaPrefetchTask=r(async e=>{this.preloadMedia&&null!=this.navigationMode?(this._mediaPrefetcher??=await this._loadMediaPrefetcher({signal:e}),v(e),"directional"===this.navigationMode?this._mediaPrefetcher.enqueueDirectionalPrefetch(this.layer,this.currentNode,this.preloadMediaSize):this._mediaPrefetcher.enqueueSequentialPrefetch(this.layer,this.currentNode,this.preloadMediaSize)):this._mediaPrefetcher?.clear()})},b),M(()=>this.currentBestFeatureMeasurementImage,(e,t)=>{m(this._featureChangedTask),t&&e!==t&&(this.triangulatedPoint=null,this.sketchTriangularGraphicsLayer?.graphics.destroyAll(),this._measurementService?.resetMeasurementVectors()),this._featureChangedTask=r(async i=>{await this.determineWorkflowForTriangularMeasurement(e,t,{signal:i}),v(i),this._reorderTriangularSketchLayer()})},b),M(()=>this.triangularMeasurementActive,(e,t)=>{t&&!e&&(this._measurementService?.resetMeasurementVectors(),this.currentBestFeatureMeasurementImage=null,this.triangulatedDistanceMeasurement=null,this.triangulatedMeasurementGraphic=null,this.triangulatedPoint=null,this.updatingTriangularMeasurementState=!1,this.triangulatedAreaMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaAccuracy=0,this.sketchTriangularGraphicsLayer?.graphics.destroyAll(),this.clearReferencePointOnImage(),this.imageMeasurementViewer.clearImage(),this.imageMeasurementViewer.clearGraphics(),this._panoramicMeasurementViewer.clearImage(),this._panoramicMeasurementViewer.clearGraphics())}),M(()=>this.mode,e=>{switch(this.removeHandles(Ee.interactionHandles),e){case"default":this.addHandles(M(()=>{const{state:e}=this;return"image-loaded"===e?this._imageViewer.imagePointsInView:null},e=>{e&&(m(this._updateFootprintTask),this._updateFootprintTask=r(async t=>{await this.updateFootprint(e,void 0,{signal:t})}))},{...b,equals:(e,t)=>i(e,t,h)}),Ee.interactionHandles);break;case"video":this.addHandles(M(()=>{const{footprintExtent:e,videoElement:t,bestFeatureFootprint:i}=this;if(e&&t?.loaded&&i)return{videoExtent:we,bestFeatureFootprint:i}},e=>{e?.videoExtent&&e?.bestFeatureFootprint&&(m(this._updateFootprintTask),this._updateFootprintTask=r(async t=>{const i={points:e.videoExtent,feature:void 0,scale:void 0,options:{signal:t}};await this.updateVideoFootprint(i)}))},{...b,equals:(e,t)=>i(e?.videoExtent,t?.videoExtent,h)&&e?.bestFeatureFootprint===t?.bestFeatureFootprint}),Ee.interactionHandles);break;case"panoramic":this.addHandles(M(()=>{const{currentBestFeature:e,state:t,_panoramicViewer:i}=this,{imageSize:a,vfov:r,hfov:s,pitch:o,yaw:n}=i;return e&&a&&!t.includes("loading")&&null!=r&&null!=s&&null!=o&&null!=n?[r,s,n,o]:null},e=>{if(!e||this.state.includes("loading"))return;const[t,i,a,s]=e;this.currentNode&&(this.currentNode.currentHeading=a,this.currentNode.currentPitch=s),m(this._updateFootprintTask),this._updateFootprintTask=r(async e=>{await this.updateFootprintPanorama({verticalFieldOfView:t,horizontalFieldOfView:i,yaw:a,pitch:s},{signal:e}),this._updateFootprintTask=null})},{equals:(e,t)=>i(e,t,h)}),Ee.interactionHandles);break;case"panoramic-video":this.addHandles(M(()=>{const{currentBestFeature:e,state:t,_panoramicVideoViewer:i}=this,{imageSize:a,vfov:r,hfov:s,pitch:o,yaw:n,viewModel:l}=i,c=l.closestFeature??e;return c&&a&&!t.includes("loading")&&null!=r&&null!=s&&null!=o&&null!=n?[r,s,n,o,c]:null},e=>{if(!e)return;const[t,i,a,s,o]=e;m(this._updateFootprintTask),this._updateFootprintTask=r(async e=>{await this.updateFootprintPanorama({verticalFieldOfView:t,horizontalFieldOfView:i,yaw:a,pitch:s,feature:o},{signal:e}),v(e),this._updateFootprintTask=null})},{equals:(e,t)=>i(e,t,h)}),Ee.interactionHandles)}},b),M(()=>[this.brightness,this.contrast,this.sharpness],()=>{const{_imageViewer:e,brightness:t,contrast:i,mode:a,sharpness:r}=this;"default"===a&&(e.brightness=t,e.contrast=i,e.sharpness=r)},b),M(()=>this.activeViewer?.imageRenderer,()=>{this.sketch&&(this.sketch.view=this.activeViewer?.imageRenderer)}),M(()=>this.activeViewer,e=>{this.removeHandles(Ee.hittestHandles),e&&this.addHandles(_(()=>e,"hittest-response",this._handleImageHitTestResponse),Ee.hittestHandles)}),M(()=>this.videoMapView.extent,async()=>{const e=this.videoViewModel?.closestFeature;e&&(m(this._updateFootprintTask),this._updateFootprintTask=r(async t=>{const i={points:this.videoExtentPoints,feature:e,options:{signal:t}};await this.updateVideoFootprint(i)}))}),M(()=>[this.videoMapView.interacting,this.videoMapView.navigating,this.videoMapView.scale],()=>{this.scheduledFrameId||(this.scheduledFrameId=requestAnimationFrame(()=>{this.scheduledFrameId=null,this._updateInteraction()}))},{initial:!0}),V(()=>null!=this.videoMapView.extent,()=>{this.initialVideoMapViewExtent=this.videoMapView.extent},{once:!0})]),this.when().finally(()=>{this.notifyChange("state")})}destroy(){this.currentBestFeature=null,this._updateFootprintTask=m(this._updateFootprintTask),this._clickTask=m(this._clickTask),this.coverageFrustums.destroy(),this.coveragePolygons.destroy(),this.pointSources.destroy(),this.additionalFootprints.destroy(),this.additionalCameraLocations.destroy(),this.bestFeatureFootprint=p(this.bestFeatureFootprint),this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint),this.videoViewModel=p(this.videoViewModel),this._locationViewModel=p(this._locationViewModel),this._crossSymbol=p(this._crossSymbol),this._referencePointOnGround=p(this._referencePointOnGround),this._referencePointOnImage=p(this._referencePointOnImage),this._overlays&&this.view?.map?.remove(this._overlays),this._overlays.destroy(),this._imageViewer.destroy(),this.imageMeasurementViewer.destroy(),this._panoramicViewer.destroy(),this._panoramicMeasurementViewer.destroy(),this._mediaPrefetcher?.destroy()}get activeLayer(){return o(d.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){o(d.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get activeViewer(){const{_imageViewer:e,_panoramicViewer:t,mode:i}=this;switch(i){case"default":return e;case"panoramic":return t;default:return null}}get activeTriangulatedViewer(){switch(this.mode){case"default":return this.imageMeasurementViewer;case"panoramic":return this._panoramicMeasurementViewer;default:return null}}get accuracyParametersMissing(){return this.layer?.orientationAccuracy?.every(e=>0===e)??!0}get brightness(){return this._get("brightness")??0}set brightness(e){this._set("brightness",u(e,-10,10))}get contrast(){return this._get("contrast")??0}set contrast(e){this._set("contrast",u(e,-10,10))}get currentNode(){const{currentBestFeature:e,navigationNodes:t}=this;return t.find(t=>t.id===e?.attributes.objectId)}get depthImageNotSupported(){if(this.currentBestFeature?.attributes.depthImage)return!Re(this.currentBestFeature.attributes.depthImage)}get featureCount(){return this.features?.length??0}get imageGalleryEnabled(){const{currentBestFeature:e}=this;if(!e)return!1;const t=e.attributes.imagePath?.trim();return Re(t)||Ie(t)}get imageLoaded(){return o(d.getLogger(this),"imageLoaded",{replacement:'Use OrientedImageryViewer.state === "image-loaded"',version:"4.29",warnOnce:!0}),"image-loaded"===this.state}get invalidCameraHeading(){return this.currentBestFeature?.attributes?.cameraHeading===Fe}get imagePointsInView(){const{mode:e,_imageViewer:t}=this;return"default"===e?t.imagePointsInView:null}get layerView(){const{layer:e,view:t}=this;if(e&&t)return t.allLayerViews.find(He(e))}get layerFloorFilterClause(){const{layerView:e}=this;return e?ne(e):null}get layerTimeExtent(){return this.layerView?.timeExtent??null}get mode(){const e=this.currentBestFeature?.attributes;if(!e)return"none";const t=e.orientedImageryType;if(t?.includes("video"))return t.includes("360")?"panoramic-video":"video";const{horizontalFieldOfView:i,isSpherical:a}=e;return 360===i||a?"panoramic":"default"}get panoramicVideoLoaded(){const{mode:e,_panoramicVideoViewer:t}=this,{videoLoaded:i}=t.viewModel;return("panoramic-video"===e&&!0===i)??!1}get popupEnabled(){return!0===this.layer?.popupEnabled}get referencePoint(){return this._referencePointOnGround?.geometry}get sectorData(){const{_sectorData:e}=this;return e?_e.map(t=>e[t]):null}get sharpness(){return this._get("sharpness")??0}set sharpness(e){this._set("sharpness",u(e,0,1))}get sketchGraphicsLayer(){const{sketch:e}=this;return"graphics"===e?.layer?.type?e.layer:void 0}get state(){const{mode:e,_updatingHandles:{updating:t},_featureChangedTask:i}=this;if(!this.isFulfilled()||t||!1===i?.finished)return"loading";if(this.isRejected())return"error";if("error"===this.displayMessage?.type)return"image-load-error";switch(e){case"default":return this._imageViewer.state;case"panoramic":return this._panoramicViewer.state;case"video":return this.videoElement?.loaded?"video-loaded":"video-not-loaded"}return"ready"}get thumbnails(){const{features:e}=this;return e?new s(e.map(({attributes:{imagePath:e,objectId:t,cameraRoll:i,imageRotation:a}})=>{const r=e?.trim();return Re(r)||Ie(r)?{url:r,objectId:t,rotation:(i??0)+(a??0)}:null}).filter(a)):null}get videoExtentPoints(){const e=Qe(this.videoMapView.extent);return e.length?e:we}set view(e){this._set("view",e)}get _defaultGraphicsLayer(){const e={blendMode:"source-atop"};switch(this.mode){case"panoramic":return new H({...e,elevationInfo:{mode:"absolute-height"}});case"default":return new H({...e});default:return}}get _overlaysView(){return this.view?.layerViews.find(({layer:e})=>e===this._overlays)}beforeLoad(e=!0){this.emit("popup-close"),e&&(this.displayMessage=null),this.clearPreviousGroundLocation(),this.triangularMeasurementActive=!1,this.currentBestFeatureMeasurementImage=null,this.measureType=null,this.imageLocationToolState=!1,this.features.removeAll(),this.currentBestFeature=null,this.additionalFeatures.removeAll(),this.additionalFootprints.removeAll(),this.additionalCameraLocations.removeAll(),this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint),this._overlays?.removeAll()}async calculateLocationAccuracy(e){return this._measurementService?.calculateLocationAccuracy(e)}clearLocationPointOnImage(e=!1){this.locationPointOnImage&&!e&&(this._imageViewer.removeGraphic(this.locationPointOnImage),this._panoramicViewer.removeGraphic(this.locationPointOnImage),this.locationPointOnImage=p(this.locationPointOnImage)),this.correctedLocationPointOnImage&&(this.imageMeasurementViewer.removeGraphic(this.correctedLocationPointOnImage),this._panoramicMeasurementViewer.removeGraphic(this.correctedLocationPointOnImage),this.correctedLocationPointOnImage=p(this.correctedLocationPointOnImage))}clearPreviousMeasurements(){this.clearMeasurementGraphics(),this.resetMeasurementData(),this.stopMeasurement()}clearPreviousGroundLocation(){this.groundCoordinates=null,this.groundCoordinatesAccuracy=null,this.pixelCoordinates=null,this.clearLocationPointOnImage()}clearMeasurementGraphics(){this.measurementGraphic&&(this.activeViewer?.removeGraphic(this.measurementGraphic),this.measurementGraphic=null),this.heightGraphic&&(this.activeViewer?.removeGraphic(this.heightGraphic),this.heightGraphic=null),this.triangularMeasurementActive&&this.sketchTriangularGraphicsLayer?.graphics.destroyAll()}digitizeCancel(){return this.sketch?.cancel()}digitizeCanRedo(){return this.sketch?.canRedo()??!1}digitizeCanUndo(){return this.sketch?.canUndo()??!1}digitizeComplete(){return this.sketch?.complete()}async digitizeCreate(e,t){const{sketch:i,dataCaptureLayer:a}=this;if(!i)throw dt();rt(a,e,i),await i.create(e,{...t,defaultZ:0})}digitizeDelete(){if(!this.sketch)throw dt();return this.sketch.delete()}digitizeDuplicate(){if(!this.sketch)throw dt();return this.sketch.duplicate()}digitizePlace(e,t){if(!this.sketch)throw dt();return this.sketch.place(e,t)}digitizeRedo(){if(!this.sketch)throw dt();return this.sketch.redo()}digitizeUndo(){if(!this.sketch)throw dt();return this.sketch.undo()}digitizeUpdate(e,t){if(!this.sketch)throw dt();return this.sketch.update(e,t)}filterByFootprints(e,t,i=!1){const a=[],r=[],s=[];return e.forEach(e=>{const{layer:{coveragePercent:o},attributes:n}=e;let l;const{polygon:c,frustum:h}=q(n);if(l=c.clone(),n.isInspection&&(l=$(n)),o&&(l=W(l,o)),i||!t||J(l,t)){s.push(e);const{geometry:t,objectId:i,cameraHeight:o,cameraHeading:l}=n,d=t.clone();d.z=o/K(t.spatialReference),d.imageID=i,this.pointSources.push(d),l!==Fe&&(a.push(c),h&&r.push(h))}}),{features:s,polygons:a,frustums:r}}async deleteDataCaptureFeatures(e){const{dataCaptureLayer:t}=this;if(!t)throw new n("orientedimageryviewer:missing-featurelayer","Data capture layer is not available");return t.queryFeatures({objectIds:e}).then(({features:e})=>t.applyEdits({deleteFeatures:e}))}handleSectorClick(e){if(isNaN(e))return;const t=this._sectorData?.[_e[e]],i=t?.at(0);i&&(this.triangularMeasurementActive&&this.currentBestFeature?this._updateImageMeasurementBestFeature(i):this._updateCurrentBestFeature(i))}handleFeatureClick(e){const{sector:t,featureIndexInSector:i}=e;if(isNaN(i))return;const a=this._sectorData?.[t],r=a?.at(i);r&&(this.triangularMeasurementActive&&this.currentBestFeature?this._updateImageMeasurementBestFeature(r):this._updateCurrentBestFeature(r))}load(e){return this.addResolvingPromise(this._loadViewAdapter(e).catch(e=>{if(!y(e))throw e})),this}async loadBestImage(e,t){return this.selectedPoint=Q(e),this.beforeLoad(),this._fetchFeaturesWithController(e,t)}async loadHeightMeasurementAdapter(e){if(!this.drawAdapter){const t=import("./adapters/draw/HeightMeasurementAdapter.js"),{default:i}=await t;if(v(e),this.drawAdapter=new i({viewModel:this,measurementService:this._measurementService}),!this.drawAdapter.viewModel.isResolved())return}return this.drawAdapter}loadImageError(e){d.getLogger(this).error("oriented-imagery-viewer:load-image",e),this.setMessage("imageLoadError","error",e.message)}async loadSketch(e){if(!this.sketch){const t=import("../Sketch/SketchViewModel.js"),{default:i}=await t;v(e),this.sketch=new i({layer:this._defaultGraphicsLayer,view:this.activeViewer?.imageRenderer,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{edgeOperation:"none",shapeOperation:"none",vertexOperation:void 0},enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"transform"}})}return this.sketch}async loadMeasurementAdapter(e){if(!this.sketchAdapter){const t=import("./adapters/sketch/MeasurementAdapter.js"),{default:i}=await t;if(v(e),this.sketchAdapter=new i({viewModel:this,measurementService:this._measurementService}),!this.sketchAdapter.viewModel.isResolved())return}return this.sketchAdapter}async processFeatureResponse(e,t,i){const{features:a}=e;if(this._clearFeatureGeometries(),!this._checkFeatures(a))return;const{features:r,polygons:s,frustums:o}=this.filterByFootprints(a,t,i?.skipFilter);if(!this._checkFeatures(r))return;this.coveragePolygons.addMany(s),this.coverageFrustums.addMany(o);const n=await this.processElevationSample(s,r,i);v(i),await this._updateElevationOfSelectedPointAndLocations(r,t,n),v(i),De(r,n);let l=r;if(this.layer?.verticalSearchRange&&this.layer.hasZ&&this.verticalFilterEnabled&&(l=ze(r,t,this.layer.verticalSearchRange),!l.length))return void this.setMessage("noImageAtElevation","info");const c=this._processSuitableFeatures(l,t);this.updateSuitabilities(c,i?.loadBestImage)}async processFeatureElevation(e,t,i){if(!t)return;const{features:a,polygons:r}=this.filterByFootprints(e,t,!0);if(!a?.length)return;const s=await this.processElevationSample(r,a,i);return v(i),s}async startMeasurement(e,t){this.sketch||await this.loadSketch(t),await this.loadMeasurementAdapter(t);const{sketch:i,sketchAdapter:a,activeViewer:r,mode:s}=this;if(!i||!a||!r||"none"===s)return;if(this.displayNewMeasurementButton=!1,"panoramic"===s&&(i.defaultCreateOptions.defaultZ=0),await i.create(e),"panoramic"===s){const{drawOperation:e}=i.view.activeTool;e.constraintsEnabled=!1,e._set("elevationDrawSurface",null)}const o=this.activeViewer?.imageRenderer.effectiveTheme.accentColor;o&&this.sketch&&(this.sketch.polygonSymbol=Se(o),this.sketch.polylineSymbol="panoramic"===s?Ae:Ce(o,2.5))}async startHeightMeasurement(){this.displayNewMeasurementButton=!1,this.draw??=new he({view:this.activeViewer?.imageRenderer}),this.polylineDrawAction=this.draw.create("polyline"),await this.loadHeightMeasurementAdapter()}initializeMeasurement(e){switch(this.clearMeasurementGraphics(),this.resetMeasurementData(),e){case"distance":this.startMeasurement("polyline");break;case"area":this.startMeasurement("polygon");break;case"height":this.startHeightMeasurement()}}async overlayCameraLocations(e){const{activeViewer:i,currentBestFeature:a,overlayedCameraLocations:r,layer:s,mode:o,state:n,layerFloorFilterClause:l,layerTimeExtent:c}=this,h=i?.imageSize;if(!h||!a||!s||"default"!==o&&"panoramic"!==o||n.includes("loading"))return;const{polygon:d}=q(a.attributes);if(i.removeManyGraphics(r.toArray()),r.removeAll(),e){const{features:e}=await s.queryFeatures({where:P(`${s.objectIdField} <> ${a.attributes.objectId}`,P(s.definitionExpression,l)),geometry:d,returnGeometry:!0,outFields:[s.objectIdField],timeExtent:c}),n=await Promise.all(e.map(async e=>{const{attributes:i,geometry:a}=e,r=await this._transformationService.pointToImageGeometry(a),s="panoramic"===o?ke():Te();return new t({attributes:i,symbol:s,geometry:r})}));r.addMany(n),i.addManyGraphics(r.toArray())}}overlayGraphicsOnImage(e,t){this.removeOverlayedGraphicsOnImage(e),this.overlayedMapFeatures.set(e,t),this.activeViewer?.addManyGraphics(t.toArray())}async overlayMapFeatures(e,i=!1){const{activeViewer:a,currentBestFeature:r,mode:o,state:n,layer:l}=this,c=a?.imageSize;if(!c||!r||"none"===o||"video"===o||"panoramic-video"===o||n.includes("loading")||!l)return;const{polygon:h}=q(r.attributes);try{const{imageGeometryField:t,oiObjectIdField:i}=st(e,l.imageGeometryField,l.imageReferenceField);this.imageGeometryField=t.name,this.oiObjectIdField=i.name}catch(m){d.getLogger(this).warn("oriented-imagery-viewer:overlay-map-features",m)}const{features:u}=await e.queryFeatures({geometry:h,returnGeometry:!0,outFields:["*"]}),p=new s(await Promise.all(u.map(async s=>{const n=s.symbol?.clone()??e.renderer?.getSymbol(s)?.clone(),{attributes:l,geometry:h}=s,{imageGeometryField:u,oiObjectIdField:p}=this;if(u&&p&&ht(e,u,p)&&`${l[p]}`==`${r.attributes.objectId}`)try{const t=Be(a?.media);return ot(l,u,e,i,c,o,n,t)}catch(m){d.getLogger(this).warn("oriented-imagery-viewer:overlay-map-features","couldn't create graphic from attributes, geometry will be used",{error:m,feature:s,layer:e,imageGeometryField:this.imageGeometryField,imageReferenceField:this.oiObjectIdField})}const g=await this._transformationService.geometryToImageGeometry(h);return new t({attributes:l,layer:e,symbol:n,geometry:g,visible:e.visible&&i})})));this.overlayGraphicsOnImage(`${e.id}`,p)}getDepthAt(e){const{activeViewer:t,currentBestFeature:i,mode:a,state:r,depthImage:s}=this,o=t?.imageSize;if(!o||!i||"none"===a||r.includes("loading"))return d.getLogger(this).warnOnce("oriented-imagery-viewer:get-depth-at","Load an image to use depth"),null;if(!s?.loaded)return d.getLogger(this).error("oriented-imagery-viewer:get-depth-at","Depth image is not loaded"),this.emit("depth-image-service:not-loaded"),null;const n=(Array.isArray(e)?e:[e]).map(e=>s.depthAt(e,{width:o[0],height:o[1]})??null);return Array.isArray(e)?n:n[0]}getActiveSectors(){return _e.filter(e=>this._sectorData?.[e]?.length)}async plotMapPoint(e){return this.plotReferencePoint(e),this.transformAndPlotReferencePointOnImage({feature:this.currentBestFeature,selectedLocation:e,options:{signal:this._transformController?.signal}})}plotReferencePointOnGround(e){this._referencePointOnGround&&(this._overlays?.remove(this._referencePointOnGround),this._referencePointOnGround.destroy()),null!=e&&(this._referencePointOnGround=new t({geometry:new j({...e.toJSON()}),symbol:Le}),this.view?this._overlays?.add(this._referencePointOnGround):this.emit("plot-ground-point",{data:{point:this._referencePointOnGround?.geometry}}))}plotReferencePointOnImage(e){const{state:i,mode:a,activeViewer:r}=this;if("image-loaded"!==i||!r?.imageSize||"default"!==a&&"panoramic"!==a)return;this.clearReferencePointOnImage();const s=Be(r.media),o=nt(e,a,r.imageSize,s);this._referencePointOnImage=new t({geometry:o,symbol:"panoramic"===a?je.clone():Le.clone()}),r.addGraphic(this._referencePointOnImage,0)}removeAllOverlayMapFeatures(){this.overlayedMapFeatures.forEach(e=>{this._imageViewer.removeManyGraphics(e.toArray())}),this.overlayedMapFeatures.clear()}removeOverlayedGraphicsOnImage(e){const t=this.overlayedMapFeatures.get(e);t?.length&&(this.activeViewer?.removeManyGraphics(t.toArray()),this.overlayedMapFeatures.delete(e))}reset(){const{mode:e}=this;"default"===e||"panoramic"===e?this.resetImage():"video"===e?this.resetVideo():"panoramic-video"===e&&this.resetVideoPanoramic(),this.beforeLoad(!1)}resetImage(){switch(this.setMessage("onLoadMessage","info"),this.mode){case"default":this._imageViewer.clearImage(),this._imageViewer.clearGraphics();break;case"panoramic":this._panoramicViewer.clearGraphics()}this._clickTask=m(this._clickTask)}resetVideo(){this.setMessage("onLoadMessage","info"),this.videoViewModel?.resetVideoHandler(),this._overlays?.removeAll(),this.videoViewModel=null,this.featureCache=[],this.currentBestFeature=null}resetVideoPanoramic(){this.setMessage("onLoadMessage","info"),this._overlays?.removeAll(),this.currentBestFeature=null}resetMeasurementData(){this.areaMeasurementResult=0,this.areaMeasurementAccuracy=0,this.distanceMeasurementResult=0,this.distanceAccuracyArray=[],this.heightMeasurementResult=0,this.heightMeasurementAccuracy=0,this.heightGraphic=null,this.triangulatedDistanceMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaMeasurement=null,this.triangulatedMeasurementGraphic=null,this.updatingTriangularMeasurementState=!1,this.triangulatedAreaAccuracy=0,this._measurementService?.resetMeasurementVectors()}async saveDrawing(){const{dataCaptureLayer:e,sketchAdapter:t}=this;if(!e||"data-capture"!==t?.type)return;const{pendingGraphics:i,savedGraphics:a}=t,r=i.get(e.id),s=r?.toArray();if(!r||!s?.length)return;const{addFeatureResults:o}=await this.saveDataCaptureFeatures(s),n=o.reduce((t,{objectId:i,globalId:a,error:r},o)=>{const n=s[o],{attributes:l}=n;return r?t.error.push(n):(i&&(l[e.objectIdField]=i),a&&e.globalIdField&&(l[e.globalIdField]=a),t.success.push(n)),t},{success:[],error:[]});a.addMany(n.success),r.removeAll(),r.addMany(n.error)}async saveDataCaptureFeatures(e,t){const{activeViewer:i,currentBestFeature:r,dataCaptureLayer:s,mode:o}=this,l=i?.imageSize;if(!l||!r||"none"===o||"video"===o||"panoramic-video"===o)throw new n("orientedimageryviewer:missing-input","Image size, current best feature and mode are required to save data capture features");if(!s)throw new n("orientedimageryviewer:missing-featurelayer","Data capture layer is not available");const c=await Promise.all(e.map(async e=>{const i=e.clone(),{geometry:a}=i;if(!a)return;const r=a.type,o=s.hasZ,n=s.geometryType,l=r!==n,c=l?await import("./transformers.js"):null,h=c?.default[n],d=l?h?.(a):a;return d&&(i.geometry=await this._transformationService.imageGeometryToMapGeometry(d,t),i.geometry)?(o||lt(i.geometry),i):void 0})),h=c.filter(a);return s.applyEdits({addFeatures:h}).then(e=>{const{addFeatureResults:t}=e;let i=0;const a=c.map(e=>{const a=t[i++];return e?a:{error:new n("orientedimageryviewer:save-unsucccessful","Error in saving data capture features"),objectId:null,globalId:null}});return{...e,addFeatureResults:a}})}async searchBestImage(e,t){try{const i=await z(e,t);i&&await this.processFeatureResponse(i,e.point,t)}catch(i){y(i)||(this.setMessage("imageLoadError","error",i.message),d.getLogger(this).error("error occurred while finding best image",i))}}selectTriangularMeasurementFeature(e){this.currentBestFeatureMeasurementImage=this.features?.find(({attributes:t})=>t.objectId===Number(e))}setAdditionalCameraLocationsVisibility(e){this.additionalCameraLocations.forEach(t=>{t.visible=e})}setAdditionalCoverageVisibility(e){this.additionalFootprints.forEach(t=>{t.visible=e})}setCurrentCoverageVisibility(e){this.bestFeatureCurrentFootprint&&(this.bestFeatureCurrentFootprint.visible=e),this.currentBestFeatureLocation&&(this.currentBestFeatureLocation.visible=e)}setMapImageConversionToolState(e){this.mapImageConversionToolState=e}setCurrentPanoramaView(e,t){this._panoramicViewer?.set({yaw:e,pitch:t})}async startDataCapture(e,t){const i=this.activeViewer?.imageRenderer,{oiObjectIdField:a,currentBestFeature:r}=this;if(!i||!r||!a)return;const{attributes:{objectId:o}}=r,n=this.overlayedMapFeatures.get(e.id)?.toArray()??[],l=[],c=[];for(const s of n)`${s.getAttribute(a)}`==`${o}`?l.push(s):c.push(s);this.overlayGraphicsOnImage(e.id,new s(c)),this.collectionId=e.id;const h=await this.loadSketch(t),d=await this.loadDataCaptureAdapter(t);v(t),h.addGraphics(l),d.savedGraphics.addMany(l);i.ui.find("zoom").visible=!1,i.map.layers.add(this.sketchGraphicsLayer)}async stopDataCapture(e=!1){this.sketch?.cancel(),this.sketchGraphicsLayer?.removeAll(),this.sketchAdapter=p(this.sketchAdapter),this.sketch=p(this.sketch),this.collectionId=null;const{dataCaptureLayer:t}=this,i=this.activeViewer?.imageRenderer;if(!i||i.destroyed)return;i.map.layers.remove(this.sketchGraphicsLayer),e&&t&&await this.overlayMapFeatures(t,!0);const a=i.ui.find("zoom");a&&(a.visible=!0)}stopMeasurement(){this.draw?.reset(),this.sketch?.cancel()}async toggleAllOverlayMapFeatures(e){!e&&this.dataCaptureLayer&&(await this.stopDataCapture(!0),this.dataCaptureLayer=null),this.overlayedMapFeatures.forEach(t=>{this._toggleVisiblity(t,e)})}toggleOverlayMapFeatures(e,t,i){const a=this.overlayedMapFeatures.get(e);a&&i&&this._toggleVisiblity(a,t)}toggleSelection(e){const{sketch:t}=this;t&&(t.updateOnGraphicClick=e,t.cancel())}async transformAndPlotReferencePointOnImage(e){const{selectedLocation:t,options:i}=e;let a=!1,r=!1;const s=this.bestFeatureFootprint?.geometry;switch(s?.type){case"polygon":{const e=t.spatialReference.equals(s.spatialReference)?t:await G(t,s.spatialReference);a=s.contains(e);break}case"mesh":{const e=t.spatialReference.equals(s.spatialReference)?t:await G(t,s.spatialReference);r=s.extent.contains(e);break}}if(!a&&!r)return void this.clearReferencePointOnImage();const o=await this._transformationService.pointToPixel(t,i);if(o)return v(i),this.plotReferencePointOnImage(o),{x:o.x,y:o.y};this.clearReferencePointOnImage()}async updateFeatureCache(e,t){const i=await N(e,t);i.features?.length&&(this.featureCache=i.features)}async _fetchFeatures(e,t){const{layer:i,layerFloorFilterClause:a,layerTimeExtent:r,view:s}=this;if(!s||!i)return;e.x=B(e.x,e.spatialReference);const o=i.spatialReference.equals(e.spatialReference)?e:await G(e,i.spatialReference),n=o.spatialReference.isGeographic?R(o):o,l=P("1=1",P(i.definitionExpression,a)),c=n.spatialReference.isGeographic?1:S(n.spatialReference),h={layerInstanceOrURL:i,point:n,queryParams:{where:l,maximumDistance:i.maximumDistance?i.maximumDistance/c:void 0,timeExtent:r}};return await this.searchBestImage(h,t)}async _fetchFeaturesWithController(e,t){try{await this._fetchFeatures(e,t)}catch(i){if(y(i))return;this.setMessage("imageLoadError","error"),d.getLogger(this).error("error occurred while fetching features",i)}}_groupFeaturesBySectors(){const{_suitabilities:e,additionalFeatures:t,features:i,invalidCameraHeading:a}=this,r=i.at(0);if(!e||!t||!r||!i||a)return void(this._sectorData=null);this._sectorData={};const o={};this._featureToSector=o;for(const h of _e)this._sectorData[h]=new s;const n=e.map((e,t)=>({...e,featureIndex:t}));n.sort((e,t)=>e.trueSuitability-t.trueSuitability);const l=n.map(({distance:e})=>e),c=Math.max(...l);n.forEach(e=>{const{distance:t,angle:a,featureIndex:s}=e,n=t/c*Me[2],l=We(t,c),h=Je(a);if(!this._sectorData)return;const d=Me[3]+n*Math.sin(a*Math.PI/180),u=Me[3]+n*Math.cos(a*Math.PI/180);let p;const m=i.at(s),g=m===r,{cameraPitch:y}=m.attributes,v=y<5;if(g&&v)p=-90;else{const e=d-Me[3],t=u-Me[3],i=t/Math.sqrt(e**2+t**2);let a=180*Math.acos(i)/Math.PI;(e<0&&t<0||e<0&&t>0)&&(a*=-1),p=a}const f=""===l?h:`${l}_${h}`;g&&(p===this.bestFeatureAngle?this.previousFeatureAngle=p:this.bestFeatureAngle=p,this.navigatorCurrentBestFeature=v?null:{x:d,y:u,direction:h}),o[`${m.attributes.objectId}`]=f;const w=this._sectorData[f];w.add({angle:a,featureIndex:s,x:d,y:u,objectID:m.attributes.objectId,sector:f,featureIndexInSector:w.length})})}async _initializeLocationViewModel(e){if(!this._locationViewModel){const t=import("./components/ImageLocationViewModel.js"),{default:i}=await t;v(e),this._locationViewModel=new i({oiViewModel:this,referenceTransformationService:this._referenceTransformationService})}}_initializeMeasurementService(){this._measurementService||(this._measurementService=new at({transformationService:this._transformationService,referenceTransformationService:this._referenceTransformationService}))}_initializeVideo(){if(this.videoElement||!this.currentBestFeature)return;this.removeHandles(Ee.videoPlayerHandles),this.videoElement=new le({video:this.currentBestFeature.attributes.imagePath,georeference:new oe({extent:new L(fe)}),autoplay:!1}),this.videoElement.content?.loop&&(this.videoElement.content.loop=!1);const e=new D({source:this.videoElement,title:this.layer?.title,copyright:this.layer?.copyright});this.videoLayer=e,e&&this.videoMapView.map.layers.add(e),this.videoViewModel=new et({oiViewModel:this})}async getMapPoint(e,t){const i=await this._transformationService.pixelToMapPoint(Array.isArray(e)?e:[e],t);return Array.isArray(e)?i:i[0]}async getMapPointForFeature(e,t,i){const a=await this._transformationService.pixelToMapPointForFeature(Array.isArray(e)?e:[e],t,i);return Array.isArray(e)?a:a[0]}async loadPanoramicMediaSource(e,t){const{lookAt:i,...a}=e,r=Ne(a);try{await r.load(t)}catch(o){if(y(o))return;if("unsupported-format"===o.name)return void this.setMessage("unsupportedPanoramicImageryError","error",void 0,{datasetFormat:r?.extension??"UNKNOWN FORMAT"})}const s=this.triangularMeasurementActive?this._panoramicMeasurementViewer:this._panoramicViewer;await s.loadMedia(r,t),i&&s.set(i)}async loadMediaSource(e,t){const i=Ue(e);await this._setImageSource(this.triangularMeasurementActive?this.imageMeasurementViewer:this._imageViewer,i,t)}_clearFeatureGeometries(){this.coveragePolygons.removeAll(),this.coverageFrustums.removeAll(),this.pointSources.removeAll()}_checkFeatures(e){return!!e?.length||(this.setMessage("noImageError","error"),this.videoElement?.content?.pause(),this.currentBestFeature=null,!1)}async _getElevationSampleFromGround(e,t,i){if(!e[0])return;const a=(await import("../../geometry/operators/unionOperator.js")).executeMany(e);if(this._updateFootprintWithFeatures(t,a),"3d"===this.view?.type)try{return await this.view.map.ground.createElevationSampler(this.footprintExtent,i)}catch(r){y(r)||d.getLogger(this).error(r)}}async processElevationSample(e,t,i){const{elevationSource:a}=t[0].attributes,r=await this._getElevationSampleFromGround(e,t,i);return r||(a&&this.footprintExtent&&Z(a)?await Y({extent:this.footprintExtent,lod:a.lod,url:a.url,rasterFunction:a.rasterFunction}):void 0)}_processSuitableFeatures(e,t){return U({features:e,selectedPoint:t,camera:qe(this.view)?this.view.camera:null,currentImage:this.currentBestFeature})}async _processHitTestResults(e,t,i){const{results:[a]}=t;if("graphic"!==a?.type)return void this.setMessage("noImageError","error");const r=a.graphic.getAttribute(e.objectIdField);return await this.showImageByObjectId(r,i)}async _queryAndLoadByObjectId(e,t,i,a,r){this.displayMessage=null;const{response:s}=await it(e,t,i,a,r);if(v(r),!s?.features?.length)throw new tt(t);const o=q(s.features[0].attributes).polygon,n=j.fromJSON(E(o)),l=Q(n),c=S(l.spatialReference);this.selectedPoint=l;const h={layerInstanceOrURL:e,point:l,queryParams:{where:P(P("1=1",P(e.definitionExpression,i)),`${e.objectIdField} <> ${t}`),maximumDistance:e.maximumDistance?e.maximumDistance/c:void 0,timeExtent:a}},d=await z(h,r);v(r);const{features:u}=d;return u.push(s.features[0]),await this.processFeatureResponse(d,l,{...r,loadBestImage:!1})}_reorderTriangularSketchLayer(){const e=this.imageMeasurementViewer.imageRenderer.map.layers?.length;this.sketchTriangularGraphicsLayer&&e&&this.imageMeasurementViewer.imageRenderer.map.layers.reorder(this.sketchTriangularGraphicsLayer,e-1)}async _setImageSource(e,t,i){e.media=t,await e.loadMedia(t,i)}_toggleVisiblity(e,t){e.forEach(e=>{e.visible=t})}async _updateElevationOfSelectedPointAndLocations(e,t,i,a){const{location:r,cameraHeight:s}=e[0].attributes,o=await ae(r.spatialReference,r.z,s,{elevationSample:i,elevationSource:i?void 0:e[0].attributes.elevationSource,extent:this.footprintExtent},a);v(a);const[n,...l]=await X([t,...e.map(e=>e.attributes.geometry.clone())],o);v(a),t.elevation=n.z,e.forEach((e,t)=>{e.attributes.elevation=l[t].z})}_updateFeatures(e,t=!0){if(!e.length)return this.currentBestFeature=null,void this.additionalFeatures.removeAll();this.features.removeAll(),this.features.addMany(e),this.navigationNodes.removeAll(),this.navigationNodes.addMany(e.map(e=>{const{geometry:t,attributes:i}=e,{isSpherical:a,cameraHeading:r,cameraPitch:s}=i;return new Ye({geometry:t,attributes:i,currentHeading:a?0:r,currentPitch:a?0:s})})),e.length>1?this.additionalFeatures.addMany(e.slice(1)):this.additionalFeatures.removeAll(),this._updateGroundElevation=!0,t&&(this.currentBestFeature=e[0]),"video"===this.mode&&(this._initializeVideo(),this.videoElement?.loaded&&this.videoViewModel?.playVideoFromSelectedLocation(e[0])),"panoramic-video"===this.mode&&this._loadVideo()}_updateFootprintWithFeatures(e,t){const i=[];for(const{attributes:{geometry:a}}of e)t.contains(a)||i.push([a.x,a.y]);i.sort((e,t)=>+x([e,t])),t.addRing(i),this.footprintExtent=de(t.extent,2,2)}async _updatePointsAndPolygons(e){const{pointSources:i,currentBestFeature:a,currentCoverageVisible:r,isAdditionalPointSourcesVisible:s,mode:o,layer:n}=this;if(a&&(this.additionalFootprints.removeAll(),this.additionalCameraLocations.removeAll(),this.bestFeatureCurrentFootprint&&(this.bestFeatureCurrentFootprint.destroy(),this.bestFeatureCurrentFootprint=null,this.bestFeatureFootprint=null),!this.invalidCameraHeading)){await(this._adapter?.createFootprints(e)),v(e);for(const o of i){const i=this.view&&!this.view.spatialReference?.equals(o.spatialReference)?await G(o.clone(),this.view?.spatialReference,e):o.clone();o.imageID===a.attributes.objectId?this.currentBestFeatureLocation=new t({attributes:{imageID:o.imageID},geometry:i,symbol:Ge,visible:r}):this.additionalCameraLocations.push(new t({attributes:{imageID:o.imageID},geometry:i,symbol:Oe,visible:s}))}"video"!==o&&"panoramic-video"!==o||(await this.initializeTransformationService(e),n&&!this.featureCache.length&&await this.updateFeatureCache(n,a.geometry.spatialReference))}}_updateCurrentBestFeature(e){if(!e)return;if(this.currentBestFeature=this.features?.at(e.featureIndex),"video"===this.mode)return void(this.currentBestFeature&&this.videoViewModel?.playVideoFromSelectedLocation(this.currentBestFeature));if("panoramic-video"===this.mode)return void(this.currentBestFeature&&this._panoramicVideoViewer.viewModel.playPanoramicVideoFromSelectedLocation(this.currentBestFeature));const t=this.currentBestFeature?.attributes.cameraPitch&&this.currentBestFeature?.attributes.cameraPitch<5;let i;if(t)i=-90;else{const t=e.x-Me[3],a=e.y-Me[3],r=a/Math.sqrt(t**2+a**2);let s=180*Math.acos(r)/Math.PI;(t<0&&a<0||t<0&&a>0)&&(s*=-1),i=s}i===this.bestFeatureAngle?this.previousFeatureAngle=i:this.bestFeatureAngle=i,this.navigatorCurrentBestFeature=t?null:{x:e.x,y:e.y,direction:e.sector.includes("_")?e.sector.split("_")[1]:e.sector}}_updateImageMeasurementBestFeature(e){e&&(this.currentBestFeatureMeasurementImage=this.features?.at(e.featureIndex))}clearGraphics(){this._imageViewer.clearGraphics(),this._panoramicViewer.clearGraphics(),this.imageMeasurementViewer.clearGraphics(),this._panoramicMeasurementViewer.clearGraphics()}clearReferencePointOnImage(){this._referencePointOnImage&&(this._imageViewer.removeGraphic(this._referencePointOnImage),this._panoramicViewer.removeGraphic(this._referencePointOnImage),this._referencePointOnImage=p(this._referencePointOnImage))}async initializeReferenceTransformationService(e){const{currentBestFeatureMeasurementImage:t,activeTriangulatedViewer:i,mode:a}=this;if(!t||!i||!i.imageSize||"panoramic"!==a&&"default"!==a)return;const{imageSize:r}=i,{attributes:s,elevationSample:o}=t,{location:{spatialReference:n,z:l},cameraHeight:c,elevationSource:h}=s;let d=s.location;d.spatialReference.isGeographic&&(d=Q(d));const u="default"===a?re(s,r[0],r[1]):se(s,r[0],r[1]),p=await ae(n,l??0,c,{elevationSample:o,elevationSource:h,extent:this.footprintExtent},e),m=(await import("./services/TransformationService.js")).default,g={imageToWorldProperties:u,updateElevationProps:p,mode:a,imageSize:r,depthImageService:this.depthImage};this._referenceTransformationService=new m(g),this._locationViewModel&&(this._locationViewModel.referenceTransformationService=this._referenceTransformationService),this._measurementService&&(this._measurementService.referenceTransformationService=this._referenceTransformationService)}async initializeTransformationService(e){const{currentBestFeature:t,activeViewer:i,mode:a}=this,r="video"===a||"panoramic-video"===a?be:i?.imageSize;if(!t||!r||"none"===a)return;const{attributes:s,elevationSample:o}=t,{location:{spatialReference:n,z:l},cameraHeight:c,elevationSource:h}=s;let d=s.location;d.spatialReference.isGeographic&&(d=Q(d));const u="default"===a||"video"===a?"default":"panoramic",p={..."default"===u?re(s,r[0],r[1]):se(s,r[0],r[1]),cameraLocation:d},m=await ae(n,l??0,c,{elevationSample:o,elevationSource:h,extent:this.footprintExtent},e),g=(await import("./services/TransformationService.js")).default,y={imageToWorldProperties:p,updateElevationProps:m,mode:u,imageSize:r,depthImageService:this.depthImage};this._transformationService=new g(y),this._measurementService&&(this._measurementService.transformationService=this._transformationService)}plotReferencePoint(e){"mapPoint"in e?this.plotReferencePointOnGround(e.mapPoint):this.plotReferencePointOnGround(e)}setMessage(e,t,i,a){this.displayMessage={key:e,type:t,data:i,map:a}}async transformAndPlotSelectedLocation(e){const{currentBestFeature:t,invalidCameraHeading:i,selectedPoint:a,activeViewer:r}=this;if(this._crossSymbol&&(this._panoramicViewer.removeGraphic(this._crossSymbol),this._imageViewer.removeGraphic(this._crossSymbol),this._crossSymbol=p(this._crossSymbol)),!a||!t||"image-loaded"!==r?.state||i)return;let s;try{s=await this._transformationService.pointToPixel(a,{signal:e?.signal}),v(e),await this.plotSelectedPointOnImage(s,e)}catch(o){y(o)||d.getLogger(this).error("failed to transform map point to pixel, cross symbol will not be plotted on image",{error:o,selectedPoint:a,feature:t})}}updateCurrentCoveragePolygon(e){const{additionalFootprints:i,additionalCameraLocations:a,currentBestFeature:r,currentBestFeatureLocation:s,currentCoverageVisible:o,selectedPoint:n,view:l,_adapter:c,mode:h}=this;if(!r)return;const{attributes:{objectId:d},elevationSample:u}=r;if(this._initialCurrentCoverageUpdate){if(this._overlays?.removeAll(),this._initialCurrentCoverageUpdate=!1,this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint),e&&!this.invalidCameraHeading&&(e.visible=o,this.bestFeatureCurrentFootprint=e),l){const e=[...i,...a,s].filter($e);"3d"===l?.type&&u&&c?.updateGroundElevation&&(this._updateGroundElevation&&c.updateGroundElevation(e),"panoramic"===h&&c.updateGroundElevation([this.bestFeatureCurrentFootprint])),this._updateGroundElevation=!1,n&&(e.splice(-2,0,this.bestFeatureCurrentFootprint),e.push(new t({geometry:n.clone(),symbol:Ve.clone(),attributes:{imageID:d}}))),this._overlays.graphics.addMany(e)}}else if(l){if(this.invalidCameraHeading)return;this.bestFeatureCurrentFootprint&&(this._overlays?.remove(this.bestFeatureCurrentFootprint),this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint));const t=this.bestFeatureCurrentFootprint&&this._overlays?this._overlays.graphics.indexOf(this.bestFeatureCurrentFootprint):-1;e&&(this.bestFeatureCurrentFootprint=e,"3d"===l?.type&&u&&c?.updateGroundElevation&&"panoramic"===h&&c.updateGroundElevation([e]),e.visible=this.currentCoverageVisible,this._overlays?.graphics.add(this.bestFeatureCurrentFootprint,t>=0?t:this._overlays.graphics.length-1))}}};e([A()],ut.prototype,"activeLayer",null),e([A({readOnly:!0})],ut.prototype,"activeViewer",null),e([A()],ut.prototype,"activeTriangulatedViewer",null),e([A()],ut.prototype,"accuracyParametersMissing",null),e([A()],ut.prototype,"additionalFeatures",void 0),e([A({type:s.ofType(t)})],ut.prototype,"additionalCameraLocations",void 0),e([A({type:s.ofType(t)})],ut.prototype,"additionalFootprints",void 0),e([A()],ut.prototype,"areaMeasurementResult",void 0),e([A()],ut.prototype,"areaMeasurementAccuracy",void 0),e([A()],ut.prototype,"bestFeatureAngle",void 0),e([A()],ut.prototype,"bestFeatureCurrentFootprint",void 0),e([A({type:t})],ut.prototype,"bestFeatureFootprint",void 0),e([A({type:Number})],ut.prototype,"brightness",null),e([A()],ut.prototype,"cameraHeadingThreshold",void 0),e([A()],ut.prototype,"cameraPitchThreshold",void 0),e([A()],ut.prototype,"clickAction",void 0),e([A()],ut.prototype,"correctedLocationPointOnImage",void 0),e([A()],ut.prototype,"videoViewModel",void 0),e([A()],ut.prototype,"collectionId",void 0),e([A({type:Number})],ut.prototype,"contrast",null),e([A()],ut.prototype,"coverageFrustums",void 0),e([A()],ut.prototype,"coveragePolygons",void 0),e([A()],ut.prototype,"currentBestFeature",void 0),e([A()],ut.prototype,"currentBestFeatureMeasurementImage",void 0),e([A()],ut.prototype,"currentBestFeatureLocation",void 0),e([A()],ut.prototype,"currentCoverageVisible",void 0),e([A()],ut.prototype,"currentNode",null),e([A()],ut.prototype,"depthImage",void 0),e([A()],ut.prototype,"depthImageNotSupported",null),e([A()],ut.prototype,"featureCache",void 0),e([A()],ut.prototype,"navigationNodes",void 0),e([A({json:{write:!1}})],ut.prototype,"determineWorkflowForFeature",void 0),e([A({json:{write:!1}})],ut.prototype,"determineWorkflowForTriangularMeasurement",void 0),e([A()],ut.prototype,"disabled",void 0),e([A()],ut.prototype,"displayMessage",void 0),e([A()],ut.prototype,"displayNewMeasurementButton",void 0),e([A()],ut.prototype,"distanceMeasurementResult",void 0),e([A()],ut.prototype,"distanceAccuracyArray",void 0),e([A()],ut.prototype,"dataCaptureLayer",void 0),e([A({readOnly:!0})],ut.prototype,"featureCount",null),e([A()],ut.prototype,"features",void 0),e([A()],ut.prototype,"groundCoordinates",void 0),e([A()],ut.prototype,"groundCoordinatesAccuracy",void 0),e([A()],ut.prototype,"heightGraphic",void 0),e([A()],ut.prototype,"heightMeasurementResult",void 0),e([A()],ut.prototype,"heightMeasurementAccuracy",void 0),e([A({readOnly:!0})],ut.prototype,"imageGalleryEnabled",null),e([A()],ut.prototype,"imageGeometryField",void 0),e([A({readOnly:!0})],ut.prototype,"imageLoaded",null),e([A()],ut.prototype,"imageLocationToolState",void 0),e([A()],ut.prototype,"initialVideoMapViewExtent",void 0),e([A({readOnly:!0})],ut.prototype,"invalidCameraHeading",null),e([A()],ut.prototype,"imagePointsInView",null),e([A()],ut.prototype,"imageMeasurementViewer",void 0),e([A()],ut.prototype,"isAdditionalCoverageVisible",void 0),e([A()],ut.prototype,"isAdditionalPointSourcesVisible",void 0),e([A()],ut.prototype,"layer",void 0),e([A()],ut.prototype,"layerView",null),e([A({readOnly:!0})],ut.prototype,"layerFloorFilterClause",null),e([A({readOnly:!0})],ut.prototype,"layerTimeExtent",null),e([A({type:Number})],ut.prototype,"localPort",void 0),e([A()],ut.prototype,"locationPointOnImage",void 0),e([A()],ut.prototype,"mapImageConversionToolState",void 0),e([A()],ut.prototype,"measureType",void 0),e([A()],ut.prototype,"measurementGraphic",void 0),e([A({readOnly:!0,value:"none"})],ut.prototype,"mode",null),e([A()],ut.prototype,"navigationMode",void 0),e([A()],ut.prototype,"navigatorCurrentBestFeature",void 0),e([A()],ut.prototype,"oiObjectIdField",void 0),e([A({type:s.ofType(t)})],ut.prototype,"overlayedCameraLocations",void 0),e([A()],ut.prototype,"overlayedMapFeatures",void 0),e([A()],ut.prototype,"panoramicVideoLoaded",null),e([A()],ut.prototype,"pixelCoordinates",void 0),e([A()],ut.prototype,"preserveAngle",void 0),e([A()],ut.prototype,"pointSources",void 0),e([A({readOnly:!0})],ut.prototype,"popupEnabled",null),e([A()],ut.prototype,"preloadMedia",void 0),e([A()],ut.prototype,"preloadMediaSize",void 0),e([A()],ut.prototype,"previousFeatureAngle",void 0),e([A()],ut.prototype,"referencePoint",null),e([A({readOnly:!0})],ut.prototype,"sectorData",null),e([A()],ut.prototype,"selectedPoint",void 0),e([A({type:Number})],ut.prototype,"sharpness",null),e([A()],ut.prototype,"shouldShowSelectedImage",void 0),e([A()],ut.prototype,"sketch",void 0),e([A()],ut.prototype,"sketchTriangular",void 0),e([A()],ut.prototype,"sketchTriangularGraphicsLayer",void 0),e([A()],ut.prototype,"draw",void 0),e([A()],ut.prototype,"drawAdapter",void 0),e([A()],ut.prototype,"polylineDrawAction",void 0),e([A()],ut.prototype,"scheduledFrameId",void 0),e([A()],ut.prototype,"sketchAdapter",void 0),e([A({readOnly:!0})],ut.prototype,"sketchGraphicsLayer",null),e([A({readOnly:!0})],ut.prototype,"state",null),e([A({readOnly:!0})],ut.prototype,"thumbnails",null),e([A()],ut.prototype,"videoExtentPoints",null),e([A()],ut.prototype,"triangularMeasurementActive",void 0),e([A()],ut.prototype,"triangulatedDistanceMeasurement",void 0),e([A()],ut.prototype,"triangulatedDistanceAccuracy",void 0),e([A()],ut.prototype,"triangulatedAreaMeasurement",void 0),e([A()],ut.prototype,"triangulatedAreaAccuracy",void 0),e([A()],ut.prototype,"triangulatedMeasurementGraphic",void 0),e([A()],ut.prototype,"triangulatedPoint",void 0),e([A()],ut.prototype,"triangulatedMeasurementAdapter",void 0),e([A()],ut.prototype,"updateFootprint",void 0),e([A()],ut.prototype,"updateVideoFootprint",void 0),e([A()],ut.prototype,"updateFootprintPanorama",void 0),e([A()],ut.prototype,"updatingTriangularMeasurementState",void 0),e([A({value:null})],ut.prototype,"view",null),e([A()],ut.prototype,"videoElement",void 0),e([A()],ut.prototype,"videoLayer",void 0),e([A()],ut.prototype,"videoMapView",void 0),e([A()],ut.prototype,"verticalFilterEnabled",void 0),e([A()],ut.prototype,"_adapter",void 0),e([A()],ut.prototype,"_defaultGraphicsLayer",null),e([A()],ut.prototype,"_highlightedFeatureHandle",void 0),e([A()],ut.prototype,"_imageViewer",void 0),e([A()],ut.prototype,"_initialCurrentCoverageUpdate",void 0),e([A()],ut.prototype,"_locationViewModel",void 0),e([A()],ut.prototype,"_measurementService",void 0),e([A()],ut.prototype,"_mediaPrefetcher",void 0),e([A()],ut.prototype,"_navigationManager",void 0),e([A()],ut.prototype,"_overlays",void 0),e([A({readOnly:!0})],ut.prototype,"_overlaysView",null),e([A()],ut.prototype,"_panoramicVideoViewer",void 0),e([A()],ut.prototype,"_panoramicViewer",void 0),e([A()],ut.prototype,"_panoramicMeasurementViewer",void 0),e([A()],ut.prototype,"_referencePointOnGround",void 0),e([A()],ut.prototype,"_referencePointOnImage",void 0),e([A()],ut.prototype,"_referenceTransformationService",void 0),e([A()],ut.prototype,"_sectorData",void 0),e([A()],ut.prototype,"_transformationService",void 0),e([A()],ut.prototype,"_featureToSector",void 0),e([A({readOnly:!0})],ut.prototype,"_updatingHandles",void 0),e([A()],ut.prototype,"footprintExtent",void 0),e([A()],ut.prototype,"_featureChangedTask",void 0),ut=e([C("esri.widgets.OrientedImageryViewer.OrientedImageryViewerViewModel")],ut);const pt=ut;export{pt as default};
@@ -6,7 +6,7 @@ import type { Icon } from "@esri/calcite-components/components/calcite-icon";
6
6
  import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
7
7
  import type { WidgetProperties } from "./Widget.js";
8
8
 
9
- export interface OrientedImageryViewerProperties extends WidgetProperties, Partial<Pick<OrientedImageryViewer, "currentCoverageVisible" | "dataCaptureEnabled" | "disabled" | "galleryOpened" | "imageEnhancementToolActive" | "imageOverlaysOpened" | "isAdditionalCoverageVisible" | "isAdditionalPointSourcesVisible" | "layer" | "mapImageConversionToolState" | "navigationToolActive" | "view">> {
9
+ export interface OrientedImageryViewerProperties extends WidgetProperties, Partial<Pick<OrientedImageryViewer, "currentCoverageVisible" | "dataCaptureEnabled" | "disabled" | "galleryOpened" | "imageEnhancementToolActive" | "imageOverlaysOpened" | "isAdditionalCoverageVisible" | "isAdditionalPointSourcesVisible" | "layer" | "mapImageConversionToolState" | "navigationToolActive" | "preloadMedia" | "view">> {
10
10
  /**
11
11
  * Icon displayed in the widget's button.
12
12
  *
@@ -141,6 +141,14 @@ export default class OrientedImageryViewer extends Widget {
141
141
  * @default false
142
142
  */
143
143
  accessor navigationToolActive: boolean;
144
+ /**
145
+ * When true, loading an image via directional or sequential navigation caches all neighboring images associated with that image.
146
+ * Navigating to adjacent images then uses the cached assets, reducing load times and improving viewer performance.
147
+ *
148
+ * @default false
149
+ * @since 5.0
150
+ */
151
+ accessor preloadMedia: boolean;
144
152
  /**
145
153
  * This property provides the location of an image pixel in Map coordinates when using map-image conversion tool.
146
154
  *