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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/AggregateGraphic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{9f31ab2247c9defb882c.js → 01ac91fc0bc6b4d4e3c6.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{8588cbecb8e808f451fe.js → 249e32af1f2d433fae4c.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{5b16b30ac3166f33e81e.js → 26690f4ec1f3cb8099c2.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{be93b0cef85665446944.js → 274b4cdf6c8d77e8a2e6.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{d5650f455ce5ba15ad10.js → 2cae0ec5f60ab42a49aa.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{f436c86f86236ea7ea04.js → 4641e10e0e8e9d257521.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{7a45333de9ded92619c2.js → 466008f793c2e11e854c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{c9d655675552dcf6cef7.js → 4a699b41072ee88f0956.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{14ea96e398f4842abe4e.js → 4fdd18f5cdaa0d82ebc1.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{9662da3e1e37f3445186.js → 562b9619b8ee13734813.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{8bab21bc6164a593278f.js → 771b92e524802de840ba.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{4969b64dc17378d7781f.js → 7ce250cc6fbe68aef50d.js} +3 -3
  15. package/assets/esri/core/workers/chunks/{2c4938512dd726a177dd.js → 7fab18074b130b71a648.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{f67357b3c6c591c9da5e.js → 872f1cb3596fb80e387f.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{31de71018575457155e5.js → 8ee3da8677255b8c8709.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{2e44aee22e70857b893c.js → 93631b10452b0e0189b3.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{cb2dc84d972469445da6.js → 95cd9edca50ea163d50f.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{d31bbb13af45ce8e45dc.js → acf9f753741b677afb44.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{1455944edeba1560eb07.js → afdafa77f5ca1b9e3acc.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{cf3e1ac63580bc495ea6.js → b4da35f1093f3731f9ac.js} +1 -1
  23. package/assets/esri/core/workers/chunks/bb0d86937faf0cd7d16d.js +1 -0
  24. package/assets/esri/core/workers/chunks/bf3e80023e156d5906c7.js +1 -0
  25. package/assets/esri/core/workers/chunks/{8ba83fee56dd4f306d87.js → c2a6ac7046134f725cf3.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{5d3fabe66e1bce1b30fb.js → cc7569489b572b8b3b53.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{fddd4ea487788e003fb1.js → d09f06eb4157a7c2c8ab.js} +1 -1
  28. package/assets/esri/core/workers/chunks/e064035f959d68e9603f.js +1 -0
  29. package/assets/esri/core/workers/chunks/{d92975e56a1290255252.js → e09df62cf35d636b0975.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{674fa5b93704ef08c9e8.js → e0c763e05feb1c2093ba.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{51289d2f5277af4023e9.js → ed33e019bc7775db2e50.js} +1 -1
  32. package/assets/esri/core/workers/chunks/ef95d6ab7b1c032ab4ad.js +1 -0
  33. package/assets/esri/core/workers/chunks/{169f4354a375db5de121.js → ffcbcb928b6cb8c596ad.js} +1 -1
  34. package/assets/esri/t9n/common_ar.json +1 -1
  35. package/assets/esri/t9n/common_bg.json +1 -1
  36. package/assets/esri/t9n/common_bs.json +1 -1
  37. package/assets/esri/t9n/common_ca.json +1 -1
  38. package/assets/esri/t9n/common_cs.json +1 -1
  39. package/assets/esri/t9n/common_da.json +1 -1
  40. package/assets/esri/t9n/common_de.json +1 -1
  41. package/assets/esri/t9n/common_el.json +1 -1
  42. package/assets/esri/t9n/common_es.json +1 -1
  43. package/assets/esri/t9n/common_et.json +1 -1
  44. package/assets/esri/t9n/common_fi.json +1 -1
  45. package/assets/esri/t9n/common_fr.json +1 -1
  46. package/assets/esri/t9n/common_he.json +1 -1
  47. package/assets/esri/t9n/common_hr.json +1 -1
  48. package/assets/esri/t9n/common_hu.json +1 -1
  49. package/assets/esri/t9n/common_id.json +1 -1
  50. package/assets/esri/t9n/common_it.json +1 -1
  51. package/assets/esri/t9n/common_ja.json +1 -1
  52. package/assets/esri/t9n/common_ko.json +1 -1
  53. package/assets/esri/t9n/common_lt.json +1 -1
  54. package/assets/esri/t9n/common_lv.json +1 -1
  55. package/assets/esri/t9n/common_nb.json +1 -1
  56. package/assets/esri/t9n/common_nl.json +1 -1
  57. package/assets/esri/t9n/common_pl.json +1 -1
  58. package/assets/esri/t9n/common_pt-BR.json +1 -1
  59. package/assets/esri/t9n/common_pt-PT.json +1 -1
  60. package/assets/esri/t9n/common_ro.json +1 -1
  61. package/assets/esri/t9n/common_ru.json +1 -1
  62. package/assets/esri/t9n/common_sk.json +1 -1
  63. package/assets/esri/t9n/common_sl.json +1 -1
  64. package/assets/esri/t9n/common_sr.json +1 -1
  65. package/assets/esri/t9n/common_sv.json +1 -1
  66. package/assets/esri/t9n/common_th.json +1 -1
  67. package/assets/esri/t9n/common_tr.json +1 -1
  68. package/assets/esri/t9n/common_uk.json +1 -1
  69. package/assets/esri/t9n/common_vi.json +1 -1
  70. package/assets/esri/t9n/common_zh-CN.json +1 -1
  71. package/assets/esri/t9n/common_zh-HK.json +1 -1
  72. package/assets/esri/t9n/common_zh-TW.json +1 -1
  73. package/assets/esri/widgets/Feature/t9n/Feature_ar.json +1 -1
  74. package/assets/esri/widgets/Feature/t9n/Feature_bg.json +1 -1
  75. package/assets/esri/widgets/Feature/t9n/Feature_bs.json +1 -1
  76. package/assets/esri/widgets/Feature/t9n/Feature_ca.json +1 -1
  77. package/assets/esri/widgets/Feature/t9n/Feature_cs.json +1 -1
  78. package/assets/esri/widgets/Feature/t9n/Feature_da.json +1 -1
  79. package/assets/esri/widgets/Feature/t9n/Feature_de.json +1 -1
  80. package/assets/esri/widgets/Feature/t9n/Feature_el.json +1 -1
  81. package/assets/esri/widgets/Feature/t9n/Feature_es.json +1 -1
  82. package/assets/esri/widgets/Feature/t9n/Feature_et.json +1 -1
  83. package/assets/esri/widgets/Feature/t9n/Feature_fi.json +1 -1
  84. package/assets/esri/widgets/Feature/t9n/Feature_fr.json +1 -1
  85. package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
  86. package/assets/esri/widgets/Feature/t9n/Feature_hr.json +1 -1
  87. package/assets/esri/widgets/Feature/t9n/Feature_hu.json +1 -1
  88. package/assets/esri/widgets/Feature/t9n/Feature_id.json +1 -1
  89. package/assets/esri/widgets/Feature/t9n/Feature_it.json +1 -1
  90. package/assets/esri/widgets/Feature/t9n/Feature_ja.json +1 -1
  91. package/assets/esri/widgets/Feature/t9n/Feature_ko.json +1 -1
  92. package/assets/esri/widgets/Feature/t9n/Feature_lt.json +1 -1
  93. package/assets/esri/widgets/Feature/t9n/Feature_lv.json +1 -1
  94. package/assets/esri/widgets/Feature/t9n/Feature_nb.json +1 -1
  95. package/assets/esri/widgets/Feature/t9n/Feature_nl.json +1 -1
  96. package/assets/esri/widgets/Feature/t9n/Feature_pl.json +1 -1
  97. package/assets/esri/widgets/Feature/t9n/Feature_pt-BR.json +1 -1
  98. package/assets/esri/widgets/Feature/t9n/Feature_pt-PT.json +1 -1
  99. package/assets/esri/widgets/Feature/t9n/Feature_ro.json +1 -1
  100. package/assets/esri/widgets/Feature/t9n/Feature_ru.json +1 -1
  101. package/assets/esri/widgets/Feature/t9n/Feature_sk.json +1 -1
  102. package/assets/esri/widgets/Feature/t9n/Feature_sl.json +1 -1
  103. package/assets/esri/widgets/Feature/t9n/Feature_sr.json +1 -1
  104. package/assets/esri/widgets/Feature/t9n/Feature_sv.json +1 -1
  105. package/assets/esri/widgets/Feature/t9n/Feature_th.json +1 -1
  106. package/assets/esri/widgets/Feature/t9n/Feature_tr.json +1 -1
  107. package/assets/esri/widgets/Feature/t9n/Feature_uk.json +1 -1
  108. package/assets/esri/widgets/Feature/t9n/Feature_vi.json +1 -1
  109. package/assets/esri/widgets/Feature/t9n/Feature_zh-CN.json +1 -1
  110. package/assets/esri/widgets/Feature/t9n/Feature_zh-HK.json +1 -1
  111. package/assets/esri/widgets/Feature/t9n/Feature_zh-TW.json +1 -1
  112. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  113. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  114. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  115. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  116. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  117. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  118. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  119. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  120. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  121. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  122. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  123. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  124. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  125. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  126. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  127. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  128. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  129. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  130. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  131. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  132. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  133. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nb.json +1 -1
  134. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  135. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  136. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  137. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  138. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  139. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  140. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  141. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  142. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  143. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  144. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  145. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  146. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  147. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  148. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  149. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  150. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  151. package/assets/esri/widgets/Popup/t9n/Popup_ar.json +1 -1
  152. package/assets/esri/widgets/Popup/t9n/Popup_bg.json +1 -1
  153. package/assets/esri/widgets/Popup/t9n/Popup_bs.json +1 -1
  154. package/assets/esri/widgets/Popup/t9n/Popup_ca.json +1 -1
  155. package/assets/esri/widgets/Popup/t9n/Popup_cs.json +1 -1
  156. package/assets/esri/widgets/Popup/t9n/Popup_da.json +1 -1
  157. package/assets/esri/widgets/Popup/t9n/Popup_de.json +1 -1
  158. package/assets/esri/widgets/Popup/t9n/Popup_el.json +1 -1
  159. package/assets/esri/widgets/Popup/t9n/Popup_es.json +1 -1
  160. package/assets/esri/widgets/Popup/t9n/Popup_et.json +1 -1
  161. package/assets/esri/widgets/Popup/t9n/Popup_fi.json +1 -1
  162. package/assets/esri/widgets/Popup/t9n/Popup_fr.json +1 -1
  163. package/assets/esri/widgets/Popup/t9n/Popup_he.json +1 -1
  164. package/assets/esri/widgets/Popup/t9n/Popup_hr.json +1 -1
  165. package/assets/esri/widgets/Popup/t9n/Popup_hu.json +1 -1
  166. package/assets/esri/widgets/Popup/t9n/Popup_id.json +1 -1
  167. package/assets/esri/widgets/Popup/t9n/Popup_it.json +1 -1
  168. package/assets/esri/widgets/Popup/t9n/Popup_ja.json +1 -1
  169. package/assets/esri/widgets/Popup/t9n/Popup_ko.json +1 -1
  170. package/assets/esri/widgets/Popup/t9n/Popup_lt.json +1 -1
  171. package/assets/esri/widgets/Popup/t9n/Popup_lv.json +1 -1
  172. package/assets/esri/widgets/Popup/t9n/Popup_nb.json +1 -1
  173. package/assets/esri/widgets/Popup/t9n/Popup_nl.json +1 -1
  174. package/assets/esri/widgets/Popup/t9n/Popup_pl.json +1 -1
  175. package/assets/esri/widgets/Popup/t9n/Popup_pt-BR.json +1 -1
  176. package/assets/esri/widgets/Popup/t9n/Popup_pt-PT.json +1 -1
  177. package/assets/esri/widgets/Popup/t9n/Popup_ro.json +1 -1
  178. package/assets/esri/widgets/Popup/t9n/Popup_ru.json +1 -1
  179. package/assets/esri/widgets/Popup/t9n/Popup_sk.json +1 -1
  180. package/assets/esri/widgets/Popup/t9n/Popup_sl.json +1 -1
  181. package/assets/esri/widgets/Popup/t9n/Popup_sr.json +1 -1
  182. package/assets/esri/widgets/Popup/t9n/Popup_sv.json +1 -1
  183. package/assets/esri/widgets/Popup/t9n/Popup_th.json +1 -1
  184. package/assets/esri/widgets/Popup/t9n/Popup_tr.json +1 -1
  185. package/assets/esri/widgets/Popup/t9n/Popup_uk.json +1 -1
  186. package/assets/esri/widgets/Popup/t9n/Popup_vi.json +1 -1
  187. package/assets/esri/widgets/Popup/t9n/Popup_zh-CN.json +1 -1
  188. package/assets/esri/widgets/Popup/t9n/Popup_zh-HK.json +1 -1
  189. package/assets/esri/widgets/Popup/t9n/Popup_zh-TW.json +1 -1
  190. package/assets/esri/widgets/support/t9n/DatePicker_ar.json +1 -1
  191. package/assets/esri/widgets/support/t9n/DatePicker_bg.json +1 -1
  192. package/assets/esri/widgets/support/t9n/DatePicker_bs.json +1 -1
  193. package/assets/esri/widgets/support/t9n/DatePicker_ca.json +1 -1
  194. package/assets/esri/widgets/support/t9n/DatePicker_cs.json +1 -1
  195. package/assets/esri/widgets/support/t9n/DatePicker_da.json +1 -1
  196. package/assets/esri/widgets/support/t9n/DatePicker_de.json +1 -1
  197. package/assets/esri/widgets/support/t9n/DatePicker_el.json +1 -1
  198. package/assets/esri/widgets/support/t9n/DatePicker_es.json +1 -1
  199. package/assets/esri/widgets/support/t9n/DatePicker_et.json +1 -1
  200. package/assets/esri/widgets/support/t9n/DatePicker_fi.json +1 -1
  201. package/assets/esri/widgets/support/t9n/DatePicker_fr.json +1 -1
  202. package/assets/esri/widgets/support/t9n/DatePicker_he.json +1 -1
  203. package/assets/esri/widgets/support/t9n/DatePicker_hr.json +1 -1
  204. package/assets/esri/widgets/support/t9n/DatePicker_hu.json +1 -1
  205. package/assets/esri/widgets/support/t9n/DatePicker_id.json +1 -1
  206. package/assets/esri/widgets/support/t9n/DatePicker_it.json +1 -1
  207. package/assets/esri/widgets/support/t9n/DatePicker_ja.json +1 -1
  208. package/assets/esri/widgets/support/t9n/DatePicker_ko.json +1 -1
  209. package/assets/esri/widgets/support/t9n/DatePicker_lt.json +1 -1
  210. package/assets/esri/widgets/support/t9n/DatePicker_lv.json +1 -1
  211. package/assets/esri/widgets/support/t9n/DatePicker_nb.json +1 -1
  212. package/assets/esri/widgets/support/t9n/DatePicker_nl.json +1 -1
  213. package/assets/esri/widgets/support/t9n/DatePicker_pl.json +1 -1
  214. package/assets/esri/widgets/support/t9n/DatePicker_pt-BR.json +1 -1
  215. package/assets/esri/widgets/support/t9n/DatePicker_pt-PT.json +1 -1
  216. package/assets/esri/widgets/support/t9n/DatePicker_ro.json +1 -1
  217. package/assets/esri/widgets/support/t9n/DatePicker_ru.json +1 -1
  218. package/assets/esri/widgets/support/t9n/DatePicker_sk.json +1 -1
  219. package/assets/esri/widgets/support/t9n/DatePicker_sl.json +1 -1
  220. package/assets/esri/widgets/support/t9n/DatePicker_sr.json +1 -1
  221. package/assets/esri/widgets/support/t9n/DatePicker_sv.json +1 -1
  222. package/assets/esri/widgets/support/t9n/DatePicker_th.json +1 -1
  223. package/assets/esri/widgets/support/t9n/DatePicker_tr.json +1 -1
  224. package/assets/esri/widgets/support/t9n/DatePicker_uk.json +1 -1
  225. package/assets/esri/widgets/support/t9n/DatePicker_vi.json +1 -1
  226. package/assets/esri/widgets/support/t9n/DatePicker_zh-CN.json +1 -1
  227. package/assets/esri/widgets/support/t9n/DatePicker_zh-HK.json +1 -1
  228. package/assets/esri/widgets/support/t9n/DatePicker_zh-TW.json +1 -1
  229. package/assets/esri/widgets/support/t9n/TimePicker_ar.json +1 -1
  230. package/assets/esri/widgets/support/t9n/TimePicker_bg.json +1 -1
  231. package/assets/esri/widgets/support/t9n/TimePicker_bs.json +1 -1
  232. package/assets/esri/widgets/support/t9n/TimePicker_ca.json +1 -1
  233. package/assets/esri/widgets/support/t9n/TimePicker_cs.json +1 -1
  234. package/assets/esri/widgets/support/t9n/TimePicker_da.json +1 -1
  235. package/assets/esri/widgets/support/t9n/TimePicker_de.json +1 -1
  236. package/assets/esri/widgets/support/t9n/TimePicker_el.json +1 -1
  237. package/assets/esri/widgets/support/t9n/TimePicker_es.json +1 -1
  238. package/assets/esri/widgets/support/t9n/TimePicker_et.json +1 -1
  239. package/assets/esri/widgets/support/t9n/TimePicker_fi.json +1 -1
  240. package/assets/esri/widgets/support/t9n/TimePicker_fr.json +1 -1
  241. package/assets/esri/widgets/support/t9n/TimePicker_he.json +1 -1
  242. package/assets/esri/widgets/support/t9n/TimePicker_hr.json +1 -1
  243. package/assets/esri/widgets/support/t9n/TimePicker_hu.json +1 -1
  244. package/assets/esri/widgets/support/t9n/TimePicker_id.json +1 -1
  245. package/assets/esri/widgets/support/t9n/TimePicker_it.json +1 -1
  246. package/assets/esri/widgets/support/t9n/TimePicker_ja.json +1 -1
  247. package/assets/esri/widgets/support/t9n/TimePicker_ko.json +1 -1
  248. package/assets/esri/widgets/support/t9n/TimePicker_lt.json +1 -1
  249. package/assets/esri/widgets/support/t9n/TimePicker_lv.json +1 -1
  250. package/assets/esri/widgets/support/t9n/TimePicker_nb.json +1 -1
  251. package/assets/esri/widgets/support/t9n/TimePicker_nl.json +1 -1
  252. package/assets/esri/widgets/support/t9n/TimePicker_pl.json +1 -1
  253. package/assets/esri/widgets/support/t9n/TimePicker_pt-BR.json +1 -1
  254. package/assets/esri/widgets/support/t9n/TimePicker_pt-PT.json +1 -1
  255. package/assets/esri/widgets/support/t9n/TimePicker_ro.json +1 -1
  256. package/assets/esri/widgets/support/t9n/TimePicker_ru.json +1 -1
  257. package/assets/esri/widgets/support/t9n/TimePicker_sk.json +1 -1
  258. package/assets/esri/widgets/support/t9n/TimePicker_sl.json +1 -1
  259. package/assets/esri/widgets/support/t9n/TimePicker_sr.json +1 -1
  260. package/assets/esri/widgets/support/t9n/TimePicker_sv.json +1 -1
  261. package/assets/esri/widgets/support/t9n/TimePicker_th.json +1 -1
  262. package/assets/esri/widgets/support/t9n/TimePicker_tr.json +1 -1
  263. package/assets/esri/widgets/support/t9n/TimePicker_uk.json +1 -1
  264. package/assets/esri/widgets/support/t9n/TimePicker_vi.json +1 -1
  265. package/assets/esri/widgets/support/t9n/TimePicker_zh-CN.json +1 -1
  266. package/assets/esri/widgets/support/t9n/TimePicker_zh-HK.json +1 -1
  267. package/assets/esri/widgets/support/t9n/TimePicker_zh-TW.json +1 -1
  268. package/chunks/Compositing.glsl.js +4 -19
  269. package/chunks/HUDCompositing.glsl.js +7 -0
  270. package/chunks/Laserlines.glsl.js +5 -5
  271. package/chunks/OITCompositing.glsl.js +13 -0
  272. package/chunks/OverlayCompositing.glsl.js +8 -0
  273. package/chunks/Precipitation.glsl.js +1 -1
  274. package/chunks/ShadowHighlight.glsl.js +1 -1
  275. package/chunks/boundedPlane.js +1 -1
  276. package/chunks/cameraUtilsPlanar.js +1 -1
  277. package/chunks/cameraUtilsSpherical.js +1 -1
  278. package/chunks/mat3.js +1 -1
  279. package/chunks/quat.js +1 -1
  280. package/chunks/quat2.js +1 -1
  281. package/chunks/quatf64.js +1 -1
  282. package/chunks/sphere.js +1 -1
  283. package/chunks/vec3.js +1 -1
  284. package/chunks/vec3f32.js +1 -1
  285. package/chunks/vec4f64.js +1 -1
  286. package/core/VectorStack.js +1 -1
  287. package/core/libs/gl-matrix-2/factories/quatf64.js +1 -1
  288. package/core/libs/gl-matrix-2/factories/vec3f32.js +1 -1
  289. package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
  290. package/core/libs/gl-matrix-2/math/mat3.js +1 -1
  291. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  292. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  293. package/core/perspectiveUtils.js +1 -1
  294. package/geohash/GeohashTree.js +1 -1
  295. package/geometry/support/MeshTransform.js +1 -1
  296. package/geometry/support/axisAngle.js +1 -1
  297. package/geometry/support/axisAngleDegrees.js +1 -1
  298. package/geometry/support/lineSegment.js +1 -1
  299. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  300. package/geometry/support/meshUtils/exporters/gltf/node.js +1 -1
  301. package/geometry/support/meshUtils/georeference.js +1 -1
  302. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  303. package/geometry/support/meshUtils/projection.js +1 -1
  304. package/geometry/support/meshUtils/rotate.js +1 -1
  305. package/geometry/support/plane.js +1 -1
  306. package/interfaces.d.ts +70 -0
  307. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  308. package/layers/graphics/featureConversionUtils.js +1 -1
  309. package/layers/mixins/EditBusLayer.js +1 -1
  310. package/layers/support/AggregateField.js +1 -1
  311. package/layers/support/ControlPointsGeoreference.js +1 -1
  312. package/layers/support/OutStatistic.js +1 -1
  313. package/layers/support/VoxelVolume.js +1 -1
  314. package/layers/support/voxelPlaneUtils.js +1 -1
  315. package/package.json +1 -1
  316. package/rest/support/AggregateFeatureSet.js +5 -0
  317. package/support/revision.js +1 -1
  318. package/views/2d/ViewState.js +1 -1
  319. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  320. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  321. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  322. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  323. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  324. package/views/2d/engine/webgl/WGLTile.js +1 -1
  325. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  326. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  327. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  328. package/views/2d/layers/features/schemaUtils.js +1 -1
  329. package/views/2d/layers/features/support/BinStore.js +1 -1
  330. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  331. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  332. package/views/2d/layers/support/DebugOverlay.js +1 -1
  333. package/views/2d/layers/support/FeatureLayerProxy.js +1 -1
  334. package/views/2d/layers/support/clusterUtils.js +1 -1
  335. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  336. package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
  337. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  338. package/views/3d/analysis/Dimensioning/lengthDimensionUtils.js +1 -1
  339. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  340. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  341. package/views/3d/analysis/Slice/sliceToolConfig.js +1 -1
  342. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  343. package/views/3d/camera/constraintUtils/distance.js +1 -1
  344. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  345. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  346. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  347. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  348. package/views/3d/glTF/internal/Resource.js +1 -1
  349. package/views/3d/interactive/Manipulator3D.js +1 -1
  350. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  351. package/views/3d/interactive/editingTools/settings.js +1 -1
  352. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  353. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  354. package/views/3d/interactive/manipulatorUtils.js +1 -1
  355. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  356. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  357. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  358. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  359. package/views/3d/layers/I3SMeshView3D.js +1 -1
  360. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  361. package/views/3d/layers/PointCloudWorker.js +1 -1
  362. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  363. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  364. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  365. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  366. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  367. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  368. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  369. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  370. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  371. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  372. package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
  373. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  374. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  375. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  376. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  377. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  378. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  379. package/views/3d/layers/support/edgeUtils.js +1 -1
  380. package/views/3d/layers/support/uvUtils.js +1 -1
  381. package/views/3d/state/Frustum.js +1 -1
  382. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  383. package/views/3d/state/controllers/RotateController.js +1 -1
  384. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  385. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  386. package/views/3d/state/controllers/local/ZoomController.js +1 -1
  387. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  388. package/views/3d/state/utils/navigationUtils.js +1 -1
  389. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  390. package/views/3d/support/orientedBoundingBox.js +1 -1
  391. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  392. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  393. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  394. package/views/3d/support/sunUtils.js +1 -1
  395. package/views/3d/terrain/OverlayRenderer.js +1 -1
  396. package/views/3d/terrain/PatchRenderData.js +1 -1
  397. package/views/3d/terrain/TerrainSurface.js +1 -1
  398. package/views/3d/terrain/Tile.js +1 -1
  399. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  400. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  401. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  402. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  403. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
  404. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
  405. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  406. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  407. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  408. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  409. package/views/3d/webgl-engine/lib/GeometryRecord.js +1 -1
  410. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  411. package/views/3d/webgl-engine/lib/Highlight.js +1 -1
  412. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  413. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  414. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
  415. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  416. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  417. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  418. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  419. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  420. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  421. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  422. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  423. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  424. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  425. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  426. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  427. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  428. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  429. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  430. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  431. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  432. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  433. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  434. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  435. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  436. package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +5 -0
  437. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +5 -0
  438. package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +5 -0
  439. package/views/3d/webgl-engine/shaders/OITCompositingTechnique.js +5 -0
  440. package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +5 -0
  441. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +5 -0
  442. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  443. package/views/interactive/coordinateHelper.js +1 -1
  444. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  445. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  446. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  447. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  448. package/views/layers/FeatureLayerView.js +1 -1
  449. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  450. package/views/support/Scheduler.js +1 -1
  451. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  452. package/views/support/geometry3dUtils.js +1 -1
  453. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  454. package/widgets/ElevationProfile/support/constants.js +1 -1
  455. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  456. package/widgets/Feature/FeatureRelationship.js +1 -1
  457. package/assets/esri/core/workers/chunks/0059699bf824f851d51c.js +0 -1
  458. package/assets/esri/core/workers/chunks/36dd5654df5c7f00406d.js +0 -1
  459. package/assets/esri/core/workers/chunks/de128d8a643b4297940b.js +0 -1
  460. package/assets/esri/core/workers/chunks/e00327925ca82b63fded.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isSome as t}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{g as i,a,m as n,h as c,j as l}from"../../chunks/mat4.js";import{c as p,I as m}from"../../chunks/mat4f64.js";import{s as h}from"../../chunks/quat.js";import{a as u}from"../../chunks/quatf64.js";import{m as g,k as f}from"../../chunks/vec3.js";import{c as j,f as y,a as x}from"../../chunks/vec3f64.js";import v from"../Point.js";import{computeTranslationToOriginAndRotation as b,projectBuffer as d}from"../projection.js";import{getSphericalPCPF as M}from"../projectionEllipsoid.js";import{create as k,angleRad as N,axis as w}from"./axisAngleDegrees.js";import{BufferViewVec3f64 as I}from"./buffer/BufferView.js";import{t as S}from"../../chunks/vec32.js";import{c as A}from"../../chunks/vec33.js";var T;let q=T=class extends o{constructor(r){super(r),this.origin=j(),this.translation=j(),this.rotation=k(),this.scale=y(1,1,1),this.geographic=!0}get localMatrix(){const r=p();return h(B,w(this.rotation),N(this.rotation)),i(r,B,this.translation,this.scale),r}get localMatrixInverse(){return a(p(),this.localMatrix)}applyLocal(r,o){return g(o,r,this.localMatrix)}applyLocalInverse(r,o){return g(o,r,this.localMatrixInverse)}project(r,o){const t=new Float64Array(r.length),s=I.fromTypedArray(t),e=I.fromTypedArray(r);if(this.geographic){const r=M(o),i=p();return b(o,this.origin,i,r),n(i,i,this.localMatrix),S(s,e,i),d(t,r,0,t,o,0,t.length/3),t}const{localMatrix:i,origin:a}=this;c(i,m)?A(s,e):S(s,e,i);for(let n=0;n<t.length;n+=3)t[n+0]+=a[0],t[n+1]+=a[1],t[n+2]+=a[2];return t}getOriginPoint(r){const[o,t,s]=this.origin;return new v({x:o,y:t,z:s,spatialReference:r})}equals(r){return t(r)&&this.geographic===r.geographic&&f(this.origin,r.origin)&&l(this.localMatrix,r.localMatrix)}clone(){const r={origin:x(this.origin),translation:x(this.translation),rotation:k(this.rotation),scale:x(this.scale),geographic:this.geographic};return new T(r)}};r([s({type:[Number],nonNullable:!0,json:{write:!0}})],q.prototype,"origin",void 0),r([s({type:[Number],nonNullable:!0,json:{write:!0}})],q.prototype,"translation",void 0),r([s({type:[Number],nonNullable:!0,json:{write:!0}})],q.prototype,"rotation",void 0),r([s({type:[Number],nonNullable:!0,json:{write:!0}})],q.prototype,"scale",void 0),r([s({type:Boolean,nonNullable:!0,json:{write:!0}})],q.prototype,"geographic",void 0),r([s()],q.prototype,"localMatrix",null),r([s()],q.prototype,"localMatrixInverse",null),q=T=r([e("esri.geometry.support.MeshTransform")],q);const B=u(),L=q;export{L as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isSome as t}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{g as i,a,m as n,h as c,j as l}from"../../chunks/mat4.js";import{c as p,I as m}from"../../chunks/mat4f64.js";import{s as h}from"../../chunks/quat.js";import{c as u}from"../../chunks/quatf64.js";import{v as g,w as f}from"../../chunks/vec3.js";import{c as j,f as y,a as v}from"../../chunks/vec3f64.js";import x from"../Point.js";import{computeTranslationToOriginAndRotation as b,projectBuffer as d}from"../projection.js";import{getSphericalPCPF as M}from"../projectionEllipsoid.js";import{create as w,angleRad as N,axis as k}from"./axisAngleDegrees.js";import{BufferViewVec3f64 as I}from"./buffer/BufferView.js";import{t as S}from"../../chunks/vec32.js";import{c as A}from"../../chunks/vec33.js";var T;let q=T=class extends o{constructor(r){super(r),this.origin=j(),this.translation=j(),this.rotation=w(),this.scale=y(1,1,1),this.geographic=!0}get localMatrix(){const r=p();return h(B,k(this.rotation),N(this.rotation)),i(r,B,this.translation,this.scale),r}get localMatrixInverse(){return a(p(),this.localMatrix)}applyLocal(r,o){return g(o,r,this.localMatrix)}applyLocalInverse(r,o){return g(o,r,this.localMatrixInverse)}project(r,o){const t=new Float64Array(r.length),s=I.fromTypedArray(t),e=I.fromTypedArray(r);if(this.geographic){const r=M(o),i=p();return b(o,this.origin,i,r),n(i,i,this.localMatrix),S(s,e,i),d(t,r,0,t,o,0,t.length/3),t}const{localMatrix:i,origin:a}=this;c(i,m)?A(s,e):S(s,e,i);for(let n=0;n<t.length;n+=3)t[n+0]+=a[0],t[n+1]+=a[1],t[n+2]+=a[2];return t}getOriginPoint(r){const[o,t,s]=this.origin;return new x({x:o,y:t,z:s,spatialReference:r})}equals(r){return t(r)&&this.geographic===r.geographic&&f(this.origin,r.origin)&&l(this.localMatrix,r.localMatrix)}clone(){const r={origin:v(this.origin),translation:v(this.translation),rotation:w(this.rotation),scale:v(this.scale),geographic:this.geographic};return new T(r)}};r([s({type:[Number],nonNullable:!0,json:{write:!0}})],q.prototype,"origin",void 0),r([s({type:[Number],nonNullable:!0,json:{write:!0}})],q.prototype,"translation",void 0),r([s({type:[Number],nonNullable:!0,json:{write:!0}})],q.prototype,"rotation",void 0),r([s({type:[Number],nonNullable:!0,json:{write:!0}})],q.prototype,"scale",void 0),r([s({type:Boolean,nonNullable:!0,json:{write:!0}})],q.prototype,"geographic",void 0),r([s()],q.prototype,"localMatrix",null),r([s()],q.prototype,"localMatrixInverse",null),q=T=r([e("esri.geometry.support.MeshTransform")],q);const B=u(),L=q;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.25/esri/copyright.txt for details.
4
4
  */
5
- import{s as n,m as t,g as r}from"../../chunks/quat.js";import{a as u}from"../../chunks/quatf64.js";import{c as o,f as c,n as s}from"../../chunks/vec3.js";import{angle as e}from"./vector.js";import{sv4d as f}from"./vectorStacks.js";function i(n=x){return[n[0],n[1],n[2],n[3]]}function a(n,t,r,u){return j(n,t,r,u,f.get())}function m(n,t){return j(n[0],n[1],n[2],t,f.get())}function p(n,t=i()){return j(n[0],n[1],n[2],n[3],t)}function j(n,t,r,u,o=i()){return o[0]=n,o[1]=t,o[2]=r,o[3]=u,o}function g(n,t){const r=i();return o(v(r),n),r[3]=t,r}function k(n,t,r){return c(v(r),n,t),s(v(r),v(r)),r[3]=e(n,t),r}function h(u,o,c){return n(S,v(u),q(u)),n(b,v(o),q(o)),t(S,b,S),l(c,r(v(c),S))}function v(n){return n}function q(n){return n[3]}function l(n,t){return n[3]=t,n}const x=[0,0,1,0],S=u(),b=u();export{x as UP,q as angle,v as axis,h as compose,p as copy,i as create,g as fromAxisAndAngle,k as fromPoints,j as fromValues,l as setAngle,a as wrap,m as wrapAxisAngle};
5
+ import{s as n,m as t,g as r}from"../../chunks/quat.js";import{c as u}from"../../chunks/quatf64.js";import{c as o,f as c,n as s}from"../../chunks/vec3.js";import{angle as e}from"./vector.js";import{sv4d as f}from"./vectorStacks.js";function i(n=x){return[n[0],n[1],n[2],n[3]]}function a(n,t,r,u){return j(n,t,r,u,f.get())}function m(n,t){return j(n[0],n[1],n[2],t,f.get())}function p(n,t=i()){return j(n[0],n[1],n[2],n[3],t)}function j(n,t,r,u,o=i()){return o[0]=n,o[1]=t,o[2]=r,o[3]=u,o}function g(n,t){const r=i();return o(v(r),n),r[3]=t,r}function k(n,t,r){return c(v(r),n,t),s(v(r),v(r)),r[3]=e(n,t),r}function h(u,o,c){return n(S,v(u),q(u)),n(b,v(o),q(o)),t(S,b,S),l(c,r(v(c),S))}function v(n){return n}function q(n){return n[3]}function l(n,t){return n[3]=t,n}const x=[0,0,1,0],S=u(),b=u();export{x as UP,q as angle,v as axis,h as compose,p as copy,i as create,g as fromAxisAndAngle,k as fromPoints,j as fromValues,l as setAngle,a as wrap,m as wrapAxisAngle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{rad2deg as n,deg2rad as r}from"../../core/mathUtils.js";import{s as t,m as u,g as o}from"../../chunks/quat.js";import{a as c}from"../../chunks/quatf64.js";import{c as f,f as s,n as i,v as e}from"../../chunks/vec3.js";function a(n=b){return[n[0],n[1],n[2],n[3]]}function m(n,r,t,u){return j(n,r,t,u,y)}function p(n,r){return j(n[0],n[1],n[2],r,y)}function h(n,r=a()){return j(n[0],n[1],n[2],n[3],r)}function j(n,r,t,u,o=a()){return o[0]=n,o[1]=r,o[2]=t,o[3]=u,o}function k(n,r,t=a()){return f(g(t),n),t[3]=r,t}function q(n,r,t=a()){return s(t,n,r),i(t,t),t[3]=-e(n,r),t}function v(r,c,f=a()){return t(d,g(r),x(r)),t(w,g(c),x(c)),u(d,w,d),U(f,n(o(g(f),d)))}function g(n){return n}function l(n){return n[3]}function x(n){return r(n[3])}function U(n,r){return n[3]=r,n}const b=[0,0,1,0],d=c(),w=c(),y=a();export{b as UP,l as angle,x as angleRad,g as axis,v as compose,h as copy,a as create,k as fromAxisAndAngle,q as fromPoints,j as fromValues,U as setAngle,m as wrap,p as wrapAxisAngle};
5
+ import{rad2deg as n,deg2rad as r}from"../../core/mathUtils.js";import{s as t,m as u,g as o}from"../../chunks/quat.js";import{c}from"../../chunks/quatf64.js";import{c as f,f as s,n as i,B as e}from"../../chunks/vec3.js";function a(n=U){return[n[0],n[1],n[2],n[3]]}function m(n,r,t,u){return j(n,r,t,u,w)}function p(n,r){return j(n[0],n[1],n[2],r,w)}function h(n,r=a()){return j(n[0],n[1],n[2],n[3],r)}function j(n,r,t,u,o=a()){return o[0]=n,o[1]=r,o[2]=t,o[3]=u,o}function k(n,r,t=a()){return f(l(t),n),t[3]=r,t}function q(n,r,t=a()){return s(t,n,r),i(t,t),t[3]=-e(n,r),t}function g(r,c,f=a()){return t(b,l(r),x(r)),t(d,l(c),x(c)),u(b,d,b),B(f,n(o(l(f),b)))}function l(n){return n}function v(n){return n[3]}function x(n){return r(n[3])}function B(n,r){return n[3]=r,n}const U=[0,0,1,0],b=c(),d=c(),w=a();export{U as UP,v as angle,x as angleRad,l as axis,g as compose,h as copy,a as create,k as fromAxisAndAngle,q as fromPoints,j as fromValues,B as setAngle,m as wrap,p as wrapAxisAngle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as t}from"../../core/mathUtils.js";import{ObjectStack as r}from"../../core/ObjectStack.js";import{c as n,b as o,e,g as i,a as c,p as s,d as u}from"../../chunks/vec3.js";import{a,c as g}from"../../chunks/vec3f64.js";import{sv3d as f}from"./vectorStacks.js";function v(t){return t?{origin:a(t.origin),vector:a(t.vector)}:{origin:g(),vector:g()}}function p(t,r){const n=x.get();return n.origin=t,n.vector=r,n}function h(t,r=v()){return m(t.origin,t.vector,r)}function m(t,r,o=v()){return n(o.origin,t),n(o.vector,r),o}function b(t,r,e=v()){return n(e.origin,t),o(e.vector,r,t),e}function M(r,n){const c=o(f.get(),n,r.origin),s=e(r.vector,c),u=e(r.vector,r.vector),a=t(s/u,0,1),g=o(f.get(),i(f.get(),r.vector,a),c);return e(g,g)}function d(t,r){return Math.sqrt(M(t,r))}function j(t,r,n){return A(t,r,0,1,n)}function l(t,r,n){return c(n,t.origin,i(n,t.vector,r))}function A(r,n,u,a,g){const{vector:v,origin:p}=r,h=o(f.get(),n,p),m=e(v,h)/s(v);return i(g,v,t(m,u,a)),c(g,g,r.origin)}function B(t,r){if(q(t,p(r.origin,r.direction),!1,w)){const{tA:r,pB:n,distance2:o}=w;if(r>=0&&r<=1)return o;if(r<0)return u(t.origin,n);if(r>1)return u(c(f.get(),t.origin,t.vector),n)}return null}function k(t,r,o){return!!q(t,r,!0,w)&&(n(o,w.pA),!0)}function S(t,r){return q(t,r,!0,w)?w.distance2:null}function q(r,n,o,e){const i=1e-6,s=r.origin,a=c(f.get(),s,r.vector),g=n.origin,v=c(f.get(),g,n.vector),p=f.get(),h=f.get();if(p[0]=s[0]-g[0],p[1]=s[1]-g[1],p[2]=s[2]-g[2],h[0]=v[0]-g[0],h[1]=v[1]-g[1],h[2]=v[2]-g[2],Math.abs(h[0])<i&&Math.abs(h[1])<i&&Math.abs(h[2])<i)return!1;const m=f.get();if(m[0]=a[0]-s[0],m[1]=a[1]-s[1],m[2]=a[2]-s[2],Math.abs(m[0])<i&&Math.abs(m[1])<i&&Math.abs(m[2])<i)return!1;const b=p[0]*h[0]+p[1]*h[1]+p[2]*h[2],M=h[0]*m[0]+h[1]*m[1]+h[2]*m[2],d=p[0]*m[0]+p[1]*m[1]+p[2]*m[2],j=h[0]*h[0]+h[1]*h[1]+h[2]*h[2],l=(m[0]*m[0]+m[1]*m[1]+m[2]*m[2])*j-M*M;if(Math.abs(l)<i)return!1;let A=(b*M-d*j)/l,B=(b+M*A)/j;o&&(A=t(A,0,1),B=t(B,0,1));const k=f.get(),S=f.get();return k[0]=s[0]+A*m[0],k[1]=s[1]+A*m[1],k[2]=s[2]+A*m[2],S[0]=g[0]+B*h[0],S[1]=g[1]+B*h[1],S[2]=g[2]+B*h[2],e.tA=A,e.tB=B,e.pA=k,e.pB=S,e.distance2=u(k,S),!0}const w={tA:0,tB:0,pA:g(),pB:g(),distance2:0},x=new r((()=>v()));export{S as closestLineSegmentDistance2,k as closestLineSegmentPoint,B as closestRayDistance2,h as copy,v as create,d as distance,M as distance2,b as fromPoints,m as fromValues,l as pointAt,j as projectPoint,A as projectPointClamp,p as wrap};
5
+ import{clamp as t}from"../../core/mathUtils.js";import{ObjectStack as r}from"../../core/ObjectStack.js";import{c as n,b as o,e,g as i,a as c,z as s,d as u}from"../../chunks/vec3.js";import{a,c as g}from"../../chunks/vec3f64.js";import{sv3d as f}from"./vectorStacks.js";function v(t){return t?{origin:a(t.origin),vector:a(t.vector)}:{origin:g(),vector:g()}}function p(t,r){const n=x.get();return n.origin=t,n.vector=r,n}function h(t,r=v()){return m(t.origin,t.vector,r)}function m(t,r,o=v()){return n(o.origin,t),n(o.vector,r),o}function b(t,r,e=v()){return n(e.origin,t),o(e.vector,r,t),e}function M(r,n){const c=o(f.get(),n,r.origin),s=e(r.vector,c),u=e(r.vector,r.vector),a=t(s/u,0,1),g=o(f.get(),i(f.get(),r.vector,a),c);return e(g,g)}function d(t,r){return Math.sqrt(M(t,r))}function j(t,r,n){return A(t,r,0,1,n)}function l(t,r,n){return c(n,t.origin,i(n,t.vector,r))}function A(r,n,u,a,g){const{vector:v,origin:p}=r,h=o(f.get(),n,p),m=e(v,h)/s(v);return i(g,v,t(m,u,a)),c(g,g,r.origin)}function B(t,r){if(q(t,p(r.origin,r.direction),!1,w)){const{tA:r,pB:n,distance2:o}=w;if(r>=0&&r<=1)return o;if(r<0)return u(t.origin,n);if(r>1)return u(c(f.get(),t.origin,t.vector),n)}return null}function k(t,r,o){return!!q(t,r,!0,w)&&(n(o,w.pA),!0)}function S(t,r){return q(t,r,!0,w)?w.distance2:null}function q(r,n,o,e){const i=1e-6,s=r.origin,a=c(f.get(),s,r.vector),g=n.origin,v=c(f.get(),g,n.vector),p=f.get(),h=f.get();if(p[0]=s[0]-g[0],p[1]=s[1]-g[1],p[2]=s[2]-g[2],h[0]=v[0]-g[0],h[1]=v[1]-g[1],h[2]=v[2]-g[2],Math.abs(h[0])<i&&Math.abs(h[1])<i&&Math.abs(h[2])<i)return!1;const m=f.get();if(m[0]=a[0]-s[0],m[1]=a[1]-s[1],m[2]=a[2]-s[2],Math.abs(m[0])<i&&Math.abs(m[1])<i&&Math.abs(m[2])<i)return!1;const b=p[0]*h[0]+p[1]*h[1]+p[2]*h[2],M=h[0]*m[0]+h[1]*m[1]+h[2]*m[2],d=p[0]*m[0]+p[1]*m[1]+p[2]*m[2],j=h[0]*h[0]+h[1]*h[1]+h[2]*h[2],l=(m[0]*m[0]+m[1]*m[1]+m[2]*m[2])*j-M*M;if(Math.abs(l)<i)return!1;let A=(b*M-d*j)/l,B=(b+M*A)/j;o&&(A=t(A,0,1),B=t(B,0,1));const k=f.get(),S=f.get();return k[0]=s[0]+A*m[0],k[1]=s[1]+A*m[1],k[2]=s[2]+A*m[2],S[0]=g[0]+B*h[0],S[1]=g[1]+B*h[1],S[2]=g[2]+B*h[2],e.tA=A,e.tB=B,e.pA=k,e.pB=S,e.distance2=u(k,S),!0}const w={tA:0,tB:0,pA:g(),pB:g(),distance2:0},x=new r((()=>v()));export{S as closestLineSegmentDistance2,k as closestLineSegmentPoint,B as closestRayDistance2,h as copy,v as create,d as distance,M as distance2,b as fromPoints,m as fromValues,l as pointAt,j as projectPoint,A as projectPointClamp,p as wrap};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{isSome as t,isNone as s}from"../../../../../core/maybe.js";import{j as i}from"../../../../../chunks/quat.js";import{I as r,b as a}from"../../../../../chunks/quatf64.js";import{k as o}from"../../../../../chunks/vec3.js";import{Z as n,a as l,O as c}from"../../../../../chunks/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import{ungeoreferenceByTransform as u}from"../../georeference.js";import{Buffer as f}from"./buffer.js";import{computeOrigin as d,smoothNormals as p}from"./geometry.js";import{BufferOutputType as m,ImageOutputType as g,AttributeType as _,TargetBuffer as A,AlphaMode as x}from"./types.js";import{imageToArrayBuffer as R,imageToDataURI as T}from"./imageutils.js";import{DataType as E,TextureWrapMode as b}from"../../../../../views/webgl/enums.js";class M{constructor(e,t,s){this.params={},this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{options:t,binChunkBuffer:null,promises:[]}},s&&(this.params=s),this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.options.bufferOutputType===m.GLB||t.options.imageOutputType===g.GLB;s&&(t.binChunkBuffer=new f(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]);const s=this._addNode(e);t.nodes.push(s)})),this.gltf.scenes.push(t)}_addNode(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;o(s,n)||(t.translation=l(s));const h=e.rotation;i(h,r)||(t.rotation=a(h));const u=e.scale;o(u,c)||(t.scale=l(u)),e.mesh&&e.mesh.vertexAttributes.position?t.mesh=this._addMesh(e.mesh):e.forEachNode((e=>{t.children||(t.children=[]);const s=this._addNode(e);t.children.push(s)}));const f=this.gltf.nodes.length;return this.gltf.nodes.push(t),f}_addMesh(e){this.gltf.meshes||(this.gltf.meshes=[]);const s={primitives:[]},i=this.gltf.extras,r=i.options.bufferOutputType===m.GLB;let a;a=r?i.binChunkBuffer:new f(this.gltf),this.params.origin||(this.params.origin=d(e));const o=u(e.vertexAttributes,e.transform,this.params.origin,{geographic:this.params.geographic,unit:"meters"});p(e,o),this._flipYZAxis(o);const n=a.addBufferView(E.FLOAT,_.VEC3,A.ARRAY_BUFFER);let l,c,h,g;o.normal&&(l=a.addBufferView(E.FLOAT,_.VEC3,A.ARRAY_BUFFER)),e.vertexAttributes.uv&&(c=a.addBufferView(E.FLOAT,_.VEC2,A.ARRAY_BUFFER)),o.tangent&&(h=a.addBufferView(E.FLOAT,_.VEC4,A.ARRAY_BUFFER)),e.vertexAttributes.color&&(g=a.addBufferView(E.UNSIGNED_BYTE,_.VEC4,A.ARRAY_BUFFER)),n.startAccessor("POSITION"),l&&l.startAccessor("NORMAL"),c&&c.startAccessor("TEXCOORD_0"),h&&h.startAccessor("TANGENT"),g&&g.startAccessor("COLOR_0");const x=o.position.length/3,{position:R,normal:T,tangent:b}=o,{color:M,uv:O}=e.vertexAttributes;for(let u=0;u<x;++u)n.push(R[3*u+0]),n.push(R[3*u+1]),n.push(R[3*u+2]),l&&t(T)&&(l.push(T[3*u+0]),l.push(T[3*u+1]),l.push(T[3*u+2])),c&&t(O)&&(c.push(O[2*u+0]),c.push(O[2*u+1])),h&&t(b)&&(h.push(b[4*u+0]),h.push(b[4*u+1]),h.push(b[4*u+2]),h.push(b[4*u+3])),g&&t(M)&&(g.push(M[4*u+0]),g.push(M[4*u+1]),g.push(M[4*u+2]),g.push(M[4*u+3]));const N=n.endAccessor(),C=this._addAccessor(n.index,N);let B,w,y,I,S;if(l){const e=l.endAccessor();B=this._addAccessor(l.index,e)}if(c){const e=c.endAccessor();w=this._addAccessor(c.index,e)}if(h){const e=h.endAccessor();y=this._addAccessor(h.index,e)}if(g){const e=g.endAccessor();I=this._addAccessor(g.index,e)}e.components&&e.components.length>0&&e.components[0].faces?(S=a.addBufferView(E.UNSIGNED_INT,_.SCALAR,A.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(S,e.components,s,C,B,w,y,I)):this._addMeshVertexNonIndexed(e.components,s,C,B,w,y,I),n.finalize(),l&&l.finalize(),c&&c.finalize(),h&&h.finalize(),S&&S.finalize(),g&&g.finalize(),r||a.finalize();const F=this.gltf.meshes.length;return this.gltf.meshes.push(s),F}_flipYZAxis({position:e,normal:t,tangent:s}){this._flipYZBuffer(e,3),this._flipYZBuffer(t,3),this._flipYZBuffer(s,4)}_flipYZBuffer(e,t){if(!s(e))for(let s=1,i=2;s<e.length;s+=t,i+=t){const t=e[s],r=e[i];e[s]=r,e[i]=-t}}_addMaterial(e){if(null===e)return;const s=this._materialMap.indexOf(e);if(-1!==s)return s;this.gltf.materials||(this.gltf.materials=[]);const i={};switch(e.alphaMode){case"mask":i.alphaMode=x.MASK;break;case"auto":case"blend":i.alphaMode=x.BLEND}.5!==e.alphaCutoff&&(i.alphaCutoff=e.alphaCutoff),e.doubleSided&&(i.doubleSided=e.doubleSided),i.pbrMetallicRoughness={};const r=e=>e**2.1,a=e=>{const t=e.toRgba();return t[0]=r(t[0]/255),t[1]=r(t[1]/255),t[2]=r(t[2]/255),t};if(t(e.color)&&(i.pbrMetallicRoughness.baseColorFactor=a(e.color)),t(e.colorTexture)&&(i.pbrMetallicRoughness.baseColorTexture={index:this._addTexture(e.colorTexture)}),t(e.normalTexture)&&(i.normalTexture={index:this._addTexture(e.normalTexture)}),e instanceof h){if(t(e.emissiveTexture)&&(i.emissiveTexture={index:this._addTexture(e.emissiveTexture)}),t(e.emissiveColor)){const t=a(e.emissiveColor);i.emissiveFactor=[t[0],t[1],t[2]]}t(e.occlusionTexture)&&(i.occlusionTexture={index:this._addTexture(e.occlusionTexture)}),t(e.metallicRoughnessTexture)&&(i.pbrMetallicRoughness.metallicRoughnessTexture={index:this._addTexture(e.metallicRoughnessTexture)}),i.pbrMetallicRoughness.metallicFactor=e.metallic,i.pbrMetallicRoughness.roughnessFactor=e.roughness}else i.pbrMetallicRoughness.metallicFactor=1,i.pbrMetallicRoughness.roughnessFactor=1;const o=this.gltf.materials.length;return this.gltf.materials.push(i),this._materialMap.push(e),o}_addTexture(t){const s=this.gltf.textures??[];return this.gltf.textures=s,e(this._textureMap,t,(()=>{const e={sampler:this._addSampler(t),source:this._addImage(t)},i=s.length;return s.push(e),i}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const i=this.gltf.extras;switch(i.options.imageOutputType){case g.GLB:{const e=i.binChunkBuffer.addBufferView(E.UNSIGNED_BYTE,_.SCALAR),r=R(t).then((({data:e,type:t})=>(s.mimeType=t,e)));e.writeAsync(r).then((()=>{e.finalize()})),s.bufferView=e.index;break}case g.DataURI:s.uri=T(t);break;default:i.promises.push(R(t).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const i=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,i),i}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=b.REPEAT,s=b.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=b.CLAMP_TO_EDGE,s=b.CLAMP_TO_EDGE;break;case"mirror":t=b.MIRRORED_REPEAT,s=b.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=b.CLAMP_TO_EDGE;break;case"mirror":s=b.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=b.CLAMP_TO_EDGE;break;case"mirror":t=b.MIRRORED_REPEAT}}const i={wrapS:t,wrapT:s};for(let a=0;a<this.gltf.samplers.length;++a)if(JSON.stringify(i)===JSON.stringify(this.gltf.samplers[a]))return a;const r=this.gltf.samplers.length;return this.gltf.samplers.push(i),r}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const i=this.gltf.accessors.length;return this.gltf.accessors.push(s),i}_addMeshVertexIndexed(e,t,s,i,r,a,o,n){for(const l of t){e.startAccessor("INDICES");for(let s=0;s<l.faces.length;++s)e.push(l.faces[s]);const t=e.endAccessor(),c={attributes:{POSITION:i},indices:this._addAccessor(e.index,t),material:this._addMaterial(l.material)};r&&"flat"!==l.shading&&(c.attributes.NORMAL=r),a&&(c.attributes.TEXCOORD_0=a),o&&"flat"!==l.shading&&(c.attributes.TANGENT=o),n&&(c.attributes.COLOR_0=n),s.primitives.push(c)}}_addMeshVertexNonIndexed(e,t,s,i,r,a,o){const n={attributes:{POSITION:s}};i&&(n.attributes.NORMAL=i),r&&(n.attributes.TEXCOORD_0=r),a&&(n.attributes.TANGENT=a),o&&(n.attributes.COLOR_0=o),e&&(n.material=this._addMaterial(e[0].material)),t.primitives.push(n)}}export{M as GLTF};
5
+ import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{isSome as t,isNone as s}from"../../../../../core/maybe.js";import{j as i}from"../../../../../chunks/quat.js";import{I as r,b as a}from"../../../../../chunks/quatf64.js";import{w as o}from"../../../../../chunks/vec3.js";import{Z as n,a as l,O as c}from"../../../../../chunks/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import{ungeoreferenceByTransform as u}from"../../georeference.js";import{Buffer as f}from"./buffer.js";import{computeOrigin as d,smoothNormals as p}from"./geometry.js";import{BufferOutputType as m,ImageOutputType as g,AttributeType as _,TargetBuffer as A,AlphaMode as x}from"./types.js";import{imageToArrayBuffer as R,imageToDataURI as T}from"./imageutils.js";import{DataType as E,TextureWrapMode as b}from"../../../../../views/webgl/enums.js";class M{constructor(e,t,s){this.params={},this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{options:t,binChunkBuffer:null,promises:[]}},s&&(this.params=s),this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.options.bufferOutputType===m.GLB||t.options.imageOutputType===g.GLB;s&&(t.binChunkBuffer=new f(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]);const s=this._addNode(e);t.nodes.push(s)})),this.gltf.scenes.push(t)}_addNode(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;o(s,n)||(t.translation=l(s));const h=e.rotation;i(h,r)||(t.rotation=a(h));const u=e.scale;o(u,c)||(t.scale=l(u)),e.mesh&&e.mesh.vertexAttributes.position?t.mesh=this._addMesh(e.mesh):e.forEachNode((e=>{t.children||(t.children=[]);const s=this._addNode(e);t.children.push(s)}));const f=this.gltf.nodes.length;return this.gltf.nodes.push(t),f}_addMesh(e){this.gltf.meshes||(this.gltf.meshes=[]);const s={primitives:[]},i=this.gltf.extras,r=i.options.bufferOutputType===m.GLB;let a;a=r?i.binChunkBuffer:new f(this.gltf),this.params.origin||(this.params.origin=d(e));const o=u(e.vertexAttributes,e.transform,this.params.origin,{geographic:this.params.geographic,unit:"meters"});p(e,o),this._flipYZAxis(o);const n=a.addBufferView(E.FLOAT,_.VEC3,A.ARRAY_BUFFER);let l,c,h,g;o.normal&&(l=a.addBufferView(E.FLOAT,_.VEC3,A.ARRAY_BUFFER)),e.vertexAttributes.uv&&(c=a.addBufferView(E.FLOAT,_.VEC2,A.ARRAY_BUFFER)),o.tangent&&(h=a.addBufferView(E.FLOAT,_.VEC4,A.ARRAY_BUFFER)),e.vertexAttributes.color&&(g=a.addBufferView(E.UNSIGNED_BYTE,_.VEC4,A.ARRAY_BUFFER)),n.startAccessor("POSITION"),l&&l.startAccessor("NORMAL"),c&&c.startAccessor("TEXCOORD_0"),h&&h.startAccessor("TANGENT"),g&&g.startAccessor("COLOR_0");const x=o.position.length/3,{position:R,normal:T,tangent:b}=o,{color:M,uv:O}=e.vertexAttributes;for(let u=0;u<x;++u)n.push(R[3*u+0]),n.push(R[3*u+1]),n.push(R[3*u+2]),l&&t(T)&&(l.push(T[3*u+0]),l.push(T[3*u+1]),l.push(T[3*u+2])),c&&t(O)&&(c.push(O[2*u+0]),c.push(O[2*u+1])),h&&t(b)&&(h.push(b[4*u+0]),h.push(b[4*u+1]),h.push(b[4*u+2]),h.push(b[4*u+3])),g&&t(M)&&(g.push(M[4*u+0]),g.push(M[4*u+1]),g.push(M[4*u+2]),g.push(M[4*u+3]));const N=n.endAccessor(),C=this._addAccessor(n.index,N);let w,B,y,I,S;if(l){const e=l.endAccessor();w=this._addAccessor(l.index,e)}if(c){const e=c.endAccessor();B=this._addAccessor(c.index,e)}if(h){const e=h.endAccessor();y=this._addAccessor(h.index,e)}if(g){const e=g.endAccessor();I=this._addAccessor(g.index,e)}e.components&&e.components.length>0&&e.components[0].faces?(S=a.addBufferView(E.UNSIGNED_INT,_.SCALAR,A.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(S,e.components,s,C,w,B,y,I)):this._addMeshVertexNonIndexed(e.components,s,C,w,B,y,I),n.finalize(),l&&l.finalize(),c&&c.finalize(),h&&h.finalize(),S&&S.finalize(),g&&g.finalize(),r||a.finalize();const F=this.gltf.meshes.length;return this.gltf.meshes.push(s),F}_flipYZAxis({position:e,normal:t,tangent:s}){this._flipYZBuffer(e,3),this._flipYZBuffer(t,3),this._flipYZBuffer(s,4)}_flipYZBuffer(e,t){if(!s(e))for(let s=1,i=2;s<e.length;s+=t,i+=t){const t=e[s],r=e[i];e[s]=r,e[i]=-t}}_addMaterial(e){if(null===e)return;const s=this._materialMap.indexOf(e);if(-1!==s)return s;this.gltf.materials||(this.gltf.materials=[]);const i={};switch(e.alphaMode){case"mask":i.alphaMode=x.MASK;break;case"auto":case"blend":i.alphaMode=x.BLEND}.5!==e.alphaCutoff&&(i.alphaCutoff=e.alphaCutoff),e.doubleSided&&(i.doubleSided=e.doubleSided),i.pbrMetallicRoughness={};const r=e=>e**2.1,a=e=>{const t=e.toRgba();return t[0]=r(t[0]/255),t[1]=r(t[1]/255),t[2]=r(t[2]/255),t};if(t(e.color)&&(i.pbrMetallicRoughness.baseColorFactor=a(e.color)),t(e.colorTexture)&&(i.pbrMetallicRoughness.baseColorTexture={index:this._addTexture(e.colorTexture)}),t(e.normalTexture)&&(i.normalTexture={index:this._addTexture(e.normalTexture)}),e instanceof h){if(t(e.emissiveTexture)&&(i.emissiveTexture={index:this._addTexture(e.emissiveTexture)}),t(e.emissiveColor)){const t=a(e.emissiveColor);i.emissiveFactor=[t[0],t[1],t[2]]}t(e.occlusionTexture)&&(i.occlusionTexture={index:this._addTexture(e.occlusionTexture)}),t(e.metallicRoughnessTexture)&&(i.pbrMetallicRoughness.metallicRoughnessTexture={index:this._addTexture(e.metallicRoughnessTexture)}),i.pbrMetallicRoughness.metallicFactor=e.metallic,i.pbrMetallicRoughness.roughnessFactor=e.roughness}else i.pbrMetallicRoughness.metallicFactor=1,i.pbrMetallicRoughness.roughnessFactor=1;const o=this.gltf.materials.length;return this.gltf.materials.push(i),this._materialMap.push(e),o}_addTexture(t){const s=this.gltf.textures??[];return this.gltf.textures=s,e(this._textureMap,t,(()=>{const e={sampler:this._addSampler(t),source:this._addImage(t)},i=s.length;return s.push(e),i}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const i=this.gltf.extras;switch(i.options.imageOutputType){case g.GLB:{const e=i.binChunkBuffer.addBufferView(E.UNSIGNED_BYTE,_.SCALAR),r=R(t).then((({data:e,type:t})=>(s.mimeType=t,e)));e.writeAsync(r).then((()=>{e.finalize()})),s.bufferView=e.index;break}case g.DataURI:s.uri=T(t);break;default:i.promises.push(R(t).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const i=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,i),i}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=b.REPEAT,s=b.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=b.CLAMP_TO_EDGE,s=b.CLAMP_TO_EDGE;break;case"mirror":t=b.MIRRORED_REPEAT,s=b.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=b.CLAMP_TO_EDGE;break;case"mirror":s=b.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=b.CLAMP_TO_EDGE;break;case"mirror":t=b.MIRRORED_REPEAT}}const i={wrapS:t,wrapT:s};for(let a=0;a<this.gltf.samplers.length;++a)if(JSON.stringify(i)===JSON.stringify(this.gltf.samplers[a]))return a;const r=this.gltf.samplers.length;return this.gltf.samplers.push(i),r}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const i=this.gltf.accessors.length;return this.gltf.accessors.push(s),i}_addMeshVertexIndexed(e,t,s,i,r,a,o,n){for(const l of t){e.startAccessor("INDICES");for(let s=0;s<l.faces.length;++s)e.push(l.faces[s]);const t=e.endAccessor(),c={attributes:{POSITION:i},indices:this._addAccessor(e.index,t),material:this._addMaterial(l.material)};r&&"flat"!==l.shading&&(c.attributes.NORMAL=r),a&&(c.attributes.TEXCOORD_0=a),o&&"flat"!==l.shading&&(c.attributes.TANGENT=o),n&&(c.attributes.COLOR_0=n),s.primitives.push(c)}}_addMeshVertexNonIndexed(e,t,s,i,r,a,o){const n={attributes:{POSITION:s}};i&&(n.attributes.NORMAL=i),r&&(n.attributes.TEXCOORD_0=r),a&&(n.attributes.TANGENT=a),o&&(n.attributes.COLOR_0=o),e&&(n.material=this._addMaterial(e[0].material)),t.primitives.push(n)}}export{M as GLTF};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{k as s}from"../../../../../chunks/quat.js";import{a as t}from"../../../../../chunks/quatf64.js";import{c as o,a,O as r}from"../../../../../chunks/vec3f64.js";class i{constructor(s){this.mesh=s,this.name="",this.translation=o(),this.rotation=t(),this.scale=a(r),this._nodes=[]}addNode(s){if(this._nodes.includes(s))throw new Error("Node already added");this._nodes.push(s)}forEachNode(s){this._nodes.forEach(s)}set rotationAngles(t){s(this.rotation,t[0],t[1],t[2])}}export{i as Node};
5
+ import{k as s}from"../../../../../chunks/quat.js";import{c as t}from"../../../../../chunks/quatf64.js";import{c as o,a,O as r}from"../../../../../chunks/vec3f64.js";class i{constructor(s){this.mesh=s,this.name="",this.translation=o(),this.rotation=t(),this.scale=a(r),this._nodes=[]}addNode(s){if(this._nodes.includes(s))throw new Error("Node already added");this._nodes.push(s)}forEachNode(s){this._nodes.forEach(s)}set rotationAngles(t){s(this.rotation,t[0],t[1],t[2])}}export{i as Node};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isNone as n,isSome as r}from"../../../core/maybe.js";import{getMetersPerUnitForSR as t,getMetersPerVerticalUnitForSR as o,convertUnit as e}from"../../../core/unitUtils.js";import{c as a}from"../../../chunks/mat3f64.js";import{a as i,k as l}from"../../../chunks/mat4.js";import{c as s}from"../../../chunks/mat4f64.js";import{b as f}from"../../../chunks/mat3.js";import{computeTranslationToOriginAndRotation as c}from"../../projection.js";import{getSphericalPCPF as u}from"../../projectionEllipsoid.js";import p from"../MeshTransform.js";import{BufferViewVec3f64 as m,BufferViewVec3f as g}from"../buffer/BufferView.js";import{t as y,a as h}from"../../../chunks/vec32.js";import{isGeographicMesh as A}from"./geographicUtils.js";import{transformPosition as T,transformNormal as j,transformTangent as E,projectFromPCPF as F,projectNormalFromPCPF as R,projectTangentFromPCPF as w,projectToPCPF as d,projectNormalToPCPF as z,projectTangentToPCPF as v}from"./projection.js";function x(n,r,t){return A(r.spatialReference,t)?B(n,r,t):P(n,r,t)}function k(t,o,e){const{position:a,normal:i,tangent:l}=t;if(n(o))return{position:a,normal:i,tangent:l};const s=o.localMatrix;return x({position:T(a,new Float64Array(a.length),s),normal:r(i)?j(i,new Float32Array(i.length),s):null,tangent:r(l)?E(l,new Float32Array(l.length),s):null},o.getOriginPoint(e),{geographic:o.geographic})}function _(n,r,t){if(t?.useTransform){const{position:o,normal:e,tangent:a}=n;return{vertexAttributes:{position:o,normal:e,tangent:a},transform:new p({origin:[r.x,r.y,r.z??0],geographic:A(r.spatialReference,t)})}}return{vertexAttributes:x(n,r,t),transform:null}}function b(n,r,t){return A(r.spatialReference,t)?G(n,r,t):Y(n,r,t)}function M(r,t,o,e){if(n(t))return b(r,o,e);const a=k(r,t,o.spatialReference);return o.equals(t.getOriginPoint(o.spatialReference))?Y(a,o,e):A(o.spatialReference,e)?G(a,o,e):Y(a,o,e)}function P(n,r,t){const o=new Float64Array(n.position.length),e=n.position,a=r.x,i=r.y,l=r.z||0,{horizontal:s,vertical:f}=C(t?t.unit:null,r.spatialReference);for(let c=0;c<e.length;c+=3)o[c+0]=e[c+0]*s+a,o[c+1]=e[c+1]*s+i,o[c+2]=e[c+2]*f+l;return{position:o,normal:n.normal,tangent:n.tangent}}function B(n,r,t){const o=r.spatialReference,e=O(r,t,D),a=new Float64Array(n.position.length),i=L(n.position,e,o,a),l=f(I,e);return{position:i,normal:N(i,a,n.normal,l,o),tangent:S(i,a,n.tangent,l,o)}}function L(n,r,t,o){y(m.fromTypedArray(o),m.fromTypedArray(n),r);const e=new Float64Array(n.length);return F(o,e,t)}function N(r,t,o,e,a){if(n(o))return null;const i=new Float32Array(o.length);return h(g.fromTypedArray(i),g.fromTypedArray(o),e),R(i,r,t,a,i),i}function S(r,t,o,e,a){if(n(o))return null;const i=new Float32Array(o.length);h(g.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT),g.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT),e);for(let n=3;n<i.length;n+=4)i[n]=o[n];return w(i,r,t,a,i),i}function Y(n,r,t){const o=new Float64Array(n.position.length),e=n.position,a=r.x,i=r.y,l=r.z||0,{horizontal:s,vertical:f}=C(t?t.unit:null,r.spatialReference);for(let c=0;c<e.length;c+=3)o[c+0]=(e[c+0]-a)/s,o[c+1]=(e[c+1]-i)/s,o[c+2]=(e[c+2]-l)/f;return{position:o,normal:n.normal,tangent:n.tangent}}function G(n,r,t){const o=r.spatialReference;O(r,t,D);const e=i(H,D),a=new Float64Array(n.position.length),l=U(n.position,o,e,a),s=f(I,e);return{position:l,normal:q(n.normal,n.position,a,o,s),tangent:V(n.tangent,n.position,a,o,s)}}function O(n,r,t){c(n.spatialReference,[n.x,n.y,n.z||0],t,u(n.spatialReference));const{horizontal:o,vertical:e}=C(r?r.unit:null,n.spatialReference);return l(t,t,[o,o,e]),t}function U(n,r,t,o){const e=d(n,r,o),a=m.fromTypedArray(e),i=new Float64Array(e.length),l=m.fromTypedArray(i);return y(l,a,t),i}function q(r,t,o,e,a){if(n(r))return null;const i=z(r,t,o,e,new Float32Array(r.length)),l=g.fromTypedArray(i);return h(l,l,a),i}function V(r,t,o,e,a){if(n(r))return null;const i=v(r,t,o,e,new Float32Array(r.length)),l=g.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT);return h(l,l,a),i}function C(r,a){if(n(r))return J;const i=a.isGeographic?1:t(a),l=a.isGeographic?1:o(a),s=e(1,r,"meters");return{horizontal:s*i,vertical:s*l}}const D=s(),H=s(),I=a(),J={horizontal:1,vertical:1};export{x as georeference,k as georeferenceApplyTransform,_ as georeferenceByTransform,b as ungeoreference,M as ungeoreferenceByTransform};
5
+ import{isNone as n,isSome as r}from"../../../core/maybe.js";import{getMetersPerUnitForSR as t,getMetersPerVerticalUnitForSR as o,convertUnit as e}from"../../../core/unitUtils.js";import{c as a}from"../../../chunks/mat3f64.js";import{a as i,k as l}from"../../../chunks/mat4.js";import{c as s}from"../../../chunks/mat4f64.js";import{d as f}from"../../../chunks/mat3.js";import{computeTranslationToOriginAndRotation as c}from"../../projection.js";import{getSphericalPCPF as u}from"../../projectionEllipsoid.js";import p from"../MeshTransform.js";import{BufferViewVec3f64 as m,BufferViewVec3f as g}from"../buffer/BufferView.js";import{t as y,a as h}from"../../../chunks/vec32.js";import{isGeographicMesh as A}from"./geographicUtils.js";import{transformPosition as T,transformNormal as j,transformTangent as E,projectFromPCPF as F,projectNormalFromPCPF as R,projectTangentFromPCPF as w,projectToPCPF as d,projectNormalToPCPF as z,projectTangentToPCPF as v}from"./projection.js";function x(n,r,t){return A(r.spatialReference,t)?B(n,r,t):b(n,r,t)}function k(t,o,e){const{position:a,normal:i,tangent:l}=t;if(n(o))return{position:a,normal:i,tangent:l};const s=o.localMatrix;return x({position:T(a,new Float64Array(a.length),s),normal:r(i)?j(i,new Float32Array(i.length),s):null,tangent:r(l)?E(l,new Float32Array(l.length),s):null},o.getOriginPoint(e),{geographic:o.geographic})}function _(n,r,t){if(t?.useTransform){const{position:o,normal:e,tangent:a}=n;return{vertexAttributes:{position:o,normal:e,tangent:a},transform:new p({origin:[r.x,r.y,r.z??0],geographic:A(r.spatialReference,t)})}}return{vertexAttributes:x(n,r,t),transform:null}}function M(n,r,t){return A(r.spatialReference,t)?G(n,r,t):Y(n,r,t)}function P(r,t,o,e){if(n(t))return M(r,o,e);const a=k(r,t,o.spatialReference);return o.equals(t.getOriginPoint(o.spatialReference))?Y(a,o,e):A(o.spatialReference,e)?G(a,o,e):Y(a,o,e)}function b(n,r,t){const o=new Float64Array(n.position.length),e=n.position,a=r.x,i=r.y,l=r.z||0,{horizontal:s,vertical:f}=C(t?t.unit:null,r.spatialReference);for(let c=0;c<e.length;c+=3)o[c+0]=e[c+0]*s+a,o[c+1]=e[c+1]*s+i,o[c+2]=e[c+2]*f+l;return{position:o,normal:n.normal,tangent:n.tangent}}function B(n,r,t){const o=r.spatialReference,e=O(r,t,D),a=new Float64Array(n.position.length),i=L(n.position,e,o,a),l=f(I,e);return{position:i,normal:N(i,a,n.normal,l,o),tangent:S(i,a,n.tangent,l,o)}}function L(n,r,t,o){y(m.fromTypedArray(o),m.fromTypedArray(n),r);const e=new Float64Array(n.length);return F(o,e,t)}function N(r,t,o,e,a){if(n(o))return null;const i=new Float32Array(o.length);return h(g.fromTypedArray(i),g.fromTypedArray(o),e),R(i,r,t,a,i),i}function S(r,t,o,e,a){if(n(o))return null;const i=new Float32Array(o.length);h(g.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT),g.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT),e);for(let n=3;n<i.length;n+=4)i[n]=o[n];return w(i,r,t,a,i),i}function Y(n,r,t){const o=new Float64Array(n.position.length),e=n.position,a=r.x,i=r.y,l=r.z||0,{horizontal:s,vertical:f}=C(t?t.unit:null,r.spatialReference);for(let c=0;c<e.length;c+=3)o[c+0]=(e[c+0]-a)/s,o[c+1]=(e[c+1]-i)/s,o[c+2]=(e[c+2]-l)/f;return{position:o,normal:n.normal,tangent:n.tangent}}function G(n,r,t){const o=r.spatialReference;O(r,t,D);const e=i(H,D),a=new Float64Array(n.position.length),l=U(n.position,o,e,a),s=f(I,e);return{position:l,normal:q(n.normal,n.position,a,o,s),tangent:V(n.tangent,n.position,a,o,s)}}function O(n,r,t){c(n.spatialReference,[n.x,n.y,n.z||0],t,u(n.spatialReference));const{horizontal:o,vertical:e}=C(r?r.unit:null,n.spatialReference);return l(t,t,[o,o,e]),t}function U(n,r,t,o){const e=d(n,r,o),a=m.fromTypedArray(e),i=new Float64Array(e.length),l=m.fromTypedArray(i);return y(l,a,t),i}function q(r,t,o,e,a){if(n(r))return null;const i=z(r,t,o,e,new Float32Array(r.length)),l=g.fromTypedArray(i);return h(l,l,a),i}function V(r,t,o,e,a){if(n(r))return null;const i=v(r,t,o,e,new Float32Array(r.length)),l=g.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT);return h(l,l,a),i}function C(r,a){if(n(r))return J;const i=a.isGeographic?1:t(a),l=a.isGeographic?1:o(a),s=e(1,r,"meters");return{horizontal:s*i,vertical:s*l}}const D=s(),H=s(),I=a(),J={horizontal:1,vertical:1};export{x as georeference,k as georeferenceApplyTransform,_ as georeferenceByTransform,M as ungeoreference,P as ungeoreferenceByTransform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../Color.js";import t from"../../../request.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{hasScaling as o}from"../../../core/mathUtils.js";import{isSome as n,unwrap as s,applySome as i,isNone as a}from"../../../core/maybe.js";import{b as c}from"../../../chunks/mat3.js";import{c as u}from"../../../chunks/mat3f64.js";import{f as l}from"../../../chunks/vec3f64.js";import{f}from"../../../chunks/vec4f64.js";import m from"../MeshComponent.js";import p from"../MeshMaterialMetallicRoughness.js";import d from"../MeshTexture.js";import{MeshVertexAttributes as g}from"../MeshVertexAttributes.js";import{BufferViewVec4f as x,BufferViewVec4u8 as T,BufferViewVec4u16 as h,BufferViewVec3u8 as v,BufferViewVec3f as w,BufferViewVec3u16 as b,BufferViewVec3f64 as j,BufferViewVec2f as y}from"../buffer/BufferView.js";import{t as A,a as M,n as C,s as R,b as E}from"../../../chunks/vec32.js";import{t as k,n as B,s as F,a as I}from"../../../chunks/vec42.js";import{createBuffer as $}from"../buffer/utils.js";import{georeferenceByTransform as L}from"./georeference.js";import{DefaultLoadingContext as S}from"../../../views/3d/glTF/DefaultLoadingContext.js";import{load as N}from"../../../views/3d/glTF/loader.js";import{triangleFanToTriangles as O,triangleStripToTriangles as _,trianglesToTriangles as D}from"../../../views/3d/glTF/internal/indexUtils.js";import{generateIndexArray as G}from"../../../views/3d/webgl-engine/lib/Indices.js";import{COLOR_GAMMA as P}from"../../../views/3d/webgl-engine/materials/DefaultMaterial_COLOR_GAMMA.js";import{PrimitiveType as U,TextureWrapMode as V}from"../../../views/webgl/enums.js";import{f as q,c as z}from"../../../chunks/vec33.js";import{f as K,c as Q}from"../../../chunks/vec43.js";import{n as H,f as J}from"../../../chunks/vec22.js";async function W(e,t,r){const o=new S(X(r)),s=(await N(o,t,r,!0)).model,i=s.lods.shift(),a=new Map,c=new Map;s.textures.forEach(((e,t)=>a.set(t,te(e)))),s.materials.forEach(((e,t)=>c.set(t,re(e,a))));const u=ee(i);for(const n of u.parts)oe(u,n,c);const{position:l,normal:f,tangent:m,color:p,texCoord0:d}=u.vertexAttributes,x={position:l.typedBuffer,normal:n(f)?f.typedBuffer:null,tangent:n(m)?m.typedBuffer:null,uv:n(d)?d.typedBuffer:null,color:n(p)?p.typedBuffer:null},T=L(x,e,r);return{transform:T.transform,components:u.components,spatialReference:e.spatialReference,vertexAttributes:new g({position:T.vertexAttributes.position,normal:T.vertexAttributes.normal,tangent:T.vertexAttributes.tangent,color:x.color,uv:x.uv})}}function X(e){const r=e?.resolveFile;return r?{busy:!1,request:async(e,o,s)=>{const i=r(e),a="image"===o?"image":"binary"===o?"array-buffer":"json";return(await t(i,{responseType:a,signal:n(s)?s.signal:null})).data}}:null}function Y(e,t){if(a(e))return"-";const o=e.typedBuffer;return`${r(t,o.buffer,(()=>t.size))}/${o.byteOffset}/${o.byteLength}`}function Z(e){return n(e)?e.toString():"-"}function ee(e){let t=0;const has={color:!1,tangent:!1,normal:!1,texCoord0:!1},o=new Map,n=new Map,s=[];for(const i of e.parts){const{attributes:{position:e,normal:a,color:c,tangent:u,texCoord0:l}}=i,f=`\n ${Y(e,o)}/\n ${Y(a,o)}/\n ${Y(c,o)}/\n ${Y(u,o)}/\n ${Y(l,o)}/\n ${Z(i.transform)}\n `;let m=!1;const p=r(n,f,(()=>(m=!0,{start:t,length:e.count})));m&&(t+=e.count),a&&(has.normal=!0),c&&(has.color=!0),u&&(has.tangent=!0),l&&(has.texCoord0=!0),s.push({gltf:i,writeVertices:m,region:p})}return{vertexAttributes:{position:$(j,t),normal:has.normal?$(w,t):null,tangent:has.tangent?$(x,t):null,color:has.color?$(T,t):null,texCoord0:has.texCoord0?$(y,t):null},parts:s,components:[]}}function te(e){return new d({data:e.data,wrap:ae(e.parameters.wrap)})}function re(t,r){const o=new e(le(t.color,t.opacity)),n=t.emissiveFactor?new e(fe(t.emissiveFactor)):null;return new p({color:o,colorTexture:s(i(t.textureColor,(e=>r.get(e)))),normalTexture:s(i(t.textureNormal,(e=>r.get(e)))),emissiveColor:n,emissiveTexture:s(i(t.textureEmissive,(e=>r.get(e)))),occlusionTexture:s(i(t.textureOcclusion,(e=>r.get(e)))),alphaMode:ie(t.alphaMode),alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,metallic:t.metallicFactor,roughness:t.roughnessFactor,metallicRoughnessTexture:s(i(t.textureMetallicRoughness,(e=>r.get(e)))),colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform})}function oe(e,t,r){t.writeVertices&&ne(e,t);const o=t.gltf,n=se(o.indices||o.attributes.position.count,o.primitiveType),s=t.region.start;if(s)for(let i=0;i<n.length;i++)n[i]+=s;e.components.push(new m({faces:n,material:r.get(o.material),trustSourceNormals:!0}))}function ne(e,t){const{position:r,normal:s,tangent:i,color:a,texCoord0:l}=e.vertexAttributes,f=t.region.start,{attributes:m,transform:p}=t.gltf,d=m.position.count;if(A(r.slice(f,d),m.position,p),n(m.normal)&&n(s)){const e=c(u(),p),t=s.slice(f,d);M(t,m.normal,e),o(e)&&C(t,t)}else n(s)&&q(s,0,0,1,{dstIndex:f,count:d});if(n(m.tangent)&&n(i)){const e=c(u(),p),t=i.slice(f,d);k(t,m.tangent,e),o(e)&&B(t,t)}else n(i)&&K(i,0,0,1,1,{dstIndex:f,count:d});if(n(m.texCoord0)&&n(l)?H(l.slice(f,d),m.texCoord0):n(l)&&J(l,0,0,{dstIndex:f,count:d}),n(m.color)&&n(a)){const e=m.color,t=a.slice(f,d);if(4===e.elementCount)e instanceof x?F(t,e,255):e instanceof T?Q(t,e):e instanceof h&&I(t,e,8);else{K(t,255,255,255,255);const r=v.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof w?R(r,e,255):e instanceof v?z(r,e):e instanceof b&&E(r,e,8)}}else n(a)&&K(a.slice(f,d),255,255,255,255)}function se(e,t){switch(t){case U.TRIANGLES:return D(e,G);case U.TRIANGLE_STRIP:return _(e);case U.TRIANGLE_FAN:return O(e)}}function ie(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function ae(e){return{horizontal:ce(e.s),vertical:ce(e.t)}}function ce(e){switch(e){case V.CLAMP_TO_EDGE:return"clamp";case V.MIRRORED_REPEAT:return"mirror";case V.REPEAT:return"repeat"}}function ue(e){return e**(1/P)*255}function le(e,t){return f(ue(e[0]),ue(e[1]),ue(e[2]),t)}function fe(e){return l(ue(e[0]),ue(e[1]),ue(e[2]))}export{W as loadGLTFMesh};
5
+ import e from"../../../Color.js";import t from"../../../request.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{hasScaling as o}from"../../../core/mathUtils.js";import{isSome as n,unwrap as s,applySome as i,isNone as a}from"../../../core/maybe.js";import{d as c}from"../../../chunks/mat3.js";import{c as u}from"../../../chunks/mat3f64.js";import{f as l}from"../../../chunks/vec3f64.js";import{f}from"../../../chunks/vec4f64.js";import m from"../MeshComponent.js";import p from"../MeshMaterialMetallicRoughness.js";import d from"../MeshTexture.js";import{MeshVertexAttributes as g}from"../MeshVertexAttributes.js";import{BufferViewVec4f as x,BufferViewVec4u8 as T,BufferViewVec4u16 as h,BufferViewVec3u8 as v,BufferViewVec3f as w,BufferViewVec3u16 as b,BufferViewVec3f64 as j,BufferViewVec2f as y}from"../buffer/BufferView.js";import{t as A,a as M,n as C,s as R,b as E}from"../../../chunks/vec32.js";import{t as k,n as B,s as F,a as I}from"../../../chunks/vec42.js";import{createBuffer as $}from"../buffer/utils.js";import{georeferenceByTransform as L}from"./georeference.js";import{DefaultLoadingContext as S}from"../../../views/3d/glTF/DefaultLoadingContext.js";import{load as N}from"../../../views/3d/glTF/loader.js";import{triangleFanToTriangles as O,triangleStripToTriangles as _,trianglesToTriangles as D}from"../../../views/3d/glTF/internal/indexUtils.js";import{generateIndexArray as G}from"../../../views/3d/webgl-engine/lib/Indices.js";import{COLOR_GAMMA as P}from"../../../views/3d/webgl-engine/materials/DefaultMaterial_COLOR_GAMMA.js";import{PrimitiveType as U,TextureWrapMode as V}from"../../../views/webgl/enums.js";import{f as q,c as z}from"../../../chunks/vec33.js";import{f as K,c as Q}from"../../../chunks/vec43.js";import{n as H,f as J}from"../../../chunks/vec22.js";async function W(e,t,r){const o=new S(X(r)),s=(await N(o,t,r,!0)).model,i=s.lods.shift(),a=new Map,c=new Map;s.textures.forEach(((e,t)=>a.set(t,te(e)))),s.materials.forEach(((e,t)=>c.set(t,re(e,a))));const u=ee(i);for(const n of u.parts)oe(u,n,c);const{position:l,normal:f,tangent:m,color:p,texCoord0:d}=u.vertexAttributes,x={position:l.typedBuffer,normal:n(f)?f.typedBuffer:null,tangent:n(m)?m.typedBuffer:null,uv:n(d)?d.typedBuffer:null,color:n(p)?p.typedBuffer:null},T=L(x,e,r);return{transform:T.transform,components:u.components,spatialReference:e.spatialReference,vertexAttributes:new g({position:T.vertexAttributes.position,normal:T.vertexAttributes.normal,tangent:T.vertexAttributes.tangent,color:x.color,uv:x.uv})}}function X(e){const r=e?.resolveFile;return r?{busy:!1,request:async(e,o,s)=>{const i=r(e),a="image"===o?"image":"binary"===o?"array-buffer":"json";return(await t(i,{responseType:a,signal:n(s)?s.signal:null})).data}}:null}function Y(e,t){if(a(e))return"-";const o=e.typedBuffer;return`${r(t,o.buffer,(()=>t.size))}/${o.byteOffset}/${o.byteLength}`}function Z(e){return n(e)?e.toString():"-"}function ee(e){let t=0;const has={color:!1,tangent:!1,normal:!1,texCoord0:!1},o=new Map,n=new Map,s=[];for(const i of e.parts){const{attributes:{position:e,normal:a,color:c,tangent:u,texCoord0:l}}=i,f=`\n ${Y(e,o)}/\n ${Y(a,o)}/\n ${Y(c,o)}/\n ${Y(u,o)}/\n ${Y(l,o)}/\n ${Z(i.transform)}\n `;let m=!1;const p=r(n,f,(()=>(m=!0,{start:t,length:e.count})));m&&(t+=e.count),a&&(has.normal=!0),c&&(has.color=!0),u&&(has.tangent=!0),l&&(has.texCoord0=!0),s.push({gltf:i,writeVertices:m,region:p})}return{vertexAttributes:{position:$(j,t),normal:has.normal?$(w,t):null,tangent:has.tangent?$(x,t):null,color:has.color?$(T,t):null,texCoord0:has.texCoord0?$(y,t):null},parts:s,components:[]}}function te(e){return new d({data:e.data,wrap:ae(e.parameters.wrap)})}function re(t,r){const o=new e(le(t.color,t.opacity)),n=t.emissiveFactor?new e(fe(t.emissiveFactor)):null;return new p({color:o,colorTexture:s(i(t.textureColor,(e=>r.get(e)))),normalTexture:s(i(t.textureNormal,(e=>r.get(e)))),emissiveColor:n,emissiveTexture:s(i(t.textureEmissive,(e=>r.get(e)))),occlusionTexture:s(i(t.textureOcclusion,(e=>r.get(e)))),alphaMode:ie(t.alphaMode),alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,metallic:t.metallicFactor,roughness:t.roughnessFactor,metallicRoughnessTexture:s(i(t.textureMetallicRoughness,(e=>r.get(e)))),colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform})}function oe(e,t,r){t.writeVertices&&ne(e,t);const o=t.gltf,n=se(o.indices||o.attributes.position.count,o.primitiveType),s=t.region.start;if(s)for(let i=0;i<n.length;i++)n[i]+=s;e.components.push(new m({faces:n,material:r.get(o.material),trustSourceNormals:!0}))}function ne(e,t){const{position:r,normal:s,tangent:i,color:a,texCoord0:l}=e.vertexAttributes,f=t.region.start,{attributes:m,transform:p}=t.gltf,d=m.position.count;if(A(r.slice(f,d),m.position,p),n(m.normal)&&n(s)){const e=c(u(),p),t=s.slice(f,d);M(t,m.normal,e),o(e)&&C(t,t)}else n(s)&&q(s,0,0,1,{dstIndex:f,count:d});if(n(m.tangent)&&n(i)){const e=c(u(),p),t=i.slice(f,d);k(t,m.tangent,e),o(e)&&B(t,t)}else n(i)&&K(i,0,0,1,1,{dstIndex:f,count:d});if(n(m.texCoord0)&&n(l)?H(l.slice(f,d),m.texCoord0):n(l)&&J(l,0,0,{dstIndex:f,count:d}),n(m.color)&&n(a)){const e=m.color,t=a.slice(f,d);if(4===e.elementCount)e instanceof x?F(t,e,255):e instanceof T?Q(t,e):e instanceof h&&I(t,e,8);else{K(t,255,255,255,255);const r=v.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof w?R(r,e,255):e instanceof v?z(r,e):e instanceof b&&E(r,e,8)}}else n(a)&&K(a.slice(f,d),255,255,255,255)}function se(e,t){switch(t){case U.TRIANGLES:return D(e,G);case U.TRIANGLE_STRIP:return _(e);case U.TRIANGLE_FAN:return O(e)}}function ie(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function ae(e){return{horizontal:ce(e.s),vertical:ce(e.t)}}function ce(e){switch(e){case V.CLAMP_TO_EDGE:return"clamp";case V.MIRRORED_REPEAT:return"mirror";case V.REPEAT:return"repeat"}}function ue(e){return e**(1/P)*255}function le(e,t){return f(ue(e[0]),ue(e[1]),ue(e[2]),t)}function fe(e){return l(ue(e[0]),ue(e[1]),ue(e[2]))}export{W as loadGLTFMesh};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import r from"../../../core/Logger.js";import{isNone as e}from"../../../core/maybe.js";import{b as o,i as t,f as n,t as f}from"../../../chunks/mat3.js";import{c as a}from"../../../chunks/mat3f64.js";import{c}from"../../../chunks/mat4f64.js";import{t as m,n as s}from"../../../chunks/vec3.js";import{c as i}from"../../../chunks/vec3f64.js";import{projectBuffer as y,computeTranslationToOriginAndRotation as p}from"../../projection.js";import{getSphericalPCPF as u}from"../../projectionEllipsoid.js";import{isCGCS2000 as P,isMars as T,isMoon as l}from"../spatialReferenceUtils.js";import{y2lat as A}from"../webMercatorUtils.js";import{BufferViewVec3f as F,BufferViewVec3f64 as d}from"../buffer/BufferView.js";import{t as E,a as C,n as _}from"../../../chunks/vec32.js";const g=r.getLogger("esri.geometry.support.meshUtils.normalProjection");function j(r,e,o,t,n){return B(t)?(b(Y.TO_PCPF,F.fromTypedArray(r),d.fromTypedArray(e),d.fromTypedArray(o),t,F.fromTypedArray(n)),n):(g.error("Cannot convert spatial reference to PCPF"),n)}function h(r,e,o,t,n){return B(t)?(b(Y.FROM_PCPF,F.fromTypedArray(r),d.fromTypedArray(e),d.fromTypedArray(o),t,F.fromTypedArray(n)),n):(g.error("Cannot convert to spatial reference from PCPF"),n)}function M(r,e,o){return y(r,e,0,o,u(e),0,r.length/3),o}function O(r,e,o){return y(r,u(o),0,e,o,0,r.length/3),e}function R(r,o,t){if(e(r))return o;const n=d.fromTypedArray(r),f=d.fromTypedArray(o);return E(f,n,t),o}function v(r,n,f){if(e(r))return n;o(x,f);const a=F.fromTypedArray(r),c=F.fromTypedArray(n);return C(c,a,x),t(x)||_(c,c),n}function V(r,n,f){if(e(r))return n;o(x,f);const a=F.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),c=F.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT);if(C(c,a,x),t(x)||_(c,c),r!==n)for(let e=3;e<r.length;e+=4)n[e]=r[e];return n}function k(r,e,o,t,n){if(!B(t))return g.error("Cannot convert spatial reference to PCPF"),n;b(Y.TO_PCPF,F.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),d.fromTypedArray(e),d.fromTypedArray(o),t,F.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT));for(let f=3;f<r.length;f+=4)n[f]=r[f];return n}function L(r,e,o,t,n){if(!B(t))return g.error("Cannot convert to spatial reference from PCPF"),n;b(Y.FROM_PCPF,F.fromTypedArray(r,16),d.fromTypedArray(e),d.fromTypedArray(o),t,F.fromTypedArray(n,16));for(let f=3;f<r.length;f+=4)n[f]=r[f];return n}function b(r,e,o,t,a,c){if(!e)return;const i=o.count,y=u(a);if(S(a))for(let s=0;s<i;s++)t.getVec(s,U),e.getVec(s,w),p(y,U,W,y),n(x,W),r===Y.FROM_PCPF&&f(x,x),m(w,w,x),c.setVec(s,w);else for(let u=0;u<i;u++){t.getVec(u,U),e.getVec(u,w),p(y,U,W,y),n(x,W);const a=A(o.get(u,1));let i=Math.cos(a);r===Y.TO_PCPF&&(i=1/i),x[0]*=i,x[1]*=i,x[2]*=i,x[3]*=i,x[4]*=i,x[5]*=i,r===Y.FROM_PCPF&&f(x,x),m(w,w,x),s(w,w),c.setVec(u,w)}return c}function B(r){return S(r)||N(r)}function S(r){return r.isWGS84||P(r)||T(r)||l(r)}function N(r){return r.isWebMercator}var Y;!function(r){r[r.TO_PCPF=0]="TO_PCPF",r[r.FROM_PCPF=1]="FROM_PCPF"}(Y||(Y={}));const U=i(),w=i(),W=c(),x=a();export{O as projectFromPCPF,h as projectNormalFromPCPF,j as projectNormalToPCPF,L as projectTangentFromPCPF,k as projectTangentToPCPF,M as projectToPCPF,v as transformNormal,R as transformPosition,V as transformTangent};
5
+ import r from"../../../core/Logger.js";import{isNone as e}from"../../../core/maybe.js";import{d as o,i as t,f as n,t as f}from"../../../chunks/mat3.js";import{c as a}from"../../../chunks/mat3f64.js";import{c}from"../../../chunks/mat4f64.js";import{t as m,n as s}from"../../../chunks/vec3.js";import{c as i}from"../../../chunks/vec3f64.js";import{projectBuffer as y,computeTranslationToOriginAndRotation as p}from"../../projection.js";import{getSphericalPCPF as u}from"../../projectionEllipsoid.js";import{isCGCS2000 as P,isMars as T,isMoon as l}from"../spatialReferenceUtils.js";import{y2lat as A}from"../webMercatorUtils.js";import{BufferViewVec3f as F,BufferViewVec3f64 as d}from"../buffer/BufferView.js";import{t as E,a as C,n as _}from"../../../chunks/vec32.js";const g=r.getLogger("esri.geometry.support.meshUtils.normalProjection");function j(r,e,o,t,n){return S(t)?(B(Y.TO_PCPF,F.fromTypedArray(r),d.fromTypedArray(e),d.fromTypedArray(o),t,F.fromTypedArray(n)),n):(g.error("Cannot convert spatial reference to PCPF"),n)}function h(r,e,o,t,n){return S(t)?(B(Y.FROM_PCPF,F.fromTypedArray(r),d.fromTypedArray(e),d.fromTypedArray(o),t,F.fromTypedArray(n)),n):(g.error("Cannot convert to spatial reference from PCPF"),n)}function M(r,e,o){return y(r,e,0,o,u(e),0,r.length/3),o}function O(r,e,o){return y(r,u(o),0,e,o,0,r.length/3),e}function R(r,o,t){if(e(r))return o;const n=d.fromTypedArray(r),f=d.fromTypedArray(o);return E(f,n,t),o}function v(r,n,f){if(e(r))return n;o(x,f);const a=F.fromTypedArray(r),c=F.fromTypedArray(n);return C(c,a,x),t(x)||_(c,c),n}function V(r,n,f){if(e(r))return n;o(x,f);const a=F.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),c=F.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT);if(C(c,a,x),t(x)||_(c,c),r!==n)for(let e=3;e<r.length;e+=4)n[e]=r[e];return n}function k(r,e,o,t,n){if(!S(t))return g.error("Cannot convert spatial reference to PCPF"),n;B(Y.TO_PCPF,F.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),d.fromTypedArray(e),d.fromTypedArray(o),t,F.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT));for(let f=3;f<r.length;f+=4)n[f]=r[f];return n}function L(r,e,o,t,n){if(!S(t))return g.error("Cannot convert to spatial reference from PCPF"),n;B(Y.FROM_PCPF,F.fromTypedArray(r,16),d.fromTypedArray(e),d.fromTypedArray(o),t,F.fromTypedArray(n,16));for(let f=3;f<r.length;f+=4)n[f]=r[f];return n}function B(r,e,o,t,a,c){if(!e)return;const i=o.count,y=u(a);if(b(a))for(let s=0;s<i;s++)t.getVec(s,U),e.getVec(s,w),p(y,U,W,y),n(x,W),r===Y.FROM_PCPF&&f(x,x),m(w,w,x),c.setVec(s,w);else for(let u=0;u<i;u++){t.getVec(u,U),e.getVec(u,w),p(y,U,W,y),n(x,W);const a=A(o.get(u,1));let i=Math.cos(a);r===Y.TO_PCPF&&(i=1/i),x[0]*=i,x[1]*=i,x[2]*=i,x[3]*=i,x[4]*=i,x[5]*=i,r===Y.FROM_PCPF&&f(x,x),m(w,w,x),s(w,w),c.setVec(u,w)}return c}function S(r){return b(r)||N(r)}function b(r){return r.isWGS84||P(r)||T(r)||l(r)}function N(r){return r.isWebMercator}var Y;!function(r){r[r.TO_PCPF=0]="TO_PCPF",r[r.FROM_PCPF=1]="FROM_PCPF"}(Y||(Y={}));const U=i(),w=i(),W=c(),x=a();export{O as projectFromPCPF,h as projectNormalFromPCPF,j as projectNormalToPCPF,L as projectTangentFromPCPF,k as projectTangentToPCPF,M as projectToPCPF,v as transformNormal,R as transformPosition,V as transformTangent};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/Logger.js";import{isSome as e,isNone as r}from"../../../core/maybe.js";import{f as o}from"../../../chunks/mat3.js";import{c as i}from"../../../chunks/mat3f64.js";import{d as n}from"../../../chunks/mat4.js";import{c as s}from"../../../chunks/mat4f64.js";import{s as a,b as c,a as f,t as p,m}from"../../../chunks/vec3.js";import{c as g,Z as l}from"../../../chunks/vec3f64.js";import{projectPointToVector as u,computeTranslationToOriginAndRotation as h}from"../../projection.js";import{getSphericalPCPF as j}from"../../projectionEllipsoid.js";import{create as v,compose as x,axis as A,angleRad as b}from"../axisAngleDegrees.js";import{isGeographicMesh as d}from"./geographicUtils.js";import{projectToPCPF as k,projectNormalToPCPF as y,projectTangentToPCPF as w,projectFromPCPF as R,projectNormalFromPCPF as F,projectTangentFromPCPF as L}from"./projection.js";const $=t.getLogger("esri.geometry.support.meshUtils.rotate");function z(t,r,o){if(!t.vertexAttributes||!t.vertexAttributes.position||0===r[3])return;const i=t.spatialReference;if(e(t.transform)){null!=o?.geographic&&o.geographic!==t.transform.geographic&&$.warn(`Specifying the 'geographic' parameter (${o.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`);const e=o?.origin??t.transform.getOriginPoint(i);C(t.transform,r,e)}else{const e=o?.origin??t.origin;d(t.spatialReference,o)?I(t,r,e):U(t,r,e)}}function C(t,e,r){const o=a(E,r.x,r.y,r.z),i=c(E,o,t.origin);t.applyLocalInverse(i,M),t.rotation=x(t.rotation,e,v()),t.applyLocalInverse(i,i),c(i,i,M),t.translation=f(g(),t.translation,i)}function I(t,r,i){const n=t.spatialReference,s=j(n),a=Z;u(i,a,s)||u(t.origin,a,s);const c=t.vertexAttributes.position,f=t.vertexAttributes.normal,m=t.vertexAttributes.tangent,g=new Float64Array(c.length),l=e(f)?new Float32Array(f.length):null,v=e(m)?new Float32Array(m.length):null;h(s,a,P,s),o(S,P);const x=O;p(A(O),A(r),S),x[3]=r[3],k(c,n,g),e(f)&&e(l)&&y(f,c,g,n,l),e(m)&&e(v)&&w(m,c,g,n,v),D(g,x,3,a),R(g,c,n),e(f)&&e(l)&&(D(l,x,3),F(l,c,g,n,f)),e(m)&&e(v)&&(D(v,x,4),L(v,c,g,n,m)),t.vertexAttributesChanged()}function U(t,e,r){const o=Z;if(!u(r,o,t.spatialReference)){const e=t.origin;o[0]=e.x,o[1]=e.y,o[2]=e.z,$.error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}D(t.vertexAttributes.position,e,3,o),D(t.vertexAttributes.normal,e,3),D(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}function D(t,e,o,i=l){if(!r(t)){n(P,b(e),A(e));for(let e=0;e<t.length;e+=o){for(let r=0;r<3;r++)E[r]=t[e+r]-i[r];m(E,E,P);for(let r=0;r<3;r++)t[e+r]=E[r]+i[r]}}}const E=g(),M=g(),O=v(),P=s(),S=i(),Z=g();export{z as rotate};
5
+ import t from"../../../core/Logger.js";import{isSome as e,isNone as r}from"../../../core/maybe.js";import{f as o}from"../../../chunks/mat3.js";import{c as i}from"../../../chunks/mat3f64.js";import{d as n}from"../../../chunks/mat4.js";import{c as s}from"../../../chunks/mat4f64.js";import{s as a,b as c,a as f,t as p,v as m}from"../../../chunks/vec3.js";import{c as g,Z as l}from"../../../chunks/vec3f64.js";import{projectPointToVector as u,computeTranslationToOriginAndRotation as h}from"../../projection.js";import{getSphericalPCPF as j}from"../../projectionEllipsoid.js";import{create as v,compose as x,axis as A,angleRad as b}from"../axisAngleDegrees.js";import{isGeographicMesh as d}from"./geographicUtils.js";import{projectToPCPF as k,projectNormalToPCPF as y,projectTangentToPCPF as w,projectFromPCPF as R,projectNormalFromPCPF as F,projectTangentFromPCPF as L}from"./projection.js";const $=t.getLogger("esri.geometry.support.meshUtils.rotate");function z(t,r,o){if(!t.vertexAttributes||!t.vertexAttributes.position||0===r[3])return;const i=t.spatialReference;if(e(t.transform)){null!=o?.geographic&&o.geographic!==t.transform.geographic&&$.warn(`Specifying the 'geographic' parameter (${o.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`);const e=o?.origin??t.transform.getOriginPoint(i);C(t.transform,r,e)}else{const e=o?.origin??t.origin;d(t.spatialReference,o)?I(t,r,e):U(t,r,e)}}function C(t,e,r){const o=a(E,r.x,r.y,r.z),i=c(E,o,t.origin);t.applyLocalInverse(i,M),t.rotation=x(t.rotation,e,v()),t.applyLocalInverse(i,i),c(i,i,M),t.translation=f(g(),t.translation,i)}function I(t,r,i){const n=t.spatialReference,s=j(n),a=Z;u(i,a,s)||u(t.origin,a,s);const c=t.vertexAttributes.position,f=t.vertexAttributes.normal,m=t.vertexAttributes.tangent,g=new Float64Array(c.length),l=e(f)?new Float32Array(f.length):null,v=e(m)?new Float32Array(m.length):null;h(s,a,P,s),o(S,P);const x=O;p(A(O),A(r),S),x[3]=r[3],k(c,n,g),e(f)&&e(l)&&y(f,c,g,n,l),e(m)&&e(v)&&w(m,c,g,n,v),D(g,x,3,a),R(g,c,n),e(f)&&e(l)&&(D(l,x,3),F(l,c,g,n,f)),e(m)&&e(v)&&(D(v,x,4),L(v,c,g,n,m)),t.vertexAttributesChanged()}function U(t,e,r){const o=Z;if(!u(r,o,t.spatialReference)){const e=t.origin;o[0]=e.x,o[1]=e.y,o[2]=e.z,$.error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}D(t.vertexAttributes.position,e,3,o),D(t.vertexAttributes.normal,e,3),D(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}function D(t,e,o,i=l){if(!r(t)){n(P,b(e),A(e));for(let e=0;e<t.length;e+=o){for(let r=0;r<3;r++)E[r]=t[e+r]-i[r];m(E,E,P);for(let r=0;r<3;r++)t[e+r]=E[r]+i[r]}}}const E=g(),M=g(),O=v(),P=s(),S=i(),Z=g();export{z as rotate};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as t}from"../../core/mathUtils.js";import{isSome as n}from"../../core/maybe.js";import{c as r,k as o,b as c,n as e,e as u,f as i,g as f,a as s,s as a}from"../../chunks/vec3.js";import{c as I}from"../../chunks/vec3f64.js";import{g as N}from"../../chunks/sphere.js";import{projectPointSignedLength as m}from"./vector.js";import{sv4d as M,sv3d as g}from"./vectorStacks.js";import{tangentFrame as h}from"../../views/3d/support/mathUtils.js";function p(t=$){return[t[0],t[1],t[2],t[3]]}function E(t=$[0],n=$[1],r=$[2],o=$[3]){return F(t,n,r,o,M.get())}function A(t,n){return F(n[0],n[1],n[2],n[3],t)}function F(t,n,r,o,c=p()){return c[0]=t,c[1]=n,c[2]=r,c[3]=o,c}function T(t,n,o){return r(o,t),o[3]=n,o}function _(t,n,r){const o=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],c=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=n[0]*c,r[1]=n[1]*c,r[2]=n[2]*c,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function j(t,n,r,o=p()){const c=r[0]-n[0],e=r[1]-n[1],u=r[2]-n[2],i=t[0]-n[0],f=t[1]-n[1],s=t[2]-n[2],a=e*s-u*f,I=u*i-c*s,N=c*f-e*i,m=a*a+I*I+N*N,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return o[0]=a*M,o[1]=I*M,o[2]=N*M,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function v(t,n){return b(t,n,0,1,2)}function b(t,n,r,i,f){if(t.count<3)return!1;t.getVec(r,y);let s=i,a=!1;for(;s<t.count-1&&!a;)t.getVec(s,X),s++,a=!o(y,X);if(!a)return!1;for(s=Math.max(s,f),a=!1;s<t.count&&!a;)t.getVec(s,d),s++,c(l,y,X),e(l,l),c(C,X,d),e(C,C),a=!o(y,d)&&!o(X,d)&&Math.abs(u(l,C))<k;return a?(j(y,X,d,n),!0):(0!==r||1!==i||2!==f)&&b(t,n,0,1,2)}const k=.99619469809,y=I(),X=I(),d=I(),l=I(),C=I();function L(t,n,r){return n!==t&&A(t,n),t[3]=-u(Z(t),r),t}function P(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}function O(t,n,r,o){return i(d,n,t),_(r,d,o)}function V(t,n,r,o){return Y(t,n,c(g.get(),r,n),nt,o)}function q(t,r,o){return!!n(r)&&Y(t,r.origin,r.direction,rt,o)}function x(t,n,r){return Y(t,n.origin,n.vector,tt.NONE,r)}function U(t,n,r){return Y(t,n.origin,n.vector,tt.CLAMP,r)}function w(t,n){return W(t,N(n))-n[3]>=0}function S(t,n){return W(t,N(n))+n[3]<0}function z(t,n){return W(t,n)>=0}function B(t,n){return W(t,n)<0}function D(t,n){const r=n[0],o=n[1],c=n[2],e=n[3],u=n[4],i=n[5];return t[0]*(t[0]>0?r:e)+t[1]*(t[1]>0?o:u)+t[2]*(t[2]>0?c:i)+t[3]>=0}function G(t,n){const r=u(Z(t),n.ray.direction),o=-W(t,n.ray.origin);if(o<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return o>0;if((o<0||r<0)&&!(o<0&&r<0))return!0;const c=o/r;return r>0?c<n.c1&&(n.c1=c):c>n.c0&&(n.c0=c),n.c0<=n.c1}function H(t,n){const r=u(Z(t),n.ray.direction),o=-W(t,n.ray.origin);if(r>-1e-6&&r<1e-6)return o>0;const c=o/r;return r>0?c<n.c1&&(n.c1=c):c>n.c0&&(n.c0=c),n.c0<=n.c1}function J(t,n,r){const o=f(g.get(),Z(t),-t[3]),e=Q(t,c(g.get(),n,o),g.get());return s(r,e,o),r}function K(t,n,r,o){const e=Z(t),u=g.get(),i=g.get();h(e,u,i);const f=c(g.get(),r,n),s=m(u,f),I=m(i,f),N=m(e,f);return a(o,s,I,N)}function Q(t,n,r){const o=f(g.get(),Z(t),u(Z(t),n));return c(r,n,o),r}function R(t,n){return Math.abs(W(t,n))}function W(t,n){return u(Z(t),n)+t[3]}function Y(n,r,o,c,e){const i=u(Z(n),o);if(0===i)return!1;let a=-(u(Z(n),r)+n[3])/i;return c&tt.CLAMP&&(a=t(a,0,1)),!(!(c&tt.INFINITE_MIN)&&a<0||!(c&tt.INFINITE_MAX)&&a>1)&&(s(e,r,f(e,o,a)),!0)}function Z(t){return t}const $=[0,0,1,0];var tt;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(tt||(tt={}));const nt=tt.INFINITE_MIN|tt.INFINITE_MAX,rt=tt.INFINITE_MAX;export{$ as UP,G as clip,H as clipInfinite,A as copy,p as create,R as distance,v as fromManyPoints,b as fromManyPointsSampleAt,T as fromNormalAndOffset,j as fromPoints,_ as fromPositionAndNormal,F as fromValues,O as fromVectorsAndPoint,V as intersectLine,x as intersectLineSegment,U as intersectLineSegmentClamp,q as intersectRay,D as isAABBFullyInside,z as isPointInside,B as isPointOutside,w as isSphereFullyInside,S as isSphereFullyOutside,P as negate,Z as normal,J as projectPoint,K as projectPointLocal,Q as projectVector,L as setOffsetFromPoint,W as signedDistance,E as wrap};
5
+ import{clamp as t}from"../../core/mathUtils.js";import{isSome as n}from"../../core/maybe.js";import{c as r,w as o,b as c,n as e,e as u,f as i,g as f,a as s,s as a}from"../../chunks/vec3.js";import{c as I}from"../../chunks/vec3f64.js";import{g as N}from"../../chunks/sphere.js";import{projectPointSignedLength as m}from"./vector.js";import{sv4d as M,sv3d as g}from"./vectorStacks.js";import{tangentFrame as h}from"../../views/3d/support/mathUtils.js";function p(t=$){return[t[0],t[1],t[2],t[3]]}function E(t=$[0],n=$[1],r=$[2],o=$[3]){return F(t,n,r,o,M.get())}function A(t,n){return F(n[0],n[1],n[2],n[3],t)}function F(t,n,r,o,c=p()){return c[0]=t,c[1]=n,c[2]=r,c[3]=o,c}function T(t,n,o){return r(o,t),o[3]=n,o}function _(t,n,r){const o=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],c=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=n[0]*c,r[1]=n[1]*c,r[2]=n[2]*c,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function j(t,n,r,o=p()){const c=r[0]-n[0],e=r[1]-n[1],u=r[2]-n[2],i=t[0]-n[0],f=t[1]-n[1],s=t[2]-n[2],a=e*s-u*f,I=u*i-c*s,N=c*f-e*i,m=a*a+I*I+N*N,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return o[0]=a*M,o[1]=I*M,o[2]=N*M,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function v(t,n){return b(t,n,0,1,2)}function b(t,n,r,i,f){if(t.count<3)return!1;t.getVec(r,X);let s=i,a=!1;for(;s<t.count-1&&!a;)t.getVec(s,d),s++,a=!o(X,d);if(!a)return!1;for(s=Math.max(s,f),a=!1;s<t.count&&!a;)t.getVec(s,k),s++,c(l,X,d),e(l,l),c(C,d,k),e(C,C),a=!o(X,k)&&!o(d,k)&&Math.abs(u(l,C))<y;return a?(j(X,d,k,n),!0):(0!==r||1!==i||2!==f)&&b(t,n,0,1,2)}const y=.99619469809,X=I(),d=I(),k=I(),l=I(),C=I();function L(t,n,r){return n!==t&&A(t,n),t[3]=-u(Z(t),r),t}function P(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}function O(t,n,r,o){return i(k,n,t),_(r,k,o)}function V(t,n,r,o){return Y(t,n,c(g.get(),r,n),nt,o)}function q(t,r,o){return!!n(r)&&Y(t,r.origin,r.direction,rt,o)}function w(t,n,r){return Y(t,n.origin,n.vector,tt.NONE,r)}function x(t,n,r){return Y(t,n.origin,n.vector,tt.CLAMP,r)}function U(t,n){return W(t,N(n))-n[3]>=0}function S(t,n){return W(t,N(n))+n[3]<0}function z(t,n){return W(t,n)>=0}function B(t,n){return W(t,n)<0}function D(t,n){const r=n[0],o=n[1],c=n[2],e=n[3],u=n[4],i=n[5];return t[0]*(t[0]>0?r:e)+t[1]*(t[1]>0?o:u)+t[2]*(t[2]>0?c:i)+t[3]>=0}function G(t,n){const r=u(Z(t),n.ray.direction),o=-W(t,n.ray.origin);if(o<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return o>0;if((o<0||r<0)&&!(o<0&&r<0))return!0;const c=o/r;return r>0?c<n.c1&&(n.c1=c):c>n.c0&&(n.c0=c),n.c0<=n.c1}function H(t,n){const r=u(Z(t),n.ray.direction),o=-W(t,n.ray.origin);if(r>-1e-6&&r<1e-6)return o>0;const c=o/r;return r>0?c<n.c1&&(n.c1=c):c>n.c0&&(n.c0=c),n.c0<=n.c1}function J(t,n,r){const o=f(g.get(),Z(t),-t[3]),e=Q(t,c(g.get(),n,o),g.get());return s(r,e,o),r}function K(t,n,r,o){const e=Z(t),u=g.get(),i=g.get();h(e,u,i);const f=c(g.get(),r,n),s=m(u,f),I=m(i,f),N=m(e,f);return a(o,s,I,N)}function Q(t,n,r){const o=f(g.get(),Z(t),u(Z(t),n));return c(r,n,o),r}function R(t,n){return Math.abs(W(t,n))}function W(t,n){return u(Z(t),n)+t[3]}function Y(n,r,o,c,e){const i=u(Z(n),o);if(0===i)return!1;let a=-(u(Z(n),r)+n[3])/i;return c&tt.CLAMP&&(a=t(a,0,1)),!(!(c&tt.INFINITE_MIN)&&a<0||!(c&tt.INFINITE_MAX)&&a>1)&&(s(e,r,f(e,o,a)),!0)}function Z(t){return t}const $=[0,0,1,0];var tt;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(tt||(tt={}));const nt=tt.INFINITE_MIN|tt.INFINITE_MAX,rt=tt.INFINITE_MAX;export{$ as UP,G as clip,H as clipInfinite,A as copy,p as create,R as distance,v as fromManyPoints,b as fromManyPointsSampleAt,T as fromNormalAndOffset,j as fromPoints,_ as fromPositionAndNormal,F as fromValues,O as fromVectorsAndPoint,V as intersectLine,w as intersectLineSegment,x as intersectLineSegmentClamp,q as intersectRay,D as isAABBFullyInside,z as isPointInside,B as isPointOutside,U as isSphereFullyInside,S as isSphereFullyOutside,P as negate,Z as normal,J as projectPoint,K as projectPointLocal,Q as projectVector,L as setOffsetFromPoint,W as signedDistance,E as wrap};
package/interfaces.d.ts CHANGED
@@ -19408,6 +19408,14 @@ declare namespace __esri {
19408
19408
  }
19409
19409
 
19410
19410
  export class AggregateField {
19411
+ /**
19412
+ * The display name for the aggregate field.
19413
+ *
19414
+ * @default null
19415
+ *
19416
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AggregateField.html#alias)
19417
+ */
19418
+ alias: string;
19411
19419
  /**
19412
19420
  * The name of the aggregate field.
19413
19421
  *
@@ -19420,6 +19428,27 @@ declare namespace __esri {
19420
19428
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AggregateField.html#outStatistic)
19421
19429
  */
19422
19430
  outStatistic: OutStatistic;
19431
+ /**
19432
+ * The data type of the aggregate field.
19433
+ *
19434
+ * @default null
19435
+ *
19436
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AggregateField.html#type)
19437
+ */
19438
+ type: | "small-integer"
19439
+ | "integer"
19440
+ | "single"
19441
+ | "double"
19442
+ | "long"
19443
+ | "string"
19444
+ | "date"
19445
+ | "oid"
19446
+ | "geometry"
19447
+ | "blob"
19448
+ | "raster"
19449
+ | "guid"
19450
+ | "global-id"
19451
+ | "xml";
19423
19452
  /**
19424
19453
  * Defines the aggregate fields used in a layer visualized with [binning](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureReductionBinning.html).
19425
19454
  *
@@ -19439,6 +19468,14 @@ declare namespace __esri {
19439
19468
  export type AggregateFieldConstructor = typeof AggregateField;
19440
19469
 
19441
19470
  interface AggregateFieldProperties {
19471
+ /**
19472
+ * The display name for the aggregate field.
19473
+ *
19474
+ * @default null
19475
+ *
19476
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AggregateField.html#alias)
19477
+ */
19478
+ alias?: string;
19442
19479
  /**
19443
19480
  * The name of the aggregate field.
19444
19481
  *
@@ -19451,6 +19488,27 @@ declare namespace __esri {
19451
19488
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AggregateField.html#outStatistic)
19452
19489
  */
19453
19490
  outStatistic?: OutStatisticProperties;
19491
+ /**
19492
+ * The data type of the aggregate field.
19493
+ *
19494
+ * @default null
19495
+ *
19496
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AggregateField.html#type)
19497
+ */
19498
+ type?: | "small-integer"
19499
+ | "integer"
19500
+ | "single"
19501
+ | "double"
19502
+ | "long"
19503
+ | "string"
19504
+ | "date"
19505
+ | "oid"
19506
+ | "geometry"
19507
+ | "blob"
19508
+ | "raster"
19509
+ | "guid"
19510
+ | "global-id"
19511
+ | "xml";
19454
19512
  }
19455
19513
 
19456
19514
  /**
@@ -54123,6 +54181,18 @@ declare namespace __esri {
54123
54181
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-type.html#createRenderer)
54124
54182
  */
54125
54183
  field?: string;
54184
+ /**
54185
+ * Specifies the name of a second attribute field used to categorize features.
54186
+ *
54187
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-type.html#createRenderer)
54188
+ */
54189
+ field2?: string;
54190
+ /**
54191
+ * Specifies the name of a third attribute field used to categorize features.
54192
+ *
54193
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-type.html#createRenderer)
54194
+ */
54195
+ field3?: string;
54126
54196
  /**
54127
54197
  * The number of types (or categories) displayed by the renderer.
54128
54198
  *
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../PopupTemplate.js";import"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import"../../renderers/Renderer.js";import"../../renderers/SimpleRenderer.js";import"../../renderers/UniqueValueRenderer.js";import"../../renderers/support/jsonUtils.js";import{webSceneRendererTypes as t}from"../../renderers/support/types.js";import o from"../../request.js";import s from"../../core/Error.js";import{JSONMap as i}from"../../core/jsonMap.js";import a from"../../core/Loadable.js";import n from"../../core/Logger.js";import{isSome as p,isNone as l}from"../../core/maybe.js";import{EsriPromiseMixin as d}from"../../core/Promise.js";import{property as y}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{enumeration as u}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as c}from"../../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import h from"../../geometry/Extent.js";import f from"../../geometry/SpatialReference.js";import g from"../FeatureLayer.js";import j from"./BuildingSublayer.js";import{zeroCapabilities as v}from"../support/capabilities.js";import{popupEnabled as b}from"../support/commonProperties.js";import{defineFieldProperties as L}from"../support/fieldProperties.js";import S from"../support/FieldsIndex.js";import{fetchIndexInfo as I}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as F,I3SMaterialDefinition as O,I3STextureSetDefinition as x,I3SGeometryDefinition as w}from"../support/I3SLayerDefinitions.js";import T from"../../rest/support/Query.js";import{createPopupTemplate as R}from"../../support/popupUtils.js";import q from"../../symbols/support/ElevationInfo.js";const P="esri.layers.buildingSublayers.BuildingComponentSublayer",D=n.getLogger(P),Q=L();let E=class extends(a.LoadableMixin(d(j))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl.path}/sublayers/${this.id}`,query:this.layer.parsedUrl.query}:{path:""}}get fieldsIndex(){return new S(this.fields)}readAssociatedLayer(e,r){const t=this.layer.associatedFeatureServiceItem,o=r.associatedLayerID;return p(t)&&"number"==typeof o?new g({portalItem:t,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return p(this.associatedLayer)?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const r=p(e)?e.signal:null,t=this._fetchService(r).then((()=>{this.indexInfo=I(this.parsedUrl.path,this.rootNode,this.nodePages,this.apiKey,D,r)}));return this.addResolvingPromise(t),Promise.resolve(this)}createPopupTemplate(e){return R(this,e)}async _fetchService(e){const r=(await o(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(r,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,r){const t=this.getFeatureType(r?.feature)?.domains?.[e];return t&&"inherited"!==t.type?t:this.getField(e)?.domain??null}getFeatureType(e){return e&&p(this.associatedLayer)?this.associatedLayer.getFeatureType(e):null}get types(){return p(this.associatedLayer)?this.associatedLayer.types:[]}get typeIdField(){return p(this.associatedLayer)?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=p(this.associatedLayer)&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:v,{query:r,data:{supportsZ:t,supportsM:o,isVersioned:s}}=e;return{query:r,data:{supportsZ:t,supportsM:o,isVersioned:s}}}createQuery(){const e=new T;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryExtent(e||this.createQuery(),r)))}queryFeatureCount(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryFeatureCount(e||this.createQuery(),r)))}queryFeatures(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryFeatures(e||this.createQuery(),r))).then((e=>{if(e?.features)for(const r of e.features)r.layer=this.layer,r.sourceLayer=this;return e}))}queryObjectIds(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryObjectIds(e||this.createQuery(),r)))}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:p(this.associatedLayer)}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return p(e)&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),l(this.associatedLayer))throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([y({readOnly:!0})],E.prototype,"parsedUrl",null),e([y({type:F,readOnly:!0})],E.prototype,"nodePages",void 0),e([y({type:[O],readOnly:!0})],E.prototype,"materialDefinitions",void 0),e([y({type:[x],readOnly:!0})],E.prototype,"textureSetDefinitions",void 0),e([y({type:[w],readOnly:!0})],E.prototype,"geometryDefinitions",void 0),e([y({readOnly:!0})],E.prototype,"serviceUpdateTimeStamp",void 0),e([y({readOnly:!0})],E.prototype,"store",void 0),e([y({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],E.prototype,"rootNode",void 0),e([y({readOnly:!0})],E.prototype,"attributeStorageInfo",void 0),e([y(Q.fields)],E.prototype,"fields",void 0),e([y({readOnly:!0})],E.prototype,"fieldsIndex",null),e([y({readOnly:!0,type:g})],E.prototype,"associatedLayer",void 0),e([c("service","associatedLayer",["associatedLayerID"])],E.prototype,"readAssociatedLayer",null),e([y(Q.outFields)],E.prototype,"outFields",void 0),e([y({type:String,readOnly:!0})],E.prototype,"objectIdField",null),e([y({readOnly:!0,type:String,json:{read:!1}})],E.prototype,"displayField",null),e([y({readOnly:!0,type:String})],E.prototype,"apiKey",null),e([y({readOnly:!0,type:h})],E.prototype,"fullExtent",null),e([y({readOnly:!0,type:f})],E.prototype,"spatialReference",null),e([y({readOnly:!0})],E.prototype,"version",null),e([y({readOnly:!0,type:q})],E.prototype,"elevationInfo",null),e([y({readOnly:!0,type:Number})],E.prototype,"minScale",null),e([y({readOnly:!0,type:Number})],E.prototype,"maxScale",null),e([y({readOnly:!0,type:Number})],E.prototype,"effectiveScaleRange",null),e([y({type:["hide","show"],json:{write:!0}})],E.prototype,"listMode",void 0),e([y({types:t,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],E.prototype,"renderer",void 0),e([y({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],E.prototype,"definitionExpression",void 0),e([y(b)],E.prototype,"popupEnabled",void 0),e([y({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],E.prototype,"popupTemplate",void 0),e([y({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],E.prototype,"normalReferenceFrame",void 0),e([y({readOnly:!0,json:{read:!1}})],E.prototype,"defaultPopupTemplate",null),e([y()],E.prototype,"types",null),e([y()],E.prototype,"typeIdField",null),e([y({json:{write:!1}}),u(new i({"3DObject":"3d-object",Point:"point"}))],E.prototype,"layerType",void 0),e([y()],E.prototype,"geometryType",null),e([y()],E.prototype,"profile",null),e([y({readOnly:!0,json:{read:!1}})],E.prototype,"capabilities",null),E=e([m(P)],E);const U=E;export{U as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../Graphic.js";import t from"../../PopupTemplate.js";import"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import"../../renderers/Renderer.js";import"../../renderers/SimpleRenderer.js";import"../../renderers/UniqueValueRenderer.js";import"../../renderers/support/jsonUtils.js";import{webSceneRendererTypes as o}from"../../renderers/support/types.js";import s from"../../request.js";import i from"../../core/Error.js";import{JSONMap as a}from"../../core/jsonMap.js";import n from"../../core/Loadable.js";import p from"../../core/Logger.js";import{isSome as l,isNone as d}from"../../core/maybe.js";import{EsriPromiseMixin as y}from"../../core/Promise.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{enumeration as c}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as m}from"../../core/accessorSupport/decorators/reader.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import f from"../../geometry/Extent.js";import g from"../../geometry/SpatialReference.js";import j from"../FeatureLayer.js";import v from"./BuildingSublayer.js";import{zeroCapabilities as b}from"../support/capabilities.js";import{popupEnabled as L}from"../support/commonProperties.js";import{defineFieldProperties as S}from"../support/fieldProperties.js";import I from"../support/FieldsIndex.js";import{unpackFieldNames as F}from"../support/fieldUtils.js";import{fetchIndexInfo as w}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as x,I3SMaterialDefinition as O,I3STextureSetDefinition as T,I3SGeometryDefinition as q}from"../support/I3SLayerDefinitions.js";import R from"../../rest/support/Query.js";import{createPopupTemplate as P}from"../../support/popupUtils.js";import U from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as D}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Q,getFetchPopupTemplate as E}from"../../views/layers/support/popupUtils.js";const _="esri.layers.buildingSublayers.BuildingComponentSublayer",A=p.getLogger(_),N=S();let C=class extends(n.LoadableMixin(y(v))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl.path}/sublayers/${this.id}`,query:this.layer.parsedUrl.query}:{path:""}}get fieldsIndex(){return new I(this.fields)}readAssociatedLayer(e,r){const t=this.layer.associatedFeatureServiceItem,o=r.associatedLayerID;return l(t)&&"number"==typeof o?new j({portalItem:t,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return l(this.associatedLayer)?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const r=l(e)?e.signal:null,t=this._fetchService(r).then((()=>{this.indexInfo=w(this.parsedUrl.path,this.rootNode,this.nodePages,this.apiKey,A,r)}));return this.addResolvingPromise(t),Promise.resolve(this)}createPopupTemplate(e){return P(this,e)}async _fetchService(e){const r=(await s(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(r,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,r){const t=this.getFeatureType(r?.feature)?.domains?.[e];return t&&"inherited"!==t.type?t:this.getField(e)?.domain??null}getFeatureType(e){return e&&l(this.associatedLayer)?this.associatedLayer.getFeatureType(e):null}get types(){return l(this.associatedLayer)?this.associatedLayer.types:[]}get typeIdField(){return l(this.associatedLayer)?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=l(this.associatedLayer)&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:b,{query:r,data:{supportsZ:t,supportsM:o,isVersioned:s}}=e;return{query:r,data:{supportsZ:t,supportsM:o,isVersioned:s}}}createQuery(){const e=new R;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryExtent(e||this.createQuery(),r)))}queryFeatureCount(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryFeatureCount(e||this.createQuery(),r)))}queryFeatures(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryFeatures(e||this.createQuery(),r))).then((e=>{if(e?.features)for(const r of e.features)r.layer=this.layer,r.sourceLayer=this;return e}))}queryObjectIds(e,r){return this._getAssociatedLayerForQuery().then((t=>t.queryObjectIds(e||this.createQuery(),r)))}async queryCachedFeature(e,t){const o=F(this.fieldsIndex,await Q(this,E(this))),s=await D(this.parsedUrl.path,this.attributeStorageInfo,e,[t],o);if(!s||0===s.length)throw new i("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const a=new r;return a.attributes=s[0],a.layer=this,a.sourceLayer=this,a}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:l(this.associatedLayer)}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return l(e)&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),d(this.associatedLayer))throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([u({readOnly:!0})],C.prototype,"parsedUrl",null),e([u({type:x,readOnly:!0})],C.prototype,"nodePages",void 0),e([u({type:[O],readOnly:!0})],C.prototype,"materialDefinitions",void 0),e([u({type:[T],readOnly:!0})],C.prototype,"textureSetDefinitions",void 0),e([u({type:[q],readOnly:!0})],C.prototype,"geometryDefinitions",void 0),e([u({readOnly:!0})],C.prototype,"serviceUpdateTimeStamp",void 0),e([u({readOnly:!0})],C.prototype,"store",void 0),e([u({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],C.prototype,"rootNode",void 0),e([u({readOnly:!0})],C.prototype,"attributeStorageInfo",void 0),e([u(N.fields)],C.prototype,"fields",void 0),e([u({readOnly:!0})],C.prototype,"fieldsIndex",null),e([u({readOnly:!0,type:j})],C.prototype,"associatedLayer",void 0),e([m("service","associatedLayer",["associatedLayerID"])],C.prototype,"readAssociatedLayer",null),e([u(N.outFields)],C.prototype,"outFields",void 0),e([u({type:String,readOnly:!0})],C.prototype,"objectIdField",null),e([u({readOnly:!0,type:String,json:{read:!1}})],C.prototype,"displayField",null),e([u({readOnly:!0,type:String})],C.prototype,"apiKey",null),e([u({readOnly:!0,type:f})],C.prototype,"fullExtent",null),e([u({readOnly:!0,type:g})],C.prototype,"spatialReference",null),e([u({readOnly:!0})],C.prototype,"version",null),e([u({readOnly:!0,type:U})],C.prototype,"elevationInfo",null),e([u({readOnly:!0,type:Number})],C.prototype,"minScale",null),e([u({readOnly:!0,type:Number})],C.prototype,"maxScale",null),e([u({readOnly:!0,type:Number})],C.prototype,"effectiveScaleRange",null),e([u({type:["hide","show"],json:{write:!0}})],C.prototype,"listMode",void 0),e([u({types:o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],C.prototype,"renderer",void 0),e([u({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],C.prototype,"definitionExpression",void 0),e([u(L)],C.prototype,"popupEnabled",void 0),e([u({type:t,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],C.prototype,"popupTemplate",void 0),e([u({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],C.prototype,"normalReferenceFrame",void 0),e([u({readOnly:!0,json:{read:!1}})],C.prototype,"defaultPopupTemplate",null),e([u()],C.prototype,"types",null),e([u()],C.prototype,"typeIdField",null),e([u({json:{write:!1}}),c(new a({"3DObject":"3d-object",Point:"point"}))],C.prototype,"layerType",void 0),e([u()],C.prototype,"geometryType",null),e([u()],C.prototype,"profile",null),e([u({readOnly:!0,json:{read:!1}})],C.prototype,"capabilities",null),C=e([h(_)],C);const M=C;export{M 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.25/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../core/Error.js";import e from"../../core/Logger.js";import{isSome as n,isNone as o,assertIsSome as r}from"../../core/maybe.js";import{isPoint as s,isPolygon as l,isPolyline as c,isMultipoint as u}from"../../geometry/support/jsonUtils.js";import{OptimizedFeature as i}from"./OptimizedFeature.js";import f from"./OptimizedFeatureSet.js";import h from"./OptimizedGeometry.js";function a(t,e){return t?e?4:3:e?3:2}const g=e.getLogger("esri.layers.graphics.featureConversionUtils"),d={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0},m=(t,e,n,o,r,s)=>{t[n]=r,t[n+1]=s},y=(t,e,n,o,r,s)=>{t[n]=r,t[n+1]=s,t[n+2]=e[o+2]},p=(t,e,n,o,r,s)=>{t[n]=r,t[n+1]=s,t[n+2]=e[o+3]},I=(t,e,n,o,r,s)=>{t[n]=r,t[n+1]=s,t[n+2]=e[o+2],t[n+3]=e[o+3]};function b(t,e,n,o){if(t){if(n)return e&&o?I:y;if(e&&o)return p}else if(e&&o)return y;return m}function w({scale:t,translate:e},n){return Math.round((n-e[0])/t[0])}function M({scale:t,translate:e},n){return Math.round((e[1]-n)/t[1])}function N(t,e){return T(t,e,0)}function G(t,e){return T(t,-e,1)}function T({scale:t,translate:e},n,o){return n*t[o]+e[o]}function F(t,e,n){return t?e?n?E(t):Z(t):n?k(t):P(t):null}function P(t){const e=t.coords;return{x:e[0],y:e[1]}}function x(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t}function Z(t){const e=t.coords;return{x:e[0],y:e[1],z:e[2]}}function j(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t.coords[2]=e.z,t}function k(t){const e=t.coords;return{x:e[0],y:e[1],m:e[2]}}function v(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t.coords[2]=e.m,t}function E(t){const e=t.coords;return{x:e[0],y:e[1],z:e[2],m:e[3]}}function z(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t.coords[2]=e.z,t.coords[3]=e.m,t}function S(t,e,o,r){let s=P;o&&r?s=E:o?s=Z:r&&(s=k);for(const l of e){const{geometry:e,attributes:o}=l,r=n(e)?s(e):null;t.push({attributes:o,geometry:r})}return t}function V(t,e){return t&&e?z:t?j:e?v:x}function Y(t,e,o,r,s){const l=V(o,r);for(const{geometry:c,attributes:u}of e){const e=n(c)?l(new h,c):null;t.push(new i(e,u,null,s?u[s]:void 0))}return t}function _(t,e,n=V(null!=e.z,null!=e.m)){return n(t,e)}function L(t,e,o,r){for(const{geometry:s,attributes:l}of e)t.push({attributes:l,geometry:n(s)?O(s,o,r):null});return t}function O(t,e,n){if(o(t))return null;const r=a(e,n),s=[];for(let o=0;o<t.coords.length;o+=r){const e=[];for(let n=0;n<r;n++)e.push(t.coords[o+n]);s.push(e)}return e?n?{points:s,hasZ:e,hasM:n}:{points:s,hasZ:e}:n?{points:s,hasM:n}:{points:s}}function U(t,e,o,r,s){const l=a(o,r);for(const{geometry:c,attributes:u}of e){const e=n(c)?A(new h,c,l):null;t.push(new i(e,u,null,s?u[s]:void 0))}return t}function A(t,e,n=a(e.hasZ,e.hasM)){t.lengths[0]=e.points.length;const o=t.coords;let r=0;for(const s of e.points)for(let t=0;t<n;t++)o[r++]=s[t];return t}function q(t,e,o,r){for(const{geometry:s,attributes:l}of e)t.push({attributes:l,geometry:n(s)?$(s,o,r):null});return t}function $(t,e,n){if(!t)return null;const o=a(e,n),{coords:r,lengths:s}=t,l=[];let c=0;for(const u of s){const t=[];for(let e=0;e<u;e++){const e=[];for(let t=0;t<o;t++)e.push(r[c++]);t.push(e)}l.push(t)}return e?n?{paths:l,hasZ:e,hasM:n}:{paths:l,hasZ:e}:n?{paths:l,hasM:n}:{paths:l}}function R(t,e,o,r,s){const l=a(o,r);for(const{geometry:c,attributes:u}of e){const e=n(c)?C(new h,c,l):null;t.push(new i(e,u,null,s?u[s]:void 0))}return t}function C(t,e,n=a(e.hasZ,e.hasM)){const{lengths:o,coords:r}=t;let s=0;for(const l of e.paths){for(const t of l)for(let e=0;e<n;e++)r[s++]=t[e];o.push(l.length)}return t}function B(t,e,o,r){for(const{geometry:s,attributes:l,centroid:c}of e){const e=n(s)?D(s,o,r):null;if(n(c)){const n=P(c);t.push({attributes:l,centroid:n,geometry:e})}else t.push({attributes:l,geometry:e})}return t}function D(t,e,n){if(!t)return null;const o=a(e,n),{coords:r,lengths:s}=t,l=[];let c=0;for(const u of s){const t=[];for(let e=0;e<u;e++){const e=[];for(let t=0;t<o;t++)e.push(r[c++]);t.push(e)}l.push(t)}return e?n?{rings:l,hasZ:e,hasM:n}:{rings:l,hasZ:e}:n?{rings:l,hasM:n}:{rings:l}}function H(t,e,o,r,s){for(const{geometry:l,centroid:c,attributes:u}of e){const e=n(l)?J(new h,l,o,r):null,f=s?u[s]:void 0;n(c)?t.push(new i(e,u,x(new h,c),f)):t.push(new i(e,u,null,f))}return t}function J(t,e,n=e.hasZ,o=e.hasM){return K(t,e.rings,n,o),t}function K(t,e,n,o){const r=a(n,o),{lengths:s,coords:l}=t;let c=0;s.length=l.length=0;for(const u of e){for(const t of u)for(let e=0;e<r;e++)l[c++]=t[e];s.push(u.length)}return t}const Q=[],W=[];function X(t,e,n,o,r){Q[0]=t;const[s]=tt(W,Q,e,n,o,r);return Q.length=W.length=0,s}function tt(e,n,o,r,s,l){if(e.length=0,!o){for(const t of n){const n=l?t.attributes[l]:void 0;e.push(new i(null,t.attributes,null,n))}return e}switch(o){case"esriGeometryPoint":return Y(e,n,r,s,l);case"esriGeometryMultipoint":return U(e,n,r,s,l);case"esriGeometryPolyline":return R(e,n,r,s,l);case"esriGeometryPolygon":return H(e,n,r,s,l);default:g.error("convertToFeatureSet:unknown-geometry",new t(`Unable to parse unknown geometry type '${o}'`)),e.length=0}return e}function et(e,n,o,r,s,l){const c=e.length;switch(o){case"esriGeometryPoint":Y(e,n,r,s,l);break;case"esriGeometryMultipoint":U(e,n,r,s,l);break;case"esriGeometryPolyline":R(e,n,r,s,l);break;case"esriGeometryPolygon":H(e,n,r,s,l);break;default:g.error("convertToFeatureSet:unknown-geometry",new t(`Unable to parse unknown geometry type '${o}'`))}for(let t=0;t<n.length;t++)e[t+c].geometryType=o,e[t+c].insertAfter=n[t].insertAfter,e[t+c].groupId=n[t].groupId;return e}function nt(t,e,n,o){W[0]=t,lt(Q,W,e,n,o);const r=Q[0];return Q.length=W.length=0,r}function ot(e,n,r){if(o(e))return null;const i=new h;if("hasZ"in e&&null==n&&(n=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),s(e)){return V(null!=n?n:null!=e.z,null!=r?r:null!=e.m)(i,e)}return l(e)?J(i,e,n,r):c(e)?C(i,e,a(n,r)):u(e)?A(i,e,a(n,r)):void g.error("convertFromGeometry:unknown-geometry",new t(`Unable to parse unknown geometry type '${e}'`))}function rt(e,n,r,s){const l=e&&("coords"in e?e:e.geometry);if(o(l))return null;switch(n){case"esriGeometryPoint":{let t=P;return r&&s?t=E:r?t=Z:s&&(t=k),t(l)}case"esriGeometryMultipoint":return O(l,r,s);case"esriGeometryPolyline":return $(l,r,s);case"esriGeometryPolygon":return D(l,r,s);default:return g.error("convertToGeometry:unknown-geometry",new t(`Unable to parse unknown geometry type '${n}'`)),null}}function st(t,e){for(const n of e)t.push({attributes:n.attributes});return t}function lt(e,n,r,s,l){if(e.length=0,o(r))return st(e,n);switch(r){case"esriGeometryPoint":return S(e,n,s,l);case"esriGeometryMultipoint":return L(e,n,s,l);case"esriGeometryPolyline":return q(e,n,s,l);case"esriGeometryPolygon":return B(e,n,s,l);default:g.error("convertToFeatureSet:unknown-geometry",new t(`Unable to parse unknown geometry type '${r}'`))}return e}function ct(t){const{objectIdFieldName:e,spatialReference:n,transform:o,fields:r,hasM:s,hasZ:l,features:c,geometryType:u,exceededTransferLimit:i,uniqueIdField:f,queryGeometry:h,queryGeometryType:a}=t,g={features:lt([],c,u,l,s),fields:r,geometryType:u,objectIdFieldName:e,spatialReference:n,uniqueIdField:f,queryGeometry:rt(h,a,!1,!1)};return o&&(g.transform=o),i&&(g.exceededTransferLimit=i),s&&(g.hasM=s),l&&(g.hasZ=l),g}function ut(e,n){const o=new f,{hasM:r,hasZ:s,features:l,objectIdFieldName:c,spatialReference:u,geometryType:i,exceededTransferLimit:h,transform:a,fields:d}=e;return d&&(o.fields=d),o.geometryType=i??null,o.objectIdFieldName=c??n??null,o.spatialReference=u??null,o.objectIdFieldName?(l&&tt(o.features,l,i,s,r,o.objectIdFieldName),h&&(o.exceededTransferLimit=h),r&&(o.hasM=r),s&&(o.hasZ=s),a&&(o.transform=a),o):(g.error(new t("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),o)}function it(t){const{transform:e,features:o,hasM:r,hasZ:s}=t;if(!e)return t;for(const l of o)n(l.geometry)&&pt(l.geometry,l.geometry,r,s,e),n(l.centroid)&&pt(l.centroid,l.centroid,r,s,e);return t.transform=null,t}function ft(t,e){const{geometryType:n,features:o,hasM:r,hasZ:s}=e;if(!t)return e;for(let l=0;l<o.length;l++){const e=o[l],c=e.weakClone();c.geometry=new h,ht(c.geometry,e.geometry,r,s,n,t),e.centroid&&(c.centroid=new h,ht(c.centroid,e.centroid,r,s,"esriGeometryPoint",t)),o[l]=c}return e.transform=t,e}function ht(t,e,n,r,s,l,c=n,u=r){if(t.lengths.length&&(t.lengths.length=0),t.coords.length&&(t.coords.length=0),o(e)||!e.coords.length)return null;const i=d[s],{coords:f,lengths:h}=e,g=a(n,r),m=a(n&&c,r&&u),y=b(n,r,c,u);if(!h.length)return y(t.coords,f,0,0,w(l,f[0]),M(l,f[1])),t.lengths.length&&(t.lengths.length=0),t.coords.length=g,t;let p,I,N,G,T=0,F=0,P=F;for(const o of h){if(o<i)continue;let e=0;F=P,N=p=w(l,f[T]),G=I=M(l,f[T+1]),y(t.coords,f,F,T,N,G),e++,T+=g,F+=m;for(let n=1;n<o;n++,T+=g)N=w(l,f[T]),G=M(l,f[T+1]),N===p&&G===I||(y(t.coords,f,F,T,N-p,G-I),F+=m,e++,p=N,I=G);e>=i&&(t.lengths.push(e),P=F)}return t.coords.length=P,t.coords.length?t:null}function at(t,e,n,o,r,s,l=n,c=o){if(t.lengths.length&&(t.lengths.length=0),t.coords.length&&(t.coords.length=0),!e||!e.coords.length)return null;const u=d[r],{coords:i,lengths:f}=e,h=a(n,o),g=a(n&&l,o&&c),m=b(n,o,l,c);if(!f.length)return m(t.coords,i,0,0,i[0],i[1]),t.lengths.length&&(t.lengths.length=0),t.coords.length=h,t;let y=0;const p=s*s;for(const a of f){if(a<u){y+=a*h;continue}const e=t.coords.length/g,n=y,o=y+(a-1)*h;m(t.coords,i,t.coords.length,n,i[n],i[n+1]),dt(t.coords,i,h,p,m,n,o),m(t.coords,i,t.coords.length,o,i[o],i[o+1]);const r=t.coords.length/g-e;r>=u?t.lengths.push(r):t.coords.length=e*g,y+=a*h}return t.coords.length?t:null}function gt(t,e,n,o){const r=t[e],s=t[e+1],l=t[n],c=t[n+1],u=t[o],i=t[o+1];let f=l,h=c,a=u-f,g=i-h;if(0!==a||0!==g){const t=((r-f)*a+(s-h)*g)/(a*a+g*g);t>1?(f=u,h=i):t>0&&(f+=a*t,h+=g*t)}return a=r-f,g=s-h,a*a+g*g}function dt(t,e,n,o,r,s,l){let c,u=o,i=0;for(let f=s+n;f<l;f+=n)c=gt(e,f,s,l),c>u&&(i=f,u=c);u>o&&(i-s>n&&dt(t,e,n,o,r,s,i),r(t,e,t.length,i,e[i],e[i+1]),l-i>n&&dt(t,e,n,o,r,i,l))}function mt(t,e,n,r){if(o(e)||!e.coords||!e.coords.length)return null;const s=a(n,r);let l=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;if(e&&e.coords){const t=e.coords;for(let e=0;e<t.length;e+=s){const n=t[e],o=t[e+1];l=Math.min(l,n),u=Math.max(u,n),c=Math.min(c,o),i=Math.max(i,o)}}return t[0]=l,t[1]=c,t[2]=u,t[3]=i,t}function yt(t,e,n,o){const r=a(n,o),{lengths:s,coords:l}=e;let c=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,f=Number.NEGATIVE_INFINITY,h=0;for(const a of s){let t=l[h],e=l[h+1];c=Math.min(t,c),u=Math.min(e,u),i=Math.max(t,i),f=Math.max(e,f),h+=r;for(let n=1;n<a;n++,h+=r){const n=l[h],o=l[h+1];t+=n,e+=o,n<0&&(c=Math.min(c,t)),n>0&&(i=Math.max(i,t)),o<0?u=Math.min(u,e):o>0&&(f=Math.max(f,e))}}return t[0]=c,t[1]=u,t[2]=i,t[3]=f,t}function pt(t,e,n,o,s){const{coords:l,lengths:c}=e,u=a(n,o);if(!l.length)return t!==e&&(t.lengths.length=0,t.coords.length=0),t;r(s);const{originPosition:i,scale:f,translate:h}=s,g=Tt;g.originPosition=i;const d=g.scale;d[0]=f[0]??1,d[1]=-(f[1]??1),d[2]=f[2]??1,d[3]=f[3]??1;const m=g.translate;if(m[0]=h[0]??0,m[1]=h[1]??0,m[2]=h[2]??0,m[3]=h[3]??0,!c.length){for(let e=0;e<u;++e)t.coords[e]=T(g,l[e],e);return t!==e&&(t.lengths.length=0,t.coords.length=u),t}let y=0;for(let r=0;r<c.length;r++){const e=c[r];t.lengths[r]=e;for(let r=0;r<u;++r)t.coords[y+r]=T(g,l[y+r],r);let n=t.coords[y],o=t.coords[y+1];y+=u;for(let r=1;r<e;r++,y+=u){n+=l[y]*d[0],o+=l[y+1]*d[1],t.coords[y]=n,t.coords[y+1]=o;for(let e=2;e<u;++e)t.coords[y+e]=T(g,l[y+e],e)}}return t!==e&&(t.lengths.length=c.length,t.coords.length=l.length),t}function It(t,e,n,o,r,s){const l=a(n,o),c=b(n,o,r,s),u=e.coords;t.coords.length=0,t.lengths.length=0,t.lengths.push(...e.lengths);for(let i=0;i<u.length;i+=l)c(t.coords,u,t.coords.length,i,u[i],u[i+1]);return t}function bt(t,e,n,o,r){if(!e||!e.coords||!e.coords.length)return null;const s=d[n],{coords:l,lengths:c}=e,u=b(o,r,o,r),i=a(o,r);let f=0,h=0,g=0,m=0;for(const a of c){h=m,u(t.coords,l,h,f,l[f],l[f+1]),f+=i;let e=l[f],n=l[f+1],o=e,r=n,c=n/e;h+=i,u(t.coords,l,h,f,o,r),f+=i;for(let s=2;s<a;s++){e=l[f],n=l[f+1];const s=n/e,a=c===s||!isFinite(c)&&!isFinite(s),g=a&&isFinite(s)?c>=0&&s>=0||c<=0&&s<=0:r>=0&&n>=0||r<=0&&n<=0;a&&g?(o+=e,r+=n):(o=e,r=n,h+=i),u(t.coords,l,h,f,o,r),f+=i,c=s}h+=i;const d=(h-m)/i;d>=s&&(t.lengths[g]=d,m=h,g++)}return t.coords.length>m&&(t.coords.length=m),t.lengths.length>g&&(t.lengths.length=g),t.coords.length&&t.lengths.length?t:null}function wt(t,e,n,o){let r=0,s=t[o*e],l=t[o*(e+1)];for(let c=1;c<n;c++){const n=s+t[o*(e+c)],u=l+t[o*(e+c)+1],i=(n-s)*(u+l);s=n,l=u,r+=i}return.5*r}function Mt(t,e){const{coords:n,lengths:o}=t;let r=0,s=0;for(let l=0;l<o.length;l++){s+=wt(n,r,o[l],e),r+=l}return Math.abs(s)}function Nt(t,e){const n=t.clone(),o=t.coords,r=t.lengths;let s=0;for(let l=0;l<r.length;l++){const t=r[l];let c=o[e*s],u=o[e*s+1];for(let r=1;r<t;r++){const t=o[e*(s+r)],l=o[e*(s+r)+1],i=t-c,f=l-u;n.coords[e*(s+r)]=i,n.coords[e*(s+r)+1]=f,c=t,u=l}s+=t}return n}function Gt(t,e){if(o(t))return null;const n=t.clone(),r=t.coords,s=t.lengths;let l=0;for(let o=0;o<s.length;o++){const t=s[o];let c=r[e*l],u=r[e*l+1];for(let o=1;o<t;o++){const t=c+r[e*(l+o)],s=u+r[e*(l+o)+1];n.coords[e*(l+o)]=t,n.coords[e*(l+o)+1]=s,c=t,u=s}l+=t}return n}const Tt={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]};export{X as convertFromFeature,ut as convertFromFeatureSet,tt as convertFromFeatures,ot as convertFromGeometry,et as convertFromGraphics,A as convertFromMultipoint,U as convertFromMultipointFeatures,K as convertFromNestedArray,_ as convertFromPoint,Y as convertFromPointFeatures,J as convertFromPolygon,C as convertFromPolyline,R as convertFromPolylineFeatures,nt as convertToFeature,ct as convertToFeatureSet,lt as convertToFeatures,rt as convertToGeometry,O as convertToMultipoint,L as convertToMultipointFeatures,F as convertToPoint,D as convertToPolygon,$ as convertToPolyline,Gt as deltaDecodeGeometry,Nt as deltaEncodeGeometry,at as generalizeOptimizedGeometry,mt as getBoundsOptimizedGeometry,Mt as getQuantizedArea,yt as getQuantizedBoundsOptimizedGeometry,wt as getSignedQuantizedRingArea,ft as quantizeOptimizedFeatureSet,ht as quantizeOptimizedGeometry,w as quantizeX,M as quantizeY,bt as removeCollinearVectices,It as removeZMValues,it as unquantizeOptimizedFeatureSet,pt as unquantizeOptimizedGeometry,T as unquantizeValue,N as unquantizeX,G as unquantizeY};
5
+ import t from"../../core/Error.js";import e from"../../core/Logger.js";import{isSome as n,isNone as o,assertIsSome as r}from"../../core/maybe.js";import{isPoint as s,isPolygon as l,isPolyline as c,isMultipoint as u}from"../../geometry/support/jsonUtils.js";import{OptimizedFeature as i}from"./OptimizedFeature.js";import f from"./OptimizedFeatureSet.js";import h from"./OptimizedGeometry.js";function a(t,e){return t?e?4:3:e?3:2}const g=e.getLogger("esri.layers.graphics.featureConversionUtils"),d={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0},m=(t,e,n,o,r,s)=>{t[n]=r,t[n+1]=s},y=(t,e,n,o,r,s)=>{t[n]=r,t[n+1]=s,t[n+2]=e[o+2]},p=(t,e,n,o,r,s)=>{t[n]=r,t[n+1]=s,t[n+2]=e[o+3]},I=(t,e,n,o,r,s)=>{t[n]=r,t[n+1]=s,t[n+2]=e[o+2],t[n+3]=e[o+3]};function b(t,e,n,o){if(t){if(n)return e&&o?I:y;if(e&&o)return p}else if(e&&o)return y;return m}function w({scale:t,translate:e},n){return Math.round((n-e[0])/t[0])}function M({scale:t,translate:e},n){return Math.round((e[1]-n)/t[1])}function N(t,e){return T(t,e,0)}function G(t,e){return T(t,-e,1)}function T({scale:t,translate:e},n,o){return n*t[o]+e[o]}function F(t,e,n){return t?e?n?E(t):Z(t):n?k(t):P(t):null}function P(t){const e=t.coords;return{x:e[0],y:e[1]}}function x(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t}function Z(t){const e=t.coords;return{x:e[0],y:e[1],z:e[2]}}function j(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t.coords[2]=e.z,t}function k(t){const e=t.coords;return{x:e[0],y:e[1],m:e[2]}}function v(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t.coords[2]=e.m,t}function E(t){const e=t.coords;return{x:e[0],y:e[1],z:e[2],m:e[3]}}function z(t,e){return t.coords[0]=e.x,t.coords[1]=e.y,t.coords[2]=e.z,t.coords[3]=e.m,t}function S(t,e,o,r){let s=P;o&&r?s=E:o?s=Z:r&&(s=k);for(const l of e){const{geometry:e,attributes:o}=l,r=n(e)?s(e):null;t.push({attributes:o,geometry:r})}return t}function V(t,e){return t&&e?z:t?j:e?v:x}function Y(t,e,o,r,s){const l=V(o,r);for(const{geometry:c,attributes:u}of e){const e=n(c)?l(new h,c):null;t.push(new i(e,u,null,s?u[s]:void 0))}return t}function _(t,e,n=V(null!=e.z,null!=e.m)){return n(t,e)}function L(t,e,o,r){for(const{geometry:s,attributes:l}of e)t.push({attributes:l,geometry:n(s)?O(s,o,r):null});return t}function O(t,e,n){if(o(t))return null;const r=a(e,n),s=[];for(let o=0;o<t.coords.length;o+=r){const e=[];for(let n=0;n<r;n++)e.push(t.coords[o+n]);s.push(e)}return e?n?{points:s,hasZ:e,hasM:n}:{points:s,hasZ:e}:n?{points:s,hasM:n}:{points:s}}function U(t,e,o,r,s){const l=a(o,r);for(const{geometry:c,attributes:u}of e){const e=n(c)?A(new h,c,l):null;t.push(new i(e,u,null,s?u[s]:void 0))}return t}function A(t,e,n=a(e.hasZ,e.hasM)){t.lengths[0]=e.points.length;const o=t.coords;let r=0;for(const s of e.points)for(let t=0;t<n;t++)o[r++]=s[t];return t}function q(t,e,o,r){for(const{geometry:s,attributes:l}of e)t.push({attributes:l,geometry:n(s)?$(s,o,r):null});return t}function $(t,e,n){if(!t)return null;const o=a(e,n),{coords:r,lengths:s}=t,l=[];let c=0;for(const u of s){const t=[];for(let e=0;e<u;e++){const e=[];for(let t=0;t<o;t++)e.push(r[c++]);t.push(e)}l.push(t)}return e?n?{paths:l,hasZ:e,hasM:n}:{paths:l,hasZ:e}:n?{paths:l,hasM:n}:{paths:l}}function R(t,e,o,r,s){const l=a(o,r);for(const{geometry:c,attributes:u}of e){const e=n(c)?C(new h,c,l):null;t.push(new i(e,u,null,s?u[s]:void 0))}return t}function C(t,e,n=a(e.hasZ,e.hasM)){const{lengths:o,coords:r}=t;let s=0;for(const l of e.paths){for(const t of l)for(let e=0;e<n;e++)r[s++]=t[e];o.push(l.length)}return t}function B(t,e,o,r){for(const{geometry:s,attributes:l,centroid:c}of e){const e=n(s)?D(s,o,r):null;if(n(c)){const n=P(c);t.push({attributes:l,centroid:n,geometry:e})}else t.push({attributes:l,geometry:e})}return t}function D(t,e,n){if(!t)return null;const o=a(e,n),{coords:r,lengths:s}=t,l=[];let c=0;for(const u of s){const t=[];for(let e=0;e<u;e++){const e=[];for(let t=0;t<o;t++)e.push(r[c++]);t.push(e)}l.push(t)}return e?n?{rings:l,hasZ:e,hasM:n}:{rings:l,hasZ:e}:n?{rings:l,hasM:n}:{rings:l}}function H(t,e,o,r,s){for(const{geometry:l,centroid:c,attributes:u}of e){const e=n(l)?J(new h,l,o,r):null,f=s?u[s]:void 0;n(c)?t.push(new i(e,u,x(new h,c),f)):t.push(new i(e,u,null,f))}return t}function J(t,e,n=e.hasZ,o=e.hasM){return K(t,e.rings,n,o),t}function K(t,e,n,o){const r=a(n,o),{lengths:s,coords:l}=t;let c=0;s.length=l.length=0;for(const u of e){for(const t of u)for(let e=0;e<r;e++)l[c++]=t[e];s.push(u.length)}return t}const Q=[],W=[];function X(t,e,n,o,r){Q[0]=t;const[s]=tt(W,Q,e,n,o,r);return Q.length=W.length=0,s}function tt(e,n,o,r,s,l){if(e.length=0,!o){for(const t of n){const n=l?t.attributes[l]:void 0;e.push(new i(null,t.attributes,null,n))}return e}switch(o){case"esriGeometryPoint":return Y(e,n,r,s,l);case"esriGeometryMultipoint":return U(e,n,r,s,l);case"esriGeometryPolyline":return R(e,n,r,s,l);case"esriGeometryPolygon":return H(e,n,r,s,l);default:g.error("convertToFeatureSet:unknown-geometry",new t(`Unable to parse unknown geometry type '${o}'`)),e.length=0}return e}function et(e,n,o,r,s,l){const c=e.length;switch(o){case"esriGeometryPoint":Y(e,n,r,s,l);break;case"esriGeometryMultipoint":U(e,n,r,s,l);break;case"esriGeometryPolyline":R(e,n,r,s,l);break;case"esriGeometryPolygon":H(e,n,r,s,l);break;default:g.error("convertToFeatureSet:unknown-geometry",new t(`Unable to parse unknown geometry type '${o}'`))}for(let t=0;t<n.length;t++)e[t+c].geometryType=o,e[t+c].insertAfter=n[t].insertAfter,e[t+c].groupId=n[t].groupId;return e}function nt(t,e,n,o){W[0]=t,lt(Q,W,e,n,o);const r=Q[0];return Q.length=W.length=0,r}function ot(e,n,r){if(o(e))return null;const i=new h;if("hasZ"in e&&null==n&&(n=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),s(e)){return V(null!=n?n:null!=e.z,null!=r?r:null!=e.m)(i,e)}return l(e)?J(i,e,n,r):c(e)?C(i,e,a(n,r)):u(e)?A(i,e,a(n,r)):void g.error("convertFromGeometry:unknown-geometry",new t(`Unable to parse unknown geometry type '${e}'`))}function rt(e,n,r,s){const l=e&&("coords"in e?e:e.geometry);if(o(l))return null;switch(n){case"esriGeometryPoint":{let t=P;return r&&s?t=E:r?t=Z:s&&(t=k),t(l)}case"esriGeometryMultipoint":return O(l,r,s);case"esriGeometryPolyline":return $(l,r,s);case"esriGeometryPolygon":return D(l,r,s);default:return g.error("convertToGeometry:unknown-geometry",new t(`Unable to parse unknown geometry type '${n}'`)),null}}function st(t,e){for(const n of e)t.push({attributes:n.attributes});return t}function lt(e,n,r,s,l){if(e.length=0,o(r))return st(e,n);switch(r){case"esriGeometryPoint":return S(e,n,s,l);case"esriGeometryMultipoint":return L(e,n,s,l);case"esriGeometryPolyline":return q(e,n,s,l);case"esriGeometryPolygon":return B(e,n,s,l);default:g.error("convertToFeatureSet:unknown-geometry",new t(`Unable to parse unknown geometry type '${r}'`))}return e}function ct(t){const{objectIdFieldName:e,spatialReference:n,transform:o,fields:r,hasM:s,hasZ:l,features:c,geometryType:u,exceededTransferLimit:i,uniqueIdField:f,queryGeometry:h,queryGeometryType:a}=t,g={features:lt([],c,u,l,s),fields:r,geometryType:u,objectIdFieldName:e,spatialReference:n,uniqueIdField:f,queryGeometry:rt(h,a,!1,!1)};return o&&(g.transform=o),i&&(g.exceededTransferLimit=i),s&&(g.hasM=s),l&&(g.hasZ=l),g}function ut(e,n){const o=new f,{hasM:r,hasZ:s,features:l,objectIdFieldName:c,spatialReference:u,geometryType:i,exceededTransferLimit:h,transform:a,fields:d}=e;return d&&(o.fields=d),o.geometryType=i??null,o.objectIdFieldName=c??n??null,o.spatialReference=u??null,o.objectIdFieldName?(l&&tt(o.features,l,i,s,r,o.objectIdFieldName),h&&(o.exceededTransferLimit=h),r&&(o.hasM=r),s&&(o.hasZ=s),a&&(o.transform=a),o):(g.error(new t("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),o)}function it(t){const{transform:e,features:o,hasM:r,hasZ:s}=t;if(!e)return t;for(const l of o)n(l.geometry)&&pt(l.geometry,l.geometry,r,s,e),n(l.centroid)&&pt(l.centroid,l.centroid,r,s,e);return t.transform=null,t}function ft(t,e){const{geometryType:n,features:o,hasM:r,hasZ:s}=e;if(!t)return e;for(let l=0;l<o.length;l++){const e=o[l],c=e.weakClone();c.geometry=new h,ht(c.geometry,e.geometry,r,s,n,t),e.centroid&&(c.centroid=new h,ht(c.centroid,e.centroid,r,s,"esriGeometryPoint",t)),o[l]=c}return e.transform=t,e}function ht(t,e,n,r,s,l,c=n,u=r){if(t.lengths.length&&(t.lengths.length=0),t.coords.length&&(t.coords.length=0),o(e)||!e.coords.length)return null;const i=d[s],{coords:f,lengths:h}=e,g=a(n,r),m=a(n&&c,r&&u),y=b(n,r,c,u);if(!h.length)return y(t.coords,f,0,0,w(l,f[0]),M(l,f[1])),t.lengths.length&&(t.lengths.length=0),t.coords.length=g,t;let p,I,N,G,T=0,F=0,P=F;for(const o of h){if(o<i)continue;let e=0;F=P,N=p=w(l,f[T]),G=I=M(l,f[T+1]),y(t.coords,f,F,T,N,G),e++,T+=g,F+=m;for(let n=1;n<o;n++,T+=g)N=w(l,f[T]),G=M(l,f[T+1]),N===p&&G===I||(y(t.coords,f,F,T,N-p,G-I),F+=m,e++,p=N,I=G);e>=i&&(t.lengths.push(e),P=F)}return t.coords.length=P,t.coords.length?t:null}function at(t,e,n,o,r,s,l=n,c=o){if(t.lengths.length&&(t.lengths.length=0),t.coords.length&&(t.coords.length=0),!e||!e.coords.length)return null;const u=d[r],{coords:i,lengths:f}=e,h=a(n,o),g=a(n&&l,o&&c),m=b(n,o,l,c);if(!f.length)return m(t.coords,i,0,0,i[0],i[1]),t.lengths.length&&(t.lengths.length=0),t.coords.length=h,t;let y=0;const p=s*s;for(const a of f){if(a<u){y+=a*h;continue}const e=t.coords.length/g,n=y,o=y+(a-1)*h;m(t.coords,i,t.coords.length,n,i[n],i[n+1]),dt(t.coords,i,h,p,m,n,o),m(t.coords,i,t.coords.length,o,i[o],i[o+1]);const r=t.coords.length/g-e;r>=u?t.lengths.push(r):t.coords.length=e*g,y+=a*h}return t.coords.length?t:null}function gt(t,e,n,o){const r=t[e],s=t[e+1],l=t[n],c=t[n+1],u=t[o],i=t[o+1];let f=l,h=c,a=u-f,g=i-h;if(0!==a||0!==g){const t=((r-f)*a+(s-h)*g)/(a*a+g*g);t>1?(f=u,h=i):t>0&&(f+=a*t,h+=g*t)}return a=r-f,g=s-h,a*a+g*g}function dt(t,e,n,o,r,s,l){let c,u=o,i=0;for(let f=s+n;f<l;f+=n)c=gt(e,f,s,l),c>u&&(i=f,u=c);u>o&&(i-s>n&&dt(t,e,n,o,r,s,i),r(t,e,t.length,i,e[i],e[i+1]),l-i>n&&dt(t,e,n,o,r,i,l))}function mt(t,e,n,r){if(o(e)||!e.coords||!e.coords.length)return null;const s=a(n,r);let l=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;if(e&&e.coords){const t=e.coords;for(let e=0;e<t.length;e+=s){const n=t[e],o=t[e+1];l=Math.min(l,n),u=Math.max(u,n),c=Math.min(c,o),i=Math.max(i,o)}}return t[0]=l,t[1]=c,t[2]=u,t[3]=i,t}function yt(t,e,n,o){const r=a(n,o),{lengths:s,coords:l}=e;let c=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,f=Number.NEGATIVE_INFINITY,h=0;for(const a of s){let t=l[h],e=l[h+1];c=Math.min(t,c),u=Math.min(e,u),i=Math.max(t,i),f=Math.max(e,f),h+=r;for(let n=1;n<a;n++,h+=r){const n=l[h],o=l[h+1];t+=n,e+=o,n<0&&(c=Math.min(c,t)),n>0&&(i=Math.max(i,t)),o<0?u=Math.min(u,e):o>0&&(f=Math.max(f,e))}}return t[0]=c,t[1]=u,t[2]=i,t[3]=f,t}function pt(t,e,n,o,s){const{coords:l,lengths:c}=e,u=a(n,o);if(!l.length)return t!==e&&(t.lengths.length=0,t.coords.length=0),t;r(s);const{originPosition:i,scale:f,translate:h}=s,g=Tt;g.originPosition=i;const d=g.scale;d[0]=f[0]??1,d[1]=-(f[1]??1),d[2]=f[2]??1,d[3]=f[3]??1;const m=g.translate;if(m[0]=h[0]??0,m[1]=h[1]??0,m[2]=h[2]??0,m[3]=h[3]??0,!c.length){for(let e=0;e<u;++e)t.coords[e]=T(g,l[e],e);return t!==e&&(t.lengths.length=0,t.coords.length=u),t}let y=0;for(let r=0;r<c.length;r++){const e=c[r];t.lengths[r]=e;for(let r=0;r<u;++r)t.coords[y+r]=T(g,l[y+r],r);let n=t.coords[y],o=t.coords[y+1];y+=u;for(let r=1;r<e;r++,y+=u){n+=l[y]*d[0],o+=l[y+1]*d[1],t.coords[y]=n,t.coords[y+1]=o;for(let e=2;e<u;++e)t.coords[y+e]=T(g,l[y+e],e)}}return t!==e&&(t.lengths.length=c.length,t.coords.length=l.length),t}function It(t,e,n,o,r,s){const l=a(n,o),c=b(n,o,r,s),u=e.coords;t.coords.length=0,t.lengths.length=0,t.lengths.push(...e.lengths);for(let i=0;i<u.length;i+=l)c(t.coords,u,t.coords.length,i,u[i],u[i+1]);return t}function bt(t,e,n,o,r){if(!e||!e.coords||!e.coords.length)return null;const s=d[n],{coords:l,lengths:c}=e,u=b(o,r,o,r),i=a(o,r);let f=0,h=0,g=0,m=0;for(const a of c){h=m,u(t.coords,l,h,f,l[f],l[f+1]),f+=i;let e=l[f],n=l[f+1],o=e,r=n,c=n/e;h+=i,u(t.coords,l,h,f,o,r),f+=i;for(let s=2;s<a;s++){e=l[f],n=l[f+1];const s=n/e,a=c===s||!isFinite(c)&&!isFinite(s),g=a&&isFinite(s)?c>=0&&s>=0||c<=0&&s<=0:r>=0&&n>=0||r<=0&&n<=0;a&&g?(o+=e,r+=n):(o=e,r=n,h+=i),u(t.coords,l,h,f,o,r),f+=i,c=s}h+=i;const d=(h-m)/i;d>=s&&(t.lengths[g]=d,m=h,g++)}return t.coords.length>m&&(t.coords.length=m),t.lengths.length>g&&(t.lengths.length=g),t.coords.length&&t.lengths.length?t:null}function wt(t,e,n,o){let r=0,s=t[o*e],l=t[o*(e+1)];for(let c=1;c<n;c++){const n=s+t[o*(e+c)],u=l+t[o*(e+c)+1],i=(n-s)*(u+l);s=n,l=u,r+=i}return.5*r}function Mt(t,e){const{coords:n,lengths:o}=t;let r=0,s=0;for(let l=0;l<o.length;l++){const t=o[l];s+=wt(n,r,t,e),r+=t}return Math.abs(s)}function Nt(t,e){const n=t.clone(),o=t.coords,r=t.lengths;let s=0;for(let l=0;l<r.length;l++){const t=r[l];let c=o[e*s],u=o[e*s+1];for(let r=1;r<t;r++){const t=o[e*(s+r)],l=o[e*(s+r)+1],i=t-c,f=l-u;n.coords[e*(s+r)]=i,n.coords[e*(s+r)+1]=f,c=t,u=l}s+=t}return n}function Gt(t,e){if(o(t))return null;const n=t.clone(),r=t.coords,s=t.lengths;let l=0;for(let o=0;o<s.length;o++){const t=s[o];let c=r[e*l],u=r[e*l+1];for(let o=1;o<t;o++){const t=c+r[e*(l+o)],s=u+r[e*(l+o)+1];n.coords[e*(l+o)]=t,n.coords[e*(l+o)+1]=s,c=t,u=s}l+=t}return n}const Tt={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]};export{X as convertFromFeature,ut as convertFromFeatureSet,tt as convertFromFeatures,ot as convertFromGeometry,et as convertFromGraphics,A as convertFromMultipoint,U as convertFromMultipointFeatures,K as convertFromNestedArray,_ as convertFromPoint,Y as convertFromPointFeatures,J as convertFromPolygon,C as convertFromPolyline,R as convertFromPolylineFeatures,nt as convertToFeature,ct as convertToFeatureSet,lt as convertToFeatures,rt as convertToGeometry,O as convertToMultipoint,L as convertToMultipointFeatures,F as convertToPoint,D as convertToPolygon,$ as convertToPolyline,Gt as deltaDecodeGeometry,Nt as deltaEncodeGeometry,at as generalizeOptimizedGeometry,mt as getBoundsOptimizedGeometry,Mt as getQuantizedArea,yt as getQuantizedBoundsOptimizedGeometry,wt as getSignedQuantizedRingArea,ft as quantizeOptimizedFeatureSet,ht as quantizeOptimizedGeometry,w as quantizeX,M as quantizeY,bt as removeCollinearVectices,It as removeZMValues,it as unquantizeOptimizedFeatureSet,pt as unquantizeOptimizedGeometry,T as unquantizeValue,N as unquantizeX,G as unquantizeY};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Evented.js";import{clone as s}from"../../core/lang.js";import"../../core/Logger.js";import"../../core/accessorSupport/ensureType.js";import"../../core/Error.js";import"../../core/has.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";const d=new t.EventEmitter,i=Symbol("EditBusLayer");function o(e){return e&&"object"==typeof e&&i in e}const a=t=>{var o;let a=class extends t{constructor(...e){super(...e),this[o]=!0,this.when().then((()=>{this.own([d.on("edits",(({layer:e,event:t})=>{if(e===this||e.url!==this.url)return;if(null!=e.layerId&&null!=this.layerId&&e.layerId===this.layerId)return void this.emit("edits",s(t));const r=t.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(r){const{adds:e,updates:d,deletes:i}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e.map((({attributes:e})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),deletedFeatures:i.map((({attributes:e})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),updatedFeatures:d.map((({current:{attributes:e}})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),editedFeatures:s(t.editedFeatures)};this.emit("edits",o)}}))])}),(()=>{}))}};return o=i,a=e([r("esri.layers.mixins.EditBusLayer")],a),a};export{a as EditBusLayer,d as editEventBus,o as isEditBusLayer};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Evented.js";import{clone as r}from"../../core/lang.js";import"../../core/Logger.js";import"../../core/accessorSupport/ensureType.js";import"../../core/Error.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";const d=new t.EventEmitter,i=Symbol("EditBusLayer");function o(e){return e&&"object"==typeof e&&i in e}const a=t=>{var o;let a=class extends t{constructor(...e){super(...e),this[o]=!0,this.when().then((()=>{this.own([d.on("edits",(e=>{const t="layer"in e?e.layer:null,s="layer"in e?e.layer.url:e.serviceUrl,d="layer"in e?e.layer.layerId:e.layerId,i=e.event;if(t===this||s!==this.url)return;if(null!=d&&null!=this.layerId&&d===this.layerId)return void this.emit("edits",r(i));const o=i.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(o){const{adds:e,updates:t,deletes:s}=o.editedFeatures,d={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:e.map((({attributes:e})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),deletedFeatures:s.map((({attributes:e})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),updatedFeatures:t.map((({current:{attributes:e}})=>({objectId:e[this.objectIdField],globalId:e[this.globalIdField]}))),editedFeatures:r(i.editedFeatures)};this.emit("edits",d)}}))])}),(()=>{}))}};return o=i,a=e([s("esri.layers.mixins.EditBusLayer")],a),a};export{a as EditBusLayer,d as editEventBus,o as isEditBusLayer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import e from"./OutStatistic.js";var i;let p=i=class extends r{constructor(){super(...arguments),this.name=null,this.outStatistic=null}clone(){return new i({name:this.name,outStatistic:this.outStatistic?.clone()})}};t([o({type:String,json:{write:!0}})],p.prototype,"name",void 0),t([o({type:e,json:{write:!0}})],p.prototype,"outStatistic",void 0),p=i=t([s("esri.layers.support.AggregateField")],p);const c=p;export{c as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{kebabDict as i}from"./fieldType.js";import p from"./OutStatistic.js";var a;let c=a=class extends o{constructor(t){super(t),this.name=null,this.alias=null,this.outStatistic=null,this.type=null}clone(){return new a({name:this.name,alias:this.alias,type:this.type,outStatistic:this.outStatistic?.clone()})}};t([r({type:String,json:{write:!0}})],c.prototype,"name",void 0),t([r({type:String,json:{write:!0}})],c.prototype,"alias",void 0),t([r({type:p,json:{write:!0}})],c.prototype,"outStatistic",void 0),t([s(i)],c.prototype,"type",void 0),c=a=t([e("esri.layers.support.AggregateField")],c);const n=c;export{n 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.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import r from"../../core/Logger.js";import{isNone as n,isSome as e}from"../../core/maybe.js";import{transformProjective as s,getProjectiveTransform as i}from"../../core/perspectiveUtils.js";import{createScreenPoint as c}from"../../core/screenUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{c as p}from"../../chunks/mat3.js";import{c as u}from"../../chunks/mat3f64.js";import{s as m,r as f,l as P}from"../../chunks/vec2.js";import{a as h,f as d}from"../../chunks/vec2f64.js";import y from"../../geometry/Point.js";import j from"../../geometry/Polygon.js";import{projectOrLoad as g}from"../../geometry/projection.js";import v from"./GeoreferenceBase.js";const w=u(),R=h();let x=class extends t{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};o([l()],x.prototype,"sourcePoint",void 0),o([l({type:y})],x.prototype,"mapPoint",void 0),x=o([a("esri.layers.support.ControlPoint")],x);let T=class extends v{constructor(o){super(o),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}get coords(){if(n(this.controlPoints))return null;const o=this._updateTransform(w);if(n(o)||!_(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return H(o,this.width,this.height,t)}get inverseTransform(){return n(this.transform)?null:p(u(),this.transform)}get transform(){return this._updateTransform()}toMap(o){if(n(o)||n(this.transform)||n(this.controlPoints)||!_(this.controlPoints[0]))return null;m(R,o.x,o.y);const t=this.controlPoints[0].mapPoint.spatialReference;return s(R,R,this.transform),new y({x:R[0],y:R[1],spatialReference:t})}toSource(o){if(n(o)||n(this.inverseTransform)||n(this.controlPoints)||!_(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return o=o.normalize(),o=g(o,t).geometry,n(o)?null:(m(R,o.x,o.y),s(R,R,this.inverseTransform),c(R[0],R[1]))}_updateTransform(o){const{controlPoints:t,width:r,height:e}=this;if(n(t)||!(r>0)||!(e>0))return null;const[s,i,c,l]=t;if(!_(s))return null;const a=s.mapPoint.spatialReference,p=this._projectControlPoint(i,a),m=this._projectControlPoint(c,a),f=this._projectControlPoint(l,a);if(!p.valid||!m.valid||!f.valid)return null;if(!_(p.controlPoint))return null;n(o)&&(o=u());let P=null;return P=_(m.controlPoint)&&_(f.controlPoint)?B(o,s,p.controlPoint,m.controlPoint,f.controlPoint):_(m.controlPoint)?z(o,s,p.controlPoint,m.controlPoint):L(o,s,p.controlPoint),P.every((o=>0===o))?null:P}_projectControlPoint(o,t){if(!_(o))return{valid:!0,controlPoint:o};const{sourcePoint:n,mapPoint:e}=o,{geometry:s,pending:i}=g(e,t);return i?{valid:!1,controlPoint:null}:i||s?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:s}}:(r.getLogger(this.declaredClass).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:o,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function _(o){return e(o)&&e(o.sourcePoint)&&e(o.mapPoint)}o([l({type:[x]})],T.prototype,"controlPoints",void 0),o([l({readOnly:!0})],T.prototype,"coords",null),o([l()],T.prototype,"height",void 0),o([l({readOnly:!0})],T.prototype,"inverseTransform",null),o([l({readOnly:!0})],T.prototype,"transform",null),o([l()],T.prototype,"width",void 0),T=o([a("esri.layers.support.ControlPointsGeoreference")],T);const C=h(),S=h(),k=h(),b=h(),M=h(),A=h(),I=h(),O=h(),U=Math.PI/2;function G(o,t,r){m(o,r.sourcePoint.x,r.sourcePoint.y),m(t,r.mapPoint.x,r.mapPoint.y)}function L(o,t,r){return G(C,M,t),G(S,A,r),f(k,S,C,U),f(b,C,S,U),f(I,A,M,-U),f(O,M,A,-U),F(o,C,S,k,b,M,A,I,O)}function z(o,t,r,n){return G(C,M,t),G(S,A,r),G(k,I,n),P(b,C,S,.5),f(b,k,b,Math.PI),P(O,M,A,.5),f(O,I,O,Math.PI),F(o,C,S,k,b,M,A,I,O)}function B(o,t,r,n,e){return G(C,M,t),G(S,A,r),G(k,I,n),G(b,O,e),F(o,C,S,k,b,M,A,I,O)}const q=new Array(8).fill(0),D=new Array(8).fill(0);function E(o,t,r,n,e){return o[0]=t[0],o[1]=t[1],o[2]=r[0],o[3]=r[1],o[4]=n[0],o[5]=n[1],o[6]=e[0],o[7]=e[1],o}function F(o,t,r,n,e,s,c,l,a){return i(o,E(q,t,r,n,e),E(D,s,c,l,a))}function H(o,t,r,n){const e=d(0,r),i=d(0,0),c=d(t,0),l=d(t,r);return s(e,e,o),s(i,i,o),s(c,c,o),s(l,l,o),new j({rings:[[e,i,c,l,e]],spatialReference:n})}const J=T;export{J as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import r from"../../core/Logger.js";import{isNone as n,isSome as e}from"../../core/maybe.js";import{transformProjective as s,getProjectiveTransform as i}from"../../core/perspectiveUtils.js";import{createScreenPoint as c}from"../../core/screenUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{e as p}from"../../chunks/mat3.js";import{c as u}from"../../chunks/mat3f64.js";import{s as m,r as f,l as P}from"../../chunks/vec2.js";import{a as h,f as d}from"../../chunks/vec2f64.js";import y from"../../geometry/Point.js";import j from"../../geometry/Polygon.js";import{projectOrLoad as g}from"../../geometry/projection.js";import v from"./GeoreferenceBase.js";const w=u(),R=h();let x=class extends t{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};o([l()],x.prototype,"sourcePoint",void 0),o([l({type:y})],x.prototype,"mapPoint",void 0),x=o([a("esri.layers.support.ControlPoint")],x);let T=class extends v{constructor(o){super(o),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}get coords(){if(n(this.controlPoints))return null;const o=this._updateTransform(w);if(n(o)||!_(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return H(o,this.width,this.height,t)}get inverseTransform(){return n(this.transform)?null:p(u(),this.transform)}get transform(){return this._updateTransform()}toMap(o){if(n(o)||n(this.transform)||n(this.controlPoints)||!_(this.controlPoints[0]))return null;m(R,o.x,o.y);const t=this.controlPoints[0].mapPoint.spatialReference;return s(R,R,this.transform),new y({x:R[0],y:R[1],spatialReference:t})}toSource(o){if(n(o)||n(this.inverseTransform)||n(this.controlPoints)||!_(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return o=o.normalize(),o=g(o,t).geometry,n(o)?null:(m(R,o.x,o.y),s(R,R,this.inverseTransform),c(R[0],R[1]))}_updateTransform(o){const{controlPoints:t,width:r,height:e}=this;if(n(t)||!(r>0)||!(e>0))return null;const[s,i,c,l]=t;if(!_(s))return null;const a=s.mapPoint.spatialReference,p=this._projectControlPoint(i,a),m=this._projectControlPoint(c,a),f=this._projectControlPoint(l,a);if(!p.valid||!m.valid||!f.valid)return null;if(!_(p.controlPoint))return null;n(o)&&(o=u());let P=null;return P=_(m.controlPoint)&&_(f.controlPoint)?B(o,s,p.controlPoint,m.controlPoint,f.controlPoint):_(m.controlPoint)?z(o,s,p.controlPoint,m.controlPoint):L(o,s,p.controlPoint),P.every((o=>0===o))?null:P}_projectControlPoint(o,t){if(!_(o))return{valid:!0,controlPoint:o};const{sourcePoint:n,mapPoint:e}=o,{geometry:s,pending:i}=g(e,t);return i?{valid:!1,controlPoint:null}:i||s?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:s}}:(r.getLogger(this.declaredClass).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:o,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function _(o){return e(o)&&e(o.sourcePoint)&&e(o.mapPoint)}o([l({type:[x]})],T.prototype,"controlPoints",void 0),o([l({readOnly:!0})],T.prototype,"coords",null),o([l()],T.prototype,"height",void 0),o([l({readOnly:!0})],T.prototype,"inverseTransform",null),o([l({readOnly:!0})],T.prototype,"transform",null),o([l()],T.prototype,"width",void 0),T=o([a("esri.layers.support.ControlPointsGeoreference")],T);const C=h(),S=h(),k=h(),b=h(),M=h(),A=h(),I=h(),O=h(),U=Math.PI/2;function G(o,t,r){m(o,r.sourcePoint.x,r.sourcePoint.y),m(t,r.mapPoint.x,r.mapPoint.y)}function L(o,t,r){return G(C,M,t),G(S,A,r),f(k,S,C,U),f(b,C,S,U),f(I,A,M,-U),f(O,M,A,-U),F(o,C,S,k,b,M,A,I,O)}function z(o,t,r,n){return G(C,M,t),G(S,A,r),G(k,I,n),P(b,C,S,.5),f(b,k,b,Math.PI),P(O,M,A,.5),f(O,I,O,Math.PI),F(o,C,S,k,b,M,A,I,O)}function B(o,t,r,n,e){return G(C,M,t),G(S,A,r),G(k,I,n),G(b,O,e),F(o,C,S,k,b,M,A,I,O)}const q=new Array(8).fill(0),D=new Array(8).fill(0);function E(o,t,r,n,e){return o[0]=t[0],o[1]=t[1],o[2]=r[0],o[3]=r[1],o[4]=n[0],o[5]=n[1],o[6]=e[0],o[7]=e[1],o}function F(o,t,r,n,e,s,c,l,a){return i(o,E(q,t,r,n,e),E(D,s,c,l,a))}function H(o,t,r,n){const e=d(0,r),i=d(0,0),c=d(t,0),l=d(t,r);return s(e,e,o),s(i,i,o),s(c,c,o),s(l,l,o),new j({rings:[[e,i,c,l,e]],spatialReference:n})}const J=T;export{J 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.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";var r;let e=r=class extends s{constructor(){super(...arguments),this.statisticType=null,this.onStatisticField=null,this.onStatisticValueExpression=null}clone(){return new r({statisticType:this.statisticType,onStatisticField:this.onStatisticField,onStatisticValueExpression:this.onStatisticValueExpression})}};t([i({type:String,json:{write:!0}})],e.prototype,"statisticType",void 0),t([i({type:String,json:{write:!0}})],e.prototype,"onStatisticField",void 0),t([i({type:String,json:{write:!0}})],e.prototype,"onStatisticValueExpression",void 0),e=r=t([o("esri.layers.support.OutStatistic")],e);const p=e;export{p as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";var r;let e=r=class extends s{constructor(t){super(t),this.statisticType=null,this.onStatisticField=null,this.onStatisticValueExpression=null}clone(){return new r({statisticType:this.statisticType,onStatisticField:this.onStatisticField,onStatisticValueExpression:this.onStatisticValueExpression})}};t([i({type:String,json:{write:!0}})],e.prototype,"statisticType",void 0),t([i({type:String,json:{write:!0}})],e.prototype,"onStatisticField",void 0),t([i({type:String,json:{write:!0}})],e.prototype,"onStatisticValueExpression",void 0),e=r=t([o("esri.layers.support.OutStatistic")],e);const p=e;export{p as default};