@arcgis/core 5.2.0-next.15 → 5.2.0-next.17

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 (892) hide show
  1. package/applications/Urban/editingSessionUtils.js +1 -1
  2. package/arcade/featureSetUtils.js +1 -1
  3. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  4. package/arcade/featureset/sources/FeatureLayerParquet.js +2 -0
  5. package/arcade/featureset/support/FeatureSet.js +1 -1
  6. package/arcade/featureset/support/shared.js +1 -1
  7. package/arcade.d.ts +2 -1
  8. package/arcgisGlobal.d.ts +6 -1
  9. package/assets/esri/core/t9n/Units_ar.json +1 -1
  10. package/assets/esri/core/t9n/Units_bg.json +1 -1
  11. package/assets/esri/core/t9n/Units_bs.json +1 -1
  12. package/assets/esri/core/t9n/Units_ca.json +1 -1
  13. package/assets/esri/core/t9n/Units_cs.json +1 -1
  14. package/assets/esri/core/t9n/Units_da.json +1 -1
  15. package/assets/esri/core/t9n/Units_de.json +1 -1
  16. package/assets/esri/core/t9n/Units_el.json +1 -1
  17. package/assets/esri/core/t9n/Units_es.json +1 -1
  18. package/assets/esri/core/t9n/Units_et.json +1 -1
  19. package/assets/esri/core/t9n/Units_fi.json +1 -1
  20. package/assets/esri/core/t9n/Units_fr.json +1 -1
  21. package/assets/esri/core/t9n/Units_he.json +1 -1
  22. package/assets/esri/core/t9n/Units_hr.json +1 -1
  23. package/assets/esri/core/t9n/Units_hu.json +1 -1
  24. package/assets/esri/core/t9n/Units_id.json +1 -1
  25. package/assets/esri/core/t9n/Units_it.json +1 -1
  26. package/assets/esri/core/t9n/Units_ja.json +1 -1
  27. package/assets/esri/core/t9n/Units_ko.json +1 -1
  28. package/assets/esri/core/t9n/Units_lt.json +1 -1
  29. package/assets/esri/core/t9n/Units_lv.json +1 -1
  30. package/assets/esri/core/t9n/Units_nl.json +1 -1
  31. package/assets/esri/core/t9n/Units_no.json +1 -1
  32. package/assets/esri/core/t9n/Units_pl.json +1 -1
  33. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  34. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  35. package/assets/esri/core/t9n/Units_ro.json +1 -1
  36. package/assets/esri/core/t9n/Units_ru.json +1 -1
  37. package/assets/esri/core/t9n/Units_sk.json +1 -1
  38. package/assets/esri/core/t9n/Units_sl.json +1 -1
  39. package/assets/esri/core/t9n/Units_sr.json +1 -1
  40. package/assets/esri/core/t9n/Units_sv.json +1 -1
  41. package/assets/esri/core/t9n/Units_th.json +1 -1
  42. package/assets/esri/core/t9n/Units_tr.json +1 -1
  43. package/assets/esri/core/t9n/Units_uk.json +1 -1
  44. package/assets/esri/core/t9n/Units_vi.json +1 -1
  45. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  46. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  47. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  48. package/assets/esri/core/workers/RemoteClient.js +1 -1
  49. package/assets/esri/core/workers/chunks/007485862ce95928717a.js +1 -0
  50. package/assets/esri/core/workers/chunks/00bcb04934972179b9ca.js +1 -0
  51. package/assets/esri/core/workers/chunks/{d9d4754062758789f186.js → 05016e5a1de384994001.js} +2 -2
  52. package/assets/esri/core/workers/chunks/05b6b2c0b76afb100e33.js +1 -0
  53. package/assets/esri/core/workers/chunks/{8927fb4aa68f7e541a39.js → 05d597dd117766beadd8.js} +1 -1
  54. package/assets/esri/core/workers/chunks/073ee52705ea326fecfb.js +1 -0
  55. package/assets/esri/core/workers/chunks/0a52373c4ba652e0ee0f.js +1 -0
  56. package/assets/esri/core/workers/chunks/0b522e05668bef729b1b.js +1 -0
  57. package/assets/esri/core/workers/chunks/0d42322362e76f674d94.js +2 -0
  58. package/assets/esri/core/workers/chunks/{a442534ac0956a68b769.js → 0e81b6aa64d5491870b2.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{81e3bd1a0634ddc2b833.js → 0f10d7d592c36ee2d1ea.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{3526ab3b1f87c24ae6f8.js → 0fb685f385e91d0f0601.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{cdf6ad970dc1893dac58.js → 110135b0562a3b5708b9.js} +1 -1
  62. package/assets/esri/core/workers/chunks/11d1af758e2140095b10.js +1 -0
  63. package/assets/esri/core/workers/chunks/122892f365f5327d290c.js +1 -0
  64. package/assets/esri/core/workers/chunks/1305690054214a9cf48d.js +1 -0
  65. package/assets/esri/core/workers/chunks/168c15cf462f9abcbdd2.js +1 -0
  66. package/assets/esri/core/workers/chunks/169bfafec4d59be2beb0.js +1 -0
  67. package/assets/esri/core/workers/chunks/1d2609ce6220b5af5526.js +1 -0
  68. package/assets/esri/core/workers/chunks/1e109a521ca8772fdf04.js +1 -0
  69. package/assets/esri/core/workers/chunks/1ea840b7ac1ffaa0c389.js +1 -0
  70. package/assets/esri/core/workers/chunks/1f48438b3055afeb710f.js +1 -0
  71. package/assets/esri/core/workers/chunks/2353fbc1ff4481dcfb1f.js +1 -0
  72. package/assets/esri/core/workers/chunks/2509da565e5a2b43ac7f.js +1 -0
  73. package/assets/esri/core/workers/chunks/255c8e937e7a123ebb04.js +1 -0
  74. package/assets/esri/core/workers/chunks/256cc116e3be4feee593.js +1 -0
  75. package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +1 -0
  76. package/assets/esri/core/workers/chunks/29e6f4b19c3da9129439.js +1 -0
  77. package/assets/esri/core/workers/chunks/{45b560ca01fb566ba560.js → 2a8d791aef3123e6a3c4.js} +1 -1
  78. package/assets/esri/core/workers/chunks/2baee42e1797a709fe4b.js +1 -0
  79. package/assets/esri/core/workers/chunks/2c017eae434254610c8e.js +1 -0
  80. package/assets/esri/core/workers/chunks/2d7a4b669804d0c5029b.js +1 -0
  81. package/assets/esri/core/workers/chunks/2f40193d1b2e534c5226.js +1 -0
  82. package/assets/esri/core/workers/chunks/303e723e829ea7088d43.js +1 -0
  83. package/assets/esri/core/workers/chunks/31c4128b23968575feca.js +1 -0
  84. package/assets/esri/core/workers/chunks/35533c8ef541f7643497.js +2 -0
  85. package/assets/esri/core/workers/chunks/35a508a9311689d8df52.js +1 -0
  86. package/assets/esri/core/workers/chunks/36913f0f944a9eb82cd3.js +1 -0
  87. package/assets/esri/core/workers/chunks/3a35779cae6a11cde51b.js +1 -0
  88. package/assets/esri/core/workers/chunks/3a526e1d18490b99332f.js +1 -0
  89. package/assets/esri/core/workers/chunks/{cc62e5095e328bed3e01.js → 3aa0a34d2b7dbf2e2c66.js} +1 -1
  90. package/assets/esri/core/workers/chunks/3d4ad7c728e02aa90551.js +1 -0
  91. package/assets/esri/core/workers/chunks/3e89f487c5851c954d8b.js +1 -0
  92. package/assets/esri/core/workers/chunks/436d51b9f1b1b5abc4bc.js +1 -0
  93. package/assets/esri/core/workers/chunks/43ef6dee2e1d9ed7885e.js +1 -0
  94. package/assets/esri/core/workers/chunks/442424200e7475e9a08f.js +1 -0
  95. package/assets/esri/core/workers/chunks/4b96aa2dc5b88846bb53.js +1 -0
  96. package/assets/esri/core/workers/chunks/4ea325c829d3b82854b1.js +1 -0
  97. package/assets/esri/core/workers/chunks/50c88e2545380800381f.js +1 -0
  98. package/assets/esri/core/workers/chunks/51a53011478e0cf96e0b.js +1 -0
  99. package/assets/esri/core/workers/chunks/51a8a47aac1d8d22ba9d.js +1 -0
  100. package/assets/esri/core/workers/chunks/5481af25fd46914498df.js +1 -0
  101. package/assets/esri/core/workers/chunks/54f54623532f633dc0e2.js +1 -0
  102. package/assets/esri/core/workers/chunks/{bfd1aef8ac795e1ce227.js → 57a6572d440d2c62432b.js} +1 -1
  103. package/assets/esri/core/workers/chunks/5809e70a8e57e9b05959.js +1 -0
  104. package/assets/esri/core/workers/chunks/589b31cc5c663a288942.js +1 -0
  105. package/assets/esri/core/workers/chunks/58ce4bcfb15f378b1b9f.js +1 -0
  106. package/assets/esri/core/workers/chunks/58e0e50b6c3abaa4798f.js +1 -0
  107. package/assets/esri/core/workers/chunks/595bc41ff36c77324d01.js +261 -0
  108. package/assets/esri/core/workers/chunks/599bd80379423c99799d.js +1 -0
  109. package/assets/esri/core/workers/chunks/5bf01e0eff8a78b65e9e.js +1 -0
  110. package/assets/esri/core/workers/chunks/5dfeefee96659832398a.js +1 -0
  111. package/assets/esri/core/workers/chunks/{011a4d4201696fa10408.js → 5ea1113b7bdcf94b2822.js} +1 -1
  112. package/assets/esri/core/workers/chunks/5fab14c5f1febebb75f1.js +1 -0
  113. package/assets/esri/core/workers/chunks/60d4a3f770bb1e01cd10.js +1 -0
  114. package/assets/esri/core/workers/chunks/63858dfcff1177e597e7.js +1 -0
  115. package/assets/esri/core/workers/chunks/6849282c4a5cd733779d.js +1 -0
  116. package/assets/esri/core/workers/chunks/686c1a1b794ebe1a0341.js +1 -0
  117. package/assets/esri/core/workers/chunks/6a21a22b08f968fa8d60.js +1 -0
  118. package/assets/esri/core/workers/chunks/{11c3b1e8ca21ad62fdd1.js → 6db5ee9c589265b23b60.js} +1 -1
  119. package/assets/esri/core/workers/chunks/6dc60afb0c39bbb001a3.js +1 -0
  120. package/assets/esri/core/workers/chunks/{5bfae465872760e7af6d.js → 6f240fe78b299e6c4fcc.js} +1 -1
  121. package/assets/esri/core/workers/chunks/70cb825bb37f1977d2ab.js +1 -0
  122. package/assets/esri/core/workers/chunks/71a593fa116770e58832.js +1 -0
  123. package/assets/esri/core/workers/chunks/71f09e34d56c9fe5c307.js +1 -0
  124. package/assets/esri/core/workers/chunks/{72cfb186e50537bcdd19.js → 75915f81caaf9e5345a9.js} +1 -1
  125. package/assets/esri/core/workers/chunks/7832d94f35b79e27ee51.js +1 -0
  126. package/assets/esri/core/workers/chunks/8104ac2eee69d79ada86.js +1 -0
  127. package/assets/esri/core/workers/chunks/818a481ce579f519de1c.js +1 -0
  128. package/assets/esri/core/workers/chunks/831455798b177678720c.js +1 -0
  129. package/assets/esri/core/workers/chunks/83ce38342796bd6d73ce.js +1 -0
  130. package/assets/esri/core/workers/chunks/84a0bb53fcbd99b5aa0c.js +1 -0
  131. package/assets/esri/core/workers/chunks/87b86375f8557418dbe6.js +1 -0
  132. package/assets/esri/core/workers/chunks/8817d25c7f4cf0e6c6bd.js +1 -0
  133. package/assets/esri/core/workers/chunks/{0b55fc5050e718371e05.js → 888af532ad48fd86f285.js} +1 -1
  134. package/assets/esri/core/workers/chunks/{9331969046f2b277d620.js → 8a39dd585742960d3ca2.js} +1 -1
  135. package/assets/esri/core/workers/chunks/8ade399db21938822a7c.js +1 -0
  136. package/assets/esri/core/workers/chunks/8c62e2dabd1f1e13d244.js +1 -0
  137. package/assets/esri/core/workers/chunks/909e88c27d80777b047c.js +1 -0
  138. package/assets/esri/core/workers/chunks/91c5205d1274c7f190d5.js +1 -0
  139. package/assets/esri/core/workers/chunks/91c543443cd6768ad6ff.js +1 -0
  140. package/assets/esri/core/workers/chunks/9230ad807020fc2bbf8e.js +1 -0
  141. package/assets/esri/core/workers/chunks/92458803531fdfe1557a.js +1 -0
  142. package/assets/esri/core/workers/chunks/{976ab2be6c244768c08a.js → 940ebb13618d38c6b459.js} +1 -1
  143. package/assets/esri/core/workers/chunks/987594539981483a7c5e.js +1 -0
  144. package/assets/esri/core/workers/chunks/99c002015c2127e6cbfc.js +2 -0
  145. package/assets/esri/core/workers/chunks/9d59cc5c0a63a4e41d99.js +1 -0
  146. package/assets/esri/core/workers/chunks/{91c0de3950991d81b7f2.js → 9de673a04c70bd47047e.js} +1 -1
  147. package/assets/esri/core/workers/chunks/a195f569eada3a8736be.js +1 -0
  148. package/assets/esri/core/workers/chunks/a32651777e4f07df5b6a.js +1 -0
  149. package/assets/esri/core/workers/chunks/a3393780655152102c45.js +1 -0
  150. package/assets/esri/core/workers/chunks/a3c5b754a6fa0f4250bf.js +1 -0
  151. package/assets/esri/core/workers/chunks/{52175ff9e8c2c136f90a.js → a3ecde3794a7db3cf283.js} +1 -1
  152. package/assets/esri/core/workers/chunks/a59a1fdcd37a875f179b.js +1 -0
  153. package/assets/esri/core/workers/chunks/a844c4e031e77db11478.js +1 -0
  154. package/assets/esri/core/workers/chunks/a99ce2f12c8204ee542a.js +1 -0
  155. package/assets/esri/core/workers/chunks/aba7a053015a9738d8a0.js +1 -0
  156. package/assets/esri/core/workers/chunks/{c8460bdf60aca749ed05.js → ac16016964be3b684e98.js} +1 -1
  157. package/assets/esri/core/workers/chunks/adce59e4111bae4225f7.js +1 -0
  158. package/assets/esri/core/workers/chunks/aeeee92b86554962711e.js +1 -0
  159. package/assets/esri/core/workers/chunks/af3b060fdfa3b6174340.js +1 -0
  160. package/assets/esri/core/workers/chunks/b0e4af49fc968b0a910f.js +1 -0
  161. package/assets/esri/core/workers/chunks/b289c46ce2dc04d32e81.js +1 -0
  162. package/assets/esri/core/workers/chunks/{c983e5ce0ff952b65d7f.js → b2b342b06d502fc61ea5.js} +1 -1
  163. package/assets/esri/core/workers/chunks/b466af9019f10420115e.js +1 -0
  164. package/assets/esri/core/workers/chunks/{67ebde34377f98d17cda.js → b5571e93bc136dac8ee1.js} +1 -1
  165. package/assets/esri/core/workers/chunks/ba1c4a8794ac55942e35.js +1 -0
  166. package/assets/esri/core/workers/chunks/bb9232d9f63ec0c32447.js +1 -0
  167. package/assets/esri/core/workers/chunks/bbcad2fde838819ffc7b.js +1 -0
  168. package/assets/esri/core/workers/chunks/bd260798b8de09a1eeb2.js +1 -0
  169. package/assets/esri/core/workers/chunks/{44d0ca9d4c5f1722688c.js → bf67e0f6064fb9d94ac8.js} +1 -1
  170. package/assets/esri/core/workers/chunks/bf9eca7dd107bdb06614.js +1 -0
  171. package/assets/esri/core/workers/chunks/c030a974a63155f450e9.js +1 -0
  172. package/assets/esri/core/workers/chunks/c0b7b9d115dccb2924ff.js +1 -0
  173. package/assets/esri/core/workers/chunks/c2db773201adca204f95.js +1 -0
  174. package/assets/esri/core/workers/chunks/c318e6dbb8651433038f.js +2 -0
  175. package/assets/esri/core/workers/chunks/c4a2ec2e5897300163ac.js +1 -0
  176. package/assets/esri/core/workers/chunks/c63b315c6b76b4860fc5.js +1 -0
  177. package/assets/esri/core/workers/chunks/c8091e8fd7ca43a4490a.js +1 -0
  178. package/assets/esri/core/workers/chunks/{2413b383b7f2bdcd4ced.js → c8672a54c98d472aa24d.js} +1 -1
  179. package/assets/esri/core/workers/chunks/cbe8adc100582e746a8c.js +1 -0
  180. package/assets/esri/core/workers/chunks/d0321dd4b5b2d863eecd.js +1 -0
  181. package/assets/esri/core/workers/chunks/d523af1db620b5381c99.js +1 -0
  182. package/assets/esri/core/workers/chunks/d5a0e3a73df827dc7b06.js +1 -0
  183. package/assets/esri/core/workers/chunks/d670e134348954ce465d.js +1 -0
  184. package/assets/esri/core/workers/chunks/{886ae23a1d8fa21e531f.js → d750e4abeb777caa8c36.js} +1 -1
  185. package/assets/esri/core/workers/chunks/{bd36c57dd0cd28dee55f.js → d7acbc2ddff4cee8a465.js} +1 -1
  186. package/assets/esri/core/workers/chunks/{cb8c4d8334fab9bd9a04.js → d90bc34d97bb21c29c40.js} +1 -1
  187. package/assets/esri/core/workers/chunks/d9fcc63df008f687848a.js +1 -0
  188. package/assets/esri/core/workers/chunks/db96a0c66578b2d1b715.js +1 -0
  189. package/assets/esri/core/workers/chunks/{6a1b6f8c868f8edce1d7.js → dd3b0070081eaf805d95.js} +1 -1
  190. package/assets/esri/core/workers/chunks/dd5dddf7e422216d3806.js +1 -0
  191. package/assets/esri/core/workers/chunks/de83c177f8a1234a5b2e.js +1 -0
  192. package/assets/esri/core/workers/chunks/{07ca020796c57cefda62.js → dfb19701b488089874fd.js} +1 -1
  193. package/assets/esri/core/workers/chunks/e2f33945d838183a2192.js +1 -0
  194. package/assets/esri/core/workers/chunks/e3ea4b7217df16592def.js +1 -0
  195. package/assets/esri/core/workers/chunks/{d97c0c18202b8c578f8c.js → e5471373f89fd7cb9844.js} +1 -1
  196. package/assets/esri/core/workers/chunks/e65d291bab13f7f5323b.js +1 -0
  197. package/assets/esri/core/workers/chunks/e95ee94027c1934086d8.js +1 -0
  198. package/assets/esri/core/workers/chunks/ecbf84a1f42e6188faab.js +1 -0
  199. package/assets/esri/core/workers/chunks/efaa1d05705f6b450e8f.js +1 -0
  200. package/assets/esri/core/workers/chunks/efaf998d18479a0380ae.js +1 -0
  201. package/assets/esri/core/workers/chunks/f0573db9a3d3e1499a7e.js +1 -0
  202. package/assets/esri/core/workers/chunks/f07722efd7fa2b75d4dd.js +1 -0
  203. package/assets/esri/core/workers/chunks/{520e0e5307eef27becc6.js → f0924613f818dd165ad9.js} +1 -1
  204. package/assets/esri/core/workers/chunks/{8b0a01ebc86ab226f01f.js → f23351a04643c464be84.js} +1 -1
  205. package/assets/esri/core/workers/chunks/f3d331da3c61af5c5a2f.js +1 -0
  206. package/assets/esri/core/workers/chunks/f3fe865506fd7428eb6d.js +1 -0
  207. package/assets/esri/core/workers/chunks/{3d20c86f1fe877bf884b.js → f59b76fde2cbd17f64b3.js} +1 -1
  208. package/assets/esri/core/workers/chunks/f6afc597eaf2afa9a4a0.js +1 -0
  209. package/assets/esri/core/workers/chunks/{ed2a1c371dfc5d4a744e.js → f7f820483e45c05ab9e4.js} +2 -2
  210. package/assets/esri/core/workers/chunks/f8cfd0045d06aa24beec.js +1 -0
  211. package/assets/esri/core/workers/chunks/f98bb3885bfc7f18f26c.js +1 -0
  212. package/assets/esri/core/workers/chunks/f9b44ff9bb4f7a88ab56.js +1 -0
  213. package/assets/esri/core/workers/chunks/{b102beeeb7a919f68b51.js → fb81705cec1be2431876.js} +1 -1
  214. package/assets/esri/core/workers/chunks/fd53ef66176ae164e221.js +1 -0
  215. package/assets/esri/core/workers/chunks/fd956a58787020d610af.js +1 -0
  216. package/assets/esri/core/workers/chunks/fdec3a2e100688c42e41.js +1 -0
  217. package/assets/esri/core/workers/chunks/fe6385115d76e16e8da0.js +1 -0
  218. package/assets/esri/core/workers/chunks/fedbeb488d5d7c07c7dc.js +1 -0
  219. package/assets/esri/core/workers/chunks/{d9695794cfaa014a55b1.js → ff00ac01f0baaecaa890.js} +1 -1
  220. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  221. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +62 -90
  222. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +0 -2
  223. package/assets/esri/themes/dark/main.css +1 -1
  224. package/assets/esri/themes/light/main.css +1 -1
  225. package/assets/esri/themes/light/view.css +1 -1
  226. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
  227. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
  228. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
  229. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
  230. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
  231. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
  232. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
  233. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
  234. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
  235. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
  236. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
  237. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  238. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
  239. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
  240. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
  241. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
  242. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
  243. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
  244. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
  245. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
  246. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
  247. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
  248. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
  249. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
  250. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
  251. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
  252. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
  253. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
  254. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
  255. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
  256. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
  257. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
  258. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
  259. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
  260. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
  261. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
  262. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
  263. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
  264. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
  265. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
  266. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
  267. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
  268. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
  269. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
  270. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
  271. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
  272. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
  273. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
  274. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
  275. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
  276. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
  277. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
  278. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
  279. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
  280. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
  281. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
  282. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
  283. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
  284. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
  285. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
  286. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
  287. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_no.json +1 -1
  288. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
  289. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
  290. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
  291. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
  292. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
  293. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
  294. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
  295. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
  296. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
  297. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
  298. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
  299. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
  300. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
  301. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
  302. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
  303. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
  304. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  305. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  306. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  307. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  308. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  309. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  310. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  311. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  312. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  313. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  314. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  315. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  316. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  317. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  318. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  319. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  320. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  321. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  322. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  323. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  324. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  325. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  326. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  327. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  328. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  329. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  330. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  331. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  332. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  333. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  334. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  335. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  336. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  337. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  338. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  339. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  340. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  341. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  342. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  343. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  344. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  345. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  346. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  347. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  348. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  349. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  350. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  351. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  352. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  353. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  354. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  355. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  356. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  357. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  358. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  359. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  360. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  361. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  362. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  363. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  364. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  365. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  366. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  367. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  368. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  369. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  370. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  371. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  372. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  373. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  374. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  375. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  376. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  377. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  378. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  379. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  380. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  381. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  382. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  383. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  384. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  385. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  386. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  387. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  388. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  389. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  390. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  391. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  392. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  393. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  394. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  395. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  396. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  397. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  398. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  399. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  400. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  401. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  402. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  403. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  404. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  405. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  406. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  407. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  408. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  409. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  410. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  411. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  412. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  413. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  414. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  415. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  416. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  417. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  418. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  419. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  420. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  421. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ar.json +1 -1
  422. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bg.json +1 -1
  423. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bs.json +1 -1
  424. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ca.json +1 -1
  425. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_cs.json +1 -1
  426. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_da.json +1 -1
  427. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_de.json +1 -1
  428. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_el.json +1 -1
  429. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_es.json +1 -1
  430. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_et.json +1 -1
  431. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fi.json +1 -1
  432. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fr.json +1 -1
  433. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_he.json +1 -1
  434. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hr.json +1 -1
  435. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hu.json +1 -1
  436. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_id.json +1 -1
  437. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_it.json +1 -1
  438. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ja.json +1 -1
  439. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ko.json +1 -1
  440. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lt.json +1 -1
  441. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lv.json +1 -1
  442. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_nl.json +1 -1
  443. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_no.json +1 -1
  444. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pl.json +1 -1
  445. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-BR.json +1 -1
  446. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-PT.json +1 -1
  447. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ro.json +1 -1
  448. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ru.json +1 -1
  449. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sk.json +1 -1
  450. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sl.json +1 -1
  451. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sr.json +1 -1
  452. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sv.json +1 -1
  453. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_th.json +1 -1
  454. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_tr.json +1 -1
  455. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_uk.json +1 -1
  456. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_vi.json +1 -1
  457. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-CN.json +1 -1
  458. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-HK.json +1 -1
  459. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-TW.json +1 -1
  460. package/chunks/Bufferer-CclWhXVb.js +2 -0
  461. package/chunks/Distance2DCalculator-DjIp2uQi.js +2 -0
  462. package/chunks/Envelope.js +1 -1
  463. package/chunks/Envelope2D.js +1 -1
  464. package/chunks/GaussianSplatComposition.glsl.js +1 -1
  465. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +2 -0
  466. package/chunks/GeodeticUtils.js +1 -1
  467. package/chunks/Geometry.js +1 -1
  468. package/chunks/{GeometryCleaner-BEJM7I4l.js → GeometryCleaner-CIE8Wfmb.js} +1 -1
  469. package/chunks/GlowComposition.glsl.js +1 -1
  470. package/chunks/MultiPathImpl.js +1 -1
  471. package/chunks/OITBlend.glsl.js +1 -1
  472. package/chunks/OITDimOpaque.glsl.js +1 -1
  473. package/chunks/OperatorClip.js +1 -1
  474. package/chunks/OperatorCrosses.js +1 -1
  475. package/chunks/OperatorCut.js +1 -1
  476. package/chunks/OperatorDefinitions.js +1 -1
  477. package/chunks/OperatorDensify.js +1 -1
  478. package/chunks/OperatorGeneralize.js +1 -1
  479. package/chunks/OperatorGeodesicBuffer.js +1 -1
  480. package/chunks/OperatorGeodeticArea.js +1 -1
  481. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  482. package/chunks/OperatorGeodeticDistance.js +1 -1
  483. package/chunks/OperatorGeodeticLength.js +1 -1
  484. package/chunks/OperatorGraphicBuffer.js +2 -0
  485. package/chunks/OperatorIntegrate.js +1 -1
  486. package/chunks/OperatorIntersects.js +1 -1
  487. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  488. package/chunks/OperatorOverlaps.js +1 -1
  489. package/chunks/OperatorProximity.js +1 -1
  490. package/chunks/OperatorProximityGeodesic.js +1 -1
  491. package/chunks/OperatorShapePreservingLength.js +1 -1
  492. package/chunks/OperatorShapePreservingProject.js +1 -1
  493. package/chunks/OperatorSimplifyOGC.js +1 -1
  494. package/chunks/OperatorTouches.js +1 -1
  495. package/chunks/OperatorWithin.js +1 -1
  496. package/chunks/Point2D.js +1 -1
  497. package/chunks/ProjectionTransformation.js +1 -1
  498. package/chunks/{SideCalculator2D-BNwb5gvz.js → SideCalculator2D-DX0718xq.js} +1 -1
  499. package/chunks/SimpleGeometryCursor.js +1 -1
  500. package/chunks/SpatialReference.js +1 -1
  501. package/chunks/Transformation2D.js +1 -1
  502. package/chunks/centroidOperator.js +1 -1
  503. package/chunks/containsOperator.js +1 -1
  504. package/chunks/disjointOperator.js +1 -1
  505. package/chunks/distanceOperator.js +1 -1
  506. package/chunks/equalsOperator.js +1 -1
  507. package/chunks/languageUtils.js +1 -1
  508. package/config.js +1 -1
  509. package/core/has.js +1 -1
  510. package/core/screenUtils.js +1 -1
  511. package/editing/types.d.ts +22 -2
  512. package/form/elements/UtilityNetworkAssociationsElement.d.ts +0 -1
  513. package/geometry/Mesh.d.ts +1 -1
  514. package/geometry/operators/extendOperator.js +1 -1
  515. package/geometry/operators/gx/operatorAffineTransform.js +1 -1
  516. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  517. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  518. package/geometry/operators/gx/operatorBoundary.js +1 -1
  519. package/geometry/operators/gx/operatorBuffer.js +1 -1
  520. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  521. package/geometry/operators/gx/operatorDifference.js +1 -1
  522. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  523. package/geometry/operators/gx/operatorIntersection.js +1 -1
  524. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  525. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  526. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  527. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  528. package/geometry/operators/gx/operatorOffset.js +1 -1
  529. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  530. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  531. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  532. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  533. package/geometry/operators/gx/operatorUnion.js +1 -1
  534. package/geometry/operators/isNearOperator.js +1 -1
  535. package/geometry/operators/json/containsOperator.js +1 -1
  536. package/geometry/operators/json/disjointOperator.js +1 -1
  537. package/geometry/operators/reshapeOperator.js +1 -1
  538. package/geometry/operators/support/apiConverter.js +1 -1
  539. package/geometry/operators/support/initNoPeFactory.js +1 -1
  540. package/geometry/operators/support/jsonConverter.js +1 -1
  541. package/geometry/support/aaBoundingRect.js +1 -1
  542. package/graphic/AnnotationFeatureGraphicOrigin.d.ts +5 -2
  543. package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
  544. package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
  545. package/graphic/graphicOrigins.js +1 -1
  546. package/graphic/isAnnotationFeatureGraphicOrigin.d.ts +29 -0
  547. package/graphic/isAnnotationFeatureGraphicOrigin.js +2 -0
  548. package/graphic/isDimensionFeatureGraphicOrigin.d.ts +29 -0
  549. package/graphic/isDimensionFeatureGraphicOrigin.js +2 -0
  550. package/interfaces.d.ts +3 -3
  551. package/kernel.js +1 -1
  552. package/layers/AnnotationFeatureLayer.d.ts +73 -0
  553. package/layers/AnnotationFeatureLayer.js +1 -1
  554. package/layers/FeatureLayer.d.ts +7 -4
  555. package/layers/FeatureLayer.js +1 -1
  556. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  557. package/layers/ParquetLayer.js +1 -1
  558. package/layers/SubtypeGroupLayer.d.ts +7 -4
  559. package/layers/SubtypeGroupLayer.js +1 -1
  560. package/layers/graphics/applyEditsUtils.js +1 -1
  561. package/layers/graphics/data/QueryEngine.js +1 -1
  562. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  563. package/layers/graphics/sources/MemorySource.js +1 -1
  564. package/layers/graphics/sources/ParquetSource.js +1 -1
  565. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  566. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  567. package/layers/orientedImagery/transformations/utils.js +1 -1
  568. package/layers/support/{AnnotationSublayer.d.ts → AnnotationFeatureSublayer.d.ts} +12 -12
  569. package/layers/support/AnnotationFeatureSublayer.js +2 -0
  570. package/layers/support/EditingCapabilities.js +1 -1
  571. package/layers/support/ParquetPortalItemData.js +1 -1
  572. package/layers/support/SubtypeSublayer.d.ts +7 -4
  573. package/layers/support/SubtypeSublayer.js +1 -1
  574. package/layers/support/featureLayerUtils.js +1 -1
  575. package/networks/CircuitManager.d.ts +247 -1
  576. package/networks/UnitIdentifierManager.d.ts +40 -3
  577. package/networks/UtilityNetwork.d.ts +0 -11
  578. package/networks/UtilityNetwork.js +1 -1
  579. package/networks/support/Circuit.d.ts +0 -1
  580. package/networks/support/CircuitLocation.d.ts +0 -1
  581. package/networks/support/CircuitPath.d.ts +0 -1
  582. package/networks/support/CircuitPathConnectivityElement.d.ts +0 -1
  583. package/networks/support/CircuitSection.d.ts +0 -1
  584. package/networks/support/NamedTraceConfiguration.d.ts +1 -7
  585. package/networks/support/Subcircuit.d.ts +0 -1
  586. package/networks/support/UNTraceConfiguration.d.ts +0 -4
  587. package/networks/support/jsonTypes.d.ts +1 -1
  588. package/networks/support/typeUtils.d.ts +10 -1
  589. package/networks/support/typeUtils.js +1 -1
  590. package/package.json +3 -3
  591. package/popup/Feature.d.ts +57 -6
  592. package/popup/Features.d.ts +86 -7
  593. package/popup/content/UtilityNetworkAssociationsContent.d.ts +0 -1
  594. package/popup/support/UtilityNetworkAssociationType.d.ts +0 -1
  595. package/rest/networks/circuits/support/CircuitTraceResult.d.ts +0 -1
  596. package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +0 -1
  597. package/rest/networks/support/TelecomNetworkElement.d.ts +0 -1
  598. package/rest/networks/support/TraceLocation.d.ts +1 -11
  599. package/rest/networks/support/TraceParameters.d.ts +1 -7
  600. package/rest/networks/support/TraceResult.d.ts +0 -2
  601. package/rest/networks/support/TraverseAssociationsParameters.d.ts +69 -0
  602. package/rest/networks/support/TraverseAssociationsParameters.js +2 -0
  603. package/rest/networks/support/TraverseAssociationsResult.d.ts +39 -0
  604. package/rest/networks/support/TraverseAssociationsResult.js +2 -0
  605. package/rest/networks/traverseAssociations.d.ts +21 -0
  606. package/rest/networks/traverseAssociations.js +2 -0
  607. package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +0 -1
  608. package/rest/print.js +1 -1
  609. package/rest/query/operations/query.js +1 -1
  610. package/smartMapping/renderers/location.js +1 -1
  611. package/smartMapping/renderers/opacity.js +1 -1
  612. package/smartMapping/renderers/predominance.js +1 -1
  613. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  614. package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
  615. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  616. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  617. package/support/revision.js +1 -1
  618. package/symbols/WebStyleSymbol.js +1 -1
  619. package/symbols/cim/effects/EffectOffset.js +1 -1
  620. package/symbols/support/symbolUtils.js +1 -1
  621. package/symbols/support/webStyleSymbolCache.js +2 -0
  622. package/third-party-notices.txt +0 -32
  623. package/undoredo/support/ApplySet.js +1 -1
  624. package/undoredo/support/ApplySetItem.js +1 -1
  625. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  626. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  627. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  628. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  629. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  630. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +1 -1
  631. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
  632. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  633. package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
  634. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  635. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  636. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  637. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  638. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  639. package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
  640. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  641. package/views/2d/layers/support/annodime/utils.js +1 -1
  642. package/views/2d/support/hitTestUtils.js +1 -1
  643. package/views/2d/unitBezier.js +1 -1
  644. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +2 -0
  645. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
  646. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  647. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +2 -0
  648. package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +1 -1
  649. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  650. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  651. package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
  652. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  653. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  654. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  655. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  656. package/views/3d/layers/graphics/SymbolComplexity.js +1 -1
  657. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  658. package/views/3d/support/QualityProfile.js +1 -1
  659. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  660. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  661. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +14 -6
  662. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -1
  663. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
  664. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  665. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  666. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  667. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  668. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  669. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  670. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  671. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  672. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  673. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +6 -7
  674. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
  675. package/views/LinkChartView.d.ts +3 -1
  676. package/views/View2D.d.ts +3 -1
  677. package/views/draw/DrawTool.js +1 -1
  678. package/views/draw/support/editingSessionUtils.js +1 -1
  679. package/views/interactive/snapping/SnappingManager.js +1 -1
  680. package/views/interactive/snapping/candidates/dehydrated/{DehydratedVertexSnappingCandidate.js → DehydratedFeatureSnappingCandidate.js} +1 -1
  681. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +10 -3
  682. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  683. package/widgets/BatchAttributeForm/attachmentUtils.d.ts +9 -0
  684. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  685. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  686. package/widgets/BatchAttributeForm/css.js +1 -1
  687. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +3 -3
  688. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  689. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  690. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  691. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  692. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  693. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  694. package/widgets/BatchAttributeForm/inputs/support/attachmentValidationCriteriaState.d.ts +1 -1
  695. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  696. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  697. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  698. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  699. package/widgets/BatchAttributeForm/types.d.ts +92 -7
  700. package/widgets/BatchAttributeForm.js +1 -1
  701. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  702. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  703. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  704. package/widgets/Editor/EditorViewModel.js +1 -1
  705. package/widgets/Editor/Edits.js +1 -1
  706. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  707. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  708. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  709. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  710. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  711. package/widgets/Editor/UpdateWorkflow.js +1 -1
  712. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  713. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  714. package/widgets/Editor/support/EditorItem.js +1 -1
  715. package/widgets/Editor/support/SketchController.js +1 -1
  716. package/widgets/Editor/support/attachmentUtils.js +2 -0
  717. package/widgets/Editor/workflowUtils.js +1 -1
  718. package/widgets/Editor.js +1 -1
  719. package/widgets/Feature/FeatureViewModel.d.ts +0 -1
  720. package/widgets/FeatureForm/UtilityNetworkAssociationInput.d.ts +0 -1
  721. package/widgets/Features/FeaturesViewModel.d.ts +0 -1
  722. package/widgets/Features/FeaturesViewModel.js +1 -1
  723. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  724. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  725. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  726. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  727. package/widgets/OrientedImageryViewer.js +1 -1
  728. package/widgets/Popup.js +1 -1
  729. package/widgets/Sketch/SketchViewModel.d.ts +10 -1
  730. package/widgets/Sketch/SketchViewModel.js +1 -1
  731. package/widgets/Sketch.js +1 -1
  732. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +3 -2
  733. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  734. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  735. package/assets/components/assets/icon/orientedImageryFullSuperimpose16.json +0 -1
  736. package/assets/components/assets/icon/orientedImageryFullSuperimpose24.json +0 -1
  737. package/assets/components/assets/icon/orientedImageryFullSuperimpose32.json +0 -1
  738. package/assets/components/assets/icon/orientedImageryHalfSuperimpose16.json +0 -1
  739. package/assets/components/assets/icon/orientedImageryHalfSuperimpose24.json +0 -1
  740. package/assets/components/assets/icon/orientedImageryHalfSuperimpose32.json +0 -1
  741. package/assets/components/assets/icon/orientedImagerySceneOnly16.json +0 -1
  742. package/assets/components/assets/icon/orientedImagerySceneOnly24.json +0 -1
  743. package/assets/components/assets/icon/orientedImagerySceneOnly32.json +0 -1
  744. package/assets/components/assets/icon/parquetFeatureLayer16.json +0 -1
  745. package/assets/components/assets/icon/parquetFeatureLayer24.json +0 -1
  746. package/assets/components/assets/icon/parquetFeatureLayer32.json +0 -1
  747. package/assets/esri/core/workers/chunks/013708f40f811158d42c.js +0 -1
  748. package/assets/esri/core/workers/chunks/01ba5319cac3e0f14205.js +0 -1
  749. package/assets/esri/core/workers/chunks/03354e9256b2f77fd4f2.js +0 -1
  750. package/assets/esri/core/workers/chunks/0436fe89adc78696251c.js +0 -1
  751. package/assets/esri/core/workers/chunks/079b412d07d02504f1db.js +0 -1
  752. package/assets/esri/core/workers/chunks/0826d36dfbfa28442b70.js +0 -1
  753. package/assets/esri/core/workers/chunks/0bf72e9d0a6deceeb406.js +0 -1
  754. package/assets/esri/core/workers/chunks/0ded58ccb83f624f1460.js +0 -1
  755. package/assets/esri/core/workers/chunks/0ecc1bc1686844cdd60e.js +0 -1
  756. package/assets/esri/core/workers/chunks/152f1c08197955224ad3.js +0 -1
  757. package/assets/esri/core/workers/chunks/174cc2e69e5b5a13d880.js +0 -1
  758. package/assets/esri/core/workers/chunks/181e948d076a9a7aae8a.js +0 -1
  759. package/assets/esri/core/workers/chunks/18e7784f13a57a75585a.js +0 -1
  760. package/assets/esri/core/workers/chunks/1c8436b27a3d3cde5cfc.js +0 -1
  761. package/assets/esri/core/workers/chunks/1d81e667a580c5cdeda1.js +0 -262
  762. package/assets/esri/core/workers/chunks/1dacc0b64bd27ce2de3a.js +0 -1
  763. package/assets/esri/core/workers/chunks/1eeb1edca0ad5db6917c.js +0 -1
  764. package/assets/esri/core/workers/chunks/1effde6a39ef0d4af525.js +0 -1
  765. package/assets/esri/core/workers/chunks/1f289aa69dd6b6be534a.js +0 -1
  766. package/assets/esri/core/workers/chunks/27c6def22c2b0791ce9e.js +0 -1
  767. package/assets/esri/core/workers/chunks/2bc4aff77c830061e16e.js +0 -1
  768. package/assets/esri/core/workers/chunks/2c3fc2805f6de0963789.js +0 -1
  769. package/assets/esri/core/workers/chunks/2d2895f1fdf44d212a4d.js +0 -1
  770. package/assets/esri/core/workers/chunks/2e6382d50bf012064eae.js +0 -1
  771. package/assets/esri/core/workers/chunks/3248001d9dfb9153699e.js +0 -1
  772. package/assets/esri/core/workers/chunks/33b4f5dfe1a16b59b010.js +0 -1
  773. package/assets/esri/core/workers/chunks/36dac6ab51d9dbdd091d.js +0 -1
  774. package/assets/esri/core/workers/chunks/36dd3ad3ef2fbfc15cbd.js +0 -1
  775. package/assets/esri/core/workers/chunks/39974d1e5d3820ef1680.js +0 -1
  776. package/assets/esri/core/workers/chunks/3dc6e9494af16f7b8009.js +0 -1
  777. package/assets/esri/core/workers/chunks/3ecb906322a6a5c8c93b.js +0 -1
  778. package/assets/esri/core/workers/chunks/3f67162456a1f02190fa.js +0 -1
  779. package/assets/esri/core/workers/chunks/42e5e00610f281ca8ffa.js +0 -1
  780. package/assets/esri/core/workers/chunks/4301cb9670fa7c907460.js +0 -1
  781. package/assets/esri/core/workers/chunks/493a0981e90a5799fb5b.js +0 -1
  782. package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +0 -1
  783. package/assets/esri/core/workers/chunks/4cc78493805671708a9b.js +0 -1
  784. package/assets/esri/core/workers/chunks/4e4419282c4bf7ee4678.js +0 -1
  785. package/assets/esri/core/workers/chunks/4e788fc6cb2ea936f676.js +0 -1
  786. package/assets/esri/core/workers/chunks/4efef5fa8bf23aaf34cd.js +0 -1
  787. package/assets/esri/core/workers/chunks/5100b5a6a506c704dfaf.js +0 -1
  788. package/assets/esri/core/workers/chunks/5121768c70f1e03b685c.js +0 -1
  789. package/assets/esri/core/workers/chunks/52afd43bbe23e358efb5.js +0 -1
  790. package/assets/esri/core/workers/chunks/52f354bf80ee5ab0379a.js +0 -1
  791. package/assets/esri/core/workers/chunks/5359ff9492383c5bd9b1.js +0 -1
  792. package/assets/esri/core/workers/chunks/54d7f07e3348ddb6d9a2.js +0 -1
  793. package/assets/esri/core/workers/chunks/57b7e5fde972d3ad7884.js +0 -1
  794. package/assets/esri/core/workers/chunks/597aa39cdb5366ef9a74.js +0 -1
  795. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +0 -1
  796. package/assets/esri/core/workers/chunks/5cb1b950249d651f3837.js +0 -1
  797. package/assets/esri/core/workers/chunks/5cb274e5759f7ca0d4ed.js +0 -1
  798. package/assets/esri/core/workers/chunks/5d8924fdcdb473d261cd.js +0 -1
  799. package/assets/esri/core/workers/chunks/62de9e83331fb10aac6a.js +0 -2
  800. package/assets/esri/core/workers/chunks/62e77e3c5ca9b4887923.js +0 -2
  801. package/assets/esri/core/workers/chunks/64114a7d2da162987958.js +0 -1
  802. package/assets/esri/core/workers/chunks/641cddee377599916de2.js +0 -2
  803. package/assets/esri/core/workers/chunks/65520a443e3811255bea.js +0 -1
  804. package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +0 -1
  805. package/assets/esri/core/workers/chunks/6821462e5c1e9c76010a.js +0 -1
  806. package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +0 -1
  807. package/assets/esri/core/workers/chunks/6f5a82388a5eb5fcf1b7.js +0 -1
  808. package/assets/esri/core/workers/chunks/6f5d61f734ec40dafabb.js +0 -1
  809. package/assets/esri/core/workers/chunks/737de87bfb9b5f5a9c6c.js +0 -1
  810. package/assets/esri/core/workers/chunks/7748743d4be047094d67.js +0 -1
  811. package/assets/esri/core/workers/chunks/78c53aeb0a408ab3c80c.js +0 -1
  812. package/assets/esri/core/workers/chunks/79f2d4b3af5776ec2045.js +0 -1
  813. package/assets/esri/core/workers/chunks/7a8ed08cd173963b3112.js +0 -1
  814. package/assets/esri/core/workers/chunks/7b5c1030a7cf0f382cc4.js +0 -1
  815. package/assets/esri/core/workers/chunks/7cadb872b9ca96eedca5.js +0 -1
  816. package/assets/esri/core/workers/chunks/7cee81c5aa1e6b7d2452.js +0 -1
  817. package/assets/esri/core/workers/chunks/7ed3d6c72f23c628df3b.js +0 -1
  818. package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +0 -1
  819. package/assets/esri/core/workers/chunks/8351012ceb466f01b8fd.js +0 -1
  820. package/assets/esri/core/workers/chunks/859bc873e7af911a518f.js +0 -1
  821. package/assets/esri/core/workers/chunks/8e99f937fd36cf2cd05f.js +0 -1
  822. package/assets/esri/core/workers/chunks/93bd56396b8cd020f965.js +0 -1
  823. package/assets/esri/core/workers/chunks/94fac056e14caed09682.js +0 -1
  824. package/assets/esri/core/workers/chunks/957f7b8de4aecb6f644e.js +0 -1
  825. package/assets/esri/core/workers/chunks/97d2bdbea39cbcf8fd0f.js +0 -1
  826. package/assets/esri/core/workers/chunks/99101789035f1787c630.js +0 -1
  827. package/assets/esri/core/workers/chunks/9c6d34bb666f630d511f.js +0 -1
  828. package/assets/esri/core/workers/chunks/a0208e35b217808777c4.js +0 -1
  829. package/assets/esri/core/workers/chunks/a320998f18922a35899f.js +0 -1
  830. package/assets/esri/core/workers/chunks/a4e9a17dacbb52444d75.js +0 -1
  831. package/assets/esri/core/workers/chunks/a4f3bcfabd4ad127abf2.js +0 -1
  832. package/assets/esri/core/workers/chunks/a5abba59e738c3240c22.js +0 -1
  833. package/assets/esri/core/workers/chunks/a63bba226de6c5e464b0.js +0 -1
  834. package/assets/esri/core/workers/chunks/a9f29ff36a7ae5bae686.js +0 -1
  835. package/assets/esri/core/workers/chunks/aae0049c2c3e15a813e8.js +0 -1
  836. package/assets/esri/core/workers/chunks/adc32f6b45ea3026fc34.js +0 -1
  837. package/assets/esri/core/workers/chunks/af8ef6701631ed5e5b80.js +0 -1
  838. package/assets/esri/core/workers/chunks/b045bffb4f2eb9203183.js +0 -1
  839. package/assets/esri/core/workers/chunks/b590402170ae289290d7.js +0 -1
  840. package/assets/esri/core/workers/chunks/b666027b9022fa346a79.js +0 -1
  841. package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +0 -1
  842. package/assets/esri/core/workers/chunks/b803e7b0d489bb628d72.js +0 -1
  843. package/assets/esri/core/workers/chunks/bb24972603fb35dd8dcf.js +0 -1
  844. package/assets/esri/core/workers/chunks/bcc097271f5cdf0a97a7.js +0 -1
  845. package/assets/esri/core/workers/chunks/c0cbc50e5afd68bd485c.js +0 -1
  846. package/assets/esri/core/workers/chunks/c2cd80b712f29e8cbb8d.js +0 -1
  847. package/assets/esri/core/workers/chunks/c3ff2ff0a86a9143d7a5.js +0 -1
  848. package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +0 -1
  849. package/assets/esri/core/workers/chunks/c9a4601073e1a3eee9d0.js +0 -1
  850. package/assets/esri/core/workers/chunks/cf41a66fb97c1076fb34.js +0 -1
  851. package/assets/esri/core/workers/chunks/cf8ce21dc649021e97f6.js +0 -1
  852. package/assets/esri/core/workers/chunks/d78b7cac322755e87eb8.js +0 -1
  853. package/assets/esri/core/workers/chunks/dddb57ff637643ccfc87.js +0 -1
  854. package/assets/esri/core/workers/chunks/df18b0a653b328d8d052.js +0 -1
  855. package/assets/esri/core/workers/chunks/e1bf87077541da6853c6.js +0 -1
  856. package/assets/esri/core/workers/chunks/e3b713a590cce6245ee2.js +0 -1
  857. package/assets/esri/core/workers/chunks/e4406baf206b9e4c7e4f.js +0 -1
  858. package/assets/esri/core/workers/chunks/e499252cb52f7aed49a0.js +0 -1
  859. package/assets/esri/core/workers/chunks/e4e2f479c0c45ae1b2c3.js +0 -1
  860. package/assets/esri/core/workers/chunks/e5f8c73349407c25956b.js +0 -1
  861. package/assets/esri/core/workers/chunks/e656fd5ecf9ac059a87b.js +0 -1
  862. package/assets/esri/core/workers/chunks/e92698f50089484c4901.js +0 -1
  863. package/assets/esri/core/workers/chunks/e9c5c295b6bf10e942a4.js +0 -1
  864. package/assets/esri/core/workers/chunks/eb91dc957c328674e119.js +0 -1
  865. package/assets/esri/core/workers/chunks/ed3d16a5b4084ef61f8a.js +0 -1
  866. package/assets/esri/core/workers/chunks/edcde00495727d506c46.js +0 -1
  867. package/assets/esri/core/workers/chunks/efb4aa5886730ea377bd.js +0 -1
  868. package/assets/esri/core/workers/chunks/f0832b413612c77a62ca.js +0 -1
  869. package/assets/esri/core/workers/chunks/f116331c6eca937aac8e.js +0 -1
  870. package/assets/esri/core/workers/chunks/f23e995320674b32e142.js +0 -1
  871. package/assets/esri/core/workers/chunks/f334bf192dff5af10a70.js +0 -1
  872. package/assets/esri/core/workers/chunks/f518835b2dc89a48cfb1.js +0 -1
  873. package/assets/esri/core/workers/chunks/f5731ad4cfbbf1cc569a.js +0 -2
  874. package/assets/esri/core/workers/chunks/f76b1fc36f5606cac2c8.js +0 -1
  875. package/assets/esri/core/workers/chunks/f7fca88d120d45bb782a.js +0 -1
  876. package/assets/esri/core/workers/chunks/f819854098d63fe4ccdb.js +0 -1
  877. package/assets/esri/core/workers/chunks/f98118127469449ca145.js +0 -1
  878. package/assets/esri/core/workers/chunks/f9e22cf59e2e2782d70f.js +0 -1
  879. package/assets/esri/core/workers/chunks/fa1336b60278017d2525.js +0 -1
  880. package/assets/esri/core/workers/chunks/fbe7dae0b4bf2d172487.js +0 -1
  881. package/assets/esri/core/workers/chunks/fea3b6bef761ef78630e.js +0 -1
  882. package/chunks/Bufferer-Dw9Qi4T1.js +0 -2
  883. package/chunks/Distance2DCalculator-CXhBP-8I.js +0 -2
  884. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +0 -2
  885. package/layers/support/AnnotationSublayer.js +0 -2
  886. package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +0 -2
  887. /package/assets/esri/core/workers/chunks/{d9d4754062758789f186.js.LICENSE.txt → 05016e5a1de384994001.js.LICENSE.txt} +0 -0
  888. /package/assets/esri/core/workers/chunks/{62e77e3c5ca9b4887923.js.LICENSE.txt → 0d42322362e76f674d94.js.LICENSE.txt} +0 -0
  889. /package/assets/esri/core/workers/chunks/{62de9e83331fb10aac6a.js.LICENSE.txt → 35533c8ef541f7643497.js.LICENSE.txt} +0 -0
  890. /package/assets/esri/core/workers/chunks/{641cddee377599916de2.js.LICENSE.txt → 99c002015c2127e6cbfc.js.LICENSE.txt} +0 -0
  891. /package/assets/esri/core/workers/chunks/{f5731ad4cfbbf1cc569a.js.LICENSE.txt → c318e6dbb8651433038f.js.LICENSE.txt} +0 -0
  892. /package/chunks/{Centroid-DZi-eb9F.js → Centroid-CA-TwbbN.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{indexOf as e,PositionHint as t}from"../../../core/arrayUtils.js";import{toConst as i}from"../../../core/compilerUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{clone as s}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{signalFromSignalOrOptions as l,throwIfAborted as o}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as u}from"../../../core/units.js";import{isSerializable as c}from"../../../core/support/jsonUtils.js";import{isLoaded as y}from"../../../geometry/projectionUtils.js";import{set as h,create as d,expandWithAABB as m,negativeInfinity as f}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as p,create as x}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as g}from"../../../geometry/support/boundsUtils.js";import{isExtent as _,isPolygon as F}from"../../../geometry/support/jsonTypeUtils.js";import{fromJSON as w}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as Q}from"../../../geometry/support/normalizeUtils.js";import{equals as S,isValid as R}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as I}from"../featureConversionUtils.js";import{getWhereClause as j}from"./attributeSupport.js";import{getGeometry as E,cleanFromGeometryEngine as b}from"./geometryUtils.js";import{checkProjectionSupport as T,project as A,projectMany as v}from"./projectionSupport.js";import{QueryEngineCache as G}from"./QueryEngineCache.js";import{queryCapabilities as k}from"./QueryEngineCapabilities.js";import{QueryEngineResult as C}from"./QueryEngineResult.js";import{queryEngineEmptyResult as O,normalizeAttributeBinsQuery as P,normalizeQueryLike as q,normalizeQuery as z}from"./queryUtils.js";import{validateAttributeBinsQuery as U,validateQuery as B,validateStatisticsQuery as M}from"./queryValidationUtils.js";import{getSpatialQueryOperator as H,canQueryWithRBush as Z}from"./spatialQuerySupport.js";import{getTimeExtent as J,getTimeOperator as L}from"./timeSupport.js";import N from"../../support/FieldsIndex.js";import{ImmediateTask as V}from"../../../views/support/Scheduler.js";const D="unsupported-query";class K{constructor(e,t=null,i,r,s){this.attributes=e,this.geometry=i,this.centroid=r,this.filterFlags=s,this.groupId=-1,this.displayId=t}}class W{constructor(e){this._changeHandle=null,this.capabilities={query:k},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new G,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=c(e.fieldsIndex)?e.fieldsIndex:N.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=V}destroy(){this._changeHandle=a(this._changeHandle),this._frameTask=a(this._frameTask),this._clearCache(),n(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=l(t);if(!this.timeInfo?.trackIdField)throw new r(D,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=l(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=l(t);return e=s(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),r)}async executeQueryForUniqueValues(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),r)}async executeQueryForClassBreaks(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),r)}async executeQueryForHistogram(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),r)}async executeQueryForSnapping(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=l(e);this._timeExtentPromise||=J(this.timeInfo,this.featureStore);const[i,r]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return o(t),{fullExtent:i,timeExtent:r}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(t){if(t!==O)throw t;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const r=i.size;if(!r)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:r,extent:s}}catch(i){if(i===O)return{count:0,extent:null};throw i}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,r=new Set;for(const e of i)r.add(t.featureAdapter.getObjectId(e));return r}catch(t){if(t===O)return new Set;throw t}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await P(e,this.definitionExpression,this.spatialReference),yield,e=await U(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==O)throw i;t=new C([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:r,field3:s,valueExpression:a}=t,n=yield*this._executeQueryForStatistics(e,{field:i,field2:r,field3:s,valueExpression:a});return yield,await n.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:r,returnEdge:a,vertexMode:n}=e;if(!a&&"none"===n)return{candidates:[]};let l=s(e.query);l=await q(l,this.definitionExpression,this.spatialReference),yield,l=await B(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const o=!S(i.spatialReference,this.spatialReference);o&&(await T(i.spatialReference,this.spatialReference),yield);const u="number"==typeof r?r:r.x,c="number"==typeof r?r:r.y,y={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},h=o?A(y,this.spatialReference):y;if(!h)return{candidates:[]};const d=(await Q(w(i),null,{signal:t}))[0];yield;const m=(await Q(w(h),null,{signal:t}))[0];if(yield,null==d||null==m)return{candidates:[]};const f=await this._searchFeatures(X(m.toJSON()));yield;const p=new C(f,l,this);this._executeObjectIdsQuery(p),yield,this._executeTimeQuery(p),yield,this._executeAttributesQuery(p),yield,yield*this._executeGeometryQueryForSnapping(p),yield;const x=d.toJSON(),g=o?A(x,this.spatialReference):x,_=o?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:r;return p.createSnappingResponse({...e,point:g,distance:_},l.returnZ,i.spatialReference)}async _getBounds(e,t,i){const r=h(d(),f);return await this.featureStore.forEachBounds(e,e=>m(r,e)),Y(r,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new C(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>i(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=s(e),e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),r}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:r}=e,s=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,n=null==s||S(s,a.spatialReference)?a:A(a,s);if(!n)return null;const l=i||r,o=R(t)&&!S(this.spatialReference,t)&&l?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(X(n));yield;if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const r=await H("esriSpatialRelDisjoint",n,this.geometryType);yield;const s=e=>!t.has(u.getObjectId(e))||r(u.getGeometry(e)),a=yield*this._runSpatialFilter(i,s);yield;const l=new C(a,e,this);return await o(l)}if(!c.length)return new C([],e,this);if(this._canExecuteSinglePass(n,e))return await o(new C(c,e,this));const y=await H("esriSpatialRelContains",n,this.geometryType);yield;const h=yield*this._runSpatialFilter(c,e=>y(u.getGeometry(e)));return yield,await o(new C(h,e,this))}async*_executeGeometryQuery(i,r){if(null!=r&&0===r.items.length)return r;const{geometry:s,outSR:a,returnGeometry:n,returnCentroid:l}=i,o=r?null:this._getCacheKey(i),u=o?this._cache.get(o):null;if(u)return new C(u,i,this);const c=R(a)&&!S(this.spatialReference,a),y=n||l,h=async e=>(c&&y&&await this._project(e,a),o&&this._cache.put(o,e.items),e),d=this.featureStore.featureSpatialReference,m=!s||null==d||S(d,s.spatialReference)?s:A(s,d);if(!m)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));yield;const f=this.featureAdapter;let p=await this._searchFeatures(X(s));yield;const x=i.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===x){if(!p.length)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));const e=new Set;for(const i of p)e.add(f.getObjectId(i));let t;null!=r?t=r.items:(yield,t=await this._getAllFeatures(),yield);const s=await H(x,m,this.geometryType);yield;const a=t=>!e.has(f.getObjectId(t))||s(f.getGeometry(t)),n=yield*this._runSpatialFilter(t,a);yield;const l=new C(n,i,this);return await h(l)}if(null!=r){const i=new t;p=p.filter(t=>e(r.items,t,r.items.length,i)>=0)}if(!p.length){const e=new C([],i,this);return o&&this._cache.put(o,e.items),e}if(this._canExecuteSinglePass(m,i))return await h(new C(p,i,this));const g=await H(x,m,this.geometryType);yield;const _=yield*this._runSpatialFilter(p,e=>g(f.getGeometry(e)));return yield,await h(new C(_,i,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const r of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(r).forEach(e=>t.add(e))}const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=L(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=j(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const r=await H(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,a=e=>r(s.getGeometry(e)),n=yield*this._runSpatialFilter(e.items,a);e.items=n}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const r=new Array;for(const s of e)t(s)&&r.push(s),i.madeProgress(),i.done&&(i=yield);return r}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:r}=this.timeInfo,s=r||i,a=new Map,n=this.featureAdapter.getAttribute;for(const l of e.items){const e=n(l,t),i=n(l,s),r=a.get(e);(!r||i>n(r,s))&&a.set(e,l)}e.items=Array.from(a.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:r,returnCentroid:s,outSR:a,resultType:n,cacheHint:l}=e;if("tile"!==n&&!l)return null;const o=r||s;return R(a)&&!S(this.spatialReference,a)&&o?JSON.stringify([t,i,a]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return Z(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||S(this.spatialReference,t))return e;const r=this.featureAdapter,s=y()?await this._getFullExtent():void 0,a=await v(e.items.map(e=>E(this.geometryType,r.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:s});return e.items=i(a.map((t,i)=>r.cloneWithGeometry(e.items[i],I(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=s(e);try{e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await M(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),yield,r}catch(i){if(i!==O)throw i;return new C([],e,this)}}get test(){}}function X(e){if(Z(e)){if(_(e))return[p(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(F(e))return e.rings.map(e=>p(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[g(x(),e)]}function Y(e,t,i,r,s){const a={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:b(r)};s&&isFinite(e[2])&&isFinite(e[5])&&(a.zmin=e[2],a.zmax=e[5],a.hasZ=!0);const n=A(a,t,i);if(n.spatialReference=b(i),n.xmax-n.xmin===0){const e=u(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin===0){const e=u(n.spatialReference);n.ymin-=e,n.ymax+=e}if(s&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin===0){const e=u(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}export{K as Feature,W as QueryEngine,X as getQueryBBoxes,Y as getQueryResultExtent};
2
+ import{indexOf as e,PositionHint as t}from"../../../core/arrayUtils.js";import{toConst as i}from"../../../core/compilerUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{clone as s}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{signalFromSignalOrOptions as l,throwIfAborted as o}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as u}from"../../../core/units.js";import{isSerializable as c}from"../../../core/support/jsonUtils.js";import{isLoaded as y}from"../../../geometry/projectionUtils.js";import{set as h,create as d,expandWithAABB as m,negativeInfinity as f}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as p,create as x}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as g}from"../../../geometry/support/boundsUtils.js";import{isExtent as _,isPolygon as F}from"../../../geometry/support/jsonTypeUtils.js";import{fromJSON as w}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as Q}from"../../../geometry/support/normalizeUtils.js";import{equals as S,isValid as R}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as I}from"../featureConversionUtils.js";import{getWhereClause as j}from"./attributeSupport.js";import{getGeometry as E,cleanFromGeometryEngine as b}from"./geometryUtils.js";import{checkProjectionSupport as T,project as A,projectMany as v}from"./projectionSupport.js";import{QueryEngineCache as G}from"./QueryEngineCache.js";import{queryCapabilities as k}from"./QueryEngineCapabilities.js";import{QueryEngineResult as C}from"./QueryEngineResult.js";import{queryEngineEmptyResult as O,normalizeAttributeBinsQuery as P,normalizeQueryLike as q,normalizeQuery as z}from"./queryUtils.js";import{validateAttributeBinsQuery as U,validateQuery as B,validateStatisticsQuery as M}from"./queryValidationUtils.js";import{getSpatialQueryOperator as H,canQueryWithRBush as Z}from"./spatialQuerySupport.js";import{getTimeExtent as J,getTimeOperator as L}from"./timeSupport.js";import N from"../../support/FieldsIndex.js";import{ImmediateTask as V}from"../../../views/support/Scheduler.js";const D="unsupported-query";class K{constructor(e,t=null,i,r,s){this.attributes=e,this.geometry=i,this.centroid=r,this.filterFlags=s,this.groupId=-1,this.displayId=t}}class W{constructor(e){this._changeHandle=null,this.capabilities={query:k},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new G,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=c(e.fieldsIndex)?e.fieldsIndex:N.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=V}destroy(){this._changeHandle=a(this._changeHandle),this._frameTask=a(this._frameTask),this._clearCache(),n(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=l(t);if(!this.timeInfo?.trackIdField)throw new r(D,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=l(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=l(t);return e=s(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),r)}async executeQueryForUniqueValues(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),r)}async executeQueryForClassBreaks(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),r)}async executeQueryForHistogram(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),r)}async executeQueryForSnapping(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=l(e);this._timeExtentPromise||=J(this.timeInfo,this.featureStore);const[i,r]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return o(t),{fullExtent:i,timeExtent:r}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(t){if(t!==O)throw t;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const r=i.size;if(!r)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:r,extent:s}}catch(i){if(i===O)return{count:0,extent:null};throw i}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,r=new Set;for(const e of i)r.add(t.featureAdapter.getObjectId(e));return r}catch(t){if(t===O)return new Set;throw t}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await P(e,this.definitionExpression,this.spatialReference),yield,e=await U(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==O)throw i;t=new C([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:r,field3:s,valueExpression:a}=t,n=yield*this._executeQueryForStatistics(e,{field:i,field2:r,field3:s,valueExpression:a});return yield,await n.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:r,returnEdge:a,vertexMode:n}=e;if(!a&&"none"===n)return{candidates:[]};let l=s(e.query);l=await q(l,this.definitionExpression,this.spatialReference),yield,l=await B(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const o=!S(i.spatialReference,this.spatialReference);o&&(await T(i.spatialReference,this.spatialReference),yield);const u="number"==typeof r?r:r.x,c="number"==typeof r?r:r.y,y={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},h=o?A(y,this.spatialReference):y;if(!h)return{candidates:[]};const d=(await Q(w(i),null,{signal:t}))[0];yield;const m=(await Q(w(h),null,{signal:t}))[0];if(yield,null==d||null==m)return{candidates:[]};const f=await this._searchFeatures(X(m.toJSON()));yield;const p=new C(f,l,this);this._executeObjectIdsQuery(p),yield,this._executeTimeQuery(p),yield,this._executeAttributesQuery(p),yield,yield*this._executeGeometryQueryForSnapping(p),yield;const x=d.toJSON(),g=o?A(x,this.spatialReference):x,_=o?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:r;return p.createSnappingResponse({...e,point:g,distance:_},l.returnZ,i.spatialReference)}async _getBounds(e,t,i){const r=h(d(),f);return await this.featureStore.forEachBounds(e,e=>m(r,e)),Y(r,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new C(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>i(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=s(e),e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),r}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:r}=e,s=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,n=null==s||S(s,a.spatialReference)?a:A(a,s);if(!n)return null;const l=i||r,o=R(t)&&!S(this.spatialReference,t)&&l?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(X(n));yield;if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const r=await H("esriSpatialRelDisjoint",n,this.geometryType);yield;const s=e=>!t.has(u.getObjectId(e))||r(u.getGeometry(e)),a=yield*this._runSpatialFilter(i,s);yield;const l=new C(a,e,this);return await o(l)}if(!c.length)return new C([],e,this);if(this._canExecuteSinglePass(n,e))return await o(new C(c,e,this));const y=await H("esriSpatialRelContains",n,this.geometryType);yield;const h=yield*this._runSpatialFilter(c,e=>y(u.getGeometry(e)));return yield,await o(new C(h,e,this))}async*_executeGeometryQuery(i,r){if(null!=r&&0===r.items.length)return r;const{geometry:s,outSR:a,returnGeometry:n,returnCentroid:l}=i,o=r?null:this._getCacheKey(i),u=o?this._cache.get(o):null;if(u)return new C(u,i,this);const c=R(a)&&!S(this.spatialReference,a),y=n||l,h=async e=>(c&&y&&await this._project(e,a),o&&this._cache.put(o,e.items),e),d=this.featureStore.featureSpatialReference,m=!s||null==d||S(d,s.spatialReference)?s:A(s,d);if(!m)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));yield;const f=this.featureAdapter;let p=await this._searchFeatures(X(s));yield;const x=i.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===x){if(!p.length)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));const e=new Set;for(const i of p)e.add(f.getObjectId(i));let t;null!=r?t=r.items:(yield,t=await this._getAllFeatures(),yield);const s=await H(x,m,this.geometryType);yield;const a=t=>!e.has(f.getObjectId(t))||s(f.getGeometry(t)),n=yield*this._runSpatialFilter(t,a);yield;const l=new C(n,i,this);return await h(l)}if(null!=r){const i=new t;p=p.filter(t=>e(r.items,t,r.items.length,i)>=0)}if(!p.length){const e=new C([],i,this);return o&&this._cache.put(o,e.items),e}if(this._canExecuteSinglePass(m,i))return await h(new C(p,i,this));const g=await H(x,m,this.geometryType);yield;const _=yield*this._runSpatialFilter(p,e=>g(f.getGeometry(e)));return yield,await h(new C(_,i,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const r of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(r).forEach(e=>t.add(e))}const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=L(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=j(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const r=await H(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,a=e=>r(s.getGeometry(e)),n=yield*this._runSpatialFilter(e.items,a);e.items=n}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const r=new Array;for(const s of e)t(s)&&r.push(s),i.madeProgress(),i.done&&(i=yield);return r}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:r}=this.timeInfo,s=r||i,a=new Map,n=this.featureAdapter.getAttribute;for(const l of e.items){const e=n(l,t),i=n(l,s),r=a.get(e);(!r||i>n(r,s))&&a.set(e,l)}e.items=Array.from(a.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:r,returnCentroid:s,outSR:a,resultType:n,cacheHint:l}=e;if("tile"!==n&&!l)return null;const o=r||s;return R(a)&&!S(this.spatialReference,a)&&o?JSON.stringify([t,i,a]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return Z(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||S(this.spatialReference,t))return e;const r=this.featureAdapter,s=y()?await this._getFullExtent():void 0,a=await v(e.items.map(e=>E(this.geometryType,r.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:s});return e.items=i(a.map((t,i)=>r.cloneWithGeometry(e.items[i],I(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=s(e);try{e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await M(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),yield,r}catch(i){if(i!==O)throw i;return new C([],e,this)}}get test(){}}function X(e){if(Z(e)){if(_(e))return[p(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(F(e))return e.rings.map(e=>p(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[g(x(),e)]}function Y(e,t,i,r,s){const a={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:b(r)};s&&isFinite(e[2])&&isFinite(e[5])&&(a.zmin=e[2],a.zmax=e[5],a.hasZ=!0);const n=A(a,t,i);if(n.spatialReference=b(i),n.xmax-n.xmin===0){const e=u(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin===0){const e=u(n.spatialReference);n.ymin-=e,n.ymax+=e}if(s&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin===0){const e=u(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}export{K as Feature,W as QueryEngine,X as getQueryBoundingRects,Y as getQueryResultExtent};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../config.js";import r from"../../../request.js";import{isSome as s,remove as a}from"../../../core/arrayUtils.js";import i from"../../../core/Error.js";import has from"../../../core/has.js";import{JSONMap as n}from"../../../core/jsonMap.js";import{Loadable as o}from"../../../core/Loadable.js";import u from"../../../core/Logger.js";import{setDeepValue as l}from"../../../core/object.js";import{debounce as c,after as d,throwIfAbortError as p}from"../../../core/promiseUtils.js";import{watch as y}from"../../../core/reactiveUtils.js";import{join as h}from"../../../core/urlUtils.js";import{generateBracedUUID as m}from"../../../core/uuid.js";import{property as f,subclass as g}from"../../../core/accessorSupport/decorators.js";import q from"../../../geometry/Extent.js";import w from"../../../geometry/SpatialReference.js";import S from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import{isRelativeVertexSpace as E}from"../../../geometry/support/meshVertexSpaceUtils.js";import{isOriginalExternal as O}from"../../../geometry/support/meshUtils/External.js";import{createFeatureEditResult as _,getFeatureJSON as b,getFeatureIds as R,getAttachmentEditsJSON as F,isProtectedOrPrivateVersionError as A,unpackEditResultData as I,createEditedFeatures as v}from"../applyEditsUtils.js";import{createDrawingInfo as x}from"./support/clientSideDefaults.js";import j from"./support/QueryTask.js";import{isHostedAgolService as T}from"../../support/arcgisLayerUrl.js";import{ensureLayerCredential as M}from"../../support/featureLayerUtils.js";import{getAssetMapTable as N}from"../../support/infoFor3D.js";import{executeQueryJSON as U}from"../../../rest/query/executeQueryJSON.js";import{unapplyEditsZUnitScaling as C}from"../../../rest/query/operations/editsZScale.js";import D from"../../../rest/support/Query.js";import J from"../../../time/TimeExtent.js";import{isSafeToEditVersion as L,isVersionInEditSession as k,isHistoricVersion as Q,currentSessionId as P}from"../../../versionManagement/support/versionManagementUtils.js";const V=new n({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),$=new n({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let B=class extends o{constructor(e){super(e),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer","Annotation Layer","Dimension Layer"]),this.refresh=c(async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e)).then(()=>this._ensureLatestMetadata(e));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([y(()=>{const e=this.layer;return e&&"lastEditsEventDate"in e?e.lastEditsEventDate:null},e=>this._handleLastEditsEventChange(e))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:e,parsedUrl:t,gdbVersion:r,spatialReference:s,fieldsIndex:a,uniqueIdFields:i}=this.layer,n="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,u=has("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==n,l=u&&e?.query.supportsFormatPBFWithCurves,c=e?.operations?.supportsQueryAttachments??!1,d=e?.query?.relativeTimeBinWindow??0,p=t.path;return new j({dynamicDataSource:o,fieldsIndex:a,gdbVersion:r,infoFor3D:n,pbfSupported:u,pbfSupportedWithCurves:l,queryAttachmentsSupported:c,relativeTimeBinWindow:d,sourceSpatialReference:s,uniqueIdFields:i,url:p})}async addAttachment(e,t){await this.load();const{layer:s}=this;await M(s,"editing");const a=e.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+a+"/addAttachment",n=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,n.query);try{const e=await r(i,{body:o});return _(e.data.addAttachmentResult)}catch(u){throw this._createAttachmentErrorResult(a,u)}}async updateAttachment(e,t,s){await this.load();const{layer:a}=this;await M(a,"editing");const i=e.attributes[a.objectIdField],n=a.parsedUrl.path+"/"+i+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),u=this._getFormDataForAttachment(s,o.query);try{const e=await r(n,{body:u});return _(e.data.updateAttachmentResult)}catch(l){throw this._createAttachmentErrorResult(i,l)}}async applyEdits(e,t){await this.load();const{layer:a}=this;await M(a,"editing");const n="infoFor3D"in a?a.infoFor3D:null,o=null!=n,u=o||(t?.globalIdUsed??!1),l=o?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,c=e.addFeatures?.map(e=>b(this.layer,e,n))??[],d=(await Promise.all(c)).filter(s),p=e.updateFeatures?.map(e=>b(this.layer,e,n))??[],y=(await Promise.all(p)).filter(s),h=R(this.layer,e.deleteFeatures,u);C(d,y,a.spatialReference);const m=await F(this.layer,e),f=a.capabilities.editing.supportsAsyncApplyEdits&&o,g=t?.gdbVersion||a.gdbVersion,q={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,trueCurveClient:t?.editsRespectTrueCurves,usePreviousEditMoment:t?.usePreviousEditMoment,async:f};await L(this.layer.url,g,!0);const w=k(this.layer.url,g||null);if(await Q(a.url,g,a.historicMoment))throw new i("feature-layer-source:historic-version","Editing a historic version is not allowed");t?.returnServiceEditsOption?(q.edits=JSON.stringify([{id:a.layerId,adds:d.length?d:null,updates:y.length?y:null,deletes:h.length?h:null,attachments:m,assetMaps:l}]),q.returnServiceEditsOption=V.toJSON(t?.returnServiceEditsOption),q.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(q.adds=d.length?JSON.stringify(d):null,q.updates=y.length?JSON.stringify(y):null,q.deletes=h.length?u?JSON.stringify(h):h.join(","):null,q.attachments=m&&JSON.stringify(m),q.assetMaps=null!=l?JSON.stringify(l):void 0);const S=this._getLayerRequestOptions({method:"post",query:q});w&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=P);const E=t?.returnServiceEditsOption?a.url:a.parsedUrl.path;let O;try{O=f?await this._asyncApplyEdits(E+"/applyEdits",S):await r(E+"/applyEdits",S)}catch(_){if(!A(_))throw _;S.authMode="immediate",O=f?await this._asyncApplyEdits(E+"/applyEdits",S):await r(E+"/applyEdits",S)}return this._createEditsResult(O)}async deleteAttachments(e,t){await this.load();const{layer:s}=this;await M(s,"editing");const a=e.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+a+"/deleteAttachments";try{return(await r(i,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(_)}catch(n){throw this._createAttachmentErrorResult(a,n)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then(async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:s,url:a}=this.layer,{data:i}=await r(`${a}/${s}`,t),{id:n,extent:o,fullExtent:u,timeExtent:l}=i,c=o||u;return{id:n,fullExtent:c&&q.fromJSON(c),timeExtent:l&&J.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});if(e.outStatistics?.length&&r.features.length){const t=new Map;if(r.features.forEach(r=>{const s=r.attributes;e.outStatistics?.forEach(({outStatisticFieldName:e})=>{if(e){const r=e.toLowerCase();r&&r in s&&e!==r&&(s[e]=s[r],delete s[r],t.set(r,e))}})}),null!=r.fields)for(const e of r.fields){const r=t.get(e.name.toLowerCase());null!=r&&(e.name=r)}}return r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryPivot(e,t){return await this.load(),this.queryTask.executePivotQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryAttributeBins(e,t){return await this.load(),this.queryTask.executeAttributeBinsQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!T(this.layer.url))return"unavailable";const e=h(this.layer.url,"status"),t=await r(e,{query:{f:"json"}});return $.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:r}=await import("./support/uploadAssets.js");return r(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}_handleLastEditsEventChange(e){const t=this.layer;if(null==e||!("capabilities"in t)||!("effectiveCapabilities"in t))return;if(!(!t.capabilities?.operations?.supportsEditing&&t.effectiveCapabilities?.operations?.supportsEditing))return;const r=t.url;if(null==r)return;"layerId"in t&&h(r,t.layerId.toString());this._getOrCreateEditInterceptor(r).before=t=>{const r=t.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=t.requestOptions.query??{};r._ts=e.getTime(),t.requestOptions.query=r}}}_getOrCreateEditInterceptor(e){return null==this._editInterceptor&&(this._editInterceptor={urls:e},t.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&(a(t.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(e,t){const s=(await r(e,t)).data.statusUrl;for(;;){const e=(await r(s,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return r(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new i("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new i("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await d(G)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const s={};has("featurelayer-advanced-symbols")&&(s.returnAdvancedSymbols=!0),t?.cacheBust&&(s._ts=Date.now());const{data:a}=await r(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:s,signal:t?.signal}));e=a}this.layer.applyPreferredHost(e),this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const s=e.type;if(!this.supportedSourceTypes.has(s))throw new i("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=x(e.geometryType).renderer;l("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:s}=await r(this.layer.url,this._getLayerRequestOptions({signal:t}));s.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:s.spatialReference})}catch(s){p(s)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;if(await this._areAllAssetsAlreadyMapped(t))return null;const r=e.addFeatures.filter(e=>e.geometry);if(t.length!==r.length+e.updateFeatures.length)throw new i("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const s=new Array,a=new Map;for(const i of t){const{geometry:e}=i,{vertexSpace:t}=e;if(E(t))s.push(e);else{const t=e.origin,{convertMeshVertexSpace:r}=await import("../../../geometry/support/meshUtils/convertMeshVertexSpace.js"),n=await r(e,new S({origin:[t.x,t.y,t.z??0]}));a.set(n,e),i.geometry=n,s.push(n)}}await this.uploadAssets(s);for(const[i,n]of a)n.addExternalSources(i.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(t),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const a of e){const e=a.geometry,{metadata:i}=e,n=i.getExternalSourcesOnService(s),o=a.getAttribute(r);if(0===n.length){u.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:l}=n.find(O)??n[0];for(const r of l.assets)1===r.parts.length?t.push({globalId:m(),parentGlobalId:o,assetName:r.assetName,assetHash:r.parts[0].partHash,flags:[]}):u.getLogger(this).error(`Skipping asset ${r.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const n of t)s.push({id:n.id,editedFeatures:n.editedFeatures}),n.id===r&&(a={addResults:n.addResults??[],updateResults:n.updateResults??[],deleteResults:n.deleteResults??[],attachments:n.attachments,editMoment:n.editMoment});else a=t;const i=I(a);if(s.length>0){i.editedFeatureResults=[];for(const e of s){const{editedFeatures:t}=e,r=t?.spatialReference?new w(t.spatialReference):null;i.editedFeatureResults.push({layerId:e.id,editedFeatures:v(t,r)})}}return i}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new i("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const s in t){const e=t[s];null!=e&&(r.set?r.set(s,e):r.append(s,e))}return r}_getLayerRequestOptions(e={}){const{layer:t,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...e,query:{gdbVersion:s,layer:"dynamicDataSource"in t&&t.dynamicDataSource?JSON.stringify({source:t.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _areAllAssetsAlreadyMapped(e){const{layer:t}=this,{globalIdField:r,parsedUrl:a}=t,i="infoFor3D"in t?t.infoFor3D:null;if(null==i||null==r)return!1;const n=N(i);if(null==n)return!1;const o=h(a.path,`../${n.id}`),u=new Array;for(const s of e){if(!(s.geometry.metadata.getExternalSourcesOnService(a).length>0))return!1;u.push(s)}const l=u.map(e=>e.getAttribute(r)).filter(s);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:d}}=i,p=new D({where:`${c} IN (${l.map(e=>`'${e}'`)})`,outFields:[d,c],returnGeometry:!1}),y=await U(o,p),{features:m}=y;return 0!==m.length&&!u.some(e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:s}=e.geometry,i=m.filter(e=>e.getAttribute(c)===t);if(0===i.length)return!0;const n=i.map(e=>e.getAttribute(d));return s.getExternalSourcesOnService(a).flatMap(({source:e})=>e.assets.flatMap(e=>e.parts.map(e=>e.partHash))).some(e=>n.every(t=>e!==t))})}};e([f()],B.prototype,"type",void 0),e([f({constructOnly:!0})],B.prototype,"layer",void 0),e([f({constructOnly:!0})],B.prototype,"supportedSourceTypes",void 0),e([f({readOnly:!0})],B.prototype,"queryTask",null),B=e([g("esri.layers.graphics.sources.FeatureLayerSource")],B);const G=1e3;export{B as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../config.js";import r from"../../../request.js";import{isSome as s,remove as a}from"../../../core/arrayUtils.js";import i from"../../../core/Error.js";import has from"../../../core/has.js";import{JSONMap as n}from"../../../core/jsonMap.js";import{Loadable as o}from"../../../core/Loadable.js";import u from"../../../core/Logger.js";import{setDeepValue as l}from"../../../core/object.js";import{debounce as c,after as d,throwIfAbortError as p}from"../../../core/promiseUtils.js";import{watch as y}from"../../../core/reactiveUtils.js";import{join as h}from"../../../core/urlUtils.js";import{generateBracedUUID as m}from"../../../core/uuid.js";import{property as f,subclass as g}from"../../../core/accessorSupport/decorators.js";import q from"../../../geometry/Extent.js";import w from"../../../geometry/SpatialReference.js";import S from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import{isRelativeVertexSpace as E}from"../../../geometry/support/meshVertexSpaceUtils.js";import{isOriginalExternal as O}from"../../../geometry/support/meshUtils/External.js";import{createFeatureEditResult as _,getFeatureJSON as b,getFeatureIds as R,getAttachmentEditsJSON as F,isProtectedOrPrivateVersionError as A,unpackEditResultData as I,createEditedFeatures as v}from"../applyEditsUtils.js";import{createDrawingInfo as x}from"./support/clientSideDefaults.js";import j from"./support/QueryTask.js";import{isHostedAgolService as T}from"../../support/arcgisLayerUrl.js";import{ensureLayerCredential as M}from"../../support/featureLayerUtils.js";import{getAssetMapTable as N}from"../../support/infoFor3D.js";import{executeQueryJSON as U}from"../../../rest/query/executeQueryJSON.js";import{unapplyEditsZUnitScaling as C}from"../../../rest/query/operations/editsZScale.js";import D from"../../../rest/support/Query.js";import J from"../../../time/TimeExtent.js";import{isSafeToEditVersion as L,isVersionInEditSession as k,isHistoricVersion as Q,currentSessionId as P}from"../../../versionManagement/support/versionManagementUtils.js";const V=new n({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),$=new n({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let B=class extends o{constructor(e){super(e),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer","Annotation Layer","Dimension Layer"]),this.refresh=c(async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e)).then(()=>this._ensureLatestMetadata(e));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([y(()=>{const e=this.layer;return e&&"lastEditsEventDate"in e?e.lastEditsEventDate:null},e=>this._handleLastEditsEventChange(e))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:e,parsedUrl:t,gdbVersion:r,spatialReference:s,fieldsIndex:a,uniqueIdFields:i}=this.layer,n="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,u=has("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==n,l=u&&e?.query.supportsFormatPBFWithCurves,c=e?.operations?.supportsQueryAttachments??!1,d=e?.query?.relativeTimeBinWindow??0,p=t.path;return new j({dynamicDataSource:o,fieldsIndex:a,gdbVersion:r,infoFor3D:n,pbfSupported:u,pbfSupportedWithCurves:l,queryAttachmentsSupported:c,relativeTimeBinWindow:d,sourceSpatialReference:s,uniqueIdFields:i,url:p})}async addAttachment(e,t,s){await this.load();const{layer:a}=this;await M(a,"editing");const i=e.attributes[a.objectIdField],n=a.parsedUrl.path+"/"+i+"/addAttachment",o=this._getLayerRequestOptions({query:s}),u=this._getFormDataForAttachment(t,o.query);try{const e=await r(n,{body:u});return _(e.data.addAttachmentResult)}catch(l){throw this._createAttachmentErrorResult(i,l)}}async updateAttachment(e,t,s,a){await this.load();const{layer:i}=this;await M(i,"editing");const n=e.attributes[i.objectIdField],o=i.parsedUrl.path+"/"+n+"/updateAttachment",u=this._getLayerRequestOptions({query:{attachmentId:t,...a}}),l=this._getFormDataForAttachment(s,u.query);try{const e=await r(o,{body:l});return _(e.data.updateAttachmentResult)}catch(c){throw this._createAttachmentErrorResult(n,c)}}async applyEdits(e,t){await this.load();const{layer:a}=this;await M(a,"editing");const n="infoFor3D"in a?a.infoFor3D:null,o=null!=n,u=o||(t?.globalIdUsed??!1),l=o?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,c=e.addFeatures?.map(e=>b(this.layer,e,n))??[],d=(await Promise.all(c)).filter(s),p=e.updateFeatures?.map(e=>b(this.layer,e,n))??[],y=(await Promise.all(p)).filter(s),h=R(this.layer,e.deleteFeatures,u);C(d,y,a.spatialReference);const m=await F(this.layer,e),f=a.capabilities.editing.supportsAsyncApplyEdits&&o,g=t?.gdbVersion||a.gdbVersion,q={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,trueCurveClient:t?.editsRespectTrueCurves,usePreviousEditMoment:t?.usePreviousEditMoment,async:f};await L(this.layer.url,g,!0);const w=k(this.layer.url,g||null);if(await Q(a.url,g,a.historicMoment))throw new i("feature-layer-source:historic-version","Editing a historic version is not allowed");t?.returnServiceEditsOption?(q.edits=JSON.stringify([{id:a.layerId,adds:d.length?d:null,updates:y.length?y:null,deletes:h.length?h:null,attachments:m,assetMaps:l}]),q.returnServiceEditsOption=V.toJSON(t?.returnServiceEditsOption),q.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(q.adds=d.length?JSON.stringify(d):null,q.updates=y.length?JSON.stringify(y):null,q.deletes=h.length?u?JSON.stringify(h):h.join(","):null,q.attachments=m&&JSON.stringify(m),q.assetMaps=null!=l?JSON.stringify(l):void 0);const S=this._getLayerRequestOptions({method:"post",query:q});w&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=P);const E=t?.returnServiceEditsOption?a.url:a.parsedUrl.path;let O;try{O=f?await this._asyncApplyEdits(E+"/applyEdits",S):await r(E+"/applyEdits",S)}catch(_){if(!A(_))throw _;S.authMode="immediate",O=f?await this._asyncApplyEdits(E+"/applyEdits",S):await r(E+"/applyEdits",S)}return this._createEditsResult(O)}async deleteAttachments(e,t,s){await this.load();const{layer:a}=this;await M(a,"editing");const i=e.attributes[a.objectIdField],n=a.parsedUrl.path+"/"+i+"/deleteAttachments";try{return(await r(n,this._getLayerRequestOptions({query:{attachmentIds:t.join(","),...s},method:"post"}))).data.deleteAttachmentResults.map(_)}catch(o){throw this._createAttachmentErrorResult(i,o)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then(async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:s,url:a}=this.layer,{data:i}=await r(`${a}/${s}`,t),{id:n,extent:o,fullExtent:u,timeExtent:l}=i,c=o||u;return{id:n,fullExtent:c&&q.fromJSON(c),timeExtent:l&&J.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});if(e.outStatistics?.length&&r.features.length){const t=new Map;if(r.features.forEach(r=>{const s=r.attributes;e.outStatistics?.forEach(({outStatisticFieldName:e})=>{if(e){const r=e.toLowerCase();r&&r in s&&e!==r&&(s[e]=s[r],delete s[r],t.set(r,e))}})}),null!=r.fields)for(const e of r.fields){const r=t.get(e.name.toLowerCase());null!=r&&(e.name=r)}}return r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryPivot(e,t){return await this.load(),this.queryTask.executePivotQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryAttributeBins(e,t){return await this.load(),this.queryTask.executeAttributeBinsQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!T(this.layer.url))return"unavailable";const e=h(this.layer.url,"status"),t=await r(e,{query:{f:"json"}});return $.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:r}=await import("./support/uploadAssets.js");return r(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}_handleLastEditsEventChange(e){const t=this.layer;if(null==e||!("capabilities"in t)||!("effectiveCapabilities"in t))return;if(!(!t.capabilities?.operations?.supportsEditing&&t.effectiveCapabilities?.operations?.supportsEditing))return;const r=t.url;if(null==r)return;"layerId"in t&&h(r,t.layerId.toString());this._getOrCreateEditInterceptor(r).before=t=>{const r=t.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=t.requestOptions.query??{};r._ts=e.getTime(),t.requestOptions.query=r}}}_getOrCreateEditInterceptor(e){return null==this._editInterceptor&&(this._editInterceptor={urls:e},t.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&(a(t.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(e,t){const s=(await r(e,t)).data.statusUrl;for(;;){const e=(await r(s,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return r(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new i("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new i("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await d(G)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const s={};has("featurelayer-advanced-symbols")&&(s.returnAdvancedSymbols=!0),t?.cacheBust&&(s._ts=Date.now());const{data:a}=await r(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:s,signal:t?.signal}));e=a}this.layer.applyPreferredHost(e),this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const s=e.type;if(!this.supportedSourceTypes.has(s))throw new i("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=x(e.geometryType).renderer;l("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:s}=await r(this.layer.url,this._getLayerRequestOptions({signal:t}));s.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:s.spatialReference})}catch(s){p(s)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;if(await this._areAllAssetsAlreadyMapped(t))return null;const r=e.addFeatures.filter(e=>e.geometry);if(t.length!==r.length+e.updateFeatures.length)throw new i("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const s=new Array,a=new Map;for(const i of t){const{geometry:e}=i,{vertexSpace:t}=e;if(E(t))s.push(e);else{const t=e.origin,{convertMeshVertexSpace:r}=await import("../../../geometry/support/meshUtils/convertMeshVertexSpace.js"),n=await r(e,new S({origin:[t.x,t.y,t.z??0]}));a.set(n,e),i.geometry=n,s.push(n)}}await this.uploadAssets(s);for(const[i,n]of a)n.addExternalSources(i.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(t),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const a of e){const e=a.geometry,{metadata:i}=e,n=i.getExternalSourcesOnService(s),o=a.getAttribute(r);if(0===n.length){u.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:l}=n.find(O)??n[0];for(const r of l.assets)1===r.parts.length?t.push({globalId:m(),parentGlobalId:o,assetName:r.assetName,assetHash:r.parts[0].partHash,flags:[]}):u.getLogger(this).error(`Skipping asset ${r.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const n of t)s.push({id:n.id,editedFeatures:n.editedFeatures}),n.id===r&&(a={addResults:n.addResults??[],updateResults:n.updateResults??[],deleteResults:n.deleteResults??[],attachments:n.attachments,editMoment:n.editMoment});else a=t;const i=I(a);if(s.length>0){i.editedFeatureResults=[];for(const e of s){const{editedFeatures:t}=e,r=t?.spatialReference?new w(t.spatialReference):null;i.editedFeatureResults.push({layerId:e.id,editedFeatures:v(t,r)})}}return i}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new i("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const s in t){const e=t[s];null!=e&&(r.set?r.set(s,e):r.append(s,e))}return r}_getLayerRequestOptions(e={}){const{layer:t,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...e,query:{gdbVersion:s,layer:"dynamicDataSource"in t&&t.dynamicDataSource?JSON.stringify({source:t.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _areAllAssetsAlreadyMapped(e){const{layer:t}=this,{globalIdField:r,parsedUrl:a}=t,i="infoFor3D"in t?t.infoFor3D:null;if(null==i||null==r)return!1;const n=N(i);if(null==n)return!1;const o=h(a.path,`../${n.id}`),u=new Array;for(const s of e){if(!(s.geometry.metadata.getExternalSourcesOnService(a).length>0))return!1;u.push(s)}const l=u.map(e=>e.getAttribute(r)).filter(s);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:d}}=i,p=new D({where:`${c} IN (${l.map(e=>`'${e}'`)})`,outFields:[d,c],returnGeometry:!1}),y=await U(o,p),{features:m}=y;return 0!==m.length&&!u.some(e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:s}=e.geometry,i=m.filter(e=>e.getAttribute(c)===t);if(0===i.length)return!0;const n=i.map(e=>e.getAttribute(d));return s.getExternalSourcesOnService(a).flatMap(({source:e})=>e.assets.flatMap(e=>e.parts.map(e=>e.partHash))).some(e=>n.every(t=>e!==t))})}};e([f()],B.prototype,"type",void 0),e([f({constructOnly:!0})],B.prototype,"layer",void 0),e([f({constructOnly:!0})],B.prototype,"supportedSourceTypes",void 0),e([f({readOnly:!0})],B.prototype,"queryTask",null),B=e([g("esri.layers.graphics.sources.FeatureLayerSource")],B);const G=1e3;export{B as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Collection.js";import i from"../../../core/Error.js";import has from"../../../core/has.js";import{LoadableMixin as o}from"../../../core/Loadable.js";import s from"../../../core/Logger.js";import{EsriPromiseMixin as n}from"../../../core/Promise.js";import{open as a}from"../../../core/workers.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{ensureType as p}from"../../../core/accessorSupport/ensureType.js";import d from"../../../geometry/Extent.js";import c from"../../../geometry/Polygon.js";import{typeKebabDictionary as y}from"../../../geometry/support/typeUtils.js";import{createFeatureIdFromLayer as h}from"../data/createFeatureId.js";import{unapplyEditsZUnitScaling as m}from"../../../rest/query/operations/editsZScale.js";import{applyFeatureSetZUnitScaling as f}from"../../../rest/query/operations/queryZScale.js";import g from"../../../rest/support/FeatureSet.js";import{shared as _}from"../../../core/accessorSupport/decorators/shared.js";let F=0,T=class extends(o(n(r))){constructor(e){super(e),this._idToClientGeometry=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);f(e,this.layer.spatialReference,r);const i=g.fromJSON(r);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return i;const o=this.layer.objectIdField;for(const s of i.features){const e=s.attributes[o],t=this._idToClientGeometry.get(e);void 0!==t&&(s.geometry=t)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new i("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return f(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:d.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){await this.load();const r=await this._connection.invoke("queryAttributeBins",e?.toJSON(),t);return(await import("../../../rest/support/AttributeBinsFeatureSet.js")).default.fromJSON(r)}async _applyEdits(e){if(!this._connection)throw new i("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=this.layer.uniqueIdFields;let o=null;const s=[],n=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const a=e=>r?.length&&"attributes"in e?h(e,this.layer):"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(o=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const i of e.deleteFeatures){const e=a(i);null!=e&&s.push(e)}const l=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures)for(const i of e.updateFeatures)if(n.push(this._serializeFeature(i)),l&&null!=i.geometry){const e=a(i);null!=e&&l.set(e,i)}m(o?o.features:null,n,this.layer.spatialReference);const{fullExtent:u,featureEditResults:p}=await this._connection.invoke("applyEdits",{adds:o?o.features:[],updates:n,deletes:s});return this.fullExtent=u,o&&o.finish(p.uidToObjectId),this._updateIdToClientGeometries(l,p),this._createEditsResult(p)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGeometry(t)}for(const e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new i("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);i||null==o.geometry||(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const o=this;return{features:r,inferredGeometryType:i,finish(e){const r=o.sourceJSON.objectIdField;for(const i in e){const s=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===s?delete n.attributes[r]:n.attributes[r]=s,o._addIdToClientGeometry(n))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;const t=this.sourceJSON.objectIdField,r=e.attributes?.[t];null!=r&&this._idToClientGeometry.set(r,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(F++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;if(null==t)return null;if(this._geometryRequiresClientGraphicMapping(t)){return t.extent?c.fromExtent(t.extent):null}return t}async _startWorker(e){this._connection=await a("MemorySourceWorker",{strategy:has("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,objectIdField:i,hasM:o,hasZ:n,timeInfo:l,dateFieldsTimeZone:u}=this.layer,p="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const d=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",e=>{s.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()}));const{uniqueIdFields:c}=this.layer,h=c?.length?{type:c.length>1?"composite":"simple",fields:c.slice(),OIDFieldContainsHashValue:!(1===c?.length&&c.at(0)===this.layer.objectIdField)}:void 0,m={features:d.features,fields:t?.map(e=>e.toJSON()),geometryType:y.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&o,hasZ:"mesh"===this._layerOrSourceGeometryType||n,objectIdField:i,spatialReference:p?null:r&&r.toJSON(),timeInfo:l?.toJSON()??null,dateFieldsTimeZone:u,uniqueIdInfo:h},f=await this._connection.invoke("load",m,{signal:e});for(const a of f.warnings)s.getLogger(this.layer).warn("#load()",`${a.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:a});f.featureErrors.length&&s.getLogger(this.layer).error("#load()",`Failed to load ${f.featureErrors.length} features due to errors. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}').`,f.featureErrors.map(e=>"\n\n- "+e.error.description).join(""));const g=f.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(d.inferredGeometryType)&&(g.geometryType=y.toJSON(d.inferredGeometryType)),this.sourceJSON=g,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),d.finish(f.assignedObjectIds)}};e([_({Type:t,ensureType:p(t)})],T.prototype,"itemType",void 0),e([l()],T.prototype,"type",void 0),e([l({constructOnly:!0})],T.prototype,"layer",void 0),e([l({readOnly:!0})],T.prototype,"_workerGeometryType",null),e([l()],T.prototype,"sourceJSON",void 0),T=e([u("esri.layers.graphics.sources.MemorySource")],T);export{T as MemorySource};
2
+ import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Collection.js";import i from"../../../core/Error.js";import has from"../../../core/has.js";import{LoadableMixin as o}from"../../../core/Loadable.js";import s from"../../../core/Logger.js";import{EsriPromiseMixin as n}from"../../../core/Promise.js";import{open as a}from"../../../core/workers.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{ensureType as d}from"../../../core/accessorSupport/ensureType.js";import p from"../../../geometry/Extent.js";import c from"../../../geometry/Polygon.js";import{typeKebabDictionary as y}from"../../../geometry/support/typeUtils.js";import{createFeatureIdFromLayer as h}from"../data/createFeatureId.js";import{unapplyEditsZUnitScaling as m}from"../../../rest/query/operations/editsZScale.js";import f from"../../../rest/support/FeatureSet.js";import{shared as g}from"../../../core/accessorSupport/decorators/shared.js";let _=0,F=class extends(o(n(r))){constructor(e){super(e),this._idToClientGeometry=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t),i=f.fromJSON(r);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return i;const o=this.layer.objectIdField;for(const s of i.features){const e=s.attributes[o],t=this._idToClientGeometry.get(e);void 0!==t&&(s.geometry=t)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new i("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);return await this._connection.invoke("queryFeatures",e?e.toJSON():null,t)}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:p.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){await this.load();const r=await this._connection.invoke("queryAttributeBins",e?.toJSON(),t);return(await import("../../../rest/support/AttributeBinsFeatureSet.js")).default.fromJSON(r)}async _applyEdits(e){if(!this._connection)throw new i("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=this.layer.uniqueIdFields;let o=null;const s=[],n=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const a=e=>r?.length&&"attributes"in e?h(e,this.layer):"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(o=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const i of e.deleteFeatures){const e=a(i);null!=e&&s.push(e)}const l=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures)for(const i of e.updateFeatures)if(n.push(this._serializeFeature(i)),l&&null!=i.geometry){const e=a(i);null!=e&&l.set(e,i)}m(o?o.features:null,n,this.layer.spatialReference);const{fullExtent:u,featureEditResults:d}=await this._connection.invoke("applyEdits",{adds:o?o.features:[],updates:n,deletes:s});return this.fullExtent=u,o&&o.finish(d.uidToObjectId),this._updateIdToClientGeometries(l,d),this._createEditsResult(d)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGeometry(t)}for(const e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new i("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);i||null==o.geometry||(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const o=this;return{features:r,inferredGeometryType:i,finish(e){const r=o.sourceJSON.objectIdField;for(const i in e){const s=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===s?delete n.attributes[r]:n.attributes[r]=s,o._addIdToClientGeometry(n))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;const t=this.sourceJSON.objectIdField,r=e.attributes?.[t];null!=r&&this._idToClientGeometry.set(r,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(_++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;if(null==t)return null;if(this._geometryRequiresClientGraphicMapping(t)){return t.extent?c.fromExtent(t.extent):null}return t}async _startWorker(e){this._connection=await a("MemorySourceWorker",{strategy:has("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,objectIdField:i,hasM:o,hasZ:n,timeInfo:l,dateFieldsTimeZone:u}=this.layer,d="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const p=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",e=>{s.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()}));const{uniqueIdFields:c}=this.layer,h=c?.length?{type:c.length>1?"composite":"simple",fields:c.slice(),OIDFieldContainsHashValue:!(1===c?.length&&c.at(0)===this.layer.objectIdField)}:void 0,m={features:p.features,fields:t?.map(e=>e.toJSON()),geometryType:y.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&o,hasZ:"mesh"===this._layerOrSourceGeometryType||n,objectIdField:i,spatialReference:d?null:r&&r.toJSON(),timeInfo:l?.toJSON()??null,dateFieldsTimeZone:u,uniqueIdInfo:h},f=await this._connection.invoke("load",m,{signal:e});for(const a of f.warnings)s.getLogger(this.layer).warn("#load()",`${a.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:a});f.featureErrors.length&&s.getLogger(this.layer).error("#load()",`Failed to load ${f.featureErrors.length} features due to errors. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}').`,f.featureErrors.map(e=>"\n\n- "+e.error.description).join(""));const g=f.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(p.inferredGeometryType)&&(g.geometryType=y.toJSON(p.inferredGeometryType)),this.sourceJSON=g,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),p.finish(f.assignedObjectIds)}};e([g({Type:t,ensureType:d(t)})],F.prototype,"itemType",void 0),e([l()],F.prototype,"type",void 0),e([l({constructOnly:!0})],F.prototype,"layer",void 0),e([l({readOnly:!0})],F.prototype,"_workerGeometryType",null),e([l()],F.prototype,"sourceJSON",void 0),F=e([u("esri.layers.graphics.sources.MemorySource")],F);export{F as MemorySource};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{Loadable as r}from"../../../core/Loadable.js";import s from"../../../core/Logger.js";import{throwIfAborted as o}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{open as a}from"../../../core/workers.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import l from"../../../geometry/Extent.js";import{createFileProviderSchema as u,toParquetJSONGeometryType as y}from"../../support/parquetUtils.js";import p from"../../../rest/support/FeatureSet.js";let m=class extends r{constructor(t){super(t),this.type="parquet"}load(t){const e=null!=t?t.signal:null;return this.addResolvingPromise(this._initialize(e)),this.addHandles([i(()=>this.layer.data,async t=>{t&&await this._proxy.updateFileProvider(await u(t))}),i(()=>this.layer.customParameters,t=>this._setCustomParameters(t))]),Promise.resolve(this)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeaturesJSON(t,e={}){return await this.load(e),this._proxy.queryFeatures(t.toJSON(),{signal:e?.signal})}async queryFeatures(t,e={}){const r=await this.queryFeaturesJSON(t,{signal:e?.signal});return p.fromJSON(r)}async queryObjectIds(t,e){return await this._proxy.queryObjectIds(t.toJSON(),{signal:e?.signal})}async queryFeatureCount(t,e){return this._proxy.queryFeatureCount(t.toJSON(),{signal:e?.signal})}async queryExtent(t,e){if(null==this.layer.geometryEncoding)return s.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(t.toJSON(),{signal:e?.signal});return{count:r.count,extent:l.fromJSON(r.extent)}}async _initialize(t){if(!this.layer.data)throw new e("parquet:missing-data","A data source must be specified",this.layer);const r=await u(this.layer.data,{signal:t});o(t),this._connection=await a("ParquetSourceWorker",{strategy:"dedicated",signal:t,registryTarget:this}),o(t),this._proxy=this._connection.createInvokeProxy();const{layerDefinition:s,capabilities:i}=await this._proxy.load({provider:r,fields:this.layer.fields?.map(t=>t.toJSON()),geometryType:this.layer.geometryType?y(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters});o(t),this.sourceJSON=s,this.capabilities=i}_setCustomParameters(t){this._proxy.setCustomParameters(t).catch(()=>{s.getLogger(this).warn("Failed to update customParameters")})}};t([n()],m.prototype,"type",void 0),t([n({constructOnly:!0})],m.prototype,"layer",void 0),t([n()],m.prototype,"sourceJSON",void 0),t([n()],m.prototype,"capabilities",void 0),m=t([c("esri.layers.graphics.sources.ParquetSource")],m);export{m as ParquetSource};
2
+ import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{Loadable as r}from"../../../core/Loadable.js";import s from"../../../core/Logger.js";import{throwIfAborted as o}from"../../../core/promiseUtils.js";import{watch as a}from"../../../core/reactiveUtils.js";import{open as i}from"../../../core/workers.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import y from"../../../geometry/Extent.js";import{createFileProviderSchema as c,toParquetJSONGeometryType as l}from"../../support/parquetUtils.js";import p from"../../../rest/support/FeatureSet.js";let m=class extends r{constructor(t){super(t),this.type="parquet"}load(t){const e=null!=t?t.signal:null;return this.addResolvingPromise(this._initialize(e)),this.addHandles([a(()=>this.layer.data,async t=>{t&&await this._proxy.updateFileProvider(await c(t))}),a(()=>this.layer.customParameters,t=>this._setCustomParameters(t))]),Promise.resolve(this)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeaturesJSON(t,e={}){return await this.load(e),this._proxy.queryFeatures(t.toJSON(),{signal:e?.signal})}async queryFeatures(t,e={}){const r=await this.queryFeaturesJSON(t,{signal:e?.signal});return p.fromJSON(r)}async queryObjectIds(t,e){return await this._proxy.queryObjectIds(t.toJSON(),{signal:e?.signal})}async queryFeatureCount(t,e){return this._proxy.queryFeatureCount(t.toJSON(),{signal:e?.signal})}async queryExtent(t,e){if(null==this.layer.geometryEncoding)return s.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(t.toJSON(),{signal:e?.signal});return{count:r.count,extent:y.fromJSON(r.extent)}}async _initialize(t){if(!this.layer.data)throw new e("parquet:missing-data","A data source must be specified",this.layer);const r=await c(this.layer.data,{signal:t});o(t),this._connection=await i("ParquetSourceWorker",{strategy:"dedicated",signal:t,registryTarget:this}),o(t),this._proxy=this._connection.createInvokeProxy();const{layerDefinition:s,capabilities:a}=await this._proxy.load({provider:r,fields:this.layer.fields?.map(t=>t.toJSON()),geometryType:this.layer.geometryType?l(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters});o(t),this.sourceJSON=s,this.capabilities=a}_setCustomParameters(t){this._proxy.setCustomParameters(t).catch(()=>{s.getLogger(this).warn("Failed to update customParameters")})}_queryStream(t,e){return this._proxy.queryStream(t,e)}_getStreamNextFeatures(t,e){return this._proxy.getStreamNextFeatures(t,e)}};t([n()],m.prototype,"type",void 0),t([n({constructOnly:!0})],m.prototype,"layer",void 0),t([n()],m.prototype,"sourceJSON",void 0),t([n()],m.prototype,"capabilities",void 0),m=t([u("esri.layers.graphics.sources.ParquetSource")],m);export{m as ParquetSource};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as t}from"tslib";import{toConst as s}from"../../../../core/compilerUtils.js";import r from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{onAbortOrThrow as n,throwIfAborted as a}from"../../../../core/promiseUtils.js";import{QueueProcessor as o}from"../../../../core/QueueProcessor.js";import{parseWhereClause as u}from"../../../../core/sql.js";import l from"../../../../geometry/SpatialReference.js";import{set as c,create as p,expandWithAABB as d,expandWithRect as f,negativeInfinity as m}from"../../../../geometry/support/aaBoundingBox.js";import{isWebMercator as y,isWGS84 as h}from"../../../../geometry/support/spatialReferenceUtils.js";import{getQueryResultExtent as g,getQueryBBoxes as _,QueryEngine as w}from"../../data/QueryEngine.js";import{queryCapabilities as x}from"../../data/QueryEngineCapabilities.js";import{QueryEngineResult as F}from"../../data/QueryEngineResult.js";import{normalizeQueryLike as S}from"../../data/queryUtils.js";import{createFileProvider as I}from"../parquet/createFileProvider.js";import{createDrawingInfo as v}from"./clientSideDefaults.js";import{getParquetFileId as q,getParquetRowId as R,getParquetObjectId as C}from"./parquetIdUtils.js";import b from"../../../support/Field.js";import E from"../../../support/FieldsIndex.js";import{isNumericField as O}from"../../../support/fieldUtils.js";import{fromParquetGeometryEncodingJSON as T}from"../../../support/parquetEncodingUtils.js";import{completeParquetLayerInfo as P,fromParquetJSONGeometryType as Q,toParquetJSONGeometryType as j}from"../../../support/parquetUtils.js";import{loadParquetModule as N}from"../../../../libs/parquet/loadParquetModule.js";import{FeatureStoreQueryAdapter as A}from"../../../../views/2d/layers/features/FeatureStoreQueryAdapter.js";import{FeatureSnapshotSourceChunk as B}from"../../../../views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js";import{FeatureSourceChunkStore as M}from"../../../../views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as D}from"../../../../views/2d/layers/features/support/FeatureMetadata.js";import{FeatureSetReaderParquet as G}from"../../../../views/2d/layers/features/support/FeatureSetReaderParquet.js";const z=new A,V=4,k="__OBJECTID",U=new TextDecoder,W=8e3,J=2e7,Z=8,L=2,H=20;class Y{constructor(e,t){this._files=e,this._createFileStream=t,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(e){for(await this._fill(e);this._pending.size>0;){a(e),await this._fill(e);const t=await X(this._pending);if(this._pending.delete(t.read),this._resolvedCount++,null!=t.chunk)return t.chunk}return null}async _fill(e){for(this._removeDone();this._pending.size<Z;){const t=this._getOrCreateNextStream(e);if(null==t)return;this._pending.add(t.read(e))}}_getOrCreateNextStream(e){const t=this._resolvedCount>=Z?Z:L;if(this._fileIndex<this._files.length&&this._streams.length<t){const t=this._files[this._fileIndex++],s=new $(t.id,this._createFileStream(t,e));return this._streams.push(s),s}return this._getNextStream()}_getNextStream(){const e=this._streams.length;for(let t=0;t<e;t++){const s=(this._streamIndex+t)%e,r=this._streams[s];if(r.canRead)return this._streamIndex=(s+1)%e,r}return null}_removeDone(){let e=this._streamIndex;for(let t=this._streams.length-1;t>=0;t--)this._streams[t].done&&(this._streams.splice(t,1),t<e&&e--);this._streamIndex=this._streams.length>0?e%this._streams.length:0}}function X(e){return Promise.race(Array.from(e,async e=>({read:e,chunk:await e})))}class ${constructor(e,t){this._fileId=e,this._stream=t,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(e){this._readCount++;try{const t=await this._stream,s=await t.next(e);return null==s?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:s}}finally{this._readCount--}}}class K{constructor(){this._queue=new o({concurrency:V,process:(e,t)=>this._executeQuery(e,t)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={}}async load(e){const t=e.spatialReference?l.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new r("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=e.customParameters,this._provider=I(e.provider,null,()=>this._customParameters);const s=await this._provider.getMetadata(),n=await P(s,{fields:e.fields?.map(e=>b.fromJSON(e)),geometryEncoding:e.geometryEncoding?T(e.geometryEncoding):null,geometryType:e.geometryType?Q(e.geometryType):null,displayOptimization:e.displayOptimization,spatialReference:t});if(!n.fields)throw new r("parquet:unsupported","Fields must be defined");let a;if(n.spatialReference&&n.geometryType){if(!n.spatialReference)throw new r("parquet:unsupported","SpatialReference must be defined");if(!n.spatialReference.isGeographic&&!n.spatialReference.isWebMercator)throw new r("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");n.spatialReference.isGeographic&&!n.spatialReference.isWGS84&&(i.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:n.spatialReference}),n.spatialReference=l.WGS84),a={geometry:n.geometryEncoding?{geometryType:j(n.geometryType),spatialReference:n.spatialReference.toJSON(),encoding:n.geometryEncoding.toJSON()}:null,displayOptimization:n.displayOptimization}}this.setCustomParameters(e.customParameters),this._displayOptimization=n.displayOptimization,await this._provider.updateGeometryInfo(a),this._capabilities=he(await this._getFileStatistics());const o=await this._provider.getFiles();if(!o.length)return{layerDefinition:{},capabilities:he(null)};const u=await o[0].file;n.file=u;const{fields:c}=n;if(null==c)throw new r("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",c);c.push(new b({name:k,type:"oid",alias:k}));for(const r of c){const e=u.getColumnId(r.name);null!=e&&(this._indexMap[r.name]=e)}const p=new E(c.map(e=>e.toJSON()));this._fieldsIndex=p;const d=j(n.geometryType??"point");return this._metadata=D.createFeature({fieldsIndex:p.toJSON(),geometryType:d,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:n.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:d,featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:n.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=s?.extent?s.extent:await this._tryDeriveParquetFullExtent(n),{capabilities:this._capabilities,layerDefinition:{fields:n.fields?.map(e=>e.toJSON()),drawingInfo:v(d),extent:this._fullExtent??void 0,geometryType:d,geometryEncoding:n.geometryEncoding?.toJSON(),displayOptimization:n.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(const{handle:e}of this._streams.values())e.remove();this._streams.clear()}setCustomParameters(e){this._customParameters=e}getIndexMap(){return this._indexMap}async updateFileProvider(e){this._provider=I(e,this._provider.getGeometryInfo(),()=>this._customParameters)}async queryFeatures(e,t){if(this._validateQuery(e),ge(e)||(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,W):W,e.resultOffset=e.resultOffset??0),e.outStatistics)return this._queryStatistics(e,t);e.returnDistinctValues&&(e.returnGeometry=void 0);return(await this._enqueueQuery(e,t)).createQueryResponse()}async queryFeatureCount(e,t){const s=await S(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),!ee(s))return this._getFeatureCount();s.outFields=void 0,s.returnGeometry=void 0;return(await this._enqueueQuery(s,t)).createQueryResponseForCount()}async queryObjectIds(e,t){const s=await S(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),!ee(s))return Array.from({length:await this._getFeatureCount()},(e,t)=>t);s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,8e3):8e3,s.resultOffset=s.resultOffset??0,s.returnGeometry=void 0,s.outFields=void 0;return(await this._enqueueQuery(s,t)).items.map(e=>e.getObjectId())}async queryAttributeBins(e,t={}){throw new r("parquet:unsupported","queryAttributeBins not supported.")}async queryExtent(e,t){const r=await S(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),this._fullExtent&&!ee(r))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=s(this._metadata.spatialReference);r.returnGeometry=!0,r.outFields=void 0;const n=c(p(),m),a=p(),o=await this._enqueueQuery(r,t);let u=0;for(const s of o.items)s.getBounds(a)&&(d(n,a),u+=1);return{count:u,extent:g(n,i,r.outSR?s(r.outSR):i.toJSON(),i,!1)}}async queryStream(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const s=await this._getCandidateFiles(e),r=new Y(s,async(t,s)=>{const r=await t.file,i=await this._createParquetQuery(r,t.id,e);return r.executeQuery(i,s)}),i=this._streamIdCounter++,a=n(t.signal,e=>{const t=this._streams.get(i);null!=t&&(t.handle.remove(),this._streams.delete(i))});return this._streams.set(i,{stream:r,handle:a}),i}async getStreamNext(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const s=this._streams.get(e);if(!s)return{result:null};const r=await s.stream.next(t.signal);if(null==r)return s.handle.remove(),this._streams.delete(e),{result:null};const i=r.chunk.serialize().buffer,n={fileId:r.fileId,buffer:i};return i instanceof ArrayBuffer?{result:n,transferList:[i]}:{result:n}}async createPatch(e,t,s,r,i){if(!i.signal)throw new Error("InternalError: AbortSignal must be passed");const n=await this._getFileInfoById(e),a=await n.file;return(await a.createChunkPatch(t,s,r,i.signal)).serialize().buffer}async _getCandidateFiles(e){const t=await this._provider.getFiles(),s=await this._getSpatialFilePruning(e);if(null==s)return t;const r=t.filter(e=>this._mayIncludeFileForSpatialPruning(e,s));return"xz"===s.type?ce(r,s):r}async _queryStatistics(e,t){const s=await S({...e},null,this._queryEngineParams.spatialReference);if(s.returnGeometry=void 0,te(s,this._fieldsIndex)){const e=await this._getStatisticsFromFiles(s);if(e)return e}return(await this._enqueueQuery(s,t)).createQueryResponse()}async _getStatisticsFromFiles(e){const t=await this._provider.getFiles(),s={},r=[];for(const i of e.outStatistics??[]){const e=ie(i,t);if(!e.available)return null;s[i.outStatisticFieldName]=e.value,r.push(re(i,this._fieldsIndex))}return{fields:r,features:[{attributes:s}]}}async _getSpatialFilePruning(e){if("tile"!==e.type)return null;const t=this._displayOptimization,s=t?.index;if(null==s)return null;const r=e.outSpatialReference.wkid;if(null==s.wkid||null==r)return null;const i=s.wkid,n=await N();switch(s.type){case"xz":return{type:"xz",fieldName:s.code,intersects:(t,a)=>n.queryIntersectsXZStatistics(s.fullExtent,e.extent,r,i,H,t,a)};case"z":return{type:"xy",xFieldName:s.xColumn,yFieldName:s.yColumn,intersects:(t,s,a,o)=>n.queryIntersectsXYStatistics(e.extent,r,i,t,s,a,o)}}}_mayIncludeFileForSpatialPruning(e,t){switch(t.type){case"xz":{const s=le(e,t);return null==s||fe(s,t)}case"xy":{const{xStatistics:s,yStatistics:r}=de(e,t);return null==s||null==r||me(s,r,t)}}}async _tryDeriveParquetFullExtent(s){if(!s.spatialReference)return null;if(null==this._fullExtent&&"location"===s.geometryEncoding?.type){const i=await this._provider.getFiles(),{xField:n,yField:a}=s.geometryEncoding,o=c(p(),m);for(const s of i){const i=await s.file;for(const s of i.rowGroups()){const i={stack:[],error:void 0,hasError:!1};try{const t=e(i,s.columnDescriptorForAttribute(n),!1),r=e(i,s.columnDescriptorForAttribute(a),!1),u=[t.minValue(),r.minValue(),t.maxValue(),r.maxValue()];f(o,u),s.free()}catch(r){i.error=r,i.hasError=!0}finally{t(i)}}}return{xmin:o[0],ymin:o[1],xmax:o[3],ymax:o[4],spatialReference:s.spatialReference?.toJSON()}}return null}async _getFileInfoById(e){const t=await this._provider.getFiles();for(const s of t)if(s.id===e)return s;throw new Error(`InternalError: File ${e} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(e){return(await this._getFileInfoById(e)).file}async _createParquetQuery(e,t,s){const r=(await N()).Query.new();return"tile"===s.type&&(r.setExtent(s.extent),r.setQuantizationTransform(s.transform),r.setScale(s.scale)),r.setOutFields(s.outFields.filter(e=>null!=this._indexMap[e])),r.setOutSpatialReference(s.outSpatialReference.wkid),r.setReturnGeometry(s.returnGeometry),s.where&&await this._setWhereClause(r,e,t,s.where),r}async _getFeatureCount(){return(await this._provider.getFiles()).map(e=>e.statistics.rowCount).reduce((e,t)=>e+t,0)}async _getByteLength(){return(await this._provider.getFiles()).map(e=>e.statistics.byteSize).reduce((e,t)=>e+t,0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new r("parquet:unsupported","Statistics queries are not supported",{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new r("parquet:unsupported","Queries using orderBy are not supported",{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new r("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:e})}async _setWhereClause(e,t,s,i){const n=this._indexMap,a=this._fieldsIndex,o={getAttribute(e,r){const i=n[r];if(null==i){const t=a.get(r);if("__OBJECTID"===t?.name){const t=e.row+e.rowGroupStart;return C(s,t)}return null}const o=t.readAttribute(e.rowGroup,e.row,i);if(null==o)return null;const u=a.get(r);return"esriFieldTypeString"===u.type||"esriFieldTypeDateOnly"===u.type||"esriFieldTypeTimeOnly"===u.type||"esriFieldTypeTimestampOffset"===u.type?U.decode(o):o}},l=await u(i,this._fieldsIndex);if(!l.isStandardized)throw new r("sql-parse-error","expression is not standardized");const c=(e,t,s)=>l.testFeatureCompiled({rowGroup:e,row:t,rowGroupStart:s},o,null),p=l.fieldNames.map(e=>a.get(e)).filter(e=>e&&null!=this._indexMap[e?.name]);e.setWhere(i),e.setWhereEvaluator(c),e.setWhereFields(p.map(e=>e.name))}async*_queryChunks(e,t){const s=await N(),r=await this._provider.getFiles(),i=await this._getRequiredFields(e);for(const n of r){const r=await n.file,o=s.Query.new();o.setOutFields(i),o.setReturnGeometry(!!e.returnGeometry);const u=e.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=u.wkid;if(e.geometry&&(y(u)||h(u))){const t=p();for(const s of _(e.geometry))f(t,s);o.setOutSpatialReference(l),o.setExtent({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]})}e.where&&await this._setWhereClause(o,r,n.id,e.where);const c=await r.executeQuery(o),d=[],m=c.next(t);for(let e=0;e<V;e++)d.push(c.next(t));let g=await m;for(;null!=g;){a(t);const e=new G(this._metadata,this._indexMap,g,n.id),s=ue([new B(e,null,0,!1)],this._queryEngineParams),r=d.shift();d.push(c.next(t)),yield s,g=await r}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){if(e.objectIds?.length){const s=new Map;for(const t of e.objectIds){const e=q(t),r=R(t);let i=s.get(e);i||(i=[],s.set(e,i)),i.push(r)}const r=[];for(const[i,n]of s.entries()){const s=await this._executeFileIdQuery(e,i,n,t);for(const e of s)r.push(e)}return new F(r,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:z,featureIdInfo:this._queryEngineParams.featureIdInfo})}let s=e.resultRecordCount??await this._getFeatureCount(),i=e.resultOffset??0;if(s>J)throw new r("parquet:cannot-execute-query","Unable to execute query, dataset is too large.");const n={...e};e.where=void 0,e.resultRecordCount=void 0,e.resultOffset=void 0;const a=[];for await(const r of this._queryChunks(n,t)){const n=await r.executeQueryForOpaqueFeatures(e,t);if(n.length>i){const t=n.slice(i,Math.min(i+s,n.length));for(const e of t)a.push(e);if(i=0,s-=t.length,0===s)return new F(a,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:z,featureIdInfo:this._queryEngineParams.featureIdInfo})}else i-=n.length}return new F(a,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:z,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(e,t,s,r){const i=await this._getRequiredFields(e),n=(await N()).Query.new();n.setOutFields(i),n.setReturnGeometry(!!e.returnGeometry),n.setIds(new Uint32Array(s));const a=await this._getFile(t),o=await a.executeQuery(n,r);let u=await o.next(r),l=0;const c=[];for(;null!=u;){const e=new G(this._metadata,this._indexMap,u,t),s=new B(e,null,l++,!1);c.push(s),u=await o.next(r)}return ue(c,this._queryEngineParams).executeQueryForOpaqueFeatures(e,r)}async _getRequiredFields(e){const t=new Set;if(e.outStatistics)for(const s of e.outStatistics)null!=s.onStatisticField&&t.add(s.onStatisticField);else if(e.outFields)for(const s of e.outFields)t.add(s);return(t.has("*")?this._fieldsIndex.fields.map(e=>e.name):Array.from(t)).filter(e=>null!=this._indexMap[e])}}function ee(e){for(const t in e){const s=t;switch(s){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"objectIds":case"historicMoment":case"where":return null!=e[s]}}return!1}function te(e,t){return!!e.outStatistics?.length&&!ee(e)&&!e.groupByFieldsForStatistics?.length&&!e.orderByFields?.length&&!e.returnDistinctValues&&!e.returnAggIds&&e.outStatistics.every(e=>se(e,t))}function se(e,t){switch(e.statisticType){case"count":return"1"===e.onStatisticField||null!=t.get(e.onStatisticField);case"min":case"max":{const s=t.get(e.onStatisticField);return null!=s&&O(s)}default:return!1}}function re(e,t){const s="exceedslimit"!==e.statisticType?t.get(e.onStatisticField):null,r="min"!==e.statisticType&&"max"!==e.statisticType||"esriFieldTypeDate"!==s?.type?"esriFieldTypeDouble":s.type;return{name:e.outStatisticFieldName,alias:e.outStatisticFieldName,type:r}}function ie(e,t){switch(e.statisticType){case"count":return ne(e,t);case"min":return ae(e,t,Math.min);case"max":return ae(e,t,Math.max);default:return{available:!1,value:null}}}function ne(e,t){if("count"!==e.statisticType)return{available:!1,value:null};if("1"===e.onStatisticField)return{available:!0,value:t.reduce((e,t)=>e+t.statistics.rowCount,0)};let s=0;for(const r of t){const t=r.statistics.statistics.get(e.onStatisticField);if(null==t||null==t.nullCount)return{available:!1,value:null};s+=r.statistics.rowCount-t.nullCount}return{available:!0,value:s}}function ae(e,t,s){if("min"!==e.statisticType&&"max"!==e.statisticType)return{available:!1,value:null};let r=null;const i="min"===e.statisticType?"minValue":"maxValue";for(const n of t){const t=n.statistics.statistics.get(e.onStatisticField);if(null==t)return{available:!1,value:null};const a=oe(t[i]);null!=a&&(r=null==r?a:s(r,a))}return{available:!0,value:r}}function oe(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function ue(e,t){const s=new M;for(const r of e)s.insert(r);return new w({...t,featureStore:s})}function le(e,t){return e.statistics.statistics.get(t.fieldName)??null}function ce(e,t){return e.slice().sort((e,s)=>{const r=pe(e,t),i=pe(s,t);return r===i?0:r<i?-1:1})}function pe(e,t){const s=le(e,t);if(null==s)return Number.POSITIVE_INFINITY;const r=ye(s.minValue),i=ye(s.maxValue);return null==r||null==i||i<r?Number.POSITIVE_INFINITY:i-r}function de(e,t){return{xStatistics:e.statistics.statistics.get(t.xFieldName)??null,yStatistics:e.statistics.statistics.get(t.yFieldName)??null}}function fe(e,t){const s=ye(e.minValue),r=ye(e.maxValue);return null==s||null==r||t.intersects(s,r)}function me(e,t,s){const r=ye(e.minValue),i=ye(e.maxValue),n=ye(t.minValue),a=ye(t.maxValue);return null==r||null==i||null==n||null==a||s.intersects(r,i,n,a)}function ye(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function he(e){const t=e?.featureCount;let s=!1;return null!=t&&t<has("parquetlayer-full-query-feature-count")&&(s=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...x,maxRecordCount:W,supportsOrderBy:s,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}function ge(e){return!!(e.objectIds?.length||e.outStatistics||e.orderByFields?.length||e.returnDistinctValues)}export{K as default};
2
+ import{__addDisposableResource as e,__disposeResources as t}from"tslib";import{toConst as r}from"../../../../core/compilerUtils.js";import s from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{onAbortOrThrow as a,throwIfAborted as n}from"../../../../core/promiseUtils.js";import{QueueProcessor as o}from"../../../../core/QueueProcessor.js";import{parseWhereClause as u}from"../../../../core/sql.js";import l from"../../../../geometry/SpatialReference.js";import{set as c,create as p,expandWithAABB as d,expandWithRect as f,negativeInfinity as m}from"../../../../geometry/support/aaBoundingBox.js";import{copy as y,negativeInfinity as h,create as g,expandWithRect as _}from"../../../../geometry/support/aaBoundingRect.js";import{getScaleForResolution as w}from"../../../../geometry/support/scaleUtils.js";import{isWebMercator as x,isWGS84 as F}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertToGeometry as S}from"../../featureConversionUtils.js";import{getQueryResultExtent as I,getQueryBoundingRects as v,QueryEngine as q}from"../../data/QueryEngine.js";import{queryCapabilities as R}from"../../data/QueryEngineCapabilities.js";import{QueryEngineResult as b}from"../../data/QueryEngineResult.js";import{normalizeQueryLike as C}from"../../data/queryUtils.js";import{createFileProvider as E}from"../parquet/createFileProvider.js";import{createDrawingInfo as O}from"./clientSideDefaults.js";import{getParquetFileId as T,getParquetRowId as P,getParquetObjectId as j}from"./parquetIdUtils.js";import Q from"../../../support/Field.js";import N from"../../../support/FieldsIndex.js";import{isNumericField as A}from"../../../support/fieldUtils.js";import{fromParquetGeometryEncodingJSON as G}from"../../../support/parquetEncodingUtils.js";import{completeParquetLayerInfo as B,fromParquetJSONGeometryType as M,toParquetJSONGeometryType as z}from"../../../support/parquetUtils.js";import{loadParquetModule as D}from"../../../../libs/parquet/loadParquetModule.js";import{FeatureStoreQueryAdapter as k}from"../../../../views/2d/layers/features/FeatureStoreQueryAdapter.js";import{FeatureSnapshotSourceChunk as V}from"../../../../views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js";import{FeatureSourceChunkStore as U}from"../../../../views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as W}from"../../../../views/2d/layers/features/support/FeatureMetadata.js";import{FeatureSetReaderParquet as J}from"../../../../views/2d/layers/features/support/FeatureSetReaderParquet.js";const Z=new k,L=4,H="__OBJECTID",Y=new TextDecoder,X=8e3,$=2e7,K=8,ee=2,te=20;class re{constructor(e,t){this._files=e,this._createFileStream=t,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(e){for(await this._fill(e);this._pending.size>0;){n(e),await this._fill(e);const t=await se(this._pending);if(this._pending.delete(t.read),this._resolvedCount++,null!=t.chunk)return t.chunk}return null}async _fill(e){for(this._removeDone();this._pending.size<K;){const t=this._getOrCreateNextStream(e);if(null==t)return;this._pending.add(t.read(e))}}_getOrCreateNextStream(e){const t=this._resolvedCount>=K?K:ee;if(this._fileIndex<this._files.length&&this._streams.length<t){const t=this._files[this._fileIndex++],r=new ie(t.id,this._createFileStream(t,e));return this._streams.push(r),r}return this._getNextStream()}_getNextStream(){const e=this._streams.length;for(let t=0;t<e;t++){const r=(this._streamIndex+t)%e,s=this._streams[r];if(s.canRead)return this._streamIndex=(r+1)%e,s}return null}_removeDone(){let e=this._streamIndex;for(let t=this._streams.length-1;t>=0;t--)this._streams[t].done&&(this._streams.splice(t,1),t<e&&e--);this._streamIndex=this._streams.length>0?e%this._streams.length:0}}function se(e){return Promise.race(Array.from(e,async e=>({read:e,chunk:await e})))}class ie{constructor(e,t){this._fileId=e,this._stream=t,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(e){this._readCount++;try{const t=await this._stream,r=await t.next(e);return null==r?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:r}}finally{this._readCount--}}}class ae{constructor(){this._queue=new o({concurrency:L,process:(e,t)=>this._executeQuery(e,t)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={}}async load(e){const t=e.spatialReference?l.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new s("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=e.customParameters,this._provider=E(e.provider,null,()=>this._customParameters);const r=await this._provider.getMetadata(),a=await B(r,{fields:e.fields?.map(e=>Q.fromJSON(e)),geometryEncoding:e.geometryEncoding?G(e.geometryEncoding):null,geometryType:e.geometryType?M(e.geometryType):null,displayOptimization:e.displayOptimization,spatialReference:t});if(!a.fields)throw new s("parquet:unsupported","Fields must be defined");let n;if(a.spatialReference&&a.geometryType){if(!a.spatialReference)throw new s("parquet:unsupported","SpatialReference must be defined");if(!a.spatialReference.isGeographic&&!a.spatialReference.isWebMercator)throw new s("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");a.spatialReference.isGeographic&&!a.spatialReference.isWGS84&&(i.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:a.spatialReference}),a.spatialReference=l.WGS84),n={geometry:a.geometryEncoding?{geometryType:z(a.geometryType),spatialReference:a.spatialReference.toJSON(),encoding:a.geometryEncoding.toJSON()}:null,displayOptimization:a.displayOptimization}}this.setCustomParameters(e.customParameters),this._displayOptimization=a.displayOptimization,await this._provider.updateGeometryInfo(n),this._capabilities=Se(await this._getFileStatistics());const o=await this._provider.getFiles();if(!o.length)return{layerDefinition:{},capabilities:Se(null)};const u=await o[0].file;a.file=u;const{fields:c}=a;if(null==c)throw new s("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",c);c.push(new Q({name:H,type:"oid",alias:H}));for(const s of c){const e=u.getColumnId(s.name);null!=e&&(this._indexMap[s.name]=e)}const p=new N(c.map(e=>e.toJSON()));this._fieldsIndex=p;const d=z(a.geometryType??"point");return this._metadata=W.createFeature({fieldsIndex:p.toJSON(),geometryType:d,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:H},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:a.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:d,featureIdInfo:{type:"object-id",fieldName:H},hasM:!1,hasZ:!1,spatialReference:a.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=r?.extent?r.extent:await this._tryDeriveParquetFullExtent(a),{capabilities:this._capabilities,layerDefinition:{fields:a.fields?.map(e=>e.toJSON()),drawingInfo:O(d),extent:this._fullExtent??void 0,geometryType:d,geometryEncoding:a.geometryEncoding?.toJSON(),displayOptimization:a.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(const{handle:e}of this._streams.values())e.remove();this._streams.clear()}setCustomParameters(e){this._customParameters=e}getIndexMap(){return this._indexMap}async updateFileProvider(e){this._provider=E(e,this._provider.getGeometryInfo(),()=>this._customParameters)}async queryFeatures(e,t){const r=await C(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),Ie(r)||(r.resultRecordCount=r.resultRecordCount?Math.min(r.resultRecordCount,X):X,r.resultOffset=r.resultOffset??0),r.outStatistics)return this._queryStatistics(r,t);r.returnDistinctValues&&(r.returnGeometry=void 0);return(await this._enqueueQuery(r,t)).createQueryResponse()}async queryFeatureCount(e,t){const r=await C(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),!ne(r))return this._getFeatureCount();r.outFields=void 0,r.returnGeometry=void 0;return(await this._enqueueQuery(r,t)).createQueryResponseForCount()}async queryObjectIds(e,t){const r=await C(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),!ne(r))return Array.from({length:await this._getFeatureCount()},(e,t)=>t);r.resultRecordCount=r.resultRecordCount?Math.min(r.resultRecordCount,8e3):8e3,r.resultOffset=r.resultOffset??0,r.returnGeometry=void 0,r.outFields=void 0;return(await this._enqueueQuery(r,t)).items.map(e=>e.getObjectId())}async queryAttributeBins(e,t={}){throw new s("parquet:unsupported","queryAttributeBins not supported.")}async queryExtent(e,t){const s=await C(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!ne(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=r(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const a=c(p(),m),n=p(),o=await this._enqueueQuery(s,t);let u=0;for(const r of o.items)r.getBounds(n)&&(d(a,n),u+=1);return{count:u,extent:I(a,i,s.outSR?r(s.outSR):i.toJSON(),i,!1)}}async queryStream(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const r=await this._getCandidateFiles(e),s=new re(r,async(t,r)=>{const s=await t.file,i=await this._createParquetQuery(s,t.id,e);return s.executeQuery(i,r)}),i=this._streamIdCounter++,n=a(t.signal,e=>{const t=this._streams.get(i);null!=t&&(t.handle.remove(),this._streams.delete(i))});return this._streams.set(i,{stream:s,handle:n}),i}async getStreamNext(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const r=this._streams.get(e);if(!r)return{result:null};const s=await r.stream.next(t.signal);if(null==s)return r.handle.remove(),this._streams.delete(e),{result:null};const i=s.chunk.serialize().buffer,a={fileId:s.fileId,buffer:i};return i instanceof ArrayBuffer?{result:a,transferList:[i]}:{result:a}}async getStreamNextFeatures(e,t){const{result:r}=await this.getStreamNext(e,t);if(null==r)return null;const s=(await D()).ParquetChunk.deserialize(new Uint8Array(r.buffer)),i=new J(this._metadata,this._indexMap,s,r.fileId),a=[];for(;i.next();){const e=S(i.readGeometryWorldSpace(),i.geometryType,i.hasZ,i.hasM),t=i.readAttributes();a.push({attributes:t,geometry:e})}return{features:a}}async createPatch(e,t,r,s,i){if(!i.signal)throw new Error("InternalError: AbortSignal must be passed");const a=await this._getFileInfoById(e),n=await a.file;return(await n.createChunkPatch(t,r,s,i.signal)).serialize().buffer}async _getCandidateFiles(e){const t=await this._provider.getFiles(),r=await this._getSpatialFilePruning(e);if(null==r)return t;const s=t.filter(e=>this._mayIncludeFileForSpatialPruning(e,r));return"xz"===r.type?he(s,r):s}async _queryStatistics(e,t){const r=await C({...e},null,this._queryEngineParams.spatialReference);if(r.returnGeometry=void 0,oe(r,this._fieldsIndex)){const e=await this._getStatisticsFromFiles(r);if(e)return e}return(await this._enqueueQuery(r,t)).createQueryResponse()}async _getStatisticsFromFiles(e){const t=await this._provider.getFiles(),r={},s=[];for(const i of e.outStatistics??[]){const e=ce(i,t);if(!e.available)return null;r[i.outStatisticFieldName]=e.value,s.push(le(i,this._fieldsIndex))}return{fields:s,features:[{attributes:r}]}}async _getSpatialFilePruning(e){if("tile"!==e.type&&("arcade"!==e.type||null==e.extent))return null;const t=this._displayOptimization,r=t?.index;if(null==r)return null;const s=e.outSpatialReference.wkid;if(null==r.wkid||null==s)return null;const i=r.wkid,a=await D();switch(r.type){case"xz":return{type:"xz",fieldName:r.code,intersects:(t,n)=>a.queryIntersectsXZStatistics(r.fullExtent,e.extent,s,i,te,t,n)};case"z":return{type:"xy",xFieldName:r.xColumn,yFieldName:r.yColumn,intersects:(t,r,n,o)=>a.queryIntersectsXYStatistics(e.extent,s,i,t,r,n,o)}}}_mayIncludeFileForSpatialPruning(e,t){switch(t.type){case"xz":{const r=ye(e,t);return null==r||we(r,t)}case"xy":{const{xStatistics:r,yStatistics:s}=_e(e,t);return null==r||null==s||xe(r,s,t)}}}async _tryDeriveParquetFullExtent(r){if(!r.spatialReference)return null;if(null==this._fullExtent&&"location"===r.geometryEncoding?.type){const i=await this._provider.getFiles(),{xField:a,yField:n}=r.geometryEncoding,o=c(p(),m);for(const r of i){const i=await r.file;for(const r of i.rowGroups()){const i={stack:[],error:void 0,hasError:!1};try{const t=e(i,r.columnDescriptorForAttribute(a),!1),s=e(i,r.columnDescriptorForAttribute(n),!1),u=[t.minValue(),s.minValue(),t.maxValue(),s.maxValue()];f(o,u),r.free()}catch(s){i.error=s,i.hasError=!0}finally{t(i)}}}return{xmin:o[0],ymin:o[1],xmax:o[3],ymax:o[4],spatialReference:r.spatialReference?.toJSON()}}return null}async _getFileInfoById(e){const t=await this._provider.getFiles();for(const r of t)if(r.id===e)return r;throw new Error(`InternalError: File ${e} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(e){return(await this._getFileInfoById(e)).file}async _createParquetQuery(e,t,r){const s=(await D()).Query.new();return"tile"===r.type?(s.setExtent(r.extent),s.setQuantizationTransform(r.transform),s.setScale(r.scale)):"arcade"===r.type&&null!=r.extent&&s.setExtent(r.extent),s.setOutFields(r.outFields.filter(e=>null!=this._indexMap[e])),s.setOutSpatialReference(r.outSpatialReference.wkid),s.setReturnGeometry(r.returnGeometry),r.where&&await this._setWhereClause(s,e,t,r.where),s}async _getFeatureCount(){return(await this._provider.getFiles()).map(e=>e.statistics.rowCount).reduce((e,t)=>e+t,0)}async _getByteLength(){return(await this._provider.getFiles()).map(e=>e.statistics.byteSize).reduce((e,t)=>e+t,0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new s("parquet:unsupported","Statistics queries are not supported",{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new s("parquet:unsupported","Queries using orderBy are not supported",{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new s("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:e})}async _setWhereClause(e,t,r,i){const a=this._indexMap,n=this._fieldsIndex,o={getAttribute(e,s){const i=a[s];if(null==i){const t=n.get(s);if("__OBJECTID"===t?.name){const t=e.row+e.rowGroupStart;return j(r,t)}return null}const o=t.readAttribute(e.rowGroup,e.row,i);if(null==o)return null;const u=n.get(s);return"esriFieldTypeString"===u.type||"esriFieldTypeDateOnly"===u.type||"esriFieldTypeTimeOnly"===u.type||"esriFieldTypeTimestampOffset"===u.type?Y.decode(o):o}},l=await u(i,this._fieldsIndex);if(!l.isStandardized)throw new s("sql-parse-error","expression is not standardized");const c=(e,t,r)=>l.testFeatureCompiled({rowGroup:e,row:t,rowGroupStart:r},o,null),p=l.fieldNames.map(e=>n.get(e)).filter(e=>e&&null!=this._indexMap[e?.name]);e.setWhere(i),e.setWhereEvaluator(c),e.setWhereFields(p.map(e=>e.name))}async*_queryChunks(e,t){const r=await D(),s=await this._provider.getFiles(),i=await this._getRequiredFields(e),a=this._tryGetGeneralizedGeometryScale(e);for(const o of s){const s=await o.file,u=r.Query.new();u.setOutFields(i),(e.geometry||e.returnGeometry)&&u.setReturnGeometry(!0),null!=a&&u.setScale(a);const l=e.geometry?.spatialReference??this._queryEngineParams.spatialReference,c=l.wkid;if(e.geometry&&(x(l)||F(l))){const t=y(g(),h);for(const r of v(e.geometry))_(t,r);u.setOutSpatialReference(c),u.setExtent({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]})}e.where&&await this._setWhereClause(u,s,o.id,e.where);const p=await s.executeQuery(u),d=[],f=p.next(t);for(let e=0;e<L;e++)d.push(p.next(t));let m=await f;for(;null!=m;){n(t);const e=new J(this._metadata,this._indexMap,m,o.id),r=me([new V(e,null,0,!1)],this._queryEngineParams),s=d.shift();d.push(p.next(t)),yield r,m=await s}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){if(e.objectIds?.length){const r=new Map;for(const t of e.objectIds){const e=T(t),s=P(t);let i=r.get(e);i||(i=[],r.set(e,i)),i.push(s)}const s=[];for(const[i,a]of r.entries()){const r=await this._executeFileIdQuery(e,i,a,t);for(const e of r)s.push(e)}return new b(s,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:Z,featureIdInfo:this._queryEngineParams.featureIdInfo})}let r=e.resultRecordCount??await this._getFeatureCount(),i=e.resultOffset??0;if(r>$)throw new s("parquet:cannot-execute-query","Unable to execute query, dataset is too large.");const a={...e};e.where=void 0,e.resultRecordCount=void 0,e.resultOffset=void 0;const n=[];for await(const s of this._queryChunks(a,t)){const a=await s.executeQueryForOpaqueFeatures(e,t);if(a.length>i){const t=a.slice(i,Math.min(i+r,a.length));for(const e of t)n.push(e);if(i=0,r-=t.length,0===r)return new b(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:Z,featureIdInfo:this._queryEngineParams.featureIdInfo})}else i-=a.length}return new b(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:Z,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(e,t,r,s){const i=await this._getRequiredFields(e),a=(await D()).Query.new();a.setOutFields(i),a.setReturnGeometry(!!e.returnGeometry),a.setIds(new Uint32Array(r));const n=await this._getFile(t),o=await n.executeQuery(a,s);let u=await o.next(s),l=0;const c=[];for(;null!=u;){const e=new J(this._metadata,this._indexMap,u,t),r=new V(e,null,l++,!1);c.push(r),u=await o.next(s)}return me(c,this._queryEngineParams).executeQueryForOpaqueFeatures(e,s)}async _getRequiredFields(e){const t=new Set;if(e.outStatistics)for(const r of e.outStatistics)null!=r.onStatisticField&&t.add(r.onStatisticField);else if(e.outFields)for(const r of e.outFields)t.add(r);return(t.has("*")?this._fieldsIndex.fields.map(e=>e.name):Array.from(t)).filter(e=>null!=this._indexMap[e])}_tryGetGeneralizedGeometryScale(e){if(!this._displayOptimization)return null;const t=e.outSR??this._queryEngineParams.spatialReference;if(!x(t)&&!F(t))return null;const r=e.quantizationParameters?.tolerance??e.maxAllowableOffset;return r?w(r,t):null}}function ne(e){for(const t in e){const r=t;switch(r){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"objectIds":case"historicMoment":case"where":return null!=e[r]}}return!1}function oe(e,t){return!!e.outStatistics?.length&&!ne(e)&&!e.groupByFieldsForStatistics?.length&&!e.orderByFields?.length&&!e.returnDistinctValues&&!e.returnAggIds&&e.outStatistics.every(e=>ue(e,t))}function ue(e,t){switch(e.statisticType){case"count":return"1"===e.onStatisticField||null!=t.get(e.onStatisticField);case"min":case"max":{const r=t.get(e.onStatisticField);return null!=r&&A(r)}default:return!1}}function le(e,t){const r="exceedslimit"!==e.statisticType?t.get(e.onStatisticField):null,s="min"!==e.statisticType&&"max"!==e.statisticType||"esriFieldTypeDate"!==r?.type?"esriFieldTypeDouble":r.type;return{name:e.outStatisticFieldName,alias:e.outStatisticFieldName,type:s}}function ce(e,t){switch(e.statisticType){case"count":return pe(e,t);case"min":return de(e,t,Math.min);case"max":return de(e,t,Math.max);default:return{available:!1,value:null}}}function pe(e,t){if("count"!==e.statisticType)return{available:!1,value:null};if("1"===e.onStatisticField)return{available:!0,value:t.reduce((e,t)=>e+t.statistics.rowCount,0)};let r=0;for(const s of t){const t=s.statistics.statistics.get(e.onStatisticField);if(null==t||null==t.nullCount)return{available:!1,value:null};r+=s.statistics.rowCount-t.nullCount}return{available:!0,value:r}}function de(e,t,r){if("min"!==e.statisticType&&"max"!==e.statisticType)return{available:!1,value:null};let s=null;const i="min"===e.statisticType?"minValue":"maxValue";for(const a of t){const t=a.statistics.statistics.get(e.onStatisticField);if(null==t)return{available:!1,value:null};const n=fe(t[i]);null!=n&&(s=null==s?n:r(s,n))}return{available:!0,value:s}}function fe(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function me(e,t){const r=new U;for(const s of e)r.insert(s);return new q({...t,featureStore:r})}function ye(e,t){return e.statistics.statistics.get(t.fieldName)??null}function he(e,t){return e.slice().sort((e,r)=>{const s=ge(e,t),i=ge(r,t);return s===i?0:s<i?-1:1})}function ge(e,t){const r=ye(e,t);if(null==r)return Number.POSITIVE_INFINITY;const s=Fe(r.minValue),i=Fe(r.maxValue);return null==s||null==i||i<s?Number.POSITIVE_INFINITY:i-s}function _e(e,t){return{xStatistics:e.statistics.statistics.get(t.xFieldName)??null,yStatistics:e.statistics.statistics.get(t.yFieldName)??null}}function we(e,t){const r=Fe(e.minValue),s=Fe(e.maxValue);return null==r||null==s||t.intersects(r,s)}function xe(e,t,r){const s=Fe(e.minValue),i=Fe(e.maxValue),a=Fe(t.minValue),n=Fe(t.maxValue);return null==s||null==i||null==a||null==n||r.intersects(s,i,a,n)}function Fe(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function Se(e){const t=e?.featureCount;let r=!1;return null!=t&&t<has("parquetlayer-full-query-feature-count")&&(r=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...R,maxRecordCount:X,supportsOrderBy:r,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}function Ie(e){return!!(e.objectIds?.length||e.outStatistics||e.orderByFields?.length||e.returnDistinctValues)}export{ae as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transpose as n}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{sub as o,add as a}from"../../../core/libs/gl-matrix-2/math/vec3.js";import i from"../../../geometry/Circle.js";import s from"../../../geometry/Mesh.js";import c from"../../../geometry/Multipoint.js";import f from"../../../geometry/Polygon.js";import{projectAsync as l}from"../../../geometry/projectionUtils.js";import m from"../../../geometry/SpatialReference.js";import{polygonCentroidPoint as u}from"../../../geometry/support/centroid.js";import{earth as p}from"../../../geometry/support/Ellipsoid.js";import h from"../../../geometry/support/MeshComponent.js";import{createSphere as y}from"../../../geometry/support/meshUtils.js";import g from"../../../geometry/support/MeshVertexAttributes.js";import{create as x,fromArray as d,intersectRay as w}from"../../../geometry/support/plane.js";import{isWebMercator as M}from"../../../geometry/support/spatialReferenceUtils.js";import{computeHFOVAndVFOV as R,convertToSRUnits as j,scaleWithFactor as v,scaleAndAddWithFactor as P,projectiveTransform as b,getWebMercatorScalingFactor as D,createRotationMatrixFromHPR as A,transformMat3 as I}from"../transformations/utils.js";const z=Math.PI/180;function V(e){const t=j(e,e.geometry.spatialReference);return e.isSpherical?S(t):F(t)}function F(e){const{horizontalFieldOfView:t,verticalFieldOfView:r,geometry:n,cameraHeading:o}=e,a=D(n.y,n.spatialReference);let i=e.cameraPitch,s=e.cameraRoll??0,c=150;t>150&&(i=90,s=0,c=5);const l=Math.ceil(t/c),m=H(l,o,t);let u=e.farDistance?e.farDistance*a:e.cameraHeight*a/Math.cos(i*z);e.cameraPitch+r/2>=90&&(u=(e.farDistance||20)*a);const p=new f({spatialReference:n?.spatialReference});p.imageID=e.objectId;let h=null;for(const f of m)h=O(f,i,e.cameraHeight,n,u,a,r,t,l,p,s,e.nearDistance);return h.imageID=e.objectId,{polygon:p,frustum:h}}function H(e,t,r){const n=[];if(e%2==0)for(let o=0;o<e/2;o++)n.push(t-r/e*(o+.5),t+r/e*(o+.5));else{n.push(t);for(let o=1;o<e/2;o++)n.push(t-r/e*o,t+r/e*o)}return n.sort(),n}function O(e,i,s,c,f,l,m,u,p,h,y=0,g=0){const x=n(t(),A([e,i,y??0])),d=E({cameraHeight:s,cameraPitch:i,farDistance:f,location:c,horizontalFieldOfView:u,nearDistance:g,verticalFieldOfView:m},x),w=I([0,0,-1],x),{x:M,y:R}=c,j=P([M,R,s],w,f,l),b=2*Math.tan(m*z/2)*f,D=2*Math.tan(u/p*z/2)*f,V=I([0,1,0],x),F=I([1,0,0],x),H=v(V,b/2,l),O=v(F,D/2,l),S=o(r(),H,O),U=a(r(),H,O),C=q([a(r(),j,S),a(r(),j,U),o(r(),j,S),o(r(),j,U)],s,c,l);return C.push(C[0]),h.addRing(C),d}function q(e,t,r,n){return e.map(e=>k(e,t,r,n))}function S(e){const{geometry:t,farDistance:r,objectId:n,nearDistance:o,cameraHeight:a}=e,s=D(t.y,t.spatialReference),c=new i({center:t.clone(),radius:r*s});if(c.imageID=n,o){const e=new i({center:t.clone(),radius:o*s});c.addRing(e.rings[0])}const f=t.clone();f.z=a-r*s;const l=y(f,{size:2*r*s});return l.imageID=n,{polygon:c,frustum:l}}function U(e,t){return e.contains(t)}function C(e,t){return Math.sign(e)!==Math.sign(t)}function E(e,t,n){const{cameraHeight:i,cameraPitch:c,farDistance:f,location:l,horizontalFieldOfView:m,nearDistance:u,verticalFieldOfView:p}=e,h=W(l),y=c+p/2>=90==!1,x=2*Math.tan(p*z/2)*u,d=2*Math.tan(m*z/2)*u,w=2*Math.tan(p*z/2)*f,M=2*Math.tan(m*z/2)*f;let R,j;j=[0,0,-1],j=I(j,t),R=P([l.x,l.y,i],j,f,h),y&&(R[2]=0);const b=P([l.x,l.y,i],j,u,h);let D=[0,1,0];D=I(D,t);let A=[1,0,0];A=I(A,t);let V=[],F=[];u?(F=[{faces:[4,0,3,4,7,3]},{faces:[5,1,2,5,6,2]},{faces:[4,0,1,4,5,1]},{faces:[6,2,3,6,7,3]}],V=V.concat(a(r(),b,o(r(),v(D,x/2,h),v(A,d/2,h)))),V=V.concat(a(r(),b,a(r(),v(D,x/2,h),v(A,d/2,h)))),V=V.concat(o(r(),b,o(r(),v(D,x/2,h),v(A,d/2,h)))),V=V.concat(o(r(),b,a(r(),v(D,x/2,h),v(A,d/2,h))))):(V=[l.x,l.y,i],F=[{faces:[0,1,2,0,2,3,0,3,4,0,4,1]}]),V=V.concat(a(r(),R,o(r(),v(D,w/2,h),v(A,M/2,h)))),V=V.concat(a(r(),R,a(r(),v(D,w/2,h),v(A,M/2,h)))),V=V.concat(o(r(),R,o(r(),v(D,w/2,h),v(A,M/2,h)))),V=V.concat(o(r(),R,a(r(),v(D,w/2,h),v(A,M/2,h))));const H=new g({position:Float64Array.from(V)});return new s({vertexAttributes:H,components:F,spatialReference:l.spatialReference})}function k(e,t,n,a){{const i=Math.sqrt((e[2]-t)**2+(Math.sqrt((e[0]-n.x)**2+(e[1]-n.y)**2)/a)**2)*a,s=v(o(r(),[e[0],e[1],e[2]],[n.x,n.y,t]),1/i,1/a),c=t/(t-e[2]),f={x:(1-c)*n.x+c*e[0],y:(1-c)*n.y+c*e[1],z:(1-c)*t+c*e[2]},l=Math.sqrt((f.z-t)**2+(Math.sqrt((f.x-n.x)**2+(f.y-n.y)**2)/a)**2)*a,m=v(o(r(),[f.x,f.y,f.z],[n.x,n.y,t]),1/l,1/a);return C(s[0],m[0])&&C(s[1],m[1])&&C(s[2],m[2])||e[2]>=0?[e[0],e[1],0]:[f.x,f.y,f.z]}}function L(e){const{spatialReference:t,x:r,y:n}=e.geometry,{cameraHeading:o,cameraPitch:a,farDistance:i,nearDistance:s}=e,c=W(e.geometry),l=new f({spatialReference:t}),m=Math.abs(1.44*i*c);let u=Math.abs(1.44*s*c);(a<20||null==o)&&(u=m);const p=[];return p[0]={x:r+m*Math.sin((o-45)*z),y:n+m*Math.cos((o-45)*z)},p[1]={x:r+m*Math.sin((o+45)*z),y:n+m*Math.cos((o+45)*z)},p[2]={x:r+u*Math.sin((o+135)*z),y:n+u*Math.cos((o+135)*z)},p[3]={x:r+u*Math.sin((o+225)*z),y:n+u*Math.cos((o+225)*z)},l.addRing([[p[0].x,p[0].y,0],[p[1].x,p[1].y,0],[p[2].x,p[2].y,0],[p[3].x,p[3].y,0],[p[0].x,p[0].y,0]]),l}function W(e){return e&&M(e?.spatialReference)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*e.y/p.radius))):1}function B(e,t){const n=1+t/100;if("esri.geometry.Circle"===e.declaredClass){const{radius:t,center:r}=e,o=new i({radius:t*n,center:r});return e.rings.length>1&&o.addRing(e.rings[1]),o}if("esri.geometry.Polygon"===e.declaredClass){const t=new f({spatialReference:e.spatialReference}),a=u(e);if(a){const i=[];for(let t=0;t<e.rings[0].length;t++){const s=Math.sqrt((a.x-e.rings[0][t][0])**2+(a.y-e.rings[0][t][1])**2),c=v(o(r(),[e.rings[0][t][0],e.rings[0][t][1],0],[a.x,a.y,0]),1/s,1),f=P([a.x,a.y,0],c,s*n,1);i.push({x:f[0],y:f[1]})}t.addRing([[i[0].x,i[0].y,0],[i[1].x,i[1].y,0],[i[2].x,i[2].y,0],[i[3].x,i[3].y,0],[i[0].x,i[0].y,0]])}return t}return e}async function G(e,t,r){const{cameraHeight:n,cameraLocation:o,cameraPitch:a,frustumVertices:i,horizontalFieldOfView:s,imageHeight:c,imageWidth:f,inSRS:l,outSRS:u,verticalFieldOfView:p,cameraRoll:h,options:y}=r,g=new m(l),x=new m(u),d=R(s,p,h??0),w=i.length>15;return a+d.vfov/2>=90?await T(i,e,f,c,g,x,w,y):await J(i,e,t,o,n,w,g,x,y)}async function J(e,t,r,n,o,a,i,c,f){const l=K(e,t,r,n,o);if(!l)return;const{farPlane:m,nearPlane:u}=l,p=await X([...u?.vertexPositions??e.slice(0,3),...m.vertexPositions],i,c,f),h=ee(p);return new s({vertexAttributes:new g({position:p}),components:_(a?Z(h,!0):$(h,!0)),spatialReference:c})}function K(e,t,r,n,o){const a=Y(e),i=Y(e,"near");if(!a)return;const s=t.length;for(let c=0;c<s;c++){const e=Array.from(r[c]),t=[e[0]-n[0],e[1]-n[1],e[2]-(n[2]??o)];Q(n,t,c,i),N(n,t,c,a)}return{farPlane:a,nearPlane:i}}function N(e,t,n,o){const{coefficients:a,vertexPositions:i}=o,s=r();w(a,{origin:e,direction:t},s)&&i.splice(3*n,3,...s)}function Q(e,t,n,o){if(!o)return;const a=r();w(o.coefficients,{origin:e,direction:t},a)&&o.vertexPositions.splice(3*n,3,...a)}async function T(e,t,r,n,o,a,i,c){let f,l=i?new Array:[e[0],e[1],e[2]],m=new Array;for(const s of t)i?(f=b([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[0],e[1],e[2]],[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]]]),l=l.concat(...f),f=b([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[12],e[13],e[14]],[e[15],e[16],e[17]],[e[18],e[19],e[20]],[e[21],e[22],e[23]]]),m=m.concat(...f)):(f=b([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]],[e[12],e[13],e[14]]]),l=l.concat(...f));l=l.concat(m);const u=await X(l,o,a,c),p=ee(u);return new s({vertexAttributes:new g({position:u}),components:_(i?Z(p,!0):$(p,!0)),spatialReference:a})}async function X(t,r,n,o){if(r.equals(n))return t;const a=t.reduce((e,t,r)=>{const n=Math.floor(r/3);return e[n]||(e[n]=new Array),e[n].push(t),e},new Array),{points:i}=await l(new c({points:a,spatialReference:r}),n,o);return e(o),i.flat()}function Y(e,t="far"){const r=x();let n;switch(t){case"far":if(n=Array.from(15===e.length?e.slice(3):e.slice(12)),d(r,n,!1))return{coefficients:r,vertexPositions:n};break;case"near":if(n=Array.from(e.slice(0,12)),15===e.length||!d(r,n,!1))return;return{coefficients:r,vertexPositions:n}}}const Z=(e,t=!1)=>{if(t&&e-2<=4||e<=4||e%2!=0)throw new Error("Invalid number of vertices");const r=[],n=e/2,o=Math.round((t?e-2:e)/2);for(let a=0;a<o;a++){const o=a+n,i=t?o+1:o,s=i%e,c=(t?o:i+1)%e;r.push({faces:new Uint32Array([a,c,s,a,a+1,s])})}return r};function $(e,t=!1){if(e<3||t&&e-1<3)throw new Error("Invalid number of vertices");const r=[],n=t?e-2:e-1;for(let o=0;o<n;o++)r.push({faces:new Uint32Array([0,o+1,o+2])});return r}const _=e=>e.map(e=>new h(e)),ee=e=>e.length/3;export{U as checkIfPolygonContainsSelectedPoint,L as computePolygonForInspection,V as createCoveragePolygon,q as limitZToGround,X as projectVertices,B as resizePolygon,G as updateFrustum};
2
+ import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transpose as n}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{sub as o,add as a}from"../../../core/libs/gl-matrix-2/math/vec3.js";import i from"../../../geometry/Circle.js";import s from"../../../geometry/Mesh.js";import c from"../../../geometry/Multipoint.js";import f from"../../../geometry/Polygon.js";import{projectAsync as l}from"../../../geometry/projectionUtils.js";import m from"../../../geometry/SpatialReference.js";import{polygonCentroidPoint as u}from"../../../geometry/support/centroid.js";import{earth as p}from"../../../geometry/support/Ellipsoid.js";import h from"../../../geometry/support/MeshComponent.js";import{createSphere as y}from"../../../geometry/support/meshUtils.js";import g from"../../../geometry/support/MeshVertexAttributes.js";import{create as x,fromArray as d,intersectRay as w}from"../../../geometry/support/plane.js";import{isWebMercator as M}from"../../../geometry/support/spatialReferenceUtils.js";import{convertToSRUnits as R,getWebMercatorScalingFactor as j,createRotationMatrixFromHPR as v,transformMat3 as P,scaleAndAddWithFactor as b,scaleWithFactor as D,computeHFOVAndVFOV as A,projectiveTransform as I}from"../transformations/utils.js";const z=Math.PI/180;function V(e){const t=R(e,e.geometry.spatialReference);return e.isSpherical?S(t):F(t)}function F(e){const{horizontalFieldOfView:t,verticalFieldOfView:r,geometry:n,cameraHeading:o}=e,a=j(n.y,n.spatialReference);let i=e.cameraPitch,s=e.cameraRoll??0,c=150;t>150&&(i=90,s=0,c=5);const l=Math.ceil(t/c),m=H(l,o,t);let u=e.farDistance?e.farDistance*a:e.cameraHeight*a/Math.cos(i*z);e.cameraPitch+r/2>=90&&(u=(e.farDistance||20)*a);const p=new f({spatialReference:n?.spatialReference});p.imageID=e.objectId;let h=null;for(const f of m)h=O(f,i,e.cameraHeight,n,u,a,r,t,l,p,s,e.nearDistance);return h.imageID=e.objectId,{polygon:p,frustum:h}}function H(e,t,r){const n=[];if(e%2==0)for(let o=0;o<e/2;o++)n.push(t-r/e*(o+.5),t+r/e*(o+.5));else{n.push(t);for(let o=1;o<e/2;o++)n.push(t-r/e*o,t+r/e*o)}return n.sort(),n}function O(e,i,s,c,f,l,m,u,p,h,y=0,g=0){const x=n(t(),v([e,i,y??0])),d=E({cameraHeight:s,cameraPitch:i,farDistance:f,location:c,horizontalFieldOfView:u,nearDistance:g,verticalFieldOfView:m},x),w=P([0,0,-1],x),{x:M,y:R}=c,j=b([M,R,s],w,f,l),A=2*Math.tan(m*z/2)*f,I=2*Math.tan(u/p*z/2)*f,V=P([0,1,0],x),F=P([1,0,0],x),H=D(V,A/2,l),O=D(F,I/2,l),S=o(r(),H,O),U=a(r(),H,O),C=q([a(r(),j,S),a(r(),j,U),o(r(),j,S),o(r(),j,U)],s,c,l);return C.push(C[0]),h.addRing(C),d}function q(e,t,r,n){return e.map(e=>k(e,t,r,n))}function S(e){const{geometry:t,farDistance:r,objectId:n,nearDistance:o,cameraHeight:a}=e,s=j(t.y,t.spatialReference),c=new i({center:t.clone(),radius:r*s});if(c.imageID=n,o){const e=new i({center:t.clone(),radius:o*s});c.addRing(e.rings[0])}const f=t.clone();f.z=a-r*s;const l=y(f,{size:2*r*s});return l.imageID=n,{polygon:c,frustum:l}}function U(e,t){return e.contains(t)}function C(e,t){return Math.sign(e)!==Math.sign(t)}function E(e,t,n){const{cameraHeight:i,cameraPitch:c,farDistance:f,location:l,horizontalFieldOfView:m,nearDistance:u,verticalFieldOfView:p}=e,h=W(l),y=c+p/2>=90==!1,x=2*Math.tan(p*z/2)*u,d=2*Math.tan(m*z/2)*u,w=2*Math.tan(p*z/2)*f,M=2*Math.tan(m*z/2)*f;let R,j;j=[0,0,-1],j=P(j,t),R=b([l.x,l.y,i],j,f,h),y&&(R[2]=0);const v=b([l.x,l.y,i],j,u,h);let A=[0,1,0];A=P(A,t);let I=[1,0,0];I=P(I,t);let V=[],F=[];u?(F=[{faces:[4,0,3,4,7,3]},{faces:[5,1,2,5,6,2]},{faces:[4,0,1,4,5,1]},{faces:[6,2,3,6,7,3]}],V=V.concat(a(r(),v,o(r(),D(A,x/2,h),D(I,d/2,h)))),V=V.concat(a(r(),v,a(r(),D(A,x/2,h),D(I,d/2,h)))),V=V.concat(o(r(),v,o(r(),D(A,x/2,h),D(I,d/2,h)))),V=V.concat(o(r(),v,a(r(),D(A,x/2,h),D(I,d/2,h))))):(V=[l.x,l.y,i],F=[{faces:[0,1,2,0,2,3,0,3,4,0,4,1]}]),V=V.concat(a(r(),R,o(r(),D(A,w/2,h),D(I,M/2,h)))),V=V.concat(a(r(),R,a(r(),D(A,w/2,h),D(I,M/2,h)))),V=V.concat(o(r(),R,o(r(),D(A,w/2,h),D(I,M/2,h)))),V=V.concat(o(r(),R,a(r(),D(A,w/2,h),D(I,M/2,h))));const H=new g({position:Float64Array.from(V)});return new s({vertexAttributes:H,components:F,spatialReference:l.spatialReference})}function k(e,t,n,a){{const i=Math.sqrt((e[2]-t)**2+(Math.sqrt((e[0]-n.x)**2+(e[1]-n.y)**2)/a)**2)*a,s=D(o(r(),[e[0],e[1],e[2]],[n.x,n.y,t]),1/i,1/a),c=t/(t-e[2]),f={x:(1-c)*n.x+c*e[0],y:(1-c)*n.y+c*e[1],z:(1-c)*t+c*e[2]},l=Math.sqrt((f.z-t)**2+(Math.sqrt((f.x-n.x)**2+(f.y-n.y)**2)/a)**2)*a,m=D(o(r(),[f.x,f.y,f.z],[n.x,n.y,t]),1/l,1/a);return C(s[0],m[0])&&C(s[1],m[1])&&C(s[2],m[2])||e[2]>=0?[e[0],e[1],0]:[f.x,f.y,f.z]}}function L(e){const{spatialReference:t,x:r,y:n}=e.geometry,{cameraHeading:o,cameraPitch:a,farDistance:i,nearDistance:s}=e,c=W(e.geometry),l=new f({spatialReference:t}),m=Math.abs(1.44*i*c);let u=Math.abs(1.44*s*c);(a<20||null==o)&&(u=m);const p=[];return p[0]={x:r+m*Math.sin((o-45)*z),y:n+m*Math.cos((o-45)*z)},p[1]={x:r+m*Math.sin((o+45)*z),y:n+m*Math.cos((o+45)*z)},p[2]={x:r+u*Math.sin((o+135)*z),y:n+u*Math.cos((o+135)*z)},p[3]={x:r+u*Math.sin((o+225)*z),y:n+u*Math.cos((o+225)*z)},l.addRing([[p[0].x,p[0].y,0],[p[1].x,p[1].y,0],[p[2].x,p[2].y,0],[p[3].x,p[3].y,0],[p[0].x,p[0].y,0]]),l}function W(e){return e&&M(e?.spatialReference)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*e.y/p.radius))):1}function B(e,t){const n=1+t/100;if("esri.geometry.Circle"===e.declaredClass){const{radius:t,center:r}=e,o=new i({radius:t*n,center:r});return e.rings.length>1&&o.addRing(e.rings[1]),o}if("esri.geometry.Polygon"===e.declaredClass){const t=new f({spatialReference:e.spatialReference}),a=u(e);if(a){const i=[];for(let t=0;t<e.rings[0].length;t++){const s=Math.sqrt((a.x-e.rings[0][t][0])**2+(a.y-e.rings[0][t][1])**2),c=D(o(r(),[e.rings[0][t][0],e.rings[0][t][1],0],[a.x,a.y,0]),1/s,1),f=b([a.x,a.y,0],c,s*n,1);i.push({x:f[0],y:f[1]})}t.addRing([[i[0].x,i[0].y,0],[i[1].x,i[1].y,0],[i[2].x,i[2].y,0],[i[3].x,i[3].y,0],[i[0].x,i[0].y,0]])}return t}return e}async function G(e,t,r){const{cameraHeight:n,cameraLocation:o,cameraPitch:a,frustumVertices:i,horizontalFieldOfView:s,imageHeight:c,imageWidth:f,inSRS:l,outSRS:u,verticalFieldOfView:p,cameraRoll:h,options:y}=r,g=new m(l),x=new m(u),d=A(s,p,h??0),w=i.length>15;return a+d.vfov/2>=90?await T(i,e,f,c,g,x,w,y):await J(i,e,t,o,n,w,g,x,y)}async function J(e,t,r,n,o,a,i,c,f){const l=K(e,t,r,n,o);if(!l)return;const{farPlane:m,nearPlane:u}=l,p=await X([...u?.vertexPositions??e.slice(0,3),...m.vertexPositions],i,c,f),h=ee(p);return new s({vertexAttributes:new g({position:p}),components:_(a?Z(h,!0):$(h,!0)),spatialReference:c})}function K(e,t,r,n,o){const a=Y(e),i=Y(e,"near");if(!a)return;const s=t.length;for(let c=0;c<s;c++){const e=Array.from(r[c]),t=[e[0]-n[0],e[1]-n[1],e[2]-(n[2]??o)];Q(n,t,c,i),N(n,t,c,a)}return{farPlane:a,nearPlane:i}}function N(e,t,n,o){const{coefficients:a,vertexPositions:i}=o,s=r();w(a,{origin:e,direction:t},s)&&i.splice(3*n,3,...s)}function Q(e,t,n,o){if(!o)return;const a=r();w(o.coefficients,{origin:e,direction:t},a)&&o.vertexPositions.splice(3*n,3,...a)}async function T(e,t,r,n,o,a,i,c){let f,l=i?new Array:[e[0],e[1],e[2]],m=new Array;for(const s of t)i?(f=I([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[0],e[1],e[2]],[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]]]),l=l.concat(...f),f=I([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[12],e[13],e[14]],[e[15],e[16],e[17]],[e[18],e[19],e[20]],[e[21],e[22],e[23]]]),m=m.concat(...f)):(f=I([s[0],s[1],1],[[0,0,1],[r,0,1],[r,n,1],[0,n,1]],[[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]],[e[12],e[13],e[14]]]),l=l.concat(...f));l=l.concat(m);const u=await X(l,o,a,c),p=ee(u);return new s({vertexAttributes:new g({position:u}),components:_(i?Z(p,!0):$(p,!0)),spatialReference:a})}async function X(t,r,n,o){if(r.equals(n))return t;const a=t.reduce((e,t,r)=>{const n=Math.floor(r/3);return e[n]||(e[n]=new Array),e[n].push(t),e},new Array),{points:i}=await l(new c({points:a,spatialReference:r}),n,o);return e(o),i.flat()}function Y(e,t="far"){const r=x();let n;switch(t){case"far":if(n=Array.from(15===e.length?e.slice(3):e.slice(12)),d(r,n,!1))return{coefficients:r,vertexPositions:n};break;case"near":if(n=Array.from(e.slice(0,12)),15===e.length||!d(r,n,!1))return;return{coefficients:r,vertexPositions:n}}}const Z=(e,t=!1)=>{if(t&&e-2<=4||e<=4||e%2!=0)throw new Error("Invalid number of vertices");const r=[],n=e/2,o=Math.round((t?e-2:e)/2);for(let a=0;a<o;a++){const o=a+n,i=t?o+1:o,s=i%e,c=(t?o:i+1)%e;r.push({faces:new Uint32Array([a,c,s,a,a+1,s])})}return r};function $(e,t=!1){if(e<3||t&&e-1<3)throw new Error("Invalid number of vertices");const r=[],n=t?e-2:e-1;for(let o=0;o<n;o++)r.push({faces:new Uint32Array([0,o+1,o+2])});return r}const _=e=>e.map(e=>new h(e)),ee=e=>e.length/3;export{U as checkIfPolygonContainsSelectedPoint,L as computePolygonForInspection,V as createCoveragePolygon,q as limitZToGround,X as projectVertices,B as resizePolygon,G as updateFrustum};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import t from"../../../core/Error.js";import{rad2deg as n,deg2rad as a}from"../../../core/mathUtils.js";import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as i,fromValues as o}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as r,zeros as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as s}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{transpose as l,multiply as f}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{invertOrIdentity as u,mul as h}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{scale as m,sub as p,add as g}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{isSerializable as v}from"../../../core/support/jsonUtils.js";import M from"../../../geometry/Point.js";import{projectAsync as d}from"../../../geometry/projectionUtils.js";import{earth as x}from"../../../geometry/support/Ellipsoid.js";import{isWebMercator as w}from"../../../geometry/support/spatialReferenceUtils.js";import{t as y}from"../../../chunks/vec3.js";import{ConstantElevation as b,isConstantElevation as j,isElevationSource as O}from"../core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as z}from"../core/utils.js";import{getElevationSampler as P}from"./updateElevationUtils.js";import{isNumber as R}from"../../../support/guards.js";import{defaultImageSphereSize as F}from"../../../widgets/PanoramicViewer/constants.js";function E(t,n,a){const[e,o,r,c]=n,[s,l,f,m]=a;S(e,o,r,c);const p=S(s,l,f,m),g=H(e,o,r,c),v=H(s,l,f,m),M=u(i(),g),d=h(i(),M,v),[x,w,y,b]=D(t,d);return[x/b,w/b,p?0:y/b]}function S(t,n,a,e){return 0===t[2]&&0===n[2]&&0===a[2]&&0===e[2]&&(t[2]=n[2]=a[2]=e[2]=1,!0)}function V(t){return 0===t?1:t}function D(t,n){const[a,e,i]=t,o=[0,0,0,0];return o[0]=a*n[0]+e*n[1]+i*n[2]+n[3],o[1]=a*n[4]+e*n[5]+i*n[6]+n[7],o[2]=a*n[8]+e*n[9]+i*n[10]+n[11],o[3]=V(a*n[12]+e*n[13]+i*n[14]+n[15]),o}function H(t,n,a,e){const r=I(s([...e,1]),u(new Array(16),o(t[0],n[0],a[0],0,t[1],n[1],a[1],0,t[2],n[2],a[2],0,1,1,1,1))),c=r[0],l=r[1],f=r[2],h=i();return h[0]=c*t[0],h[1]=l*n[0],h[2]=f*a[0],h[3]=0,h[4]=c*t[1],h[5]=l*n[1],h[6]=f*a[1],h[7]=0,h[8]=c*t[2],h[9]=l*n[2],h[10]=f*a[2],h[11]=0,h[12]=c,h[13]=l,h[14]=f,h[15]=1,h}function L(t,n,a,e,i=c()){return i[0]=t[0]+n[0]*a,i[1]=t[1]+n[1]*a,i[2]=t[2]+n[2]*(a/e),i}function N(t,n,a){const e=c();return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*(n/a),e}function A(t,n){const[a,e,i]=t,o=c();return o[0]=a*n[0]+e*n[3]+i*n[6],o[1]=a*n[1]+e*n[4]+i*n[7],o[2]=a*n[2]+e*n[5]+i*n[8],o}function I(t,n){const[a,e,i,o]=t,r=new Array(4);return r[0]=a*n[0]+e*n[1]+i*n[2]+o*n[3],r[1]=a*n[4]+e*n[5]+i*n[6]+o*n[7],r[2]=a*n[8]+e*n[9]+i*n[10]+o*n[11],r[3]=a*n[12]+e*n[13]+i*n[14]+o*n[15],r}function Y(n,i,o,r=!0){if(!Number.isFinite(n))throw new t("InvalidRotationAngle","Please specify a valid angle for rotation");const c=o*(r?a(n):n),s=Math.cos(c),l=Math.sin(c),f=e();switch(i){case 0:f[4]=s,f[5]=-l,f[7]=l,f[8]=s;break;case 1:f[0]=s,f[2]=l,f[6]=-l,f[8]=s;break;case 2:f[0]=s,f[1]=-l,f[3]=l,f[4]=s;break;default:throw new t("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return f}const k={HPR:[[2,-1],[0,1],[2,-1]],OPK:[[0,1],[1,1],[2,1]],YPR:[[0,-1],[1,-1],[2,-1]]};function q(n,a,i=!0){if(3!==n?.length||3!==a?.length)throw new t("InvalidRotationAngles","Please specify three angles with config for rotation");const o=e();for(let t=0;t<3;t++){const[e,r]=a[t],c=Y(n[t],e,r,i);f(o,c,o)}return o}function U(t,n=!0){return q(t,k.OPK,n)}function C(t,n=!0){return q(t,k.HPR,n)}function K(t,n,e){const i=Math.sin(a(e)),o=Math.cos(a(e)),r=[[t,0],[t,n],[0,n]];r.forEach((t,n)=>{r[n]=[o*t[0]-i*t[1],i*t[0]+o*t[1]]});const c={xmin:Math.min(0,r[0][0],r[1][0],r[2][0]),xmax:Math.max(0,r[0][0],r[1][0],r[2][0]),ymin:Math.min(0,r[0][1],r[1][1],r[2][1]),ymax:Math.max(0,r[0][1],r[1][1],r[2][1])};return{hfov:Math.abs(c.xmax-c.xmin),vfov:Math.abs(c.ymax-c.ymin)}}function T(t,e){const i=Number(t[0]),o=Number(t[1]),r=Number(t[2]),[c,s,l,f]=e,u=a(c),h=a(s),m=l/Math.sqrt(1-f*Math.sin(u)**2),p=i/m,g=o/m,v=r/m,M=Math.cos(u)-Math.sin(u)*g+Math.cos(u)*v,d=Math.sin(u)+Math.cos(u)*g+Math.sin(u)*v,x=Math.sqrt(M**2+p**2),w=f*m*Math.sin(u),y=(t,n=5)=>{if(0===n)return t;const a=y(t,n-1);return Math.atan(d/x-(w-f*(l/Math.sqrt(1-f*Math.sin(a)**2))*Math.sin(a))/(m*x))},b=y(u),j=Math.atan(i/(m*M))+h,O=n(b);return[n(j),O,i/(Math.cos(b)*Math.sin(j-h))-l/Math.sqrt(1-f*Math.sin(b)**2)]}function W(t,n,a){const e=360/n,i=180/a;return{heading:(t.x-n/2)*e,pitch:90-(t.y-a/2)*i}}function X(t,n,a,e,i=F/2){const{heading:o,pitch:r}=G(t,i),c=e?Rt(o,r,e):[o,r];return{heading:o,pitch:r,...Z(c[0],c[1],n,a)}}function Z(t,n,a,e){const i=t%360;return{x:a/2+(i<-180?i+360:i>180?i-360:i)/(360/a),y:e-n/(180/e)}}function G(t,a){const e=n(Math.acos(-t.z/a));return{heading:n(Math.atan2(t.x,t.y)),pitch:e}}function J(t,n){return[Math.sin(a(t))*Math.sin(a(n)),Math.cos(a(t))*Math.sin(a(n)),Math.cos(a(180-n))]}function $(t,n,a,e=F/2){const i=a?Rt(t,n,a,!0):[t,n];return m(r(),J(i[0],i[1]),e)}function B(t,n,a,e,i=F/2){const{heading:o,pitch:r}=W(t,n,a);return $(o,r,e,i)}async function Q(t,a,e){const i=await d(a,t.spatialReference,e);let o=n(Math.atan2(i.y-t.y,i.x-t.x));return o=o>=0&&o<=90?90-o:o>90&&o<=180?360-o+90:90+Math.abs(o),o}function _(t,n,a){const e=Math.cos(a),i=Math.sin(a),o=[1,0,0,1,0,0],r=o[0]*e+o[2]*i,c=o[1]*e+o[3]*i,s=-o[0]*i+o[2]*e,l=-o[1]*i+o[3]*e;o[0]=r,o[1]=c,o[2]=s,o[3]=l;return[t*o[0]+n*o[2]+o[4],t*o[1]+n*o[3]+o[5]]}const tt=t=>t.toArray(),nt=(...t)=>t.some(t=>t);function at(t,n){if(nt(0===t.length,t.some(({x:t,y:n})=>nt(null==t,null==n)),!n.hasZ))throw new Error("Input pixels must have x, y and camera location must have z value")}function et(t,n){if(t.some(t=>null==t.z)||null==n.z)throw new Error("Input points and camera location must have z value")}function it(t){if(9!==t?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix")}function ot(t,n){return w(n)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/x.radius))):1}const rt=t=>n=>new M({x:n[0],y:n[1],z:n[2],spatialReference:t}),ct=t=>null!=t&&"queryExtent"in t;function st(t,n,a,e){return[[-n,-n],[+n,-n],[+n,+n],[-n,+n]].map(([n,i])=>E(y(c(),a,[n,i,0]),e,t))}function lt({a0:t,a1:n,a2:a,b0:e,b1:i,b2:o},r,c,s){const l=[t??r/2-.5,n,a??0,e??c/2-.5,i??0,o].map(ft);return null!=s&&ut(l)?{affines:l,focalLength:s}:{affines:[r/2-.5,1,0,c/2-.5,0,-1]}}function ft(t,n){if(null==t)return null;const a=parseFloat(`${t}`);return isNaN(a)?null:a}function ut(t){return null!=t[1]&&null!=t[5]}function ht(t,n,a){const{cameraHeight:e,cameraPitch:i,cameraRoll:o,elevation:r,farDistance:c,horizontalFieldOfView:s,location:l,verticalFieldOfView:f}=zt(t,t.location.spatialReference),u=r??(l.z??0)-e;return{...gt(t,n,a),averageElevation:u,cameraPitch:i,cameraRoll:o??0,farDistance:c,horizontalFieldOfView:s,verticalFieldOfView:f}}function mt(t,n,a,e){return jt(e)?U([e.omega,e.phi,e.kappa]):Ot(e)?C([e.heading,e.pitch,e.roll]):C([t,n,a??0])}function pt(t,n,a){const{cameraHeading:e,cameraHeight:i,farDistance:o,horizontalFieldOfView:r,location:c,verticalFieldOfView:s}=zt(t,t.location.spatialReference),l=(c.z??0)-i;let f=-e,u=0,h=0;if(t?.matrix){const{matrix:n}=t;[u,h,f]=Pt(n)}return{averageElevation:l,cameraLocation:c,cameraHeading:e,farDistance:o,horizontalFieldOfView:r,imageHeight:a,imageWidth:n,verticalFieldOfView:s,horizonYaw:f,horizonPitch:u,horizonRoll:h}}function gt(t,n,a){const{a0:e,a1:i,a2:o,b0:r,b1:c,b2:s,cameraHeading:l,cameraOrientation:f,cameraPitch:u,cameraRoll:h,focalLength:m,horizontalFieldOfView:p,location:g,matrix:v,principalX:M,principalY:d,radial:x,tangential:w,verticalFieldOfView:y}=t,{affines:b,focalLength:j}=lt({a0:e,a1:i,a2:o,b0:r,b1:c,b2:s},n,a,m),O=v??mt(l,u,h,f),z=null!=M&&null!=d?[M,d]:void 0;return{affineTransformations:f?.affineTransformations??b,cameraLocation:g.clone(),focalLength:f?.focalLength??j,horizontalFieldOfView:p,imageHeight:a,imageWidth:n,principalOffsetPoint:f?.principalOffsetPoint??z,radialDistortionCoefficients:f?.radialDistortionCoefficients??x,rotationMatrix:O,tangentialDistortionCoefficients:f?.tangentialDistortionCoefficients??w,verticalFieldOfView:y}}const vt=t=>null!=t&&"elevationSample"in t&&null!=t.elevationSample,Mt=t=>O(t?.elevationSource)&&null!=t?.extent,dt=t=>j(t?.elevationSource),xt=async(t,n,a,e,i)=>{const o=z(t),r=n-a/o;return dt(e)?(e.elevationSource=new b({constantElevation:e.elevationSource.constantElevation/o}),e):vt(e)?e:Mt(e)?{elevationSample:await P({...v(e.elevationSource)?e.elevationSource.toJSON():e.elevationSource,extent:e.extent},i),elevationSource:new b({constantElevation:r})}:{averageGroundElevation:r,spatialReference:t}},wt=t=>R(t?.heading)&&R(t?.pitch),yt=(t,n)=>[[-t,-n],[t,-n],[t,n],[-t,n]];function bt(t){const{cameraLocation:n,farDistance:i,horizontalFieldOfView:o,rotationMatrix:r,scalingFactor:s,verticalFieldOfView:f}=t,u=e();l(u,r);const h=2*Math.tan(a(f)/2)*i*s,m=2*Math.tan(a(o)/2)*i*s,v=A([0,0,-1],u),M=L([n.x,n.y,n.z],v,t.farDistance*s,s),d=A([0,1,0],u),x=A([1,0,0],u),w=N(d,h/2,s),y=N(x,m/2,s),b=p(c(),w,y),j=g(c(),w,y);return[g(c(),M,b),g(c(),M,j),p(c(),M,b),p(c(),M,j)]}const jt=t=>2===t?.type,Ot=t=>1===t?.type;function zt(t,n,a=!0){const e=z(n),i=a?t.clone():t;return i.cameraHeight/=e,i.farDistance/=e,i.nearDistance/=e,j(i.elevationSource)&&(i.elevationSource.constantElevation/=e),i}function Pt(t){return[n(Math.asin(-t[6])),n(Math.atan(t[7]/t[8])),n(Math.atan2(t[3],t[0]))]}function Rt(t,n,a,e=!1){return Ft(J(t,n),a,e)}function Ft(t,a,i=!1){const o=i?l(e(),q(a,k.YPR)):q(a,k.YPR),r=t[0]*o[0]+t[1]*o[1]+t[2]*o[2],c=t[0]*o[3]+t[1]*o[4]+t[2]*o[5],s=t[0]*o[6]+t[1]*o[7]+t[2]*o[8],f=n(Math.acos(-s));return[n(Math.atan2(r,c)),f]}export{Rt as adjustHorizonAngles,Ft as adjustHorizonAnglesVec3,bt as computeFarplaneVertices,K as computeHFOVAndVFOV,st as computeNewReferenceCoordinates,$ as convertHeadingPitchToSphereVertex,Z as convertOrientationToPixelLocation,B as convertPixelLocationToSphereVertex,W as convertPixelToHeadingPitch,G as convertSphereVertexToOrientation,X as convertSphereVertexToPixelLocation,zt as convertToSRUnits,J as createMeshSpaceVector,q as createRotationMatrix,C as createRotationMatrixFromHPR,U as createRotationMatrixFromOPK,Pt as extractHorizonAngles,lt as getAffinesAndFocalLength,pt as getImageToWorldPanoramicProperties,ht as getImageToWorldProperties,Q as getInitialAngle,xt as getUpdateElevationProps,ot as getWebMercatorScalingFactor,gt as getWorldToImageProperties,wt as hasAngles,Ot as hasHeadingPitchRoll,jt as hasOmegaPhiKappa,ct as isElevationSampler,vt as isUpdateElevationWithElevationSampler,Mt as isUpdateElevationWithElevationSource,dt as isUpdateUsingConstantElevation,ut as isValidAffines,H as linearEquationSolve,T as ltpToGeographic,nt as or,tt as pointToArray,E as projectiveTransform,yt as reducerFn,_ as rotatePixel,L as scaleAndAddWithFactor,N as scaleWithFactor,A as transformMat3,I as transformMat4,at as validatePixelsToTransform,et as validatePointsToTransform,it as validateRotationMatrix,rt as vecToPoint};
2
+ import t from"../../../core/Error.js";import{rad2deg as n,deg2rad as a}from"../../../core/mathUtils.js";import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as i,fromValues as o}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{zeros as r,create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as s}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{transpose as l,multiply as f}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{invertOrIdentity as u,mul as h}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{scale as m,sub as p,add as g}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{isSerializable as v}from"../../../core/support/jsonUtils.js";import M from"../../../geometry/Point.js";import{projectAsync as d}from"../../../geometry/projectionUtils.js";import{earth as x}from"../../../geometry/support/Ellipsoid.js";import{isWebMercator as w}from"../../../geometry/support/spatialReferenceUtils.js";import{t as y}from"../../../chunks/vec3.js";import{isConstantElevation as b,ConstantElevation as j,isElevationSource as O}from"../core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as z}from"../core/utils.js";import{getElevationSampler as P}from"./updateElevationUtils.js";import{isNumber as R}from"../../../support/guards.js";import{defaultImageSphereSize as F}from"../../../widgets/PanoramicViewer/constants.js";function E(t,n,a){const[e,o,r,c]=n,[s,l,f,m]=a;S(e,o,r,c);const p=S(s,l,f,m),g=H(e,o,r,c),v=H(s,l,f,m),M=u(i(),g),d=h(i(),M,v),[x,w,y,b]=D(t,d);return[x/b,w/b,p?0:y/b]}function S(t,n,a,e){return 0===t[2]&&0===n[2]&&0===a[2]&&0===e[2]&&(t[2]=n[2]=a[2]=e[2]=1,!0)}function V(t){return 0===t?1:t}function D(t,n){const[a,e,i]=t,o=[0,0,0,0];return o[0]=a*n[0]+e*n[1]+i*n[2]+n[3],o[1]=a*n[4]+e*n[5]+i*n[6]+n[7],o[2]=a*n[8]+e*n[9]+i*n[10]+n[11],o[3]=V(a*n[12]+e*n[13]+i*n[14]+n[15]),o}function H(t,n,a,e){const r=I(s([...e,1]),u(new Array(16),o(t[0],n[0],a[0],0,t[1],n[1],a[1],0,t[2],n[2],a[2],0,1,1,1,1))),c=r[0],l=r[1],f=r[2],h=i();return h[0]=c*t[0],h[1]=l*n[0],h[2]=f*a[0],h[3]=0,h[4]=c*t[1],h[5]=l*n[1],h[6]=f*a[1],h[7]=0,h[8]=c*t[2],h[9]=l*n[2],h[10]=f*a[2],h[11]=0,h[12]=c,h[13]=l,h[14]=f,h[15]=1,h}function L(t,n,a,e,i=r()){return i[0]=t[0]+n[0]*a,i[1]=t[1]+n[1]*a,i[2]=t[2]+n[2]*(a/e),i}function N(t,n,a){const e=r();return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*(n/a),e}function A(t,n){const[a,e,i]=t,o=r();return o[0]=a*n[0]+e*n[3]+i*n[6],o[1]=a*n[1]+e*n[4]+i*n[7],o[2]=a*n[2]+e*n[5]+i*n[8],o}function I(t,n){const[a,e,i,o]=t,r=new Array(4);return r[0]=a*n[0]+e*n[1]+i*n[2]+o*n[3],r[1]=a*n[4]+e*n[5]+i*n[6]+o*n[7],r[2]=a*n[8]+e*n[9]+i*n[10]+o*n[11],r[3]=a*n[12]+e*n[13]+i*n[14]+o*n[15],r}function Y(n,i,o,r=!0){if(!Number.isFinite(n))throw new t("InvalidRotationAngle","Please specify a valid angle for rotation");const c=o*(r?a(n):n),s=Math.cos(c),l=Math.sin(c),f=e();switch(i){case 0:f[4]=s,f[5]=-l,f[7]=l,f[8]=s;break;case 1:f[0]=s,f[2]=l,f[6]=-l,f[8]=s;break;case 2:f[0]=s,f[1]=-l,f[3]=l,f[4]=s;break;default:throw new t("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return f}const k={HPR:[[2,-1],[0,1],[2,-1]],OPK:[[0,1],[1,1],[2,1]],YPR:[[0,-1],[1,-1],[2,-1]]};function q(n,a,i=!0){if(3!==n?.length||3!==a?.length)throw new t("InvalidRotationAngles","Please specify three angles with config for rotation");const o=e();for(let t=0;t<3;t++){const[e,r]=a[t],c=Y(n[t],e,r,i);f(o,c,o)}return o}function U(t,n=!0){return q(t,k.OPK,n)}function C(t,n=!0){return q(t,k.HPR,n)}function K(t,n,e){const i=Math.sin(a(e)),o=Math.cos(a(e)),r=[[t,0],[t,n],[0,n]];r.forEach((t,n)=>{r[n]=[o*t[0]-i*t[1],i*t[0]+o*t[1]]});const c={xmin:Math.min(0,r[0][0],r[1][0],r[2][0]),xmax:Math.max(0,r[0][0],r[1][0],r[2][0]),ymin:Math.min(0,r[0][1],r[1][1],r[2][1]),ymax:Math.max(0,r[0][1],r[1][1],r[2][1])};return{hfov:Math.abs(c.xmax-c.xmin),vfov:Math.abs(c.ymax-c.ymin)}}function T(t,e){const i=Number(t[0]),o=Number(t[1]),r=Number(t[2]),[c,s,l,f]=e,u=a(c),h=a(s),m=l/Math.sqrt(1-f*Math.sin(u)**2),p=i/m,g=o/m,v=r/m,M=Math.cos(u)-Math.sin(u)*g+Math.cos(u)*v,d=Math.sin(u)+Math.cos(u)*g+Math.sin(u)*v,x=Math.sqrt(M**2+p**2),w=f*m*Math.sin(u),y=(t,n=5)=>{if(0===n)return t;const a=y(t,n-1);return Math.atan(d/x-(w-f*(l/Math.sqrt(1-f*Math.sin(a)**2))*Math.sin(a))/(m*x))},b=y(u),j=Math.atan(i/(m*M))+h,O=n(b);return[n(j),O,i/(Math.cos(b)*Math.sin(j-h))-l/Math.sqrt(1-f*Math.sin(b)**2)]}function W(t,n,a){const e=360/n,i=180/a;return{heading:(t.x-n/2)*e,pitch:90-(t.y-a/2)*i}}function X(t,n,a,e,i=F/2){const{heading:o,pitch:r}=G(t,i),c=e?Rt(o,r,e):[o,r];return{heading:o,pitch:r,...Z(c[0],c[1],n,a)}}function Z(t,n,a,e){const i=t%360;return{x:a/2+(i<-180?i+360:i>180?i-360:i)/(360/a),y:e-n/(180/e)}}function G(t,a){const e=n(Math.acos(-t.z/a));return{heading:n(Math.atan2(t.x,t.y)),pitch:e}}function J(t,n){return[Math.sin(a(t))*Math.sin(a(n)),Math.cos(a(t))*Math.sin(a(n)),Math.cos(a(180-n))]}function $(t,n,a,e=F/2){const i=a?Rt(t,n,a,!0):[t,n];return m(c(),J(i[0],i[1]),e)}function B(t,n,a,e,i=F/2){const{heading:o,pitch:r}=W(t,n,a);return $(o,r,e,i)}async function Q(t,a,e){const i=await d(a,t.spatialReference,e);let o=n(Math.atan2(i.y-t.y,i.x-t.x));return o=o>=0&&o<=90?90-o:o>90&&o<=180?360-o+90:90+Math.abs(o),o}function _(t,n,a){const e=Math.cos(a),i=Math.sin(a),o=[1,0,0,1,0,0],r=o[0]*e+o[2]*i,c=o[1]*e+o[3]*i,s=-o[0]*i+o[2]*e,l=-o[1]*i+o[3]*e;o[0]=r,o[1]=c,o[2]=s,o[3]=l;return[t*o[0]+n*o[2]+o[4],t*o[1]+n*o[3]+o[5]]}const tt=t=>t.toArray(),nt=(...t)=>t.some(t=>t);function at(t,n){if(nt(0===t.length,t.some(({x:t,y:n})=>nt(null==t,null==n)),!n.hasZ))throw new Error("Input pixels must have x, y and camera location must have z value")}function et(t,n){if(t.some(t=>null==t.z)||null==n.z)throw new Error("Input points and camera location must have z value")}function it(t){if(9!==t?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix")}function ot(t,n){return w(n)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/x.radius))):1}const rt=t=>n=>new M({x:n[0],y:n[1],z:n[2],spatialReference:t}),ct=t=>null!=t&&"queryExtent"in t;function st(t,n,a,e){return[[-n,-n],[+n,-n],[+n,+n],[-n,+n]].map(([n,i])=>E(y(r(),a,[n,i,0]),e,t))}function lt({a0:t,a1:n,a2:a,b0:e,b1:i,b2:o},r,c,s){const l=[t??r/2-.5,n,a??0,e??c/2-.5,i??0,o].map(ft);return null!=s&&ut(l)?{affines:l,focalLength:s}:{affines:[r/2-.5,1,0,c/2-.5,0,-1]}}function ft(t,n){if(null==t)return null;const a=parseFloat(`${t}`);return isNaN(a)?null:a}function ut(t){return null!=t[1]&&null!=t[5]}function ht(t,n,a){const{cameraHeight:e,cameraPitch:i,cameraRoll:o,elevation:r,farDistance:c,horizontalFieldOfView:s,location:l,verticalFieldOfView:f}=zt(t,t.location.spatialReference),u=r??(l.z??0)-e;return{...gt(t,n,a),averageElevation:u,cameraPitch:i,cameraRoll:o??0,farDistance:c,horizontalFieldOfView:s,verticalFieldOfView:f}}function mt(t,n,a,e){return jt(e)?U([e.omega,e.phi,e.kappa]):Ot(e)?C([e.heading,e.pitch,e.roll]):C([t,n,a??0])}function pt(t,n,a){const{cameraHeading:e,cameraHeight:i,farDistance:o,horizontalFieldOfView:r,location:c,verticalFieldOfView:s}=zt(t,t.location.spatialReference),l=(c.z??0)-i;let f=-e,u=0,h=0;if(t?.matrix){const{matrix:n}=t;[u,h,f]=Pt(n)}return{averageElevation:l,cameraLocation:c,cameraHeading:e,farDistance:o,horizontalFieldOfView:r,imageHeight:a,imageWidth:n,verticalFieldOfView:s,horizonYaw:f,horizonPitch:u,horizonRoll:h}}function gt(t,n,a){const{a0:e,a1:i,a2:o,b0:r,b1:c,b2:s,cameraHeading:l,cameraOrientation:f,cameraPitch:u,cameraRoll:h,focalLength:m,horizontalFieldOfView:p,location:g,matrix:v,principalX:M,principalY:d,radial:x,tangential:w,verticalFieldOfView:y}=t,{affines:b,focalLength:j}=lt({a0:e,a1:i,a2:o,b0:r,b1:c,b2:s},n,a,m),O=v??mt(l,u,h,f),z=null!=M&&null!=d?[M,d]:void 0;return{affineTransformations:f?.affineTransformations??b,cameraLocation:g.clone(),focalLength:f?.focalLength??j,horizontalFieldOfView:p,imageHeight:a,imageWidth:n,principalOffsetPoint:f?.principalOffsetPoint??z,radialDistortionCoefficients:f?.radialDistortionCoefficients??x,rotationMatrix:O,tangentialDistortionCoefficients:f?.tangentialDistortionCoefficients??w,verticalFieldOfView:y}}const vt=t=>null!=t&&"elevationSample"in t&&null!=t.elevationSample,Mt=t=>O(t?.elevationSource)&&null!=t?.extent,dt=t=>b(t?.elevationSource),xt=async(t,n,a,e,i)=>{const o=z(t),r=n-a/o;return dt(e)?(e.elevationSource=new j({constantElevation:e.elevationSource.constantElevation/o}),e):vt(e)?e:Mt(e)?{elevationSample:await P({...v(e.elevationSource)?e.elevationSource.toJSON():e.elevationSource,extent:e.extent},i),elevationSource:new j({constantElevation:r})}:{averageGroundElevation:r,spatialReference:t}},wt=t=>R(t?.heading)&&R(t?.pitch),yt=(t,n)=>[[-t,-n],[t,-n],[t,n],[-t,n]];function bt(t){const{cameraLocation:n,farDistance:i,horizontalFieldOfView:o,rotationMatrix:c,scalingFactor:s,verticalFieldOfView:f}=t,u=e();l(u,c);const h=2*Math.tan(a(f)/2)*i*s,m=2*Math.tan(a(o)/2)*i*s,v=A([0,0,-1],u),M=L([n.x,n.y,n.z],v,t.farDistance*s,s),d=A([0,1,0],u),x=A([1,0,0],u),w=N(d,h/2,s),y=N(x,m/2,s),b=p(r(),w,y),j=g(r(),w,y);return[g(r(),M,b),g(r(),M,j),p(r(),M,b),p(r(),M,j)]}const jt=t=>2===t?.type,Ot=t=>1===t?.type;function zt(t,n,a=!0){const e=z(n),i=a?t.clone():t;return i.cameraHeight/=e,i.farDistance/=e,i.nearDistance/=e,b(i.elevationSource)&&(i.elevationSource.constantElevation/=e),i}function Pt(t){return[n(Math.asin(-t[6])),n(Math.atan(t[7]/t[8])),n(Math.atan2(t[3],t[0]))]}function Rt(t,n,a,e=!1){return Ft(J(t,n),a,e)}function Ft(t,a,i=!1){const o=i?l(e(),q(a,k.YPR)):q(a,k.YPR),r=t[0]*o[0]+t[1]*o[1]+t[2]*o[2],c=t[0]*o[3]+t[1]*o[4]+t[2]*o[5],s=t[0]*o[6]+t[1]*o[7]+t[2]*o[8],f=n(Math.acos(-s));return[n(Math.atan2(r,c)),f]}export{Rt as adjustHorizonAngles,Ft as adjustHorizonAnglesVec3,bt as computeFarplaneVertices,K as computeHFOVAndVFOV,st as computeNewReferenceCoordinates,$ as convertHeadingPitchToSphereVertex,Z as convertOrientationToPixelLocation,B as convertPixelLocationToSphereVertex,W as convertPixelToHeadingPitch,G as convertSphereVertexToOrientation,X as convertSphereVertexToPixelLocation,zt as convertToSRUnits,J as createMeshSpaceVector,q as createRotationMatrix,C as createRotationMatrixFromHPR,U as createRotationMatrixFromOPK,Pt as extractHorizonAngles,lt as getAffinesAndFocalLength,pt as getImageToWorldPanoramicProperties,ht as getImageToWorldProperties,Q as getInitialAngle,xt as getUpdateElevationProps,ot as getWebMercatorScalingFactor,gt as getWorldToImageProperties,wt as hasAngles,Ot as hasHeadingPitchRoll,jt as hasOmegaPhiKappa,ct as isElevationSampler,vt as isUpdateElevationWithElevationSampler,Mt as isUpdateElevationWithElevationSource,dt as isUpdateUsingConstantElevation,ut as isValidAffines,H as linearEquationSolve,T as ltpToGeographic,nt as or,tt as pointToArray,E as projectiveTransform,yt as reducerFn,_ as rotatePixel,L as scaleAndAddWithFactor,N as scaleWithFactor,A as transformMat3,I as transformMat4,at as validatePixelsToTransform,et as validatePointsToTransform,it as validateRotationMatrix,rt as vecToPoint};
@@ -3,24 +3,24 @@ import type { ClonableMixin } from "../../core/Clonable.js";
3
3
  import type { IdentifiableMixin, IdentifiableMixinProperties } from "../../core/Identifiable.js";
4
4
  import type { Loadable, LoadableMixinProperties } from "../../core/Loadable.js";
5
5
 
6
- export interface AnnotationSublayerProperties extends LoadableMixinProperties, IdentifiableMixinProperties, Partial<Pick<AnnotationSublayer, "parent" | "subtypeCode" | "title" | "visible">> {}
6
+ export interface AnnotationFeatureSublayerProperties extends LoadableMixinProperties, IdentifiableMixinProperties, Partial<Pick<AnnotationFeatureSublayer, "parent" | "subtypeCode" | "visible">> {}
7
7
 
8
8
  /**
9
- * Represents a sublayer in a [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/). Each AnnotationSublayer
9
+ * Represents a sublayer in a [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/). Each AnnotationFeatureSublayer
10
10
  * is not a standalone service, but rather each sublayer corresponds to one subtype in the source feature service.
11
11
  *
12
- * The AnnotationSublayers are identified by their unique [subtypeCode](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AnnotationSublayer/#subtypeCode). You can configure the properties of each sublayer while
12
+ * The AnnotationFeatureSublayers are identified by their unique [subtypeCode](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AnnotationFeatureSublayer/#subtypeCode). You can configure the visibility of each sublayer while
13
13
  * initializing the AnnotationFeatureLayer
14
14
  *
15
15
  * @since 5.1
16
- * @see [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/)
16
+ * @see [AnnotationFeatureLayer.sublayers](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/#sublayers)
17
17
  */
18
- export default class AnnotationSublayer extends AnnotationSublayerSuperclass {
19
- constructor(properties?: AnnotationSublayerProperties);
18
+ export default class AnnotationFeatureSublayer extends AnnotationFeatureSublayerSuperclass {
19
+ constructor(properties?: AnnotationFeatureSublayerProperties);
20
20
  /** The [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/) to which the sublayer belongs. */
21
21
  accessor parent: AnnotationFeatureLayer | null | undefined;
22
22
  /**
23
- * The unique identifier representing the [AnnotationSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AnnotationSublayer/)
23
+ * The unique identifier representing the [AnnotationFeatureSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AnnotationFeatureSublayer/)
24
24
  * created from the [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/).
25
25
  */
26
26
  accessor subtypeCode: number;
@@ -28,17 +28,17 @@ export default class AnnotationSublayer extends AnnotationSublayerSuperclass {
28
28
  * The title of the layer used to identify it in places such as the [layer list](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-layer-list/).
29
29
  * The title is set to the subtype description of the layer.
30
30
  */
31
- accessor title: string | null | undefined;
32
- get type(): "annotation-sublayer";
31
+ get title(): string | null | undefined;
32
+ get type(): "annotation-feature-sublayer";
33
33
  /**
34
- * Indicates if the layer is visible in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/). When `false`,
34
+ * Indicates if the sublayer is visible in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/). When `false`,
35
35
  * the annotations corresponding to this sublayer will not be visible in the view.
36
36
  *
37
37
  * @default true
38
38
  * @example
39
- * // The layer is no longer visible in the view
39
+ * // The sublayer is no longer visible in the view
40
40
  * layer.visible = false;
41
41
  */
42
42
  accessor visible: boolean;
43
43
  }
44
- declare const AnnotationSublayerSuperclass: typeof Loadable & typeof IdentifiableMixin & typeof ClonableMixin
44
+ declare const AnnotationFeatureSublayerSuperclass: typeof Loadable & typeof IdentifiableMixin & typeof ClonableMixin
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import{IdentifiableMixin as o}from"../../core/Identifiable.js";import{Loadable as r}from"../../core/Loadable.js";import{property as i,subclass as p}from"../../core/accessorSupport/decorators.js";import s from"../../graphic/AnnotationFeatureGraphicOrigin.js";let a=class extends(e(o(r))){constructor(t){super(t),this.graphicOrigin=new s(this),this.parent=null,this.subtypeCode=null,this.type="annotation-feature-sublayer",this.visible=!0}get title(){return this.parent?.subtypes?.find(t=>t.code===this.subtypeCode)?.name??null}};t([i({readOnly:!0,clonable:!1})],a.prototype,"graphicOrigin",void 0),t([i({clonable:!1})],a.prototype,"parent",void 0),t([i({type:Number})],a.prototype,"subtypeCode",void 0),t([i({readOnly:!0})],a.prototype,"title",null),t([i({readOnly:!0})],a.prototype,"type",void 0),t([i({type:Boolean})],a.prototype,"visible",void 0),a=t([p("esri.layers.support.AnnotationFeatureSublayer")],a);export{a as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{getEffectiveEditingEnabled as s,getEffectiveLayerCapabilities as a}from"./layerUtils.js";let p=class extends t{constructor(e){super(e),this.layer=null}get attachments(){return{enabled:this._effectiveEnabled&&!!this._effectiveCapabilities?.data.supportsAttachment}}get create(){const{_effectiveCapabilities:e,layer:t}=this,r=this._createEnabled,i=r,s=t.capabilities?.operations.supportsAdd,a=!!e?.operations.supportsAdd;return{attachments:{enabled:r&&this.attachments.enabled},attributes:r,enabled:r,geometry:i,reliesOnOwnerAdminPrivileges:!s&&a}}get delete(){const{_effectiveCapabilities:e,layer:t}=this,r=t.capabilities?.operations.supportsDelete,i=!!e?.operations.supportsDelete;return{enabled:this._effectiveEnabled&&!!e?.operations.supportsDelete,reliesOnOwnerAdminPrivileges:!r&&i}}get reliesOnOwnerAdminPrivileges(){return this._effectiveEnabled&&!this.layer.editingEnabled||this.create.reliesOnOwnerAdminPrivileges||this.update.reliesOnOwnerAdminPrivileges||this.delete.reliesOnOwnerAdminPrivileges}get supportedCurveTypes(){const e=this._effectiveCapabilities;return e&&"supportedCurveTypes"in e.data?e.data.supportedCurveTypes:[]}get supportsTrueCurve(){const e=this._effectiveCapabilities;return!!(e&&"supportsTrueCurve"in e.data&&e.data.supportsTrueCurve)}get supportsTrueCurveUpdate(){const e=this._effectiveCapabilities;return!!(e&&"supportsTrueCurveUpdate"in e.editing&&e.editing.supportsTrueCurveUpdate)}get update(){const{_effectiveCapabilities:e,layer:t}=this,r=this._updateEnabled,i=!(!r||!e?.editing.supportsGeometryUpdate),s=t.capabilities?.operations.supportsUpdate,a=!!e?.operations.supportsUpdate,p=this.attachments.enabled,n=p&&this._canCreateOrUpdate;return{attachments:{enabled:p,create:n,update:n},attributes:r,enabled:r,geometry:i,reliesOnOwnerAdminPrivileges:!s&&a}}get _createEnabled(){return this._effectiveEnabled&&!!this._effectiveCapabilities?.operations.supportsAdd}get _updateEnabled(){return this._effectiveEnabled&&!!this._effectiveCapabilities?.operations.supportsUpdate}get _canCreateOrUpdate(){return!(!this._createEnabled&&!this._updateEnabled)}get _effectiveEnabled(){return s(this.layer)}get _effectiveCapabilities(){return a(this.layer)}};e([r()],p.prototype,"attachments",null),e([r()],p.prototype,"create",null),e([r()],p.prototype,"delete",null),e([r()],p.prototype,"layer",void 0),e([r()],p.prototype,"reliesOnOwnerAdminPrivileges",null),e([r()],p.prototype,"supportedCurveTypes",null),e([r()],p.prototype,"supportsTrueCurve",null),e([r()],p.prototype,"supportsTrueCurveUpdate",null),e([r()],p.prototype,"update",null),e([r()],p.prototype,"_createEnabled",null),e([r()],p.prototype,"_updateEnabled",null),e([r()],p.prototype,"_canCreateOrUpdate",null),e([r()],p.prototype,"_effectiveEnabled",null),e([r()],p.prototype,"_effectiveCapabilities",null),p=e([i("esri.layers.support.EditingCapabilities")],p);const n=p;export{n as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{getEffectiveEditingEnabled as s,getEffectiveLayerCapabilities as a}from"./layerUtils.js";let p=class extends t{constructor(e){super(e),this.layer=null}get attachments(){return{enabled:this._effectiveEnabled&&!!this._effectiveCapabilities?.data.supportsAttachment}}get create(){const{_effectiveCapabilities:e,layer:t}=this,r=this._createEnabled,i=r,s=t.capabilities?.operations.supportsAdd,a=!!e?.operations.supportsAdd;return{attachments:{enabled:r&&this.attachments.enabled},attributes:r,enabled:r,geometry:i,reliesOnOwnerAdminPrivileges:!s&&a}}get delete(){const{_effectiveCapabilities:e,layer:t}=this,r=t.capabilities?.operations.supportsDelete,i=!!e?.operations.supportsDelete;return{enabled:this._effectiveEnabled&&!!e?.operations.supportsDelete,reliesOnOwnerAdminPrivileges:!r&&i}}get reliesOnOwnerAdminPrivileges(){return this._effectiveEnabled&&!this.layer.editingEnabled||this.create.reliesOnOwnerAdminPrivileges||this.update.reliesOnOwnerAdminPrivileges||this.delete.reliesOnOwnerAdminPrivileges}get supportedCurveTypes(){const e=this._effectiveCapabilities;return e&&"supportedCurveTypes"in e.data?e.data.supportedCurveTypes:[]}get supportsGlobalIds(){return!!this._effectiveCapabilities?.editing.supportsGlobalId}get supportsTrueCurve(){const e=this._effectiveCapabilities;return!!(e&&"supportsTrueCurve"in e.data&&e.data.supportsTrueCurve)}get supportsTrueCurveUpdate(){const e=this._effectiveCapabilities;return!!(e&&"supportsTrueCurveUpdate"in e.editing&&e.editing.supportsTrueCurveUpdate)}get update(){const{_effectiveCapabilities:e,layer:t}=this,r=this._updateEnabled,i=!(!r||!e?.editing.supportsGeometryUpdate),s=t.capabilities?.operations.supportsUpdate,a=!!e?.operations.supportsUpdate,p=this.attachments.enabled,n=p&&this._canCreateOrUpdate;return{attachments:{enabled:p,create:n,update:n},attributes:r,enabled:r,geometry:i,reliesOnOwnerAdminPrivileges:!s&&a}}get _createEnabled(){return this._effectiveEnabled&&!!this._effectiveCapabilities?.operations.supportsAdd}get _updateEnabled(){return this._effectiveEnabled&&!!this._effectiveCapabilities?.operations.supportsUpdate}get _canCreateOrUpdate(){return!(!this._createEnabled&&!this._updateEnabled)}get _effectiveEnabled(){return s(this.layer)}get _effectiveCapabilities(){return a(this.layer)}};e([r()],p.prototype,"attachments",null),e([r()],p.prototype,"create",null),e([r()],p.prototype,"delete",null),e([r()],p.prototype,"layer",void 0),e([r()],p.prototype,"reliesOnOwnerAdminPrivileges",null),e([r()],p.prototype,"supportedCurveTypes",null),e([r()],p.prototype,"supportsGlobalIds",null),e([r()],p.prototype,"supportsTrueCurve",null),e([r()],p.prototype,"supportsTrueCurveUpdate",null),e([r()],p.prototype,"update",null),e([r()],p.prototype,"_createEnabled",null),e([r()],p.prototype,"_updateEnabled",null),e([r()],p.prototype,"_canCreateOrUpdate",null),e([r()],p.prototype,"_effectiveEnabled",null),e([r()],p.prototype,"_effectiveCapabilities",null),p=e([i("esri.layers.support.EditingCapabilities")],p);const n=p;export{n as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as r}from"tslib";import{Clonable as t}from"../../core/Clonable.js";import{JSONSupportMixin as o}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import s from"../../portal/PortalItem.js";import{reader as a}from"../../core/accessorSupport/decorators/reader.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";let m=class extends(o(t)){constructor(r){super(r),this.type="portal-item"}readPortalItem(r,t,o){if(t.itemId)return new s({id:t.itemId,portal:o?.portal})}writePortalItem(r,t){r?.id&&(t.itemId=r.id)}};r([e({type:["portal-item"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],m.prototype,"type",void 0),r([e({type:s,json:{write:{isRequired:!0}}})],m.prototype,"portalItem",void 0),r([a("portalItem",["itemId"])],m.prototype,"readPortalItem",null),r([i("portalItem",{itemId:{type:String}})],m.prototype,"writePortalItem",null),m=r([p("esri.layers.support.ParquetPortalItemData")],m);const l=m;export{l as default};
2
+ import{__decorate as r}from"tslib";import{Clonable as t}from"../../core/Clonable.js";import{JSONSupportMixin as o}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import a from"../../portal/PortalItem.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";let m=class extends(o(t)){constructor(r){super(r),this.type="portal-item"}readPortalItem(r,t,o){if(t.itemId)return new a({id:t.itemId,portal:o?.portal})}writePortalItem(r,t){r?.id&&(t.itemId=r.id)}};r([e({type:["portal-item"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],m.prototype,"type",void 0),r([e({type:a,json:{write:{isRequired:!0}}})],m.prototype,"portalItem",void 0),r([s("portalItem",["itemId"])],m.prototype,"readPortalItem",null),r([i("portalItem",{itemId:{type:String}})],m.prototype,"writePortalItem",null),m=r([p("esri.layers.support.ParquetPortalItemData")],m);export{m as default};