@arcgis/core 4.34.0-next.12 → 4.34.0-next.14

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 (626) hide show
  1. package/applications/Components/stringUtils.d.ts +6 -0
  2. package/applications/Components/stringUtils.js +5 -0
  3. package/arcade/Dictionary.js +1 -1
  4. package/arcade/Feature.js +1 -1
  5. package/arcade/arcadeAsyncRuntime.js +1 -1
  6. package/arcade/arcadeCompiler.js +1 -1
  7. package/arcade/arcadeRuntime.js +1 -1
  8. package/arcade/containerUtils.js +1 -1
  9. package/arcade/deepClone.js +1 -1
  10. package/arcade/featureSetUtils.js +1 -1
  11. package/arcade/featureset/actions/Adapted.js +1 -1
  12. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  13. package/arcade/functions/convertdirection.js +1 -1
  14. package/arcade/functions/date.js +1 -1
  15. package/arcade/functions/feature.js +1 -1
  16. package/arcade/functions/featuresetbase.js +1 -1
  17. package/arcade/functions/featuresetgeom.js +1 -1
  18. package/arcade/functions/featuresetstats.js +1 -1
  19. package/arcade/functions/featuresetstring.js +1 -1
  20. package/arcade/functions/fieldStats.js +1 -1
  21. package/arcade/functions/geomasync.js +1 -1
  22. package/arcade/functions/geometry.js +1 -1
  23. package/arcade/functions/geomsync.js +1 -1
  24. package/arcade/functions/knowledgegraph.js +1 -1
  25. package/arcade/functions/maths.js +1 -1
  26. package/arcade/functions/stats.js +1 -1
  27. package/arcade/functions/string.js +1 -1
  28. package/arcade/geometry/constructors.js +1 -1
  29. package/arcade/geometry/functions.js +1 -1
  30. package/arcade/languageUtils.js +1 -1
  31. package/arcade.js +1 -1
  32. package/assets/esri/core/workers/RemoteClient.js +1 -1
  33. package/assets/esri/core/workers/chunks/0229c573fa8a2fff2d8b.js.LICENSE.txt +1 -1
  34. package/assets/esri/core/workers/chunks/{9f964467f7353039dd9c.js → 0b21651eb93efe9ce089.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{e0ae33206f519b159b49.js → 0eeb0dce918e4827309a.js} +1 -1
  36. package/assets/esri/core/workers/chunks/0ff6f15d46d7ddf6fe4d.js +1 -0
  37. package/assets/esri/core/workers/chunks/{e385a27fd1ac2123a05f.js → 178260e8a263f2f1584f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{28b1819bf744ce957dfd.js → 17fcdaeb42e932712096.js} +2 -2
  39. package/assets/esri/core/workers/chunks/{28b1819bf744ce957dfd.js.LICENSE.txt → 17fcdaeb42e932712096.js.LICENSE.txt} +1 -1
  40. package/assets/esri/core/workers/chunks/{3ae2e9f469020f777d9f.js → 183a7dec68c8ba6eb3d6.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{52c34d6ecd9d45a33e69.js → 275a724c18bd15591e3c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/29fb64826bb1351aca8d.js.LICENSE.txt +1 -1
  43. package/assets/esri/core/workers/chunks/{0039dee1337160366112.js → 3145218abe59b5e99ff8.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{dea3e131bbd48cc48e1a.js → 369978472cc9ee6a00b5.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{539541dec5fcf3b657aa.js → 3f58da371633967a61ca.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{d0372bac0c5f4fbed468.js → 3f59a73f9a758095976f.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{f48eb59b94ba8b7d4d72.js → 4079e307a0fce4516aa4.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{a2e9141ff4efd13413a1.js → 4a805e7a57d25c4b595f.js} +2 -2
  49. package/assets/esri/core/workers/chunks/53ff5b7691ba1444358e.js +1 -0
  50. package/assets/esri/core/workers/chunks/54f981fe0f8851767be9.js.LICENSE.txt +1 -1
  51. package/assets/esri/core/workers/chunks/{a6fb75929e456f87f804.js → 58b2dc0ec977af7413b0.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{92a5dccb328229a9336b.js → 58f92100b1b2343111c6.js} +1 -1
  53. package/assets/esri/core/workers/chunks/5cc5f32b474ee723e192.js +1 -0
  54. package/assets/esri/core/workers/chunks/5dcc8fa321f0a7c49f36.js +1 -0
  55. package/assets/esri/core/workers/chunks/64f5f27e7c5649d79cbc.js +1 -0
  56. package/assets/esri/core/workers/chunks/64fc44f99486c7ffe6fa.js +1 -0
  57. package/assets/esri/core/workers/chunks/658e82c9b722852e02d0.js +1 -0
  58. package/assets/esri/core/workers/chunks/{6b0ae9ccdd1acef5b5b4.js → 679d7baea233faf3fdbc.js} +1 -1
  59. package/assets/esri/core/workers/chunks/73ddb356121add556994.js.LICENSE.txt +1 -1
  60. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  61. package/assets/esri/core/workers/chunks/8b93cd4132934b0d7d39.js +1 -0
  62. package/assets/esri/core/workers/chunks/97b69fec3e87f11210ba.js +1 -0
  63. package/assets/esri/core/workers/chunks/{fda48126f67e80034404.js → 998819aade3898f52414.js} +1 -1
  64. package/assets/esri/core/workers/chunks/9a87c367ee5ba44f3081.js +1 -0
  65. package/assets/esri/core/workers/chunks/{427318722815bef1496b.js → a08ce98672ab94d19613.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{6d90887dc605261dd7b3.js → a250a5c6e055e33bd25c.js} +1 -1
  67. package/assets/esri/core/workers/chunks/aad9a693813b47a51530.js.LICENSE.txt +1 -1
  68. package/assets/esri/core/workers/chunks/b72137c63b7f2a525d9e.js +1 -0
  69. package/assets/esri/core/workers/chunks/b8c8acf75e09014d8346.js +1 -0
  70. package/assets/esri/core/workers/chunks/c2264451d12f1fbaad22.js +1 -0
  71. package/assets/esri/core/workers/chunks/c6c86cbe65a58c3093ae.js +1 -0
  72. package/assets/esri/core/workers/chunks/{562800b0af52a38a311b.js → cf25f487fe4eb1579aee.js} +1 -1
  73. package/assets/esri/core/workers/chunks/e717832326d1b1f817d3.js +1 -0
  74. package/assets/esri/core/workers/chunks/{bd2dcc55ac3418421ee5.js → f20ba89ac21f05b7020c.js} +1 -1
  75. package/assets/esri/core/workers/chunks/f3b51aa0a1a8fc3b231c.js.LICENSE.txt +1 -1
  76. package/assets/esri/core/workers/chunks/{a41f9b6deff08196566e.js → fa894be8cfb6ed485df9.js} +1 -1
  77. package/assets/esri/core/workers/chunks/fe3703ec198cbfebec30.js +1 -0
  78. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +7 -1
  79. package/assets/esri/themes/base/widgets/_TimeSlider.scss +1 -0
  80. package/assets/esri/themes/dark/main.css +1 -1
  81. package/assets/esri/themes/light/main.css +1 -1
  82. package/assets/esri/themes/light/view.css +1 -1
  83. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  84. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  85. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  86. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  87. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  88. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  89. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  90. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  91. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  92. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  93. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  94. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  95. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  96. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  97. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  121. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  122. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  123. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  124. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  125. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  126. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  127. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  128. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  129. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  130. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  131. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  132. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  133. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  134. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  135. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  136. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  137. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  138. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  139. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  140. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  141. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  142. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  143. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  144. package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
  145. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  146. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  147. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  148. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  149. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  150. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  151. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  152. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  153. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  154. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  155. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  156. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  157. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  158. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  159. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  160. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  162. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  163. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  173. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  179. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  189. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  190. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  191. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  192. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  193. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  194. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  195. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  196. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  197. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  198. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  199. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  200. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  201. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  202. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  203. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  204. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  205. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  206. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  207. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  208. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  209. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  210. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  211. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  212. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  213. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  214. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  215. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  216. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  217. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  218. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  219. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  220. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  221. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  222. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_no.json +1 -1
  223. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  224. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  225. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  226. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  227. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  228. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  229. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  230. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  231. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  232. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  233. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  234. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  235. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  236. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  237. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  238. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  239. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  240. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  241. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  242. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  243. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  244. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  245. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  246. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  247. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  248. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  249. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  250. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  251. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  252. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  253. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  254. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  255. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  256. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  257. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  258. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  259. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  260. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  261. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  262. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  263. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  264. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  265. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  266. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  267. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  268. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  269. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  270. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  271. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  272. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  273. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  274. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  275. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  276. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  277. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  278. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  279. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  280. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  281. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  282. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  283. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  284. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  285. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  286. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  287. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  288. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  289. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  290. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  291. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  292. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  293. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  294. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  295. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  296. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  297. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  298. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  299. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  300. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  301. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  302. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  303. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  304. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  305. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  306. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  307. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  308. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  309. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  310. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  311. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  312. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  313. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  314. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  315. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  316. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  317. package/assets/esri/widgets/Search/t9n/Search_ar.json +1 -1
  318. package/assets/esri/widgets/Search/t9n/Search_bg.json +1 -1
  319. package/assets/esri/widgets/Search/t9n/Search_bs.json +1 -1
  320. package/assets/esri/widgets/Search/t9n/Search_ca.json +1 -1
  321. package/assets/esri/widgets/Search/t9n/Search_cs.json +1 -1
  322. package/assets/esri/widgets/Search/t9n/Search_da.json +1 -1
  323. package/assets/esri/widgets/Search/t9n/Search_de.json +1 -1
  324. package/assets/esri/widgets/Search/t9n/Search_el.json +1 -1
  325. package/assets/esri/widgets/Search/t9n/Search_es.json +1 -1
  326. package/assets/esri/widgets/Search/t9n/Search_et.json +1 -1
  327. package/assets/esri/widgets/Search/t9n/Search_fi.json +1 -1
  328. package/assets/esri/widgets/Search/t9n/Search_fr.json +1 -1
  329. package/assets/esri/widgets/Search/t9n/Search_he.json +1 -1
  330. package/assets/esri/widgets/Search/t9n/Search_hr.json +1 -1
  331. package/assets/esri/widgets/Search/t9n/Search_hu.json +1 -1
  332. package/assets/esri/widgets/Search/t9n/Search_id.json +1 -1
  333. package/assets/esri/widgets/Search/t9n/Search_it.json +1 -1
  334. package/assets/esri/widgets/Search/t9n/Search_ja.json +1 -1
  335. package/assets/esri/widgets/Search/t9n/Search_ko.json +1 -1
  336. package/assets/esri/widgets/Search/t9n/Search_lt.json +1 -1
  337. package/assets/esri/widgets/Search/t9n/Search_lv.json +1 -1
  338. package/assets/esri/widgets/Search/t9n/Search_nl.json +1 -1
  339. package/assets/esri/widgets/Search/t9n/Search_no.json +1 -1
  340. package/assets/esri/widgets/Search/t9n/Search_pl.json +1 -1
  341. package/assets/esri/widgets/Search/t9n/Search_pt-BR.json +1 -1
  342. package/assets/esri/widgets/Search/t9n/Search_pt-PT.json +1 -1
  343. package/assets/esri/widgets/Search/t9n/Search_ro.json +1 -1
  344. package/assets/esri/widgets/Search/t9n/Search_ru.json +1 -1
  345. package/assets/esri/widgets/Search/t9n/Search_sk.json +1 -1
  346. package/assets/esri/widgets/Search/t9n/Search_sl.json +1 -1
  347. package/assets/esri/widgets/Search/t9n/Search_sr.json +1 -1
  348. package/assets/esri/widgets/Search/t9n/Search_sv.json +1 -1
  349. package/assets/esri/widgets/Search/t9n/Search_th.json +1 -1
  350. package/assets/esri/widgets/Search/t9n/Search_tr.json +1 -1
  351. package/assets/esri/widgets/Search/t9n/Search_uk.json +1 -1
  352. package/assets/esri/widgets/Search/t9n/Search_vi.json +1 -1
  353. package/assets/esri/widgets/Search/t9n/Search_zh-CN.json +1 -1
  354. package/assets/esri/widgets/Search/t9n/Search_zh-HK.json +1 -1
  355. package/assets/esri/widgets/Search/t9n/Search_zh-TW.json +1 -1
  356. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  357. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  358. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  359. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  360. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  361. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  362. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  363. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  364. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  365. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  366. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  367. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  368. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  369. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  370. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  371. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  372. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  373. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  374. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  375. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  376. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  377. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  378. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  379. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  380. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  381. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  382. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  383. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  384. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  385. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  386. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  387. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  388. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  389. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  390. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  391. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  392. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  393. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  394. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  395. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ar.json +1 -1
  396. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_bg.json +1 -1
  397. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_bs.json +1 -1
  398. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ca.json +1 -1
  399. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_cs.json +1 -1
  400. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_da.json +1 -1
  401. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_de.json +1 -1
  402. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_el.json +1 -1
  403. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_es.json +1 -1
  404. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_et.json +1 -1
  405. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_fi.json +1 -1
  406. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_fr.json +1 -1
  407. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_he.json +1 -1
  408. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_hr.json +1 -1
  409. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_hu.json +1 -1
  410. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_id.json +1 -1
  411. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_it.json +1 -1
  412. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ja.json +1 -1
  413. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ko.json +1 -1
  414. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_lt.json +1 -1
  415. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_lv.json +1 -1
  416. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_nl.json +1 -1
  417. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_no.json +1 -1
  418. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pl.json +1 -1
  419. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pt-BR.json +1 -1
  420. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pt-PT.json +1 -1
  421. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ro.json +1 -1
  422. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ru.json +1 -1
  423. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sk.json +1 -1
  424. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sl.json +1 -1
  425. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sr.json +1 -1
  426. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sv.json +1 -1
  427. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_th.json +1 -1
  428. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_tr.json +1 -1
  429. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_uk.json +1 -1
  430. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_vi.json +1 -1
  431. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-CN.json +1 -1
  432. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-HK.json +1 -1
  433. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-TW.json +1 -1
  434. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ar.json +1 -1
  435. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_bg.json +1 -1
  436. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_bs.json +1 -1
  437. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ca.json +1 -1
  438. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_cs.json +1 -1
  439. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_da.json +1 -1
  440. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_de.json +1 -1
  441. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_el.json +1 -1
  442. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_es.json +1 -1
  443. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_et.json +1 -1
  444. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_fi.json +1 -1
  445. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_fr.json +1 -1
  446. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_he.json +1 -1
  447. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_hr.json +1 -1
  448. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_hu.json +1 -1
  449. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_id.json +1 -1
  450. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_it.json +1 -1
  451. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ja.json +1 -1
  452. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ko.json +1 -1
  453. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_lt.json +1 -1
  454. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_lv.json +1 -1
  455. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_nl.json +1 -1
  456. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_no.json +1 -1
  457. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pl.json +1 -1
  458. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pt-BR.json +1 -1
  459. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pt-PT.json +1 -1
  460. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ro.json +1 -1
  461. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ru.json +1 -1
  462. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sk.json +1 -1
  463. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sl.json +1 -1
  464. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sr.json +1 -1
  465. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sv.json +1 -1
  466. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_th.json +1 -1
  467. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_tr.json +1 -1
  468. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_uk.json +1 -1
  469. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_vi.json +1 -1
  470. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-CN.json +1 -1
  471. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-HK.json +1 -1
  472. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-TW.json +1 -1
  473. package/chunks/PointRenderer.glsl.js +2 -2
  474. package/chunks/aiServices.js +1 -1
  475. package/chunks/array.js +1 -1
  476. package/chunks/languageUtils.js +1 -1
  477. package/config.js +1 -1
  478. package/core/urlUtils.js +1 -1
  479. package/geometry/support/MeshTexture.js +1 -1
  480. package/geometry/support/coordsUtils.js +1 -1
  481. package/interfaces.d.ts +343 -99
  482. package/kernel.js +1 -1
  483. package/layers/CatalogLayer.js +1 -1
  484. package/layers/FeatureLayer.js +1 -1
  485. package/layers/VideoLayer.js +1 -1
  486. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  487. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  488. package/layers/mixins/ArcGISImageService.js +1 -1
  489. package/layers/mixins/FeatureLayerBase.js +1 -1
  490. package/layers/support/PlaybackInfo.d.ts +4 -0
  491. package/layers/support/arcgisLayers.js +1 -1
  492. package/layers/support/fetchService.js +1 -1
  493. package/layers/support/layerUtils.js +1 -1
  494. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  495. package/networks/CircuitManager.js +1 -1
  496. package/networks/UnitIdentifierManager.js +1 -1
  497. package/package.json +2 -2
  498. package/portal/support/layersLoader.js +1 -1
  499. package/portal/support/loadUtils.js +1 -1
  500. package/portal/support/portalLayers.js +1 -1
  501. package/renderers/support/rendererConversion.js +1 -1
  502. package/rest/networks/circuits/alterCircuit.js +1 -1
  503. package/rest/networks/circuits/createCircuit.js +1 -1
  504. package/rest/networks/circuits/deleteCircuits.js +1 -1
  505. package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
  506. package/rest/networks/circuits/support/EditCircuitsResult.js +5 -0
  507. package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
  508. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  509. package/rest/networks/support/utils.js +5 -0
  510. package/rest/networks/unitIdentifiers/insertGap.js +1 -1
  511. package/rest/networks/unitIdentifiers/reset.js +1 -1
  512. package/rest/networks/unitIdentifiers/resize.js +1 -1
  513. package/rest/networks/unitIdentifiers/support/EditUnitIdentifiersResult.js +5 -0
  514. package/support/arcadeUtils.js +1 -1
  515. package/support/popupUtils.js +1 -1
  516. package/support/revision.js +1 -1
  517. package/symbols/support/symbolConversion.js +1 -1
  518. package/views/2d/engine/flow/dataUtils.js +1 -1
  519. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  520. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  521. package/views/3d/FocusAreasView.js +1 -1
  522. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  523. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  524. package/views/3d/layers/FlowSubView3D.js +1 -1
  525. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  526. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  527. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  528. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  529. package/views/3d/layers/RouteLayerView3D.js +1 -1
  530. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  531. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  532. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  533. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  534. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  535. package/views/3d/layers/graphics/Labeler.js +1 -1
  536. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  537. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  538. package/views/3d/state/controllers/RotateController.js +1 -1
  539. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  540. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  541. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  542. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  543. package/views/3d/state/utils/navigationUtils.js +1 -1
  544. package/views/3d/support/DisplayQualityProfile.js +1 -1
  545. package/views/3d/support/QualitySettings.js +1 -1
  546. package/views/3d/support/flow/FlowSubViewExtent3D.js +5 -0
  547. package/views/3d/support/flow/FlowSubViewTiles3D.js +5 -0
  548. package/views/3d/support/flow/loadUtils.js +1 -1
  549. package/views/3d/support/sunUtils.js +1 -1
  550. package/views/3d/terrain/OverlayManager.js +1 -1
  551. package/views/3d/terrain/TerrainSurface.js +1 -1
  552. package/views/3d/terrain/TileRenderer.js +1 -1
  553. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  554. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  555. package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
  556. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  557. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  558. package/views/ToolViewManager.js +1 -1
  559. package/views/View2D.js +1 -1
  560. package/views/Viewport2DMixin.js +1 -1
  561. package/views/layers/BuildingSceneLayerView.js +1 -1
  562. package/views/layers/PointCloudLayerView.js +1 -1
  563. package/views/layers/SceneLayerView.js +1 -1
  564. package/views/support/layerViewUtils.js +1 -1
  565. package/views/ui/UI.js +1 -1
  566. package/views/webgl/FramebufferObject.js +1 -1
  567. package/views/webgl/Parameters.js +1 -1
  568. package/widgets/BasemapLayerList.js +1 -1
  569. package/widgets/CatalogLayerList.js +1 -1
  570. package/widgets/Editor/EditorViewModel.js +1 -1
  571. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  572. package/widgets/Editor/UpdateWorkflow.js +1 -1
  573. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  574. package/widgets/Editor/workflowUtils.js +1 -1
  575. package/widgets/Editor.js +1 -1
  576. package/widgets/Expand.js +1 -1
  577. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  578. package/widgets/Feature/FeatureViewModel.js +1 -1
  579. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  580. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  581. package/widgets/FeatureForm/FieldInput.js +1 -1
  582. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  583. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  584. package/widgets/LayerList/LayerListItem.js +1 -1
  585. package/widgets/LayerList.js +1 -1
  586. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  587. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  588. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  589. package/widgets/OrientedImageryViewer.js +1 -1
  590. package/widgets/Print.js +1 -1
  591. package/widgets/Search.js +1 -1
  592. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  593. package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
  594. package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
  595. package/widgets/Sketch.js +1 -1
  596. package/widgets/TableList.js +1 -1
  597. package/widgets/TimeSlider.js +1 -1
  598. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  599. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  600. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  601. package/widgets/support/SelectionList/LayerItem.js +1 -1
  602. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  603. package/widgets/support/SelectionList/selectionListUtils.js +1 -1
  604. package/widgets/support/SelectionList.js +1 -1
  605. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  606. package/widgets/support/SelectionToolbar.js +1 -1
  607. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  608. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  609. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  610. package/assets/esri/core/workers/chunks/2dc54925d473a959119c.js +0 -1
  611. package/assets/esri/core/workers/chunks/464c15b2779f9b803a06.js +0 -1
  612. package/assets/esri/core/workers/chunks/543b8dc8baa21b99147b.js +0 -1
  613. package/assets/esri/core/workers/chunks/5d3246b8fc50f9d9e2c4.js +0 -1
  614. package/assets/esri/core/workers/chunks/5d50a8d0427eab0a2514.js +0 -1
  615. package/assets/esri/core/workers/chunks/7a2189614f2dad49ffcd.js +0 -1
  616. package/assets/esri/core/workers/chunks/91d484960df25ec9554b.js +0 -1
  617. package/assets/esri/core/workers/chunks/9cd55043f3d789f41815.js +0 -1
  618. package/assets/esri/core/workers/chunks/b09539a4b491a90a6bbe.js +0 -1
  619. package/assets/esri/core/workers/chunks/b6c3a2d93a59df9a1418.js +0 -1
  620. package/assets/esri/core/workers/chunks/c45a314ace9725aa250e.js +0 -1
  621. package/assets/esri/core/workers/chunks/c6fa79ce324122e08dbb.js +0 -1
  622. package/assets/esri/core/workers/chunks/cbbbaccc0d3683e1c0fe.js +0 -1
  623. package/assets/esri/core/workers/chunks/e7a440476cd1eb4c6547.js +0 -1
  624. package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +0 -1
  625. package/assets/esri/core/workers/chunks/eb23ce385b0d18959c7c.js +0 -1
  626. package/views/3d/support/flow/StreamlinesStyle3D.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as a,e as n,g as o,f as l,c,l as p,j as h,t as f}from"../../../../chunks/vec32.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as T}from"../../../../geometry/support/float16.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{distance2 as E,fromPoints as _,create as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{fromPoints as g,create as S,signedDistance as O,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import j from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as F}from"../lib/Material.js";import{RenderSlot as w}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as B}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as x}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as J}from"./internal/bufferWriterUtils.js";import{LineMarkerAnchor as z}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as H}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as G,RibbonLineTechnique as k}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as Z,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as W}from"../../../../webscene/support/AlphaCutoff.js";var Y;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(Y||(Y={}));class q extends D{constructor(e){super(e,Q),this._configuration=new Z,this.vertexAttributeLocations=G,this.produces=new Map([[w.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[w.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){super.getConfiguration(e,t,this._configuration),this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===w.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&te(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===F.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=W||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>W}intersectDraped({attributes:e,screenToWorldRatio:r},i,s,a,n){if(!i.options.selectionMode)return;const o=e.get(B.SIZE);let l=this.parameters.width;if(this.parameters.vvSize){const r=e.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(r)?l*=this.parameters.vvSize.fallback[0]:l*=t(this.parameters.vvSize.offset[0]+r*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else o&&(l*=o.data[0]);const c=s[0],p=s[1],h=(l/2+4)*r;let f=Number.MAX_VALUE,m=0;const u=e.get(B.POSITION).data,T=ee(this.parameters,e)?u.length-2:u.length-5;for(let d=0;d<T;d+=3){const e=u[d],r=u[d+1],i=(d+3)%u.length,s=c-e,a=p-r,n=u[i]-e,o=u[i+1]-r,l=t((n*s+o*a)/(n*n+o*o),0,1),h=n*l-s,T=o*l-a,E=h*h+T*T;E<f&&(f=E,m=d/3)}f<h*h&&a(n.distance,n.normal,m)}intersect(r,f,m,u,T,A){const{options:S,camera:v,rayBegin:P,rayEnd:N}=m;if(!S.selectionMode||!r.visible||!v)return;if(!M(f))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const L=r.attributes,b=L.get(B.POSITION).data;let C=this.parameters.width;if(this.parameters.vvSize){const e=L.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(C*=t(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else L.has(B.SIZE)&&(C*=L.get(B.SIZE).data[0]);const U=ne;i(U,m.point);const y=C*v.pixelRatio/2+4*v.pixelRatio;s(de[0],U[0]-y,U[1]+y,0),s(de[1],U[0]+y,U[1]+y,0),s(de[2],U[0]+y,U[1]-y,0),s(de[3],U[0]-y,U[1]-y,0);for(let e=0;e<4;e++)if(!v.unprojectFromRenderScreen(de[e],Ee[e]))return;g(v.eye,Ee[0],Ee[1],_e),g(v.eye,Ee[1],Ee[2],Ae),g(v.eye,Ee[2],Ee[3],Re),g(v.eye,Ee[3],Ee[0],ge);let j=Number.MAX_VALUE,D=0;const F=ee(this.parameters,L)?b.length-2:b.length-5;for(let e=0;e<F;e+=3){re[0]=b[e]+f[12],re[1]=b[e+1]+f[13],re[2]=b[e+2]+f[14];const t=(e+3)%b.length;if(ie[0]=b[t]+f[12],ie[1]=b[t+1]+f[13],ie[2]=b[t+2]+f[14],O(_e,re)<0&&O(_e,ie)<0||O(Ae,re)<0&&O(Ae,ie)<0||O(Re,re)<0&&O(Re,ie)<0||O(ge,re)<0&&O(ge,ie)<0)continue;if(v.projectToRenderScreen(re,oe),v.projectToRenderScreen(ie,le),oe[2]<0&&le[2]>0){a(se,re,ie);const e=v.frustum,t=-O(e[d.NEAR],re)/n(se,I(e[d.NEAR]));o(se,se,t),l(re,re,se),v.projectToRenderScreen(re,oe)}else if(oe[2]>0&&le[2]<0){a(se,ie,re);const e=v.frustum,t=-O(e[d.NEAR],ie)/n(se,I(e[d.NEAR]));o(se,se,t),l(ie,ie,se),v.projectToRenderScreen(ie,le)}else if(oe[2]<0&&le[2]<0)continue;oe[2]=0,le[2]=0;const r=E(_(oe,le,he),U);r<j&&(j=r,c(ce,re),c(pe,ie),D=e/3)}if(j<y*y){let e=Number.MAX_VALUE;if(R(_(ce,pe,he),_(P,N,fe),ae)){a(ae,ae,P);const t=p(ae);o(ae,ae,1/t),e=t/h(P,N)}A(e,ae,D)}}get _layout(){const e=v().vec3f(B.POSITION).vec4f16(B.PREVIOUSDELTA).vec4f16(B.NEXTDELTA).f32(B.U0).vec2f16(B.LINEPARAMETERS);return this.parameters.vvSize&&e.f32(B.SIZEFEATUREATTRIBUTE),this.parameters.vvColor?e.f16(B.COLORFEATUREATTRIBUTE):e.vec4u8(B.COLOR,{glNormalized:!0}),this.parameters.vvSize||e.f16(B.SIZE),this.parameters.vvOpacity&&e.f16(B.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(B.OLIDCOLOR),e}createBufferWriter(){return new K(this._layout,this.parameters)}createGLMaterial(e){return new X(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class X extends j{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(k,e)}}class Q extends x{constructor(){super(...arguments),this.width=0,this.color=u,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class K{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=H+r}}_isClosed(e){return ee(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(B.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i,a,n){const o=r.get(B.POSITION),l=o.indices,p=o.data.length/3,m=r.get(B.DISTANCETOSTART)?.data;l&&l.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const u=this.vertexBufferLayout.fields.has(B.SIZEFEATUREATTRIBUTE),d=(u?r.get(B.SIZEFEATUREATTRIBUTE)?.data[0]:r.get(B.SIZE)?.data[0])??1;let E=[1,1,1,1],_=0;const A=this.vertexBufferLayout.fields.has(B.COLORFEATUREATTRIBUTE);A?_=r.get(B.COLORFEATUREATTRIBUTE).data[0]:r.has(B.COLOR)&&(E=r.get(B.COLOR).data);const R=this.vertexBufferLayout.fields.has(B.OPACITYFEATUREATTRIBUTE),g=R?r.get(B.OPACITYFEATUREATTRIBUTE).data[0]:0,S=new Float32Array(a.buffer),O=T(a.buffer),I=new Uint8Array(a.buffer),v=this.vertexBufferLayout.stride/4;let P=n*v;const N=P;let L=0;const b=m?(e,t,r)=>L=m[r]:(e,t,r)=>L+=h(e,t),C=S.BYTES_PER_ELEMENT/O.BYTES_PER_ELEMENT,U=4/C,j=(e,t,r,s,a,n,o)=>{S[P++]=t[0],S[P++]=t[1],S[P++]=t[2],J(e,t,O,P*C),P+=U,J(r,t,O,P*C),P+=U,S[P++]=o;let l=P*C;if(O[l++]=s,O[l++]=a,u&&(P=Math.ceil(l/C),S[P]=d,l+=C),A)O[l++]=_;else{const e=Math.min(4*n,E.length-4),t=l/C*4;l+=C,I[t]=255*E[e],I[t+1]=255*E[e+1],I[t+2]=255*E[e+2],I[t+3]=255*E[e+3]}u||(O[l++]=d),R&&(O[l++]=g);let c=l/C*4;y()&&i&&(I[c++]=i[0],I[c++]=i[1],I[c++]=i[2],I[c++]=i[3]),P=Math.ceil(.25*c)};P+=v,s(ue,o.data[0],o.data[1],o.data[2]),e&&f(ue,ue,e);const D=this._isClosed(r);if(D){const t=o.data.length-3;s(me,o.data[t],o.data[t+1],o.data[t+2]),e&&f(me,me,e)}else s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),j(ue,ue,Te,1,Y.LEFT_CAP_START,0,0),j(ue,ue,Te,1,Y.RIGHT_CAP_START,0,0),c(me,ue),c(ue,Te);const F=D?0:1,w=D?p:p-1;for(let h=F;h<w;h++){const t=(h+1)%p*3;s(Te,o.data[t],o.data[t+1],o.data[t+2]),e&&f(Te,Te,e),b(me,ue,h),j(me,ue,Te,0,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,h,L);const r=this.numJoinSubdivisions;for(let e=0;e<r;++e){const t=(e+1)/(r+1);j(me,ue,Te,t,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,t,Y.RIGHT_JOIN_END,h,L)}j(me,ue,Te,1,Y.LEFT_JOIN_START,h,L),j(me,ue,Te,1,Y.RIGHT_JOIN_START,h,L),c(me,ue),c(ue,Te)}D?(s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),L=b(me,ue,w),j(me,ue,Te,0,Y.LEFT_JOIN_END,F,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,F,L)):(L=b(me,ue,w),j(me,ue,ue,0,Y.LEFT_CAP_END,w,L),j(me,ue,ue,0,Y.RIGHT_CAP_END,w,L)),$(S,N+v,S,N,v);return P=$(S,P-v,S,P,v),this._parameters.wireframe&&this._addWireframeVertices(a,N,P,v),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=$(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function $(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function ee(e,t){if(!e.isClosed)return!1;return t.get(B.POSITION).indices.length>2}function te(e){return e.anchor===z.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const re=m(),ie=m(),se=m(),ae=m(),ne=m(),oe=r(),le=r(),ce=m(),pe=m(),he=A(),fe=A(),me=m(),ue=m(),Te=m(),de=[r(),r(),r(),r()],Ee=[m(),m(),m(),m()],_e=S(),Ae=S(),Re=S(),ge=S();export{Q as Parameters,q as RibbonLineMaterial};
5
+ import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as a,e as n,g as o,f as l,c,l as p,j as h,t as f}from"../../../../chunks/vec32.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as T}from"../../../../geometry/support/float16.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{distance2 as E,fromPoints as _,create as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{fromPoints as g,create as S,signedDistance as O,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import j from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as F}from"../lib/Material.js";import{RenderSlot as w}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as B}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as x}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as J}from"./internal/bufferWriterUtils.js";import{LineMarkerAnchor as z}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as H}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as G,RibbonLineTechnique as k}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as Z,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as W}from"../../../../webscene/support/AlphaCutoff.js";var Y;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(Y||(Y={}));class q extends D{constructor(e){super(e,Q),this._configuration=new Z,this.vertexAttributeLocations=G,this.produces=new Map([[w.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[w.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){super.getConfiguration(e,t,this._configuration),this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===w.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&te(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===F.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=W||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>W}intersectDraped({attributes:e,screenToWorldRatio:r},i,s,a,n){if(!i.options.selectionMode)return;const o=e.get(B.SIZE);let l=this.parameters.width;if(this.parameters.vvSize){const r=e.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(r)?l*=this.parameters.vvSize.fallback[0]:l*=t(this.parameters.vvSize.offset[0]+r*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else o&&(l*=o.data[0]);const c=s[0],p=s[1],h=(l/2+4)*r;let f=Number.MAX_VALUE,m=0;const u=e.get(B.POSITION).data,T=ee(this.parameters,e)?u.length-2:u.length-5;for(let d=0;d<T;d+=3){const e=u[d],r=u[d+1],i=(d+3)%u.length,s=c-e,a=p-r,n=u[i]-e,o=u[i+1]-r,l=t((n*s+o*a)/(n*n+o*o),0,1),h=n*l-s,T=o*l-a,E=h*h+T*T;E<f&&(f=E,m=d/3)}f<h*h&&a(n.distance,n.normal,m)}intersect(r,f,m,u,T,A){const{options:S,camera:v,rayBegin:P,rayEnd:N}=m;if(!S.selectionMode||!r.visible||!v)return;if(!M(f))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const L=r.attributes,b=L.get(B.POSITION).data;let C=this.parameters.width;if(this.parameters.vvSize){const e=L.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(C*=t(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else L.has(B.SIZE)&&(C*=L.get(B.SIZE).data[0]);const U=ne;i(U,m.point);const y=C*v.pixelRatio/2+4*v.pixelRatio;s(de[0],U[0]-y,U[1]+y,0),s(de[1],U[0]+y,U[1]+y,0),s(de[2],U[0]+y,U[1]-y,0),s(de[3],U[0]-y,U[1]-y,0);for(let e=0;e<4;e++)if(!v.unprojectFromRenderScreen(de[e],Ee[e]))return;g(v.eye,Ee[0],Ee[1],_e),g(v.eye,Ee[1],Ee[2],Ae),g(v.eye,Ee[2],Ee[3],Re),g(v.eye,Ee[3],Ee[0],ge);let j=Number.MAX_VALUE,D=0;const F=ee(this.parameters,L)?b.length-2:b.length-5;for(let e=0;e<F;e+=3){re[0]=b[e]+f[12],re[1]=b[e+1]+f[13],re[2]=b[e+2]+f[14];const t=(e+3)%b.length;if(ie[0]=b[t]+f[12],ie[1]=b[t+1]+f[13],ie[2]=b[t+2]+f[14],O(_e,re)<0&&O(_e,ie)<0||O(Ae,re)<0&&O(Ae,ie)<0||O(Re,re)<0&&O(Re,ie)<0||O(ge,re)<0&&O(ge,ie)<0)continue;if(v.projectToRenderScreen(re,oe),v.projectToRenderScreen(ie,le),oe[2]<0&&le[2]>0){a(se,re,ie);const e=v.frustum,t=-O(e[d.NEAR],re)/n(se,I(e[d.NEAR]));o(se,se,t),l(re,re,se),v.projectToRenderScreen(re,oe)}else if(oe[2]>0&&le[2]<0){a(se,ie,re);const e=v.frustum,t=-O(e[d.NEAR],ie)/n(se,I(e[d.NEAR]));o(se,se,t),l(ie,ie,se),v.projectToRenderScreen(ie,le)}else if(oe[2]<0&&le[2]<0)continue;oe[2]=0,le[2]=0;const r=E(_(oe,le,he),U);r<j&&(j=r,c(ce,re),c(pe,ie),D=e/3)}if(j<y*y){let e=Number.MAX_VALUE;if(R(_(ce,pe,he),_(P,N,fe),ae)){a(ae,ae,P);const t=p(ae);o(ae,ae,1/t),e=t/h(P,N)}A(e,ae,D)}}get _layout(){const e=v().vec3f(B.POSITION).vec4f16(B.PREVIOUSDELTA).vec4f16(B.NEXTDELTA).f32(B.U0).vec2f16(B.LINEPARAMETERS);return this.parameters.vvSize&&e.f32(B.SIZEFEATUREATTRIBUTE),this.parameters.vvColor?e.f16(B.COLORFEATUREATTRIBUTE):e.vec4u8(B.COLOR,{glNormalized:!0}),this.parameters.vvSize||e.f16(B.SIZE),this.parameters.vvOpacity&&e.f16(B.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(B.OLIDCOLOR),e}createBufferWriter(){return new K(this._layout,this.parameters)}createGLMaterial(e){return new X(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class X extends j{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(k,e)}}class Q extends x{constructor(){super(...arguments),this.width=0,this.color=u,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class K{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=H+r}}_isClosed(e){return ee(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(B.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i,a,n){const o=r.get(B.POSITION),l=o.indices,p=o.data.length/3,m=r.get(B.DISTANCETOSTART)?.data;l&&l.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const u=this.vertexBufferLayout.fields.has(B.SIZEFEATUREATTRIBUTE),d=(u?r.get(B.SIZEFEATUREATTRIBUTE)?.data[0]:r.get(B.SIZE)?.data[0])??1;let E=[1,1,1,1],_=0;const A=this.vertexBufferLayout.fields.has(B.COLORFEATUREATTRIBUTE);A?_=r.get(B.COLORFEATUREATTRIBUTE).data[0]:r.has(B.COLOR)&&(E=r.get(B.COLOR).data);const R=this.vertexBufferLayout.fields.has(B.OPACITYFEATUREATTRIBUTE),g=R?r.get(B.OPACITYFEATUREATTRIBUTE).data[0]:0,S=new Float32Array(a.buffer),O=T(a.buffer),I=new Uint8Array(a.buffer),v=this.vertexBufferLayout.stride/4;let P=n*v;const N=P;let L=0;const b=m?(e,t,r)=>L=m[r]:(e,t,r)=>L+=h(e,t),C=S.BYTES_PER_ELEMENT/O.BYTES_PER_ELEMENT,U=4/C,j=(e,t,r,s,a,n,o)=>{S[P++]=t[0],S[P++]=t[1],S[P++]=t[2],J(e,t,O,P*C),P+=U,J(r,t,O,P*C),P+=U,S[P++]=o;let l=P*C;if(O[l++]=s,O[l++]=a,u&&(P=Math.ceil(l/C),S[P]=d,l+=C),A)O[l++]=_;else{const e=Math.min(4*n,E.length-4),t=l/C*4;l+=C,I[t]=255*E[e],I[t+1]=255*E[e+1],I[t+2]=255*E[e+2],I[t+3]=255*E[e+3]}u||(O[l++]=d),R&&(O[l++]=g);let c=l/C*4;y()&&(i?(I[c++]=i[0],I[c++]=i[1],I[c++]=i[2],I[c++]=i[3]):(I[c++]=0,I[c++]=0,I[c++]=0,I[c++]=0)),P=Math.ceil(.25*c)};P+=v,s(ue,o.data[0],o.data[1],o.data[2]),e&&f(ue,ue,e);const D=this._isClosed(r);if(D){const t=o.data.length-3;s(me,o.data[t],o.data[t+1],o.data[t+2]),e&&f(me,me,e)}else s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),j(ue,ue,Te,1,Y.LEFT_CAP_START,0,0),j(ue,ue,Te,1,Y.RIGHT_CAP_START,0,0),c(me,ue),c(ue,Te);const F=D?0:1,w=D?p:p-1;for(let h=F;h<w;h++){const t=(h+1)%p*3;s(Te,o.data[t],o.data[t+1],o.data[t+2]),e&&f(Te,Te,e),b(me,ue,h),j(me,ue,Te,0,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,h,L);const r=this.numJoinSubdivisions;for(let e=0;e<r;++e){const t=(e+1)/(r+1);j(me,ue,Te,t,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,t,Y.RIGHT_JOIN_END,h,L)}j(me,ue,Te,1,Y.LEFT_JOIN_START,h,L),j(me,ue,Te,1,Y.RIGHT_JOIN_START,h,L),c(me,ue),c(ue,Te)}D?(s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),L=b(me,ue,w),j(me,ue,Te,0,Y.LEFT_JOIN_END,F,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,F,L)):(L=b(me,ue,w),j(me,ue,ue,0,Y.LEFT_CAP_END,w,L),j(me,ue,ue,0,Y.RIGHT_CAP_END,w,L)),$(S,N+v,S,N,v);return P=$(S,P-v,S,P,v),this._parameters.wireframe&&this._addWireframeVertices(a,N,P,v),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=$(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function $(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function ee(e,t){if(!e.isClosed)return!1;return t.get(B.POSITION).indices.length>2}function te(e){return e.anchor===z.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const re=m(),ie=m(),se=m(),ae=m(),ne=m(),oe=r(),le=r(),ce=m(),pe=m(),he=A(),fe=A(),me=m(),ue=m(),Te=m(),de=[r(),r(),r(),r()],Ee=[m(),m(),m(),m()],_e=S(),Ae=S(),Re=S(),ge=S();export{Q as Parameters,q as RibbonLineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Evented.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{watch as a,initial as h,syncAndInitial as p}from"../../../../core/reactiveUtils.js";import{addFrameTask as d}from"../../../../core/scheduling.js";import{Milliseconds as c}from"../../../../core/time.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{isMoon as u,isMars as f}from"../../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as _}from"../../../ViewingMode.js";import{ChapmanAtmosphere as g}from"../../environment/ChapmanAtmosphere.js";import{CloudsComposition as w}from"../../environment/CloudsComposition.js";import{Fog as x}from"../../environment/Fog.js";import{LocalAtmosphere as v}from"../../environment/LocalAtmosphere.js";import j from"../../environment/MarsAtmosphere.js";import{ComponentObjectCollection as y}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as b}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as R}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{BloomRenderNode as A}from"../effects/bloom/BloomRenderNode.js";import{ObjectAndLayerIDRenderNode as S}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as T}from"../effects/geometry/RenderOccludedRenderNode.js";import{Haze as O}from"../effects/haze/Haze.js";import{Highlight as U}from"../effects/highlight/Highlight.js";import{ShadowHighlight as q}from"../effects/highlight/ShadowHighlight.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as L}from"../effects/smaa/SMAA.js";import{SSAO as M}from"../effects/ssao/SSAO.js";import{Stars as k}from"../effects/stars/Stars.js";import{RenderRequestType as E}from"../lib/basicInterfaces.js";import W from"../lib/CompositingHelper.js";import{GLMaterialRepository as B}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as F}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as H}from"../lib/Renderer.js";import{RenderingContext as G}from"../lib/RenderingContext.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as z}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as I}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as P}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as K}from"./contextCache.js";import{removeLoadedShaderModules as V}from"./renderUtils.js";import{ScreenshotManager as X,ScreenshotContext as Q}from"./ScreenshotManager.js";import{contextCache as J}from"./testUtils.js";import{RenderState as Y}from"../../../support/RenderState.js";import{checkWebGLError as Z}from"../../../webgl/checkWebGLError.js";let $=class extends t{constructor(e){super(e),this.events=new r,this.waterTextures=new P,this.olidRenderHelper=C()?new F:null,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.bloom=null,this.test=null;const t=e.stage;try{this._initializeContext(t)}catch(o){return void console.error("Failed to initialize context",o)}const{memoryController:s}=t.view.resourceController;this.stippleTextures=I(this._rctx,s),this.markerTextures=z(this._rctx,s),this._techniques=new R(new b(this._rctx,t.viewingMode,this.stippleTextures,this.waterTextures,this.markerTextures)),this._textures=new N(t),this.addHandles(this._textures.events.on("changed",(e=>this.requestRender(e))));const i=new B(this._textures,this._techniques,(()=>this.requestRender()),(()=>this.requestRender()));this._compositingHelper=new W(this._rctx,this._techniques),this.renderer=new H(t,i,this._techniques,this._rctx,this._compositingHelper,(e=>this.requestRender(e))),this.addHandles([a((()=>t.view.ready),(e=>{e&&this._createRenderNodes()}),h),a((()=>this.waterTextures?.updating),(()=>this.requestRender()),h),a((()=>t.view.qualityProfile),(e=>this.renderer?.updateRenderFeatures(e)),p)]);const n={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new X(this._rctx,n,(e=>this.events.emit("force-camera-for-screenshot",e))),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this._techniques=o(this._techniques),this._componentObjects=o(this._componentObjects),this._screenshotManager=o(this._screenshotManager),o(this.renderer),this._textures=o(this._textures),o(this.waterTextures),o(this.markerTextures),o(this.stippleTextures),this._canvas=null,this._rctx=o(this._rctx)}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new k({view:e}),u(e.spatialReference)||(t===_.Local?(new v({view:e}),this.bloom=new A({view:e})):f(e.spatialReference)?(new j({view:e}),this.bloom=new A({view:e})):(new g({view:e}),new w({view:e}),this.bloom=new A({view:e}),new O({view:e}),new x({view:e}))),new M({view:e,isEnabled:()=>this.renderer.hasSSAO}),new L({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new U({view:e}),new q({view:e,viewingMode:t}),new T({view:e}),C()&&new S({view:e})}requestRender(e=E.UPDATE){this._needsRender=!0,e===E.UPDATE&&(this._needsUpdate=!0)}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this._textures.updating||this.waterTextures.updating}get textures(){return this._textures}get techniques(){return this._techniques}get compositingHelper(){return this._compositingHelper}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(e).then((e=>e[0]))}takeScreenshotWithOID(e){return e.objectAndLayerIdColor=!0,this._screenshotManager.takeScreenshot(e)}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const p=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let d=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=p(4*s,h,i.nearFar);d>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(d=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&d>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(d=s)}return d===Number.MAX_VALUE?void 0:d}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){V(),await this._techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=E.BACKGROUND,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?E.UPDATE:E.BACKGROUND,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;(c(i-this._lastAnimationUpdate)>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(E.BACKGROUND),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(E.BACKGROUND),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this._textures.update();const r=new Q(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(t.mode===Y.IDLE?s:E.UPDATE),i=!1)}};this._frameTask=d(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");Z(n,!0),this._rctx=ee(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return null==this._componentObjects&&(this._componentObjects=new y(this.renderer.renderPassManager,this._viewingMode)),this._componentObjects}set componentObjectCollection(e){this._componentObjects=e}updateQualitySettings(e){this.test&&null!=this.test.time&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=c(0)),this._rctx.updateOptions({maxPreferredTextureSize:this.stage.view.qualitySettings.maxTextureSize})}};function ee(e,t){const r=(e,r)=>t.view.resourceController.memoryController.newCache(e,r),s={disabledExtensions:t.options.deactivatedWebGLExtensions||{},debugWebGLExtensions:t.options.debugWebGLExtensions||{},maxAnisotropy:8,maxPreferredTextureSize:t.view.qualitySettings.maxTextureSize,newCache:r};if(J.enabled){let t=te.get(e);return t?(t.configure(s),t.ref(),t):(t=new G(e,s),te.set(e,t),t.ref(),t)}return new G(e,s)}e([l({type:Boolean,readOnly:!0})],$.prototype,"updating",null),e([l({constructOnly:!0})],$.prototype,"stage",void 0),e([l()],$.prototype,"_rctx",void 0),e([l()],$.prototype,"_canvas",void 0),e([l()],$.prototype,"stippleTextures",void 0),e([l()],$.prototype,"markerTextures",void 0),e([l()],$.prototype,"waterTextures",void 0),e([l({readOnly:!0})],$.prototype,"olidRenderHelper",void 0),e([l()],$.prototype,"_textures",void 0),e([l({readOnly:!0})],$.prototype,"renderer",void 0),e([l()],$.prototype,"_screenshotManager",void 0),e([l()],$.prototype,"componentObjectCollection",null),e([l()],$.prototype,"_componentObjects",void 0),e([l()],$.prototype,"_needsUpdate",void 0),e([l()],$.prototype,"_needsWaterReflectionUpdate",void 0),$=e([m("esri.views.3d.webgl-engine.parts.RenderView")],$);const te=K();export{$ as RenderView};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{unpackFloatRGBA as r}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import s from"../../../../core/Logger.js";import{removeMaybe as i,destroyMaybe as n}from"../../../../core/maybe.js";import{watch as o,initial as a,syncAndInitial as h}from"../../../../core/reactiveUtils.js";import{addFrameTask as p}from"../../../../core/scheduling.js";import{Milliseconds as d}from"../../../../core/time.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{isMoon as m,isMars as u}from"../../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as f}from"../../../ViewingMode.js";import{ChapmanAtmosphere as _}from"../../environment/ChapmanAtmosphere.js";import{CloudsComposition as g}from"../../environment/CloudsComposition.js";import{Fog as w}from"../../environment/Fog.js";import{LocalAtmosphere as x}from"../../environment/LocalAtmosphere.js";import v from"../../environment/MarsAtmosphere.js";import{ComponentObjectCollection as j}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as y}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as b}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{BloomRenderNode as R}from"../effects/bloom/BloomRenderNode.js";import{ObjectAndLayerIDRenderNode as A}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as S}from"../effects/geometry/RenderOccludedRenderNode.js";import{Haze as T}from"../effects/haze/Haze.js";import{Highlight as O}from"../effects/highlight/Highlight.js";import{ShadowHighlight as U}from"../effects/highlight/ShadowHighlight.js";import{Magnifier as q}from"../effects/magnifier/Magnifier.js";import{SMAA as D}from"../effects/smaa/SMAA.js";import{SSAO as L}from"../effects/ssao/SSAO.js";import{Stars as M}from"../effects/stars/Stars.js";import{RenderRequestType as k}from"../lib/basicInterfaces.js";import E from"../lib/CompositingHelper.js";import{GLMaterialRepository as B}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as W}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as F}from"../lib/Renderer.js";import{RenderingContext as H}from"../lib/RenderingContext.js";import{TextureRepository as G}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as P}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as N}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as I}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as z}from"./contextCache.js";import{removeLoadedShaderModules as K}from"./renderUtils.js";import{ScreenshotManager as V,ScreenshotContext as X}from"./ScreenshotManager.js";import{contextCache as Q}from"./testUtils.js";import{RenderState as J}from"../../../support/RenderState.js";import{noBudget as Y}from"../../../support/Scheduler.js";import{checkWebGLError as Z}from"../../../webgl/checkWebGLError.js";let $=class extends t{constructor(e){super(e),this.waterTextures=new I,this.olidRenderHelper=C()?new W:null,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.bloom=null,this.test=null;const t=e.stage;try{this._initializeContext(t)}catch(n){return void console.error("Failed to initialize context",n)}const{memoryController:r}=t.view.resourceController;this.stippleTextures=N(this._rctx,r),this.markerTextures=P(this._rctx,r),this._techniques=new b(new y(this._rctx,t.viewingMode,this.stippleTextures,this.waterTextures,this.markerTextures)),this._textures=new G(t),this.addHandles(this._textures.events.on("changed",(e=>this.requestRender(e))));const s=new B(this._textures,this._techniques,(()=>this.requestRender()),(()=>this.requestRender()));this._compositingHelper=new E(this._rctx,this._techniques),this.renderer=new F(t,s,this._techniques,this._rctx,this._compositingHelper,(e=>this.requestRender(e))),this.addHandles([o((()=>t.view.ready),(e=>{e&&this._createRenderNodes()}),a),o((()=>this.waterTextures?.updating),(()=>this.requestRender()),a),o((()=>t.view.qualityProfile),(e=>this.renderer?.updateRenderFeatures(e)),h)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new V(this._rctx,i,(e=>t.view.basemapTerrain.overlayManager.updateOverlays(Y,e.camera,k.BACKGROUND))),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=i(this._frameTask),this._techniques=n(this._techniques),this._componentObjects=n(this._componentObjects),this._screenshotManager=n(this._screenshotManager),n(this.renderer),this._textures=n(this._textures),n(this.waterTextures),n(this.markerTextures),n(this.stippleTextures),this._canvas=null,this._rctx=n(this._rctx)}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new M({view:e}),m(e.spatialReference)||(t===f.Local?(new x({view:e}),this.bloom=new R({view:e})):u(e.spatialReference)?(new v({view:e}),this.bloom=new R({view:e})):(new _({view:e}),new g({view:e}),this.bloom=new R({view:e}),new T({view:e}),new w({view:e}))),new L({view:e,isEnabled:()=>this.renderer.hasSSAO}),new D({view:e,isEnabled:()=>this.renderer.hasSMAA}),new q({view:e}),new O({view:e}),new U({view:e,viewingMode:t}),new S({view:e}),C()&&new A({view:e})}requestRender(e=k.UPDATE){this._needsRender=!0,e===k.UPDATE&&(this._needsUpdate=!0)}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this._textures.updating||this.waterTextures.updating}get textures(){return this._textures}get techniques(){return this._techniques}get compositingHelper(){return this._compositingHelper}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(e).then((e=>e[0]))}takeScreenshotWithOID(e){return e.objectAndLayerIdColor=!0,this._screenshotManager.takeScreenshot(e)}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,s,i,n,o=n){const a=i.constrainWindowSize(t,s,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const p=(e,t,s)=>r(t,e)*(s[1]-s[0])+s[0];let d=Number.MAX_VALUE;for(let r=0;r<a[2]*a[3];r++){const e=p(4*r,h,i.nearFar);d>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(d=e)}if(e){const r=e.pickDepth(t*i.pixelRatio,s*i.pixelRatio,i);null!=r&&d>r&&r!==i.nearFar[0]&&r!==i.nearFar[1]&&(d=r)}return d===Number.MAX_VALUE?void 0:d}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){K(),await this._techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=k.BACKGROUND,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?k.UPDATE:k.BACKGROUND,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;(d(i-this._lastAnimationUpdate)>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(k.BACKGROUND),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(k.BACKGROUND),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this._textures.update();const r=new X(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(t.mode===J.IDLE?s:k.UPDATE),i=!1)}};this._frameTask=p(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const i={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",i);if(null==n)return void s.getLogger(this).error("A WebGL2 context could not be created.");Z(n,!0),this._rctx=ee(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&s.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return null==this._componentObjects&&(this._componentObjects=new j(this.renderer.renderPassManager,this._viewingMode)),this._componentObjects}set componentObjectCollection(e){this._componentObjects=e}updateQualitySettings(e){this.test&&null!=this.test.time&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=d(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.stage.view.qualitySettings.maxTexturePixels})}};function ee(e,t){const r=(e,r)=>t.view.resourceController.memoryController.newCache(e,r),s={disabledExtensions:t.options.deactivatedWebGLExtensions||{},debugWebGLExtensions:t.options.debugWebGLExtensions||{},maxAnisotropy:8,maxPreferredTexturePixels:t.view.qualitySettings.maxTexturePixels,newCache:r};if(Q.enabled){let t=te.get(e);return t?(t.configure(s),t.ref(),t):(t=new H(e,s),te.set(e,t),t.ref(),t)}return new H(e,s)}e([c({type:Boolean,readOnly:!0})],$.prototype,"updating",null),e([c({constructOnly:!0})],$.prototype,"stage",void 0),e([c()],$.prototype,"_rctx",void 0),e([c()],$.prototype,"_canvas",void 0),e([c()],$.prototype,"stippleTextures",void 0),e([c()],$.prototype,"markerTextures",void 0),e([c()],$.prototype,"waterTextures",void 0),e([c({readOnly:!0})],$.prototype,"olidRenderHelper",void 0),e([c()],$.prototype,"_textures",void 0),e([c({readOnly:!0})],$.prototype,"renderer",void 0),e([c()],$.prototype,"_screenshotManager",void 0),e([c()],$.prototype,"componentObjectCollection",null),e([c()],$.prototype,"_componentObjects",void 0),e([c()],$.prototype,"_needsUpdate",void 0),e([c()],$.prototype,"_needsWaterReflectionUpdate",void 0),$=e([l("esri.views.3d.webgl-engine.parts.RenderView")],$);const te=z();export{$ as RenderView};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import o from"../core/Accessor.js";import{clock as e}from"../core/clock.js";import i from"../core/Collection.js";import"../core/has.js";import a from"../core/Logger.js";import{removeMaybe as r}from"../core/maybe.js";import{watch as s}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../core/support/UpdatingHandles.js";import{ViewEventPriorities as c}from"./input/InputManager.js";import{eventTypes as u}from"./input/ViewEvents.js";import{getToolCollectionHandles as p,areToolManipulatorsEditable as m,isCancelEvent as d}from"./interactive/interactiveToolUtils.js";import{EditableFlag as v}from"./interactive/interfaces.js";import{ToolViewManagerManipulatorState as _}from"./interactive/ToolViewManagerManipulatorState.js";const g="attached",T="tools",f=1e3;let E=class extends o{constructor(t){super(t),this._updatingHandles=new h,this._clock=e,this._manipulatorState=new _,this.tools=new i,this.cursor=null,this._interacting=!1,this._interactingTimeout=f,this._interactingTimeoutHandle=null,this._forEachTool=t=>{for(const o of this.tools.items)if(t(o))return}}initialize(){this.addHandles([this.view.on(u,(t=>{this._handleInputEvent(t)}),c.TOOL),...p(this.tools),this.tools.on("before-add",(({item:t})=>{this._updateToolEditableFlag(t)})),this.tools.on("before-remove",(({item:t})=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()})),this.tools.on("change",(()=>{this._refreshToolWatchers()}))])}destroy(){this.activeTool=null,this.tools.drain((t=>t.destroy())),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy()}get _manipulatorStateEventArgs(){return{forEachTool:this._forEachTool,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view}}set activeTool(t){if(null!=t&&!this.view.ready)return void a.getLogger(this).error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return;const o=this.activeTool;this._set("activeTool",t),null!=o&&o.deactivate(),null!=t&&t.activate(),this._removeIncompleteTools(t);for(const e of this.tools){this._updateToolEditableFlag(e);const t=m(e);null!=this.activeTool&&t||this._manipulatorState.clearPointers(e,this._manipulatorStateEventArgs,!t)}this._updateCursor()}get updating(){return this._updatingHandles.updating||this.tools.some((t=>t.updating))}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=r(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout((()=>this._interacting=!1),this._interactingTimeout)}attach(){"3d"===this.view.type?this.addHandles([s((()=>{const{state:t}=this.view;return"camera"in t&&t.camera}),(()=>this._forEachManipulator((t=>t.onViewChange())))),this.view.elevationProvider?.on("elevation-change",(t=>this._forEachManipulator((o=>o.onElevationChange(t)))))],g):this.addHandles(s((()=>this.view.extent),(()=>this._forEachManipulator((t=>t.onViewChange())))))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(g),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(t){this._forEachTool((o=>{o.manipulators&&o.manipulators.forEach((({manipulator:e})=>t(e,o)))}))}_handleInputEvent(t){let o=!1;const e={...t,stopPropagation:()=>{o=!0,t.stopPropagation()}};null!=this.activeTool?this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(e):this._forEachTool((t=>{!o&&t.visible&&t.handleInputEvent(e)})),!o&&d(t)&&this.activeTool&&(t.stopPropagation(),this.activeTool.cancel(),this.activeTool=null),this._manipulatorState.handleInputEvent(e,this._manipulatorStateEventArgs),o||null==this.activeTool||this.activeTool.handleInputEventAfter(e),this._manipulatorState.handleHoverEvent(e,this._forEachTool),this._updateCursor(),"pointer-move"===t.type&&(this._manipulatorState.hasFocusedManipulators()||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(T),this._forEachTool((t=>{if(t instanceof o){const o=s((()=>[t.cursor,t.visible,t.editable]),(()=>{m(t)||this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()}));this.addHandles(o,T)}t.manipulators&&this.addHandles([t.manipulators.on("after-remove",(o=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs,!0,o.item.manipulator)})),t.manipulators.on("change",(()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}))],T)})),this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}_updateToolEditableFlag(t){t.setEditableFlag?.(v.MANAGER,null==this.activeTool||t===this.activeTool)}_updateCursor(){let t=this._manipulatorState.cursor;null==t&&this._forEachTool((o=>!(null==o.cursor||!o.visible)&&(t=o.cursor,!0))),this._get("cursor")!==t&&this._set("cursor",t)}_removeIncompleteTools(t){this.tools.filter((o=>(null==t||o!==t)&&!o.created&&o.removeIncompleteOnCancel)).forEach((t=>{this.tools.remove(t)}))}get test(){}};t([n({constructOnly:!0,nonNullable:!0})],E.prototype,"view",void 0),t([n({value:null})],E.prototype,"activeTool",null),t([n({readOnly:!0,type:i})],E.prototype,"tools",void 0),t([n({readOnly:!0})],E.prototype,"cursor",void 0),t([n({readOnly:!0})],E.prototype,"updating",null),t([n()],E.prototype,"_interacting",void 0),t([n({readOnly:!0})],E.prototype,"interacting",null),E=t([l("esri.views.ToolViewManager")],E);export{E as ToolViewManager,f as interactingTimeout};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import o from"../core/Accessor.js";import{clock as e}from"../core/clock.js";import i from"../core/Collection.js";import"../core/has.js";import a from"../core/Logger.js";import{removeMaybe as r}from"../core/maybe.js";import{watch as s}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../core/support/UpdatingHandles.js";import{ViewEventPriorities as c}from"./input/InputManager.js";import{eventTypes as u}from"./input/ViewEvents.js";import{getToolCollectionHandles as p,areToolManipulatorsEditable as m,isCancelEvent as d}from"./interactive/interactiveToolUtils.js";import{EditableFlag as v}from"./interactive/interfaces.js";import{ToolViewManagerManipulatorState as _}from"./interactive/ToolViewManagerManipulatorState.js";const g="attached",T="tools",f=1e3;let E=class extends o{constructor(t){super(t),this._updatingHandles=new h,this._clock=e,this._manipulatorState=new _,this.tools=new i,this.cursor=null,this._interacting=!1,this._interactingTimeout=f,this._interactingTimeoutHandle=null,this._forEachTool=t=>{for(const o of this.tools.items)if(t(o))return}}initialize(){this.addHandles([this.view.on(u,(t=>{this._handleInputEvent(t)}),c.TOOL),...p(this.tools),this.tools.on("before-add",(({item:t})=>{this._updateToolEditableFlag(t)})),this.tools.on("before-remove",(({item:t})=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()})),this.tools.on("change",(()=>{this._refreshToolWatchers()}))])}destroy(){this.activeTool=null,this.tools.drain((t=>t.destroy())),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy()}get _manipulatorStateEventArgs(){return{forEachTool:this._forEachTool,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view}}set activeTool(t){if(null!=t&&!this.view.ready)return void a.getLogger(this).error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return;const o=this.activeTool;this._set("activeTool",t),null!=o&&o.deactivate(),null!=t&&t.activate(),this._removeIncompleteTools(t);for(const e of this.tools){this._updateToolEditableFlag(e);const t=m(e);null!=this.activeTool&&t||this._manipulatorState.clearPointers(e,this._manipulatorStateEventArgs,!t)}this._updateCursor()}get updating(){return this._updatingHandles.updating||this.tools.some((t=>t.updating))}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=r(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout((()=>this._interacting=!1),this._interactingTimeout)}attach(){"3d"===this.view.type?this.addHandles([s((()=>{const{state:t}=this.view;return"camera"in t&&t.camera}),(()=>this._forEachManipulator((t=>t.onViewChange())))),this.view.elevationProvider?.on("elevation-change",(t=>this._forEachManipulator((o=>o.onElevationChange(t)))))],g):this.addHandles(s((()=>this.view.extent),(()=>this._forEachManipulator((t=>t.onViewChange())))))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(g),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(t){this._forEachTool((o=>{o.manipulators&&o.manipulators.forEach((({manipulator:e})=>t(e,o)))}))}_handleInputEvent(t){let o=!1;const e={...t,stopPropagation:()=>{o=!0,t.stopPropagation()}};null!=this.activeTool?this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(e):this._forEachTool((t=>{!o&&t.visible&&t.handleInputEvent(e)})),!o&&d(t)&&this.activeTool&&(t.stopPropagation(),t.preventDefault(),this.activeTool.cancel(),this.activeTool=null),this._manipulatorState.handleInputEvent(e,this._manipulatorStateEventArgs),o||null==this.activeTool||this.activeTool.handleInputEventAfter(e),this._manipulatorState.handleHoverEvent(e,this._forEachTool),this._updateCursor(),"pointer-move"===t.type&&(this._manipulatorState.hasFocusedManipulators()||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(T),this._forEachTool((t=>{if(t instanceof o){const o=s((()=>[t.cursor,t.visible,t.editable]),(()=>{m(t)||this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()}));this.addHandles(o,T)}t.manipulators&&this.addHandles([t.manipulators.on("after-remove",(o=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs,!0,o.item.manipulator)})),t.manipulators.on("change",(()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}))],T)})),this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}_updateToolEditableFlag(t){t.setEditableFlag?.(v.MANAGER,null==this.activeTool||t===this.activeTool)}_updateCursor(){let t=this._manipulatorState.cursor;null==t&&this._forEachTool((o=>!(null==o.cursor||!o.visible)&&(t=o.cursor,!0))),this._get("cursor")!==t&&this._set("cursor",t)}_removeIncompleteTools(t){this.tools.filter((o=>(null==t||o!==t)&&!o.created&&o.removeIncompleteOnCancel)).forEach((t=>{this.tools.remove(t)}))}get test(){}};t([n({constructOnly:!0,nonNullable:!0})],E.prototype,"view",void 0),t([n({value:null})],E.prototype,"activeTool",null),t([n({readOnly:!0,type:i})],E.prototype,"tools",void 0),t([n({readOnly:!0})],E.prototype,"cursor",void 0),t([n({readOnly:!0})],E.prototype,"updating",null),t([n()],E.prototype,"_interacting",void 0),t([n({readOnly:!0})],E.prototype,"interacting",null),E=t([l("esri.views.ToolViewManager")],E);export{E as ToolViewManager,f as interactingTimeout};
package/views/View2D.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{initialize as p}from"../core/workers/workers.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as d}from"../core/accessorSupport/decorators/cast.js";import"../core/RandomLCG.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{ensureClass as c}from"../core/accessorSupport/ensureType.js";import u from"../geometry/Polygon.js";import{isLoadedOrLoadFor as m}from"../geometry/projectionUtils.js";import y from"../layers/support/TileInfo.js";import{BreakpointsOwner as f}from"./BreakpointsOwner.js";import{DOMContainer as w}from"./DOMContainer.js";import{PopupView as V}from"./PopupView.js";import M from"./View.js";import{Viewport2DMixin as b}from"./Viewport2DMixin.js";import v from"./2d/AnimationManager.js";import{layerView2DImporter as _}from"./2d/layerViewModuleImportUtils.js";import j from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as S}from"./2d/viewpointUtils.js";import L from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as R}from"./2d/layers/support/util.js";import{clipContainsPoint as O}from"./2d/support/clippingUtils.js";import{getDefaultHighlightOptions as T,setDefaultHighlightOptions as k}from"./2d/support/highlightOptionsUtils.js";import{hitTest as C}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as x,takeScreenshot as D}from"./2d/support/screenshotUtils.js";import{Timeline as E}from"./2d/support/Timeline.js";import P from"./navigation/Navigation.js";import G from"./navigation/NavigationActionMap.js";import U from"./support/HighlightOptions.js";import{isSupportedScreenPointEvent as q,createScreenPointFromSupportedEvent as z}from"./support/screenUtils.js";import{check as A}from"./support/WebGLRequirements.js";import I from"./ui/DefaultUI.js";import N from"./ui/2d/DefaultUI2D.js";import{isWebMap as W}from"../webmap/utils.js";import $ from"../webmap/background/ColorBackground.js";let F,H,B,Z,J,K,Q;async function X(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:r,MagnifierView2D:s,GridView2D:a,Stage:n}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);H=e,B=t,Z=i,J=r,K=s,Q=a,F=n}let Y=class extends(b(f(V(w(M))))){constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.labelManager=null,this.navigation=new P({actionMap:new G({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.supportsGround=!1,this.floors=new i,this.grid=null,this.map=null,this.spatialReferenceLocked=!1,this.timeline=new E,this.type="2d",this.view2dType=null,this.ui=new N,this.test={takeScreenshot:async e=>x(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},p()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new L(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return m(t.spatialReference,i)}get background(){return W(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get highlightOptions(){return T(this)}set highlightOptions(e){k(this,e)}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resolution(){return this.stateManager.resolution??0}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){const e=!(!this.magnifier.visible||null===this.magnifier.position||!this._magnifierView?.updatingHandles.updating),t=!this.destroyed&&(!this.layerViewManager||!this.labelManager||!this.graphicsView||!0===this.layerViewManager.updating||!0===this.labelManager.updating||!0===this.graphicsView.updating||this.allLayerViews.some((e=>!e.destroyed&&!("layerViews"in e)&&!0===e.updating))||e);if(has("esri-2d-log-updating")){const i=this.allLayerViews.reduce(((e,t)=>({...e,[`${t.layer.id}(${t.layer.type})`]:!t.destroyed&&!("layerViews"in t)&&t.updating})),{});console.log(`Updating MapView: ${t}\n-> Null LayerViewManager: ${!this.layerViewManager}\n-> Null LabelManager: ${!this.labelManager}\n-> Null GraphicsView: ${!this.graphicsView}\n-> layerViewManager.updating: ${this.layerViewManager?.updating}\n-> labelManager.updating: ${this.labelManager?.updating}\n-> graphicsView.updating: ${this.graphicsView?.updating}\n-> allLayerViews: ${JSON.stringify(i)}\n-> updatingMagnifier: ${e}\n`)}return t}get visibleArea(){const e=this.stateManager.visibleArea;return e?new u({rings:[e.map((e=>[e[0],e[1]]))],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return C(this,e,t)}async takeScreenshot(e){return D(this._getScreenshotView(e),e)}toMap(e){if(!this.ready)return null;const t=q(e)?z(this,e):e;return this.stateManager.toMap(t)}toScreen(e,t){return this.stateManager.toScreen(e,t)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return W(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return W(this.map)?this.map.initialViewProperties.timeExtent:null}hasLayerViewModule(e){return _.hasLayerViewModule(e)}importLayerView(e){return _.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=this.toMap(e),i=await this.hitTest(e),r=this.allLayerViews.toArray().filter((i=>i.clips.every((i=>O(this,i,e,t))))).reverse(),s=new globalThis.Map(r.map((e=>[e.layer.uid,e]))),a=[];let n=0,o=0;for(;n<i.results.length||o<r.length;){const e=i.results.at(n);if(e&&"graphic"!==e.type){++n;continue}const l=s.get((e?.layer??e?.graphic.layer)?.uid);if((!e||l)&&o<r.length&&r.at(o)!==l){const e=r.at(o);"fetchPopupFeaturesAtLocation"in e&&a.push({mapPoint:t,layerView:e}),++o}else e&&(a.push({graphic:e.graphic,layerView:l}),++n)}return{hits:a,location:t}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}async validate(){let e=A(this.type);if(has("safari")&&has("safari")<9&&(e=new s("mapview:browser-not-supported","This browser is not supported by MapView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:has("safari")})),null!=e){a.getLogger(this).warn("#validate()",e.message);const t=document.createElement("div");t.setAttribute("style","display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;");const i=document.createElement("div");i.innerHTML="Unable to display map. WebGL2 support is required.",i.setAttribute("style","font-size: 24px; font-weight: bold;");const r=document.createElement("div");r.innerHTML="Ensure that your browser and hardware meet the minimum requirements.",r.setAttribute("style","font-size: 18px;");const s=document.createElement("a");throw s.innerHTML="https://esriurl.com/systemRequirements",s.target="_blank",s.setAttribute("style","font-size: 18px;"),s.href="https://esriurl.com/systemRequirements",t.appendChild(i),t.appendChild(r),t.appendChild(s),this.surface.appendChild(t),e}}loadAsyncDependencies(){return X()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,d=l?.rotation??0,g=l?.scale||p&&S(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),c=o.center??h,u=o.rotation??d,m=o.scale??g;return c&&m?new t({targetGeometry:c,scale:m,rotation:u}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=new F(this.surface,{canvas:this.renderCanvas,contextOptions:{disabledExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions},renderingOptions:this.renderingOptions,timeline:this.timeline});this.stage=t,this._magnifierView=new K,this._magnifierView.magnifier=this.magnifier,this._gridView=new Q;const i=new Z({view:this});this._set("labelManager",i);const r=new v({view:this});this._set("animationManager",r);const s=new J({view:this,animationManager:r});this._set("mapViewNavigation",s),this._setupSpatialReferenceDependentProperties(),this.addHandles([this.rootLayerViews.on("change",(()=>this._updateStageChildren())),t.on("webgl-error",(e=>this.fatalError=e.error)),o((()=>this.stationary),(e=>t.stationary=e),l),o((()=>this.background),(e=>{t.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color}),l),o((()=>this.magnifier),(e=>this._magnifierView.magnifier=e),l),o((()=>this.grid),(e=>this._gridView.grid=e),l),o((()=>this.renderingOptions),(e=>t.renderingOptions=e),l),o((()=>this.highlights.items.map((e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})))),(()=>{t.highlightGradient=R(t.highlightGradient,this.highlights.items)}),l),o((()=>this.state.id),(()=>t.state=this.state),l)],"map-view"),this._updateStageChildren();const a=this._resolveWhenReady;this._resolveWhenReady=[],a.forEach((e=>e(this))),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach((e=>{this.stage.addChild(e.container)}));const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(){const e=new j(y.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",e);const t=new H({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new B(e)});this._set("graphicsView",t)}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([h({constructOnly:!0})],Y.prototype,"deactivatedWebGLExtensions",void 0),e([h({constructOnly:!0})],Y.prototype,"debugWebGLExtensions",void 0),e([h({readOnly:!0})],Y.prototype,"featuresTilingScheme",void 0),e([h({readOnly:!0})],Y.prototype,"graphicsTileStore",null),e([h()],Y.prototype,"graphicsView",void 0),e([h()],Y.prototype,"constraintsInfo",null),e([h()],Y.prototype,"initialExtentRequired",null),e([h()],Y.prototype,"labelManager",void 0),e([h({type:P,nonNullable:!0})],Y.prototype,"navigation",void 0),e([h({constructOnly:!0})],Y.prototype,"renderCanvas",void 0),e([h()],Y.prototype,"renderingOptions",void 0),e([h({constructOnly:!0})],Y.prototype,"supersampleScreenshotsEnabled",void 0),e([h({readOnly:!0})],Y.prototype,"supportsGround",void 0),e([h()],Y.prototype,"defaultsFromMapSettings",null),e([h({readOnly:!0})],Y.prototype,"typeSpecificPreconditionsReady",null),e([h({type:$})],Y.prototype,"background",null),e([h()],Y.prototype,"center",null),e([h({type:i})],Y.prototype,"floors",void 0),e([h()],Y.prototype,"grid",void 0),e([h({type:U})],Y.prototype,"highlightOptions",null),e([h()],Y.prototype,"map",void 0),e([h()],Y.prototype,"padding",null),e([h({readOnly:!0})],Y.prototype,"rendering",null),e([h({readOnly:!0})],Y.prototype,"resolution",null),e([h()],Y.prototype,"scale",null),e([h({constructOnly:!0})],Y.prototype,"spatialReferenceLocked",void 0),e([h({readOnly:!0})],Y.prototype,"tileInfo",null),e([h({type:E,readOnly:!0})],Y.prototype,"timeline",void 0),e([h({readOnly:!0})],Y.prototype,"type",void 0),e([h({readOnly:!0})],Y.prototype,"updating",null),e([h({readOnly:!0})],Y.prototype,"view2dType",void 0),e([h({readOnly:!0})],Y.prototype,"visibleArea",null),e([h()],Y.prototype,"zoom",null),e([h({readOnly:!0})],Y.prototype,"navigating",null),e([h(),d((e=>e instanceof I?e:c(N,e)))],Y.prototype,"ui",void 0),Y=e([g("esri.views.View2D")],Y);const ee=Y;export{ee as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{initialize as p}from"../core/workers/workers.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as d}from"../core/accessorSupport/decorators/cast.js";import"../core/RandomLCG.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{ensureClass as c}from"../core/accessorSupport/ensureType.js";import u from"../geometry/Polygon.js";import{isLoadedOrLoadFor as m}from"../geometry/projectionUtils.js";import y from"../layers/support/TileInfo.js";import{BreakpointsOwner as f}from"./BreakpointsOwner.js";import{DOMContainer as w}from"./DOMContainer.js";import{PopupView as V}from"./PopupView.js";import b from"./View.js";import{Viewport2DMixin as M}from"./Viewport2DMixin.js";import v from"./2d/AnimationManager.js";import{layerView2DImporter as _}from"./2d/layerViewModuleImportUtils.js";import j from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as S}from"./2d/viewpointUtils.js";import L from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as R}from"./2d/layers/support/util.js";import{clipContainsPoint as O}from"./2d/support/clippingUtils.js";import{getDefaultHighlightOptions as T,setDefaultHighlightOptions as k}from"./2d/support/highlightOptionsUtils.js";import{hitTest as C}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as x,takeScreenshot as D}from"./2d/support/screenshotUtils.js";import{Timeline as E}from"./2d/support/Timeline.js";import P from"./navigation/Navigation.js";import G from"./navigation/NavigationActionMap.js";import U from"./support/HighlightOptions.js";import{check as q}from"./support/WebGLRequirements.js";import z from"./ui/DefaultUI.js";import A from"./ui/2d/DefaultUI2D.js";import{isWebMap as I}from"../webmap/utils.js";import N from"../webmap/background/ColorBackground.js";let W,$,F,H,B,Z,J;async function K(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:r,MagnifierView2D:s,GridView2D:a,Stage:n}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);$=e,F=t,H=i,B=r,Z=s,J=a,W=n}let Q=class extends(M(f(V(w(b))))){constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.labelManager=null,this.navigation=new P({actionMap:new G({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.supportsGround=!1,this.floors=new i,this.grid=null,this.map=null,this.spatialReferenceLocked=!1,this.timeline=new E,this.type="2d",this.view2dType=null,this.ui=new A,this.test={takeScreenshot:async e=>x(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},p()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new L(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return m(t.spatialReference,i)}get background(){return I(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get highlightOptions(){return T(this)}set highlightOptions(e){k(this,e)}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resolution(){return this.stateManager.resolution??0}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){const e=!(!this.magnifier.visible||null===this.magnifier.position||!this._magnifierView?.updatingHandles.updating),t=!this.destroyed&&(!this.layerViewManager||!this.labelManager||!this.graphicsView||!0===this.layerViewManager.updating||!0===this.labelManager.updating||!0===this.graphicsView.updating||this.allLayerViews.some((e=>!e.destroyed&&!("layerViews"in e)&&!0===e.updating))||e);if(has("esri-2d-log-updating")){const i=this.allLayerViews.reduce(((e,t)=>({...e,[`${t.layer.id}(${t.layer.type})`]:!t.destroyed&&!("layerViews"in t)&&t.updating})),{});console.log(`Updating MapView: ${t}\n-> Null LayerViewManager: ${!this.layerViewManager}\n-> Null LabelManager: ${!this.labelManager}\n-> Null GraphicsView: ${!this.graphicsView}\n-> layerViewManager.updating: ${this.layerViewManager?.updating}\n-> labelManager.updating: ${this.labelManager?.updating}\n-> graphicsView.updating: ${this.graphicsView?.updating}\n-> allLayerViews: ${JSON.stringify(i)}\n-> updatingMagnifier: ${e}\n`)}return t}get visibleArea(){const e=this.stateManager.visibleArea;return e?new u({rings:[e.map((e=>[e[0],e[1]]))],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return C(this,e,t)}async takeScreenshot(e){return D(this._getScreenshotView(e),e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return I(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return I(this.map)?this.map.initialViewProperties.timeExtent:null}hasLayerViewModule(e){return _.hasLayerViewModule(e)}importLayerView(e){return _.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=this.toMap(e),i=await this.hitTest(e),r=this.allLayerViews.toArray().filter((i=>i.clips.every((i=>O(this,i,e,t))))).reverse(),s=new globalThis.Map(r.map((e=>[e.layer.uid,e]))),a=[];let n=0,o=0;for(;n<i.results.length||o<r.length;){const e=i.results.at(n);if(e&&"graphic"!==e.type){++n;continue}const l=s.get((e?.layer??e?.graphic.layer)?.uid);if((!e||l)&&o<r.length&&r.at(o)!==l){const e=r.at(o);"fetchPopupFeaturesAtLocation"in e&&a.push({mapPoint:t,layerView:e}),++o}else e&&(a.push({graphic:e.graphic,layerView:l}),++n)}return{hits:a,location:t}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}async validate(){let e=q(this.type);if(has("safari")&&has("safari")<9&&(e=new s("mapview:browser-not-supported","This browser is not supported by MapView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:has("safari")})),null!=e){a.getLogger(this).warn("#validate()",e.message);const t=document.createElement("div");t.setAttribute("style","display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;");const i=document.createElement("div");i.innerHTML="Unable to display map. WebGL2 support is required.",i.setAttribute("style","font-size: 24px; font-weight: bold;");const r=document.createElement("div");r.innerHTML="Ensure that your browser and hardware meet the minimum requirements.",r.setAttribute("style","font-size: 18px;");const s=document.createElement("a");throw s.innerHTML="https://esriurl.com/systemRequirements",s.target="_blank",s.setAttribute("style","font-size: 18px;"),s.href="https://esriurl.com/systemRequirements",t.appendChild(i),t.appendChild(r),t.appendChild(s),this.surface.appendChild(t),e}}loadAsyncDependencies(){return K()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,d=l?.rotation??0,g=l?.scale||p&&S(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),c=o.center??h,u=o.rotation??d,m=o.scale??g;return c&&m?new t({targetGeometry:c,scale:m,rotation:u}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=new W(this.surface,{canvas:this.renderCanvas,contextOptions:{disabledExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions},renderingOptions:this.renderingOptions,timeline:this.timeline});this.stage=t,this._magnifierView=new Z,this._magnifierView.magnifier=this.magnifier,this._gridView=new J;const i=new H({view:this});this._set("labelManager",i);const r=new v({view:this});this._set("animationManager",r);const s=new B({view:this,animationManager:r});this._set("mapViewNavigation",s),this._setupSpatialReferenceDependentProperties(),this.addHandles([this.rootLayerViews.on("change",(()=>this._updateStageChildren())),t.on("webgl-error",(e=>this.fatalError=e.error)),o((()=>this.stationary),(e=>t.stationary=e),l),o((()=>this.background),(e=>{t.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color}),l),o((()=>this.magnifier),(e=>this._magnifierView.magnifier=e),l),o((()=>this.grid),(e=>this._gridView.grid=e),l),o((()=>this.renderingOptions),(e=>t.renderingOptions=e),l),o((()=>this.highlights.items.map((e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})))),(()=>{t.highlightGradient=R(t.highlightGradient,this.highlights.items)}),l),o((()=>this.state.id),(()=>t.state=this.state),l)],"map-view"),this._updateStageChildren();const a=this._resolveWhenReady;this._resolveWhenReady=[],a.forEach((e=>e(this))),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach((e=>{this.stage.addChild(e.container)}));const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(){const e=new j(y.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",e);const t=new $({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new F(e)});this._set("graphicsView",t)}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([h({constructOnly:!0})],Q.prototype,"deactivatedWebGLExtensions",void 0),e([h({constructOnly:!0})],Q.prototype,"debugWebGLExtensions",void 0),e([h({readOnly:!0})],Q.prototype,"featuresTilingScheme",void 0),e([h({readOnly:!0})],Q.prototype,"graphicsTileStore",null),e([h()],Q.prototype,"graphicsView",void 0),e([h()],Q.prototype,"constraintsInfo",null),e([h()],Q.prototype,"initialExtentRequired",null),e([h()],Q.prototype,"labelManager",void 0),e([h({type:P,nonNullable:!0})],Q.prototype,"navigation",void 0),e([h({constructOnly:!0})],Q.prototype,"renderCanvas",void 0),e([h()],Q.prototype,"renderingOptions",void 0),e([h({constructOnly:!0})],Q.prototype,"supersampleScreenshotsEnabled",void 0),e([h({readOnly:!0})],Q.prototype,"supportsGround",void 0),e([h()],Q.prototype,"defaultsFromMapSettings",null),e([h({readOnly:!0})],Q.prototype,"typeSpecificPreconditionsReady",null),e([h({type:N})],Q.prototype,"background",null),e([h()],Q.prototype,"center",null),e([h({type:i})],Q.prototype,"floors",void 0),e([h()],Q.prototype,"grid",void 0),e([h({type:U})],Q.prototype,"highlightOptions",null),e([h()],Q.prototype,"map",void 0),e([h()],Q.prototype,"padding",null),e([h({readOnly:!0})],Q.prototype,"rendering",null),e([h({readOnly:!0})],Q.prototype,"resolution",null),e([h()],Q.prototype,"scale",null),e([h({constructOnly:!0})],Q.prototype,"spatialReferenceLocked",void 0),e([h({readOnly:!0})],Q.prototype,"tileInfo",null),e([h({type:E,readOnly:!0})],Q.prototype,"timeline",void 0),e([h({readOnly:!0})],Q.prototype,"type",void 0),e([h({readOnly:!0})],Q.prototype,"updating",null),e([h({readOnly:!0})],Q.prototype,"view2dType",void 0),e([h({readOnly:!0})],Q.prototype,"visibleArea",null),e([h()],Q.prototype,"zoom",null),e([h({readOnly:!0})],Q.prototype,"navigating",null),e([h(),d((e=>e instanceof z?e:c(A,e)))],Q.prototype,"ui",void 0),Q=e([g("esri.views.View2D")],Q);const X=Q;export{X as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import e from"../Viewpoint.js";import{watch as i,sync as n}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import r from"./2d/FrameTask.js";import{GoToManager as o}from"./2d/GoToManager.js";import p from"./2d/MapViewConstraints.js";import{ViewStateManager as g}from"./2d/ViewStateManager.js";import l from"./2d/input/MapViewInputManager.js";import{StationaryManager as h}from"./2d/support/StationaryManager.js";import{ViewEvents as d}from"./input/ViewEvents.js";const u=u=>{let m=class extends u{constructor(...t){super(...t),this.fullOpacity=1,this.stateManager=new g({constraints:new p({view:this})}),this.goToManager=new o({view:this}),this.stationaryManager=new h,this.mapViewNavigation=null,this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!1,labelsAnimationTime:0,labelCollisionsEnabled:!1},this.frameTask=new r(this),this.inputManager=new l({view:this}),this.viewEvents=new d(this),this.padding={top:0,right:0,bottom:0,left:0},this.addHandles([i((()=>this.viewpoint),(()=>this.stationaryManager.flip()),n),this.on("resize",(t=>this.stateManager.resize(t.width,t.height)))])}get constraintsInfo(){return{lods:null,spatialReference:null}}get extent(){return this.stateManager?.extent??null}set extent(t){this.stateManager.extent=t}get state(){return this.stateManager.state}get interacting(){return this.navigating}get stationary(){return!this.animation&&!this.navigating&&!this.resizing&&this.stationaryManager.stationary}set animation(t){const e=this._get("animation");if(t===e)return;if(e&&e.stop(),t!==this.animationManager.animation&&this.animationManager.stop(),!t||t.isFulfilled())return void this._set("animation",null);this._set("animation",t);const i=()=>{this.destroyed||t===this._get("animation")&&(this._set("animation",null),this.frameTask?.requestFrame())};t.when(i,i)}get constraints(){return this.stateManager?.constraints}set constraints(t){t.view=this;const e=this.stateManager.constraints;this.stateManager.constraints=t,e?.destroy()}get padding(){return this.stateManager?.padding}set padding(t){this.stateManager&&(this.stateManager.padding=t)}get resizeAlign(){return this.stateManager.resizeAlign}set resizeAlign(t){this.stateManager.resizeAlign=t}get rotation(){return this.stateManager.rotation??0}set rotation(t){const{rotationEnabled:e}=this.constraints;this.constraints.rotationEnabled=!0,this.stateManager.rotation=t,this.constraints.rotationEnabled=e}get viewpoint(){return this.stateManager.viewpoint??null}set viewpoint(t){this.stateManager.viewpoint=t,this.frameTask.requestFrame()}on(t,e,i,n){const a=this.inputManager&&this.viewEvents.on(t,e,i,n);return a||super.on(t,e)}hasEventListener(t){return super.hasEventListener(t)||this.viewEvents.hasHandler(t)}goTo(t,e){return this.goToManager.goTo(t,e)}};return t([a({readOnly:!0})],m.prototype,"animationManager",void 0),t([a({readOnly:!0})],m.prototype,"fullOpacity",void 0),t([a()],m.prototype,"stateManager",void 0),t([a()],m.prototype,"constraintsInfo",null),t([a()],m.prototype,"extent",null),t([a()],m.prototype,"goToManager",void 0),t([a({readOnly:!0})],m.prototype,"state",null),t([a({readOnly:!0})],m.prototype,"mapViewNavigation",void 0),t([a()],m.prototype,"renderingOptions",void 0),t([a({readOnly:!0})],m.prototype,"interacting",null),t([a()],m.prototype,"stationary",null),t([a()],m.prototype,"animation",null),t([a({type:p})],m.prototype,"constraints",null),t([a({readOnly:!0})],m.prototype,"inputManager",void 0),t([a()],m.prototype,"padding",null),t([a()],m.prototype,"resizeAlign",null),t([a()],m.prototype,"rotation",null),t([a({readOnly:!0})],m.prototype,"viewEvents",void 0),t([a({type:e})],m.prototype,"viewpoint",null),m=t([s("esri.views.Viewport2DMixin")],m),m};export{u as Viewport2DMixin};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import e from"../Viewpoint.js";import{watch as i,sync as n}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import r from"./2d/FrameTask.js";import{GoToManager as o}from"./2d/GoToManager.js";import p from"./2d/MapViewConstraints.js";import{ViewStateManager as l}from"./2d/ViewStateManager.js";import g from"./2d/input/MapViewInputManager.js";import{StationaryManager as h}from"./2d/support/StationaryManager.js";import{ViewEvents as d}from"./input/ViewEvents.js";import{isSupportedScreenPointEvent as u,createScreenPointFromSupportedEvent as m}from"./support/screenUtils.js";const c=c=>{let y=class extends c{constructor(...t){super(...t),this.fullOpacity=1,this.stateManager=new l({constraints:new p({view:this})}),this.goToManager=new o({view:this}),this.stationaryManager=new h,this.mapViewNavigation=null,this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!1,labelsAnimationTime:0,labelCollisionsEnabled:!1},this.frameTask=new r(this),this.inputManager=new g({view:this}),this.viewEvents=new d(this),this.padding={top:0,right:0,bottom:0,left:0},this.addHandles([i((()=>this.viewpoint),(()=>this.stationaryManager.flip()),n),this.on("resize",(t=>this.stateManager.resize(t.width,t.height)))])}get constraintsInfo(){return{lods:null,spatialReference:null}}get extent(){return this.stateManager?.extent??null}set extent(t){this.stateManager.extent=t}get state(){return this.stateManager.state}get interacting(){return this.navigating}get stationary(){return!this.animation&&!this.navigating&&!this.resizing&&this.stationaryManager.stationary}set animation(t){const e=this._get("animation");if(t===e)return;if(e&&e.stop(),t!==this.animationManager.animation&&this.animationManager.stop(),!t||t.isFulfilled())return void this._set("animation",null);this._set("animation",t);const i=()=>{this.destroyed||t===this._get("animation")&&(this._set("animation",null),this.frameTask?.requestFrame())};t.when(i,i)}get constraints(){return this.stateManager?.constraints}set constraints(t){t.view=this;const e=this.stateManager.constraints;this.stateManager.constraints=t,e?.destroy()}get padding(){return this.stateManager?.padding}set padding(t){this.stateManager&&(this.stateManager.padding=t)}get resizeAlign(){return this.stateManager.resizeAlign}set resizeAlign(t){this.stateManager.resizeAlign=t}get rotation(){return this.stateManager.rotation??0}set rotation(t){const{rotationEnabled:e}=this.constraints;this.constraints.rotationEnabled=!0,this.stateManager.rotation=t,this.constraints.rotationEnabled=e}get viewpoint(){return this.stateManager.viewpoint??null}set viewpoint(t){this.stateManager.viewpoint=t,this.frameTask.requestFrame()}on(t,e,i,n){const a=this.inputManager&&this.viewEvents.on(t,e,i,n);return a||super.on(t,e)}hasEventListener(t){return super.hasEventListener(t)||this.viewEvents.hasHandler(t)}goTo(t,e){return this.goToManager.goTo(t,e)}toMap(t){if(!this.ready)return null;const e=u(t)?m(this,t):t;return this.stateManager.toMap(e)}};return t([a({readOnly:!0})],y.prototype,"animationManager",void 0),t([a({readOnly:!0})],y.prototype,"fullOpacity",void 0),t([a()],y.prototype,"stateManager",void 0),t([a()],y.prototype,"constraintsInfo",null),t([a()],y.prototype,"extent",null),t([a()],y.prototype,"goToManager",void 0),t([a({readOnly:!0})],y.prototype,"state",null),t([a({readOnly:!0})],y.prototype,"mapViewNavigation",void 0),t([a()],y.prototype,"renderingOptions",void 0),t([a({readOnly:!0})],y.prototype,"interacting",null),t([a()],y.prototype,"stationary",null),t([a()],y.prototype,"animation",null),t([a({type:p})],y.prototype,"constraints",null),t([a({readOnly:!0})],y.prototype,"inputManager",void 0),t([a()],y.prototype,"padding",null),t([a()],y.prototype,"resizeAlign",null),t([a()],y.prototype,"rotation",null),t([a({readOnly:!0})],y.prototype,"viewEvents",void 0),t([a({type:e})],y.prototype,"viewpoint",null),y=t([s("esri.views.Viewport2DMixin")],y),y};export{c as Viewport2DMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import"../../core/Warning.js";import"../../core/Error.js";import e from"./LayerView.js";class s extends e{constructor(r){super(r),this.layer=null,this.sublayerViews=null}highlight(r){throw new Error("Not implemented")}}r([o()],s.prototype,"layer",void 0),r([o()],s.prototype,"sublayerViews",void 0);export{s as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import"../../core/Warning.js";import"../../core/Error.js";import e from"./LayerView.js";class s extends e{constructor(r){super(r),this.layer=null,this.sublayerViews=null}highlight(r,o){throw new Error("Not implemented")}}r([o()],s.prototype,"layer",void 0),r([o()],s.prototype,"sublayerViews",void 0);export{s as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";const t=t=>{let s=class extends t{constructor(...r){super(...r),this.layer=null}get availableFields(){return[]}highlight(){throw new Error("Not implemented")}queryFeatures(){throw new Error("Not implemented")}queryFeatureCount(){throw new Error("Not implemented")}createQuery(){throw new Error("Not implemented")}queryExtent(){throw new Error("Not implemented")}};return r([e()],s.prototype,"layer",void 0),r([e()],s.prototype,"availableFields",null),s=r([o("esri.views.layers.PointCloudLayerView")],s),s};export{t as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";const t=t=>{let s=class extends t{constructor(...r){super(...r),this.layer=null}get availableFields(){return[]}highlight(r,e){throw new Error("Not implemented")}queryFeatures(){throw new Error("Not implemented")}queryFeatureCount(){throw new Error("Not implemented")}createQuery(){throw new Error("Not implemented")}queryExtent(){throw new Error("Not implemented")}};return r([e()],s.prototype,"layer",void 0),r([e()],s.prototype,"availableFields",null),s=r([o("esri.views.layers.PointCloudLayerView")],s),s};export{t as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{isSome as t}from"../../core/arrayUtils.js";import r from"../../core/Logger.js";import{abortMaybe as o}from"../../core/maybe.js";import{unwrapUpdating as i,updating as n,isUpdating as l}from"../../core/maybeUpdating.js";import{throwIfAbortError as s,throwIfNotAbortError as a}from"../../core/promiseUtils.js";import{whenOnce as m}from"../../core/reactiveUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import{project as u,canProjectWithoutEngine as g,isLoaded as y,load as h}from"../../geometry/projectionUtils.js";import d from"./LayerView.js";let f=class extends d{constructor(){super(...arguments),this.layer=null,this.filter=null,this._geometryEngine=null,this._projectionEngineLoaded=!1,this._abortController=new AbortController}get availableFields(){return[]}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){throw new Error("Not implemented")}get maximumNumberOfFeaturesExceeded(){return!1}get layerFilter(){return i(this._layerFilter)}get _layerFilter(){const e=this.layer?.filter;if(null==e||e.geometries.length<1)return null;const o=this._geometryEngine;if(null==o||!this._projectionEngineLoaded&&this._filterNeedsProjectionEngine)return n;const i=e.geometries.at(0).spatialReference,l=e.geometries.toArray().map((e=>{try{e=o.simplify(e)}catch(t){return r.getLogger(this).warnOncePerTick("Failed to simplify scene filter mask polygon. Polygon will be ignored."),null}if(null==e)return null;if(e.spatialReference.equals(i))return e;try{return u(e,i)}catch(t){return r.getLogger(this).warnOncePerTick("Failed to project scene filter mask polygon. Polygon will be ignored."),null}})).filter(t).sort(((e,t)=>e.extent.xmin-t.extent.xmin)),s=new Set,a=new Array,m=new Array;for(let t of l){const e=t.extent.xmin;if(a.length=0,s.forEach((r=>{if(e>=r.extent.xmax)return m.push(r),void s.delete(r);t.extent.ymin<=r.extent.ymax&&t.extent.ymax>=r.extent.ymin&&o.intersects(t,r)&&a.push(r)})),a.length>0){a.push(t);try{t=o.union(a)}catch(p){r.getLogger(this).warnOncePerTick("Failed to unify filter mask polygons. Polygon will be ignored.");continue}a.pop(),a.forEach((e=>s.delete(e)))}s.add(t)}return s.forEach((e=>m.push(e))),m.length>0?{spatialRelationship:e.spatialRelationship,geometries:m}:null}get _filterNeedsProjectionEngine(){const e=this.layer.filter;if(null==e||e.geometries.length<=1)return!1;const t=e.geometries.at(0).spatialReference;return e.geometries.some((({spatialReference:e})=>!e.equals(t)&&!g(e,t)))}get layerFilterUpdating(){return l(this._layerFilter)}initialize(){const{signal:e}=this._abortController;m((()=>this.destroyed||!this._geometryEngine&&this.layer?.filter?.geometries?.length),e).then((async()=>{s(e),this._geometryEngine=await import("../../geometry/geometryEngine.js")})).catch(a),this._projectionEngineLoaded=y(),m((()=>this.destroyed||!this._projectionEngineLoaded&&this._filterNeedsProjectionEngine),e).then((async()=>{s(e),await h(),this._projectionEngineLoaded=!0})).catch(a)}destroy(){this._abortController=o(this._abortController)}highlight(e){throw new Error("Not implemented")}queryFeatures(e,t){throw new Error("Not implemented")}queryObjectIds(e,t){throw new Error("Not implemented")}queryFeatureCount(e,t){throw new Error("Not implemented")}createQuery(){throw new Error("Not implemented")}queryExtent(e,t){throw new Error("Not implemented")}};e([p()],f.prototype,"layer",void 0),e([p()],f.prototype,"availableFields",null),e([p()],f.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0})],f.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],f.prototype,"filter",void 0),e([p({readOnly:!0})],f.prototype,"layerFilter",null),e([p({readOnly:!0})],f.prototype,"_layerFilter",null),e([p()],f.prototype,"_geometryEngine",void 0),e([p()],f.prototype,"_projectionEngineLoaded",void 0),e([p()],f.prototype,"_filterNeedsProjectionEngine",null),e([p()],f.prototype,"layerFilterUpdating",null),f=e([c("esri.views.layers.SceneLayerView")],f);export{f as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{isSome as t}from"../../core/arrayUtils.js";import r from"../../core/Logger.js";import{abortMaybe as o}from"../../core/maybe.js";import{unwrapUpdating as i,updating as n,isUpdating as l}from"../../core/maybeUpdating.js";import{throwIfAbortError as s,throwIfNotAbortError as a}from"../../core/promiseUtils.js";import{whenOnce as m}from"../../core/reactiveUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import{project as u,canProjectWithoutEngine as g,isLoaded as y,load as h}from"../../geometry/projectionUtils.js";import d from"./LayerView.js";let f=class extends d{constructor(){super(...arguments),this.layer=null,this.filter=null,this._geometryEngine=null,this._projectionEngineLoaded=!1,this._abortController=new AbortController}get availableFields(){return[]}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){throw new Error("Not implemented")}get maximumNumberOfFeaturesExceeded(){return!1}get layerFilter(){return i(this._layerFilter)}get _layerFilter(){const e=this.layer?.filter;if(null==e||e.geometries.length<1)return null;const o=this._geometryEngine;if(null==o||!this._projectionEngineLoaded&&this._filterNeedsProjectionEngine)return n;const i=e.geometries.at(0).spatialReference,l=e.geometries.toArray().map((e=>{try{e=o.simplify(e)}catch(t){return r.getLogger(this).warnOncePerTick("Failed to simplify scene filter mask polygon. Polygon will be ignored."),null}if(null==e)return null;if(e.spatialReference.equals(i))return e;try{return u(e,i)}catch(t){return r.getLogger(this).warnOncePerTick("Failed to project scene filter mask polygon. Polygon will be ignored."),null}})).filter(t).sort(((e,t)=>e.extent.xmin-t.extent.xmin)),s=new Set,a=new Array,m=new Array;for(let t of l){const e=t.extent.xmin;if(a.length=0,s.forEach((r=>{if(e>=r.extent.xmax)return m.push(r),void s.delete(r);t.extent.ymin<=r.extent.ymax&&t.extent.ymax>=r.extent.ymin&&o.intersects(t,r)&&a.push(r)})),a.length>0){a.push(t);try{t=o.union(a)}catch(p){r.getLogger(this).warnOncePerTick("Failed to unify filter mask polygons. Polygon will be ignored.");continue}a.pop(),a.forEach((e=>s.delete(e)))}s.add(t)}return s.forEach((e=>m.push(e))),m.length>0?{spatialRelationship:e.spatialRelationship,geometries:m}:null}get _filterNeedsProjectionEngine(){const e=this.layer.filter;if(null==e||e.geometries.length<=1)return!1;const t=e.geometries.at(0).spatialReference;return e.geometries.some((({spatialReference:e})=>!e.equals(t)&&!g(e,t)))}get layerFilterUpdating(){return l(this._layerFilter)}initialize(){const{signal:e}=this._abortController;m((()=>this.destroyed||!this._geometryEngine&&this.layer?.filter?.geometries?.length),e).then((async()=>{s(e),this._geometryEngine=await import("../../geometry/geometryEngine.js")})).catch(a),this._projectionEngineLoaded=y(),m((()=>this.destroyed||!this._projectionEngineLoaded&&this._filterNeedsProjectionEngine),e).then((async()=>{s(e),await h(),this._projectionEngineLoaded=!0})).catch(a)}destroy(){this._abortController=o(this._abortController)}highlight(e,t){throw new Error("Not implemented")}queryFeatures(e,t){throw new Error("Not implemented")}queryObjectIds(e,t){throw new Error("Not implemented")}queryFeatureCount(e,t){throw new Error("Not implemented")}createQuery(){throw new Error("Not implemented")}queryExtent(e,t){throw new Error("Not implemented")}};e([p()],f.prototype,"layer",void 0),e([p()],f.prototype,"availableFields",null),e([p()],f.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0})],f.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],f.prototype,"filter",void 0),e([p({readOnly:!0})],f.prototype,"layerFilter",null),e([p({readOnly:!0})],f.prototype,"_layerFilter",null),e([p()],f.prototype,"_geometryEngine",void 0),e([p()],f.prototype,"_projectionEngineLoaded",void 0),e([p()],f.prototype,"_filterNeedsProjectionEngine",null),e([p()],f.prototype,"layerFilterUpdating",null),f=e([c("esri.views.layers.SceneLayerView")],f);export{f as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import has from"../../core/has.js";function n(e){return e&&"function"==typeof e.highlight}function i(e){return e&&"function"==typeof e.maskOccludee}function r(e,n,i){return null==e||e>=i&&(0===n||e<=n)}function t(e,n){if(n&&e){const{minScale:i,maxScale:t}=e;if(c(i,t))return r(n,i,t)}return!0}function c(e,n){return null!=e&&e>0||null!=n&&n>0}function a(e){return!e?.minScale||!e.maxScale||e.minScale>=e.maxScale}const o=!has("disable-feature:layer-based-scale-visibility");function u(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatures"in e&&"layer"in e&&"view"in e}function l(n,i,r){return new e("layerview:spatial-reference-incompatible",`The spatial reference of this ${n}${i?`(wkid:${i})`:""} is incompatible with the spatial reference of the view${r?`(wkid:${r})`:""}.`,{})}export{o as hasLayerBasedScaleVisibility,n as highlightsSupported,t as isInEffectiveScaleRange,c as isScaleRangeActive,u as isSelectableLayerView2D,i as occludeesSupported,r as scaleBoundsPredicate,l as spatialReferenceIncompatibleError,a as validateScaleRange};
5
+ import e from"../../core/Error.js";import has from"../../core/has.js";function n(e){return e&&"function"==typeof e.highlight}function i(e){return e&&"function"==typeof e.maskOccludee}function r(e,n,i){return null==e||e>=i&&(0===n||e<=n)}function t(e,n){if(n&&e){const{minScale:i,maxScale:t}=e;if(c(i,t))return r(n,i,t)}return!0}function c(e,n){return null!=e&&e>0||null!=n&&n>0}function a(e){return!e?.minScale||!e.maxScale||e.minScale>=e.maxScale}const o=()=>!has("disable-feature:layer-based-scale-visibility");function u(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatures"in e&&"layer"in e&&"view"in e}function l(n,i,r){return new e("layerview:spatial-reference-incompatible",`The spatial reference of this ${n}${i?`(wkid:${i})`:""} is incompatible with the spatial reference of the view${r?`(wkid:${r})`:""}.`,{})}export{o as hasLayerBasedScaleVisibility,n as highlightsSupported,t as isInEffectiveScaleRange,c as isScaleRangeActive,u as isSelectableLayerView2D,i as occludeesSupported,r as scaleBoundsPredicate,l as spatialReferenceIncompatibleError,a as validateScaleRange};
package/views/ui/UI.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import"../../intl.js";import o from"../../core/Accessor.js";import{isSome as n}from"../../core/arrayUtils.js";import e from"../../core/Evented.js";import{makeHandle as i}from"../../core/handleUtils.js";import{watch as r,initial as s}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{cast as p}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{setCalciteModeClass as c}from"../../support/modeUtils.js";import l from"./Component.js";import{isRTL as h}from"../../widgets/support/widgetUtils.js";import{getLocale as m,onLocaleChange as u}from"../../intl/locale.js";const f={left:0,top:0,bottom:0,right:0},_={bottom:30,top:15,right:15,left:15},g="esri-ui",y={ui:g,corner:`${g}-corner`,innerContainer:`${g}-inner-container`,manualContainer:`${g}-manual-container`,cornerContainer:`${g}-corner-container`,topLeft:`${g}-top-left`,topRight:`${g}-top-right`,bottomLeft:`${g}-bottom-left`,bottomRight:`${g}-bottom-right`};function C(t){return t&&!t._started&&"function"==typeof t.postMixInProperties&&"function"==typeof t.buildRendering&&"function"==typeof t.postCreate&&"function"==typeof t.startup}function v(t){return 0===t?"0":`${t}px`}function b(t){const o="object"==typeof t&&null!==t&&Object.getPrototypeOf(t);return(null===o||o===Object.prototype)&&("component"in t||"index"in t||"position"in t)?t:null}function w(t,{top:o,bottom:n,left:e,right:i}){t.style.top=o,t.style.bottom=n,t.style.left=e,t.style.right=i}let P=class extends e.EventedAccessor{constructor(t){super(t),this._cornerNameToContainerLookup={},this._positionNameToContainerLookup={},this._components=new Array,this._componentMap=new Map,this._removeWidgetHandleKey=Symbol("componentOnRemoveSymbol"),this._locale=m(),this.view=null,this._applyViewPadding=()=>{const t=this.container;t&&w(t,this._toPixelPosition(this._getViewPadding()))},this._applyUIPadding=()=>{const t=this._innerContainer;t&&w(t,this._toPixelPosition(this.padding))},this._initContainers()}initialize(){this.addHandles([r((()=>[this.view?.padding,this.container]),this._applyViewPadding,s),r((()=>this.padding),this._applyUIPadding,s),r((()=>[this.container,this._locale]),(([t,o])=>{t&&t.setAttribute("lang",o)}),s),u((t=>{this._locale=t}))])}destroy(){this.container=null;for(const t of this._components)t.destroy();this._components.length=0,this._componentMap.clear()}set container(t){const o=this._get("container");t!==o&&(t&&(t.classList.add(y.ui),c(t),this._attachContainers(t)),o&&(o.classList.remove(y.ui),w(o,{top:"",bottom:"",left:"",right:""}),o.textContent=""),this._set("container",t))}get height(){const t=this.view?.height??0;if(0===t)return t;const o=this._getViewPadding(),{top:n,bottom:e}=o;return Math.max(t-n-e,0)}get padding(){return this._get("padding")}set padding(t){this._overrideIfSome("padding",t)}castPadding(t){return"number"==typeof t?{bottom:t,top:t,right:t,left:t}:{..._,...t}}get width(){const t=this.view?.width??0;if(0===t)return t;const o=this._getViewPadding(),{left:n,right:e}=o;return Math.max(t-n-e,0)}add(t,o){let n,e,i;if(Array.isArray(t))return void t.forEach((t=>this.add(t,o)));const r=b(t);r&&({index:n,position:o,component:t,key:e}=r),o&&"object"==typeof o&&({index:n,key:e,position:o,internal:i}=o),!t||o&&!this._isValidPosition(o)||this._add(t,o,n??this._components.length,e,i)}remove(t,o){if(!t)return;if(Array.isArray(t))return t.map((t=>this.remove(t,o)));const n=this._find(t);if(n){if(this._componentMap.has(n)&&this._componentMap.get(n)?.key!==o)return;const t=this._components.indexOf(n),e=n.node.parentNode;return e?.removeChild(n.node),this._componentMap.delete(n),n.widget?.removeHandlesReference(this._removeWidgetHandleKey),this._components.splice(t,1)[0]}}empty(t,o={removeInternal:!1}){if(Array.isArray(t)){for(const n of t)this.empty(n,o);return}const n=this._positionNameToContainerLookup[t??"manual"],e=Array.prototype.slice.call(n.children).map((t=>this._findByNode(t))).filter((t=>{if(null==t)return!1;return!(this._componentMap.get(t)?.internal??!1)||o.removeInternal}));for(const i of e)this.remove(i)}move(t,o){if(Array.isArray(t)&&t.forEach((t=>this.move(t,o))),!t)return;let n;const e=b(t)||b(o);if(e&&(n=e.index,o=e.position,t=e.component||t),o&&!this._isValidPosition(o))return;const i=this.remove(t);i&&this.add(i,{position:o,index:n})}find(t){if(!t)return null;const o=this._findById(t);return o&&(o.widget||o.node)}getComponents(t,o={includeInternal:!1}){return t?Array.isArray(t)?t.flatMap((t=>this._getComponentsAtPosition(t,o))):this._getComponentsAtPosition(t,o):this._components.filter((t=>o.includeInternal||!this._componentMap.get(t)?.internal)).map((({widget:t,node:o})=>t??o))}getPosition(t){for(const o in this._positionNameToContainerLookup){if(this._positionNameToContainerLookup[o].contains(t))return o}return null}_add(t,n,e,r,s){t instanceof l||(t=new l({node:t}));const{widget:a}=t;null!=a&&a instanceof o&&a.addHandles(i((()=>{queueMicrotask((()=>this.remove(t)))})),this._removeWidgetHandleKey),this._components.forEach((t=>{const o=this._componentMap.get(t);o&&o.index>=e&&o.index++})),this._place({component:t,position:n,index:e}),this._components.push(t),this._componentMap.set(t,{key:r,internal:s,index:e})}_find(t){return t?t instanceof l?this._findByComponent(t):"string"==typeof t?this._findById(t):this._findByNode(t.domNode||t):null}_getViewPadding(){return this.view?.padding??f}_attachContainers(t){t.appendChild(this._innerContainer),t.appendChild(this._manualContainer)}_initContainers(){const t=document.createElement("div");t.classList.add(y.innerContainer,y.cornerContainer);const o=document.createElement("div");o.classList.add(y.innerContainer,y.manualContainer);const n=document.createElement("div");n.classList.add(y.topLeft,y.corner),t.appendChild(n);const e=document.createElement("div");e.classList.add(y.topRight,y.corner),t.appendChild(e);const i=document.createElement("div");i.classList.add(y.bottomLeft,y.corner),t.appendChild(i);const r=document.createElement("div");r.classList.add(y.bottomRight,y.corner),t.appendChild(r),this._innerContainer=t,this._manualContainer=o;const s=h();this._cornerNameToContainerLookup={"top-left":n,"top-right":e,"bottom-left":i,"bottom-right":r,"top-leading":s?e:n,"top-trailing":s?n:e,"bottom-leading":s?r:i,"bottom-trailing":s?i:r},this._positionNameToContainerLookup={manual:o,...this._cornerNameToContainerLookup}}_isValidPosition(t){return!!this._positionNameToContainerLookup[t]}_place(t){const o=t.position??"manual",{component:n,index:e}=t,i=this._positionNameToContainerLookup[o],r=null!=e&&e>-1;if(C(n.widget)&&n.widget.startup(),!r)return void i.appendChild(n.node);const s=Array.from(i.children);if(0!==s.length){for(const t of s){const o=this._findByNode(t);if(o&&e<(this._componentMap.get(o)?.index??0))return void t.parentNode?.insertBefore(n.node,t)}i.appendChild(n.node)}else i.appendChild(n.node)}_toPixelPosition(t){return{top:v(t.top),left:v(t.left),right:v(t.right),bottom:v(t.bottom)}}_findByComponent(t){return this._components.find((o=>o===t))??null}_findById(t){return this._components.find((({id:o})=>o===t))??null}_findByNode(t){return this._components.find((({node:o})=>o===t))??null}_getComponentsAtPosition(t,o){const e=this._positionNameToContainerLookup[t];return Array.prototype.slice.call(e.children).map((t=>this._findByNode(t))).filter(n).filter((t=>o.includeInternal||!this._componentMap.get(t)?.internal)).map((({widget:t,node:o})=>t??o))}};t([a()],P.prototype,"_locale",void 0),t([a()],P.prototype,"container",null),t([a()],P.prototype,"height",null),t([a({value:_})],P.prototype,"padding",null),t([p("padding")],P.prototype,"castPadding",null),t([a()],P.prototype,"view",void 0),t([a()],P.prototype,"width",null),P=t([d("esri.views.ui.UI")],P);const L=P;export{L as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import"../../intl.js";import o from"../../core/Accessor.js";import{isSome as n}from"../../core/arrayUtils.js";import e from"../../core/Evented.js";import{makeHandle as i}from"../../core/handleUtils.js";import{watch as r,initial as s}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{cast as p}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{setCalciteModeClass as c}from"../../support/modeUtils.js";import l from"./Component.js";import{isRTL as m}from"../../widgets/support/widgetUtils.js";import{getLocale as h,onLocaleChange as u}from"../../intl/locale.js";const f={left:0,top:0,bottom:0,right:0},_={bottom:30,top:15,right:15,left:15},g="esri-ui",y={ui:g,corner:`${g}-corner`,innerContainer:`${g}-inner-container`,manualContainer:`${g}-manual-container`,cornerContainer:`${g}-corner-container`,topLeft:`${g}-top-left`,topRight:`${g}-top-right`,bottomLeft:`${g}-bottom-left`,bottomRight:`${g}-bottom-right`};function C(t){return t&&!t._started&&"function"==typeof t.postMixInProperties&&"function"==typeof t.buildRendering&&"function"==typeof t.postCreate&&"function"==typeof t.startup}function v(t){return 0===t?"0":`${t}px`}function b(t){const o="object"==typeof t&&null!==t&&Object.getPrototypeOf(t);return(null===o||o===Object.prototype)&&("component"in t||"index"in t||"position"in t)?t:null}function w(t,{top:o,bottom:n,left:e,right:i}){t.style.top=o,t.style.bottom=n,t.style.left=e,t.style.right=i}let P=class extends e.EventedAccessor{constructor(t){super(t),this._cornerNameToContainerLookup={},this._positionNameToContainerLookup={},this._components=new Array,this._componentMap=new Map,this._removeWidgetHandleKey=Symbol("componentOnRemoveSymbol"),this._locale=h(),this.view=null,this._applyViewPadding=()=>{const t=this.container;t&&w(t,this._toPixelPosition(this._getViewPadding()))},this._applyUIPadding=()=>{const t=this._innerContainer;t&&w(t,this._toPixelPosition(this.padding))},this._initContainers()}initialize(){this.addHandles([r((()=>[this.view?.padding,this.container]),this._applyViewPadding,s),r((()=>this.padding),this._applyUIPadding,s),r((()=>[this.container,this._locale]),(([t,o])=>{t&&t.setAttribute("lang",o)}),s),u((t=>{this._locale=t}))])}destroy(){this.container=null;for(const t of this._components)t.destroy();this._components.length=0,this._componentMap.clear()}set container(t){const o=this._get("container");t!==o&&(t&&(t.classList.add(y.ui),c(t),this._attachContainers(t)),o&&(o.classList.remove(y.ui),w(o,{top:"",bottom:"",left:"",right:""}),o.textContent=""),this._set("container",t))}get height(){const t=this.view?.height??0;if(0===t)return t;const o=this._getViewPadding(),{top:n,bottom:e}=o;return Math.max(t-n-e,0)}get padding(){return this._get("padding")}set padding(t){this._overrideIfSome("padding",t)}castPadding(t){return"number"==typeof t?{bottom:t,top:t,right:t,left:t}:{..._,...t}}get width(){const t=this.view?.width??0;if(0===t)return t;const o=this._getViewPadding(),{left:n,right:e}=o;return Math.max(t-n-e,0)}add(t,o){let n,e,i;if(Array.isArray(t))return void t.forEach((t=>this.add(t,o)));const r=b(t);r&&({index:n,position:o,component:t,key:e}=r),o&&"object"==typeof o&&({index:n,key:e,position:o,internal:i}=o),!t||o&&!this._isValidPosition(o)||this._add(t,o,n??this._getNumComponentsAtPosition(o),e,i)}remove(t,o){if(!t)return;if(Array.isArray(t))return t.map((t=>this.remove(t,o)));const n=this._find(t);if(n){if(this._componentMap.has(n)&&this._componentMap.get(n)?.key!==o)return;const t=this._components.indexOf(n),e=n.node.parentNode;return e?.removeChild(n.node),this._componentMap.delete(n),n.widget?.removeHandlesReference(this._removeWidgetHandleKey),this._components.splice(t,1)[0]}}empty(t,o={removeInternal:!1}){if(Array.isArray(t)){for(const n of t)this.empty(n,o);return}const n=this._positionNameToContainerLookup[t??"manual"],e=Array.prototype.slice.call(n.children).map((t=>this._findByNode(t))).filter((t=>{if(null==t)return!1;return!(this._componentMap.get(t)?.internal??!1)||o.removeInternal}));for(const i of e)this.remove(i)}move(t,o){if(Array.isArray(t)&&t.forEach((t=>this.move(t,o))),!t)return;let n;const e=b(t)||b(o);if(e&&(n=e.index,o=e.position,t=e.component||t),o&&!this._isValidPosition(o))return;const i=this.remove(t);i&&this.add(i,{position:o,index:n})}find(t){if(!t)return null;const o=this._findById(t);return o&&(o.widget||o.node)}getComponents(t,o={includeInternal:!1}){return t?Array.isArray(t)?t.flatMap((t=>this._getComponentsAtPosition(t,o))):this._getComponentsAtPosition(t,o):this._components.filter((t=>o.includeInternal||!this._componentMap.get(t)?.internal)).map((({widget:t,node:o})=>t??o))}getPosition(t){for(const o in this._positionNameToContainerLookup){if(this._positionNameToContainerLookup[o].contains(t))return o}return null}_add(t,n,e,r,s){t instanceof l||(t=new l({node:t}));const{widget:a}=t;null!=a&&a instanceof o&&a.addHandles(i((()=>{queueMicrotask((()=>this.remove(t)))})),this._removeWidgetHandleKey);this._components.some((t=>this._componentMap.get(t)?.position===n&&this._componentMap.get(t)?.index===e))&&this._components.forEach((t=>{const o=this._componentMap.get(t);o&&o.position===n&&o.index>=e&&o.index++})),this._place({component:t,position:n,index:e}),this._components.push(t),this._componentMap.set(t,{key:r,position:n,internal:s,index:e})}_find(t){return t?t instanceof l?this._findByComponent(t):"string"==typeof t?this._findById(t):this._findByNode(t.domNode||t):null}_getViewPadding(){return this.view?.padding??f}_attachContainers(t){t.appendChild(this._innerContainer),t.appendChild(this._manualContainer)}_initContainers(){const t=document.createElement("div");t.classList.add(y.innerContainer,y.cornerContainer);const o=document.createElement("div");o.classList.add(y.innerContainer,y.manualContainer);const n=document.createElement("div");n.classList.add(y.topLeft,y.corner),t.appendChild(n);const e=document.createElement("div");e.classList.add(y.topRight,y.corner),t.appendChild(e);const i=document.createElement("div");i.classList.add(y.bottomLeft,y.corner),t.appendChild(i);const r=document.createElement("div");r.classList.add(y.bottomRight,y.corner),t.appendChild(r),this._innerContainer=t,this._manualContainer=o;const s=m();this._cornerNameToContainerLookup={"top-left":n,"top-right":e,"bottom-left":i,"bottom-right":r,"top-leading":s?e:n,"top-trailing":s?n:e,"bottom-leading":s?r:i,"bottom-trailing":s?i:r},this._positionNameToContainerLookup={manual:o,...this._cornerNameToContainerLookup}}_isValidPosition(t){return!!this._positionNameToContainerLookup[t]}_place(t){const o=t.position??"manual",{component:n,index:e}=t,i=this._positionNameToContainerLookup[o],r=null!=e&&e>-1;if(C(n.widget)&&n.widget.startup(),!r)return void i.appendChild(n.node);const s=Array.from(i.children);if(0!==s.length){for(const t of s){const o=this._findByNode(t);if(o&&e<(this._componentMap.get(o)?.index??0))return void t.parentNode?.insertBefore(n.node,t)}i.appendChild(n.node)}else i.appendChild(n.node)}_toPixelPosition(t){return{top:v(t.top),left:v(t.left),right:v(t.right),bottom:v(t.bottom)}}_findByComponent(t){return this._components.find((o=>o===t))??null}_findById(t){return this._components.find((({id:o})=>o===t))??null}_findByNode(t){return this._components.find((({node:o})=>o===t))??null}_getComponentsAtPosition(t,o){const e=this._positionNameToContainerLookup[t];return Array.prototype.slice.call(e.children).map((t=>this._findByNode(t))).filter(n).filter((t=>o.includeInternal||!this._componentMap.get(t)?.internal)).map((({widget:t,node:o})=>t??o))}_getNumComponentsAtPosition(t){const o=this._positionNameToContainerLookup[t];return o?.children.length??0}};t([a()],P.prototype,"_locale",void 0),t([a()],P.prototype,"container",null),t([a()],P.prototype,"height",null),t([a({value:_})],P.prototype,"padding",null),t([p("padding")],P.prototype,"castPadding",null),t([a()],P.prototype,"view",void 0),t([a()],P.prototype,"width",null),P=t([d("esri.views.ui.UI")],P);const L=P;export{L as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import t from"../../core/Logger.js";import{disposeMaybe as e}from"../../core/maybe.js";import{BufferObject as r}from"./BufferObject.js";import{webglDebugEnabled as i}from"./checkWebGLError.js";import{ResourceType as s,ColorAttachment0 as h,TextureType as n,FramebufferTarget as o,UnsizedDepthFormat as c,PixelType as a,Usage as u,BufferType as f,SizedStencilFormat as l,StencilAttachment as _,SizedDepthStencilFormat as d,DepthStencilAttachment as m,SizedDepthFormat as T,DepthAttachment as p}from"./enums.js";import{FBOAttachmentType as E}from"./FBOAttachmentType.js";import{Renderbuffer as x}from"./Renderbuffer.js";import{Texture as b}from"./Texture.js";const g=()=>t.getLogger("esri.views.webgl.FramebufferObject");class R{constructor(t,e,r){if(this._context=t,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,t.instanceCounter.increment(s.FramebufferObject,this),null!=e){const r=S(e)?e:new b(t,e);this._colorAttachments.set(h,r),this._validateTextureDescriptor(r.descriptor),this._validateColorAttachmentPoint(h)}if(null!=r)if(A(r))this._depthStencilTexture=S(r)?r:new b(t,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=F(r)?r:new x(t,r);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}dispose(){const{_colorAttachments:t,_glName:e}=this;if(0===t.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!e)return;const{_context:r}=this,i=r.getBoundFramebufferObject();t.forEach(((t,e)=>this.detachColorTexture(e)?.dispose())),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),r.gl.deleteFramebuffer(e),this._glName=null,r.bindFramebuffer(i===this?null:i),r.instanceCounter.decrement(s.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){return this._colorAttachments.get(h)}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(h)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(h)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce(((t,[e,r])=>t+r.usedMemory),this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&S(e)?e:null}get colorAttachments(){return[...this._colorAttachments.keys()]}attachColorTexture(t,e=h){if(!t)return;this._validateColorAttachmentPoint(e);const{descriptor:r}=t;this._validateTextureDescriptor(r),this.detachColorTexture(e)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e)),this._colorAttachments.set(e,t)}detachColorTexture(t=h){const e=this._colorAttachments.get(t);if(e)return this._initialized&&this._context.temporaryBindFramebufferObject(this,(()=>{this._framebufferTexture2D(null,t)})),this._colorAttachments.delete(t),e}setColorTextureTarget(t,e=h,r=0){const i=this._colorAttachments.get(e);i&&(t===n.TEXTURE_2D_ARRAY?this._framebufferTextureLayer(i.glName,e,o.FRAMEBUFFER,0,r):this._framebufferTexture2D(i.glName,e,t,o.FRAMEBUFFER,0))}attachDepthStencil(t){if(t)switch(t.type){case E.Texture:return this._attachDepthStencilTexture(t);case E.Renderbuffer:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:r,dataType:i}=e;r===c.DEPTH_STENCIL||r===c.DEPTH_COMPONENT?r!==c.DEPTH_STENCIL||i===a.UNSIGNED_INT_24_8?r!==c.DEPTH_COMPONENT||i===a.UNSIGNED_INT||i===a.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,O(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._initialized&&this._context.temporaryBindFramebufferObject(this,(()=>{this._framebufferTexture2D(null,O(t.descriptor.pixelFormat))})),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(e);r.framebufferRenderbuffer(o.FRAMEBUFFER,i,r.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._initialized){const{_context:e}=this,r=e.getBoundFramebufferObject();e.bindFramebuffer(this);const{gl:i}=e,s=this._getGLAttachmentPoint(t.descriptor);i.framebufferRenderbuffer(o.FRAMEBUFFER,s,i.RENDERBUFFER,null),e.bindFramebuffer(r)}return this._depthStencilBuffer=null,t}invalidateAttachments(t){const{_context:e}=this;e.temporaryBindFramebufferObject(this,(()=>e.gl.invalidateFramebuffer(o.FRAMEBUFFER,t)),!0)}copyToTexture(t,e,r,i,s,h,o){(t<0||e<0||s<0||h<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const c=o.descriptor;o.descriptor.target!==n.TEXTURE_2D&&console.error("Texture target must be TEXTURE_2D!"),(null==c?.width||null==c?.height||t+r>this.width||e+i>this.height||s+r>c.width||h+i>c.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const a=this._context,u=a.bindTexture(o,b.TEXTURE_UNIT_FOR_UPDATES);a.setActiveTexture(b.TEXTURE_UNIT_FOR_UPDATES),a.bindFramebuffer(this),a.gl.copyTexSubImage2D(n.TEXTURE_2D,0,s,h,t,e,r,i),a.bindTexture(u,b.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,r,i,s,h,n){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),n||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,r,i,s,h,n)}async readPixelsAsync(t,e,i,s,h,n,o){const{gl:c}=this._context,a=r.createPixelPack(this._context,u.STREAM_READ,o.byteLength);this._context.bindBuffer(a);const l=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),c.readPixels(t,e,i,s,h,n,0),this._context.unbindBuffer(f.PIXEL_PACK_BUFFER),this._context.bindFramebuffer(l),await a.getSubDataAsync(o),a.dispose()}resize(t,e){if(this.width===t&&this.height===e)return;const r={width:t,height:e};B(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach((t=>t.resize(r.width,r.height))),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(B(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1)}initializeAndBind(t=o.FRAMEBUFFER){const{gl:e}=this._context;if(this._initialized)return void e.bindFramebuffer(t,this.glName);this._glName&&e.deleteFramebuffer(this._glName);const r=e.createFramebuffer();if(e.bindFramebuffer(t,r),this._colorAttachments.forEach(((e,r)=>{const i=U(e);i===n.TEXTURE_2D_ARRAY?this._framebufferTextureLayer(e.glName,r,t,0,0):this._framebufferTexture2D(e.glName,r,i,t)})),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,r,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=O(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,U(this._depthStencilTexture),t)}if(i()){e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=r,this._initialized=!0}_framebufferTexture2D(t,e=h,r=n.TEXTURE_2D,i=o.FRAMEBUFFER,s=0){this._context.gl.framebufferTexture2D(i,e,r,t,s)}_framebufferTextureLayer(t,e=h,r=o.FRAMEBUFFER,i=0,s=0){this._context.gl.framebufferTextureLayer(r,e,t,i,s)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(o.FRAMEBUFFER,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=e(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,O(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=e(this._depthStencilTexture))}_validateTextureDescriptor(t){t.target!==n.TEXTURE_2D&&t.target!==n.TEXTURE_CUBE_MAP&&t.target!==n.TEXTURE_2D_ARRAY&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),B(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){B(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case T.DEPTH_COMPONENT16:case T.DEPTH_COMPONENT24:case T.DEPTH_COMPONENT32F:return p;case d.DEPTH24_STENCIL8:case d.DEPTH32F_STENCIL8:return m;case l.STENCIL_INDEX8:return _}}_validateColorAttachmentPoint(e){if(-1===R._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;R._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const r=e-h;r+1>R._MAX_COLOR_ATTACHMENTS&&t.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${r+1}. Implementation supports up to ${R._MAX_COLOR_ATTACHMENTS} color attachments`)}}function S(t){return N(t)===E.Texture}function F(t){return N(t)===E.Renderbuffer}function A(t){return S(t)||D(t)}function D(t){return N(t)===E.TextureDescriptor}function N(t){return null!=t&&"type"in t?t.type:null}function B(t,e){const r=Math.max(t.width,t.height);if(r>e){g().warn(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const i=e/r;return t.width=Math.round(t.width*i),t.height=Math.round(t.height*i),!1}return!0}function U(t){return t.descriptor.target===n.TEXTURE_CUBE_MAP?n.TEXTURE_CUBE_MAP_POSITIVE_X:t.descriptor.target===n.TEXTURE_2D_ARRAY?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function O(t){return t===c.DEPTH_COMPONENT?p:m}export{R as FramebufferObject,B as ensureAttachmentMaxSize};
5
+ import"../../core/has.js";import t from"../../core/Logger.js";import{disposeMaybe as e}from"../../core/maybe.js";import{BufferObject as r}from"./BufferObject.js";import{webglDebugEnabled as i}from"./checkWebGLError.js";import{ResourceType as s,ColorAttachment0 as n,TextureType as h,FramebufferTarget as o,UnsizedDepthFormat as c,PixelType as a,Usage as u,BufferType as f,SizedStencilFormat as l,StencilAttachment as _,SizedDepthStencilFormat as d,DepthStencilAttachment as m,SizedDepthFormat as T,DepthAttachment as p}from"./enums.js";import{FBOAttachmentType as E}from"./FBOAttachmentType.js";import{Renderbuffer as x}from"./Renderbuffer.js";import{Texture as b}from"./Texture.js";const g=()=>t.getLogger("esri.views.webgl.FramebufferObject");class R{constructor(t,e,r){if(this._context=t,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,t.instanceCounter.increment(s.FramebufferObject,this),null!=e){const r=S(e)?e:new b(t,e);this._colorAttachments.set(n,r),this._validateTextureDescriptor(r.descriptor),this._validateColorAttachmentPoint(n)}if(null!=r)if(A(r))this._depthStencilTexture=S(r)?r:new b(t,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=F(r)?r:new x(t,r);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}dispose(){const{_colorAttachments:t,_glName:e}=this;if(0===t.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!e)return;const{_context:r}=this,i=r.getBoundFramebufferObject();t.forEach(((t,e)=>this.detachColorTexture(e)?.dispose())),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),r.gl.deleteFramebuffer(e),this._glName=null,r.bindFramebuffer(i===this?null:i),r.instanceCounter.decrement(s.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){return this._colorAttachments.get(n)}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce(((t,[e,r])=>t+r.usedMemory),this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&S(e)?e:null}get colorAttachments(){return[...this._colorAttachments.keys()]}attachColorTexture(t,e=n){if(!t)return;this._validateColorAttachmentPoint(e);const{descriptor:r}=t;this._validateTextureDescriptor(r),this.detachColorTexture(e)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e)),this._colorAttachments.set(e,t)}detachColorTexture(t=n){const e=this._colorAttachments.get(t);if(e)return this._initialized&&this._context.temporaryBindFramebufferObject(this,(()=>{this._framebufferTexture2D(null,t)})),this._colorAttachments.delete(t),e}setColorTextureTarget(t,e=n,r=0){const i=this._colorAttachments.get(e);i&&(t===h.TEXTURE_2D_ARRAY?this._framebufferTextureLayer(i.glName,e,o.FRAMEBUFFER,0,r):this._framebufferTexture2D(i.glName,e,t,o.FRAMEBUFFER,0))}attachDepthStencil(t){if(t)switch(t.type){case E.Texture:return this._attachDepthStencilTexture(t);case E.Renderbuffer:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:r,dataType:i}=e;r===c.DEPTH_STENCIL||r===c.DEPTH_COMPONENT?r!==c.DEPTH_STENCIL||i===a.UNSIGNED_INT_24_8?r!==c.DEPTH_COMPONENT||i===a.UNSIGNED_INT||i===a.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,O(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._initialized&&this._context.temporaryBindFramebufferObject(this,(()=>{this._framebufferTexture2D(null,O(t.descriptor.pixelFormat))})),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(e);r.framebufferRenderbuffer(o.FRAMEBUFFER,i,r.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._initialized){const{_context:e}=this,r=e.getBoundFramebufferObject();e.bindFramebuffer(this);const{gl:i}=e,s=this._getGLAttachmentPoint(t.descriptor);i.framebufferRenderbuffer(o.FRAMEBUFFER,s,i.RENDERBUFFER,null),e.bindFramebuffer(r)}return this._depthStencilBuffer=null,t}invalidateAttachments(t){const{_context:e}=this;e.temporaryBindFramebufferObject(this,(()=>e.gl.invalidateFramebuffer(o.FRAMEBUFFER,t)),!0)}copyToTexture(t,e,r,i,s,n,o){(t<0||e<0||s<0||n<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const c=o.descriptor;o.descriptor.target!==h.TEXTURE_2D&&console.error("Texture target must be TEXTURE_2D!"),(null==c?.width||null==c?.height||t+r>this.width||e+i>this.height||s+r>c.width||n+i>c.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const a=this._context,u=a.bindTexture(o,b.TEXTURE_UNIT_FOR_UPDATES);a.setActiveTexture(b.TEXTURE_UNIT_FOR_UPDATES),a.bindFramebuffer(this),a.gl.copyTexSubImage2D(h.TEXTURE_2D,0,s,n,t,e,r,i),a.bindTexture(u,b.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,r,i,s,n,h){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),h||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,r,i,s,n,h)}async readPixelsAsync(t,e,i,s,n,h,o){const{gl:c}=this._context,a=r.createPixelPack(this._context,u.STREAM_READ,o.byteLength);this._context.bindBuffer(a);const l=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),c.readPixels(t,e,i,s,n,h,0),this._context.unbindBuffer(f.PIXEL_PACK_BUFFER),this._context.bindFramebuffer(l),await a.getSubDataAsync(o),a.dispose()}resize(t,e){if(this.width===t&&this.height===e)return;const r={width:t,height:e};B(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach((t=>t.resize(r.width,r.height))),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(B(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1)}initializeAndBind(t=o.FRAMEBUFFER){const{gl:e}=this._context;if(this._initialized)return void e.bindFramebuffer(t,this.glName);this._glName&&e.deleteFramebuffer(this._glName);const r=e.createFramebuffer();if(e.bindFramebuffer(t,r),this._colorAttachments.forEach(((e,r)=>{const i=U(e);i===h.TEXTURE_2D_ARRAY?this._framebufferTextureLayer(e.glName,r,t,0,0):this._framebufferTexture2D(e.glName,r,i,t)})),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,r,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=O(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,U(this._depthStencilTexture),t)}if(i()){e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=r,this._initialized=!0}_framebufferTexture2D(t,e=n,r=h.TEXTURE_2D,i=o.FRAMEBUFFER,s=0){this._context.gl.framebufferTexture2D(i,e,r,t,s)}_framebufferTextureLayer(t,e=n,r=o.FRAMEBUFFER,i=0,s=0){this._context.gl.framebufferTextureLayer(r,e,t,i,s)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(o.FRAMEBUFFER,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=e(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,O(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=e(this._depthStencilTexture))}_validateTextureDescriptor(t){t.target!==h.TEXTURE_2D&&t.target!==h.TEXTURE_CUBE_MAP&&t.target!==h.TEXTURE_2D_ARRAY&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),B(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){B(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case T.DEPTH_COMPONENT16:case T.DEPTH_COMPONENT24:case T.DEPTH_COMPONENT32F:return p;case d.DEPTH24_STENCIL8:case d.DEPTH32F_STENCIL8:return m;case l.STENCIL_INDEX8:return _}}_validateColorAttachmentPoint(e){if(-1===R._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;R._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const r=e-n;r+1>R._MAX_COLOR_ATTACHMENTS&&t.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${r+1}. Implementation supports up to ${R._MAX_COLOR_ATTACHMENTS} color attachments`)}}function S(t){return N(t)===E.Texture}function F(t){return N(t)===E.Renderbuffer}function A(t){return S(t)||D(t)}function D(t){return N(t)===E.TextureDescriptor}function N(t){return null!=t&&"type"in t?t.type:null}function B(t,e){const r=Math.max(t.width,t.height);if(r>e){g().warnOnce(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const i=e/r;return t.width=Math.round(t.width*i),t.height=Math.round(t.height*i),!1}return!0}function U(t){return t.descriptor.target===h.TEXTURE_CUBE_MAP?h.TEXTURE_CUBE_MAP_POSITIVE_X:t.descriptor.target===h.TEXTURE_2D_ARRAY?h.TEXTURE_2D_ARRAY:h.TEXTURE_2D}function O(t){return t===c.DEPTH_COMPONENT?p:m}export{R as FramebufferObject,B as ensureAttachmentMaxSize};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- class e{constructor(e,t,r){const a=t.textureFilterAnisotropic;this.versionString=e.getParameter(e.VERSION),this.maxVertexTextureImageUnits=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),this.maxVertexAttributes=e.getParameter(e.MAX_VERTEX_ATTRIBS);const m=r.maxAnisotropy??1/0;this.maxMaxAnisotropy=a?Math.min(e.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY),m):1,this.maxTextureImageUnits=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE);const i=r.maxPreferredTextureSize??1/0;this.maxPreferredTextureSize=Math.min(i,this.maxTextureSize),this.maxRenderbufferSize=e.getParameter(e.MAX_RENDERBUFFER_SIZE),this.maxViewportDims=e.getParameter(e.MAX_VIEWPORT_DIMS),this.maxUniformBufferBindings=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS),this.maxVertexUniformBlocks=e.getParameter(e.MAX_VERTEX_UNIFORM_BLOCKS),this.maxFragmentUniformBlocks=e.getParameter(e.MAX_FRAGMENT_UNIFORM_BLOCKS),this.maxUniformBlockSize=e.getParameter(e.MAX_UNIFORM_BLOCK_SIZE),this.uniformBufferOffsetAlignment=e.getParameter(e.UNIFORM_BUFFER_OFFSET_ALIGNMENT),this.maxArrayTextureLayers=e.getParameter(e.MAX_ARRAY_TEXTURE_LAYERS),this.maxSamples=e.getParameter(e.MAX_SAMPLES),this.maxDrawBuffers=e.getParameter(e.MAX_DRAW_BUFFERS)}}export{e as Parameters};
5
+ class e{constructor(e,t,r){const a=t.textureFilterAnisotropic;this.versionString=e.getParameter(e.VERSION),this.maxVertexTextureImageUnits=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),this.maxVertexAttributes=e.getParameter(e.MAX_VERTEX_ATTRIBS);const m=r.maxAnisotropy??1/0;this.maxMaxAnisotropy=a?Math.min(e.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY),m):1,this.maxTextureImageUnits=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),this.maxPreferredTexturePixels=r.maxPreferredTexturePixels??1/0,this.maxRenderbufferSize=e.getParameter(e.MAX_RENDERBUFFER_SIZE),this.maxViewportDims=e.getParameter(e.MAX_VIEWPORT_DIMS),this.maxUniformBufferBindings=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS),this.maxVertexUniformBlocks=e.getParameter(e.MAX_VERTEX_UNIFORM_BLOCKS),this.maxFragmentUniformBlocks=e.getParameter(e.MAX_FRAGMENT_UNIFORM_BLOCKS),this.maxUniformBlockSize=e.getParameter(e.MAX_UNIFORM_BLOCK_SIZE),this.uniformBufferOffsetAlignment=e.getParameter(e.UNIFORM_BUFFER_OFFSET_ALIGNMENT),this.maxArrayTextureLayers=e.getParameter(e.MAX_ARRAY_TEXTURE_LAYERS),this.maxSamples=e.getParameter(e.MAX_SAMPLES),this.maxDrawBuffers=e.getParameter(e.MAX_DRAW_BUFFERS)}}export{e as Parameters};