@arcgis/core 4.25.0-next.20220920 → 4.25.0-next.20220921

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 (460) hide show
  1. package/AggregateGraphic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{9f31ab2247c9defb882c.js → 01ac91fc0bc6b4d4e3c6.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{8588cbecb8e808f451fe.js → 249e32af1f2d433fae4c.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{5b16b30ac3166f33e81e.js → 26690f4ec1f3cb8099c2.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{be93b0cef85665446944.js → 274b4cdf6c8d77e8a2e6.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{d5650f455ce5ba15ad10.js → 2cae0ec5f60ab42a49aa.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{f436c86f86236ea7ea04.js → 4641e10e0e8e9d257521.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{7a45333de9ded92619c2.js → 466008f793c2e11e854c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{c9d655675552dcf6cef7.js → 4a699b41072ee88f0956.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{14ea96e398f4842abe4e.js → 4fdd18f5cdaa0d82ebc1.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{9662da3e1e37f3445186.js → 562b9619b8ee13734813.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{8bab21bc6164a593278f.js → 771b92e524802de840ba.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{4969b64dc17378d7781f.js → 7ce250cc6fbe68aef50d.js} +3 -3
  15. package/assets/esri/core/workers/chunks/{2c4938512dd726a177dd.js → 7fab18074b130b71a648.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{f67357b3c6c591c9da5e.js → 872f1cb3596fb80e387f.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{31de71018575457155e5.js → 8ee3da8677255b8c8709.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{2e44aee22e70857b893c.js → 93631b10452b0e0189b3.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{cb2dc84d972469445da6.js → 95cd9edca50ea163d50f.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{d31bbb13af45ce8e45dc.js → acf9f753741b677afb44.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{1455944edeba1560eb07.js → afdafa77f5ca1b9e3acc.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{cf3e1ac63580bc495ea6.js → b4da35f1093f3731f9ac.js} +1 -1
  23. package/assets/esri/core/workers/chunks/bb0d86937faf0cd7d16d.js +1 -0
  24. package/assets/esri/core/workers/chunks/bf3e80023e156d5906c7.js +1 -0
  25. package/assets/esri/core/workers/chunks/{8ba83fee56dd4f306d87.js → c2a6ac7046134f725cf3.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{5d3fabe66e1bce1b30fb.js → cc7569489b572b8b3b53.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{fddd4ea487788e003fb1.js → d09f06eb4157a7c2c8ab.js} +1 -1
  28. package/assets/esri/core/workers/chunks/e064035f959d68e9603f.js +1 -0
  29. package/assets/esri/core/workers/chunks/{d92975e56a1290255252.js → e09df62cf35d636b0975.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{674fa5b93704ef08c9e8.js → e0c763e05feb1c2093ba.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{51289d2f5277af4023e9.js → ed33e019bc7775db2e50.js} +1 -1
  32. package/assets/esri/core/workers/chunks/ef95d6ab7b1c032ab4ad.js +1 -0
  33. package/assets/esri/core/workers/chunks/{169f4354a375db5de121.js → ffcbcb928b6cb8c596ad.js} +1 -1
  34. package/assets/esri/t9n/common_ar.json +1 -1
  35. package/assets/esri/t9n/common_bg.json +1 -1
  36. package/assets/esri/t9n/common_bs.json +1 -1
  37. package/assets/esri/t9n/common_ca.json +1 -1
  38. package/assets/esri/t9n/common_cs.json +1 -1
  39. package/assets/esri/t9n/common_da.json +1 -1
  40. package/assets/esri/t9n/common_de.json +1 -1
  41. package/assets/esri/t9n/common_el.json +1 -1
  42. package/assets/esri/t9n/common_es.json +1 -1
  43. package/assets/esri/t9n/common_et.json +1 -1
  44. package/assets/esri/t9n/common_fi.json +1 -1
  45. package/assets/esri/t9n/common_fr.json +1 -1
  46. package/assets/esri/t9n/common_he.json +1 -1
  47. package/assets/esri/t9n/common_hr.json +1 -1
  48. package/assets/esri/t9n/common_hu.json +1 -1
  49. package/assets/esri/t9n/common_id.json +1 -1
  50. package/assets/esri/t9n/common_it.json +1 -1
  51. package/assets/esri/t9n/common_ja.json +1 -1
  52. package/assets/esri/t9n/common_ko.json +1 -1
  53. package/assets/esri/t9n/common_lt.json +1 -1
  54. package/assets/esri/t9n/common_lv.json +1 -1
  55. package/assets/esri/t9n/common_nb.json +1 -1
  56. package/assets/esri/t9n/common_nl.json +1 -1
  57. package/assets/esri/t9n/common_pl.json +1 -1
  58. package/assets/esri/t9n/common_pt-BR.json +1 -1
  59. package/assets/esri/t9n/common_pt-PT.json +1 -1
  60. package/assets/esri/t9n/common_ro.json +1 -1
  61. package/assets/esri/t9n/common_ru.json +1 -1
  62. package/assets/esri/t9n/common_sk.json +1 -1
  63. package/assets/esri/t9n/common_sl.json +1 -1
  64. package/assets/esri/t9n/common_sr.json +1 -1
  65. package/assets/esri/t9n/common_sv.json +1 -1
  66. package/assets/esri/t9n/common_th.json +1 -1
  67. package/assets/esri/t9n/common_tr.json +1 -1
  68. package/assets/esri/t9n/common_uk.json +1 -1
  69. package/assets/esri/t9n/common_vi.json +1 -1
  70. package/assets/esri/t9n/common_zh-CN.json +1 -1
  71. package/assets/esri/t9n/common_zh-HK.json +1 -1
  72. package/assets/esri/t9n/common_zh-TW.json +1 -1
  73. package/assets/esri/widgets/Feature/t9n/Feature_ar.json +1 -1
  74. package/assets/esri/widgets/Feature/t9n/Feature_bg.json +1 -1
  75. package/assets/esri/widgets/Feature/t9n/Feature_bs.json +1 -1
  76. package/assets/esri/widgets/Feature/t9n/Feature_ca.json +1 -1
  77. package/assets/esri/widgets/Feature/t9n/Feature_cs.json +1 -1
  78. package/assets/esri/widgets/Feature/t9n/Feature_da.json +1 -1
  79. package/assets/esri/widgets/Feature/t9n/Feature_de.json +1 -1
  80. package/assets/esri/widgets/Feature/t9n/Feature_el.json +1 -1
  81. package/assets/esri/widgets/Feature/t9n/Feature_es.json +1 -1
  82. package/assets/esri/widgets/Feature/t9n/Feature_et.json +1 -1
  83. package/assets/esri/widgets/Feature/t9n/Feature_fi.json +1 -1
  84. package/assets/esri/widgets/Feature/t9n/Feature_fr.json +1 -1
  85. package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
  86. package/assets/esri/widgets/Feature/t9n/Feature_hr.json +1 -1
  87. package/assets/esri/widgets/Feature/t9n/Feature_hu.json +1 -1
  88. package/assets/esri/widgets/Feature/t9n/Feature_id.json +1 -1
  89. package/assets/esri/widgets/Feature/t9n/Feature_it.json +1 -1
  90. package/assets/esri/widgets/Feature/t9n/Feature_ja.json +1 -1
  91. package/assets/esri/widgets/Feature/t9n/Feature_ko.json +1 -1
  92. package/assets/esri/widgets/Feature/t9n/Feature_lt.json +1 -1
  93. package/assets/esri/widgets/Feature/t9n/Feature_lv.json +1 -1
  94. package/assets/esri/widgets/Feature/t9n/Feature_nb.json +1 -1
  95. package/assets/esri/widgets/Feature/t9n/Feature_nl.json +1 -1
  96. package/assets/esri/widgets/Feature/t9n/Feature_pl.json +1 -1
  97. package/assets/esri/widgets/Feature/t9n/Feature_pt-BR.json +1 -1
  98. package/assets/esri/widgets/Feature/t9n/Feature_pt-PT.json +1 -1
  99. package/assets/esri/widgets/Feature/t9n/Feature_ro.json +1 -1
  100. package/assets/esri/widgets/Feature/t9n/Feature_ru.json +1 -1
  101. package/assets/esri/widgets/Feature/t9n/Feature_sk.json +1 -1
  102. package/assets/esri/widgets/Feature/t9n/Feature_sl.json +1 -1
  103. package/assets/esri/widgets/Feature/t9n/Feature_sr.json +1 -1
  104. package/assets/esri/widgets/Feature/t9n/Feature_sv.json +1 -1
  105. package/assets/esri/widgets/Feature/t9n/Feature_th.json +1 -1
  106. package/assets/esri/widgets/Feature/t9n/Feature_tr.json +1 -1
  107. package/assets/esri/widgets/Feature/t9n/Feature_uk.json +1 -1
  108. package/assets/esri/widgets/Feature/t9n/Feature_vi.json +1 -1
  109. package/assets/esri/widgets/Feature/t9n/Feature_zh-CN.json +1 -1
  110. package/assets/esri/widgets/Feature/t9n/Feature_zh-HK.json +1 -1
  111. package/assets/esri/widgets/Feature/t9n/Feature_zh-TW.json +1 -1
  112. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  113. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  114. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  115. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  116. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  117. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  118. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  119. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  120. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  121. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  122. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  123. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  124. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  125. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  126. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  127. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  128. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  129. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  130. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  131. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  132. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  133. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nb.json +1 -1
  134. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  135. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  136. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  137. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  138. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  139. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  140. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  141. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  142. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  143. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  144. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  145. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  146. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  147. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  148. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  149. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  150. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  151. package/assets/esri/widgets/Popup/t9n/Popup_ar.json +1 -1
  152. package/assets/esri/widgets/Popup/t9n/Popup_bg.json +1 -1
  153. package/assets/esri/widgets/Popup/t9n/Popup_bs.json +1 -1
  154. package/assets/esri/widgets/Popup/t9n/Popup_ca.json +1 -1
  155. package/assets/esri/widgets/Popup/t9n/Popup_cs.json +1 -1
  156. package/assets/esri/widgets/Popup/t9n/Popup_da.json +1 -1
  157. package/assets/esri/widgets/Popup/t9n/Popup_de.json +1 -1
  158. package/assets/esri/widgets/Popup/t9n/Popup_el.json +1 -1
  159. package/assets/esri/widgets/Popup/t9n/Popup_es.json +1 -1
  160. package/assets/esri/widgets/Popup/t9n/Popup_et.json +1 -1
  161. package/assets/esri/widgets/Popup/t9n/Popup_fi.json +1 -1
  162. package/assets/esri/widgets/Popup/t9n/Popup_fr.json +1 -1
  163. package/assets/esri/widgets/Popup/t9n/Popup_he.json +1 -1
  164. package/assets/esri/widgets/Popup/t9n/Popup_hr.json +1 -1
  165. package/assets/esri/widgets/Popup/t9n/Popup_hu.json +1 -1
  166. package/assets/esri/widgets/Popup/t9n/Popup_id.json +1 -1
  167. package/assets/esri/widgets/Popup/t9n/Popup_it.json +1 -1
  168. package/assets/esri/widgets/Popup/t9n/Popup_ja.json +1 -1
  169. package/assets/esri/widgets/Popup/t9n/Popup_ko.json +1 -1
  170. package/assets/esri/widgets/Popup/t9n/Popup_lt.json +1 -1
  171. package/assets/esri/widgets/Popup/t9n/Popup_lv.json +1 -1
  172. package/assets/esri/widgets/Popup/t9n/Popup_nb.json +1 -1
  173. package/assets/esri/widgets/Popup/t9n/Popup_nl.json +1 -1
  174. package/assets/esri/widgets/Popup/t9n/Popup_pl.json +1 -1
  175. package/assets/esri/widgets/Popup/t9n/Popup_pt-BR.json +1 -1
  176. package/assets/esri/widgets/Popup/t9n/Popup_pt-PT.json +1 -1
  177. package/assets/esri/widgets/Popup/t9n/Popup_ro.json +1 -1
  178. package/assets/esri/widgets/Popup/t9n/Popup_ru.json +1 -1
  179. package/assets/esri/widgets/Popup/t9n/Popup_sk.json +1 -1
  180. package/assets/esri/widgets/Popup/t9n/Popup_sl.json +1 -1
  181. package/assets/esri/widgets/Popup/t9n/Popup_sr.json +1 -1
  182. package/assets/esri/widgets/Popup/t9n/Popup_sv.json +1 -1
  183. package/assets/esri/widgets/Popup/t9n/Popup_th.json +1 -1
  184. package/assets/esri/widgets/Popup/t9n/Popup_tr.json +1 -1
  185. package/assets/esri/widgets/Popup/t9n/Popup_uk.json +1 -1
  186. package/assets/esri/widgets/Popup/t9n/Popup_vi.json +1 -1
  187. package/assets/esri/widgets/Popup/t9n/Popup_zh-CN.json +1 -1
  188. package/assets/esri/widgets/Popup/t9n/Popup_zh-HK.json +1 -1
  189. package/assets/esri/widgets/Popup/t9n/Popup_zh-TW.json +1 -1
  190. package/assets/esri/widgets/support/t9n/DatePicker_ar.json +1 -1
  191. package/assets/esri/widgets/support/t9n/DatePicker_bg.json +1 -1
  192. package/assets/esri/widgets/support/t9n/DatePicker_bs.json +1 -1
  193. package/assets/esri/widgets/support/t9n/DatePicker_ca.json +1 -1
  194. package/assets/esri/widgets/support/t9n/DatePicker_cs.json +1 -1
  195. package/assets/esri/widgets/support/t9n/DatePicker_da.json +1 -1
  196. package/assets/esri/widgets/support/t9n/DatePicker_de.json +1 -1
  197. package/assets/esri/widgets/support/t9n/DatePicker_el.json +1 -1
  198. package/assets/esri/widgets/support/t9n/DatePicker_es.json +1 -1
  199. package/assets/esri/widgets/support/t9n/DatePicker_et.json +1 -1
  200. package/assets/esri/widgets/support/t9n/DatePicker_fi.json +1 -1
  201. package/assets/esri/widgets/support/t9n/DatePicker_fr.json +1 -1
  202. package/assets/esri/widgets/support/t9n/DatePicker_he.json +1 -1
  203. package/assets/esri/widgets/support/t9n/DatePicker_hr.json +1 -1
  204. package/assets/esri/widgets/support/t9n/DatePicker_hu.json +1 -1
  205. package/assets/esri/widgets/support/t9n/DatePicker_id.json +1 -1
  206. package/assets/esri/widgets/support/t9n/DatePicker_it.json +1 -1
  207. package/assets/esri/widgets/support/t9n/DatePicker_ja.json +1 -1
  208. package/assets/esri/widgets/support/t9n/DatePicker_ko.json +1 -1
  209. package/assets/esri/widgets/support/t9n/DatePicker_lt.json +1 -1
  210. package/assets/esri/widgets/support/t9n/DatePicker_lv.json +1 -1
  211. package/assets/esri/widgets/support/t9n/DatePicker_nb.json +1 -1
  212. package/assets/esri/widgets/support/t9n/DatePicker_nl.json +1 -1
  213. package/assets/esri/widgets/support/t9n/DatePicker_pl.json +1 -1
  214. package/assets/esri/widgets/support/t9n/DatePicker_pt-BR.json +1 -1
  215. package/assets/esri/widgets/support/t9n/DatePicker_pt-PT.json +1 -1
  216. package/assets/esri/widgets/support/t9n/DatePicker_ro.json +1 -1
  217. package/assets/esri/widgets/support/t9n/DatePicker_ru.json +1 -1
  218. package/assets/esri/widgets/support/t9n/DatePicker_sk.json +1 -1
  219. package/assets/esri/widgets/support/t9n/DatePicker_sl.json +1 -1
  220. package/assets/esri/widgets/support/t9n/DatePicker_sr.json +1 -1
  221. package/assets/esri/widgets/support/t9n/DatePicker_sv.json +1 -1
  222. package/assets/esri/widgets/support/t9n/DatePicker_th.json +1 -1
  223. package/assets/esri/widgets/support/t9n/DatePicker_tr.json +1 -1
  224. package/assets/esri/widgets/support/t9n/DatePicker_uk.json +1 -1
  225. package/assets/esri/widgets/support/t9n/DatePicker_vi.json +1 -1
  226. package/assets/esri/widgets/support/t9n/DatePicker_zh-CN.json +1 -1
  227. package/assets/esri/widgets/support/t9n/DatePicker_zh-HK.json +1 -1
  228. package/assets/esri/widgets/support/t9n/DatePicker_zh-TW.json +1 -1
  229. package/assets/esri/widgets/support/t9n/TimePicker_ar.json +1 -1
  230. package/assets/esri/widgets/support/t9n/TimePicker_bg.json +1 -1
  231. package/assets/esri/widgets/support/t9n/TimePicker_bs.json +1 -1
  232. package/assets/esri/widgets/support/t9n/TimePicker_ca.json +1 -1
  233. package/assets/esri/widgets/support/t9n/TimePicker_cs.json +1 -1
  234. package/assets/esri/widgets/support/t9n/TimePicker_da.json +1 -1
  235. package/assets/esri/widgets/support/t9n/TimePicker_de.json +1 -1
  236. package/assets/esri/widgets/support/t9n/TimePicker_el.json +1 -1
  237. package/assets/esri/widgets/support/t9n/TimePicker_es.json +1 -1
  238. package/assets/esri/widgets/support/t9n/TimePicker_et.json +1 -1
  239. package/assets/esri/widgets/support/t9n/TimePicker_fi.json +1 -1
  240. package/assets/esri/widgets/support/t9n/TimePicker_fr.json +1 -1
  241. package/assets/esri/widgets/support/t9n/TimePicker_he.json +1 -1
  242. package/assets/esri/widgets/support/t9n/TimePicker_hr.json +1 -1
  243. package/assets/esri/widgets/support/t9n/TimePicker_hu.json +1 -1
  244. package/assets/esri/widgets/support/t9n/TimePicker_id.json +1 -1
  245. package/assets/esri/widgets/support/t9n/TimePicker_it.json +1 -1
  246. package/assets/esri/widgets/support/t9n/TimePicker_ja.json +1 -1
  247. package/assets/esri/widgets/support/t9n/TimePicker_ko.json +1 -1
  248. package/assets/esri/widgets/support/t9n/TimePicker_lt.json +1 -1
  249. package/assets/esri/widgets/support/t9n/TimePicker_lv.json +1 -1
  250. package/assets/esri/widgets/support/t9n/TimePicker_nb.json +1 -1
  251. package/assets/esri/widgets/support/t9n/TimePicker_nl.json +1 -1
  252. package/assets/esri/widgets/support/t9n/TimePicker_pl.json +1 -1
  253. package/assets/esri/widgets/support/t9n/TimePicker_pt-BR.json +1 -1
  254. package/assets/esri/widgets/support/t9n/TimePicker_pt-PT.json +1 -1
  255. package/assets/esri/widgets/support/t9n/TimePicker_ro.json +1 -1
  256. package/assets/esri/widgets/support/t9n/TimePicker_ru.json +1 -1
  257. package/assets/esri/widgets/support/t9n/TimePicker_sk.json +1 -1
  258. package/assets/esri/widgets/support/t9n/TimePicker_sl.json +1 -1
  259. package/assets/esri/widgets/support/t9n/TimePicker_sr.json +1 -1
  260. package/assets/esri/widgets/support/t9n/TimePicker_sv.json +1 -1
  261. package/assets/esri/widgets/support/t9n/TimePicker_th.json +1 -1
  262. package/assets/esri/widgets/support/t9n/TimePicker_tr.json +1 -1
  263. package/assets/esri/widgets/support/t9n/TimePicker_uk.json +1 -1
  264. package/assets/esri/widgets/support/t9n/TimePicker_vi.json +1 -1
  265. package/assets/esri/widgets/support/t9n/TimePicker_zh-CN.json +1 -1
  266. package/assets/esri/widgets/support/t9n/TimePicker_zh-HK.json +1 -1
  267. package/assets/esri/widgets/support/t9n/TimePicker_zh-TW.json +1 -1
  268. package/chunks/Compositing.glsl.js +4 -19
  269. package/chunks/HUDCompositing.glsl.js +7 -0
  270. package/chunks/Laserlines.glsl.js +5 -5
  271. package/chunks/OITCompositing.glsl.js +13 -0
  272. package/chunks/OverlayCompositing.glsl.js +8 -0
  273. package/chunks/Precipitation.glsl.js +1 -1
  274. package/chunks/ShadowHighlight.glsl.js +1 -1
  275. package/chunks/boundedPlane.js +1 -1
  276. package/chunks/cameraUtilsPlanar.js +1 -1
  277. package/chunks/cameraUtilsSpherical.js +1 -1
  278. package/chunks/mat3.js +1 -1
  279. package/chunks/quat.js +1 -1
  280. package/chunks/quat2.js +1 -1
  281. package/chunks/quatf64.js +1 -1
  282. package/chunks/sphere.js +1 -1
  283. package/chunks/vec3.js +1 -1
  284. package/chunks/vec3f32.js +1 -1
  285. package/chunks/vec4f64.js +1 -1
  286. package/core/VectorStack.js +1 -1
  287. package/core/libs/gl-matrix-2/factories/quatf64.js +1 -1
  288. package/core/libs/gl-matrix-2/factories/vec3f32.js +1 -1
  289. package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
  290. package/core/libs/gl-matrix-2/math/mat3.js +1 -1
  291. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  292. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  293. package/core/perspectiveUtils.js +1 -1
  294. package/geohash/GeohashTree.js +1 -1
  295. package/geometry/support/MeshTransform.js +1 -1
  296. package/geometry/support/axisAngle.js +1 -1
  297. package/geometry/support/axisAngleDegrees.js +1 -1
  298. package/geometry/support/lineSegment.js +1 -1
  299. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  300. package/geometry/support/meshUtils/exporters/gltf/node.js +1 -1
  301. package/geometry/support/meshUtils/georeference.js +1 -1
  302. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  303. package/geometry/support/meshUtils/projection.js +1 -1
  304. package/geometry/support/meshUtils/rotate.js +1 -1
  305. package/geometry/support/plane.js +1 -1
  306. package/interfaces.d.ts +70 -0
  307. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  308. package/layers/graphics/featureConversionUtils.js +1 -1
  309. package/layers/mixins/EditBusLayer.js +1 -1
  310. package/layers/support/AggregateField.js +1 -1
  311. package/layers/support/ControlPointsGeoreference.js +1 -1
  312. package/layers/support/OutStatistic.js +1 -1
  313. package/layers/support/VoxelVolume.js +1 -1
  314. package/layers/support/voxelPlaneUtils.js +1 -1
  315. package/package.json +1 -1
  316. package/rest/support/AggregateFeatureSet.js +5 -0
  317. package/support/revision.js +1 -1
  318. package/views/2d/ViewState.js +1 -1
  319. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  320. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  321. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  322. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  323. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  324. package/views/2d/engine/webgl/WGLTile.js +1 -1
  325. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  326. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  327. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  328. package/views/2d/layers/features/schemaUtils.js +1 -1
  329. package/views/2d/layers/features/support/BinStore.js +1 -1
  330. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  331. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  332. package/views/2d/layers/support/DebugOverlay.js +1 -1
  333. package/views/2d/layers/support/FeatureLayerProxy.js +1 -1
  334. package/views/2d/layers/support/clusterUtils.js +1 -1
  335. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  336. package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
  337. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  338. package/views/3d/analysis/Dimensioning/lengthDimensionUtils.js +1 -1
  339. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  340. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  341. package/views/3d/analysis/Slice/sliceToolConfig.js +1 -1
  342. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  343. package/views/3d/camera/constraintUtils/distance.js +1 -1
  344. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  345. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  346. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  347. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  348. package/views/3d/glTF/internal/Resource.js +1 -1
  349. package/views/3d/interactive/Manipulator3D.js +1 -1
  350. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  351. package/views/3d/interactive/editingTools/settings.js +1 -1
  352. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  353. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  354. package/views/3d/interactive/manipulatorUtils.js +1 -1
  355. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  356. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  357. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  358. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  359. package/views/3d/layers/I3SMeshView3D.js +1 -1
  360. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  361. package/views/3d/layers/PointCloudWorker.js +1 -1
  362. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  363. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  364. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  365. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  366. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  367. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  368. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  369. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  370. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  371. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  372. package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
  373. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  374. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  375. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  376. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  377. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  378. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  379. package/views/3d/layers/support/edgeUtils.js +1 -1
  380. package/views/3d/layers/support/uvUtils.js +1 -1
  381. package/views/3d/state/Frustum.js +1 -1
  382. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  383. package/views/3d/state/controllers/RotateController.js +1 -1
  384. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  385. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  386. package/views/3d/state/controllers/local/ZoomController.js +1 -1
  387. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  388. package/views/3d/state/utils/navigationUtils.js +1 -1
  389. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  390. package/views/3d/support/orientedBoundingBox.js +1 -1
  391. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  392. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  393. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  394. package/views/3d/support/sunUtils.js +1 -1
  395. package/views/3d/terrain/OverlayRenderer.js +1 -1
  396. package/views/3d/terrain/PatchRenderData.js +1 -1
  397. package/views/3d/terrain/TerrainSurface.js +1 -1
  398. package/views/3d/terrain/Tile.js +1 -1
  399. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  400. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  401. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  402. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  403. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
  404. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
  405. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  406. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  407. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  408. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  409. package/views/3d/webgl-engine/lib/GeometryRecord.js +1 -1
  410. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  411. package/views/3d/webgl-engine/lib/Highlight.js +1 -1
  412. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  413. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  414. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
  415. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  416. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  417. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  418. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  419. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  420. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  421. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  422. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  423. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  424. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  425. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  426. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  427. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  428. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  429. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  430. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  431. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  432. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  433. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  434. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  435. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  436. package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +5 -0
  437. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +5 -0
  438. package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +5 -0
  439. package/views/3d/webgl-engine/shaders/OITCompositingTechnique.js +5 -0
  440. package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +5 -0
  441. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +5 -0
  442. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  443. package/views/interactive/coordinateHelper.js +1 -1
  444. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  445. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  446. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  447. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  448. package/views/layers/FeatureLayerView.js +1 -1
  449. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  450. package/views/support/Scheduler.js +1 -1
  451. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  452. package/views/support/geometry3dUtils.js +1 -1
  453. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  454. package/widgets/ElevationProfile/support/constants.js +1 -1
  455. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  456. package/widgets/Feature/FeatureRelationship.js +1 -1
  457. package/assets/esri/core/workers/chunks/0059699bf824f851d51c.js +0 -1
  458. package/assets/esri/core/workers/chunks/36dd5654df5c7f00406d.js +0 -1
  459. package/assets/esri/core/workers/chunks/de128d8a643b4297940b.js +0 -1
  460. package/assets/esri/core/workers/chunks/e00327925ca82b63fded.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import e from"../../../../../core/Evented.js";import i from"../../../../../core/Handles.js";import{makeHandle as a}from"../../../../../core/handleUtils.js";import{rad2deg as s}from"../../../../../core/mathUtils.js";import{isSome as o,unwrapOr as r,isNone as n,unwrap as p}from"../../../../../core/maybe.js";import{createLength as l}from"../../../../../core/quantityUtils.js";import{watch as h,initial as c}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as d}from"../../../../../core/screenUtils.js";import{lengthUnitFromSpatialReference as u,getMetersPerUnitForSR as m}from"../../../../../core/unitUtils.js";import{property as _}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as g}from"../../../../../core/accessorSupport/decorators/subclass.js";import{o as v}from"../../../../../chunks/mat4.js";import{s as y,a as f,f as S}from"../../../../../chunks/vec2.js";import{a as M}from"../../../../../chunks/vec2f64.js";import{c as b,z as T,b as E,n as x,l as B,e as A}from"../../../../../chunks/vec3.js";import{c as O,a as R}from"../../../../../chunks/vec3f64.js";import{containsXY as j}from"../../../../../geometry/support/aaBoundingRect.js";import{a as G,c as D}from"../../../../../chunks/boundedPlane.js";import{intersectRay as w,create as z,normal as P}from"../../../../../geometry/support/plane.js";import{create as I}from"../../../../../geometry/support/ray.js";import{sv2d as U,sv3d as Z,sm4d as C}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as k}from"../../../../../support/elevationInfoUtils.js";import{createShiftManipulator as X,OffsetMode as Y,IsShiftEdgeOnScreenFlag as L,createResizeManipulator as N,resizeNormal as V,resizeOutlineOnly as H,isDiagonalResizeHandle as F,calculateDiagonalResizeHandleScale as q,createRotatePlane as W,RotationAxis as J,calculateBoundedPlaneTranslateRotate as K,updateRotateHeadingHandle as Q,updateResizeHandle as $}from"../../../analysis/Slice/sliceToolUtils.js";import{getRotateHeadingTexture as tt}from"../../../analysis/Slice/images/Factory.js";import{Manipulator3D as et}from"../../Manipulator3D.js";import{createRotateManipulator as it,getGraphicAttachmentOrigin as at,calculateInputRotationTransform as st}from"../../manipulatorUtils.js";import{screenToZConstrained as ot,screenToRenderPlane as rt}from"../dragEventPipeline3D.js";import{ManipulatorType as nt}from"../ManipulatorType.js";import{canMoveZ as pt}from"../manipulatorUtils.js";import{createVisualElements as lt}from"../visualElementUtils.js";import{ManipulationType as ht}from"../manipulations/MoveManipulation.js";import{MoveXYGraphicManipulation as ct}from"../manipulations/MoveXYGraphicManipulation.js";import{PreserveAspectRatio as dt}from"./PreserveAspectRatio.js";import{OutlineVisualElement as ut}from"../../visualElements/OutlineVisualElement.js";import{evaluateElevationAlignmentAtPoint as mt}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as _t}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as gt}from"../../../layers/graphics/GraphicState.js";import{fromScreen as vt}from"../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as yt,addMapDelta as ft,addScreenDelta as St}from"../../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as Mt}from"../../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as bt}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as Tt}from"../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as Et}from"../../../../interactive/editGeometry/operations/UpdateVertices.js";import{mapPlaneAutoHorizontalSizeByElevationMode as xt,calculateOrientedBounds as Bt,mapPlaneToRenderPlane as At,apply as Ot,unapply as Rt}from"../../../../interactive/editGeometry/support/editPlaneUtils.js";import jt from"../../../../interactive/sketch/SketchTooltipOptions.js";import{ExtentRotateTooltipInfo as Gt,ExtentScaleTooltipInfo as Dt}from"../../../../interactive/tooltip/ExtentTooltipInfos.js";import{Tooltip as wt}from"../../../../interactive/tooltip/Tooltip.js";import{TranslateGraphicTooltipInfo as zt,TranslateGraphicZTooltipInfo as Pt}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as It}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistance as Ut}from"../../../../support/euclideanLengthMeasurementUtils.js";let Zt=class extends(e.EventedMixin(Mt)){constructor(t){super(t),this.enableZ=!0,this.enableRotation=!0,this.enableScaling=!0,this.tooltipOptions=new jt,this._preserveAspectRatio=new dt,this.grabbing=!1,this.inputState=null,this.type="transform-3d",this._handles=new i,this._moveZManipulator=null,this._resizeManipulators=null,this._rotateManipulator=null,this._attachmentOrigin=null,this._outlineVisualElement=null,this._mapBounds=G(),this._mapBoundsStart=G(),this._zmax=0,this._sizeStart=null,this._displayBounds=G(),this._displayBoundsStart=G(),this._displayBoundsMarginStart=0,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._rotateTooltipInfo=null,this._scaleTooltipInfo=null,this._startAngle=0,this._endAngle=0,this._startScale=M(),this._endScale=M()}initialize(){const{view:t,graphic:e,manipulators:i,_handles:s}=this,r=this._graphicState=new gt({graphic:e}),n=e.geometry;this._editGeometryOperations=bt.fromGeometry(n,t.state.viewingMode),this._graphicMoveManipulation=new ct({tool:this,view:t,graphicState:r}),this._moveZManipulator=X(t,Y.CENTER_ON_CALLOUT),this._moveZManipulator.state|=L,s.add([this._createMoveXYGraphicDragPipeline(),h((()=>this.enableZ),(()=>this._updateManipulatorAvailability(this._moveZManipulator,nt.TRANSLATE_Z))),this._createMoveZDragPipeline()]),i.add(this._moveZManipulator),this._resizeManipulators=this._resizeHandles.map((e=>{const i=N(t,e);return s.add([h((()=>this.enableScaling),(()=>this._updateManipulatorAvailability(i,nt.SCALE))),i.events.on("grab-changed",(t=>this._onResizeGrab(t))),this._createResizeDragPipeline(i,e)]),i})),i.addMany(this._resizeManipulators),this._rotateManipulatorTexture=tt(t.toolViewManager.textures),this._rotateManipulator=it(t,this._rotateManipulatorTexture.texture),s.add([h((()=>this.enableRotation),(()=>this._updateManipulatorAvailability(this._rotateManipulator,nt.ROTATE))),this._rotateManipulator.events.on("grab-changed",(t=>{this._onRotateGrab(t)})),this._createRotateDragPipeline(this._rotateManipulator)]),i.add(this._rotateManipulator),this._calculateMapBounds(),this._updateDisplayBounds();const p=lt({view:t,graphic:e,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>a()});o(p)&&(this._outlineVisualElement=p.visualElement instanceof ut?p.visualElement:null),o(this._outlineVisualElement)&&s.add(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>this._updateDisplayBounds()))),s.add(p),s.add([r.on("changed",(()=>this._onGeometryChanged())),h((()=>r.displaying),(()=>this._updateAllManipulatorAvailability())),h((()=>r.isDraped),(()=>this._graphicDrapedChanged()),c),t.trackGraphicState(r)]);const l=t.pointsOfInterest;l&&s.add(h((()=>l.centerOnSurfaceFrequent.location),(()=>this._updateDisplayBounds())));const d=t=>{s.add(t.events.on("grab-changed",(()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()})))};this._forEachManipulator(d);const u=(t,i)=>{s.add(t.events.on("immediate-click",(t=>{i===nt.TRANSLATE_XY&&this.emit("immediate-click",{...t,graphic:e}),t.stopPropagation()})))};this._forEachManipulator(u),this._onGeometryChanged(),this._updateAllManipulatorAvailability(),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._mapBounds=null,this._displayBounds=null,this._rotateManipulatorTexture.release(),this._handles.destroy(),this._graphicMoveManipulation.destroy(),this._editGeometryOperations.destroy(),this._tooltip.destroy(),this._set("view",null),this._set("graphic",null)}_initializeTooltip(){const{_handles:t,view:e}=this,i=this._tooltip=new wt({view:e}),a=()=>{i.info=this._getUpdatedTooltipInfo()};t.add([this.on("graphic-translate-start",a),this.on("graphic-translate",a),this.on("graphic-translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._tooltip.clear()})),this.on("graphic-rotate-start",(t=>{this._startAngle=t.angle,a()})),this.on("graphic-rotate",(t=>{this._endAngle=t.angle,a()})),this.on("graphic-rotate-stop",(()=>{this._startAngle=0,this._endAngle=0,a()})),this.on("graphic-scale-start",(t=>{y(this._startScale,t.xScale,t.yScale),y(this._endScale,t.xScale,t.yScale),a()})),this.on("graphic-scale",(t=>{y(this._endScale,t.xScale,t.yScale),a()})),this.on("graphic-scale-stop",(()=>{y(this._startScale,0,0),y(this._endScale,0,0),a()}))]),this._forEachManipulator((e=>{t.add([e.events.on("focus-changed",a),e.events.on("grab-changed",a),e.events.on("drag",(t=>{"cancel"===t.action?this._tooltip.clear():a()}))])}))}_getUpdatedTooltipInfo(){return this.tooltipOptions.enabled?this._graphicMoveManipulation.grabbing||this._graphicMoveManipulation.dragging?this._computeMoveXYTooltipInfo():this._moveZManipulator.focused?this._computeMoveZTooltipInfo():this._rotateManipulator.focused?this._computeRotateTooltipInfo():this._resizeManipulators.some((t=>t.focused))?this._computeScaleTooltipInfo():null:null}_computeMoveXYTooltipInfo(){return this._moveXYTooltipInfo=r(this._moveXYTooltipInfo,(()=>new zt({tooltipOptions:this.tooltipOptions})))}_computeMoveZTooltipInfo(){const t=this._moveZTooltipInfo=r(this._moveZTooltipInfo,(()=>new Pt({tooltipOptions:this.tooltipOptions}))),e=this._moveUnit;if(this._moveZManipulator.dragging){const e=this._mapBoundsStart.origin,i=this._mapBounds.origin,a=Ut(e,i,this.view.spatialReference);if(n(a))return null;t.distance=a}else t.distance=l(0,e);return t}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo=r(this._rotateTooltipInfo,(()=>new Gt({tooltipOptions:this.tooltipOptions})));return t.angle=this._startAngle-this._endAngle,t}_computeScaleTooltipInfo(){const t=this.graphic.geometry;if(n(t))return null;const e=this._scaleTooltipInfo=r(this._scaleTooltipInfo,(()=>new Dt({tooltipOptions:this.tooltipOptions}))),i=xt(this._mapBounds,this._zmax,t.spatialReference,this._graphicState.isDraped);return n(i)?null:(e.xSize=i[0],e.ySize=i[1],o(this._sizeStart)&&this._resizeManipulators.some((t=>t.dragging))?(e.xScale=i[0].value/this._sizeStart[0].value,e.yScale=i[1].value/this._sizeStart[1].value):(e.xScale=1,e.yScale=1),e)}_graphicDrapedChanged(){this._handles.remove(Ct),this._updateDisplayBounds(),this._graphicState.isDraped&&this._handles.add(this.view.elevationProvider.on("elevation-change",(t=>{o(this._attachmentOrigin)&&j(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._updateDisplayBounds()})),Ct)}_updateAllManipulatorAvailability(){this._forEachManipulator(((t,e)=>this._updateManipulatorAvailability(t,e)))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof et){const a=this._graphicState.displaying,s=this.enableZ&&pt(this.graphic);switch(e){case nt.ROTATE:t.available=a&&this.enableRotation;break;case nt.SCALE:t.available=a&&(this.enableScaling||this.enableRotation||s),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?V:H;break;case nt.TRANSLATE_Z:t.available=a&&s;break;default:t.available=a}}}_forEachManipulator(t){this._graphicMoveManipulation.forEachManipulator(t),this._resizeManipulators.forEach((e=>t(e,nt.SCALE))),t(this._rotateManipulator,nt.ROTATE),t(this._moveZManipulator,nt.TRANSLATE_Z)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get _moveUnit(){return r(u(this.view.spatialReference),"meters")}reset(){}_onGeometryChanged(){this._updateDisplayBounds()}_calculateMapBounds(){const t=this.graphic.geometry,e=this._editGeometryOperations.data,i=e.components[0].edges[0],a=f(U.get(),i.leftVertex.pos,i.rightVertex.pos);S(a,a);const s=r(at(this.view,this.graphic),(()=>t.extent.center));let o=Xt*this.view.pixelSizeAt(s);const n=this.view.spatialReference,p=t.spatialReference;n.equals(p)||(o*=m(n)/m(p)),Bt(a,e,o,this._mapBounds),this._updateZMax()}_updateZMax(){const t=this._editGeometryOperations.data;if(!t.geometry.hasZ)return void(this._zmax=0);const e=t.coordinateHelper;let i=Number.NEGATIVE_INFINITY;for(const a of t.components)for(const t of a.vertices){const a=e.getZ(t.pos);i=Math.max(a,i)}this._zmax=i}_updateDisplayBounds(){const t=this.graphic.geometry;if(n(t))return;const e=o(this._outlineVisualElement)&&!this._graphicState.isDraped&&o(this._outlineVisualElement.attachmentOrigin)?this._outlineVisualElement.attachmentOrigin:at(this.view,this.graphic);this._attachmentOrigin=r(e,t.extent.center);const i=o(e)?e.z:mt(this._mapBounds.origin,this.view.elevationProvider,_t.fromElevationInfo(k(this.graphic)),this.view.renderCoordsHelper),a=D(this._mapBounds);a.origin[2]=i,At(a,this.view.renderCoordsHelper,t.spatialReference,this._displayBoundsMargin,this._displayBounds),this._updateManipulators()}get _displayBoundsMargin(){const t=this.view.pointsOfInterest,e=t?t.centerOnSurfaceFrequent.location:this._editGeometryOperations.data.geometry.extent.center;return kt*this.view.pixelSizeAt(e)}_createMoveXYGraphicDragPipeline(){return this._graphicMoveManipulation.createDragPipeline(((t,e,i)=>this._applyGraphicMoveSteps(e,i,ht.XY)))}_createMoveZDragPipeline(){const t=this.view,e=this._editGeometryOperations.data.spatialReference;return yt(this._moveZManipulator,((i,a,s)=>{const o=R(i.renderLocation),r=a.next(ot(t,o,e)).next(St());this._applyGraphicMoveSteps(r,s,ht.Z)}))}_applyGraphicMoveSteps(t,e,i){const a=t.next((t=>("start"===t.action&&(this.inputState={type:"move"},this._updateOperationStartProperties(),this.emit("graphic-translate-start",{graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(ft()).next(this._moveDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||t.mapEnd.z-t.mapStart.z)&&this.emit("graphic-translate",e);break;case"end":this.inputState=null,this.emit("graphic-translate-stop",e)}return t})).next((t=>this._updateMoveTooltip(t,i)));return e.next((()=>{o(this.inputState)&&this.emit("graphic-translate-stop",{graphic:this.graphic,dxScreen:0,dyScreen:0}),this._cancel()})),a}_updateOperationStartProperties(){D(this._displayBounds,this._displayBoundsStart),D(this._mapBounds,this._mapBoundsStart),n(this.graphic.geometry)?this._sizeStart=null:this._sizeStart=xt(this._mapBoundsStart,this._zmax,this.graphic.geometry.spatialReference,this._graphicState.isDraped)}_moveDragUpdateGeometry(){return t=>{if(n(this.inputState)||"move"!==this.inputState.type)return t;const e=[];for(const s of this._editGeometryOperations.data.components)e.push(...s.vertices);const i="start"===t.action?Tt.NEW_STEP:Tt.ACCUMULATE_STEPS,a=this._editGeometryOperations.moveVertices(e,t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);return Ot(a,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_updateMoveTooltip(t,e){if(e===ht.XY||e===ht.XY_AXIS){const e=It(t.mapStart,t.mapEnd,this._graphicState.isDraped?"on-the-ground":"absolute-height");o(e)&&o(this._moveXYTooltipInfo)&&(this._moveXYTooltipInfo.distance=e)}return t}_onResizeGrab(t){if("start"!==t.action)return;const e=this._calculatePickRay(t.screenPoint);w(this._displayBounds.plane,e,Z.get())&&(this._updateOperationStartProperties(),this._displayBoundsMarginStart=this._displayBoundsMargin,this.inputState={type:"resize"})}_createResizeDragPipeline(t,e){return yt(t,((t,i,a)=>{n(this.inputState)||(i.next((t=>("start"===t.action&&this.emit("graphic-scale-start",{graphic:this.graphic,xScale:1,yScale:1}),t))).next(rt(this.view,this._displayBoundsStart.plane)).next((t=>({...t,handle:e}))).next(this._resizeDragRenderPlaneToFactors()).next(this._preserveAspectRatio.createDragEventPipelineStep(),this._preserveAspectRatio.next).next(this._resizeDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":this.emit("graphic-scale",e);break;case"end":this.inputState=null,this.emit("graphic-scale-stop",e)}return t})),a.next((()=>{o(this.inputState)&&this.emit("graphic-scale-stop",{graphic:this.graphic,xScale:1,yScale:1}),this._cancel()})))}))}_resizeDragRenderPlaneToFactors(){return t=>{const e=this._displayBoundsStart,i=t.handle.direction,a=this._displayBoundsMargin,s=this._displayBoundsMarginStart,o=b(Z.get(),e.origin);T(o,o,e.basis1,-i[0]),T(o,o,e.basis2,-i[1]);const r=E(Z.get(),t.renderEnd,o),n=E(Z.get(),t.renderStart,o),p=F(t.handle),l=q(e),h=q(this._displayBounds)/l,c=(t,e)=>{if(0===t)return 1;let i=B(e),o=.5*t*A(e,r)/i;const l=o<0?-1:1;if(p){o+=(i-.5*t*A(e,n)/i)*l*h}const c=i<1.5*s?1:Yt;return i=Math.max(i-s,Yt),l>0&&(o-=a),l*Math.max(l*(o/i),c)};return{...t,factor1:c(i[0],e.basis1),factor2:c(i[1],e.basis2)}}}_resizeDragUpdateGeometry(){return t=>{const e=b(O(),this._mapBoundsStart.origin);T(e,e,this._mapBoundsStart.basis1,-t.handle.direction[0]),T(e,e,this._mapBoundsStart.basis2,-t.handle.direction[1]);const i=y(M(),this._mapBoundsStart.basis1[0],this._mapBoundsStart.basis1[1]);S(i,i);const a=[];for(const r of this._editGeometryOperations.data.components)a.push(...r.vertices);const s="start"===t.action?Tt.NEW_STEP:Tt.ACCUMULATE_STEPS,o=this._editGeometryOperations.scaleVertices(a,e,i,t.factor1,t.factor2,s,Et.REPLACE);return D(this._mapBoundsStart,this._mapBounds),Ot(o,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_onRotateGrab(t){if("start"!==t.action)return;const e=W(this._displayBounds,this.view.renderCoordsHelper,J.HEADING,z()),i=this._calculatePickRay(t.screenPoint);w(e,i,Z.get())&&(this._updateOperationStartProperties(),this.inputState={type:"rotate",rotatePlane:e})}_createRotateDragPipeline(t){return yt(t,((t,e,i)=>{const a=this.inputState;n(a)||(e.next((t=>("start"===t.action&&this.emit("graphic-rotate-start",{graphic:this.graphic,angle:0}),t))).next(rt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,angle:s(t.rotateAngle)};switch(t.action){case"start":case"update":this.emit("graphic-rotate",e);break;case"end":this.inputState=null,this.emit("graphic-rotate-stop",e)}return t})),i.next((()=>{o(this.inputState)&&this.emit("graphic-rotate-stop",{graphic:this.graphic,angle:0}),this._cancel()})))}))}_rotateDragRenderPlaneToRotate(t){return e=>{const i=P(t.rotatePlane),a=st(e.renderStart,e.renderEnd,this._displayBounds.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdateGeometry(){return t=>{const e=b(O(),this._mapBoundsStart.origin),i=[];for(const o of this._editGeometryOperations.data.components)i.push(...o.vertices);const a="start"===t.action?Tt.NEW_STEP:Tt.ACCUMULATE_STEPS,s=this._editGeometryOperations.rotateVertices(i,e,t.rotateAngle,a,Et.REPLACE);return D(this._mapBoundsStart,this._mapBounds),Ot(s,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_calculatePickRay(t){const e=I(),i=d(t);return vt(this.view.state.camera,i,e),x(e.direction,e.direction),e}_updateManipulators(){if(!this.visible)return;const t=K(this._displayBounds,C.get());Q(this._rotateManipulator,t,this._displayBounds,this.view.renderCoordsHelper),this._updateZMoveHandle(this._moveZManipulator,t),this._resizeManipulators.forEach(((e,i)=>{$(e,this._resizeHandles[i],t,this._displayBounds)}))}_updateZMoveHandle(t,e){const i=this._displayBounds,a={basis:i.basis1,direction:-1,position:E(Z.get(),i.origin,i.basis1),edge:2},s=C.get();v(s,e,a.edge*Math.PI/2),s[12]=0,s[13]=0,s[14]=0,t.modelTransform=s,t.renderLocation=a.position}_cancel(){const t=this._editGeometryOperations.lastOperation;n(t)||(this._editGeometryOperations.undo(),this.graphic.geometry=this._editGeometryOperations.data.geometry,Rt(t,this._mapBounds),this._updateDisplayBounds(),this.inputState=null)}get canUndo(){return this._editGeometryOperations.canUndo}undo(){if(o(this.inputState))this.view.activeTool=null;else if(this.canUndo){const t=this._editGeometryOperations.undo();this.graphic.geometry=this._editGeometryOperations.data.geometry,Rt(p(t),this._mapBounds),this._updateDisplayBounds()}}get canRedo(){return this._editGeometryOperations.canRedo}redo(){if(this.canRedo){const t=this._editGeometryOperations.redo();this.graphic.geometry=this._editGeometryOperations.data.geometry,Ot(p(t),this._mapBounds),this._updateDisplayBounds()}}get test(){return{resizeManipulators:this._resizeManipulators,rotateManipulator:this._rotateManipulator,moveZManipulator:this._moveZManipulator,tooltip:this._tooltip}}};t([_({constructOnly:!0,nonNullable:!0})],Zt.prototype,"view",void 0),t([_({constructOnly:!0,nonNullable:!0})],Zt.prototype,"graphic",void 0),t([_({constructOnly:!0,nonNullable:!0})],Zt.prototype,"enableZ",void 0),t([_()],Zt.prototype,"enableRotation",void 0),t([_()],Zt.prototype,"enableScaling",void 0),t([_({constructOnly:!0,type:jt})],Zt.prototype,"tooltipOptions",void 0),t([_()],Zt.prototype,"preserveAspectRatio",null),t([_()],Zt.prototype,"grabbing",void 0),t([_()],Zt.prototype,"inputState",void 0),t([_({readOnly:!0})],Zt.prototype,"type",void 0),t([_()],Zt.prototype,"_moveUnit",null),Zt=t([g("esri.views.3d.interactive.editingTools.graphicTransform3D.ExtentTransformTool")],Zt);const Ct="draped-elevation-changes",kt=10,Xt=80,Yt=1e-6;export{Yt as EPSILON,Zt as ExtentTransformTool};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import e from"../../../../../core/Evented.js";import i from"../../../../../core/Handles.js";import{makeHandle as a}from"../../../../../core/handleUtils.js";import{rad2deg as s}from"../../../../../core/mathUtils.js";import{isSome as o,unwrapOr as r,isNone as n,unwrap as p}from"../../../../../core/maybe.js";import{createLength as l}from"../../../../../core/quantityUtils.js";import{watch as h,initial as c}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as d}from"../../../../../core/screenUtils.js";import{lengthUnitFromSpatialReference as u,getMetersPerUnitForSR as m}from"../../../../../core/unitUtils.js";import{property as _}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as g}from"../../../../../core/accessorSupport/decorators/subclass.js";import{o as v}from"../../../../../chunks/mat4.js";import{s as y,a as f,f as S}from"../../../../../chunks/vec2.js";import{a as M}from"../../../../../chunks/vec2f64.js";import{c as b,q as T,b as E,n as x,l as B,e as A}from"../../../../../chunks/vec3.js";import{c as O,a as R}from"../../../../../chunks/vec3f64.js";import{containsXY as j}from"../../../../../geometry/support/aaBoundingRect.js";import{a as G,c as D}from"../../../../../chunks/boundedPlane.js";import{intersectRay as w,create as P,normal as z}from"../../../../../geometry/support/plane.js";import{create as I}from"../../../../../geometry/support/ray.js";import{sv2d as U,sv3d as Z,sm4d as C}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as k}from"../../../../../support/elevationInfoUtils.js";import{createShiftManipulator as X,OffsetMode as Y,IsShiftEdgeOnScreenFlag as L,createResizeManipulator as N,resizeNormal as V,resizeOutlineOnly as H,isDiagonalResizeHandle as F,calculateDiagonalResizeHandleScale as q,createRotatePlane as W,RotationAxis as J,calculateBoundedPlaneTranslateRotate as K,updateRotateHeadingHandle as Q,updateResizeHandle as $}from"../../../analysis/Slice/sliceToolUtils.js";import{getRotateHeadingTexture as tt}from"../../../analysis/Slice/images/Factory.js";import{Manipulator3D as et}from"../../Manipulator3D.js";import{createRotateManipulator as it,getGraphicAttachmentOrigin as at,calculateInputRotationTransform as st}from"../../manipulatorUtils.js";import{screenToZConstrained as ot,screenToRenderPlane as rt}from"../dragEventPipeline3D.js";import{ManipulatorType as nt}from"../ManipulatorType.js";import{canMoveZ as pt}from"../manipulatorUtils.js";import{createVisualElements as lt}from"../visualElementUtils.js";import{ManipulationType as ht}from"../manipulations/MoveManipulation.js";import{MoveXYGraphicManipulation as ct}from"../manipulations/MoveXYGraphicManipulation.js";import{PreserveAspectRatio as dt}from"./PreserveAspectRatio.js";import{OutlineVisualElement as ut}from"../../visualElements/OutlineVisualElement.js";import{evaluateElevationAlignmentAtPoint as mt}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as _t}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as gt}from"../../../layers/graphics/GraphicState.js";import{fromScreen as vt}from"../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as yt,addMapDelta as ft,addScreenDelta as St}from"../../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as Mt}from"../../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as bt}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as Tt}from"../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as Et}from"../../../../interactive/editGeometry/operations/UpdateVertices.js";import{mapPlaneAutoHorizontalSizeByElevationMode as xt,calculateOrientedBounds as Bt,mapPlaneToRenderPlane as At,apply as Ot,unapply as Rt}from"../../../../interactive/editGeometry/support/editPlaneUtils.js";import jt from"../../../../interactive/sketch/SketchTooltipOptions.js";import{ExtentRotateTooltipInfo as Gt,ExtentScaleTooltipInfo as Dt}from"../../../../interactive/tooltip/ExtentTooltipInfos.js";import{Tooltip as wt}from"../../../../interactive/tooltip/Tooltip.js";import{TranslateGraphicTooltipInfo as Pt,TranslateGraphicZTooltipInfo as zt}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as It}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistance as Ut}from"../../../../support/euclideanLengthMeasurementUtils.js";let Zt=class extends(e.EventedMixin(Mt)){constructor(t){super(t),this.enableZ=!0,this.enableRotation=!0,this.enableScaling=!0,this.tooltipOptions=new jt,this._preserveAspectRatio=new dt,this.grabbing=!1,this.inputState=null,this.type="transform-3d",this._handles=new i,this._moveZManipulator=null,this._resizeManipulators=null,this._rotateManipulator=null,this._attachmentOrigin=null,this._outlineVisualElement=null,this._mapBounds=G(),this._mapBoundsStart=G(),this._zmax=0,this._sizeStart=null,this._displayBounds=G(),this._displayBoundsStart=G(),this._displayBoundsMarginStart=0,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._rotateTooltipInfo=null,this._scaleTooltipInfo=null,this._startAngle=0,this._endAngle=0,this._startScale=M(),this._endScale=M()}initialize(){const{view:t,graphic:e,manipulators:i,_handles:s}=this,r=this._graphicState=new gt({graphic:e}),n=e.geometry;this._editGeometryOperations=bt.fromGeometry(n,t.state.viewingMode),this._graphicMoveManipulation=new ct({tool:this,view:t,graphicState:r}),this._moveZManipulator=X(t,Y.CENTER_ON_CALLOUT),this._moveZManipulator.state|=L,s.add([this._createMoveXYGraphicDragPipeline(),h((()=>this.enableZ),(()=>this._updateManipulatorAvailability(this._moveZManipulator,nt.TRANSLATE_Z))),this._createMoveZDragPipeline()]),i.add(this._moveZManipulator),this._resizeManipulators=this._resizeHandles.map((e=>{const i=N(t,e);return s.add([h((()=>this.enableScaling),(()=>this._updateManipulatorAvailability(i,nt.SCALE))),i.events.on("grab-changed",(t=>this._onResizeGrab(t))),this._createResizeDragPipeline(i,e)]),i})),i.addMany(this._resizeManipulators),this._rotateManipulatorTexture=tt(t.toolViewManager.textures),this._rotateManipulator=it(t,this._rotateManipulatorTexture.texture),s.add([h((()=>this.enableRotation),(()=>this._updateManipulatorAvailability(this._rotateManipulator,nt.ROTATE))),this._rotateManipulator.events.on("grab-changed",(t=>{this._onRotateGrab(t)})),this._createRotateDragPipeline(this._rotateManipulator)]),i.add(this._rotateManipulator),this._calculateMapBounds(),this._updateDisplayBounds();const p=lt({view:t,graphic:e,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>a()});o(p)&&(this._outlineVisualElement=p.visualElement instanceof ut?p.visualElement:null),o(this._outlineVisualElement)&&s.add(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>this._updateDisplayBounds()))),s.add(p),s.add([r.on("changed",(()=>this._onGeometryChanged())),h((()=>r.displaying),(()=>this._updateAllManipulatorAvailability())),h((()=>r.isDraped),(()=>this._graphicDrapedChanged()),c),t.trackGraphicState(r)]);const l=t.pointsOfInterest;l&&s.add(h((()=>l.centerOnSurfaceFrequent.location),(()=>this._updateDisplayBounds())));const d=t=>{s.add(t.events.on("grab-changed",(()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()})))};this._forEachManipulator(d);const u=(t,i)=>{s.add(t.events.on("immediate-click",(t=>{i===nt.TRANSLATE_XY&&this.emit("immediate-click",{...t,graphic:e}),t.stopPropagation()})))};this._forEachManipulator(u),this._onGeometryChanged(),this._updateAllManipulatorAvailability(),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._mapBounds=null,this._displayBounds=null,this._rotateManipulatorTexture.release(),this._handles.destroy(),this._graphicMoveManipulation.destroy(),this._editGeometryOperations.destroy(),this._tooltip.destroy(),this._set("view",null),this._set("graphic",null)}_initializeTooltip(){const{_handles:t,view:e}=this,i=this._tooltip=new wt({view:e}),a=()=>{i.info=this._getUpdatedTooltipInfo()};t.add([this.on("graphic-translate-start",a),this.on("graphic-translate",a),this.on("graphic-translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._tooltip.clear()})),this.on("graphic-rotate-start",(t=>{this._startAngle=t.angle,a()})),this.on("graphic-rotate",(t=>{this._endAngle=t.angle,a()})),this.on("graphic-rotate-stop",(()=>{this._startAngle=0,this._endAngle=0,a()})),this.on("graphic-scale-start",(t=>{y(this._startScale,t.xScale,t.yScale),y(this._endScale,t.xScale,t.yScale),a()})),this.on("graphic-scale",(t=>{y(this._endScale,t.xScale,t.yScale),a()})),this.on("graphic-scale-stop",(()=>{y(this._startScale,0,0),y(this._endScale,0,0),a()}))]),this._forEachManipulator((e=>{t.add([e.events.on("focus-changed",a),e.events.on("grab-changed",a),e.events.on("drag",(t=>{"cancel"===t.action?this._tooltip.clear():a()}))])}))}_getUpdatedTooltipInfo(){return this.tooltipOptions.enabled?this._graphicMoveManipulation.grabbing||this._graphicMoveManipulation.dragging?this._computeMoveXYTooltipInfo():this._moveZManipulator.focused?this._computeMoveZTooltipInfo():this._rotateManipulator.focused?this._computeRotateTooltipInfo():this._resizeManipulators.some((t=>t.focused))?this._computeScaleTooltipInfo():null:null}_computeMoveXYTooltipInfo(){return this._moveXYTooltipInfo=r(this._moveXYTooltipInfo,(()=>new Pt({tooltipOptions:this.tooltipOptions})))}_computeMoveZTooltipInfo(){const t=this._moveZTooltipInfo=r(this._moveZTooltipInfo,(()=>new zt({tooltipOptions:this.tooltipOptions}))),e=this._moveUnit;if(this._moveZManipulator.dragging){const e=this._mapBoundsStart.origin,i=this._mapBounds.origin,a=Ut(e,i,this.view.spatialReference);if(n(a))return null;t.distance=a}else t.distance=l(0,e);return t}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo=r(this._rotateTooltipInfo,(()=>new Gt({tooltipOptions:this.tooltipOptions})));return t.angle=this._startAngle-this._endAngle,t}_computeScaleTooltipInfo(){const t=this.graphic.geometry;if(n(t))return null;const e=this._scaleTooltipInfo=r(this._scaleTooltipInfo,(()=>new Dt({tooltipOptions:this.tooltipOptions}))),i=xt(this._mapBounds,this._zmax,t.spatialReference,this._graphicState.isDraped);return n(i)?null:(e.xSize=i[0],e.ySize=i[1],o(this._sizeStart)&&this._resizeManipulators.some((t=>t.dragging))?(e.xScale=i[0].value/this._sizeStart[0].value,e.yScale=i[1].value/this._sizeStart[1].value):(e.xScale=1,e.yScale=1),e)}_graphicDrapedChanged(){this._handles.remove(Ct),this._updateDisplayBounds(),this._graphicState.isDraped&&this._handles.add(this.view.elevationProvider.on("elevation-change",(t=>{o(this._attachmentOrigin)&&j(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._updateDisplayBounds()})),Ct)}_updateAllManipulatorAvailability(){this._forEachManipulator(((t,e)=>this._updateManipulatorAvailability(t,e)))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof et){const a=this._graphicState.displaying,s=this.enableZ&&pt(this.graphic);switch(e){case nt.ROTATE:t.available=a&&this.enableRotation;break;case nt.SCALE:t.available=a&&(this.enableScaling||this.enableRotation||s),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?V:H;break;case nt.TRANSLATE_Z:t.available=a&&s;break;default:t.available=a}}}_forEachManipulator(t){this._graphicMoveManipulation.forEachManipulator(t),this._resizeManipulators.forEach((e=>t(e,nt.SCALE))),t(this._rotateManipulator,nt.ROTATE),t(this._moveZManipulator,nt.TRANSLATE_Z)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get _moveUnit(){return r(u(this.view.spatialReference),"meters")}reset(){}_onGeometryChanged(){this._updateDisplayBounds()}_calculateMapBounds(){const t=this.graphic.geometry,e=this._editGeometryOperations.data,i=e.components[0].edges[0],a=f(U.get(),i.leftVertex.pos,i.rightVertex.pos);S(a,a);const s=r(at(this.view,this.graphic),(()=>t.extent.center));let o=Xt*this.view.pixelSizeAt(s);const n=this.view.spatialReference,p=t.spatialReference;n.equals(p)||(o*=m(n)/m(p)),Bt(a,e,o,this._mapBounds),this._updateZMax()}_updateZMax(){const t=this._editGeometryOperations.data;if(!t.geometry.hasZ)return void(this._zmax=0);const e=t.coordinateHelper;let i=Number.NEGATIVE_INFINITY;for(const a of t.components)for(const t of a.vertices){const a=e.getZ(t.pos);i=Math.max(a,i)}this._zmax=i}_updateDisplayBounds(){const t=this.graphic.geometry;if(n(t))return;const e=o(this._outlineVisualElement)&&!this._graphicState.isDraped&&o(this._outlineVisualElement.attachmentOrigin)?this._outlineVisualElement.attachmentOrigin:at(this.view,this.graphic);this._attachmentOrigin=r(e,t.extent.center);const i=o(e)?e.z:mt(this._mapBounds.origin,this.view.elevationProvider,_t.fromElevationInfo(k(this.graphic)),this.view.renderCoordsHelper),a=D(this._mapBounds);a.origin[2]=i,At(a,this.view.renderCoordsHelper,t.spatialReference,this._displayBoundsMargin,this._displayBounds),this._updateManipulators()}get _displayBoundsMargin(){const t=this.view.pointsOfInterest,e=t?t.centerOnSurfaceFrequent.location:this._editGeometryOperations.data.geometry.extent.center;return kt*this.view.pixelSizeAt(e)}_createMoveXYGraphicDragPipeline(){return this._graphicMoveManipulation.createDragPipeline(((t,e,i)=>this._applyGraphicMoveSteps(e,i,ht.XY)))}_createMoveZDragPipeline(){const t=this.view,e=this._editGeometryOperations.data.spatialReference;return yt(this._moveZManipulator,((i,a,s)=>{const o=R(i.renderLocation),r=a.next(ot(t,o,e)).next(St());this._applyGraphicMoveSteps(r,s,ht.Z)}))}_applyGraphicMoveSteps(t,e,i){const a=t.next((t=>("start"===t.action&&(this.inputState={type:"move"},this._updateOperationStartProperties(),this.emit("graphic-translate-start",{graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(ft()).next(this._moveDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||t.mapEnd.z-t.mapStart.z)&&this.emit("graphic-translate",e);break;case"end":this.inputState=null,this.emit("graphic-translate-stop",e)}return t})).next((t=>this._updateMoveTooltip(t,i)));return e.next((()=>{o(this.inputState)&&this.emit("graphic-translate-stop",{graphic:this.graphic,dxScreen:0,dyScreen:0}),this._cancel()})),a}_updateOperationStartProperties(){D(this._displayBounds,this._displayBoundsStart),D(this._mapBounds,this._mapBoundsStart),n(this.graphic.geometry)?this._sizeStart=null:this._sizeStart=xt(this._mapBoundsStart,this._zmax,this.graphic.geometry.spatialReference,this._graphicState.isDraped)}_moveDragUpdateGeometry(){return t=>{if(n(this.inputState)||"move"!==this.inputState.type)return t;const e=[];for(const s of this._editGeometryOperations.data.components)e.push(...s.vertices);const i="start"===t.action?Tt.NEW_STEP:Tt.ACCUMULATE_STEPS,a=this._editGeometryOperations.moveVertices(e,t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);return Ot(a,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_updateMoveTooltip(t,e){if(e===ht.XY||e===ht.XY_AXIS){const e=It(t.mapStart,t.mapEnd,this._graphicState.isDraped?"on-the-ground":"absolute-height");o(e)&&o(this._moveXYTooltipInfo)&&(this._moveXYTooltipInfo.distance=e)}return t}_onResizeGrab(t){if("start"!==t.action)return;const e=this._calculatePickRay(t.screenPoint);w(this._displayBounds.plane,e,Z.get())&&(this._updateOperationStartProperties(),this._displayBoundsMarginStart=this._displayBoundsMargin,this.inputState={type:"resize"})}_createResizeDragPipeline(t,e){return yt(t,((t,i,a)=>{n(this.inputState)||(i.next((t=>("start"===t.action&&this.emit("graphic-scale-start",{graphic:this.graphic,xScale:1,yScale:1}),t))).next(rt(this.view,this._displayBoundsStart.plane)).next((t=>({...t,handle:e}))).next(this._resizeDragRenderPlaneToFactors()).next(this._preserveAspectRatio.createDragEventPipelineStep(),this._preserveAspectRatio.next).next(this._resizeDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":this.emit("graphic-scale",e);break;case"end":this.inputState=null,this.emit("graphic-scale-stop",e)}return t})),a.next((()=>{o(this.inputState)&&this.emit("graphic-scale-stop",{graphic:this.graphic,xScale:1,yScale:1}),this._cancel()})))}))}_resizeDragRenderPlaneToFactors(){return t=>{const e=this._displayBoundsStart,i=t.handle.direction,a=this._displayBoundsMargin,s=this._displayBoundsMarginStart,o=b(Z.get(),e.origin);T(o,o,e.basis1,-i[0]),T(o,o,e.basis2,-i[1]);const r=E(Z.get(),t.renderEnd,o),n=E(Z.get(),t.renderStart,o),p=F(t.handle),l=q(e),h=q(this._displayBounds)/l,c=(t,e)=>{if(0===t)return 1;let i=B(e),o=.5*t*A(e,r)/i;const l=o<0?-1:1;if(p){o+=(i-.5*t*A(e,n)/i)*l*h}const c=i<1.5*s?1:Yt;return i=Math.max(i-s,Yt),l>0&&(o-=a),l*Math.max(l*(o/i),c)};return{...t,factor1:c(i[0],e.basis1),factor2:c(i[1],e.basis2)}}}_resizeDragUpdateGeometry(){return t=>{const e=b(O(),this._mapBoundsStart.origin);T(e,e,this._mapBoundsStart.basis1,-t.handle.direction[0]),T(e,e,this._mapBoundsStart.basis2,-t.handle.direction[1]);const i=y(M(),this._mapBoundsStart.basis1[0],this._mapBoundsStart.basis1[1]);S(i,i);const a=[];for(const r of this._editGeometryOperations.data.components)a.push(...r.vertices);const s="start"===t.action?Tt.NEW_STEP:Tt.ACCUMULATE_STEPS,o=this._editGeometryOperations.scaleVertices(a,e,i,t.factor1,t.factor2,s,Et.REPLACE);return D(this._mapBoundsStart,this._mapBounds),Ot(o,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_onRotateGrab(t){if("start"!==t.action)return;const e=W(this._displayBounds,this.view.renderCoordsHelper,J.HEADING,P()),i=this._calculatePickRay(t.screenPoint);w(e,i,Z.get())&&(this._updateOperationStartProperties(),this.inputState={type:"rotate",rotatePlane:e})}_createRotateDragPipeline(t){return yt(t,((t,e,i)=>{const a=this.inputState;n(a)||(e.next((t=>("start"===t.action&&this.emit("graphic-rotate-start",{graphic:this.graphic,angle:0}),t))).next(rt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,angle:s(t.rotateAngle)};switch(t.action){case"start":case"update":this.emit("graphic-rotate",e);break;case"end":this.inputState=null,this.emit("graphic-rotate-stop",e)}return t})),i.next((()=>{o(this.inputState)&&this.emit("graphic-rotate-stop",{graphic:this.graphic,angle:0}),this._cancel()})))}))}_rotateDragRenderPlaneToRotate(t){return e=>{const i=z(t.rotatePlane),a=st(e.renderStart,e.renderEnd,this._displayBounds.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdateGeometry(){return t=>{const e=b(O(),this._mapBoundsStart.origin),i=[];for(const o of this._editGeometryOperations.data.components)i.push(...o.vertices);const a="start"===t.action?Tt.NEW_STEP:Tt.ACCUMULATE_STEPS,s=this._editGeometryOperations.rotateVertices(i,e,t.rotateAngle,a,Et.REPLACE);return D(this._mapBoundsStart,this._mapBounds),Ot(s,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_calculatePickRay(t){const e=I(),i=d(t);return vt(this.view.state.camera,i,e),x(e.direction,e.direction),e}_updateManipulators(){if(!this.visible)return;const t=K(this._displayBounds,C.get());Q(this._rotateManipulator,t,this._displayBounds,this.view.renderCoordsHelper),this._updateZMoveHandle(this._moveZManipulator,t),this._resizeManipulators.forEach(((e,i)=>{$(e,this._resizeHandles[i],t,this._displayBounds)}))}_updateZMoveHandle(t,e){const i=this._displayBounds,a={basis:i.basis1,direction:-1,position:E(Z.get(),i.origin,i.basis1),edge:2},s=C.get();v(s,e,a.edge*Math.PI/2),s[12]=0,s[13]=0,s[14]=0,t.modelTransform=s,t.renderLocation=a.position}_cancel(){const t=this._editGeometryOperations.lastOperation;n(t)||(this._editGeometryOperations.undo(),this.graphic.geometry=this._editGeometryOperations.data.geometry,Rt(t,this._mapBounds),this._updateDisplayBounds(),this.inputState=null)}get canUndo(){return this._editGeometryOperations.canUndo}undo(){if(o(this.inputState))this.view.activeTool=null;else if(this.canUndo){const t=this._editGeometryOperations.undo();this.graphic.geometry=this._editGeometryOperations.data.geometry,Rt(p(t),this._mapBounds),this._updateDisplayBounds()}}get canRedo(){return this._editGeometryOperations.canRedo}redo(){if(this.canRedo){const t=this._editGeometryOperations.redo();this.graphic.geometry=this._editGeometryOperations.data.geometry,Ot(p(t),this._mapBounds),this._updateDisplayBounds()}}get test(){return{resizeManipulators:this._resizeManipulators,rotateManipulator:this._rotateManipulator,moveZManipulator:this._moveZManipulator,tooltip:this._tooltip}}};t([_({constructOnly:!0,nonNullable:!0})],Zt.prototype,"view",void 0),t([_({constructOnly:!0,nonNullable:!0})],Zt.prototype,"graphic",void 0),t([_({constructOnly:!0,nonNullable:!0})],Zt.prototype,"enableZ",void 0),t([_()],Zt.prototype,"enableRotation",void 0),t([_()],Zt.prototype,"enableScaling",void 0),t([_({constructOnly:!0,type:jt})],Zt.prototype,"tooltipOptions",void 0),t([_()],Zt.prototype,"preserveAspectRatio",null),t([_()],Zt.prototype,"grabbing",void 0),t([_()],Zt.prototype,"inputState",void 0),t([_({readOnly:!0})],Zt.prototype,"type",void 0),t([_()],Zt.prototype,"_moveUnit",null),Zt=t([g("esri.views.3d.interactive.editingTools.graphicTransform3D.ExtentTransformTool")],Zt);const Ct="draped-elevation-changes",kt=10,Xt=80,Yt=1e-6;export{Yt as EPSILON,Zt as ExtentTransformTool};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{cyclicalPI as t}from"../../../../../core/Cyclical.js";import e from"../../../../../core/Evented.js";import a from"../../../../../core/Handles.js";import{clamp as i,rad2deg as o}from"../../../../../core/mathUtils.js";import{isSome as s,destroyMaybe as r,unwrapOr as n,isNone as l}from"../../../../../core/maybe.js";import{createAngle as c,createLength as h}from"../../../../../core/quantityUtils.js";import{when as p,initial as u,watch as d}from"../../../../../core/reactiveUtils.js";import{addFrameTask as g}from"../../../../../core/scheduling.js";import{createScreenPointArray as m}from"../../../../../core/screenUtils.js";import{d as _,C as f,m as M,k as D,e as S}from"../../../../../chunks/mat4.js";import{c as v}from"../../../../../chunks/mat4f64.js";import{s as y,b,l as T,d as R,f as k,a as j}from"../../../../../chunks/vec3.js";import{a as w,f as O}from"../../../../../chunks/vec3f64.js";import{b as A}from"../../../../../chunks/vec4f64.js";import{fromPositionAndNormal as I,create as F,normal as P}from"../../../../../geometry/support/plane.js";import{wrap as E,distance2 as C}from"../../../../../geometry/support/ray.js";import{sv3d as U,sm4d as z}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as L}from"../../../../../support/elevationInfoUtils.js";import{Manipulator3D as x}from"../../Manipulator3D.js";import{calculateInputRotationTransform as N}from"../../manipulatorUtils.js";import{screenToRenderPlane as H}from"../dragEventPipeline3D.js";import{ManipulatorType as V}from"../ManipulatorType.js";import{ROTATE_INDICATOR_DIRECTION_BUFFER as q,SCALE_INDICATOR_DIRECTION_BUFFER as B,ROTATE_INDICATOR_ARROW_PLACEMENT_PERCENTAGE as G,RING_THICKNESS as J,HANDLE_COLOR as K,DRAG_THRESHOLD_PX as Q,RING_RADIUS as W,INNER_INDICATOR_RADIUS as X,OUTER_INDICATOR_RADIUS as Y,RING_HEIGHT as Z,ROTATE_INDICATOR_ARROW_TIP_RADIUS as $,ROTATE_INDICATOR_ARROW_TIP_LENGTH as tt,SCALE_INDICATOR_OFFSET1 as et,SCALE_INDICATOR_OFFSET2 as at,RING_INDICATOR_DELAY_MS as it,GEOMETRY_SEGMENTS as ot,ROTATE_INDICATOR_ARC_LENGTH as st,INDICATOR_THICKNESS as rt,RING_RESET_ANIMATION_SPEED_FACTOR as nt,SCALE_INDICATOR_ARC_LENGTH as lt}from"../manipulations/config.js";import{CullFaceOptions as ct}from"../../../webgl-engine/lib/basicInterfaces.js";import{createExtrudedTriangle as ht,transformInPlace as pt,createPathExtrusionGeometry as ut}from"../../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as dt}from"../../../webgl-engine/lib/Material.js";import{ColorMaterial as gt}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as mt}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateCustomFlags as _t,ManipulatorStateFlags as ft}from"../../../../interactive/interfaces.js";import{Tooltip as Mt}from"../../../../interactive/tooltip/Tooltip.js";import{TransformRotateTooltipInfo as Dt,TransformScaleTooltipInfo as St,TransformAbsoluteTooltipInfo as vt}from"../../../../interactive/tooltip/TransformTooltipInfos.js";var yt,bt;!function(t){t.ScaleIn=_t.Custom2,t.ScaleOut=_t.Custom3,t.RotateLeft=_t.Custom4,t.RotateRight=_t.Custom5,t.Unlocked=_t.Custom7,t.DelayedFocused=_t.Custom8,t.TouchInput=_t.Custom12}(yt||(yt={}));class Tt{constructor({adapter:t,tooltipOptions:i,mode:o,tool:r}){this._mode=null,this._handles=new a,this._scaleRotateDragData=null,this._activeAnimation=null,this.events=new e,this.getFocused=()=>this._ringManipulator.focused,this.getScale=()=>s(this._scaleRotateDragData)&&"scale"===this._scaleRotateDragData.mode?this._adapter.scale:1,this.tool=r,this._mode=o,this._adapter=t,this._tooltipOptions=i,this._tooltip=new Mt({view:r.view}),this._createManipulator(),this._updateDragState(),this._updateManipulatorTransform(),this._handles.add(p((()=>!this._tooltipOptions.enabled),(()=>this._tooltip.clear()),u))}get angle(){return this._adapter.angle}get scale(){return this._adapter.scale}set location(t){this._ringManipulator.location=t}set elevationAlignedLocation(t){this._ringManipulator.elevationAlignedLocation=t}get grabbing(){return this._ringManipulator.grabbing}set interactive(t){this._ringManipulator.interactive=t}destroy(){s(this._activeAnimation)&&(this._activeAnimation.frameTask.remove(),this._activeAnimation=null),this._handles=r(this._handles),this.tool.manipulators.remove(this._ringManipulator),this._ringManipulator=null,this._tooltip=r(this._tooltip)}startAnimation(t){this.cancelActiveAnimation(),t.start();const e=g({update:({deltaTime:e})=>{t.update(e)&&this.cancelActiveAnimation()}});this._activeAnimation={...t,frameTask:e}}cancelActiveAnimation(){s(this._activeAnimation)&&(this._activeAnimation.frameTask.remove(),this._activeAnimation=r(this._activeAnimation))}forEachManipulator(t){t(this._ringManipulator,V.SCALE_ROTATE)}_createManipulator(){const e=this._createRingManipulator();this._ringManipulator=e,this.tool.manipulators.add(e);const a=this.tool.graphicState.graphic,r=mt(e,((e,r,n)=>{this._scaleRotateDragData=null;const l=this._adapter.startInteraction(),c={mode:"none",origin:w(e.renderLocation),initialAngle:this._adapter.angle,angle:0,angleDir:0,scaleDir:0};this._scaleRotateDragData=c,this._updateDragState();const h=U.get();this.tool.view.renderCoordsHelper.worldUpAtPosition(e.renderLocation,h),r.next(H(this.tool.view,I(e.renderLocation,h,F()))).next((e=>{const r=P(e.plane),n=N(e.renderStart,e.renderEnd,c.origin,r),h=t.shortestSignedDiff(c.angle,n);c.angleDir=i(c.angleDir+h,-q,q),c.angle=n;const p=Rt(c,e),u=p-this._adapter.scale;if(c.scaleDir=i(c.scaleDir+u,-B,B),this._onScaleChanged(),"none"===c.mode){const t=this._mode||kt(e,e.plane,c.origin,this.tool.view.state.camera);if(s(t)){switch(t){case"rotate":this.tool.emit("graphic-rotate-start",{graphic:a,angle:0}),this.tool.emit("record-undo",{record:this._adapter.createUndoRecord()});break;case"scale":this.tool.emit("graphic-scale-start",{graphic:a,xScale:1,yScale:1}),this.tool.emit("record-undo",{record:this._adapter.createUndoRecord()})}c.mode=t}}switch(c.mode){case"rotate":l.state.angle=c.initialAngle+n;break;case"scale":l.state.scale=p,this._onScaleChanged()}switch(this._updateDragState(),this._updateManipulatorTransform(),e.action){case"start":case"update":switch(c.mode){case"rotate":this.tool.emit("graphic-rotate",{graphic:a,angle:o(c.angle)});break;case"scale":this.tool.emit("graphic-scale",{graphic:a,xScale:p,yScale:p})}break;case"end":switch(c.mode){case"rotate":this.tool.emit("graphic-rotate-stop",{graphic:a,angle:o(c.angle)});break;case"scale":this.tool.emit("graphic-scale-stop",{graphic:a,xScale:p,yScale:p})}}return"end"===e.action&&(this.startAnimation(wt(this,(()=>this._onScaleChanged()))),this._scaleRotateDragData=null,this._updateDragState(),l.done()),e})).next(this._updateTooltipPipelineStep(c)),n.next((()=>{if(l.cancel(),s(this._scaleRotateDragData)){switch(this._scaleRotateDragData.mode){case"none":break;case"rotate":this.tool.emit("graphic-rotate-stop",{graphic:a,angle:0});break;case"scale":this.tool.emit("graphic-scale-stop",{graphic:a,xScale:1,yScale:1})}this.startAnimation(wt(this,(()=>this._onScaleChanged()))),this._scaleRotateDragData=null,this._updateDragState()}this._updateFocusTooltip()}))}));this._handles.add([r,e.events.on("focus-changed",(t=>{"focus"===t.action?this.startAnimation(Ot(this,(()=>this._updateDelayedFocusedState()))):this._updateDelayedFocusedState()})),e.events.on("immediate-click",(t=>{t.stopPropagation()})),d((()=>this.tool.graphicState?.displaying),(t=>this._ringManipulator.available=t),u)])}_updateTooltipPipelineStep(t){return e=>{const a=this._tooltipOptions;if(!a.enabled)return e;if("end"===e.action)return this._updateFocusTooltip(),e;const i=this._tooltip,o=this._tooltipOptions.visualVariables,r=s(o)?o.size:null,l=s(o)?o.rotation:null;switch(t.mode){case"scale":i.info=new St({tooltipOptions:a,scale:{value:this._adapter.scale},size:h(n(this._adapter.size,-1),"meters"),sizeUnit:s(r)?r.unit:null,sizePrecision:s(r)?At(r.valueType):null});break;case"rotate":{const t=s(l)?At(l.valueType):null,e=s(l)?l.rotationType:"geographic";i.info=new Dt({tooltipOptions:a,rotation:c(n(-this._adapter.relativeAngle,0),"radians","geographic"),rotationPrecision:t,orientation:c(-this._adapter.angle,"radians","geographic"),orientationPrecision:t,rotationType:e})}}return e}}_updateFocusTooltip(){if(!this._tooltipOptions.enabled)return;if(this.getFocused()){const t=this._tooltipOptions.visualVariables,e=s(t)?t.rotation:null,a=s(t)?t.size:null;this._tooltip.info=new vt({tooltipOptions:this._tooltipOptions,orientation:c(-this._adapter.angle,"radians","geographic"),orientationEnabled:null==this._mode||"rotate"===this._mode,orientationPrecision:s(e)?At(e.valueType):null,rotationType:s(e)?e.rotationType:"geographic",size:h(n(this._adapter.size,-1),"meters"),sizeUnit:s(a)?a.unit:null,sizeEnabled:null==this._mode||"scale"===this._mode,sizePrecision:s(a)?At(a.valueType):null})}else this._tooltip.clear()}_onScaleChanged(){this.events.emit("scale-changed"),this._updateManipulatorTransform()}_updateDelayedFocusedState(){this._ringManipulator.updateStateEnabled(yt.DelayedFocused,this.getFocused()),this._updateFocusTooltip()}_updateDragState(){if(this._ringManipulator.updateStateEnabled(yt.Unlocked,!(s(this._scaleRotateDragData)&&"none"!==this._scaleRotateDragData.mode)),s(this._scaleRotateDragData))switch(this._scaleRotateDragData.mode){case"rotate":this._ringManipulator.updateStateEnabled(yt.ScaleIn|yt.ScaleOut,!1),this._ringManipulator.updateStateEnabled(yt.RotateLeft,this._scaleRotateDragData.angleDir<0),this._ringManipulator.updateStateEnabled(yt.RotateRight,this._scaleRotateDragData.angleDir>=0);break;case"scale":this._ringManipulator.updateStateEnabled(yt.RotateLeft|yt.RotateRight,!1),this._ringManipulator.updateStateEnabled(yt.ScaleIn,this._scaleRotateDragData.scaleDir<0),this._ringManipulator.updateStateEnabled(yt.ScaleOut,this._scaleRotateDragData.scaleDir>=0)}else this._ringManipulator.updateStateEnabled(yt.ScaleIn|yt.ScaleOut|yt.RotateLeft|yt.RotateRight,!1)}_updateManipulatorTransform(){const t=_(z.get(),this._adapter.angle,O(0,0,1));if(l(t))return;const e=this.getScale(),a=f(z.get(),y(U.get(),e,e,e));this._ringManipulator.modelTransform=M(z.get(),a,t)}_createRingManipulator(){const t=(t,e,a)=>{const i=[],o=Math.ceil(ot*(e-t)/(2*Math.PI));for(let s=0;s<o+1;s++){const r=t+s*(e-t)/o;i.push(O(a*Math.cos(r),a*Math.sin(r),0))}return i},e=e=>t(0,2*Math.PI,e),a=t=>[[-t/2,0],[t/2,0],[t/2,Z/2],[-t/2,Z/2]],i=(t,e)=>ut(a(e),t,[],[],!1),o=e(W),s=i(o,J),r={left:[],right:[]},n=[];for(let k=0;k<2;k++){const e=k*Math.PI-Math.PI/4,a=Math.PI/2-st,o=e+a,s=e+Math.PI/2-a,l=t(o,s,X),c=i(l,rt);n.push(l),n.push(t(o,s,Y-J/2)),r.left.push(c),r.right.push(c);for(let t=0;t<2;t++){const e=0===t,a=v();if(e){D(a,a,[1,-1,1]),S(a,a,-o,[0,0,1]);const t=Math.round(G*(l.length-1));a[12]=l[t][0],a[13]=l[t][1],a[14]=l[t][2]}else{S(a,a,s,[0,0,1]);const t=Math.round((1-G)*(l.length-1));a[12]=l[t][0],a[13]=l[t][1],a[14]=l[t][2]}const i=ht(tt,0,$,Z);pt(i,a),(e?r.left:r.right).push(i)}}const l=[];for(let D=0;D<2;D++){const e=D*Math.PI-Math.PI/4,a=Math.PI/2-lt,o=e+a,s=e+Math.PI/2-a,r=t(o,s,Y);l.push(i(r,rt))}const c=e(W+et),h=e(W+at),p=i(c,rt),u=i(h,rt),d=e(W-et),g=e(W-at),m=i(d,rt),_=i(g,rt),f=this._createMaterial(),M=this._createMaterial(.66),y=this._createMaterial(.5),b=this._createMaterial(.33);let T=[{geometry:s,material:f,stateMask:yt.DelayedFocused},{geometry:s,material:y,stateMask:ft.None}];this._mode&&"scale"!==this._mode||(T=T.concat([{geometry:l,material:f,stateMask:yt.DelayedFocused|yt.Unlocked},{geometry:p,material:M,stateMask:yt.DelayedFocused|yt.ScaleIn},{geometry:u,material:b,stateMask:yt.DelayedFocused|yt.ScaleIn},{geometry:m,material:M,stateMask:yt.DelayedFocused|yt.ScaleOut},{geometry:_,material:b,stateMask:yt.DelayedFocused|yt.ScaleOut}])),this._mode&&"rotate"!==this._mode||(T=T.concat([{geometry:r.right,material:f,stateMask:yt.DelayedFocused|yt.Unlocked},{geometry:r.left,material:f,stateMask:yt.DelayedFocused|yt.RotateLeft},{geometry:r.right,material:f,stateMask:yt.DelayedFocused|yt.RotateRight}]));const R=[o,...n];return new x({view:this.tool.view,renderObjects:T,autoScaleRenderObjects:!1,worldOriented:!0,radius:J,focusMultiplier:1,touchMultiplier:1.5,elevationInfo:L(this.tool.graphicState.graphic),collisionType:{type:"ribbon",paths:R,direction:O(0,0,1)}})}_createMaterial(t=1){const e=A([...K,t]);return new gt({color:e,transparent:1!==t,cullFace:ct.Back,renderOccluded:dt.Transparent})}get test(){return{ringManipulator:this._ringManipulator,tooltip:this._tooltip}}}function Rt(t,e){const a=b(U.get(),e.renderStart,t.origin),i=b(U.get(),e.renderEnd,t.origin),o=T(a),s=T(i);return 0===o?0:s/o}function kt(t,e,a,i){const{renderStart:o,renderEnd:s}=t,r=jt(o,i,U.get()),n=jt(s,i,U.get());if(R(r,n)<Q*Q)return null;const l=b(U.get(),o,a),c=k(U.get(),l,P(e)),h=o,p=j(U.get(),h,c),u=jt(a,i,U.get()),d=r,g=jt(p,i,U.get()),m=b(U.get(),g,d),_=b(U.get(),r,u),f=E(d,m),M=E(u,_);return C(f,n)<C(M,n)?"rotate":"scale"}function jt(t,e,a){return e.projectToScreen(t,It),y(a,It[0],It[1],0)}function wt(t,e){let a=null,i=1;const o=()=>i;return{start:()=>{i=t.getScale(),a=t.getScale,t.getScale=o,e()},update:t=>(i+=((i+1)/2-i)*Math.min(t*nt,1),e(),Math.abs(i-1)<.01?bt.STOP:bt.CONTINUE),destroy:()=>{t.getScale=a,e()}}}function Ot(t,e){let a=0,i=null;const o=()=>!1;return{start:()=>{i=t.getFocused,t.getFocused=o,a=0,e()},update:t=>(a+=t,!i()||a>it?bt.STOP:bt.CONTINUE),destroy:()=>{t.getFocused=i,e()}}}function At(t){switch(t){case"integer":case"long":return 0;default:return null}}!function(t){t[t.CONTINUE=0]="CONTINUE",t[t.STOP=1]="STOP"}(bt||(bt={}));const It=m();export{Tt as GraphicScaleRotateTransform};
5
+ import{cyclicalPI as t}from"../../../../../core/Cyclical.js";import e from"../../../../../core/Evented.js";import a from"../../../../../core/Handles.js";import{clamp as i,rad2deg as o}from"../../../../../core/mathUtils.js";import{isSome as s,destroyMaybe as r,unwrapOr as n,isNone as l}from"../../../../../core/maybe.js";import{createAngle as c,createLength as h}from"../../../../../core/quantityUtils.js";import{when as p,initial as u,watch as d}from"../../../../../core/reactiveUtils.js";import{addFrameTask as g}from"../../../../../core/scheduling.js";import{createScreenPointArray as m}from"../../../../../core/screenUtils.js";import{d as _,C as f,m as M,k as D,e as S}from"../../../../../chunks/mat4.js";import{c as v}from"../../../../../chunks/mat4f64.js";import{s as y,b,l as T,d as R,f as k,a as j}from"../../../../../chunks/vec3.js";import{a as w,f as O}from"../../../../../chunks/vec3f64.js";import{a as A}from"../../../../../chunks/vec4f64.js";import{fromPositionAndNormal as I,create as F,normal as P}from"../../../../../geometry/support/plane.js";import{wrap as E,distance2 as C}from"../../../../../geometry/support/ray.js";import{sv3d as U,sm4d as z}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as L}from"../../../../../support/elevationInfoUtils.js";import{Manipulator3D as x}from"../../Manipulator3D.js";import{calculateInputRotationTransform as N}from"../../manipulatorUtils.js";import{screenToRenderPlane as H}from"../dragEventPipeline3D.js";import{ManipulatorType as V}from"../ManipulatorType.js";import{ROTATE_INDICATOR_DIRECTION_BUFFER as q,SCALE_INDICATOR_DIRECTION_BUFFER as B,ROTATE_INDICATOR_ARROW_PLACEMENT_PERCENTAGE as G,RING_THICKNESS as J,HANDLE_COLOR as K,DRAG_THRESHOLD_PX as Q,RING_RADIUS as W,INNER_INDICATOR_RADIUS as X,OUTER_INDICATOR_RADIUS as Y,RING_HEIGHT as Z,ROTATE_INDICATOR_ARROW_TIP_RADIUS as $,ROTATE_INDICATOR_ARROW_TIP_LENGTH as tt,SCALE_INDICATOR_OFFSET1 as et,SCALE_INDICATOR_OFFSET2 as at,RING_INDICATOR_DELAY_MS as it,GEOMETRY_SEGMENTS as ot,ROTATE_INDICATOR_ARC_LENGTH as st,INDICATOR_THICKNESS as rt,RING_RESET_ANIMATION_SPEED_FACTOR as nt,SCALE_INDICATOR_ARC_LENGTH as lt}from"../manipulations/config.js";import{CullFaceOptions as ct}from"../../../webgl-engine/lib/basicInterfaces.js";import{createExtrudedTriangle as ht,transformInPlace as pt,createPathExtrusionGeometry as ut}from"../../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as dt}from"../../../webgl-engine/lib/Material.js";import{ColorMaterial as gt}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as mt}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateCustomFlags as _t,ManipulatorStateFlags as ft}from"../../../../interactive/interfaces.js";import{Tooltip as Mt}from"../../../../interactive/tooltip/Tooltip.js";import{TransformRotateTooltipInfo as Dt,TransformScaleTooltipInfo as St,TransformAbsoluteTooltipInfo as vt}from"../../../../interactive/tooltip/TransformTooltipInfos.js";var yt,bt;!function(t){t.ScaleIn=_t.Custom2,t.ScaleOut=_t.Custom3,t.RotateLeft=_t.Custom4,t.RotateRight=_t.Custom5,t.Unlocked=_t.Custom7,t.DelayedFocused=_t.Custom8,t.TouchInput=_t.Custom12}(yt||(yt={}));class Tt{constructor({adapter:t,tooltipOptions:i,mode:o,tool:r}){this._mode=null,this._handles=new a,this._scaleRotateDragData=null,this._activeAnimation=null,this.events=new e,this.getFocused=()=>this._ringManipulator.focused,this.getScale=()=>s(this._scaleRotateDragData)&&"scale"===this._scaleRotateDragData.mode?this._adapter.scale:1,this.tool=r,this._mode=o,this._adapter=t,this._tooltipOptions=i,this._tooltip=new Mt({view:r.view}),this._createManipulator(),this._updateDragState(),this._updateManipulatorTransform(),this._handles.add(p((()=>!this._tooltipOptions.enabled),(()=>this._tooltip.clear()),u))}get angle(){return this._adapter.angle}get scale(){return this._adapter.scale}set location(t){this._ringManipulator.location=t}set elevationAlignedLocation(t){this._ringManipulator.elevationAlignedLocation=t}get grabbing(){return this._ringManipulator.grabbing}set interactive(t){this._ringManipulator.interactive=t}destroy(){s(this._activeAnimation)&&(this._activeAnimation.frameTask.remove(),this._activeAnimation=null),this._handles=r(this._handles),this.tool.manipulators.remove(this._ringManipulator),this._ringManipulator=null,this._tooltip=r(this._tooltip)}startAnimation(t){this.cancelActiveAnimation(),t.start();const e=g({update:({deltaTime:e})=>{t.update(e)&&this.cancelActiveAnimation()}});this._activeAnimation={...t,frameTask:e}}cancelActiveAnimation(){s(this._activeAnimation)&&(this._activeAnimation.frameTask.remove(),this._activeAnimation=r(this._activeAnimation))}forEachManipulator(t){t(this._ringManipulator,V.SCALE_ROTATE)}_createManipulator(){const e=this._createRingManipulator();this._ringManipulator=e,this.tool.manipulators.add(e);const a=this.tool.graphicState.graphic,r=mt(e,((e,r,n)=>{this._scaleRotateDragData=null;const l=this._adapter.startInteraction(),c={mode:"none",origin:w(e.renderLocation),initialAngle:this._adapter.angle,angle:0,angleDir:0,scaleDir:0};this._scaleRotateDragData=c,this._updateDragState();const h=U.get();this.tool.view.renderCoordsHelper.worldUpAtPosition(e.renderLocation,h),r.next(H(this.tool.view,I(e.renderLocation,h,F()))).next((e=>{const r=P(e.plane),n=N(e.renderStart,e.renderEnd,c.origin,r),h=t.shortestSignedDiff(c.angle,n);c.angleDir=i(c.angleDir+h,-q,q),c.angle=n;const p=Rt(c,e),u=p-this._adapter.scale;if(c.scaleDir=i(c.scaleDir+u,-B,B),this._onScaleChanged(),"none"===c.mode){const t=this._mode||kt(e,e.plane,c.origin,this.tool.view.state.camera);if(s(t)){switch(t){case"rotate":this.tool.emit("graphic-rotate-start",{graphic:a,angle:0}),this.tool.emit("record-undo",{record:this._adapter.createUndoRecord()});break;case"scale":this.tool.emit("graphic-scale-start",{graphic:a,xScale:1,yScale:1}),this.tool.emit("record-undo",{record:this._adapter.createUndoRecord()})}c.mode=t}}switch(c.mode){case"rotate":l.state.angle=c.initialAngle+n;break;case"scale":l.state.scale=p,this._onScaleChanged()}switch(this._updateDragState(),this._updateManipulatorTransform(),e.action){case"start":case"update":switch(c.mode){case"rotate":this.tool.emit("graphic-rotate",{graphic:a,angle:o(c.angle)});break;case"scale":this.tool.emit("graphic-scale",{graphic:a,xScale:p,yScale:p})}break;case"end":switch(c.mode){case"rotate":this.tool.emit("graphic-rotate-stop",{graphic:a,angle:o(c.angle)});break;case"scale":this.tool.emit("graphic-scale-stop",{graphic:a,xScale:p,yScale:p})}}return"end"===e.action&&(this.startAnimation(wt(this,(()=>this._onScaleChanged()))),this._scaleRotateDragData=null,this._updateDragState(),l.done()),e})).next(this._updateTooltipPipelineStep(c)),n.next((()=>{if(l.cancel(),s(this._scaleRotateDragData)){switch(this._scaleRotateDragData.mode){case"none":break;case"rotate":this.tool.emit("graphic-rotate-stop",{graphic:a,angle:0});break;case"scale":this.tool.emit("graphic-scale-stop",{graphic:a,xScale:1,yScale:1})}this.startAnimation(wt(this,(()=>this._onScaleChanged()))),this._scaleRotateDragData=null,this._updateDragState()}this._updateFocusTooltip()}))}));this._handles.add([r,e.events.on("focus-changed",(t=>{"focus"===t.action?this.startAnimation(Ot(this,(()=>this._updateDelayedFocusedState()))):this._updateDelayedFocusedState()})),e.events.on("immediate-click",(t=>{t.stopPropagation()})),d((()=>this.tool.graphicState?.displaying),(t=>this._ringManipulator.available=t),u)])}_updateTooltipPipelineStep(t){return e=>{const a=this._tooltipOptions;if(!a.enabled)return e;if("end"===e.action)return this._updateFocusTooltip(),e;const i=this._tooltip,o=this._tooltipOptions.visualVariables,r=s(o)?o.size:null,l=s(o)?o.rotation:null;switch(t.mode){case"scale":i.info=new St({tooltipOptions:a,scale:{value:this._adapter.scale},size:h(n(this._adapter.size,-1),"meters"),sizeUnit:s(r)?r.unit:null,sizePrecision:s(r)?At(r.valueType):null});break;case"rotate":{const t=s(l)?At(l.valueType):null,e=s(l)?l.rotationType:"geographic";i.info=new Dt({tooltipOptions:a,rotation:c(n(-this._adapter.relativeAngle,0),"radians","geographic"),rotationPrecision:t,orientation:c(-this._adapter.angle,"radians","geographic"),orientationPrecision:t,rotationType:e})}}return e}}_updateFocusTooltip(){if(!this._tooltipOptions.enabled)return;if(this.getFocused()){const t=this._tooltipOptions.visualVariables,e=s(t)?t.rotation:null,a=s(t)?t.size:null;this._tooltip.info=new vt({tooltipOptions:this._tooltipOptions,orientation:c(-this._adapter.angle,"radians","geographic"),orientationEnabled:null==this._mode||"rotate"===this._mode,orientationPrecision:s(e)?At(e.valueType):null,rotationType:s(e)?e.rotationType:"geographic",size:h(n(this._adapter.size,-1),"meters"),sizeUnit:s(a)?a.unit:null,sizeEnabled:null==this._mode||"scale"===this._mode,sizePrecision:s(a)?At(a.valueType):null})}else this._tooltip.clear()}_onScaleChanged(){this.events.emit("scale-changed"),this._updateManipulatorTransform()}_updateDelayedFocusedState(){this._ringManipulator.updateStateEnabled(yt.DelayedFocused,this.getFocused()),this._updateFocusTooltip()}_updateDragState(){if(this._ringManipulator.updateStateEnabled(yt.Unlocked,!(s(this._scaleRotateDragData)&&"none"!==this._scaleRotateDragData.mode)),s(this._scaleRotateDragData))switch(this._scaleRotateDragData.mode){case"rotate":this._ringManipulator.updateStateEnabled(yt.ScaleIn|yt.ScaleOut,!1),this._ringManipulator.updateStateEnabled(yt.RotateLeft,this._scaleRotateDragData.angleDir<0),this._ringManipulator.updateStateEnabled(yt.RotateRight,this._scaleRotateDragData.angleDir>=0);break;case"scale":this._ringManipulator.updateStateEnabled(yt.RotateLeft|yt.RotateRight,!1),this._ringManipulator.updateStateEnabled(yt.ScaleIn,this._scaleRotateDragData.scaleDir<0),this._ringManipulator.updateStateEnabled(yt.ScaleOut,this._scaleRotateDragData.scaleDir>=0)}else this._ringManipulator.updateStateEnabled(yt.ScaleIn|yt.ScaleOut|yt.RotateLeft|yt.RotateRight,!1)}_updateManipulatorTransform(){const t=_(z.get(),this._adapter.angle,O(0,0,1));if(l(t))return;const e=this.getScale(),a=f(z.get(),y(U.get(),e,e,e));this._ringManipulator.modelTransform=M(z.get(),a,t)}_createRingManipulator(){const t=(t,e,a)=>{const i=[],o=Math.ceil(ot*(e-t)/(2*Math.PI));for(let s=0;s<o+1;s++){const r=t+s*(e-t)/o;i.push(O(a*Math.cos(r),a*Math.sin(r),0))}return i},e=e=>t(0,2*Math.PI,e),a=t=>[[-t/2,0],[t/2,0],[t/2,Z/2],[-t/2,Z/2]],i=(t,e)=>ut(a(e),t,[],[],!1),o=e(W),s=i(o,J),r={left:[],right:[]},n=[];for(let k=0;k<2;k++){const e=k*Math.PI-Math.PI/4,a=Math.PI/2-st,o=e+a,s=e+Math.PI/2-a,l=t(o,s,X),c=i(l,rt);n.push(l),n.push(t(o,s,Y-J/2)),r.left.push(c),r.right.push(c);for(let t=0;t<2;t++){const e=0===t,a=v();if(e){D(a,a,[1,-1,1]),S(a,a,-o,[0,0,1]);const t=Math.round(G*(l.length-1));a[12]=l[t][0],a[13]=l[t][1],a[14]=l[t][2]}else{S(a,a,s,[0,0,1]);const t=Math.round((1-G)*(l.length-1));a[12]=l[t][0],a[13]=l[t][1],a[14]=l[t][2]}const i=ht(tt,0,$,Z);pt(i,a),(e?r.left:r.right).push(i)}}const l=[];for(let D=0;D<2;D++){const e=D*Math.PI-Math.PI/4,a=Math.PI/2-lt,o=e+a,s=e+Math.PI/2-a,r=t(o,s,Y);l.push(i(r,rt))}const c=e(W+et),h=e(W+at),p=i(c,rt),u=i(h,rt),d=e(W-et),g=e(W-at),m=i(d,rt),_=i(g,rt),f=this._createMaterial(),M=this._createMaterial(.66),y=this._createMaterial(.5),b=this._createMaterial(.33);let T=[{geometry:s,material:f,stateMask:yt.DelayedFocused},{geometry:s,material:y,stateMask:ft.None}];this._mode&&"scale"!==this._mode||(T=T.concat([{geometry:l,material:f,stateMask:yt.DelayedFocused|yt.Unlocked},{geometry:p,material:M,stateMask:yt.DelayedFocused|yt.ScaleIn},{geometry:u,material:b,stateMask:yt.DelayedFocused|yt.ScaleIn},{geometry:m,material:M,stateMask:yt.DelayedFocused|yt.ScaleOut},{geometry:_,material:b,stateMask:yt.DelayedFocused|yt.ScaleOut}])),this._mode&&"rotate"!==this._mode||(T=T.concat([{geometry:r.right,material:f,stateMask:yt.DelayedFocused|yt.Unlocked},{geometry:r.left,material:f,stateMask:yt.DelayedFocused|yt.RotateLeft},{geometry:r.right,material:f,stateMask:yt.DelayedFocused|yt.RotateRight}]));const R=[o,...n];return new x({view:this.tool.view,renderObjects:T,autoScaleRenderObjects:!1,worldOriented:!0,radius:J,focusMultiplier:1,touchMultiplier:1.5,elevationInfo:L(this.tool.graphicState.graphic),collisionType:{type:"ribbon",paths:R,direction:O(0,0,1)}})}_createMaterial(t=1){const e=A([...K,t]);return new gt({color:e,transparent:1!==t,cullFace:ct.Back,renderOccluded:dt.Transparent})}get test(){return{ringManipulator:this._ringManipulator,tooltip:this._tooltip}}}function Rt(t,e){const a=b(U.get(),e.renderStart,t.origin),i=b(U.get(),e.renderEnd,t.origin),o=T(a),s=T(i);return 0===o?0:s/o}function kt(t,e,a,i){const{renderStart:o,renderEnd:s}=t,r=jt(o,i,U.get()),n=jt(s,i,U.get());if(R(r,n)<Q*Q)return null;const l=b(U.get(),o,a),c=k(U.get(),l,P(e)),h=o,p=j(U.get(),h,c),u=jt(a,i,U.get()),d=r,g=jt(p,i,U.get()),m=b(U.get(),g,d),_=b(U.get(),r,u),f=E(d,m),M=E(u,_);return C(f,n)<C(M,n)?"rotate":"scale"}function jt(t,e,a){return e.projectToScreen(t,It),y(a,It[0],It[1],0)}function wt(t,e){let a=null,i=1;const o=()=>i;return{start:()=>{i=t.getScale(),a=t.getScale,t.getScale=o,e()},update:t=>(i+=((i+1)/2-i)*Math.min(t*nt,1),e(),Math.abs(i-1)<.01?bt.STOP:bt.CONTINUE),destroy:()=>{t.getScale=a,e()}}}function Ot(t,e){let a=0,i=null;const o=()=>!1;return{start:()=>{i=t.getFocused,t.getFocused=o,a=0,e()},update:t=>(a+=t,!i()||a>it?bt.STOP:bt.CONTINUE),destroy:()=>{t.getFocused=i,e()}}}function At(t){switch(t){case"integer":case"long":return 0;default:return null}}!function(t){t[t.CONTINUE=0]="CONTINUE",t[t.STOP=1]="STOP"}(bt||(bt={}));const It=m();export{Tt as GraphicScaleRotateTransform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as e,isNone as t}from"../../../core/maybe.js";import{a as r}from"../../../chunks/mat4.js";import{b as n,f as o,m as a,n as i}from"../../../chunks/vec3.js";import{f as c}from"../../../chunks/vec4f64.js";import{sv3d as s,sm4d as l}from"../../../geometry/support/vectorStacks.js";import{hydrateGeometry as m}from"../../../layers/graphics/hydratedFeatures.js";import{Manipulator3D as u}from"./Manipulator3D.js";import{computeCentroid as p}from"../layers/graphics/graphicUtils.js";import{CullFaceOptions as g}from"../webgl-engine/lib/basicInterfaces.js";import{Geometry as d}from"../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as f,createSphereGeometry as O}from"../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as w}from"../webgl-engine/lib/Material.js";import{VertexAttribute as b}from"../webgl-engine/lib/VertexAttribute.js";import{ColorMaterial as j}from"../webgl-engine/materials/ColorMaterial.js";import{ImageMaterial as I}from"../webgl-engine/materials/ImageMaterial.js";import{NativeLineMaterial as h}from"../webgl-engine/materials/NativeLineMaterial.js";import{ShadedColorMaterial as S}from"../webgl-engine/materials/ShadedColorMaterial.js";import{ManipulatorStateFlags as y,ManipulatorStateCustomFlags as U}from"../../interactive/interfaces.js";function A(e,t=w.OccludeAndTransparent,r=!0){const n=c(e[0],e[1],e[2],e.length>3?e[3]:1),o=e[3]<1;return r?new S({color:n,transparent:o,writeDepth:!0,cullFace:g.Back,renderOccluded:t}):new j({color:n,transparent:o,writeDepth:!0,cullFace:g.Back,renderOccluded:t})}function D(e,t=w.OccludeAndTransparent){const r=c(e[0],e[1],e[2],4===e.length?e[3]:1);return new j({color:r,transparent:!0,writeDepth:!0,cullFace:g.Front,renderOccluded:t})}const C=Object.freeze({OFFSET_DISTANCE:40,DISC_RADIUS:27,DISC_RADIUS_FOCUS_MULTIPLIER:1.1,CALLOUT_COLOR:c(1,.5,0,1)});function F(e,t,r=U.None){const n=new I({transparent:!0,writeDepth:!1,textureId:t.id,renderOccluded:w.Opaque}),o=C.OFFSET_DISTANCE,a=C.DISC_RADIUS,i=a*C.DISC_RADIUS_FOCUS_MULTIPLIER,c=e=>{const t=[0,1,2,2,3,0];return new d([[b.POSITION,{size:3,data:[o-e,-e,0,o+e,-e,0,o+e,e,0,o-e,e,0],exclusive:!0}],[b.UV0,{size:2,data:[0,0,1,0,1,1,0,1]}]],[[b.POSITION,t],[b.UV0,t]])},s=f([[0,0,0],[o-a,0,0]]),l=f([[0,0,0],[o-i,0,0]]),m=new h({color:C.CALLOUT_COLOR,renderOccluded:w.OccludeAndTransparent}),p=[{geometry:c(a),material:n,stateMask:y.Unfocused|r},{geometry:s,material:m,stateMask:y.Unfocused|r},{geometry:c(i),material:n,stateMask:y.Focused|r},{geometry:l,material:m,stateMask:y.Focused|r}];return new u({view:e,renderObjects:p,autoScaleRenderObjects:!1,collisionType:{type:"disc",direction:[0,0,1],offset:[o,0,0]},collisionPriority:1,radius:a/2})}function T(e,t,r){return new u({view:e,renderObjects:[{geometry:O(1,32,32),material:A(c(t[0],t[1],t[2],null!=r?r:1))}]})}function M(e,t,i,c){const m=n(s.get(),e,i),u=L(m,o(s.get(),c,m),i,l.get());r(u,u);const p=a(s.get(),t,u);return Math.atan2(p[1],p[0])}function L(e,t,r,n){const a=i(s.get(),e),c=i(s.get(),t),l=o(s.get(),a,c);return n[0]=a[0],n[1]=a[1],n[2]=a[2],n[3]=0,n[4]=c[0],n[5]=c[1],n[6]=c[2],n[7]=0,n[8]=l[0],n[9]=l[1],n[10]=l[2],n[11]=0,n[12]=r[0],n[13]=r[1],n[14]=r[2],n[15]=1,n}function _(t,r){const n=t.getViewForGraphic(r);return e(n)&&"computeAttachmentOrigin"in n?n.computeAttachmentOrigin(r,t.spatialReference):null}function k(t,r,n){const o=_(t,n);e(o)?r.elevationAlignedLocation=o:R(r,n.geometry)}function R(e,r){if(t(r))return;const n="mesh"===r.type?r.anchor:p(r);t(n)||(e.location=m(n))}export{M as calculateInputRotationTransform,L as calculateTranslateRotateFromBases,A as createManipulatorMaterial,D as createManipulatorOutlineMaterial,F as createRotateManipulator,T as createSphereManipulator,_ as getGraphicAttachmentOrigin,k as placeAtGraphic};
5
+ import{isSome as e,isNone as t}from"../../../core/maybe.js";import{a as r}from"../../../chunks/mat4.js";import{b as n,f as o,v as a,n as i}from"../../../chunks/vec3.js";import{f as c}from"../../../chunks/vec4f64.js";import{sv3d as s,sm4d as l}from"../../../geometry/support/vectorStacks.js";import{hydrateGeometry as m}from"../../../layers/graphics/hydratedFeatures.js";import{Manipulator3D as u}from"./Manipulator3D.js";import{computeCentroid as p}from"../layers/graphics/graphicUtils.js";import{CullFaceOptions as g}from"../webgl-engine/lib/basicInterfaces.js";import{Geometry as d}from"../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as f,createSphereGeometry as O}from"../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as w}from"../webgl-engine/lib/Material.js";import{VertexAttribute as b}from"../webgl-engine/lib/VertexAttribute.js";import{ColorMaterial as j}from"../webgl-engine/materials/ColorMaterial.js";import{ImageMaterial as I}from"../webgl-engine/materials/ImageMaterial.js";import{NativeLineMaterial as h}from"../webgl-engine/materials/NativeLineMaterial.js";import{ShadedColorMaterial as S}from"../webgl-engine/materials/ShadedColorMaterial.js";import{ManipulatorStateFlags as y,ManipulatorStateCustomFlags as U}from"../../interactive/interfaces.js";function A(e,t=w.OccludeAndTransparent,r=!0){const n=c(e[0],e[1],e[2],e.length>3?e[3]:1),o=e[3]<1;return r?new S({color:n,transparent:o,writeDepth:!0,cullFace:g.Back,renderOccluded:t}):new j({color:n,transparent:o,writeDepth:!0,cullFace:g.Back,renderOccluded:t})}function D(e,t=w.OccludeAndTransparent){const r=c(e[0],e[1],e[2],4===e.length?e[3]:1);return new j({color:r,transparent:!0,writeDepth:!0,cullFace:g.Front,renderOccluded:t})}const C=Object.freeze({OFFSET_DISTANCE:40,DISC_RADIUS:27,DISC_RADIUS_FOCUS_MULTIPLIER:1.1,CALLOUT_COLOR:c(1,.5,0,1)});function F(e,t,r=U.None){const n=new I({transparent:!0,writeDepth:!1,textureId:t.id,renderOccluded:w.Opaque}),o=C.OFFSET_DISTANCE,a=C.DISC_RADIUS,i=a*C.DISC_RADIUS_FOCUS_MULTIPLIER,c=e=>{const t=[0,1,2,2,3,0];return new d([[b.POSITION,{size:3,data:[o-e,-e,0,o+e,-e,0,o+e,e,0,o-e,e,0],exclusive:!0}],[b.UV0,{size:2,data:[0,0,1,0,1,1,0,1]}]],[[b.POSITION,t],[b.UV0,t]])},s=f([[0,0,0],[o-a,0,0]]),l=f([[0,0,0],[o-i,0,0]]),m=new h({color:C.CALLOUT_COLOR,renderOccluded:w.OccludeAndTransparent}),p=[{geometry:c(a),material:n,stateMask:y.Unfocused|r},{geometry:s,material:m,stateMask:y.Unfocused|r},{geometry:c(i),material:n,stateMask:y.Focused|r},{geometry:l,material:m,stateMask:y.Focused|r}];return new u({view:e,renderObjects:p,autoScaleRenderObjects:!1,collisionType:{type:"disc",direction:[0,0,1],offset:[o,0,0]},collisionPriority:1,radius:a/2})}function T(e,t,r){return new u({view:e,renderObjects:[{geometry:O(1,32,32),material:A(c(t[0],t[1],t[2],null!=r?r:1))}]})}function M(e,t,i,c){const m=n(s.get(),e,i),u=L(m,o(s.get(),c,m),i,l.get());r(u,u);const p=a(s.get(),t,u);return Math.atan2(p[1],p[0])}function L(e,t,r,n){const a=i(s.get(),e),c=i(s.get(),t),l=o(s.get(),a,c);return n[0]=a[0],n[1]=a[1],n[2]=a[2],n[3]=0,n[4]=c[0],n[5]=c[1],n[6]=c[2],n[7]=0,n[8]=l[0],n[9]=l[1],n[10]=l[2],n[11]=0,n[12]=r[0],n[13]=r[1],n[14]=r[2],n[15]=1,n}function _(t,r){const n=t.getViewForGraphic(r);return e(n)&&"computeAttachmentOrigin"in n?n.computeAttachmentOrigin(r,t.spatialReference):null}function k(t,r,n){const o=_(t,n);e(o)?r.elevationAlignedLocation=o:v(r,n.geometry)}function v(e,r){if(t(r))return;const n="mesh"===r.type?r.anchor:p(r);t(n)||(e.location=m(n))}export{M as calculateInputRotationTransform,L as calculateTranslateRotateFromBases,A as createManipulatorMaterial,D as createManipulatorOutlineMaterial,F as createRotateManipulator,T as createSphereManipulator,_ as getGraphicAttachmentOrigin,k as placeAtGraphic};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import e from"../../../../core/Handles.js";import{isSome as t,unwrap as s,isNone as i,unwrapOr as r}from"../../../../core/maybe.js";import{watch as n}from"../../../../core/reactiveUtils.js";import{c as a,b as l,k as o,o as h}from"../../../../chunks/vec3.js";import{c as _,f as d}from"../../../../chunks/vec3f64.js";import{g as p,c as u}from"../../../../chunks/vec4.js";import{f as c,a as f}from"../../../../chunks/vec4f32.js";import{create as m,fromRay as y,getStart as g,getEnd as x}from"../../../../geometry/support/clipRay.js";import{intersectClipRay as b}from"../../../../geometry/support/frustum.js";import{create as w,fromPoints as E,pointAt as R}from"../../../../geometry/support/lineSegment.js";import{create as O,fromPoints as D}from"../../../../geometry/support/ray.js";import{LaserlineVisualElement as A}from"./LaserlineVisualElement.js";import{Object3DVisualElement as C}from"./Object3DVisualElement.js";import{createPolylineGeometry as P}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as j}from"../../webgl-engine/lib/Material.js";import{VertexAttribute as v}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as M}from"../../webgl-engine/materials/RibbonLineMaterial.js";class G extends C{constructor(t){super(t),this._ray=O(),this._externalResources=null,this._handles=new e,this._isWorldDown=!1,this._start=_(),this._end=d(1,0,0),this._width=1,this._color=c(1,0,1,1),this._polygonOffset=!1,this._writeDepthEnabled=!0,this._innerWidth=0,this._innerColor=c(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._falloff=0,this._extensionType=V.LINE,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=j.OccludeAndTransparent,this._fadedExtensions=F,this.applyProps(t)}createExternalResources(){const e=new M(this.materialParameters);this._handles.add(n((()=>this.view.state.camera),(()=>{this._updateGeometry()})));const t=new A({view:this.view,attached:this._laserlineEnabled});this._externalResources={material:e,laserline:t}}destroyExternalResources(){t(this._externalResources)&&this._externalResources.laserline.destroy(),this._externalResources=null,this._handles.removeAll()}forEachExternalMaterial(e){t(this._externalResources)&&e(this._externalResources.material)}createGeometries(e){const t=[_(),_()],i=this.extensionType===V.FADED;i&&t.push(_(),_());const r=i?new Float32Array([1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0]):null,n=P(t,null,r);e.addGeometry(n,s(this._externalResources).material),this._updateVertices(e)}updateVisibility(e){super.updateVisibility(e),t(this._externalResources)&&(this._externalResources.laserline.visible=e)}setStartEndFromWorldDownAtLocation(e){this._isWorldDown=!0,a(this._start,e),this.view.renderCoordsHelper.worldUpAtPosition(e,this._end),l(this._end,e,this._end),D(this._start,this._end,this._ray),this._updateGeometry()}get start(){return this._start}set start(e){this._isWorldDown=!1,o(this._start,e)||(a(this._start,e),D(this._start,this._end,this._ray),this._updateGeometry())}get end(){return this._end}set end(e){this._isWorldDown=!1,o(this._end,e)||(a(this._end,e),D(this._start,this._end,this._ray),this._updateGeometry())}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){p(e,this._color)||(u(this._color,e),this._updateMaterial())}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){e!==this._polygonOffset&&(this._polygonOffset=e,this._updateMaterial())}get writeDepthEnabled(){return this._writeDepthEnabled}set writeDepthEnabled(e){this._writeDepthEnabled!==e&&(this._writeDepthEnabled=e,this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){p(e,this._innerColor)||(u(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const s=t(e)!==t(this._stipplePattern);this._stipplePattern=e,s?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){(i(e)||i(this._stippleOffColor)||!p(e,this._stippleOffColor))&&(this._stippleOffColor=t(e)?f(e):null,this._updateMaterial())}get stipplePreferContinuous(){return this._stipplePreferContinuous}set stipplePreferContinuous(e){e!==this._stipplePreferContinuous&&(this._stipplePreferContinuous=e,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get extensionType(){return this._extensionType}set extensionType(e){e!==this._extensionType&&(this._extensionType=e,this._updateGeometry())}get _laserlineAttached(){return this._laserlineEnabled&&t(this._laserlineStyle)}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,t(this._externalResources)&&(this._externalResources.laserline.attached=this._laserlineAttached,t(e)&&(this._externalResources.laserline.style=e))}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,t(this._externalResources)&&(this._externalResources.laserline.attached=this._laserlineAttached))}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get fadedExtensions(){return this._fadedExtensions}set fadedExtensions(e){this._fadedExtensions=r(e,F),this.recreateGeometry()}_updateMaterial(){if(i(this._externalResources))return;this._externalResources.material.setParameters(this.materialParameters)}get materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:this._stipplePreferContinuous,innerWidth:this._innerWidth,innerColor:this._innerColor,falloff:this._falloff,hasPolygonOffset:this._polygonOffset,renderOccluded:this._renderOccluded,writeDepth:this._writeDepthEnabled}}_updateGeometry(){t(this.object)&&this._updateVertices(this.object)}_updateVertices(e){const s=this._extensionType===V.FADED?this._updateLineSegmentFinite(T):this._updateLineSegmentInfinite(this._extensionType,T);this._updateVertexAttributes(e,s),t(this._externalResources)&&(this._externalResources.laserline.intersectsLine=s)}_updateLineSegmentFinite(e){return E(this._start,this._end,e)}_updateLineSegmentInfinite(e,t){const s=this.view.state.camera;switch(y(this._ray,W),e){case V.LINE:W.c0=-Number.MAX_VALUE;break;case V.RAY:case V.GROUND_RAY:{const e=this._ray.origin,t=r(this.view.elevationProvider.getElevation(e[0],e[1],e[2],this.view.renderCoordsHelper.spatialReference,"ground"),0),s=this.view.renderCoordsHelper.getAltitude(e);this._isWorldDown&&s<t&&h(W.ray.direction,W.ray.direction),this._extensionType===V.GROUND_RAY&&null!=t&&(W.c1=Math.abs(s-t));break}}if(!b(s.frustum,W))return E(this._start,this._end,t);const i=g(W,L),n=x(W,S);return E(i,n,t)}_updateVertexAttributes(e,t){const s=e.geometries[0].getMutableAttribute(v.POSITION).data;if(this.extensionType===V.FADED){const e=R(t,-this.fadedExtensions.start,L);s[0]=e[0],s[1]=e[1],s[2]=e[2];const i=R(t,0,L);s[3]=i[0],s[4]=i[1],s[5]=i[2];const r=R(t,1,L);s[6]=r[0],s[7]=r[1],s[8]=r[2];const n=R(t,1+this.fadedExtensions.end,L);s[9]=n[0],s[10]=n[1],s[11]=n[2]}else{const e=R(t,0,L);s[0]=e[0],s[1]=e[1],s[2]=e[2];const i=R(t,1,L);s[3]=i[0],s[4]=i[1],s[5]=i[2]}e.geometryVertexAttrsUpdated(e.geometryRecords[0])}}const W=m(),L=_(),S=_(),T=w();var V;!function(e){e[e.LINE=0]="LINE",e[e.RAY=1]="RAY",e[e.GROUND_RAY=2]="GROUND_RAY",e[e.FADED=3]="FADED"}(V||(V={}));const N=1/3,F={start:N,end:N};export{G as ExtendedLineVisualElement,V as ExtensionType};
5
+ import"../../../../core/has.js";import e from"../../../../core/Handles.js";import{isSome as t,unwrap as s,isNone as i,unwrapOr as r}from"../../../../core/maybe.js";import{watch as n}from"../../../../core/reactiveUtils.js";import{c as a,b as l,w as o,x as h}from"../../../../chunks/vec3.js";import{c as _,f as d}from"../../../../chunks/vec3f64.js";import{g as p,c as u}from"../../../../chunks/vec4.js";import{f as c,a as f}from"../../../../chunks/vec4f32.js";import{create as m,fromRay as y,getStart as g,getEnd as x}from"../../../../geometry/support/clipRay.js";import{intersectClipRay as b}from"../../../../geometry/support/frustum.js";import{create as w,fromPoints as E,pointAt as R}from"../../../../geometry/support/lineSegment.js";import{create as O,fromPoints as D}from"../../../../geometry/support/ray.js";import{LaserlineVisualElement as A}from"./LaserlineVisualElement.js";import{Object3DVisualElement as C}from"./Object3DVisualElement.js";import{createPolylineGeometry as P}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as j}from"../../webgl-engine/lib/Material.js";import{VertexAttribute as v}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as M}from"../../webgl-engine/materials/RibbonLineMaterial.js";class G extends C{constructor(t){super(t),this._ray=O(),this._externalResources=null,this._handles=new e,this._isWorldDown=!1,this._start=_(),this._end=d(1,0,0),this._width=1,this._color=c(1,0,1,1),this._polygonOffset=!1,this._writeDepthEnabled=!0,this._innerWidth=0,this._innerColor=c(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._falloff=0,this._extensionType=V.LINE,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=j.OccludeAndTransparent,this._fadedExtensions=F,this.applyProps(t)}createExternalResources(){const e=new M(this.materialParameters);this._handles.add(n((()=>this.view.state.camera),(()=>{this._updateGeometry()})));const t=new A({view:this.view,attached:this._laserlineEnabled});this._externalResources={material:e,laserline:t}}destroyExternalResources(){t(this._externalResources)&&this._externalResources.laserline.destroy(),this._externalResources=null,this._handles.removeAll()}forEachExternalMaterial(e){t(this._externalResources)&&e(this._externalResources.material)}createGeometries(e){const t=[_(),_()],i=this.extensionType===V.FADED;i&&t.push(_(),_());const r=i?new Float32Array([1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0]):null,n=P(t,null,r);e.addGeometry(n,s(this._externalResources).material),this._updateVertices(e)}updateVisibility(e){super.updateVisibility(e),t(this._externalResources)&&(this._externalResources.laserline.visible=e)}setStartEndFromWorldDownAtLocation(e){this._isWorldDown=!0,a(this._start,e),this.view.renderCoordsHelper.worldUpAtPosition(e,this._end),l(this._end,e,this._end),D(this._start,this._end,this._ray),this._updateGeometry()}get start(){return this._start}set start(e){this._isWorldDown=!1,o(this._start,e)||(a(this._start,e),D(this._start,this._end,this._ray),this._updateGeometry())}get end(){return this._end}set end(e){this._isWorldDown=!1,o(this._end,e)||(a(this._end,e),D(this._start,this._end,this._ray),this._updateGeometry())}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){p(e,this._color)||(u(this._color,e),this._updateMaterial())}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){e!==this._polygonOffset&&(this._polygonOffset=e,this._updateMaterial())}get writeDepthEnabled(){return this._writeDepthEnabled}set writeDepthEnabled(e){this._writeDepthEnabled!==e&&(this._writeDepthEnabled=e,this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){p(e,this._innerColor)||(u(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const s=t(e)!==t(this._stipplePattern);this._stipplePattern=e,s?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){(i(e)||i(this._stippleOffColor)||!p(e,this._stippleOffColor))&&(this._stippleOffColor=t(e)?f(e):null,this._updateMaterial())}get stipplePreferContinuous(){return this._stipplePreferContinuous}set stipplePreferContinuous(e){e!==this._stipplePreferContinuous&&(this._stipplePreferContinuous=e,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get extensionType(){return this._extensionType}set extensionType(e){e!==this._extensionType&&(this._extensionType=e,this._updateGeometry())}get _laserlineAttached(){return this._laserlineEnabled&&t(this._laserlineStyle)}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,t(this._externalResources)&&(this._externalResources.laserline.attached=this._laserlineAttached,t(e)&&(this._externalResources.laserline.style=e))}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,t(this._externalResources)&&(this._externalResources.laserline.attached=this._laserlineAttached))}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get fadedExtensions(){return this._fadedExtensions}set fadedExtensions(e){this._fadedExtensions=r(e,F),this.recreateGeometry()}_updateMaterial(){if(i(this._externalResources))return;this._externalResources.material.setParameters(this.materialParameters)}get materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:this._stipplePreferContinuous,innerWidth:this._innerWidth,innerColor:this._innerColor,falloff:this._falloff,hasPolygonOffset:this._polygonOffset,renderOccluded:this._renderOccluded,writeDepth:this._writeDepthEnabled}}_updateGeometry(){t(this.object)&&this._updateVertices(this.object)}_updateVertices(e){const s=this._extensionType===V.FADED?this._updateLineSegmentFinite(T):this._updateLineSegmentInfinite(this._extensionType,T);this._updateVertexAttributes(e,s),t(this._externalResources)&&(this._externalResources.laserline.intersectsLine=s)}_updateLineSegmentFinite(e){return E(this._start,this._end,e)}_updateLineSegmentInfinite(e,t){const s=this.view.state.camera;switch(y(this._ray,W),e){case V.LINE:W.c0=-Number.MAX_VALUE;break;case V.RAY:case V.GROUND_RAY:{const e=this._ray.origin,t=r(this.view.elevationProvider.getElevation(e[0],e[1],e[2],this.view.renderCoordsHelper.spatialReference,"ground"),0),s=this.view.renderCoordsHelper.getAltitude(e);this._isWorldDown&&s<t&&h(W.ray.direction,W.ray.direction),this._extensionType===V.GROUND_RAY&&null!=t&&(W.c1=Math.abs(s-t));break}}if(!b(s.frustum,W))return E(this._start,this._end,t);const i=g(W,L),n=x(W,S);return E(i,n,t)}_updateVertexAttributes(e,t){const s=e.geometries[0].getMutableAttribute(v.POSITION).data;if(this.extensionType===V.FADED){const e=R(t,-this.fadedExtensions.start,L);s[0]=e[0],s[1]=e[1],s[2]=e[2];const i=R(t,0,L);s[3]=i[0],s[4]=i[1],s[5]=i[2];const r=R(t,1,L);s[6]=r[0],s[7]=r[1],s[8]=r[2];const n=R(t,1+this.fadedExtensions.end,L);s[9]=n[0],s[10]=n[1],s[11]=n[2]}else{const e=R(t,0,L);s[0]=e[0],s[1]=e[1],s[2]=e[2];const i=R(t,1,L);s[3]=i[0],s[4]=i[1],s[5]=i[2]}e.geometryVertexAttrsUpdated(e.geometryRecords[0])}}const W=m(),L=_(),S=_(),T=w();var V;!function(e){e[e.LINE=0]="LINE",e[e.RAY=1]="RAY",e[e.GROUND_RAY=2]="GROUND_RAY",e[e.FADED=3]="FADED"}(V||(V={}));const N=1/3,F={start:N,end:N};export{G as ExtendedLineVisualElement,V as ExtensionType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as e,isNone as t,unwrap as r}from"../../../../core/maybe.js";import{f as s}from"../../../../chunks/mat4.js";import{c as i}from"../../../../chunks/mat4f64.js";import{s as a,m as o}from"../../../../chunks/vec3.js";import{Z as l,c as n}from"../../../../chunks/vec3f64.js";import{f as h,a as m}from"../../../../chunks/vec4f32.js";import{Object3DVisualElement as p}from"./Object3DVisualElement.js";import{lineStripsToParameters as _,createGeometry as f}from"../../support/engineContent/line.js";import{RenderOccludedFlag as d}from"../../webgl-engine/lib/Material.js";import{RibbonLineMaterial as u}from"../../webgl-engine/materials/RibbonLineMaterial.js";class c extends p{constructor(t,r){super(t),this._hasExternalMaterial=!1,this._renderOccluded=d.OccludeAndTransparent,this._width=1,this._color=h(1,0,1,1),this._innerWidth=1,this._innerColor=null,this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._writeDepthEnabled=!0,this._falloff=0,this._polygonOffset=!1,this._material=r,this._hasExternalMaterial=e(r),this.applyProps(t)}setGeometryFromRenderSpacePoint(e,t=1e3){const r=[];r.push([[e[0]-t,e[1]+0,e[2]+0],[e[0]+t,e[1]+0,e[2]+0]]),r.push([[e[0]-0,e[1]-t,e[2]+0],[e[0]+0,e[1]+t,e[2]+0]]),r.push([[e[0]-0,e[1]+0,e[2]-t],[e[0]+0,e[1]+0,e[2]+t]]),this.geometry=r}setGeometryFromExtent(e){const t=this.view.spatialReference,r=n(),s=n(),i=100,o=[];a(r,e[0],e[1],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[2],e[1],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[2],e[3],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[0],e[3],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[0],e[1],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[0],e[1],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),this.geometry=[o]}setGeometryFromFrustum(e){const t=[];e.lines.forEach((e=>{t.push([e.origin[0],e.origin[1],e.origin[2]]),t.push([e.endpoint[0],e.endpoint[1],e.endpoint[2]])})),this.geometry=[t]}setGeometryFromBoundedPlane(e){const t=[],r=e.origin,s=e.basis1,i=e.basis2,a=.5,o=n(),l=n(),h=n(),m=n();o[0]=r[0]-s[0]*a-i[0]*a,o[1]=r[1]-s[1]*a-i[1]*a,o[2]=r[2]-s[2]*a-i[2]*a,l[0]=r[0]-s[0]*a+i[0]*a,l[1]=r[1]-s[1]*a+i[1]*a,l[2]=r[2]-s[2]*a+i[2]*a,h[0]=r[0]+s[0]*a+i[0]*a,h[1]=r[1]+s[1]*a+i[1]*a,h[2]=r[2]+s[2]*a+i[2]*a,m[0]=r[0]+s[0]*a-i[0]*a,m[1]=r[1]+s[1]*a-i[1]*a,m[2]=r[2]+s[2]*a-i[2]*a,t.push([o[0],o[1],o[2]]),t.push([l[0],l[1],l[2]]),t.push([h[0],h[1],h[2]]),t.push([m[0],m[1],m[2]]),t.push([o[0],o[1],o[2]]),this.geometry=[t]}setGeometryFromSegment(e){const t=e.endRenderSpace;this.transform=s(g,t);const{points:r}=e.createRenderGeometry(t,this.view.renderCoordsHelper);this.geometry=[r]}setGeometryFromSegments(e,t=l){this.transform=s(g,t),this.geometry=e.map((e=>e.createRenderGeometry(t,this.view.renderCoordsHelper).points))}getTransformedGeometry(){return t(this._geometry)?null:this._geometry.map((e=>e.map((e=>o(n(),e,this.transform)))))}get renderOccluded(){return e(this._material)?this._material.parameters.renderOccluded:this._renderOccluded}set renderOccluded(t){this._renderOccluded=t,e(this._material)&&this._material.setParameters({renderOccluded:t})}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get width(){return e(this._material)?this._material.parameters.width:this._width}set width(t){this._width=t,e(this._material)&&this._material.setParameters({width:t})}get color(){return e(this._material)?this._material.parameters.color:this._color}set color(t){this._color=m(t),e(this._material)&&this._material.setParameters({color:this._color})}get innerWidth(){return e(this._material)?this._material.parameters.innerWidth:this._innerWidth}set innerWidth(t){this._innerWidth=t,e(this._material)&&this._material.setParameters({innerWidth:t})}get innerColor(){return e(this._material)?this._material.parameters.innerColor:this._innerColor}set innerColor(t){this._innerColor=e(t)?m(t):t,e(this._material)&&this._material.setParameters({innerColor:this._innerColor})}get stipplePattern(){return e(this._material)?this._material.parameters.stipplePattern:this._stipplePattern}set stipplePattern(t){this._stipplePattern=t,e(this._material)&&this._material.setParameters({stipplePattern:t})}get stippleOffColor(){return e(this._material)?this._material.parameters.stippleOffColor:this._stippleOffColor}set stippleOffColor(t){this._stippleOffColor=e(t)?m(t):null,e(this._material)&&this._material.setParameters({stippleOffColor:this._stippleOffColor})}get stipplePreferContinuous(){return e(this._material)?this._material.parameters.stipplePreferContinuous:this._stipplePreferContinuous}set stipplePreferContinuous(t){this._stipplePreferContinuous=t,e(this._material)&&this._material.setParameters({stipplePreferContinuous:t})}get writeDepthEnabled(){return e(this._material)?this._material.parameters.writeDepth:this._writeDepthEnabled}set writeDepthEnabled(t){this._writeDepthEnabled=t,e(this._material)&&this._material.setParameters({writeDepth:t})}get falloff(){return e(this._material)?this._material.parameters.falloff:this._falloff}set falloff(t){this._falloff=t,e(this._material)&&this._material.setParameters({falloff:t})}get polygonOffset(){return e(this._material)?this._material.parameters.hasPolygonOffset:this._polygonOffset}set polygonOffset(t){this._polygonOffset=t,e(this._material)&&this._material.setParameters({hasPolygonOffset:t})}createExternalResources(){this._hasExternalMaterial||(this._material=new u({width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:this._stipplePreferContinuous,isClosed:!1,falloff:this._falloff,innerColor:this._innerColor,innerWidth:this._innerWidth,hasPolygonOffset:this._polygonOffset,renderOccluded:this._renderOccluded,writeDepth:this._writeDepthEnabled}))}destroyExternalResources(){this._hasExternalMaterial||(this._material=null)}createGeometries(e){for(const t of _(this.geometry)){const s=f(t);e.addGeometry(s,r(this._material))}}forEachExternalMaterial(e){this._hasExternalMaterial||e(r(this._material))}}const g=i();export{c as LineVisualElement};
5
+ import{isSome as e,isNone as t,unwrap as r}from"../../../../core/maybe.js";import{f as s}from"../../../../chunks/mat4.js";import{c as i}from"../../../../chunks/mat4f64.js";import{s as a,v as o}from"../../../../chunks/vec3.js";import{Z as l,c as n}from"../../../../chunks/vec3f64.js";import{f as h,a as m}from"../../../../chunks/vec4f32.js";import{Object3DVisualElement as p}from"./Object3DVisualElement.js";import{lineStripsToParameters as _,createGeometry as f}from"../../support/engineContent/line.js";import{RenderOccludedFlag as d}from"../../webgl-engine/lib/Material.js";import{RibbonLineMaterial as u}from"../../webgl-engine/materials/RibbonLineMaterial.js";class c extends p{constructor(t,r){super(t),this._hasExternalMaterial=!1,this._renderOccluded=d.OccludeAndTransparent,this._width=1,this._color=h(1,0,1,1),this._innerWidth=1,this._innerColor=null,this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._writeDepthEnabled=!0,this._falloff=0,this._polygonOffset=!1,this._material=r,this._hasExternalMaterial=e(r),this.applyProps(t)}setGeometryFromRenderSpacePoint(e,t=1e3){const r=[];r.push([[e[0]-t,e[1]+0,e[2]+0],[e[0]+t,e[1]+0,e[2]+0]]),r.push([[e[0]-0,e[1]-t,e[2]+0],[e[0]+0,e[1]+t,e[2]+0]]),r.push([[e[0]-0,e[1]+0,e[2]-t],[e[0]+0,e[1]+0,e[2]+t]]),this.geometry=r}setGeometryFromExtent(e){const t=this.view.spatialReference,r=n(),s=n(),i=100,o=[];a(r,e[0],e[1],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[2],e[1],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[2],e[3],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[0],e[3],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[0],e[1],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),a(r,e[0],e[1],i),this.view.renderCoordsHelper.toRenderCoords(r,t,s),o.push([s[0],s[1],s[2]]),this.geometry=[o]}setGeometryFromFrustum(e){const t=[];e.lines.forEach((e=>{t.push([e.origin[0],e.origin[1],e.origin[2]]),t.push([e.endpoint[0],e.endpoint[1],e.endpoint[2]])})),this.geometry=[t]}setGeometryFromBoundedPlane(e){const t=[],r=e.origin,s=e.basis1,i=e.basis2,a=.5,o=n(),l=n(),h=n(),m=n();o[0]=r[0]-s[0]*a-i[0]*a,o[1]=r[1]-s[1]*a-i[1]*a,o[2]=r[2]-s[2]*a-i[2]*a,l[0]=r[0]-s[0]*a+i[0]*a,l[1]=r[1]-s[1]*a+i[1]*a,l[2]=r[2]-s[2]*a+i[2]*a,h[0]=r[0]+s[0]*a+i[0]*a,h[1]=r[1]+s[1]*a+i[1]*a,h[2]=r[2]+s[2]*a+i[2]*a,m[0]=r[0]+s[0]*a-i[0]*a,m[1]=r[1]+s[1]*a-i[1]*a,m[2]=r[2]+s[2]*a-i[2]*a,t.push([o[0],o[1],o[2]]),t.push([l[0],l[1],l[2]]),t.push([h[0],h[1],h[2]]),t.push([m[0],m[1],m[2]]),t.push([o[0],o[1],o[2]]),this.geometry=[t]}setGeometryFromSegment(e){const t=e.endRenderSpace;this.transform=s(g,t);const{points:r}=e.createRenderGeometry(t,this.view.renderCoordsHelper);this.geometry=[r]}setGeometryFromSegments(e,t=l){this.transform=s(g,t),this.geometry=e.map((e=>e.createRenderGeometry(t,this.view.renderCoordsHelper).points))}getTransformedGeometry(){return t(this._geometry)?null:this._geometry.map((e=>e.map((e=>o(n(),e,this.transform)))))}get renderOccluded(){return e(this._material)?this._material.parameters.renderOccluded:this._renderOccluded}set renderOccluded(t){this._renderOccluded=t,e(this._material)&&this._material.setParameters({renderOccluded:t})}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get width(){return e(this._material)?this._material.parameters.width:this._width}set width(t){this._width=t,e(this._material)&&this._material.setParameters({width:t})}get color(){return e(this._material)?this._material.parameters.color:this._color}set color(t){this._color=m(t),e(this._material)&&this._material.setParameters({color:this._color})}get innerWidth(){return e(this._material)?this._material.parameters.innerWidth:this._innerWidth}set innerWidth(t){this._innerWidth=t,e(this._material)&&this._material.setParameters({innerWidth:t})}get innerColor(){return e(this._material)?this._material.parameters.innerColor:this._innerColor}set innerColor(t){this._innerColor=e(t)?m(t):t,e(this._material)&&this._material.setParameters({innerColor:this._innerColor})}get stipplePattern(){return e(this._material)?this._material.parameters.stipplePattern:this._stipplePattern}set stipplePattern(t){this._stipplePattern=t,e(this._material)&&this._material.setParameters({stipplePattern:t})}get stippleOffColor(){return e(this._material)?this._material.parameters.stippleOffColor:this._stippleOffColor}set stippleOffColor(t){this._stippleOffColor=e(t)?m(t):null,e(this._material)&&this._material.setParameters({stippleOffColor:this._stippleOffColor})}get stipplePreferContinuous(){return e(this._material)?this._material.parameters.stipplePreferContinuous:this._stipplePreferContinuous}set stipplePreferContinuous(t){this._stipplePreferContinuous=t,e(this._material)&&this._material.setParameters({stipplePreferContinuous:t})}get writeDepthEnabled(){return e(this._material)?this._material.parameters.writeDepth:this._writeDepthEnabled}set writeDepthEnabled(t){this._writeDepthEnabled=t,e(this._material)&&this._material.setParameters({writeDepth:t})}get falloff(){return e(this._material)?this._material.parameters.falloff:this._falloff}set falloff(t){this._falloff=t,e(this._material)&&this._material.setParameters({falloff:t})}get polygonOffset(){return e(this._material)?this._material.parameters.hasPolygonOffset:this._polygonOffset}set polygonOffset(t){this._polygonOffset=t,e(this._material)&&this._material.setParameters({hasPolygonOffset:t})}createExternalResources(){this._hasExternalMaterial||(this._material=new u({width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:this._stipplePreferContinuous,isClosed:!1,falloff:this._falloff,innerColor:this._innerColor,innerWidth:this._innerWidth,hasPolygonOffset:this._polygonOffset,renderOccluded:this._renderOccluded,writeDepth:this._writeDepthEnabled}))}destroyExternalResources(){this._hasExternalMaterial||(this._material=null)}createGeometries(e){for(const t of _(this.geometry)){const s=f(t);e.addGeometry(s,r(this._material))}}forEachExternalMaterial(e){this._hasExternalMaterial||e(r(this._material))}}const g=i();export{c as LineVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Handles.js";import{unwrap as t,isSome as r,isNone as s}from"../../../../core/maybe.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as o}from"../../../../core/screenUtils.js";import{f as a,a as c,b as n,s as h,j as l}from"../../../../chunks/vec2.js";import{k as d,c as m,n as u,b as _,a as p}from"../../../../chunks/vec3.js";import{c as f,f as g}from"../../../../chunks/vec3f64.js";import{g as j,c as b}from"../../../../chunks/vec4.js";import{f as w}from"../../../../chunks/vec4f32.js";import{Object3DVisualElement as x}from"./Object3DVisualElement.js";import{createPolylineGeometry as y}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as O}from"../../webgl-engine/lib/Material.js";import{VertexAttribute as G}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";class v extends x{constructor(t){super(t),this._handles=new e,this._location=f(),this._direction=g(1,0,0),this._width=1,this._offset=1,this._length=18,this._color=w(1,0,1,1),this._renderOccluded=O.OccludeAndTransparent,this.applyProps(t)}get location(){return this._location}set location(e){d(this._location,e)||(m(this._location,e),this._updateGeometry())}get direction(){return this._direction}set direction(e){d(this._direction,e)||(m(this._direction,e),this._updateGeometry())}setDirectionFromPoints(e,t){u(this._direction,_(this._direction,t,e)),this._updateGeometry()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get offset(){return this._offset}set offset(e){e!==this._offset&&(this._offset=e,this._updateGeometry())}get length(){return this._length}set length(e){e!==this._length&&(this._length=e,this._updateGeometry())}get color(){return this._color}set color(e){j(e,this._color)||(b(this._color,e),this._updateMaterial())}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}createExternalResources(){const e=new R(this.materialParameters);this._handles.add(i((()=>this.view.state.camera),(()=>{this._updateGeometry()}))),this._externalResources={material:e}}destroyExternalResources(){this._handles.removeAll(),this._externalResources=null}createGeometries(e){const r=y([f(),f()]),s=y([f(),f()]),i=t(this._externalResources).material;e.addGeometry(r,i),e.addGeometry(s,i),this._updateVertices(e)}forEachExternalMaterial(e){r(this._externalResources)&&e(this._externalResources.material)}_updateMaterial(){if(s(this._externalResources))return;this._externalResources.material.setParameters(this.materialParameters)}get materialParameters(){return{width:this._width,color:this._color,renderOccluded:this._renderOccluded}}_updateGeometry(){const e=this.object;s(e)||this._updateVertices(e)}_updateVertices(e){const t=this.view.state.camera;t.projectToScreen(this.location,A),p(V,this.location,this.direction),t.projectToScreen(V,M),a(M,c(M,M,A)),this._updateVertexAttributes(t,e,0,A,M,1),this._updateVertexAttributes(t,e,1,A,M,-1)}_updateVertexAttributes(e,t,r,s,i,o){const a=t.geometryRecords[r],c=a.geometry.getMutableAttribute(G.POSITION).data,d=n(P,h(P,i[1]*o,i[0]*-o),this.offset+this.width/2),m=l(k,l(k,l(k,s,n(k,i,this.length/2)),d),d),u=l(E,m,n(E,i,-this.length));e.unprojectFromScreen(m,V),c[0]=V[0],c[1]=V[1],c[2]=V[2],e.unprojectFromScreen(u,V),c[3]=V[0],c[4]=V[1],c[5]=V[2],t.geometryVertexAttrsUpdated(a)}}const V=f(),A=o(),M=o(),P=o(),k=o(),E=o();export{v as ParallelLineVisualElement};
5
+ import e from"../../../../core/Handles.js";import{unwrap as t,isSome as r,isNone as s}from"../../../../core/maybe.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as o}from"../../../../core/screenUtils.js";import{f as a,a as c,b as n,s as h,j as l}from"../../../../chunks/vec2.js";import{w as d,c as m,n as u,b as _,a as p}from"../../../../chunks/vec3.js";import{c as f,f as g}from"../../../../chunks/vec3f64.js";import{g as j,c as b}from"../../../../chunks/vec4.js";import{f as w}from"../../../../chunks/vec4f32.js";import{Object3DVisualElement as x}from"./Object3DVisualElement.js";import{createPolylineGeometry as y}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as O}from"../../webgl-engine/lib/Material.js";import{VertexAttribute as G}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";class v extends x{constructor(t){super(t),this._handles=new e,this._location=f(),this._direction=g(1,0,0),this._width=1,this._offset=1,this._length=18,this._color=w(1,0,1,1),this._renderOccluded=O.OccludeAndTransparent,this.applyProps(t)}get location(){return this._location}set location(e){d(this._location,e)||(m(this._location,e),this._updateGeometry())}get direction(){return this._direction}set direction(e){d(this._direction,e)||(m(this._direction,e),this._updateGeometry())}setDirectionFromPoints(e,t){u(this._direction,_(this._direction,t,e)),this._updateGeometry()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get offset(){return this._offset}set offset(e){e!==this._offset&&(this._offset=e,this._updateGeometry())}get length(){return this._length}set length(e){e!==this._length&&(this._length=e,this._updateGeometry())}get color(){return this._color}set color(e){j(e,this._color)||(b(this._color,e),this._updateMaterial())}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}createExternalResources(){const e=new R(this.materialParameters);this._handles.add(i((()=>this.view.state.camera),(()=>{this._updateGeometry()}))),this._externalResources={material:e}}destroyExternalResources(){this._handles.removeAll(),this._externalResources=null}createGeometries(e){const r=y([f(),f()]),s=y([f(),f()]),i=t(this._externalResources).material;e.addGeometry(r,i),e.addGeometry(s,i),this._updateVertices(e)}forEachExternalMaterial(e){r(this._externalResources)&&e(this._externalResources.material)}_updateMaterial(){if(s(this._externalResources))return;this._externalResources.material.setParameters(this.materialParameters)}get materialParameters(){return{width:this._width,color:this._color,renderOccluded:this._renderOccluded}}_updateGeometry(){const e=this.object;s(e)||this._updateVertices(e)}_updateVertices(e){const t=this.view.state.camera;t.projectToScreen(this.location,A),p(V,this.location,this.direction),t.projectToScreen(V,M),a(M,c(M,M,A)),this._updateVertexAttributes(t,e,0,A,M,1),this._updateVertexAttributes(t,e,1,A,M,-1)}_updateVertexAttributes(e,t,r,s,i,o){const a=t.geometryRecords[r],c=a.geometry.getMutableAttribute(G.POSITION).data,d=n(P,h(P,i[1]*o,i[0]*-o),this.offset+this.width/2),m=l(k,l(k,l(k,s,n(k,i,this.length/2)),d),d),u=l(E,m,n(E,i,-this.length));e.unprojectFromScreen(m,V),c[0]=V[0],c[1]=V[1],c[2]=V[2],e.unprojectFromScreen(u,V),c[3]=V[0],c[4]=V[1],c[5]=V[2],t.geometryVertexAttrsUpdated(a)}}const V=f(),A=o(),M=o(),P=o(),k=o(),E=o();export{v as ParallelLineVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import s from"../../../core/Logger.js";import{applySome as i,isSome as l,isNone as o}from"../../../core/maybe.js";import{initial as a}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{WhereClause as d}from"../../../core/sql/WhereClause.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import p from"../../../layers/support/FeatureFilter.js";import{fixFields as h,unpackFieldNames as y,populateMissingFields as c}from"../../../layers/support/fieldUtils.js";import f from"../../../rest/support/Query.js";import{BuildingSublayerView3DMixin as m}from"./BuildingSublayerView3D.js";import{I3SMeshView3D as g}from"./I3SMeshView3D.js";import{ForAllFeaturesReturnType as F,ForAllFeaturesVisibilityMode as b}from"./II3SMeshView3D.js";import{applyFilterMode as _}from"./i3s/BuildingFilterUtil.js";import{createGetFeatureExtent as E}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as w}from"./i3s/I3SMeshViewFilter.js";import{I3SQueryEngine as x}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as S}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as j}from"./i3s/I3SQueryFeatureStore.js";import{findFieldsCaseInsensitive as I,getIndexCrs as v}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as Q}from"./support/DefinitionExpressionSceneLayerView.js";import L from"../../layers/BuildingComponentSublayerView.js";import{getRequiredFields as q,getFetchPopupTemplate as A}from"../../layers/support/popupUtils.js";import{TaskPriority as R}from"../../support/Scheduler.js";let C=class extends(Q(g(m(L)))){constructor(){super(...arguments),this.type="building-component-sublayer-3d",this.layerView=null,this._elevationContext="scene",this._isIntegratedMesh=!1,this._supportsLabeling=!1,this.requiredFields=[],this.progressiveLoadFactor=1,this._queryEngine=null}get i3slayer(){return this.sublayer}get layerUid(){return this.sublayer.layer.uid}get sublayerUid(){return this.sublayer.uid}initialize(){this.updatingHandles.add((()=>[this.sublayer.renderer,this.definitionExpressionFields,this.filterExpressionFields]),(()=>this._updateRequiredFields())),this.updatingHandles.add((()=>this.sublayer.renderer),(e=>this._rendererChange(e)),a),this.updatingHandles.add((()=>[this.parsedDefinitionExpression,this.filter,i(this._filter,(({parsedWhereClause:e,parsedGeometry:r,sortedObjectIds:t})=>[e,r,t]))]),(()=>this._filterChange())),this.updatingHandles.add((()=>this.parsedFilterExpressions),(()=>this._updateSymbologyOverride()),a),this.addResolvingPromise(this._updateRequiredFields())}get lodFactor(){return this.view.qualitySettings.sceneService.object.lodFactor}get parsedFilterExpressions(){return"Overview"!==this.sublayer.modelName&&this.layerView?this.layerView.filterExpressions.map((([e,r])=>{let t;try{t=d.create(e,this.sublayer.fieldsIndex)}catch(o){return s.getLogger(this.declaredClass).error("Failed to parse filterExpression: "+o),null}if(!t.isStandardized)return s.getLogger(this.declaredClass).error("filterExpression is using non standard function"),null;const i=[],l=t.fieldNames;return I(l,this.sublayer.fields,{missingFields:i}),i.length>0?(s.getLogger(this.declaredClass).error(`filterExpression references unknown fields: ${i.join(", ")}`),null):[t,r]})).filter((e=>null!=e)):[]}get filter(){return l(this._filter)?this._filter.viewFilter:null}set filter(e){!o(e)&&w.checkSupport(e)?l(this._filter)?this._filter.viewFilter=e:this._filter=new w({viewFilter:e,layerFieldsIndex:this.sublayer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),applyFilters:()=>this._applyFilters(!0),addSqlFilter:(e,r)=>this.addSqlFilter(e,r,this.logError)}):this._filter=null}_updateSymbologyOverride(){const e=this.parsedFilterExpressions;e.length>0?this._setSymbologyOverride(((r,t)=>{for(const[i,l]of e)try{if(i.testFeature(r))return _(t,l)}catch(s){this.logError(s)}return _(t,null)}),this.filterExpressionFields):this._setSymbologyOverride(null,null)}get filterExpressionFields(){return h(this.sublayer.fieldsIndex,this.parsedFilterExpressions.reduce(((e,[r])=>e.concat(r.fieldNames)),new Array))}get availableFields(){const e=this.sublayer,r=e.fieldsIndex;let t=this.requiredFields;if(e.outFields||e.layer.outFields){const s=[...e.outFields||[],...e.layer.outFields||[]];t=[...y(r,s),...t]}return h(r,t)}_createLayerGraphic(e){const t=new r(null,null,e);return t.layer=this.sublayer.layer,t.sourceLayer=this.sublayer,t}canResume(){return super.canResume()&&(!this._controller||this._controller.rootNodeVisible)}async fetchPopupFeatures(e,r){const t=this._validateFetchPopupFeatures(r);if(t)throw t;if(o(r)||!r.clientGraphics||0===r.clientGraphics.length)return[];const i=[],a=[],n=l(this.sublayer.associatedLayer)?await this.sublayer.associatedLayer.load():this.sublayer,u=y(this.sublayer.fieldsIndex,await q(n,A(this.sublayer,r))),d=new Set;for(const s of r.clientGraphics)c(u,s,d)?a.push(s):i.push(s);return 0===a.length?i:(l(this.sublayer.associatedLayer)&&await this.sublayer.associatedLayer.load().catch((()=>s.getLogger(this.declaredClass).warn("Failed to load associated feature layer. Displaying popup attributes from cached attributes."))),this.whenGraphicAttributes(a,Array.from(d)).catch((()=>a)).then((e=>i.concat(e))))}async _updateRequiredFields(){const e=h(this.sublayer.fieldsIndex,[...this.sublayer.renderer?await this.sublayer.renderer.getRequiredFields(this.sublayer.fieldsIndex):[],...this.definitionExpressionFields||[],...this.filterExpressionFields||[]]);this._set("requiredFields",e)}_validateFetchPopupFeatures(e){const{sublayer:r}=this,{popupEnabled:s}=r;return s?A(r,e)?void 0:new t("buildingscenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{sublayer:r}):new t("buildingscenelayerview3d:fetchPopupFeatures","Popups are disabled",{sublayer:r})}getFilters(){const e=super.getFilters();return this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),l(this._filter)&&this._filter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return l(this.filter)?this.filter.createQuery(e):new f(e)}queryExtent(e,r){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),r?.signal)}queryFeatureCount(e,r){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),r?.signal)}queryFeatures(e,r){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),r?.signal).then((e=>{if(!e?.features)return e;const r=this.sublayer,t=r.layer;for(const s of e.features)s.layer=t,s.sourceLayer=r;return e}))}queryObjectIds(e,r){return this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),r?.signal)}_ensureQueryEngine(){return o(this._queryEngine)&&(this._queryEngine=this._createQueryEngine()),this._queryEngine}_createQueryEngine(){const e=E(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new x({layerView:this,priority:R.FEATURE_QUERY_ENGINE,spatialIndex:new j({featureAdapter:new S({objectIdField:this.sublayer.objectIdField,attributeStorageInfo:this.sublayer.attributeStorageInfo,getFeatureExtent:e}),toArray:()=>{const e=new Array;return this._forAllFeatures(((r,t,s)=>(e.push({id:r,index:t,meta:s}),F.CONTINUE)),null,b.ALL_IN_CLIPPING_AREA),e},forAllFeatures:(e,r)=>this._forAllFeatures(((r,t,s)=>e({id:r,index:t,meta:s})),r,b.ALL_IN_CLIPPING_AREA),getFeatureExtent:e,sourceSpatialReference:v(this.sublayer),viewSpatialReference:this.view.spatialReference})})}_ensureQuery(e){return this._addDefinitionExpressionToQuery(o(e)?this.createQuery():f.from(e))}};e([n()],C.prototype,"i3slayer",null),e([n()],C.prototype,"layerView",void 0),e([n()],C.prototype,"lodFactor",null),e([n({readOnly:!0})],C.prototype,"parsedFilterExpressions",null),e([n({type:p})],C.prototype,"filter",null),e([n()],C.prototype,"_filter",void 0),e([n({type:[String],readOnly:!0})],C.prototype,"filterExpressionFields",null),e([n({type:[String],readOnly:!0})],C.prototype,"requiredFields",void 0),e([n({type:[String],readOnly:!0})],C.prototype,"availableFields",null),C=e([u("esri.views.3d.layers.BuildingComponentSublayerView3D")],C);const V=C;export{V as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import s from"../../../core/Logger.js";import{applySome as i,isSome as l,isNone as o}from"../../../core/maybe.js";import{initial as a}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{WhereClause as d}from"../../../core/sql/WhereClause.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import p from"../../../layers/support/FeatureFilter.js";import{fixFields as h,unpackFieldNames as y,populateMissingFields as c}from"../../../layers/support/fieldUtils.js";import f from"../../../rest/support/Query.js";import{BuildingSublayerView3DMixin as g}from"./BuildingSublayerView3D.js";import{I3SMeshView3D as m}from"./I3SMeshView3D.js";import{ForAllFeaturesReturnType as F,ForAllFeaturesVisibilityMode as b}from"./II3SMeshView3D.js";import{applyFilterMode as _}from"./i3s/BuildingFilterUtil.js";import{createGetFeatureExtent as E}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as w}from"./i3s/I3SMeshViewFilter.js";import{I3SQueryEngine as x}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as S}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as I}from"./i3s/I3SQueryFeatureStore.js";import{findFieldsCaseInsensitive as j,getIndexCrs as v}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as Q}from"./support/DefinitionExpressionSceneLayerView.js";import L from"../../layers/BuildingComponentSublayerView.js";import{getRequiredFields as q,getFetchPopupTemplate as A}from"../../layers/support/popupUtils.js";import{TaskPriority as R}from"../../support/Scheduler.js";let C=class extends(Q(m(g(L)))){constructor(){super(...arguments),this.type="building-component-sublayer-3d",this.layerView=null,this._elevationContext="scene",this._isIntegratedMesh=!1,this._supportsLabeling=!1,this.requiredFields=[],this.progressiveLoadFactor=1,this._queryEngine=null}get i3slayer(){return this.sublayer}get layerUid(){return this.sublayer.layer.uid}get sublayerUid(){return this.sublayer.uid}get layerId(){return this.sublayer.layer.id}get sublayerId(){return this.sublayer.id}initialize(){this.updatingHandles.add((()=>[this.sublayer.renderer,this.definitionExpressionFields,this.filterExpressionFields]),(()=>this._updateRequiredFields())),this.updatingHandles.add((()=>this.sublayer.renderer),(e=>this._rendererChange(e)),a),this.updatingHandles.add((()=>[this.parsedDefinitionExpression,this.filter,i(this._filter,(({parsedWhereClause:e,parsedGeometry:r,sortedObjectIds:t})=>[e,r,t]))]),(()=>this._filterChange())),this.updatingHandles.add((()=>this.parsedFilterExpressions),(()=>this._updateSymbologyOverride()),a),this.addResolvingPromise(this._updateRequiredFields())}get lodFactor(){return this.view.qualitySettings.sceneService.object.lodFactor}get parsedFilterExpressions(){return"Overview"!==this.sublayer.modelName&&this.layerView?this.layerView.filterExpressions.map((([e,r])=>{let t;try{t=d.create(e,this.sublayer.fieldsIndex)}catch(o){return s.getLogger(this.declaredClass).error("Failed to parse filterExpression: "+o),null}if(!t.isStandardized)return s.getLogger(this.declaredClass).error("filterExpression is using non standard function"),null;const i=[],l=t.fieldNames;return j(l,this.sublayer.fields,{missingFields:i}),i.length>0?(s.getLogger(this.declaredClass).error(`filterExpression references unknown fields: ${i.join(", ")}`),null):[t,r]})).filter((e=>null!=e)):[]}get filter(){return l(this._filter)?this._filter.viewFilter:null}set filter(e){!o(e)&&w.checkSupport(e)?l(this._filter)?this._filter.viewFilter=e:this._filter=new w({viewFilter:e,layerFieldsIndex:this.sublayer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),applyFilters:()=>this._applyFilters(!0),addSqlFilter:(e,r)=>this.addSqlFilter(e,r,this.logError)}):this._filter=null}_updateSymbologyOverride(){const e=this.parsedFilterExpressions;e.length>0?this._setSymbologyOverride(((r,t)=>{for(const[i,l]of e)try{if(i.testFeature(r))return _(t,l)}catch(s){this.logError(s)}return _(t,null)}),this.filterExpressionFields):this._setSymbologyOverride(null,null)}get filterExpressionFields(){return h(this.sublayer.fieldsIndex,this.parsedFilterExpressions.reduce(((e,[r])=>e.concat(r.fieldNames)),new Array))}get availableFields(){const e=this.sublayer,r=e.fieldsIndex;let t=this.requiredFields;if(e.outFields||e.layer.outFields){const s=[...e.outFields||[],...e.layer.outFields||[]];t=[...y(r,s),...t]}return h(r,t)}_createLayerGraphic(e){const t=new r(null,null,e);return t.layer=this.sublayer.layer,t.sourceLayer=this.sublayer,t}canResume(){return super.canResume()&&(!this._controller||this._controller.rootNodeVisible)}async fetchPopupFeatures(e,r){const t=this._validateFetchPopupFeatures(r);if(t)throw t;if(o(r)||!r.clientGraphics||0===r.clientGraphics.length)return[];const i=[],a=[],n=l(this.sublayer.associatedLayer)?await this.sublayer.associatedLayer.load():this.sublayer,u=y(this.sublayer.fieldsIndex,await q(n,A(this.sublayer,r))),d=new Set;for(const s of r.clientGraphics)c(u,s,d)?a.push(s):i.push(s);return 0===a.length?i:(l(this.sublayer.associatedLayer)&&await this.sublayer.associatedLayer.load().catch((()=>s.getLogger(this.declaredClass).warn("Failed to load associated feature layer. Displaying popup attributes from cached attributes."))),this.whenGraphicAttributes(a,Array.from(d)).catch((()=>a)).then((e=>i.concat(e))))}async _updateRequiredFields(){const e=h(this.sublayer.fieldsIndex,[...this.sublayer.renderer?await this.sublayer.renderer.getRequiredFields(this.sublayer.fieldsIndex):[],...this.definitionExpressionFields||[],...this.filterExpressionFields||[]]);this._set("requiredFields",e)}_validateFetchPopupFeatures(e){const{sublayer:r}=this,{popupEnabled:s}=r;return s?A(r,e)?void 0:new t("buildingscenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{sublayer:r}):new t("buildingscenelayerview3d:fetchPopupFeatures","Popups are disabled",{sublayer:r})}getFilters(){const e=super.getFilters();return this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),l(this._filter)&&this._filter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return l(this.filter)?this.filter.createQuery(e):new f(e)}queryExtent(e,r){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),r?.signal)}queryFeatureCount(e,r){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),r?.signal)}queryFeatures(e,r){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),r?.signal).then((e=>{if(!e?.features)return e;const r=this.sublayer,t=r.layer;for(const s of e.features)s.layer=t,s.sourceLayer=r;return e}))}queryObjectIds(e,r){return this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),r?.signal)}_ensureQueryEngine(){return o(this._queryEngine)&&(this._queryEngine=this._createQueryEngine()),this._queryEngine}_createQueryEngine(){const e=E(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new x({layerView:this,priority:R.FEATURE_QUERY_ENGINE,spatialIndex:new I({featureAdapter:new S({objectIdField:this.sublayer.objectIdField,attributeStorageInfo:this.sublayer.attributeStorageInfo,getFeatureExtent:e}),toArray:()=>{const e=new Array;return this._forAllFeatures(((r,t,s)=>(e.push({id:r,index:t,meta:s}),F.CONTINUE)),null,b.ALL_IN_CLIPPING_AREA),e},forAllFeatures:(e,r)=>this._forAllFeatures(((r,t,s)=>e({id:r,index:t,meta:s})),r,b.ALL_IN_CLIPPING_AREA),getFeatureExtent:e,sourceSpatialReference:v(this.sublayer),viewSpatialReference:this.view.spatialReference})})}_ensureQuery(e){return this._addDefinitionExpressionToQuery(o(e)?this.createQuery():f.from(e))}};e([n()],C.prototype,"i3slayer",null),e([n()],C.prototype,"layerView",void 0),e([n()],C.prototype,"lodFactor",null),e([n({readOnly:!0})],C.prototype,"parsedFilterExpressions",null),e([n({type:p})],C.prototype,"filter",null),e([n()],C.prototype,"_filter",void 0),e([n({type:[String],readOnly:!0})],C.prototype,"filterExpressionFields",null),e([n({type:[String],readOnly:!0})],C.prototype,"requiredFields",void 0),e([n({type:[String],readOnly:!0})],C.prototype,"availableFields",null),C=e([u("esri.views.3d.layers.BuildingComponentSublayerView3D")],C);const V=C;export{V as default};