@arcgis/core 4.28.0-rc.0 → 4.28.0-rc.1

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 (441) hide show
  1. package/assets/components/assets/icon/addConstant16.json +1 -0
  2. package/assets/components/assets/icon/addConstant24.json +1 -0
  3. package/assets/components/assets/icon/addConstant32.json +1 -0
  4. package/assets/components/assets/icon/addRasterVariable16.json +1 -0
  5. package/assets/components/assets/icon/addRasterVariable24.json +1 -0
  6. package/assets/components/assets/icon/addRasterVariable32.json +1 -0
  7. package/assets/components/assets/icon/addRasters16.json +1 -0
  8. package/assets/components/assets/icon/addRasters24.json +1 -0
  9. package/assets/components/assets/icon/addRasters32.json +1 -0
  10. package/assets/components/assets/icon/alertOffCircle16F.json +1 -0
  11. package/assets/components/assets/icon/alertOffCircle24F.json +1 -0
  12. package/assets/components/assets/icon/alertOffCircle32F.json +1 -0
  13. package/assets/components/assets/icon/boxChartSeries16.json +1 -0
  14. package/assets/components/assets/icon/boxChartSeries24.json +1 -0
  15. package/assets/components/assets/icon/boxChartSeries32.json +1 -0
  16. package/assets/components/assets/icon/breakRecurrence16.json +1 -0
  17. package/assets/components/assets/icon/breakRecurrence24.json +1 -0
  18. package/assets/components/assets/icon/breakRecurrence32.json +1 -0
  19. package/assets/components/assets/icon/bulletPoint16.json +1 -1
  20. package/assets/components/assets/icon/bulletPoint24.json +1 -1
  21. package/assets/components/assets/icon/bulletPoint32.json +1 -1
  22. package/assets/components/assets/icon/bulletPointLarge16.json +1 -0
  23. package/assets/components/assets/icon/bulletPointLarge24.json +1 -0
  24. package/assets/components/assets/icon/bulletPointLarge32.json +1 -0
  25. package/assets/components/assets/icon/chevronEnd16.json +1 -0
  26. package/assets/components/assets/icon/chevronEnd24.json +1 -0
  27. package/assets/components/assets/icon/chevronEnd32.json +1 -0
  28. package/assets/components/assets/icon/chevronStart16.json +1 -0
  29. package/assets/components/assets/icon/chevronStart24.json +1 -0
  30. package/assets/components/assets/icon/chevronStart32.json +1 -0
  31. package/assets/components/assets/icon/configureGridUnit16.json +1 -0
  32. package/assets/components/assets/icon/configureGridUnit24.json +1 -0
  33. package/assets/components/assets/icon/configureGridUnit32.json +1 -0
  34. package/assets/components/assets/icon/dimensionsUnit16.json +1 -0
  35. package/assets/components/assets/icon/dimensionsUnit24.json +1 -0
  36. package/assets/components/assets/icon/dimensionsUnit32.json +1 -0
  37. package/assets/components/assets/icon/dimensionsWall16.json +1 -0
  38. package/assets/components/assets/icon/dimensionsWall24.json +1 -0
  39. package/assets/components/assets/icon/dimensionsWall32.json +1 -0
  40. package/assets/components/assets/icon/flipVertical16.json +1 -0
  41. package/assets/components/assets/icon/flipVertical24.json +1 -0
  42. package/assets/components/assets/icon/flipVertical32.json +1 -0
  43. package/assets/components/assets/icon/imageCollectionExplorer16.json +1 -0
  44. package/assets/components/assets/icon/imageCollectionExplorer24.json +1 -0
  45. package/assets/components/assets/icon/imageCollectionExplorer32.json +1 -0
  46. package/assets/components/assets/icon/imageMagnifyingGlass16.json +1 -0
  47. package/assets/components/assets/icon/imageMagnifyingGlass24.json +1 -0
  48. package/assets/components/assets/icon/imageMagnifyingGlass32.json +1 -0
  49. package/assets/components/assets/icon/launch216.json +1 -0
  50. package/assets/components/assets/icon/launch224.json +1 -0
  51. package/assets/components/assets/icon/launch232.json +1 -0
  52. package/assets/components/assets/icon/mergeDetails16.json +1 -0
  53. package/assets/components/assets/icon/mergeDetails24.json +1 -0
  54. package/assets/components/assets/icon/mergeDetails32.json +1 -0
  55. package/assets/components/assets/icon/mergeUnits16.json +1 -0
  56. package/assets/components/assets/icon/mergeUnits24.json +1 -0
  57. package/assets/components/assets/icon/mergeUnits32.json +1 -0
  58. package/assets/components/assets/icon/minusCircle16F.json +1 -0
  59. package/assets/components/assets/icon/minusCircle24F.json +1 -0
  60. package/assets/components/assets/icon/minusCircle32F.json +1 -0
  61. package/assets/components/assets/icon/polygonSelect16.json +1 -0
  62. package/assets/components/assets/icon/polygonSelect24.json +1 -0
  63. package/assets/components/assets/icon/polygonSelect32.json +1 -0
  64. package/assets/components/assets/icon/projectMission16.json +1 -0
  65. package/assets/components/assets/icon/projectMission24.json +1 -0
  66. package/assets/components/assets/icon/projectMission32.json +1 -0
  67. package/assets/components/assets/icon/projectTemplate16.json +1 -0
  68. package/assets/components/assets/icon/projectTemplate24.json +1 -0
  69. package/assets/components/assets/icon/projectTemplate32.json +1 -0
  70. package/assets/components/assets/icon/properties16.json +1 -0
  71. package/assets/components/assets/icon/properties24.json +1 -0
  72. package/assets/components/assets/icon/properties32.json +1 -0
  73. package/assets/components/assets/icon/saveAs16.json +1 -0
  74. package/assets/components/assets/icon/saveAs24.json +1 -0
  75. package/assets/components/assets/icon/saveAs32.json +1 -0
  76. package/assets/components/assets/icon/splitUnits16.json +1 -0
  77. package/assets/components/assets/icon/splitUnits24.json +1 -0
  78. package/assets/components/assets/icon/splitUnits32.json +1 -0
  79. package/assets/components/assets/icon/storage16.json +1 -0
  80. package/assets/components/assets/icon/storage24.json +1 -0
  81. package/assets/components/assets/icon/storage32.json +1 -0
  82. package/assets/components/assets/panel/t9n/messages.json +3 -1
  83. package/assets/components/assets/panel/t9n/messages_ar.json +3 -1
  84. package/assets/components/assets/panel/t9n/messages_bg.json +3 -1
  85. package/assets/components/assets/panel/t9n/messages_bs.json +3 -1
  86. package/assets/components/assets/panel/t9n/messages_ca.json +3 -1
  87. package/assets/components/assets/panel/t9n/messages_cs.json +3 -1
  88. package/assets/components/assets/panel/t9n/messages_da.json +3 -1
  89. package/assets/components/assets/panel/t9n/messages_de.json +3 -1
  90. package/assets/components/assets/panel/t9n/messages_el.json +3 -1
  91. package/assets/components/assets/panel/t9n/messages_en.json +3 -1
  92. package/assets/components/assets/panel/t9n/messages_es.json +3 -1
  93. package/assets/components/assets/panel/t9n/messages_et.json +3 -1
  94. package/assets/components/assets/panel/t9n/messages_fi.json +3 -1
  95. package/assets/components/assets/panel/t9n/messages_fr.json +3 -1
  96. package/assets/components/assets/panel/t9n/messages_he.json +3 -1
  97. package/assets/components/assets/panel/t9n/messages_hr.json +3 -1
  98. package/assets/components/assets/panel/t9n/messages_hu.json +3 -1
  99. package/assets/components/assets/panel/t9n/messages_id.json +3 -1
  100. package/assets/components/assets/panel/t9n/messages_it.json +3 -1
  101. package/assets/components/assets/panel/t9n/messages_ja.json +3 -1
  102. package/assets/components/assets/panel/t9n/messages_ko.json +3 -1
  103. package/assets/components/assets/panel/t9n/messages_lt.json +3 -1
  104. package/assets/components/assets/panel/t9n/messages_lv.json +3 -1
  105. package/assets/components/assets/panel/t9n/messages_nl.json +3 -1
  106. package/assets/components/assets/panel/t9n/messages_no.json +3 -1
  107. package/assets/components/assets/panel/t9n/messages_pl.json +3 -1
  108. package/assets/components/assets/panel/t9n/messages_pt-BR.json +3 -1
  109. package/assets/components/assets/panel/t9n/messages_pt-PT.json +3 -1
  110. package/assets/components/assets/panel/t9n/messages_ro.json +3 -1
  111. package/assets/components/assets/panel/t9n/messages_ru.json +3 -1
  112. package/assets/components/assets/panel/t9n/messages_sk.json +3 -1
  113. package/assets/components/assets/panel/t9n/messages_sl.json +3 -1
  114. package/assets/components/assets/panel/t9n/messages_sr.json +3 -1
  115. package/assets/components/assets/panel/t9n/messages_sv.json +3 -1
  116. package/assets/components/assets/panel/t9n/messages_th.json +3 -1
  117. package/assets/components/assets/panel/t9n/messages_tr.json +3 -1
  118. package/assets/components/assets/panel/t9n/messages_uk.json +3 -1
  119. package/assets/components/assets/panel/t9n/messages_vi.json +3 -1
  120. package/assets/components/assets/panel/t9n/messages_zh-CN.json +3 -1
  121. package/assets/components/assets/panel/t9n/messages_zh-HK.json +3 -1
  122. package/assets/components/assets/panel/t9n/messages_zh-TW.json +3 -1
  123. package/assets/components/assets/table/t9n/messages_ar.json +5 -5
  124. package/assets/components/assets/table/t9n/messages_bg.json +5 -5
  125. package/assets/components/assets/table/t9n/messages_bs.json +5 -5
  126. package/assets/components/assets/table/t9n/messages_ca.json +5 -5
  127. package/assets/components/assets/table/t9n/messages_cs.json +5 -5
  128. package/assets/components/assets/table/t9n/messages_da.json +5 -5
  129. package/assets/components/assets/table/t9n/messages_de.json +5 -5
  130. package/assets/components/assets/table/t9n/messages_el.json +5 -5
  131. package/assets/components/assets/table/t9n/messages_es.json +5 -5
  132. package/assets/components/assets/table/t9n/messages_et.json +5 -5
  133. package/assets/components/assets/table/t9n/messages_fi.json +5 -5
  134. package/assets/components/assets/table/t9n/messages_fr.json +4 -4
  135. package/assets/components/assets/table/t9n/messages_he.json +5 -5
  136. package/assets/components/assets/table/t9n/messages_hr.json +5 -5
  137. package/assets/components/assets/table/t9n/messages_hu.json +5 -5
  138. package/assets/components/assets/table/t9n/messages_id.json +5 -5
  139. package/assets/components/assets/table/t9n/messages_it.json +5 -5
  140. package/assets/components/assets/table/t9n/messages_ja.json +5 -5
  141. package/assets/components/assets/table/t9n/messages_ko.json +5 -5
  142. package/assets/components/assets/table/t9n/messages_lt.json +5 -5
  143. package/assets/components/assets/table/t9n/messages_lv.json +5 -5
  144. package/assets/components/assets/table/t9n/messages_nl.json +5 -5
  145. package/assets/components/assets/table/t9n/messages_no.json +5 -5
  146. package/assets/components/assets/table/t9n/messages_pl.json +5 -5
  147. package/assets/components/assets/table/t9n/messages_pt-BR.json +5 -5
  148. package/assets/components/assets/table/t9n/messages_pt-PT.json +5 -5
  149. package/assets/components/assets/table/t9n/messages_ro.json +5 -5
  150. package/assets/components/assets/table/t9n/messages_ru.json +5 -5
  151. package/assets/components/assets/table/t9n/messages_sk.json +5 -5
  152. package/assets/components/assets/table/t9n/messages_sl.json +5 -5
  153. package/assets/components/assets/table/t9n/messages_sr.json +5 -5
  154. package/assets/components/assets/table/t9n/messages_sv.json +5 -5
  155. package/assets/components/assets/table/t9n/messages_th.json +5 -5
  156. package/assets/components/assets/table/t9n/messages_tr.json +5 -5
  157. package/assets/components/assets/table/t9n/messages_uk.json +5 -5
  158. package/assets/components/assets/table/t9n/messages_vi.json +5 -5
  159. package/assets/components/assets/table/t9n/messages_zh-CN.json +5 -5
  160. package/assets/components/assets/table/t9n/messages_zh-HK.json +5 -5
  161. package/assets/components/assets/table/t9n/messages_zh-TW.json +5 -5
  162. package/assets/components/assets/table-cell/t9n/messages_ar.json +5 -5
  163. package/assets/components/assets/table-cell/t9n/messages_bg.json +5 -5
  164. package/assets/components/assets/table-cell/t9n/messages_bs.json +5 -5
  165. package/assets/components/assets/table-cell/t9n/messages_ca.json +5 -5
  166. package/assets/components/assets/table-cell/t9n/messages_cs.json +5 -5
  167. package/assets/components/assets/table-cell/t9n/messages_da.json +5 -5
  168. package/assets/components/assets/table-cell/t9n/messages_de.json +5 -5
  169. package/assets/components/assets/table-cell/t9n/messages_el.json +5 -5
  170. package/assets/components/assets/table-cell/t9n/messages_es.json +5 -5
  171. package/assets/components/assets/table-cell/t9n/messages_et.json +5 -5
  172. package/assets/components/assets/table-cell/t9n/messages_fi.json +5 -5
  173. package/assets/components/assets/table-cell/t9n/messages_fr.json +5 -5
  174. package/assets/components/assets/table-cell/t9n/messages_he.json +5 -5
  175. package/assets/components/assets/table-cell/t9n/messages_hr.json +5 -5
  176. package/assets/components/assets/table-cell/t9n/messages_hu.json +5 -5
  177. package/assets/components/assets/table-cell/t9n/messages_id.json +5 -5
  178. package/assets/components/assets/table-cell/t9n/messages_it.json +5 -5
  179. package/assets/components/assets/table-cell/t9n/messages_ja.json +5 -5
  180. package/assets/components/assets/table-cell/t9n/messages_ko.json +5 -5
  181. package/assets/components/assets/table-cell/t9n/messages_lt.json +5 -5
  182. package/assets/components/assets/table-cell/t9n/messages_lv.json +5 -5
  183. package/assets/components/assets/table-cell/t9n/messages_nl.json +5 -5
  184. package/assets/components/assets/table-cell/t9n/messages_no.json +5 -5
  185. package/assets/components/assets/table-cell/t9n/messages_pl.json +5 -5
  186. package/assets/components/assets/table-cell/t9n/messages_pt-BR.json +5 -5
  187. package/assets/components/assets/table-cell/t9n/messages_pt-PT.json +5 -5
  188. package/assets/components/assets/table-cell/t9n/messages_ro.json +5 -5
  189. package/assets/components/assets/table-cell/t9n/messages_ru.json +5 -5
  190. package/assets/components/assets/table-cell/t9n/messages_sk.json +5 -5
  191. package/assets/components/assets/table-cell/t9n/messages_sl.json +5 -5
  192. package/assets/components/assets/table-cell/t9n/messages_sr.json +5 -5
  193. package/assets/components/assets/table-cell/t9n/messages_sv.json +5 -5
  194. package/assets/components/assets/table-cell/t9n/messages_th.json +5 -5
  195. package/assets/components/assets/table-cell/t9n/messages_tr.json +5 -5
  196. package/assets/components/assets/table-cell/t9n/messages_uk.json +5 -5
  197. package/assets/components/assets/table-cell/t9n/messages_vi.json +5 -5
  198. package/assets/components/assets/table-cell/t9n/messages_zh-CN.json +5 -5
  199. package/assets/components/assets/table-cell/t9n/messages_zh-HK.json +5 -5
  200. package/assets/components/assets/table-cell/t9n/messages_zh-TW.json +5 -5
  201. package/assets/components/assets/table-header/t9n/messages_ar.json +6 -6
  202. package/assets/components/assets/table-header/t9n/messages_bg.json +6 -6
  203. package/assets/components/assets/table-header/t9n/messages_bs.json +6 -6
  204. package/assets/components/assets/table-header/t9n/messages_ca.json +6 -6
  205. package/assets/components/assets/table-header/t9n/messages_cs.json +6 -6
  206. package/assets/components/assets/table-header/t9n/messages_da.json +6 -6
  207. package/assets/components/assets/table-header/t9n/messages_de.json +6 -6
  208. package/assets/components/assets/table-header/t9n/messages_el.json +6 -6
  209. package/assets/components/assets/table-header/t9n/messages_es.json +6 -6
  210. package/assets/components/assets/table-header/t9n/messages_et.json +6 -6
  211. package/assets/components/assets/table-header/t9n/messages_fi.json +6 -6
  212. package/assets/components/assets/table-header/t9n/messages_fr.json +6 -6
  213. package/assets/components/assets/table-header/t9n/messages_he.json +6 -6
  214. package/assets/components/assets/table-header/t9n/messages_hr.json +6 -6
  215. package/assets/components/assets/table-header/t9n/messages_hu.json +6 -6
  216. package/assets/components/assets/table-header/t9n/messages_id.json +6 -6
  217. package/assets/components/assets/table-header/t9n/messages_it.json +6 -6
  218. package/assets/components/assets/table-header/t9n/messages_ja.json +6 -6
  219. package/assets/components/assets/table-header/t9n/messages_ko.json +6 -6
  220. package/assets/components/assets/table-header/t9n/messages_lt.json +6 -6
  221. package/assets/components/assets/table-header/t9n/messages_lv.json +6 -6
  222. package/assets/components/assets/table-header/t9n/messages_nl.json +6 -6
  223. package/assets/components/assets/table-header/t9n/messages_no.json +6 -6
  224. package/assets/components/assets/table-header/t9n/messages_pl.json +6 -6
  225. package/assets/components/assets/table-header/t9n/messages_pt-BR.json +6 -6
  226. package/assets/components/assets/table-header/t9n/messages_pt-PT.json +6 -6
  227. package/assets/components/assets/table-header/t9n/messages_ro.json +6 -6
  228. package/assets/components/assets/table-header/t9n/messages_ru.json +6 -6
  229. package/assets/components/assets/table-header/t9n/messages_sk.json +6 -6
  230. package/assets/components/assets/table-header/t9n/messages_sl.json +6 -6
  231. package/assets/components/assets/table-header/t9n/messages_sr.json +6 -6
  232. package/assets/components/assets/table-header/t9n/messages_sv.json +6 -6
  233. package/assets/components/assets/table-header/t9n/messages_th.json +6 -6
  234. package/assets/components/assets/table-header/t9n/messages_tr.json +6 -6
  235. package/assets/components/assets/table-header/t9n/messages_uk.json +6 -6
  236. package/assets/components/assets/table-header/t9n/messages_vi.json +6 -6
  237. package/assets/components/assets/table-header/t9n/messages_zh-CN.json +6 -6
  238. package/assets/components/assets/table-header/t9n/messages_zh-HK.json +6 -6
  239. package/assets/components/assets/table-header/t9n/messages_zh-TW.json +6 -6
  240. package/assets/components/assets/time-picker/t9n/messages_ar.json +3 -0
  241. package/assets/components/assets/time-picker/t9n/messages_bg.json +3 -0
  242. package/assets/components/assets/time-picker/t9n/messages_bs.json +3 -0
  243. package/assets/components/assets/time-picker/t9n/messages_ca.json +3 -0
  244. package/assets/components/assets/time-picker/t9n/messages_cs.json +3 -0
  245. package/assets/components/assets/time-picker/t9n/messages_da.json +3 -0
  246. package/assets/components/assets/time-picker/t9n/messages_de.json +3 -0
  247. package/assets/components/assets/time-picker/t9n/messages_el.json +3 -0
  248. package/assets/components/assets/time-picker/t9n/messages_es.json +3 -0
  249. package/assets/components/assets/time-picker/t9n/messages_et.json +3 -0
  250. package/assets/components/assets/time-picker/t9n/messages_fi.json +3 -0
  251. package/assets/components/assets/time-picker/t9n/messages_fr.json +3 -0
  252. package/assets/components/assets/time-picker/t9n/messages_he.json +3 -0
  253. package/assets/components/assets/time-picker/t9n/messages_hr.json +3 -0
  254. package/assets/components/assets/time-picker/t9n/messages_hu.json +3 -0
  255. package/assets/components/assets/time-picker/t9n/messages_id.json +3 -0
  256. package/assets/components/assets/time-picker/t9n/messages_it.json +3 -0
  257. package/assets/components/assets/time-picker/t9n/messages_ja.json +3 -0
  258. package/assets/components/assets/time-picker/t9n/messages_ko.json +3 -0
  259. package/assets/components/assets/time-picker/t9n/messages_lt.json +3 -0
  260. package/assets/components/assets/time-picker/t9n/messages_lv.json +3 -0
  261. package/assets/components/assets/time-picker/t9n/messages_nl.json +3 -0
  262. package/assets/components/assets/time-picker/t9n/messages_no.json +3 -0
  263. package/assets/components/assets/time-picker/t9n/messages_pl.json +3 -0
  264. package/assets/components/assets/time-picker/t9n/messages_pt-BR.json +3 -0
  265. package/assets/components/assets/time-picker/t9n/messages_pt-PT.json +3 -0
  266. package/assets/components/assets/time-picker/t9n/messages_ro.json +3 -0
  267. package/assets/components/assets/time-picker/t9n/messages_ru.json +3 -0
  268. package/assets/components/assets/time-picker/t9n/messages_sk.json +3 -0
  269. package/assets/components/assets/time-picker/t9n/messages_sl.json +3 -0
  270. package/assets/components/assets/time-picker/t9n/messages_sr.json +3 -0
  271. package/assets/components/assets/time-picker/t9n/messages_sv.json +3 -0
  272. package/assets/components/assets/time-picker/t9n/messages_th.json +3 -0
  273. package/assets/components/assets/time-picker/t9n/messages_tr.json +3 -0
  274. package/assets/components/assets/time-picker/t9n/messages_uk.json +3 -0
  275. package/assets/components/assets/time-picker/t9n/messages_vi.json +3 -0
  276. package/assets/components/assets/time-picker/t9n/messages_zh-CN.json +3 -0
  277. package/assets/components/assets/time-picker/t9n/messages_zh-HK.json +3 -0
  278. package/assets/components/assets/time-picker/t9n/messages_zh-TW.json +3 -0
  279. package/assets/esri/core/workers/RemoteClient.js +1 -1
  280. package/assets/esri/core/workers/chunks/{02120d192eafd7612475.js → 0036b6df93a17e57e3b9.js} +1 -1
  281. package/assets/esri/core/workers/chunks/09886c56427c4b3f18b5.js +1 -0
  282. package/assets/esri/core/workers/chunks/{24a0cf405195421c0d06.js → 1461910bd37aea28948b.js} +1 -1
  283. package/assets/esri/core/workers/chunks/{d60d5f006375f7fcc88c.js → 16d45f439b89da3ec835.js} +1 -1
  284. package/assets/esri/core/workers/chunks/1ef3533abdd937ae2794.js +1 -0
  285. package/assets/esri/core/workers/chunks/31cb4c73764555b40328.js +1 -0
  286. package/assets/esri/core/workers/chunks/{40633064c290dc2af9ea.js → 369f2ef414498c17a05a.js} +1 -1
  287. package/assets/esri/core/workers/chunks/435f04e3964b1c6d4880.js +1 -0
  288. package/assets/esri/core/workers/chunks/4781e2011a32d7724889.js +1 -0
  289. package/assets/esri/core/workers/chunks/{18ab9cc85a1a7988fdfd.js → 4c3345ffbe79ee0167fb.js} +1 -1
  290. package/assets/esri/core/workers/chunks/4e60ac00b15b34a3b5f5.js +1 -0
  291. package/assets/esri/core/workers/chunks/505132c47dbdf5fdeacc.js +1 -0
  292. package/assets/esri/core/workers/chunks/{a5a7bbdd8298016535bc.js → 7f6840c53a456524b74c.js} +1 -1
  293. package/assets/esri/core/workers/chunks/{36ab90fb34b9716a9983.js → 8634d6a62f4de973e39b.js} +1 -1
  294. package/assets/esri/core/workers/chunks/a9a0194120ec65a00f6d.js +1 -0
  295. package/assets/esri/core/workers/chunks/adf6bcf2447c95aeb440.js +1 -0
  296. package/assets/esri/core/workers/chunks/aeb3efa91165dd3d2493.js.LICENSE.txt +1 -1
  297. package/assets/esri/core/workers/chunks/b3243695e0edfcbca276.js +1 -0
  298. package/assets/esri/core/workers/chunks/{e8c7cc974420c0b92d0e.js → b98a2191cb997d632438.js} +1 -1
  299. package/assets/esri/core/workers/chunks/c0061d993e1ede22b1dc.js +1 -0
  300. package/assets/esri/core/workers/chunks/{f2718e260f594537f7fd.js → c2be3b9aa28e454cf931.js} +1 -1
  301. package/assets/esri/core/workers/chunks/c4df42fe859a9115a6e4.js +1 -0
  302. package/assets/esri/core/workers/chunks/{52cef7cd3aaaa4f45c94.js → c607fe4df3ca054f9aa8.js} +1 -1
  303. package/assets/esri/core/workers/chunks/{e93442c6d92229f3a4b0.js → ca023e409bb7de9a69ab.js} +1 -1
  304. package/assets/esri/core/workers/chunks/{8f3680fee85a05839489.js → e52b9e423c0ba4134309.js} +1 -1
  305. package/assets/esri/core/workers/chunks/{c92e75b79aff7b505b31.js → e53df0f018a82e3a35bd.js} +1 -1
  306. package/assets/esri/core/workers/chunks/ea953f5a0a975f7bd7b9.js +1 -0
  307. package/assets/esri/core/workers/chunks/f183a4b52095e4c498b4.js +1 -0
  308. package/assets/esri/core/workers/chunks/{8e4c4ba900a90373217f.js → f221b9c6ae6c7eb4ca01.js} +1 -1
  309. package/assets/esri/core/workers/chunks/{0beebbb0c6dad0e742d7.js → f72a5af2a7ca1536f10a.js} +1 -1
  310. package/assets/esri/core/workers/chunks/{adfbc168be8c49b51e1b.js → f99deed4120f605b6cd6.js} +1 -1
  311. package/assets/esri/t9n/common.json +1 -1
  312. package/assets/esri/t9n/common_ar.json +1 -1
  313. package/assets/esri/t9n/common_bg.json +1 -1
  314. package/assets/esri/t9n/common_bs.json +1 -1
  315. package/assets/esri/t9n/common_ca.json +1 -1
  316. package/assets/esri/t9n/common_cs.json +1 -1
  317. package/assets/esri/t9n/common_da.json +1 -1
  318. package/assets/esri/t9n/common_de.json +1 -1
  319. package/assets/esri/t9n/common_el.json +1 -1
  320. package/assets/esri/t9n/common_en.json +1 -1
  321. package/assets/esri/t9n/common_es.json +1 -1
  322. package/assets/esri/t9n/common_et.json +1 -1
  323. package/assets/esri/t9n/common_fi.json +1 -1
  324. package/assets/esri/t9n/common_fr.json +1 -1
  325. package/assets/esri/t9n/common_he.json +1 -1
  326. package/assets/esri/t9n/common_hr.json +1 -1
  327. package/assets/esri/t9n/common_hu.json +1 -1
  328. package/assets/esri/t9n/common_id.json +1 -1
  329. package/assets/esri/t9n/common_it.json +1 -1
  330. package/assets/esri/t9n/common_ja.json +1 -1
  331. package/assets/esri/t9n/common_ko.json +1 -1
  332. package/assets/esri/t9n/common_lt.json +1 -1
  333. package/assets/esri/t9n/common_lv.json +1 -1
  334. package/assets/esri/t9n/common_nb.json +1 -1
  335. package/assets/esri/t9n/common_nl.json +1 -1
  336. package/assets/esri/t9n/common_pl.json +1 -1
  337. package/assets/esri/t9n/common_pt-BR.json +1 -1
  338. package/assets/esri/t9n/common_pt-PT.json +1 -1
  339. package/assets/esri/t9n/common_ro.json +1 -1
  340. package/assets/esri/t9n/common_ru.json +1 -1
  341. package/assets/esri/t9n/common_sk.json +1 -1
  342. package/assets/esri/t9n/common_sl.json +1 -1
  343. package/assets/esri/t9n/common_sr.json +1 -1
  344. package/assets/esri/t9n/common_sv.json +1 -1
  345. package/assets/esri/t9n/common_th.json +1 -1
  346. package/assets/esri/t9n/common_tr.json +1 -1
  347. package/assets/esri/t9n/common_uk.json +1 -1
  348. package/assets/esri/t9n/common_vi.json +1 -1
  349. package/assets/esri/t9n/common_zh-CN.json +1 -1
  350. package/assets/esri/t9n/common_zh-HK.json +1 -1
  351. package/assets/esri/t9n/common_zh-TW.json +1 -1
  352. package/assets/esri/themes/base/widgets/_FeatureForm.scss +10 -14
  353. package/assets/esri/themes/dark/main.css +1 -1
  354. package/assets/esri/themes/light/main.css +1 -1
  355. package/assets/esri/themes/light/view.css +1 -1
  356. package/chunks/ComponentShader.glsl.js +27 -27
  357. package/core/sql/WhereClauseCache.js +1 -1
  358. package/geometry/support/meshUtils/loadExternal.js +1 -1
  359. package/interfaces.d.ts +3 -19
  360. package/kernel.js +1 -1
  361. package/layers/graphics/data/AttributesBuilder.js +1 -1
  362. package/layers/graphics/data/FeatureStore.js +1 -1
  363. package/layers/graphics/data/QueryEngine.js +1 -1
  364. package/layers/graphics/data/QueryEngineResult.js +1 -1
  365. package/layers/graphics/data/attributeSupport.js +1 -1
  366. package/layers/graphics/data/geometryUtils.js +5 -0
  367. package/layers/graphics/data/queryUtils.js +5 -0
  368. package/layers/graphics/data/queryValidationUtils.js +5 -0
  369. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  370. package/layers/support/fieldProperties.js +1 -1
  371. package/layers/support/rasterFormats/Lerc.js +1 -1
  372. package/layers/support/rasterFormats/RasterCodec.js +1 -1
  373. package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
  374. package/package.json +2 -2
  375. package/support/revision.js +1 -1
  376. package/symbols/cim/CIMSymbolHelper.js +1 -1
  377. package/views/2d/engine/BitmapContainer.js +1 -1
  378. package/views/2d/engine/BitmapTile.js +1 -1
  379. package/views/2d/engine/Container.js +1 -1
  380. package/views/2d/engine/DisplayObject.js +1 -1
  381. package/views/2d/engine/FeatureContainer.js +1 -1
  382. package/views/2d/engine/Stage.js +1 -1
  383. package/views/2d/engine/flow/FlowContainer.js +1 -1
  384. package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
  385. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  386. package/views/2d/engine/webgl/Painter.js +1 -1
  387. package/views/2d/engine/webgl/TileContainer.js +1 -1
  388. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  389. package/views/2d/layers/GroupLayerView2D.js +1 -1
  390. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  391. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  392. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  393. package/views/2d/layers/features/support/FeatureFilter.js +1 -1
  394. package/views/3d/glTF/internal/Resource.js +1 -1
  395. package/views/3d/layers/I3SMeshView3D.js +1 -1
  396. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  397. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  398. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  399. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  400. package/views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardByOpacity.glsl.js +1 -1
  401. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +54 -33
  402. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +1 -2
  403. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  404. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  405. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  406. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  407. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  408. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  409. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  410. package/views/DOMContainer.js +1 -1
  411. package/views/interactive/SegmentLabels.js +1 -1
  412. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  413. package/webdoc/webdocLoadUtils.js +1 -1
  414. package/widgets/Editor/EditorViewModel.js +1 -1
  415. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  416. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  417. package/widgets/FeatureForm/InputBase.js +1 -1
  418. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  419. package/widgets/FeatureForm/css.js +1 -1
  420. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  421. package/widgets/FeatureForm.js +1 -1
  422. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  423. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  424. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  425. package/assets/esri/core/workers/chunks/112e89da628bdea5355c.js +0 -1
  426. package/assets/esri/core/workers/chunks/1856d16d738f44f58084.js +0 -1
  427. package/assets/esri/core/workers/chunks/1a36703ebe934749646e.js +0 -1
  428. package/assets/esri/core/workers/chunks/3e40c8402ff7a8fe48b9.js +0 -1
  429. package/assets/esri/core/workers/chunks/3ea0b872436fce84b927.js +0 -1
  430. package/assets/esri/core/workers/chunks/42ec4c80b0c2944cd65c.js +0 -1
  431. package/assets/esri/core/workers/chunks/6b1856303d1562f05100.js +0 -1
  432. package/assets/esri/core/workers/chunks/784ffd52315a4d55d683.js +0 -1
  433. package/assets/esri/core/workers/chunks/97aecf210938015cc7a3.js +0 -1
  434. package/assets/esri/core/workers/chunks/b4f31d291c05b5f8ddac.js +0 -1
  435. package/assets/esri/core/workers/chunks/b99bc08a01e9250b0a31.js +0 -1
  436. package/assets/esri/core/workers/chunks/dca925a0d73f967f6897.js +0 -1
  437. package/assets/esri/core/workers/chunks/e8688b6cc3b3c1010b43.js +0 -1
  438. package/assets/esri/core/workers/chunks/eda86faa708cfe4c9f9a.js +0 -1
  439. package/layers/graphics/data/utils.js +0 -5
  440. package/views/2d/engine/webgl/GroupContainer.js +0 -5
  441. package/views/3d/analysis/DimensionAnalysisView3D.d.ts +0 -4
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import"../../../../renderers/ClassBreaksRenderer.js";import"../../../../renderers/DictionaryRenderer.js";import"../../../../renderers/DotDensityRenderer.js";import"../../../../renderers/HeatmapRenderer.js";import"../../../../renderers/PieChartRenderer.js";import"../../../../renderers/Renderer.js";import"../../../../renderers/SimpleRenderer.js";import t from"../../../../renderers/UniqueValueRenderer.js";import"../../../../renderers/support/jsonUtils.js";import i from"../../../../core/Logger.js";import"../../../../symbols.js";import r from"../../../../core/Accessor.js";import{isSome as s}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import a from"../../../../core/Error.js";import{makeHandle as n}from"../../../../core/handleUtils.js";import{someMap as o,findInMap as l}from"../../../../core/MapUtils.js";import{destroyMaybe as h,removeMaybe as d,disposeMaybe as p}from"../../../../core/maybe.js";import c from"../../../../core/PooledArray.js";import{throwIfAborted as y,createResolver as g,isAbortError as m}from"../../../../core/promiseUtils.js";import{watch as u,when as b,on as _,syncAndInitial as f,whenOnce as v}from"../../../../core/reactiveUtils.js";import{schedule as C}from"../../../../core/scheduling.js";import{property as S}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as w}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as G,isEmpty as R}from"../../../../core/accessorSupport/diffUtils.js";import{s as P,g as x,i as D}from"../../../../chunks/vec3.js";import{c as E}from"../../../../chunks/vec3f64.js";import{canProjectWithoutEngine as I}from"../../../../geometry/projection.js";import{projectBuffer as U}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as A}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as j}from"../../../../geometry/projection/projectXYZToVector.js";import{create as L,center as V,fromRect as O,equals as F}from"../../../../geometry/support/aaBoundingBox.js";import{create as T}from"../../../../geometry/support/aaBoundingRect.js";import{equals as k}from"../../../../geometry/support/spatialReferenceUtils.js";import z from"../../../../layers/Layer.js";import{getObjectId as M,computeAABB as W,hasGeometry as H}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as N}from"../../../../layers/graphics/hydratedFeatures.js";import{isSupportedRenderer3D as B,validateTo3D as q}from"../../../../renderers/support/rendererConversion.js";import{loadArcade as Y}from"../../../../support/arcadeOnDemand.js";import{isBasemapLayer as $}from"../../../../support/basemapUtils.js";import{getDefaultSymbol3D as Z}from"../../../../symbols/support/defaults3D.js";import{to3D as J}from"../../../../symbols/support/symbolConversion.js";import{averageSymbolComplexities as Q,defaultSymbolComplexity as X}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as K}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as ee}from"./ElevationQuery.js";import{VisibilityGroup as te,VisibilityFlag as ie}from"./enums.js";import{extractExpressionInfo as re,createContext as se}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ae}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as ne}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as oe}from"./Graphics3DSymbolCreationContext.js";import{make as le}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as he}from"./Graphics3DWebStyleSymbol.js";import{GraphicStateTracking as de}from"./GraphicStateTracking.js";import{computeCentroid as pe}from"./graphicUtils.js";import{ApplyRendererDiffResult as ce}from"./interfaces.js";import{LoadStatus as ye}from"./Loadable.js";import{SpatialIndex2D as ge}from"./SpatialIndex2D.js";import{StageLayerElevationProvider as me}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as ue}from"../../support/extentUtils.js";import{PropertiesPool as be}from"../../support/PropertiesPool.js";import{GridLocalOriginFactory as _e}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{UpdatePolicy as fe}from"../../webgl-engine/lib/UpdatePolicy.js";import{affectsGeometry as ve}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as Ce}from"../../webgl-engine/lib/WebGLLayer.js";import{hasPopupTemplate as Se}from"../../../layers/support/popupUtils.js";import{ImmediateTask as we,noBudget as Ge,TaskPriority as Re,Task as Pe}from"../../../support/Scheduler.js";import xe from"../../../../geometry/Extent.js";import De from"../../../../geometry/Point.js";import Ee from"../../../../symbols/LabelSymbol3D.js";import Ie from"../../../../symbols/TextSymbol.js";import Ue from"../../../../symbols/WebStyleSymbol.js";var Ae;const je=E(),Le=L(),Ve="esri.views.3d.layers.graphics.Graphics3DCore",Oe=i.getLogger(Ve);let Fe=Ae=class extends r{get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new ge({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return null!=this.currentRenderer&&"dictionary"===this.currentRenderer.type?fe.ASYNC:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this._graphicsWaitingForSymbol.size>0||this.running||this._elevationAlignment?.updating||null!=this._scaleVisibility&&this._scaleVisibility.updating||null!=this._filterVisibility&&this._filterVisibility.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._updatingPendingLoadedGraphicsChange||this._frameTask.updating||this._loadingSymbols>0)}get running(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,i=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,s=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,n=Math.max(1,a?.verticesPerFeature??1),o=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:i,l=Math.ceil(s/n),h=Math.max(t,Math.min(i,l,o)),d=this._get("displayFeatureLimit");return d&&d.maximumTotalNumberOfVertices===s&&d.averageSymbolComplexity===a&&d.maximumNumberOfFeatures===h?d:new K(s,h,a)}get averageSymbolComplexity(){const e=Q(this._symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||null!=t&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get usedMemory(){const e=null!=this.averageSymbolComplexity&&this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel*this._numberOfGraphics:0,t=this._getSymbolComplexitiesUsed().reduce(((e,t)=>e+t.memory.resourceBytes),0),i=this.owner.view._stage.renderer,r=this.owner.view.basemapTerrain.overlayManager.renderer,s=Array.from(this._symbols.values()).reduce(((e,t)=>e+(t?.symbolLayers.reduce(((e,t)=>e+(t?.materials.reduce(((e,t)=>e+i.getMemoryForMaterial(t)+r.getMemoryForMaterial(t)),0)??0)),0)??0)),0);return this._usedMemory+e+t+s}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){const e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(null!=this.averageSymbolComplexity){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}get visible(){return this._visible}_getConvertedSymbol(e){if("web-style"===e.type)return e.clone();const t=this._symbolConversionCache.get(e.id);if(null!=t)return t;const i=J(e,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(e)}),r=i.symbol||null;return null==r&&i.error&&Oe.error(i.error.message),this._symbolConversionCache.set(e.id,r),r}_getSymbolComplexitiesUsedOrRenderer(e){if(null==e)return[];const t=e.getSymbols(),i="backgroundFillSymbol"in e?e.backgroundFillSymbol:null;if(!i&&!t?.length)return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);null!=s&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);null!=e&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(null==e)return null;const t=this._symbols.get(e.id);if(null!=t)return t.complexity;const i=this._getConvertedSymbol(e);return null!=i?X(i):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach((t=>{null!=t&&e.push(t.complexity)})),e}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new be({computedExtent:xe},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTask=we,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._sharedSymbolResourcesOwnerHandle=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this._pendingUpdatesPool=new c({allocator:e=>e||new ke,deallocator:e=>(e.clear(),e)}),this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new c,this.preferredUpdatePolicy=fe.SYNC,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this.symbolCreationContext=new oe(e.owner.view.resourceController.scheduler,((e,t)=>this._frameTask.schedule(e,t)))}initialize(){this._featureStore=new ae({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});const e=(e,t,i)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,i),{componentFactories:t}=this;if(null!=t.elevationAlignment){const i=t.elevationAlignment(this,e);this._elevationAlignment=i}if(null!=t.scaleVisibility){const i=t.scaleVisibility(this,e);this._scaleVisibility=i}if(null!=t.filterVisibility){const e=t.filterVisibility({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(te.GRAPHIC,ie.FILTER,e(M(t.graphic,this._objectIdField))))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(te.GRAPHIC,ie.FILTER,e))),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(te.GRAPHIC,ie.FILTER,!0)))});this._filterVisibility=e}if(null!=t.deconflictor){const e=t.deconflictor(this);this._deconflictor=e}if(null!=t.labeler&&null!=this._scaleVisibility){const e=t.labeler(this,this._scaleVisibility);this._labeler=e}if(null!=t.objectStates){const e=t.objectStates(this);this._objectStates=e}this._initializeAbortController=new AbortController,this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new ee(this._viewSpatialReference,t),this._initializeStage(t,this.layer.uid);const i=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=i,this._sharedSymbolResourcesOwnerHandle=i.addGraphicsOwner(this.owner),null!=this.currentRenderer&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new _e(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=re(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await se(r,this._viewSpatialReference,e,Oe),y(e),this.symbolCreationContext.screenSizePerspectiveEnabled=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this.addHandles(n((()=>t.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this.addHandles([u((()=>this.suspendedOrOutsideOfView),(()=>this._frameTask.reschedule((()=>this._updateLayerVisibility())))),u((()=>[this.layer?.screenSizePerspectiveEnabled,this.owner.view?.screenSizePerspectiveEnabled]),(()=>{const e=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._labeler?.reset(),this.recreateAllGraphicsAndSymbols())})),u((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),u((()=>this.owner.view.state?.rasterPixelRatio),(()=>this._pixelRatioChange())),u((()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled),(e=>this._physicalBasedRenderingChange(e))),u((()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods),(e=>this._skipHighSymbolLoDsChange(e))),b((()=>t.basemapTerrain?.tilingScheme),(e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||null==t.basemapTerrain.spatialReference||(this.symbolCreationContext.overlaySR=t.basemapTerrain.spatialReference),this.hasHandles("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this.addHandles([_(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),u((()=>this.effectiveUpdatePolicy),(e=>{null!=this.stageLayer&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===fe.ASYNC,e===fe.SYNC&&this.runTask(Ge)}),f)]),this._frameTask=t.resourceController.scheduler.registerTask(Re.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this.addHandles(u((()=>this.layer.featureReduction),(()=>this._deconflictor.featureReductionChange()))),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch((()=>{})),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController&&(this._initializeAbortController.abort(),this._initializeAbortController=null)}destroy(){this._abortInitialize(),this._abortRendererChange(),this._abortElevationInfoChange(),this._frameTask.remove(),this._frameTask=we,this.owner.view?.deconflictor?.removeGraphicsOwner(this),this.owner.view?.labeler?.removeGraphicsOwner(this),this._elevationAlignment=h(this._elevationAlignment),this._scaleVisibility=h(this._scaleVisibility),this._filterVisibility=h(this._filterVisibility),this._deconflictor=null,this._labeler=null,this._objectStates=h(this._objectStates),this.clear(),this._featureStore=h(this._featureStore),this._updatingPendingLoadedGraphicsChange=d(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=h(this._graphicStateTracking),this.stage&&(this.stageLayer=h(this.stageLayer),this.stage=null),this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new a("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._sharedSymbolResourcesOwnerHandle=d(this._sharedSymbolResourcesOwnerHandle),this._propertiesPool=h(this._propertiesPool),this._pendingUpdatesPool=null,this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=h(this._spatialIndex)}clear(){this._objectStates?.allGraphicsDeleted(),null!=this._graphicStateTracking&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(h),this._symbols.clear(),this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingUpdatesPool.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange("updating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed")}_initializeStage(e,t){this.stage=e._stage,this.stageLayer=new Ce(this.stage,{pickable:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);const i=this.stageLayer.events;i.on("transformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("shaderTransformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.graphicUid))),i.on("geometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("geometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("attributesChanged",(e=>ve(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid)))}notifyGraphicGeometryChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*ze,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,i?(this.stageLayer.pickable=!0,this.updateAllGraphicsVisibility()):(this.stageLayer.pickable=!1,this._hideAllGraphics()),this._updateStageLayerVisibility())}_updateStageLayerVisibility(){this.stageLayer.visible=this._visible&&(null==this.layer.opacity||this.layer.opacity>0)}getGraphics3DGraphicById(e){return null!=e?this.graphics3DGraphics.get(e):void 0}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return M(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer?.objectIdField;if(!e)return;const t=new Map;return this.graphics3DGraphics.forEach((i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);null!=s&&t.set(s,i)})),t}get labelsEnabled(){return!(!this._labeler||!this._labeler.layerLabelsEnabled())}async updateLabelingInfo(e){const t=this._deconflictor&&this._deconflictor.labelingInfoChange(e),i=this._labeler&&this._labeler.labelingInfoChange(e);await Promise.allSettled([t,i])}updateVisibilityInfo(){this._deconflictor&&this._deconflictor.labelingInfoChange(),this._labeler&&this._labeler.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=0,t=0;return o(this._symbols,((i,r)=>{if(null!=i){const s=i.getFastUpdateStatus();if(s.loading>0)return!0;this._graphicsBySymbol.has(r)&&(t+=s.fast,e+=s.slow)}return!1}))?"unknown":t>=0&&0===e?"fast":e>=0&&0===t?"slow":"mixed"}runTask(e){if(this._frameTask.processQueue(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("updating"),this.notifyChange("updatingRemaining"),!e.hasProgressed)return Pe.YIELD}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);null!=i&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return l(this.graphics3DGraphics,(t=>this._getGraphicObjectID(t.graphic)===e))}_updateUserVisibility(e){if(null==e)return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&(null==i||!this._objectIdInvisibleSet.has(i));return e.setVisibilityFlag(te.GRAPHIC,ie.USER,r)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this._whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=g();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>U(e,r,t,e,i,t,s),n=(e,t,r)=>U(e,s,t,e,i,t,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:null!=t&&!!t.useViewElevation,minDemResolution:null!=t?t.minDemResolution:null,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,t?.signal);if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){V(h,je);const t=e.getElevation(je[0],je[1],0,i,"ground")??0;h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await v((()=>this.owner?.loadedGraphics));const i=this.owner.layer?.objectIdField,r=this.owner.loadedGraphics.find((t=>t===e||null!=i&&null!=t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]));if(!r)throw new a("internal:graphic-not-part-of-view","Graphic is not part of this view");const s=await this._whenGraphics3DGraphic(r);return this._boundsForGraphics3DGraphic(s,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;P(Me,0,0,0);let s=0;if(r.render.num>0){if(!A(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,We,t))return null;x(Me,Me,We),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=this._viewElevationProvider.getElevation(e,i,"ground")??0;if(P(We,e,i,a),!A(We,this._viewElevationProvider.spatialReference,We,t))return null;x(Me,Me,We),s++}return s>1&&D(Me,Me,1/s),new De({x:Me[0],y:Me[1],z:Me[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this._symbols.get(e.id);if(null==i)throw new a("internal:symbol-not-part-of-view","Symbol is not part of this view");const r=e.symbolLayers.indexOf(t);if(-1===r)throw new a("internal:missing-symbol-layer","Symbol layer is not in symbol");const s=i.getSymbolLayerSize(r);if(null==s)throw new a("internal:missing-size","Symbol layer has no valid size");return s}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(null!=i||null!=this._graphicsWithoutSymbol.get(t))switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":break;case"origin-transform":this._graphicUpdateTransformHandler(i,e)}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>null!=t.newValue&&null!=e&&e.graphics3DSymbol.updateGeometry(e,t.newValue)));const i=t.graphic.geometry;null!=i&&this._expandComputedExtent(i)}_graphicUpdateTransformHandler(e,t){const i=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>null!=t.newValue&&null!=e&&null!=i&&e.graphics3DSymbol.updateTransform(e,i.spatialReference,t.newValue,t.action)))}_graphicUpdateGeometryOrTransformHandler(e,t,i){if(null!=t.graphic.geometry)if(null!=e)i()||this._recreateGraphic(e.graphic);else{const e=t.graphic.symbol?.id;if(e){const t=this._symbols.get(e);if(null!=t&&t.loadStatus===ye.LOADING)return}this._recreateGraphic(t.graphic)}else this._recreateGraphic(t.graphic)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=null!=e?e.graphics3DSymbol:null!=t.oldValue?this._symbols.get(t.oldValue.id):null;if(null==r||null==t.newValue)return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(null!=a&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=G(s,a);if(null==o)return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!R(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i);if(null==h)return void this._recreateGraphic(i);const d=r.extentPadding;for(const p of l.symbolStatePatches)p();if(d!==r.extentPadding&&this._recomputeExtentPadding(),null!=e)for(const p of l.graphics3DGraphicPatches)p(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===fe.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("updating"),t}_endGraphicUpdate(e){e&&(this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach((t=>{null!=t&&(e=Math.max(e,t.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const t=Le,i=e.spatialReference;W(e,t);const r=this._viewSpatialReference,s=Ae.tmpVec;if(k(i,r)||j(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],j(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(null==a?.zmin||t[2]<a.zmin),h=o&&(null==a?.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const t=re(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await se(t,this._viewSpatialReference,e.signal,Oe),y(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t.forEach((e=>{const t=e.graphic,i=e.labelLayers;for(const r of i){r.graphics3DSymbolLayer.updateGraphicElevationContext(t,r)}})):this._recreateSymbol(i)})),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=p(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new me({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),null!=this._filterVisibility&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=p(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain.tilingScheme&&t?.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this._graphicsBySymbol.get(e),i=[];t&&(t.forEach(((e,t)=>{const r=e.usedMemory;this._conditionalRemove(e,t),this._spatialIndex?.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed")})),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);h(r),this._symbols.delete(e),this.add(i)}_recreateGraphicsForSymbol(e){const t=this._graphicsBySymbol.get(e);if(t){const e=[];t.forEach((t=>e.push(t.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),null!=this._graphicStateTracking&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain?.tilingScheme?(this._updatePolicyForGraphics(e)===fe.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("updating")):Oe.error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===fe.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(null!=t.geometry&&"mesh"===t.geometry.type&&!t.geometry.loaded)return fe.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t,Oe),fe.SYNC);this._cleanupSymbols(),this._labeler&&(this.owner.view.labeler.setDirty(),this._cleanupSymbols()),this.owner.view.deconflictor.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this._pendingUpdates.get(e);i?i.add?i.state!==Te.NEW&&i.abortController?.abort():this._pendingAdds++:(i=this._pendingUpdatesPool.pushNew(),this._pendingAdds++,this._pendingUpdates.set(e,i)),i.add=t}this.notifyChange("running"),this.notifyChange("updatingRemaining")}remove(e){this.effectiveUpdatePolicy===fe.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("updating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this._pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this._pendingUpdates.delete(e),i.state===Te.LOADING&&i.abortController?.abort(),this._pendingAdds--);else{const i=this._pendingUpdatesPool.pushNew();i.remove=t,this._pendingUpdates.set(e,i),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining")}_finishPendingUpdates(){this._pendingUpdatesPool.clear(),this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&Oe.warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)return this._spatialIndex.update(),void e.madeProgress();if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(const[t,i]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(i.remove&&!i.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,this._pendingUpdates.delete(t),0===this._pendingRemoves))break}}for(const[t,i]of this._pendingUpdates){if(e.done)break;i.add&&i.state===Te.NEW&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&i.state!==Te.READY||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=fe.SYNC),i.add)switch(i.state){case Te.READY:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this._pendingAdds--,e.madeProgress();break;case Te.REJECTED:i.add=null,this._pendingAdds--;case Te.LOADING:}null==i.remove&&null==i.add&&this._pendingUpdates.delete(t)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"))}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Te.READY);const t=e.add.geometry;null==t||"mesh"!==t.type||t.loaded?this._processPendingUpdateNewRenderingInfo(e):this._processPendingUpdateNewMesh(e,t)}async _processPendingUpdateNewMesh(e,t){e.state=Te.LOADING,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,m(t)?e.state=Te.NEW:e.state=Te.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(null==this.layer.renderer||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add,Oe),void(e.state=Te.READY);e.state=Te.LOADING,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(m(i)?e.state=Te.NEW:e.state=Te.REJECTED)}null==t?.symbol?(Oe&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,Oe.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=Te.READY}_addGraphic(e,t,i){if(this._graphicsWithoutSymbol.set(e.uid,e),null==t?.symbol||!H(e))return;if(null!=this.stage.renderView.objectAndLayerIdRenderHelper&&this.setUidToIdOnAdd){const t=$(this.owner.view.map,this.layer.uid);this.stage.renderView.objectAndLayerIdRenderHelper.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.layer.uid,!!this.layer.popupEnabled&&!t&&Se(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}const r=t.symbol,s=this.getOrCreateGraphics3DSymbol(r,t.renderer);if(null==s)return;this._expandComputedExtent(e.geometry);const a=this._beginGraphicUpdate(e),n=new ne(e,t,this.layer);let o=!1;const l=e=>{e===s.symbol.id&&(o=!0)};this._whenSymbolRemoved.push(l);const h=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(l);if(this._graphicsWaitingForSymbol.get(e.uid)!==a||o||s.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==s.symbol.id)--s.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(s,n);this._spatialIndex&&null!=t&&this._spatialIndex.add(t),--s.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this._labeler&&this.owner.view.labeler.setDirty()},d=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(l),o||(m(t)?this.add([e]):s.destroyed||this._endGraphicUpdate(e)))};++this._loadingSymbols,i===fe.ASYNC?s.load((()=>this._frameTask.schedule(h)),(e=>this._frameTask.schedule((()=>d(e))))):s.load(h,d)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,r=i.isElevationSource;this._conditionalRemove(i,t),this._spatialIndex?.remove(i);const s=i.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,r),i.destroy(),this._featureStore.events.emit("changed")}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating"))}_hasLabelingContext(e){if(e instanceof Ee||e instanceof Ie){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some((t=>t.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof Ee&&!this._hasLabelingContext(e))||(Oe.error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t){const i=e.geometry;if(null==i)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!I(i.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?N(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||null!=this.currentRenderer))s=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{s={symbol:r.symbol||Z(r.geometry)}}return null==s?.symbol?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,t){if(null==e.geometry)return Oe&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,Oe.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return Oe&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,Oe.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const i=this.rendererHasGeometryOperations?N(e,this.layer):e;return this.owner.getRenderingInfoAsync(i,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(null!=t&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=J(t.backgroundFillSymbol,{ignoreDrivers:!0});null!=e.symbol&&"web-style"!==e.symbol.type&&"cim"!==e.symbol.type&&(r=e.symbol.symbolLayers)}const s=le(i,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,t){let i=this._symbols.get(e.id);return void 0===i&&(i=e instanceof Ue?new he(e,(e=>this._frameTask.schedule(e)),(e=>this._createGraphics3DSymbol(e,t))):this._createGraphics3DSymbol(e,t),this._symbols.set(e.id,i)),null!=i&&++i.referenced,i}trackGraphicState(e){return null==this._graphicStateTracking&&(this._graphicStateTracking=new de(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,i&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){const i=t.graphic;if(this._graphicsWithoutSymbol.delete(i.uid),!this._symbols.has(e.symbol.id))return this.add([i]),null;if(this.graphics3DGraphics.has(i.uid))return null;const r=e.createGraphics3DGraphic(t);if(null==r)return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(i.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(i.uid),r.centroid=null,null!=i.geometry&&"point"!==i.geometry.type&&(r.centroid=pe(i.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(r),null!=this._filterVisibility){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(te.GRAPHIC,ie.FILTER,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),this._deconflictor&&this.owner.view.deconflictor.setInitialIconVisibilityFlag(this,r),r.initialize(this.stageLayer,this.owner),null!=this._graphicStateTracking&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[i.uid];return a&&(delete this._whenGraphics3DGraphicRequests[i.uid],a.resolve(r)),r}_abortRendererChange(){this._rendererChangeAbortController&&(this._rendererChangeAbortController.abort(),this._rendererChangeAbortController=null)}async rendererChange(e){if(this._abortRendererChange(),e!==this.currentRenderer)if(this._validateRenderer(e),null==e&&this._currentRendererChange(null,!1),B(e))if(null!=e&&e.arcadeRequired){const t=new AbortController;this._rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();y(t);const r=i.hasGeometryOperations(e);r&&(await i.enableGeometryOperations(),y(t)),this.effectiveUpdatePolicy===fe.ASYNC?await this._frameTask.schedule((()=>this._currentRendererChange(e,r)),t.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===fe.ASYNC){const t=new AbortController;this._rendererChangeAbortController=t,await this._frameTask.schedule((()=>this._currentRendererChange(e,!1)),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return null==this._arcadeOnDemand?(this._arcadeOnDemand=await Y(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;const i=this.symbolCreationContext.renderer;if(e===i)return;if(this._symbolConversionCache.clear(),null==e)return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=G(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,null!=r&&("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this._graphicsBySymbol.get(s.id);t&&t.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof z?this.layer:null,h=this._arcadeOnDemand;if(s===i.defaultSymbol&&i.getSymbol(N(o,l),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach((e=>r.push(e))),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_applyUniqueValueRendererDiff(e,t,i){const r=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(r||a){const n=a?a.added.map((e=>e.symbol)).filter(s):[],o=a?a.removed.map((e=>e.symbol)).filter(s):[];if(a)for(let e=0;e<a.changed.length;e++)n.push(a.changed[e].newValue.symbol),o.push(a.changed[e].oldValue.symbol);return r?(i.defaultSymbol&&o.push(i.defaultSymbol),t.defaultSymbol&&n.push(t.defaultSymbol)):i.defaultSymbol&&n.length&&o.push(t.defaultSymbol),this._applySymbolSetDiff(n,o,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==t?.type||"unique-value"!==i?.type||null!=e&&"partial"!==e.type)return[];const r=e=>null!=e?e.id:null,s=e&&e.diff,a=s?.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of i.uniqueValueInfos??[]){const i=r(e.symbol),s=t.uniqueValueInfos?.find((t=>t.value===e.value));s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=null!=t&&t?"string"==typeof t?t:t.id:null;if(null==e||e===i)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(i,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(i,s),null!=s)){const e="string"==typeof t?null:t;null!=e?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,i,r){if(this._diffHasSymbolChange(e))return!1;if(i instanceof t&&r instanceof t&&this._applyUniqueValueRendererDiff(e,i,r)&&0===Object.keys(e.diff).length)return!0;for(const[t]of this._graphicsBySymbol){const r=this._symbols.get(t);if(null!=r)switch(r.applyRendererDiff(e,i)){case ce.RecreateSymbol:this._recreateSymbol(t);break;case ce.RecreateGraphics:this._recreateGraphicsForSymbol(t);case ce.FastUpdate:}}return!0}opacityChange(){this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("opacity",t))),this._updateStageLayerVisibility()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t))),this._deconflictor&&this._deconflictor.slicePlaneEnabledChange(),this._labeler&&this._labeler.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)}))}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("skipHighSymbolLods",t)||this._recreateSymbol(i)}))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=C((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=T();return ue(e,r,t)?this.symbolCreationContext.clippingExtent=O(L(),r):this.symbolCreationContext.clippingExtent=null,!F(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach((i=>{e(i)&&(t=!0)})),t&&(this.owner.view.labeler?.setDirty(),this.owner.view.deconflictor?.setDirty())}forEachGraphics3DSymbol(e){for(const[t,i]of this._symbols){if(null==i)return;e(i,this._graphicsBySymbol.get(t)||He,t)}}updateAllGraphicsVisibility(){null!=this._filterVisibility&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities((e=>{const t=this._updateUserVisibility(e),i=null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(e);return t||i}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(te.GRAPHIC,ie.USER,!1)))}_validateRenderer(e){const t=q(e,{geometryType:this.layer?.geometryType});if(t){const e=`Renderer for layer '${this.layer.title?`${this.layer.title}, `:""}, id:${this.layer.id}' is not supported in a SceneView`;Oe.warn(e,t.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach(((t,i)=>{if(null==t||t.referenced>0)return;const r=this._graphicsBySymbol.get(i);r&&0!==r.size||(this._graphicsBySymbol.delete(i),this._symbols.delete(i),h(t),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){return{snapshotInternals:()=>({graphics:[...this.graphics3DGraphics.keys()].sort(),symbols:[...this._symbols.keys()].sort(),graphicsBySymbol:[...this._graphicsBySymbol.keys()].sort().map((e=>({symbolId:e,graphics:[...this._graphicsBySymbol.get(e).keys()].sort()}))),graphicsWithoutSymbol:[...this._graphicsWithoutSymbol.keys()].sort(),graphicsDrapedUids:[...this._graphicsDrapedUids].sort(),pendingUpdates:this._pendingUpdates}),symbols:this._symbols,filterVisibility:this._filterVisibility,numPending:this._pendingUpdates.size,forceUpdatePolicy:e=>{this._forcedUpdatePolicy=e}}}get performanceInfo(){return{visible:this.graphics3DGraphics.size,missing:this._graphicsWithoutSymbol.size,pending:this._pendingUpdates.size}}};var Te;Fe.tmpVec=E(),e([S({readOnly:!0})],Fe.prototype,"computedExtent",void 0),e([S()],Fe.prototype,"currentRenderer",void 0),e([S()],Fe.prototype,"rendererHasGeometryOperations",void 0),e([S()],Fe.prototype,"_frameTask",void 0),e([S({readOnly:!0})],Fe.prototype,"_viewSpatialReference",null),e([S()],Fe.prototype,"_rendererChangeAbortController",void 0),e([S()],Fe.prototype,"_elevationInfoChangeAbortController",void 0),e([S()],Fe.prototype,"_initializeAbortController",void 0),e([S()],Fe.prototype,"_elevationAlignment",void 0),e([S()],Fe.prototype,"_scaleVisibility",void 0),e([S()],Fe.prototype,"_filterVisibility",void 0),e([S()],Fe.prototype,"_initializePromise",void 0),e([S()],Fe.prototype,"_spatialIndex",void 0),e([S({readOnly:!0})],Fe.prototype,"extentPadding",void 0),e([S()],Fe.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([S()],Fe.prototype,"_featureStore",void 0),e([S()],Fe.prototype,"_deconflictor",void 0),e([S()],Fe.prototype,"_labeler",void 0),e([S()],Fe.prototype,"_objectStates",void 0),e([S()],Fe.prototype,"_loadingSymbols",void 0),e([S()],Fe.prototype,"preferredUpdatePolicy",void 0),e([S()],Fe.prototype,"_forcedUpdatePolicy",void 0),e([S({readOnly:!0})],Fe.prototype,"effectiveUpdatePolicy",null),e([S({constructOnly:!0})],Fe.prototype,"elevationFeatureExpressionEnabled",void 0),e([S({constructOnly:!0})],Fe.prototype,"owner",void 0),e([S({constructOnly:!0})],Fe.prototype,"layer",void 0),e([S({constructOnly:!0})],Fe.prototype,"graphicSymbolSupported",void 0),e([S({constructOnly:!0})],Fe.prototype,"getRenderingInfoWithoutRenderer",void 0),e([S({constructOnly:!0})],Fe.prototype,"componentFactories",void 0),e([S({constructOnly:!0})],Fe.prototype,"setUidToIdOnAdd",void 0),e([S()],Fe.prototype,"featureStore",null),e([S()],Fe.prototype,"initializePromise",null),e([S()],Fe.prototype,"scaleVisibility",null),e([S()],Fe.prototype,"elevationAlignment",null),e([S()],Fe.prototype,"objectStates",null),e([S()],Fe.prototype,"filterVisibility",null),e([S({readOnly:!0})],Fe.prototype,"updating",null),e([S({readOnly:!0})],Fe.prototype,"running",null),e([S({readOnly:!0})],Fe.prototype,"suspendedOrOutsideOfView",null),e([S({readOnly:!0,dependsOn:[]})],Fe.prototype,"updatingRemaining",null),e([S({readOnly:!0})],Fe.prototype,"displayFeatureLimit",null),e([S({readOnly:!0,dependsOn:[]})],Fe.prototype,"averageSymbolComplexity",null),e([S({constructOnly:!0})],Fe.prototype,"hasZ",void 0),e([S({constructOnly:!0})],Fe.prototype,"hasM",void 0),e([S()],Fe.prototype,"_objectIdField",null),Fe=Ae=e([w(Ve)],Fe),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Te||(Te={}));class ke{constructor(){this.add=null,this.renderingInfo=null,this.state=Te.NEW,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Te.NEW,this.abortController=null,this.remove=null}}const ze=10,Me=E(),We=E(),He=new Map;export{Fe as Graphics3DCore};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import"../../../../renderers/ClassBreaksRenderer.js";import"../../../../renderers/DictionaryRenderer.js";import"../../../../renderers/DotDensityRenderer.js";import"../../../../renderers/HeatmapRenderer.js";import"../../../../renderers/PieChartRenderer.js";import"../../../../renderers/Renderer.js";import"../../../../renderers/SimpleRenderer.js";import t from"../../../../renderers/UniqueValueRenderer.js";import"../../../../renderers/support/jsonUtils.js";import i from"../../../../core/Logger.js";import"../../../../symbols.js";import r from"../../../../core/Accessor.js";import{isSome as s}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import a from"../../../../core/Error.js";import{makeHandle as n}from"../../../../core/handleUtils.js";import{someMap as o,findInMap as l}from"../../../../core/MapUtils.js";import{destroyMaybe as h,removeMaybe as d,disposeMaybe as p}from"../../../../core/maybe.js";import c from"../../../../core/PooledArray.js";import{throwIfAborted as y,createResolver as g,isAbortError as m}from"../../../../core/promiseUtils.js";import{watch as u,when as b,on as _,syncAndInitial as f,whenOnce as v}from"../../../../core/reactiveUtils.js";import{schedule as C}from"../../../../core/scheduling.js";import{property as S}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as w}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as G,isEmpty as R}from"../../../../core/accessorSupport/diffUtils.js";import{s as P,g as x,i as D}from"../../../../chunks/vec3.js";import{c as E}from"../../../../chunks/vec3f64.js";import{canProjectWithoutEngine as I}from"../../../../geometry/projection.js";import{projectBuffer as U}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as A}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as j}from"../../../../geometry/projection/projectXYZToVector.js";import{create as L,center as O,fromRect as V,equals as F}from"../../../../geometry/support/aaBoundingBox.js";import{create as T}from"../../../../geometry/support/aaBoundingRect.js";import{equals as k}from"../../../../geometry/support/spatialReferenceUtils.js";import z from"../../../../layers/Layer.js";import{getObjectId as M,computeAABB as W,hasGeometry as H}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as N}from"../../../../layers/graphics/hydratedFeatures.js";import{isSupportedRenderer3D as B,validateTo3D as q}from"../../../../renderers/support/rendererConversion.js";import{loadArcade as Y}from"../../../../support/arcadeOnDemand.js";import{isBasemapLayer as $}from"../../../../support/basemapUtils.js";import{getDefaultSymbol3D as Z}from"../../../../symbols/support/defaults3D.js";import{to3D as J}from"../../../../symbols/support/symbolConversion.js";import{averageSymbolComplexities as Q,defaultSymbolComplexity as X}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as K}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as ee}from"./ElevationQuery.js";import{VisibilityGroup as te,VisibilityFlag as ie}from"./enums.js";import{extractExpressionInfo as re,createContext as se}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ae}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as ne}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as oe}from"./Graphics3DSymbolCreationContext.js";import{make as le}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as he}from"./Graphics3DWebStyleSymbol.js";import{GraphicStateTracking as de}from"./GraphicStateTracking.js";import{computeCentroid as pe}from"./graphicUtils.js";import{ApplyRendererDiffResult as ce}from"./interfaces.js";import{LoadStatus as ye}from"./Loadable.js";import{SpatialIndex2D as ge}from"./SpatialIndex2D.js";import{StageLayerElevationProvider as me}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as ue}from"../../support/extentUtils.js";import{PropertiesPool as be}from"../../support/PropertiesPool.js";import{GridLocalOriginFactory as _e}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{UpdatePolicy as fe}from"../../webgl-engine/lib/UpdatePolicy.js";import{affectsGeometry as ve}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as Ce}from"../../webgl-engine/lib/WebGLLayer.js";import{hasPopupTemplate as Se}from"../../../layers/support/popupUtils.js";import{ImmediateTask as we,noBudget as Ge,TaskPriority as Re,Task as Pe}from"../../../support/Scheduler.js";import xe from"../../../../geometry/Extent.js";import De from"../../../../geometry/Point.js";import Ee from"../../../../symbols/LabelSymbol3D.js";import Ie from"../../../../symbols/TextSymbol.js";import Ue from"../../../../symbols/WebStyleSymbol.js";var Ae;const je=E(),Le=L(),Oe="esri.views.3d.layers.graphics.Graphics3DCore",Ve=i.getLogger(Oe);let Fe=Ae=class extends r{get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new ge({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return null!=this.currentRenderer&&"dictionary"===this.currentRenderer.type?fe.ASYNC:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this._graphicsWaitingForSymbol.size>0||this.running||this._elevationAlignment?.updating||this._scaleVisibility?.updating||this._filterVisibility?.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._updatingPendingLoadedGraphicsChange||this._frameTask.updating||this._loadingSymbols>0)}get running(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,i=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,s=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,n=Math.max(1,a?.verticesPerFeature??1),o=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:i,l=Math.ceil(s/n),h=Math.max(t,Math.min(i,l,o)),d=this._get("displayFeatureLimit");return d&&d.maximumTotalNumberOfVertices===s&&d.averageSymbolComplexity===a&&d.maximumNumberOfFeatures===h?d:new K(s,h,a)}get averageSymbolComplexity(){const e=Q(this._symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||null!=t&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get usedMemory(){const e=null!=this.averageSymbolComplexity&&this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel*this._numberOfGraphics:0,t=this._getSymbolComplexitiesUsed().reduce(((e,t)=>e+t.memory.resourceBytes),0),i=this.owner.view._stage.renderer,r=this.owner.view.basemapTerrain.overlayManager.renderer,s=Array.from(this._symbols.values()).reduce(((e,t)=>e+(t?.symbolLayers.reduce(((e,t)=>e+(t?.materials.reduce(((e,t)=>e+i.getMemoryForMaterial(t)+r.getMemoryForMaterial(t)),0)??0)),0)??0)),0);return this._usedMemory+e+t+s}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){const e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(null!=this.averageSymbolComplexity){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}get visible(){return this._visible}_getConvertedSymbol(e){if("web-style"===e.type)return e.clone();const t=this._symbolConversionCache.get(e.id);if(null!=t)return t;const i=J(e,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(e)}),r=i.symbol||null;return null==r&&i.error&&Ve.error(i.error.message),this._symbolConversionCache.set(e.id,r),r}_getSymbolComplexitiesUsedOrRenderer(e){if(null==e)return[];const t=e.getSymbols(),i="backgroundFillSymbol"in e?e.backgroundFillSymbol:null;if(!i&&!t?.length)return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);null!=s&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);null!=e&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(null==e)return null;const t=this._symbols.get(e.id);if(null!=t)return t.complexity;const i=this._getConvertedSymbol(e);return null!=i?X(i):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach((t=>{null!=t&&e.push(t.complexity)})),e}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new be({computedExtent:xe},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTask=we,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._sharedSymbolResourcesOwnerHandle=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this._pendingUpdatesPool=new c({allocator:e=>e||new ke,deallocator:e=>(e.clear(),e)}),this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new c,this.preferredUpdatePolicy=fe.SYNC,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this.symbolCreationContext=new oe(e.owner.view.resourceController.scheduler,((e,t)=>this._frameTask.schedule(e,t)))}initialize(){this._featureStore=new ae({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});const e=(e,t,i)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,i),{componentFactories:t}=this;if(null!=t.elevationAlignment){const i=t.elevationAlignment(this,e);this._elevationAlignment=i}if(null!=t.scaleVisibility){const i=t.scaleVisibility(this,e);this._scaleVisibility=i}if(null!=t.filterVisibility){const e=t.filterVisibility({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(te.GRAPHIC,ie.FILTER,e(M(t.graphic,this._objectIdField))))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(te.GRAPHIC,ie.FILTER,e))),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(te.GRAPHIC,ie.FILTER,!0)))});this._filterVisibility=e}if(null!=t.deconflictor){const e=t.deconflictor(this);this._deconflictor=e}if(null!=t.labeler&&null!=this._scaleVisibility){const e=t.labeler(this,this._scaleVisibility);this._labeler=e}if(null!=t.objectStates){const e=t.objectStates(this);this._objectStates=e}this._initializeAbortController=new AbortController,this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new ee(this._viewSpatialReference,t),this._initializeStage(t,this.layer.uid);const i=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=i,this._sharedSymbolResourcesOwnerHandle=i.addGraphicsOwner(this.owner),null!=this.currentRenderer&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new _e(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=re(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await se(r,this._viewSpatialReference,e,Ve),y(e),this.symbolCreationContext.screenSizePerspectiveEnabled=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this.addHandles(n((()=>t.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this.addHandles([u((()=>this.suspendedOrOutsideOfView),(()=>this._frameTask.reschedule((()=>this._updateLayerVisibility())))),u((()=>[this.layer?.screenSizePerspectiveEnabled,this.owner.view?.screenSizePerspectiveEnabled]),(()=>{const e=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._labeler?.reset(),this.recreateAllGraphicsAndSymbols())})),u((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),u((()=>this.owner.view.state?.rasterPixelRatio),(()=>this._pixelRatioChange())),u((()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled),(e=>this._physicalBasedRenderingChange(e))),u((()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods),(e=>this._skipHighSymbolLoDsChange(e))),b((()=>t.basemapTerrain?.tilingScheme),(e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||null==t.basemapTerrain.spatialReference||(this.symbolCreationContext.overlaySR=t.basemapTerrain.spatialReference),this.hasHandles("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this.addHandles([_(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),u((()=>this.effectiveUpdatePolicy),(e=>{null!=this.stageLayer&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===fe.ASYNC,e===fe.SYNC&&this.runTask(Ge)}),f)]),this._frameTask=t.resourceController.scheduler.registerTask(Re.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this.addHandles(u((()=>this.layer.featureReduction),(()=>this._deconflictor.featureReductionChange()))),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch((()=>{})),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController&&(this._initializeAbortController.abort(),this._initializeAbortController=null)}destroy(){this._abortInitialize(),this._abortRendererChange(),this._abortElevationInfoChange(),this._frameTask.remove(),this._frameTask=we,this.owner.view?.deconflictor?.removeGraphicsOwner(this),this.owner.view?.labeler?.removeGraphicsOwner(this),this._elevationAlignment=h(this._elevationAlignment),this._scaleVisibility=h(this._scaleVisibility),this._filterVisibility=h(this._filterVisibility),this._deconflictor=null,this._labeler=null,this._objectStates=h(this._objectStates),this.clear(),this._featureStore=h(this._featureStore),this._updatingPendingLoadedGraphicsChange=d(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=h(this._graphicStateTracking),this.stage&&(this.stageLayer=h(this.stageLayer),this.stage=null),this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new a("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._sharedSymbolResourcesOwnerHandle=d(this._sharedSymbolResourcesOwnerHandle),this._propertiesPool=h(this._propertiesPool),this._pendingUpdatesPool=null,this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=h(this._spatialIndex)}clear(){this._objectStates?.allGraphicsDeleted(),null!=this._graphicStateTracking&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(h),this._symbols.clear(),this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingUpdatesPool.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange("updating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed")}_initializeStage(e,t){this.stage=e._stage,this.stageLayer=new Ce(this.stage,{pickable:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);const i=this.stageLayer.events;i.on("transformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("shaderTransformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.graphicUid))),i.on("geometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("geometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("attributesChanged",(e=>ve(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid)))}notifyGraphicGeometryChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*ze,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,i?(this.stageLayer.pickable=!0,this.updateAllGraphicsVisibility()):(this.stageLayer.pickable=!1,this._hideAllGraphics()),this._updateStageLayerVisibility())}_updateStageLayerVisibility(){this.stageLayer.visible=this._visible&&(null==this.layer.opacity||this.layer.opacity>0)}getGraphics3DGraphicById(e){return null!=e?this.graphics3DGraphics.get(e):void 0}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return M(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer?.objectIdField;if(!e)return;const t=new Map;return this.graphics3DGraphics.forEach((i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);null!=s&&t.set(s,i)})),t}get labelsEnabled(){return!(!this._labeler||!this._labeler.layerLabelsEnabled())}async updateLabelingInfo(e){const t=this._deconflictor&&this._deconflictor.labelingInfoChange(e),i=this._labeler&&this._labeler.labelingInfoChange(e);await Promise.allSettled([t,i])}updateVisibilityInfo(){this._deconflictor&&this._deconflictor.labelingInfoChange(),this._labeler&&this._labeler.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=0,t=0;return o(this._symbols,((i,r)=>{if(null!=i){const s=i.getFastUpdateStatus();if(s.loading>0)return!0;this._graphicsBySymbol.has(r)&&(t+=s.fast,e+=s.slow)}return!1}))?"unknown":t>=0&&0===e?"fast":e>=0&&0===t?"slow":"mixed"}runTask(e){if(this._frameTask.processQueue(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("updating"),this.notifyChange("updatingRemaining"),!e.hasProgressed)return Pe.YIELD}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);null!=i&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return l(this.graphics3DGraphics,(t=>this._getGraphicObjectID(t.graphic)===e))}_updateUserVisibility(e){if(null==e)return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&(null==i||!this._objectIdInvisibleSet.has(i));return e.setVisibilityFlag(te.GRAPHIC,ie.USER,r)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this._whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=g();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>U(e,r,t,e,i,t,s),n=(e,t,r)=>U(e,s,t,e,i,t,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:null!=t&&!!t.useViewElevation,minDemResolution:null!=t?t.minDemResolution:null,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,t?.signal);if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){O(h,je);const t=e.getElevation(je[0],je[1],0,i,"ground")??0;h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await v((()=>this.owner?.loadedGraphics));const i=this.owner.layer?.objectIdField,r=this.owner.loadedGraphics.find((t=>t===e||null!=i&&null!=t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]));if(!r)throw new a("internal:graphic-not-part-of-view","Graphic is not part of this view");const s=await this._whenGraphics3DGraphic(r);return this._boundsForGraphics3DGraphic(s,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;P(Me,0,0,0);let s=0;if(r.render.num>0){if(!A(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,We,t))return null;x(Me,Me,We),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=this._viewElevationProvider.getElevation(e,i,"ground")??0;if(P(We,e,i,a),!A(We,this._viewElevationProvider.spatialReference,We,t))return null;x(Me,Me,We),s++}return s>1&&D(Me,Me,1/s),new De({x:Me[0],y:Me[1],z:Me[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this._symbols.get(e.id);if(null==i)throw new a("internal:symbol-not-part-of-view","Symbol is not part of this view");const r=e.symbolLayers.indexOf(t);if(-1===r)throw new a("internal:missing-symbol-layer","Symbol layer is not in symbol");const s=i.getSymbolLayerSize(r);if(null==s)throw new a("internal:missing-size","Symbol layer has no valid size");return s}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(null!=i||null!=this._graphicsWithoutSymbol.get(t))switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":break;case"origin-transform":this._graphicUpdateTransformHandler(i,e)}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>null!=t.newValue&&null!=e&&e.graphics3DSymbol.updateGeometry(e,t.newValue)));const i=t.graphic.geometry;null!=i&&this._expandComputedExtent(i)}_graphicUpdateTransformHandler(e,t){const i=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>null!=t.newValue&&null!=e&&null!=i&&e.graphics3DSymbol.updateTransform(e,i.spatialReference,t.newValue,t.action)))}_graphicUpdateGeometryOrTransformHandler(e,t,i){if(null!=t.graphic.geometry)if(null!=e)i()||this._recreateGraphic(e.graphic);else{const e=t.graphic.symbol?.id;if(e){const t=this._symbols.get(e);if(null!=t&&t.loadStatus===ye.LOADING)return}this._recreateGraphic(t.graphic)}else this._recreateGraphic(t.graphic)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=null!=e?e.graphics3DSymbol:null!=t.oldValue?this._symbols.get(t.oldValue.id):null;if(null==r||null==t.newValue)return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(null!=a&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=G(s,a);if(null==o)return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!R(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i);if(null==h)return void this._recreateGraphic(i);const d=r.extentPadding;for(const p of l.symbolStatePatches)p();if(d!==r.extentPadding&&this._recomputeExtentPadding(),null!=e)for(const p of l.graphics3DGraphicPatches)p(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===fe.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("updating"),t}_endGraphicUpdate(e){e&&(this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach((t=>{null!=t&&(e=Math.max(e,t.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const t=Le,i=e.spatialReference;W(e,t);const r=this._viewSpatialReference,s=Ae.tmpVec;if(k(i,r)||j(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],j(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(null==a?.zmin||t[2]<a.zmin),h=o&&(null==a?.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const t=re(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await se(t,this._viewSpatialReference,e.signal,Ve),y(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t.forEach((e=>{const t=e.graphic,i=e.labelLayers;for(const r of i){r.graphics3DSymbolLayer.updateGraphicElevationContext(t,r)}})):this._recreateSymbol(i)})),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=p(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new me({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),null!=this._filterVisibility&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=p(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain.tilingScheme&&t?.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this._graphicsBySymbol.get(e),i=[];t&&(t.forEach(((e,t)=>{const r=e.usedMemory;this._conditionalRemove(e,t),this._spatialIndex?.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed")})),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);h(r),this._symbols.delete(e),this.add(i)}_recreateGraphicsForSymbol(e){const t=this._graphicsBySymbol.get(e);if(t){const e=[];t.forEach((t=>e.push(t.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),null!=this._graphicStateTracking&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain?.tilingScheme?(this._updatePolicyForGraphics(e)===fe.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("updating")):Ve.error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===fe.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(null!=t.geometry&&"mesh"===t.geometry.type&&!t.geometry.loaded)return fe.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t,Ve),fe.SYNC);this._cleanupSymbols(),this._labeler&&(this.owner.view.labeler.setDirty(),this._cleanupSymbols()),this.owner.view.deconflictor.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this._pendingUpdates.get(e);i?i.add?i.state!==Te.NEW&&i.abortController?.abort():this._pendingAdds++:(i=this._pendingUpdatesPool.pushNew(),this._pendingAdds++,this._pendingUpdates.set(e,i)),i.add=t}this.notifyChange("running"),this.notifyChange("updatingRemaining")}remove(e){this.effectiveUpdatePolicy===fe.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("updating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this._pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this._pendingUpdates.delete(e),i.state===Te.LOADING&&i.abortController?.abort(),this._pendingAdds--);else{const i=this._pendingUpdatesPool.pushNew();i.remove=t,this._pendingUpdates.set(e,i),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining")}_finishPendingUpdates(){this._pendingUpdatesPool.clear(),this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&Ve.warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)return this._spatialIndex.update(),void e.madeProgress();if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(const[t,i]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(i.remove&&!i.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,this._pendingUpdates.delete(t),0===this._pendingRemoves))break}}for(const[t,i]of this._pendingUpdates){if(e.done)break;i.add&&i.state===Te.NEW&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&i.state!==Te.READY||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=fe.SYNC),i.add)switch(i.state){case Te.READY:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this._pendingAdds--,e.madeProgress();break;case Te.REJECTED:i.add=null,this._pendingAdds--;case Te.LOADING:}null==i.remove&&null==i.add&&this._pendingUpdates.delete(t)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"))}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Te.READY);const t=e.add.geometry;null==t||"mesh"!==t.type||t.loaded?this._processPendingUpdateNewRenderingInfo(e):this._processPendingUpdateNewMesh(e,t)}async _processPendingUpdateNewMesh(e,t){e.state=Te.LOADING,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,m(t)?e.state=Te.NEW:e.state=Te.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(null==this.layer.renderer||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add,Ve),void(e.state=Te.READY);e.state=Te.LOADING,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(m(i)?e.state=Te.NEW:e.state=Te.REJECTED)}null==t?.symbol?(Ve&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,Ve.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=Te.READY}_addGraphic(e,t,i){if(this._graphicsWithoutSymbol.set(e.uid,e),null==t?.symbol||!H(e))return;if(null!=this.stage.renderView.objectAndLayerIdRenderHelper&&this.setUidToIdOnAdd){const t=$(this.owner.view.map,this.layer.uid);this.stage.renderView.objectAndLayerIdRenderHelper.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.layer.uid,!!this.layer.popupEnabled&&!t&&Se(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}const r=t.symbol,s=this.getOrCreateGraphics3DSymbol(r,t.renderer);if(null==s)return;this._expandComputedExtent(e.geometry);const a=this._beginGraphicUpdate(e),n=new ne(e,t,this.layer);let o=!1;const l=e=>{e===s.symbol.id&&(o=!0)};this._whenSymbolRemoved.push(l);const h=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(l);if(this._graphicsWaitingForSymbol.get(e.uid)!==a||o||s.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==s.symbol.id)--s.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(s,n);this._spatialIndex&&null!=t&&this._spatialIndex.add(t),--s.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this._labeler&&this.owner.view.labeler.setDirty()},d=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(l),o||(m(t)?this.add([e]):s.destroyed||this._endGraphicUpdate(e)))};++this._loadingSymbols,i===fe.ASYNC?s.load((()=>this._frameTask.schedule(h)),(e=>this._frameTask.schedule((()=>d(e))))):s.load(h,d)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,r=i.isElevationSource;this._conditionalRemove(i,t),this._spatialIndex?.remove(i);const s=i.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,r),i.destroy(),this._featureStore.events.emit("changed")}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating"))}_hasLabelingContext(e){if(e instanceof Ee||e instanceof Ie){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some((t=>t.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof Ee&&!this._hasLabelingContext(e))||(Ve.error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t){const i=e.geometry;if(null==i)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!I(i.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?N(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||null!=this.currentRenderer))s=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{s={symbol:r.symbol||Z(r.geometry)}}return null==s?.symbol?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,t.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,t){if(null==e.geometry)return Ve&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,Ve.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return Ve&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,Ve.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const i=this.rendererHasGeometryOperations?N(e,this.layer):e;return this.owner.getRenderingInfoAsync(i,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(null!=t&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=J(t.backgroundFillSymbol,{ignoreDrivers:!0});null!=e.symbol&&"web-style"!==e.symbol.type&&"cim"!==e.symbol.type&&(r=e.symbol.symbolLayers)}const s=le(i,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,t){let i=this._symbols.get(e.id);return void 0===i&&(i=e instanceof Ue?new he(e,(e=>this._frameTask.schedule(e)),(e=>this._createGraphics3DSymbol(e,t))):this._createGraphics3DSymbol(e,t),this._symbols.set(e.id,i)),null!=i&&++i.referenced,i}trackGraphicState(e){return null==this._graphicStateTracking&&(this._graphicStateTracking=new de(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,i&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){const i=t.graphic;if(this._graphicsWithoutSymbol.delete(i.uid),!this._symbols.has(e.symbol.id))return this.add([i]),null;if(this.graphics3DGraphics.has(i.uid))return null;const r=e.createGraphics3DGraphic(t);if(null==r)return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(i.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(i.uid),r.centroid=null,null!=i.geometry&&"point"!==i.geometry.type&&(r.centroid=pe(i.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(r),null!=this._filterVisibility){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(te.GRAPHIC,ie.FILTER,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),this._deconflictor&&this.owner.view.deconflictor.setInitialIconVisibilityFlag(this,r),r.initialize(this.stageLayer,this.owner),null!=this._graphicStateTracking&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[i.uid];return a&&(delete this._whenGraphics3DGraphicRequests[i.uid],a.resolve(r)),r}_abortRendererChange(){this._rendererChangeAbortController&&(this._rendererChangeAbortController.abort(),this._rendererChangeAbortController=null)}async rendererChange(e){if(this._abortRendererChange(),e!==this.currentRenderer)if(this._validateRenderer(e),null==e&&this._currentRendererChange(null,!1),B(e))if(null!=e&&e.arcadeRequired){const t=new AbortController;this._rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();y(t);const r=i.hasGeometryOperations(e);r&&(await i.enableGeometryOperations(),y(t)),this.effectiveUpdatePolicy===fe.ASYNC?await this._frameTask.schedule((()=>this._currentRendererChange(e,r)),t.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===fe.ASYNC){const t=new AbortController;this._rendererChangeAbortController=t,await this._frameTask.schedule((()=>this._currentRendererChange(e,!1)),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return null==this._arcadeOnDemand?(this._arcadeOnDemand=await Y(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;const i=this.symbolCreationContext.renderer;if(e===i)return;if(this._symbolConversionCache.clear(),null==e)return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=G(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,null!=r&&("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this._graphicsBySymbol.get(s.id);t&&t.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof z?this.layer:null,h=this._arcadeOnDemand;if(s===i.defaultSymbol&&i.getSymbol(N(o,l),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach((e=>r.push(e))),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_applyUniqueValueRendererDiff(e,t,i){const r=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(r||a){const n=a?a.added.map((e=>e.symbol)).filter(s):[],o=a?a.removed.map((e=>e.symbol)).filter(s):[];if(a)for(let e=0;e<a.changed.length;e++)n.push(a.changed[e].newValue.symbol),o.push(a.changed[e].oldValue.symbol);return r?(i.defaultSymbol&&o.push(i.defaultSymbol),t.defaultSymbol&&n.push(t.defaultSymbol)):i.defaultSymbol&&n.length&&o.push(t.defaultSymbol),this._applySymbolSetDiff(n,o,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==t?.type||"unique-value"!==i?.type||null!=e&&"partial"!==e.type)return[];const r=e=>null!=e?e.id:null,s=e&&e.diff,a=s?.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of i.uniqueValueInfos??[]){const i=r(e.symbol),s=t.uniqueValueInfos?.find((t=>t.value===e.value));s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=null!=t&&t?"string"==typeof t?t:t.id:null;if(null==e||e===i)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(i,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(i,s),null!=s)){const e="string"==typeof t?null:t;null!=e?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,i,r){if(this._diffHasSymbolChange(e))return!1;if(i instanceof t&&r instanceof t&&this._applyUniqueValueRendererDiff(e,i,r)&&0===Object.keys(e.diff).length)return!0;for(const[t]of this._graphicsBySymbol){const r=this._symbols.get(t);if(null!=r)switch(r.applyRendererDiff(e,i)){case ce.RecreateSymbol:this._recreateSymbol(t);break;case ce.RecreateGraphics:this._recreateGraphicsForSymbol(t);case ce.FastUpdate:}}return!0}opacityChange(){this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("opacity",t))),this._updateStageLayerVisibility()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t))),this._deconflictor&&this._deconflictor.slicePlaneEnabledChange(),this._labeler&&this._labeler.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)}))}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("skipHighSymbolLods",t)||this._recreateSymbol(i)}))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=C((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=T();return ue(e,r,t)?this.symbolCreationContext.clippingExtent=V(L(),r):this.symbolCreationContext.clippingExtent=null,!F(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach((i=>{e(i)&&(t=!0)})),t&&(this.owner.view.labeler?.setDirty(),this.owner.view.deconflictor?.setDirty())}forEachGraphics3DSymbol(e){for(const[t,i]of this._symbols){if(null==i)return;e(i,this._graphicsBySymbol.get(t)||He,t)}}updateAllGraphicsVisibility(){null!=this._filterVisibility&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities((e=>{const t=this._updateUserVisibility(e),i=null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(e);return t||i}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(te.GRAPHIC,ie.USER,!1)))}_validateRenderer(e){const t=q(e,{geometryType:this.layer?.geometryType});if(t){const e=`Renderer for layer '${this.layer.title?`${this.layer.title}, `:""}, id:${this.layer.id}' is not supported in a SceneView`;Ve.warn(e,t.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach(((t,i)=>{if(null==t||t.referenced>0)return;const r=this._graphicsBySymbol.get(i);r&&0!==r.size||(this._graphicsBySymbol.delete(i),this._symbols.delete(i),h(t),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){return{snapshotInternals:()=>({graphics:[...this.graphics3DGraphics.keys()].sort(),symbols:[...this._symbols.keys()].sort(),graphicsBySymbol:[...this._graphicsBySymbol.keys()].sort().map((e=>({symbolId:e,graphics:[...this._graphicsBySymbol.get(e).keys()].sort()}))),graphicsWithoutSymbol:[...this._graphicsWithoutSymbol.keys()].sort(),graphicsDrapedUids:[...this._graphicsDrapedUids].sort(),pendingUpdates:this._pendingUpdates}),symbols:this._symbols,filterVisibility:this._filterVisibility,numPending:this._pendingUpdates.size,forceUpdatePolicy:e=>{this._forcedUpdatePolicy=e}}}get performanceInfo(){return{visible:this.graphics3DGraphics.size,missing:this._graphicsWithoutSymbol.size,pending:this._pendingUpdates.size}}};var Te;Fe.tmpVec=E(),e([S({readOnly:!0})],Fe.prototype,"computedExtent",void 0),e([S()],Fe.prototype,"currentRenderer",void 0),e([S()],Fe.prototype,"rendererHasGeometryOperations",void 0),e([S()],Fe.prototype,"_frameTask",void 0),e([S({readOnly:!0})],Fe.prototype,"_viewSpatialReference",null),e([S()],Fe.prototype,"_rendererChangeAbortController",void 0),e([S()],Fe.prototype,"_elevationInfoChangeAbortController",void 0),e([S()],Fe.prototype,"_initializeAbortController",void 0),e([S()],Fe.prototype,"_elevationAlignment",void 0),e([S()],Fe.prototype,"_scaleVisibility",void 0),e([S()],Fe.prototype,"_filterVisibility",void 0),e([S()],Fe.prototype,"_initializePromise",void 0),e([S()],Fe.prototype,"_spatialIndex",void 0),e([S({readOnly:!0})],Fe.prototype,"extentPadding",void 0),e([S()],Fe.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([S()],Fe.prototype,"_featureStore",void 0),e([S()],Fe.prototype,"_deconflictor",void 0),e([S()],Fe.prototype,"_labeler",void 0),e([S()],Fe.prototype,"_objectStates",void 0),e([S()],Fe.prototype,"_loadingSymbols",void 0),e([S()],Fe.prototype,"preferredUpdatePolicy",void 0),e([S()],Fe.prototype,"_forcedUpdatePolicy",void 0),e([S({readOnly:!0})],Fe.prototype,"effectiveUpdatePolicy",null),e([S({constructOnly:!0})],Fe.prototype,"elevationFeatureExpressionEnabled",void 0),e([S({constructOnly:!0})],Fe.prototype,"owner",void 0),e([S({constructOnly:!0})],Fe.prototype,"layer",void 0),e([S({constructOnly:!0})],Fe.prototype,"graphicSymbolSupported",void 0),e([S({constructOnly:!0})],Fe.prototype,"getRenderingInfoWithoutRenderer",void 0),e([S({constructOnly:!0})],Fe.prototype,"componentFactories",void 0),e([S({constructOnly:!0})],Fe.prototype,"setUidToIdOnAdd",void 0),e([S()],Fe.prototype,"featureStore",null),e([S()],Fe.prototype,"initializePromise",null),e([S()],Fe.prototype,"scaleVisibility",null),e([S()],Fe.prototype,"elevationAlignment",null),e([S()],Fe.prototype,"objectStates",null),e([S()],Fe.prototype,"filterVisibility",null),e([S({readOnly:!0})],Fe.prototype,"updating",null),e([S({readOnly:!0})],Fe.prototype,"running",null),e([S({readOnly:!0})],Fe.prototype,"suspendedOrOutsideOfView",null),e([S({readOnly:!0,dependsOn:[]})],Fe.prototype,"updatingRemaining",null),e([S({readOnly:!0})],Fe.prototype,"displayFeatureLimit",null),e([S({readOnly:!0,dependsOn:[]})],Fe.prototype,"averageSymbolComplexity",null),e([S({constructOnly:!0})],Fe.prototype,"hasZ",void 0),e([S({constructOnly:!0})],Fe.prototype,"hasM",void 0),e([S()],Fe.prototype,"_objectIdField",null),Fe=Ae=e([w(Oe)],Fe),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Te||(Te={}));class ke{constructor(){this.add=null,this.renderingInfo=null,this.state=Te.NEW,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Te.NEW,this.abortController=null,this.remove=null}}const ze=10,Me=E(),We=E(),He=new Map;export{Fe as Graphics3DCore};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{XXH as i}from"../../../../arcade/functions/hash.js";import s from"../../../../core/Accessor.js";import{neverReached as r}from"../../../../core/compilerUtils.js";import{makeHandle as n}from"../../../../core/handleUtils.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{logOnError as o}from"../../../../core/promiseUtils.js";import{watch as l,initial as p,when as d}from"../../../../core/reactiveUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import{subclass as h}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as c}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{canProject as g,project as m}from"../../../../geometry/support/webMercatorUtils.js";import{matchRandomRotationExpression as b}from"../../../../renderers/support/randomRotationExpression.js";import{getRenderingInfo as f,getRenderingInfoAsync as E}from"../../../../renderers/support/renderingInfoUtils.js";import C from"../../../../rest/support/Query.js";import{DrapeSourceType as x}from"../interfaces.js";import{suspendResumeExtentOptimism as w}from"./constants.js";import{DisplayFeatureLimit as v}from"./DisplayFeatureLimit.js";import{Graphics3DCore as V}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as j}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as S}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as R}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as _}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as O}from"./graphicUtils.js";import{attributeLookup as I}from"../support/attributeUtils.js";import{FeatureVisibilityFilter as G}from"../support/FeatureVisibilityFilter.js";import{Object3DState as A}from"../../webgl-engine/lib/basicInterfaces.js";import{UpdatePolicy as U}from"../../webgl-engine/lib/UpdatePolicy.js";let P=class extends s{constructor(e){super(e),this.type="graphics-3d",this._randomRotationRenderers=null,this._updatingHandles=new y,this.elevationFeatureExpressionEnabled=!1,this.scaleVisibilityEnabled=!1,this.filterVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this.elevationAlignmentEnabled=!1,this.timeExtentEnabled=!1,this.setUidToIdOnAdd=!0,this.dataExtent=null,this.drapeSourceType=x.Features,this.preferredUpdatePolicy=U.ASYNC,this._suspendResumeExtent=null}initialize(){const e=this.owner,t=(this.filterVisibilityEnabled||this.timeExtentEnabled)&&"multipatch"!==e.layer.geometryType,i=new V({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:e.hasZ,hasM:e.hasM,setUidToIdOnAdd:this.setUidToIdOnAdd,componentFactories:{deconflictor:t=>e.view.deconflictor.addGraphicsOwner(t),labeler:(t,i)=>e.view.labeler.addGraphicsOwner(t,i),elevationAlignment:this.elevationAlignmentEnabled?(t,i)=>new j({graphicsCoreOwner:this,graphicsCore:t,queryGraphicUIDsInExtent:i,elevationProvider:e.view.elevationProvider}):null,scaleVisibility:this.scaleVisibilityEnabled?(t,i)=>new _({graphicsCoreOwner:this,layer:this.layer,queryGraphicUIDsInExtent:i,graphicsCore:t,basemapTerrain:e.view.basemapTerrain}):null,filterVisibility:t?t=>new G({context:{layerView:e,...t}}):null,objectStates:e=>new R(e)}});this._set("graphicsCore",i),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new S({graphicsCoreOwner:this})),this.elevationAlignment&&this._updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{c(e,t)&&this._updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this._updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this._updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{c(e,t)&&this.graphicsCore.updateLabelingInfo()})),this._updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e)),this._set("initializePromise",this._initializeAsync()),this._updatingHandles.addPromise(this.initializePromise)}async _initializeAsync(){await o(this.graphicsCore.initializePromise);const e=this.owner;this._updatingHandles.add((()=>this.renderer),(e=>this._updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this._updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this._updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await o(this.graphicsCore.updateLabelingInfo())}destroy(){this._updatingHandles.destroy(),this._set("frustumVisibility",a(this.frustumVisibility)),this._set("graphicsCore",a(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get renderer(){const{renderer:e,objectIdField:t}=this.layer;if(!e||!t||"heatmap"===e.type||!e.visualVariables)return e;const i=e.visualVariables.findIndex((e=>"rotation"===e.type&&null!=e.valueExpression&&b(e.valueExpression)===t&&(null==e.axis||"heading"===e.axis)&&"geographic"===e.rotationType));if(i<0)return e;const s=e.clone();return s.visualVariables.splice(i,1),this._randomRotationRenderers||(this._randomRotationRenderers=new WeakMap),this._randomRotationRenderers.set(s,t),s}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get filterVisibility(){return this.graphicsCore?.filterVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get objectStates(){return this.graphicsCore?.objectStates}get suspendResumeExtentMode(){return"suspendResumeExtentMode"in this.owner?this.owner.suspendResumeExtentMode:"computed"}get scaleVisibilitySuspended(){return null!=this.scaleVisibility&&this.scaleVisibility.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return null==this.frustumVisibility||!this.frustumVisibility.suspended}get suspendInfo(){const e={};return this.scaleVisibilitySuspended&&(e.outsideScaleRange=!0),null!=this.frustumVisibility&&this.frustumVisibility.suspended&&(e.outsideOfView=!0),e}get updating(){return!!(this.graphicsCore?.updating||null!=this.frustumVisibility&&this.frustumVisibility.updating||this._updatingHandles.updating)}get updatingRemaining(){return this.graphicsCore?.updatingRemaining??0}get featureStore(){return this.graphicsCore?.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner?.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:this.owner.view.spatialReference}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.graphicsCore?.symbolUpdateType}get displayFeatureLimit(){const e=this.view.quality,t=this.graphicsCore?.displayFeatureLimit;if(1===e)return t;const i=Math.ceil(t.maximumNumberOfFeatures*e);return new v(t.maximumTotalNumberOfVertices,i,t.averageSymbolComplexity)}get usedMemory(){return this.graphicsCore?.usedMemory??0}get loadedFeatures(){return this.graphicsCore?.numberOfGraphics??0}get usedMemoryPerFeature(){return this.graphicsCore?.usedMemoryPerGraphic??0}get unprocessedMemoryEstimate(){return this.graphicsCore?.unprocessedMemoryEstimate??0}get performanceInfo(){return{core:this.graphicsCore.performanceInfo,elevationUpdating:this.elevationAlignment.updating,visibilityFrustum:null==this.frustumVisibility||!this.frustumVisibility.suspended,visibilityScale:!this.scaleVisibilitySuspended}}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(A.MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e,i){if(e instanceof C){const{set:t,handle:s}=this.objectStates.acquireSet(A.Highlight,i);return this.owner.queryObjectIds(e).then((e=>this.objectStates.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==I(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=this.objectStates.acquireSet(A.Highlight,null);return this.objectStates.setUids(i,e),s}e=t.map((e=>I(this.layer.fieldsIndex,e.attributes,i)))}if(Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0])){const t=e,{set:s,handle:r}=this.objectStates.acquireSet(A.Highlight,i);return this.objectStates.setObjectIds(s,t),r}}return n()}resetObjectStates(){this.objectStates.reset()}whenGraphicBounds(e,t){return this.graphicsCore?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsCore?.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,s){const r=f(e,{renderer:t,arcade:s});if(r?.color){const e=r.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}if(null!=r&&null!=t&&this._randomRotationRenderers?.has(t)){const s=this._randomRotationRenderers.get(t),n=e.attributes[s],a=new i(0);a.updateFloatArray([n]),a.updateUint8Array([173]),r.heading=8.381e-8*a.digest()}return r}getRenderingInfoAsync(e,t,i,s){return E(e,{renderer:t,arcade:i,...s})}getSymbolLayerSize(e,t){return this.graphicsCore?.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){this.graphicsCore?.setObjectIdVisibility(e,t)}refreshFilter(){null!=this.filterVisibility&&this.filterVisibility.reapply()}getGraphics3DGraphicByObjectId(e){return this.graphicsCore?.getGraphics3DGraphicByObjectId(e)}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.addHandles(l((()=>this.suspendResumeExtentMode),(()=>{switch(this.removeHandles(F),this.suspendResumeExtentMode){case"computed":this.addHandles([l((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],F);break;case"data":this.addHandles([d((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.dataExtent)))],F);break;default:r(this.suspendResumeExtentMode)}}),p))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this._suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!g(e,i))return;e=m(e,i)}return O(e,t,w,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){null!=this.frustumVisibility&&this.frustumVisibility.setExtent(e),null!=this.scaleVisibility&&this.scaleVisibility.setExtent(e)}};e([u()],P.prototype,"type",void 0),e([u({constructOnly:!0})],P.prototype,"owner",void 0),e([u()],P.prototype,"layer",null),e([u()],P.prototype,"renderer",null),e([u({constructOnly:!0})],P.prototype,"updateClippingExtent",void 0),e([u({constructOnly:!0})],P.prototype,"elevationFeatureExpressionEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"graphicsCore",void 0),e([u({constructOnly:!0})],P.prototype,"scaleVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"filterVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"frustumVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"elevationAlignmentEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"timeExtentEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"setUidToIdOnAdd",void 0),e([u()],P.prototype,"scaleVisibility",null),e([u()],P.prototype,"filterVisibility",null),e([u()],P.prototype,"elevationAlignment",null),e([u({constructOnly:!0})],P.prototype,"frustumVisibility",void 0),e([u()],P.prototype,"objectStates",null),e([u()],P.prototype,"initializePromise",void 0),e([u()],P.prototype,"suspendResumeExtentMode",null),e([u()],P.prototype,"dataExtent",void 0),e([u()],P.prototype,"scaleVisibilitySuspended",null),e([u()],P.prototype,"suspended",null),e([u()],P.prototype,"legendEnabled",null),e([u()],P.prototype,"suspendInfo",null),e([u()],P.prototype,"updating",null),e([u()],P.prototype,"updatingRemaining",null),e([u()],P.prototype,"featureStore",null),e([u()],P.prototype,"view",null),e([u()],P.prototype,"loadedGraphics",null),e([u()],P.prototype,"fullOpacity",null),e([u()],P.prototype,"filter",null),e([u()],P.prototype,"slicePlaneEnabled",null),e([u()],P.prototype,"drapeSourceType",void 0),e([u()],P.prototype,"updatePolicy",null),e([u()],P.prototype,"preferredUpdatePolicy",void 0),e([u({readOnly:!0})],P.prototype,"displayFeatureLimit",null),P=e([h("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],P);const F="suspendResumeExtentMode";export{P as Graphics3DFeatureProcessor};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{XXH as i}from"../../../../arcade/functions/hash.js";import s from"../../../../core/Accessor.js";import{neverReached as r}from"../../../../core/compilerUtils.js";import{makeHandle as n}from"../../../../core/handleUtils.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{logOnError as o}from"../../../../core/promiseUtils.js";import{watch as l,initial as p,when as d}from"../../../../core/reactiveUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import{subclass as h}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as c}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{canProject as g,project as m}from"../../../../geometry/support/webMercatorUtils.js";import{matchRandomRotationExpression as b}from"../../../../renderers/support/randomRotationExpression.js";import{getRenderingInfo as f,getRenderingInfoAsync as E}from"../../../../renderers/support/renderingInfoUtils.js";import C from"../../../../rest/support/Query.js";import{DrapeSourceType as x}from"../interfaces.js";import{suspendResumeExtentOptimism as w}from"./constants.js";import{DisplayFeatureLimit as v}from"./DisplayFeatureLimit.js";import{Graphics3DCore as j}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as V}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as S}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as R}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as _}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as O}from"./graphicUtils.js";import{attributeLookup as I}from"../support/attributeUtils.js";import{FeatureVisibilityFilter as G}from"../support/FeatureVisibilityFilter.js";import{Object3DState as A}from"../../webgl-engine/lib/basicInterfaces.js";import{UpdatePolicy as U}from"../../webgl-engine/lib/UpdatePolicy.js";let P=class extends s{constructor(e){super(e),this.type="graphics-3d",this._randomRotationRenderers=null,this._updatingHandles=new y,this.elevationFeatureExpressionEnabled=!1,this.scaleVisibilityEnabled=!1,this.filterVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this.elevationAlignmentEnabled=!1,this.timeExtentEnabled=!1,this.setUidToIdOnAdd=!0,this.dataExtent=null,this.drapeSourceType=x.Features,this.preferredUpdatePolicy=U.ASYNC,this._suspendResumeExtent=null}initialize(){const e=this.owner,t=(this.filterVisibilityEnabled||this.timeExtentEnabled)&&"multipatch"!==e.layer.geometryType,i=new j({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:e.hasZ,hasM:e.hasM,setUidToIdOnAdd:this.setUidToIdOnAdd,componentFactories:{deconflictor:t=>e.view.deconflictor.addGraphicsOwner(t),labeler:(t,i)=>e.view.labeler.addGraphicsOwner(t,i),elevationAlignment:this.elevationAlignmentEnabled?(t,i)=>new V({graphicsCoreOwner:this,graphicsCore:t,queryGraphicUIDsInExtent:i,elevationProvider:e.view.elevationProvider}):null,scaleVisibility:this.scaleVisibilityEnabled?(t,i)=>new _({graphicsCoreOwner:this,layer:this.layer,queryGraphicUIDsInExtent:i,graphicsCore:t,basemapTerrain:e.view.basemapTerrain}):null,filterVisibility:t?t=>new G({context:{layerView:e,...t}}):null,objectStates:e=>new R(e)}});this._set("graphicsCore",i),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new S({graphicsCoreOwner:this})),this.elevationAlignment&&this._updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{c(e,t)&&this._updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this._updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this._updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{c(e,t)&&this.graphicsCore.updateLabelingInfo()})),this._updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e)),this._set("initializePromise",this._initializeAsync()),this._updatingHandles.addPromise(this.initializePromise)}async _initializeAsync(){await o(this.graphicsCore.initializePromise);const e=this.owner;this._updatingHandles.add((()=>this.renderer),(e=>this._updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this._updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this._updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await o(this.graphicsCore.updateLabelingInfo())}destroy(){this._updatingHandles.destroy(),this._set("frustumVisibility",a(this.frustumVisibility)),this._set("graphicsCore",a(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get renderer(){const{renderer:e,objectIdField:t}=this.layer;if(!e||!t||"heatmap"===e.type||!e.visualVariables)return e;const i=e.visualVariables.findIndex((e=>"rotation"===e.type&&null!=e.valueExpression&&b(e.valueExpression)===t&&(null==e.axis||"heading"===e.axis)&&"geographic"===e.rotationType));if(i<0)return e;const s=e.clone();return s.visualVariables.splice(i,1),this._randomRotationRenderers||(this._randomRotationRenderers=new WeakMap),this._randomRotationRenderers.set(s,t),s}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get filterVisibility(){return this.graphicsCore?.filterVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get objectStates(){return this.graphicsCore?.objectStates}get suspendResumeExtentMode(){return"suspendResumeExtentMode"in this.owner?this.owner.suspendResumeExtentMode:"computed"}get scaleVisibilitySuspended(){return null!=this.scaleVisibility&&this.scaleVisibility.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return null==this.frustumVisibility||!this.frustumVisibility.suspended}get suspendInfo(){const e={};return this.scaleVisibilitySuspended&&(e.outsideScaleRange=!0),null!=this.frustumVisibility&&this.frustumVisibility.suspended&&(e.outsideOfView=!0),e}get updating(){return!!(this.graphicsCore?.updating||this.frustumVisibility?.updating||this._updatingHandles.updating)}get updatingRemaining(){return this.graphicsCore?.updatingRemaining??0}get featureStore(){return this.graphicsCore?.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner?.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:this.owner.view.spatialReference}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.graphicsCore?.symbolUpdateType}get displayFeatureLimit(){const e=this.view.quality,t=this.graphicsCore?.displayFeatureLimit;if(1===e)return t;const i=Math.ceil(t.maximumNumberOfFeatures*e);return new v(t.maximumTotalNumberOfVertices,i,t.averageSymbolComplexity)}get usedMemory(){return this.graphicsCore?.usedMemory??0}get loadedFeatures(){return this.graphicsCore?.numberOfGraphics??0}get usedMemoryPerFeature(){return this.graphicsCore?.usedMemoryPerGraphic??0}get unprocessedMemoryEstimate(){return this.graphicsCore?.unprocessedMemoryEstimate??0}get performanceInfo(){return{core:this.graphicsCore.performanceInfo,elevationUpdating:this.elevationAlignment.updating,visibilityFrustum:null==this.frustumVisibility||!this.frustumVisibility.suspended,visibilityScale:!this.scaleVisibilitySuspended}}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(A.MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e,i){if(e instanceof C){const{set:t,handle:s}=this.objectStates.acquireSet(A.Highlight,i);return this.owner.queryObjectIds(e).then((e=>this.objectStates.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==I(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=this.objectStates.acquireSet(A.Highlight,null);return this.objectStates.setUids(i,e),s}e=t.map((e=>I(this.layer.fieldsIndex,e.attributes,i)))}if(Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0])){const t=e,{set:s,handle:r}=this.objectStates.acquireSet(A.Highlight,i);return this.objectStates.setObjectIds(s,t),r}}return n()}resetObjectStates(){this.objectStates.reset()}whenGraphicBounds(e,t){return this.graphicsCore?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsCore?.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,s){const r=f(e,{renderer:t,arcade:s});if(r?.color){const e=r.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}if(null!=r&&null!=t&&this._randomRotationRenderers?.has(t)){const s=this._randomRotationRenderers.get(t),n=e.attributes[s],a=new i(0);a.updateFloatArray([n]),a.updateUint8Array([173]),r.heading=8.381e-8*a.digest()}return r}getRenderingInfoAsync(e,t,i,s){return E(e,{renderer:t,arcade:i,...s})}getSymbolLayerSize(e,t){return this.graphicsCore?.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){this.graphicsCore?.setObjectIdVisibility(e,t)}refreshFilter(){null!=this.filterVisibility&&this.filterVisibility.reapply()}getGraphics3DGraphicByObjectId(e){return this.graphicsCore?.getGraphics3DGraphicByObjectId(e)}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.addHandles(l((()=>this.suspendResumeExtentMode),(()=>{switch(this.removeHandles(F),this.suspendResumeExtentMode){case"computed":this.addHandles([l((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],F);break;case"data":this.addHandles([d((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.dataExtent)))],F);break;default:r(this.suspendResumeExtentMode)}}),p))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this._suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!g(e,i))return;e=m(e,i)}return O(e,t,w,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){null!=this.frustumVisibility&&this.frustumVisibility.setExtent(e),null!=this.scaleVisibility&&this.scaleVisibility.setExtent(e)}};e([u()],P.prototype,"type",void 0),e([u({constructOnly:!0})],P.prototype,"owner",void 0),e([u()],P.prototype,"layer",null),e([u()],P.prototype,"renderer",null),e([u({constructOnly:!0})],P.prototype,"updateClippingExtent",void 0),e([u({constructOnly:!0})],P.prototype,"elevationFeatureExpressionEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"graphicsCore",void 0),e([u({constructOnly:!0})],P.prototype,"scaleVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"filterVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"frustumVisibilityEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"elevationAlignmentEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"timeExtentEnabled",void 0),e([u({constructOnly:!0})],P.prototype,"setUidToIdOnAdd",void 0),e([u()],P.prototype,"scaleVisibility",null),e([u()],P.prototype,"filterVisibility",null),e([u()],P.prototype,"elevationAlignment",null),e([u({constructOnly:!0})],P.prototype,"frustumVisibility",void 0),e([u()],P.prototype,"objectStates",null),e([u()],P.prototype,"initializePromise",void 0),e([u()],P.prototype,"suspendResumeExtentMode",null),e([u()],P.prototype,"dataExtent",void 0),e([u()],P.prototype,"scaleVisibilitySuspended",null),e([u()],P.prototype,"suspended",null),e([u()],P.prototype,"legendEnabled",null),e([u()],P.prototype,"suspendInfo",null),e([u()],P.prototype,"updating",null),e([u()],P.prototype,"updatingRemaining",null),e([u()],P.prototype,"featureStore",null),e([u()],P.prototype,"view",null),e([u()],P.prototype,"loadedGraphics",null),e([u()],P.prototype,"fullOpacity",null),e([u()],P.prototype,"filter",null),e([u()],P.prototype,"slicePlaneEnabled",null),e([u()],P.prototype,"drapeSourceType",void 0),e([u()],P.prototype,"updatePolicy",null),e([u()],P.prototype,"preferredUpdatePolicy",void 0),e([u({readOnly:!0})],P.prototype,"displayFeatureLimit",null),P=e([h("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],P);const F="suspendResumeExtentMode";export{P as Graphics3DFeatureProcessor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import t from"../../../../core/Error.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import i from"../../../../geometry/Extent.js";import{fallbackObjectIDAttribute as a}from"../../../../layers/LayerConstants.js";import{QueryEngine as u}from"../../../../layers/graphics/data/QueryEngine.js";import y from"../../../../layers/support/FieldsIndex.js";import c from"../../../../rest/support/FeatureSet.js";import p from"../../../../rest/support/Query.js";const l=u;let d=class extends r{get spatialReference(){return this.layerView.view.spatialReference}get layer(){return this.layerView.i3slayer}get defaultQueryJSON(){return new p({outSpatialReference:this.spatialReference}).toJSON()}get _dataQueryEngine(){return this._ensureDataQueryEngine()}constructor(e){super(e)}initialize(){this.addHandles(this.layerView.on("visible-geometry-changed",(()=>this.spatialIndex.events.emit("changed"))))}destroy(){this._dataQueryEngineInstance=s(this._dataQueryEngineInstance),this._set("layerView",null)}async executeQueryForCount(e,r){return this._dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),r)}async executeQueryForExtent(e,r){const{count:t,extent:s}=await this._dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),r);return{count:t,extent:i.fromJSON(s)}}async executeQueryForIds(e,r){return this._dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),r)}async executeQuery(e,r){const s=this._ensureQueryJSON(e);if(s.returnGeometry)throw new t("feature-store:unsupported-query","returnGeometry is not yet supported for mesh scene layer queries");if(s.returnCentroid)throw new t("feature-store:unsupported-query","returnCentroid is not yet supported for mesh scene layer queries");const n=await this._dataQueryEngine.executeQuery(s,r),o=c.fromJSON(n);return o.features.forEach((e=>{e.geometry=null})),o}_ensureQueryJSON(e){return null==e?this.defaultQueryJSON:e.toJSON()}_ensureDataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const e=this.layer.objectIdField||a,r="esriGeometryPolygon",t=this.layer.fieldsIndex?.toJSON()||new y([]),s=this.layerView.view.resourceController.scheduler,n=this.spatialReference.toJSON(),o=this.priority,i=this.spatialIndex;return this._dataQueryEngineInstance=new l({hasZ:!0,hasM:!1,geometryType:r,fieldsIndex:t,timeInfo:null,spatialReference:n,objectIdField:e,featureStore:i,scheduler:s,priority:o}),this._dataQueryEngineInstance}};e([n({constructOnly:!0})],d.prototype,"layerView",void 0),e([n({constructOnly:!0})],d.prototype,"priority",void 0),e([n({constructOnly:!0})],d.prototype,"spatialIndex",void 0),e([n()],d.prototype,"spatialReference",null),e([n()],d.prototype,"layer",null),e([n()],d.prototype,"defaultQueryJSON",null),d=e([o("esri.views.3d.layers.i3s.I3SQueryEngine")],d);export{d as I3SQueryEngine};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import t from"../../../../core/Error.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import i from"../../../../geometry/Extent.js";import{fallbackObjectIDAttribute as a}from"../../../../layers/LayerConstants.js";import{QueryEngine as u}from"../../../../layers/graphics/data/QueryEngine.js";import y from"../../../../layers/support/FieldsIndex.js";import c from"../../../../rest/support/FeatureSet.js";import p from"../../../../rest/support/Query.js";const l=u;let d=class extends r{get spatialReference(){return this.layerView.view.spatialReference}get layer(){return this.layerView.i3slayer}get defaultQueryJSON(){return new p({outSpatialReference:this.spatialReference}).toJSON()}get _dataQueryEngine(){return this._ensureDataQueryEngine()}constructor(e){super(e)}initialize(){this.addHandles(this.layerView.on("visible-geometry-changed",(()=>this.spatialIndex.events.emit("changed"))))}destroy(){this._dataQueryEngineInstance=s(this._dataQueryEngineInstance),this._set("layerView",null)}async executeQueryForCount(e,r){return this._dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),r)}async executeQueryForExtent(e,r){const{count:t,extent:s}=await this._dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),r);return{count:t,extent:i.fromJSON(s)}}async executeQueryForIds(e,r){return this._dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),r)}async executeQuery(e,r){const s=this._ensureQueryJSON(e);if(s.returnGeometry)throw new t("unsupported-query","returnGeometry is not yet supported for mesh scene layer queries");if(s.returnCentroid)throw new t("unsupported-query","returnCentroid is not yet supported for mesh scene layer queries");const n=await this._dataQueryEngine.executeQuery(s,r),o=c.fromJSON(n);return o.features.forEach((e=>{e.geometry=null})),o}_ensureQueryJSON(e){return null==e?this.defaultQueryJSON:e.toJSON()}_ensureDataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const e=this.layer.objectIdField||a,r="esriGeometryPolygon",t=this.layer.fieldsIndex?.toJSON()||new y([]),s=this.layerView.view.resourceController.scheduler,n=this.spatialReference.toJSON(),o=this.priority,i=this.spatialIndex;return this._dataQueryEngineInstance=new l({hasZ:!0,hasM:!1,geometryType:r,fieldsIndex:t,timeInfo:null,spatialReference:n,objectIdField:e,featureStore:i,scheduler:s,priority:o}),this._dataQueryEngineInstance}};e([n({constructOnly:!0})],d.prototype,"layerView",void 0),e([n({constructOnly:!0})],d.prototype,"priority",void 0),e([n({constructOnly:!0})],d.prototype,"spatialIndex",void 0),e([n()],d.prototype,"spatialReference",null),e([n()],d.prototype,"layer",null),e([n()],d.prototype,"defaultQueryJSON",null),d=e([o("esri.views.3d.layers.i3s.I3SQueryEngine")],d);export{d as I3SQueryEngine};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{releaseMaybe as t}from"../../../../../../core/maybe.js";import{d as r,t as o}from"../../../../../../chunks/mat3.js";import{a as s}from"../../../../../../chunks/mat3f32.js";import{b as a}from"../../../../../../chunks/mat3f64.js";import{H as i}from"../../../../../../chunks/vec3.js";import{e as l,f as n}from"../../../../../../chunks/vec3f64.js";import{v as u}from"../../../../../../chunks/vec4.js";import{f as h}from"../../../../../../chunks/vec4f64.js";import{ColorMixModeEnum as p}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as c}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as d}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as m,IntegratedMeshMode as y}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as g}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as x}from"./shader/VertexDiscardByOpacity.glsl.js";import{MaterialBase as f,parameter as T,parameterBlock as v,MaterialParameterBlock as b}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as M}from"../../../core/renderPasses/AllRenderPasses.js";import{ShaderOutput as O}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as C}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{NormalsDoubleSidedMode as w}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as P}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{defaultMaskAlphaCutoff as S}from"../../../core/shaderLibrary/util/AlphaCutoff.js";import{EllipsoidMode as j}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as q}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as N,CullFaceOptions as A}from"../../../lib/basicInterfaces.js";import{TransparencyPassType as D}from"../../../lib/TransparencyPassType.js";import{defaultAdvancedMRRFactors as R}from"../../../materials/pbrUtils.js";class F extends f{constructor(e,t){super(),this.toMapSpace=t,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=l(R),this.emissiveFactor=n(0,0,0),this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null,this.objectOpacity=1,this.commonMaterialParameters=new W,this.componentParameters=new _,this.textureAlphaCutoff=S,this.alphaDiscardMode=N.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=j.Earth,this.hasOccludees=!1,this._techniqueConfiguration=new m;const i=new q(e.position),u=s(e.rotationScale);r(u,u),this.transformNormalGlobalFromModel=a(o(u,u)),this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this._technique=t(this._technique),this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get texture(){return null!=this.baseColorTexture?this.baseColorTexture.glTexture:null}get textureMetallicRoughness(){return null!=this.metallicRoughnessTexture?this.metallicRoughnessTexture.glTexture:null}get textureEmissive(){return null!=this.emissionTexture?this.emissionTexture.glTexture:null}get textureOcclusion(){return null!=this.occlusionTexture?this.occlusionTexture.glTexture:null}get textureNormal(){return null!=this.normalTexture?this.normalTexture.glTexture:null}prepareTechnique(e,t,r,o){const s=this._techniqueConfiguration;s.hasVertexColors=o.colors,s.hasNormals=o.normals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasEmissionTexture=null!=this.emissionTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.transparencyPassType=t.identifier===M.Material&&null!=r.transparencyPassType?r.transparencyPassType:D.NONE,s.multipassEnabled=t.identifier===M.Material&&r.multipassEnabled,s.cullAboveGround=t.identifier===M.Material&&r.multipassTerrain.cullAboveGround,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?w.View:w.None,s.hasColorTexture=null!=this.baseColorTexture;const a=this._computeWhichMaterialPass();if(s.blendingEnabled=a===k.Transparent||a===k.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?V(r)?L(r)?y.ColorOverlayWithWater:y.ColorOverlay:y.NoOverlay:y.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===y.ColorOverlayWithWater?P.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?P.Schematic:P.Normal:P.Disabled,s.normalType=s.integratedMeshMode===y.None?s.hasNormals?C.Compressed:C.ScreenDerivative:C.Ground,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,t.identifier===M.ShadowMap)s.output=O.Shadow,s.vertexDiscardMode=x.None;else if(t.identifier===M.Highlight)s.output=O.Highlight,s.vertexDiscardMode=x.None;else{switch(this._computeWhichMaterialPass()===k.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?x.Opaque:x.Transparent:s.vertexDiscardMode=x.None,s.output=t.output,s.receiveAmbientOcclusion=!1,s.receiveShadows=!1,t.output){case O.Color:s.receiveAmbientOcclusion=null!=r.ssao,s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.hasScreenSpaceReflections=null!=r.ssr.lastFrameColor,s.hasCloudsReflections=null!=r.cloudsFade.data;break;case O.Alpha:s.hasOccludees=r.hasOccludees;break;case O.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=this.hasSnowCover(r)}return this._technique=e.releaseAndAcquire(d,s,this._technique),this._setClean(),this._technique}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}submit(e,t,r){if(0===this.objectOpacity)return;const o=r.renderable.geometry,s=r.components,a=r.renderable.meta.cameraDepthSquared,i=s.geometryRanges,l=s.highlightRanges,n=s.defaultShadowMapRanges;switch(this._computeWhichMaterialPass()){case k.Opaque:e.materialOpaque.submitDraw(this,o,i,a);break;case k.Transparent:e.materialTransparent.submitDraw(this,o,i,a);break;case k.OpaqueAndTransparent:e.materialOpaque.submitDraw(this,o,i,a),e.materialTransparent.submitDraw(this,o,i,a);break;case k.IntegratedMesh:e.materialIntegratedMesh.submitDraw(this,o,i,a),B(t)&&e.highlightIntegratedMesh.submitDraw(this,o,i,a)}const u=this.componentParameters.castShadows!==I.None;u&&e.shadowMap.submitDraw(this,o,i,a),null!=l&&(e.highlight.submitDraw(this,o,l,a),u&&e.highlightShadowMap.submitDraw(this,o,l,a)),u&&null!=n&&e.defaultShadowMap.submitDraw(this,o,n,a)}_computeWhichMaterialPass(){return this.isIntegratedMesh?k.IntegratedMesh:this.objectOpacity<1?k.Transparent:this.componentParameters.opaqueOverride===I.All?k.Opaque:this.baseColor[3]<1||this.alphaDiscardMode===N.Blend||this.alphaDiscardMode===N.MaskBlend?k.Transparent:this.componentParameters.transparent===I.None?k.Opaque:this.componentParameters.transparent===I.All?k.Transparent:k.OpaqueAndTransparent}}var k,I;e([T({vectorOps:u})],F.prototype,"baseColor",void 0),e([T()],F.prototype,"usePBR",void 0),e([T()],F.prototype,"hasParametersFromSource",void 0),e([T({vectorOps:i})],F.prototype,"mrrFactors",void 0),e([T({vectorOps:i})],F.prototype,"emissiveFactor",void 0),e([T({dispose:!0})],F.prototype,"baseColorTexture",void 0),e([T({dispose:!0})],F.prototype,"metallicRoughnessTexture",void 0),e([T({dispose:!0})],F.prototype,"emissionTexture",void 0),e([T({dispose:!0})],F.prototype,"occlusionTexture",void 0),e([T({dispose:!0})],F.prototype,"normalTexture",void 0),e([T()],F.prototype,"objectOpacity",void 0),e([v()],F.prototype,"commonMaterialParameters",void 0),e([v()],F.prototype,"componentParameters",void 0),e([T()],F.prototype,"textureAlphaCutoff",void 0),e([T()],F.prototype,"alphaDiscardMode",void 0),e([T()],F.prototype,"isIntegratedMesh",void 0),e([T()],F.prototype,"polygonOffsetEnabled",void 0),e([T()],F.prototype,"ellipsoidMode",void 0),e([T()],F.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(k||(k={}));class W extends b{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=A.Back,this.hasSlicePlane=!0}}e([T()],W.prototype,"doubleSided",void 0),e([T()],W.prototype,"cullFace",void 0),e([T()],W.prototype,"hasSlicePlane",void 0);class _ extends b{constructor(){super(...arguments),this.externalColor=h(1,1,1,1),this.externalColorMixMode=p.Multiply,this.castShadows=I.All}get transparent(){return this.externalColor[3]<1?I.All:I.None}get opaqueOverride(){return this.externalColorMixMode===p.Replace&&1===this.externalColor[3]?I.All:I.None}get visible(){return this.externalColor[3]>0?I.All:I.None}get type(){return g.Uniform}}e([T({vectorOps:u})],_.prototype,"externalColor",void 0),e([T()],_.prototype,"externalColorMixMode",void 0),e([T()],_.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(I||(I={}));class E extends b{constructor(){super(...arguments),this.texture=null,this.transparent=I.None,this.opaqueOverride=I.None,this.castShadows=I.None}get type(){return g.Varying}}function B(e){return null!=e.overlay?.getTexture(c.Highlight)}function L(e){return null!=e.overlay?.getTexture(c.WaterNormal)}function V(e){return null!=e.overlay?.getTexture(c.ColorNoRasterImage)}e([T()],E.prototype,"texture",void 0),e([T()],E.prototype,"transparent",void 0),e([T()],E.prototype,"opaqueOverride",void 0),e([T()],E.prototype,"castShadows",void 0);export{W as CommonMaterialParameters,F as ComponentMaterial,I as ComponentParameterSummary,_ as ComponentParametersUniform,E as ComponentParametersVarying};
5
+ import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{releaseMaybe as t}from"../../../../../../core/maybe.js";import{d as r,t as o}from"../../../../../../chunks/mat3.js";import{a as s}from"../../../../../../chunks/mat3f32.js";import{b as a}from"../../../../../../chunks/mat3f64.js";import{H as i}from"../../../../../../chunks/vec3.js";import{e as l,f as n}from"../../../../../../chunks/vec3f64.js";import{v as u}from"../../../../../../chunks/vec4.js";import{f as h}from"../../../../../../chunks/vec4f64.js";import{ColorMixModeEnum as p}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as c}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as d}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as m,IntegratedMeshMode as y}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as g}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as x}from"./shader/VertexDiscardByOpacity.glsl.js";import{MaterialBase as f,parameter as T,parameterBlock as v,MaterialParameterBlock as b}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as M}from"../../../core/renderPasses/AllRenderPasses.js";import{ShaderOutput as O}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as C}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{NormalsDoubleSidedMode as w}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as S}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{defaultMaskAlphaCutoff as P}from"../../../core/shaderLibrary/util/AlphaCutoff.js";import{EllipsoidMode as j}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as q}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as N,CullFaceOptions as A}from"../../../lib/basicInterfaces.js";import{TransparencyPassType as D}from"../../../lib/TransparencyPassType.js";import{defaultAdvancedMRRFactors as R}from"../../../materials/pbrUtils.js";class F extends f{constructor(e,t){super(),this.toMapSpace=t,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=l(R),this.emissiveFactor=n(0,0,0),this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null,this.objectOpacity=1,this.commonMaterialParameters=new W,this.componentParameters=new _,this.textureAlphaCutoff=P,this.alphaDiscardMode=N.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=j.Earth,this.hasOccludees=!1,this._techniqueConfiguration=new m;const i=new q(e.position),u=s(e.rotationScale);r(u,u),this.transformNormalGlobalFromModel=a(o(u,u)),this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this._technique=t(this._technique),this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get texture(){return null!=this.baseColorTexture?this.baseColorTexture.glTexture:null}get textureMetallicRoughness(){return null!=this.metallicRoughnessTexture?this.metallicRoughnessTexture.glTexture:null}get textureEmissive(){return null!=this.emissionTexture?this.emissionTexture.glTexture:null}get textureOcclusion(){return null!=this.occlusionTexture?this.occlusionTexture.glTexture:null}get textureNormal(){return null!=this.normalTexture?this.normalTexture.glTexture:null}prepareTechnique(e,t,r,o){const s=this._techniqueConfiguration;s.hasVertexColors=o.colors,s.hasNormals=o.normals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasEmissionTexture=null!=this.emissionTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.transparencyPassType=t.identifier===M.Material&&null!=r.transparencyPassType?r.transparencyPassType:D.NONE,s.multipassEnabled=t.identifier===M.Material&&r.multipassEnabled,s.cullAboveGround=t.identifier===M.Material&&r.multipassTerrain.cullAboveGround,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?w.View:w.None,s.hasColorTexture=null!=this.baseColorTexture;const a=this._computeWhichMaterialPass();if(s.blendingEnabled=a===k.Transparent||a===k.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?V(r)?L(r)?y.ColorOverlayWithWater:y.ColorOverlay:y.NoOverlay:y.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===y.ColorOverlayWithWater?S.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?S.Schematic:S.Normal:S.Disabled,s.normalType=s.integratedMeshMode===y.None?s.hasNormals?C.Compressed:C.ScreenDerivative:C.Ground,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,t.identifier===M.ShadowMap)s.output=O.Shadow,s.vertexDiscardMode=x.None;else if(t.identifier===M.Highlight)s.output=O.Highlight,s.vertexDiscardMode=x.None;else{switch(a===k.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?x.Opaque:x.Transparent:s.vertexDiscardMode=x.None,s.output=t.output,s.receiveAmbientOcclusion=!1,s.receiveShadows=!1,t.output){case O.Color:s.receiveAmbientOcclusion=null!=r.ssao,s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.hasScreenSpaceReflections=null!=r.ssr.lastFrameColor,s.hasCloudsReflections=null!=r.cloudsFade.data;break;case O.Alpha:s.hasOccludees=r.hasOccludees;break;case O.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=this.hasSnowCover(r)}return this._technique=e.releaseAndAcquire(d,s,this._technique),this._setClean(),this._technique}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}submit(e,t,r){if(0===this.objectOpacity)return;const o=r.renderable.geometry,s=r.components,a=r.renderable.meta.cameraDepthSquared,i=s.geometryRanges,l=s.highlightRanges,n=s.defaultShadowMapRanges;switch(this._computeWhichMaterialPass()){case k.Opaque:e.materialOpaque.submitDraw(this,o,i,a);break;case k.Transparent:e.materialTransparent.submitDraw(this,o,i,a);break;case k.OpaqueAndTransparent:e.materialOpaque.submitDraw(this,o,i,a),e.materialTransparent.submitDraw(this,o,i,a);break;case k.IntegratedMesh:e.materialIntegratedMesh.submitDraw(this,o,i,a),B(t)&&e.highlightIntegratedMesh.submitDraw(this,o,i,a)}const u=this.componentParameters.castShadows!==I.None;u&&e.shadowMap.submitDraw(this,o,i,a),null!=l&&(e.highlight.submitDraw(this,o,l,a),u&&e.highlightShadowMap.submitDraw(this,o,l,a)),u&&null!=n&&e.defaultShadowMap.submitDraw(this,o,n,a)}_computeWhichMaterialPass(){return this.isIntegratedMesh?k.IntegratedMesh:this.objectOpacity<1?k.Transparent:this.componentParameters.opaqueOverride===I.All?k.Opaque:this.baseColor[3]<1||this.alphaDiscardMode===N.Blend||this.alphaDiscardMode===N.MaskBlend?k.Transparent:this.componentParameters.transparent===I.None?k.Opaque:this.componentParameters.transparent===I.All?k.Transparent:k.OpaqueAndTransparent}}var k,I;e([T({vectorOps:u})],F.prototype,"baseColor",void 0),e([T()],F.prototype,"usePBR",void 0),e([T()],F.prototype,"hasParametersFromSource",void 0),e([T({vectorOps:i})],F.prototype,"mrrFactors",void 0),e([T({vectorOps:i})],F.prototype,"emissiveFactor",void 0),e([T({dispose:!0})],F.prototype,"baseColorTexture",void 0),e([T({dispose:!0})],F.prototype,"metallicRoughnessTexture",void 0),e([T({dispose:!0})],F.prototype,"emissionTexture",void 0),e([T({dispose:!0})],F.prototype,"occlusionTexture",void 0),e([T({dispose:!0})],F.prototype,"normalTexture",void 0),e([T()],F.prototype,"objectOpacity",void 0),e([v()],F.prototype,"commonMaterialParameters",void 0),e([v()],F.prototype,"componentParameters",void 0),e([T()],F.prototype,"textureAlphaCutoff",void 0),e([T()],F.prototype,"alphaDiscardMode",void 0),e([T()],F.prototype,"isIntegratedMesh",void 0),e([T()],F.prototype,"polygonOffsetEnabled",void 0),e([T()],F.prototype,"ellipsoidMode",void 0),e([T()],F.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(k||(k={}));class W extends b{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=A.Back,this.hasSlicePlane=!0}}e([T()],W.prototype,"doubleSided",void 0),e([T()],W.prototype,"cullFace",void 0),e([T()],W.prototype,"hasSlicePlane",void 0);class _ extends b{constructor(){super(...arguments),this.externalColor=h(1,1,1,1),this.externalColorMixMode=p.Multiply,this.castShadows=I.All}get transparent(){return this.externalColor[3]<1?I.All:I.None}get opaqueOverride(){return this.externalColorMixMode===p.Replace&&1===this.externalColor[3]?I.All:I.None}get visible(){return this.externalColor[3]>0?I.All:I.None}get type(){return g.Uniform}}e([T({vectorOps:u})],_.prototype,"externalColor",void 0),e([T()],_.prototype,"externalColorMixMode",void 0),e([T()],_.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(I||(I={}));class E extends b{constructor(){super(...arguments),this.texture=null,this.transparent=I.None,this.opaqueOverride=I.None,this.castShadows=I.None}get type(){return g.Varying}}function B(e){return null!=e.overlay?.getTexture(c.Highlight)}function L(e){return null!=e.overlay?.getTexture(c.WaterNormal)}function V(e){return null!=e.overlay?.getTexture(c.ColorNoRasterImage)}e([T()],E.prototype,"texture",void 0),e([T()],E.prototype,"transparent",void 0),e([T()],E.prototype,"opaqueOverride",void 0),e([T()],E.prototype,"castShadows",void 0);export{W as CommonMaterialParameters,F as ComponentMaterial,I as ComponentParameterSummary,_ as ComponentParametersUniform,E as ComponentParametersVarying};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{glsl as e}from"../../../../core/shaderModules/interfaces.js";var a;function r(r,c){const i=r.vertex;switch(i.code.add(e`#define VERTEX_DISCARD_CUTOFF (1.0 - 1.0 / 255.0)`),c.vertexDiscardMode){case a.None:i.code.add(e`#define vertexDiscardByOpacity(_opacity_) {}`);break;case a.Opaque:i.code.add(e`#define vertexDiscardByOpacity(_opacity_) { if (_opacity_ > VERTEX_DISCARD_CUTOFF) { gl_Position = vec4(1e38, 1e38, 1e38, 1.0); return; } }`);break;case a.Transparent:i.code.add(e`#define vertexDiscardByOpacity(_opacity_) { if (_opacity_ <= VERTEX_DISCARD_CUTOFF) { gl_Position = vec4(1e38, 1e38, 1e38, 1.0); return; } }`)}}!function(e){e[e.None=0]="None",e[e.Transparent=1]="Transparent",e[e.Opaque=2]="Opaque",e[e.COUNT=3]="COUNT"}(a||(a={}));export{r as VertexDiscardByOpacity,a as VertexDiscardMode};
5
+ import{neverReached as e}from"../../../../../../../core/compilerUtils.js";import{glsl as a}from"../../../../core/shaderModules/interfaces.js";var r;function c(c,i){const t=c.vertex;switch(t.code.add(a`#define VERTEX_DISCARD_CUTOFF (1.0 - 1.0 / 255.0)`),i.vertexDiscardMode){case r.None:t.code.add(a`#define vertexDiscardByOpacity(_opacity_) {}`);break;case r.Opaque:t.code.add(a`#define vertexDiscardByOpacity(_opacity_) { if (_opacity_ > VERTEX_DISCARD_CUTOFF) { gl_Position = vec4(1e38, 1e38, 1e38, 1.0); return; } }`);break;case r.Transparent:t.code.add(a`#define vertexDiscardByOpacity(_opacity_) { if (_opacity_ <= VERTEX_DISCARD_CUTOFF) { gl_Position = vec4(1e38, 1e38, 1e38, 1.0); return; } }`);break;case r.COUNT:break;default:e(i.vertexDiscardMode)}}!function(e){e[e.None=0]="None",e[e.Transparent=1]="Transparent",e[e.Opaque=2]="Opaque",e[e.COUNT=3]="COUNT"}(r||(r={}));export{c as VertexDiscardByOpacity,r as VertexDiscardMode};
@@ -2,38 +2,59 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{addVerticalOffset as e}from"../attributes/VerticalOffset.glsl.js";import{ScreenSizePerspective as t,addScreenSizePerspectiveAlignment as o}from"../util/ScreenSizePerspective.glsl.js";import{addProjViewLocalOrigin as a,addCameraPosition as s,addViewNormal as i,addPixelRatio as r}from"../util/View.glsl.js";import{Float4PassUniform as n}from"../../shaderModules/Float4PassUniform.js";import{FloatPassUniform as l}from"../../shaderModules/FloatPassUniform.js";import{glsl as f}from"../../shaderModules/interfaces.js";import{VertexAttribute as c}from"../../../lib/VertexAttribute.js";var p;function d(d,u){d.include(t),d.attributes.add(c.POSITION,"vec3"),d.attributes.add(c.NORMAL,"vec3"),d.attributes.add(c.AUXPOS1,"vec4");const v=d.vertex;a(v,u),s(v,u),v.uniforms.add(new n("viewport",((e,t)=>t.camera.fullViewport)),new l("polygonOffset",(e=>e.shaderPolygonOffset)),new l("cameraGroundRelative",((e,t)=>t.camera.aboveGround?1:-1))),u.hasVerticalOffset&&e(v),v.constants.add("smallOffsetAngle","float",.984807753012208),v.code.add(f`struct ProjectHUDAux {
5
+ import{addVerticalOffset as e}from"../attributes/VerticalOffset.glsl.js";import{ScreenSizePerspective as t,addScreenSizePerspectiveAlignment as o}from"../util/ScreenSizePerspective.glsl.js";import{addProjViewLocalOrigin as a,addCameraPosition as s,addViewNormal as i,addPixelRatio as n}from"../util/View.glsl.js";import{Float4PassUniform as r}from"../../shaderModules/Float4PassUniform.js";import{FloatPassUniform as l}from"../../shaderModules/FloatPassUniform.js";import{glsl as f}from"../../shaderModules/interfaces.js";import{VertexAttribute as c}from"../../../lib/VertexAttribute.js";const p=.5;function d(d,u){d.include(t),d.attributes.add(c.POSITION,"vec3"),d.attributes.add(c.NORMAL,"vec3"),d.attributes.add(c.AUXPOS1,"vec4");const v=d.vertex;a(v,u),s(v,u),v.uniforms.add(new r("viewport",((e,t)=>t.camera.fullViewport)),new l("polygonOffset",(e=>e.shaderPolygonOffset)),new l("cameraGroundRelative",((e,t)=>t.camera.aboveGround?1:-1))),u.hasVerticalOffset&&e(v),v.constants.add("smallOffsetAngle","float",.984807753012208),v.code.add(f`struct ProjectHUDAux {
6
6
  vec3 posModel;
7
7
  vec3 posView;
8
8
  vec3 vnormal;
9
9
  float distanceToCamera;
10
10
  float absCosAngle;
11
- };`),v.code.add(f`float applyHUDViewDependentPolygonOffset(float pointGroundDistance, float absCosAngle, inout vec3 posView) {
12
- float pointGroundSign = sign(pointGroundDistance);
13
- if (pointGroundSign == 0.0) {
14
- pointGroundSign = cameraGroundRelative;
15
- }
16
- float groundRelative = cameraGroundRelative * pointGroundSign;
17
- if (polygonOffset > .0) {
18
- float cosAlpha = clamp(absCosAngle, 0.01, 1.0);
19
- float tanAlpha = sqrt(1.0 - cosAlpha * cosAlpha) / cosAlpha;
20
- float factor = (1.0 - tanAlpha / viewport[2]);
21
- if (groundRelative > 0.0) {
22
- posView *= factor;
23
- }
24
- else {
25
- posView /= factor;
26
- }
27
- }
28
- return groundRelative;
29
- }`),u.draped&&!u.hasVerticalOffset||i(v),u.draped||(v.uniforms.add(new l("perDistancePixelRatio",((e,t)=>Math.tan(t.camera.fovY/2)/(t.camera.fullViewport[2]/2)))),v.code.add(f`void applyHUDVerticalGroundOffset(vec3 normalModel, inout vec3 posModel, inout vec3 posView) {
30
- float distanceToCamera = length(posView);
31
- float pixelOffset = distanceToCamera * perDistancePixelRatio * 0.5;
32
- vec3 modelOffset = normalModel * cameraGroundRelative * pixelOffset;
33
- vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;
34
- posModel += modelOffset;
35
- posView += viewOffset;
36
- }`)),u.screenCenterOffsetUnitsEnabled===p.Screen&&r(v),u.hasScreenSizePerspective&&o(v),v.code.add(f`
11
+ };`),v.code.add(f`
12
+ float applyHUDViewDependentPolygonOffset(float pointGroundDistance, float absCosAngle, inout vec3 posView) {
13
+ float pointGroundSign = ${u.multipassEnabled?f.float(0):f`sign(pointGroundDistance)`};
14
+ if (pointGroundSign == 0.0) {
15
+ pointGroundSign = cameraGroundRelative;
16
+ }
17
+
18
+ // cameraGroundRelative is -1 if camera is below ground, 1 if above ground
19
+ // groundRelative is 1 if both camera and symbol are on the same side of the ground, -1 otherwise
20
+ float groundRelative = cameraGroundRelative * pointGroundSign;
21
+
22
+ // view angle dependent part of polygon offset emulation: we take the absolute value because the sign that is
23
+ // dropped is instead introduced using the ground-relative position of the symbol and the camera
24
+ if (polygonOffset > .0) {
25
+ float cosAlpha = clamp(absCosAngle, 0.01, 1.0);
26
+ float tanAlpha = sqrt(1.0 - cosAlpha * cosAlpha) / cosAlpha;
27
+ float factor = (1.0 - tanAlpha / viewport[2]);
28
+
29
+ // same side of the terrain
30
+ if (groundRelative > 0.0) {
31
+ posView *= factor;
32
+ }
33
+ // opposite sides of the terrain
34
+ else {
35
+ posView /= factor;
36
+ }
37
+ }
38
+
39
+ return groundRelative;
40
+ }
41
+ `),u.draped&&!u.hasVerticalOffset||i(v),u.draped||(v.uniforms.add(new l("perDistancePixelRatio",((e,t)=>Math.tan(t.camera.fovY/2)/(t.camera.fullViewport[2]/2)))),v.code.add(f`
42
+ void applyHUDVerticalGroundOffset(vec3 normalModel, inout vec3 posModel, inout vec3 posView) {
43
+ float distanceToCamera = length(posView);
44
+
45
+ // Compute offset in world units for a half pixel shift
46
+ float pixelOffset = distanceToCamera * perDistancePixelRatio * ${f.float(p)};
47
+
48
+ // Apply offset along normal in the direction away from the ground surface
49
+ vec3 modelOffset = normalModel * cameraGroundRelative * pixelOffset;
50
+
51
+ // Apply the same offset also on the view space position
52
+ vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;
53
+
54
+ posModel += modelOffset;
55
+ posView += viewOffset;
56
+ }
57
+ `)),u.screenCenterOffsetUnitsEnabled&&n(v),u.hasScreenSizePerspective&&o(v),v.code.add(f`
37
58
  vec4 projectPositionHUD(out ProjectHUDAux aux) {
38
59
  // centerOffset is in view space and is used to implement world size offset of labels with respect to objects.
39
60
  // It also pulls the label towards the viewer so that the label is visible in front of the object.
@@ -61,7 +82,7 @@ posView += viewOffset;
61
82
 
62
83
  aux.absCosAngle = abs(cosAngle);
63
84
 
64
- ${u.hasScreenSizePerspective&&(u.hasVerticalOffset||u.screenCenterOffsetUnitsEnabled===p.Screen)?"vec3 perspectiveFactor = screenSizePerspectiveScaleFactor(aux.absCosAngle, aux.distanceToCamera, screenSizePerspectiveAlignment);":""}
85
+ ${u.hasScreenSizePerspective&&(u.hasVerticalOffset||u.screenCenterOffsetUnitsEnabled)?"vec3 perspectiveFactor = screenSizePerspectiveScaleFactor(aux.absCosAngle, aux.distanceToCamera, screenSizePerspectiveAlignment);":""}
65
86
 
66
87
  ${u.hasVerticalOffset?u.hasScreenSizePerspective?"float verticalOffsetScreenHeight = applyScreenSizePerspectiveScaleFactorFloat(verticalOffset.x, perspectiveFactor);":"float verticalOffsetScreenHeight = verticalOffset.x;":""}
67
88
 
@@ -77,7 +98,7 @@ posView += viewOffset;
77
98
 
78
99
  float groundRelative = applyHUDViewDependentPolygonOffset(pointGroundDistance, aux.absCosAngle, aux.posView);
79
100
 
80
- ${u.screenCenterOffsetUnitsEnabled!==p.Screen?f`
101
+ ${u.screenCenterOffsetUnitsEnabled?"":f`
81
102
  // Apply x/y in view space, but z in screen space (i.e. along posView direction)
82
103
  aux.posView += vec3(centerOffset.x, centerOffset.y, 0.0);
83
104
 
@@ -86,16 +107,16 @@ posView += viewOffset;
86
107
  if (centerOffset.z != 0.0) {
87
108
  aux.posView -= normalize(aux.posView) * centerOffset.z;
88
109
  }
89
- `:""}
110
+ `}
90
111
 
91
112
  vec4 posProj = proj * vec4(aux.posView, 1.0);
92
113
 
93
- ${u.screenCenterOffsetUnitsEnabled===p.Screen?u.hasScreenSizePerspective?"float centerOffsetY = applyScreenSizePerspectiveScaleFactorFloat(centerOffset.y, perspectiveFactor);":"float centerOffsetY = centerOffset.y;":""}
114
+ ${u.screenCenterOffsetUnitsEnabled?u.hasScreenSizePerspective?"float centerOffsetY = applyScreenSizePerspectiveScaleFactorFloat(centerOffset.y, perspectiveFactor);":"float centerOffsetY = centerOffset.y;":""}
94
115
 
95
- ${u.screenCenterOffsetUnitsEnabled===p.Screen?"posProj.xy += vec2(centerOffset.x, centerOffsetY) * pixelRatio * 2.0 / viewport.zw * posProj.w;":""}
116
+ ${u.screenCenterOffsetUnitsEnabled?"posProj.xy += vec2(centerOffset.x, centerOffsetY) * pixelRatio * 2.0 / viewport.zw * posProj.w;":""}
96
117
 
97
118
  // constant part of polygon offset emulation
98
119
  posProj.z -= groundRelative * polygonOffset * posProj.w;
99
120
  return posProj;
100
121
  }
101
- `)}!function(e){e[e.World=0]="World",e[e.Screen=1]="Screen",e[e.COUNT=2]="COUNT"}(p||(p={}));export{d as HUD,p as HUDSpace};
122
+ `)}export{d as HUD,p as HUDVerticalPixelOffset};