@arcgis/core 4.34.0-next.87 → 4.34.0-next.89

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 (504) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/arcade/Dictionary.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/arcade/Pixel.js +1 -1
  5. package/arcade/Voxel.js +1 -1
  6. package/arcade/containerUtils.js +1 -1
  7. package/arcade/featureSetUtils.js +1 -1
  8. package/arcade/featureset/actions/GroupBy.js +1 -1
  9. package/arcade/featureset/actions/OrderBy.js +1 -1
  10. package/arcade/featureset/support/FeatureSet.js +1 -1
  11. package/arcade/functions/date.js +1 -1
  12. package/arcade/functions/feature.js +1 -1
  13. package/arcade/functions/featuresetbase.js +1 -1
  14. package/arcade/functions/featuresetstats.js +1 -1
  15. package/arcade/functions/featuresetstring.js +1 -1
  16. package/arcade/functions/fieldStats.js +1 -1
  17. package/arcade/functions/geometry.js +1 -1
  18. package/arcade/functions/maths.js +1 -1
  19. package/arcade/functions/string.js +1 -1
  20. package/arcade/languageUtils.js +1 -1
  21. package/assets/components/assets/accordion-item/t9n/messages.ar.json +1 -1
  22. package/assets/components/assets/accordion-item/t9n/messages.bg.json +1 -1
  23. package/assets/components/assets/accordion-item/t9n/messages.bs.json +1 -1
  24. package/assets/components/assets/accordion-item/t9n/messages.ca.json +1 -1
  25. package/assets/components/assets/accordion-item/t9n/messages.cs.json +1 -1
  26. package/assets/components/assets/accordion-item/t9n/messages.da.json +1 -1
  27. package/assets/components/assets/accordion-item/t9n/messages.de.json +1 -1
  28. package/assets/components/assets/accordion-item/t9n/messages.el.json +1 -1
  29. package/assets/components/assets/accordion-item/t9n/messages.es.json +1 -1
  30. package/assets/components/assets/accordion-item/t9n/messages.et.json +1 -1
  31. package/assets/components/assets/accordion-item/t9n/messages.fi.json +1 -1
  32. package/assets/components/assets/accordion-item/t9n/messages.fr.json +1 -1
  33. package/assets/components/assets/accordion-item/t9n/messages.he.json +1 -1
  34. package/assets/components/assets/accordion-item/t9n/messages.hr.json +1 -1
  35. package/assets/components/assets/accordion-item/t9n/messages.hu.json +1 -1
  36. package/assets/components/assets/accordion-item/t9n/messages.id.json +1 -1
  37. package/assets/components/assets/accordion-item/t9n/messages.it.json +1 -1
  38. package/assets/components/assets/accordion-item/t9n/messages.ja.json +1 -1
  39. package/assets/components/assets/accordion-item/t9n/messages.ko.json +1 -1
  40. package/assets/components/assets/accordion-item/t9n/messages.lt.json +1 -1
  41. package/assets/components/assets/accordion-item/t9n/messages.lv.json +1 -1
  42. package/assets/components/assets/accordion-item/t9n/messages.nl.json +1 -1
  43. package/assets/components/assets/accordion-item/t9n/messages.no.json +1 -1
  44. package/assets/components/assets/accordion-item/t9n/messages.pl.json +1 -1
  45. package/assets/components/assets/accordion-item/t9n/messages.pt-BR.json +1 -1
  46. package/assets/components/assets/accordion-item/t9n/messages.pt-PT.json +1 -1
  47. package/assets/components/assets/accordion-item/t9n/messages.ro.json +1 -1
  48. package/assets/components/assets/accordion-item/t9n/messages.ru.json +1 -1
  49. package/assets/components/assets/accordion-item/t9n/messages.sk.json +1 -1
  50. package/assets/components/assets/accordion-item/t9n/messages.sl.json +1 -1
  51. package/assets/components/assets/accordion-item/t9n/messages.sr.json +1 -1
  52. package/assets/components/assets/accordion-item/t9n/messages.sv.json +1 -1
  53. package/assets/components/assets/accordion-item/t9n/messages.th.json +1 -1
  54. package/assets/components/assets/accordion-item/t9n/messages.tr.json +1 -1
  55. package/assets/components/assets/accordion-item/t9n/messages.uk.json +1 -1
  56. package/assets/components/assets/accordion-item/t9n/messages.vi.json +1 -1
  57. package/assets/components/assets/accordion-item/t9n/messages.zh-CN.json +1 -1
  58. package/assets/components/assets/accordion-item/t9n/messages.zh-HK.json +1 -1
  59. package/assets/components/assets/accordion-item/t9n/messages.zh-TW.json +1 -1
  60. package/assets/components/assets/action-bar/t9n/messages.ar.json +1 -1
  61. package/assets/components/assets/action-bar/t9n/messages.bg.json +1 -1
  62. package/assets/components/assets/action-bar/t9n/messages.bs.json +1 -1
  63. package/assets/components/assets/action-bar/t9n/messages.ca.json +1 -1
  64. package/assets/components/assets/action-bar/t9n/messages.cs.json +1 -1
  65. package/assets/components/assets/action-bar/t9n/messages.da.json +1 -1
  66. package/assets/components/assets/action-bar/t9n/messages.de.json +1 -1
  67. package/assets/components/assets/action-bar/t9n/messages.el.json +1 -1
  68. package/assets/components/assets/action-bar/t9n/messages.es.json +1 -1
  69. package/assets/components/assets/action-bar/t9n/messages.et.json +1 -1
  70. package/assets/components/assets/action-bar/t9n/messages.fi.json +1 -1
  71. package/assets/components/assets/action-bar/t9n/messages.fr.json +1 -1
  72. package/assets/components/assets/action-bar/t9n/messages.he.json +1 -1
  73. package/assets/components/assets/action-bar/t9n/messages.hr.json +1 -1
  74. package/assets/components/assets/action-bar/t9n/messages.hu.json +1 -1
  75. package/assets/components/assets/action-bar/t9n/messages.id.json +1 -1
  76. package/assets/components/assets/action-bar/t9n/messages.it.json +1 -1
  77. package/assets/components/assets/action-bar/t9n/messages.ja.json +1 -1
  78. package/assets/components/assets/action-bar/t9n/messages.ko.json +1 -1
  79. package/assets/components/assets/action-bar/t9n/messages.lt.json +1 -1
  80. package/assets/components/assets/action-bar/t9n/messages.lv.json +1 -1
  81. package/assets/components/assets/action-bar/t9n/messages.nl.json +1 -1
  82. package/assets/components/assets/action-bar/t9n/messages.no.json +1 -1
  83. package/assets/components/assets/action-bar/t9n/messages.pl.json +1 -1
  84. package/assets/components/assets/action-bar/t9n/messages.pt-BR.json +1 -1
  85. package/assets/components/assets/action-bar/t9n/messages.pt-PT.json +1 -1
  86. package/assets/components/assets/action-bar/t9n/messages.ro.json +1 -1
  87. package/assets/components/assets/action-bar/t9n/messages.ru.json +1 -1
  88. package/assets/components/assets/action-bar/t9n/messages.sk.json +1 -1
  89. package/assets/components/assets/action-bar/t9n/messages.sl.json +1 -1
  90. package/assets/components/assets/action-bar/t9n/messages.sr.json +1 -1
  91. package/assets/components/assets/action-bar/t9n/messages.sv.json +1 -1
  92. package/assets/components/assets/action-bar/t9n/messages.th.json +1 -1
  93. package/assets/components/assets/action-bar/t9n/messages.tr.json +1 -1
  94. package/assets/components/assets/action-bar/t9n/messages.uk.json +1 -1
  95. package/assets/components/assets/action-bar/t9n/messages.vi.json +1 -1
  96. package/assets/components/assets/action-bar/t9n/messages.zh-CN.json +1 -1
  97. package/assets/components/assets/action-bar/t9n/messages.zh-HK.json +1 -1
  98. package/assets/components/assets/action-bar/t9n/messages.zh-TW.json +1 -1
  99. package/assets/components/assets/action-pad/t9n/messages.ar.json +1 -1
  100. package/assets/components/assets/action-pad/t9n/messages.bg.json +1 -1
  101. package/assets/components/assets/action-pad/t9n/messages.bs.json +1 -1
  102. package/assets/components/assets/action-pad/t9n/messages.ca.json +1 -1
  103. package/assets/components/assets/action-pad/t9n/messages.cs.json +1 -1
  104. package/assets/components/assets/action-pad/t9n/messages.da.json +1 -1
  105. package/assets/components/assets/action-pad/t9n/messages.de.json +1 -1
  106. package/assets/components/assets/action-pad/t9n/messages.el.json +1 -1
  107. package/assets/components/assets/action-pad/t9n/messages.es.json +1 -1
  108. package/assets/components/assets/action-pad/t9n/messages.et.json +1 -1
  109. package/assets/components/assets/action-pad/t9n/messages.fi.json +1 -1
  110. package/assets/components/assets/action-pad/t9n/messages.fr.json +1 -1
  111. package/assets/components/assets/action-pad/t9n/messages.he.json +1 -1
  112. package/assets/components/assets/action-pad/t9n/messages.hr.json +1 -1
  113. package/assets/components/assets/action-pad/t9n/messages.hu.json +1 -1
  114. package/assets/components/assets/action-pad/t9n/messages.id.json +1 -1
  115. package/assets/components/assets/action-pad/t9n/messages.it.json +1 -1
  116. package/assets/components/assets/action-pad/t9n/messages.ja.json +1 -1
  117. package/assets/components/assets/action-pad/t9n/messages.ko.json +1 -1
  118. package/assets/components/assets/action-pad/t9n/messages.lt.json +1 -1
  119. package/assets/components/assets/action-pad/t9n/messages.lv.json +1 -1
  120. package/assets/components/assets/action-pad/t9n/messages.nl.json +1 -1
  121. package/assets/components/assets/action-pad/t9n/messages.no.json +1 -1
  122. package/assets/components/assets/action-pad/t9n/messages.pl.json +1 -1
  123. package/assets/components/assets/action-pad/t9n/messages.pt-BR.json +1 -1
  124. package/assets/components/assets/action-pad/t9n/messages.pt-PT.json +1 -1
  125. package/assets/components/assets/action-pad/t9n/messages.ro.json +1 -1
  126. package/assets/components/assets/action-pad/t9n/messages.ru.json +1 -1
  127. package/assets/components/assets/action-pad/t9n/messages.sk.json +1 -1
  128. package/assets/components/assets/action-pad/t9n/messages.sl.json +1 -1
  129. package/assets/components/assets/action-pad/t9n/messages.sr.json +1 -1
  130. package/assets/components/assets/action-pad/t9n/messages.sv.json +1 -1
  131. package/assets/components/assets/action-pad/t9n/messages.th.json +1 -1
  132. package/assets/components/assets/action-pad/t9n/messages.tr.json +1 -1
  133. package/assets/components/assets/action-pad/t9n/messages.uk.json +1 -1
  134. package/assets/components/assets/action-pad/t9n/messages.vi.json +1 -1
  135. package/assets/components/assets/action-pad/t9n/messages.zh-CN.json +1 -1
  136. package/assets/components/assets/action-pad/t9n/messages.zh-HK.json +1 -1
  137. package/assets/components/assets/action-pad/t9n/messages.zh-TW.json +1 -1
  138. package/assets/components/assets/icon/layer3D16.json +1 -0
  139. package/assets/components/assets/icon/layer3D24.json +1 -0
  140. package/assets/components/assets/icon/layer3D32.json +1 -0
  141. package/assets/components/assets/sort-handle/t9n/messages.ar.json +1 -1
  142. package/assets/components/assets/sort-handle/t9n/messages.bg.json +1 -1
  143. package/assets/components/assets/sort-handle/t9n/messages.bs.json +1 -1
  144. package/assets/components/assets/sort-handle/t9n/messages.ca.json +1 -1
  145. package/assets/components/assets/sort-handle/t9n/messages.cs.json +1 -1
  146. package/assets/components/assets/sort-handle/t9n/messages.da.json +1 -1
  147. package/assets/components/assets/sort-handle/t9n/messages.de.json +1 -1
  148. package/assets/components/assets/sort-handle/t9n/messages.el.json +1 -1
  149. package/assets/components/assets/sort-handle/t9n/messages.es.json +1 -1
  150. package/assets/components/assets/sort-handle/t9n/messages.et.json +1 -1
  151. package/assets/components/assets/sort-handle/t9n/messages.fi.json +1 -1
  152. package/assets/components/assets/sort-handle/t9n/messages.fr.json +1 -1
  153. package/assets/components/assets/sort-handle/t9n/messages.he.json +1 -1
  154. package/assets/components/assets/sort-handle/t9n/messages.hr.json +1 -1
  155. package/assets/components/assets/sort-handle/t9n/messages.hu.json +1 -1
  156. package/assets/components/assets/sort-handle/t9n/messages.id.json +1 -1
  157. package/assets/components/assets/sort-handle/t9n/messages.it.json +1 -1
  158. package/assets/components/assets/sort-handle/t9n/messages.ja.json +1 -1
  159. package/assets/components/assets/sort-handle/t9n/messages.ko.json +1 -1
  160. package/assets/components/assets/sort-handle/t9n/messages.lt.json +1 -1
  161. package/assets/components/assets/sort-handle/t9n/messages.lv.json +1 -1
  162. package/assets/components/assets/sort-handle/t9n/messages.nl.json +1 -1
  163. package/assets/components/assets/sort-handle/t9n/messages.no.json +1 -1
  164. package/assets/components/assets/sort-handle/t9n/messages.pl.json +1 -1
  165. package/assets/components/assets/sort-handle/t9n/messages.pt-BR.json +1 -1
  166. package/assets/components/assets/sort-handle/t9n/messages.pt-PT.json +1 -1
  167. package/assets/components/assets/sort-handle/t9n/messages.ro.json +1 -1
  168. package/assets/components/assets/sort-handle/t9n/messages.ru.json +1 -1
  169. package/assets/components/assets/sort-handle/t9n/messages.sk.json +1 -1
  170. package/assets/components/assets/sort-handle/t9n/messages.sl.json +1 -1
  171. package/assets/components/assets/sort-handle/t9n/messages.sr.json +1 -1
  172. package/assets/components/assets/sort-handle/t9n/messages.sv.json +1 -1
  173. package/assets/components/assets/sort-handle/t9n/messages.th.json +1 -1
  174. package/assets/components/assets/sort-handle/t9n/messages.tr.json +1 -1
  175. package/assets/components/assets/sort-handle/t9n/messages.uk.json +1 -1
  176. package/assets/components/assets/sort-handle/t9n/messages.vi.json +1 -1
  177. package/assets/components/assets/sort-handle/t9n/messages.zh-CN.json +1 -1
  178. package/assets/components/assets/sort-handle/t9n/messages.zh-HK.json +1 -1
  179. package/assets/components/assets/sort-handle/t9n/messages.zh-TW.json +1 -1
  180. package/assets/esri/core/workers/RemoteClient.js +1 -1
  181. package/assets/esri/core/workers/chunks/{ed8863c3d334f438b625.js → 0037abf0a82d1ed32e91.js} +1 -1
  182. package/assets/esri/core/workers/chunks/{c6d4b8d683a34fc0d111.js → 0103b70126bc5dffc55e.js} +1 -1
  183. package/assets/esri/core/workers/chunks/{d7fc8ea2ff527a09f4b9.js → 0296ebe8e37e30af771c.js} +1 -1
  184. package/assets/esri/core/workers/chunks/{39a1f361bb69073af765.js → 04dbdaa63c950f32b8f0.js} +1 -1
  185. package/assets/esri/core/workers/chunks/05aac984cbbadb5f6aa0.js +1 -0
  186. package/assets/esri/core/workers/chunks/0fadd1defbb6743dacdc.js +1 -0
  187. package/assets/esri/core/workers/chunks/{0f05425954578ac796ec.js → 135142f3cbfaf24949bc.js} +1 -1
  188. package/assets/esri/core/workers/chunks/24921d31efa8d222ad2d.js +2 -0
  189. package/assets/esri/core/workers/chunks/{268f5b233640a9dbbf89.js.LICENSE.txt → 24921d31efa8d222ad2d.js.LICENSE.txt} +1 -1
  190. package/assets/esri/core/workers/chunks/2b2f1fcd50dea017d891.js +1 -0
  191. package/assets/esri/core/workers/chunks/2e1cc11462846febb3b2.js +1 -0
  192. package/assets/esri/core/workers/chunks/300b96f0f8e34b4a5d8b.js +1 -0
  193. package/assets/esri/core/workers/chunks/37b5007660535f1c91c6.js +1 -0
  194. package/assets/esri/core/workers/chunks/{2dc88379ee94fabdaf52.js → 39a5863355cccaabd2d6.js} +1 -1
  195. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js +2 -0
  196. package/assets/esri/core/workers/chunks/{47e4f66c33bb697fbe6b.js.LICENSE.txt → 3a457e718a901a45902e.js.LICENSE.txt} +1 -1
  197. package/assets/esri/core/workers/chunks/{f3ee035fa7bf638c8e60.js → 3d68a650a1f944ec5171.js} +1 -1
  198. package/assets/esri/core/workers/chunks/46ef545d2b3b3f4e6d32.js +2 -0
  199. package/assets/esri/core/workers/chunks/{336b54144afec0c7d396.js.LICENSE.txt → 46ef545d2b3b3f4e6d32.js.LICENSE.txt} +1 -1
  200. package/assets/esri/core/workers/chunks/47c0c16c1e995a441ec2.js +1 -0
  201. package/assets/esri/core/workers/chunks/48913b944c28343816ac.js +1 -0
  202. package/assets/esri/core/workers/chunks/{4d4db6854aff7656f6e1.js → 4dd4b19c410026233999.js} +1 -1
  203. package/assets/esri/core/workers/chunks/4e77b9cc1d9437bcbb0c.js +1 -0
  204. package/assets/esri/core/workers/chunks/52121179d4f9833008ec.js +1 -0
  205. package/assets/esri/core/workers/chunks/58e2652810143f509fe1.js +1 -0
  206. package/assets/esri/core/workers/chunks/{97489bf16a1d327992b2.js → 595593dd03bcfba795c8.js} +11 -16
  207. package/assets/esri/core/workers/chunks/59e27818cb68f0285d54.js +1 -0
  208. package/assets/esri/core/workers/chunks/620a94b54be3ed78350d.js +1 -0
  209. package/assets/esri/core/workers/chunks/67d9cfe02613cb73ee37.js.LICENSE.txt +1 -1
  210. package/assets/esri/core/workers/chunks/6f29951f5a2da068b257.js +1 -0
  211. package/assets/esri/core/workers/chunks/71c6c0b26253c4ca1b68.js +1 -0
  212. package/assets/esri/core/workers/chunks/{1c1b0cc91fe9cb3fec61.js → 71df48968d6cdc736458.js} +1 -1
  213. package/assets/esri/core/workers/chunks/773d106f60f7dad1493d.js +1 -0
  214. package/assets/esri/core/workers/chunks/779ee975efebb838b5d6.js +1 -0
  215. package/assets/esri/core/workers/chunks/7a240ab31d9ff2d2c5af.js +1 -0
  216. package/assets/esri/core/workers/chunks/834985ec601623df34a1.js +1 -0
  217. package/assets/esri/core/workers/chunks/{5dee8c0c60ced791e57f.js → 84a556dafd583635ad5e.js} +1 -1
  218. package/assets/esri/core/workers/chunks/8be9fa12e854a83062c3.js +1 -0
  219. package/assets/esri/core/workers/chunks/8f4cfef97716c3502b0f.js +1 -0
  220. package/assets/esri/core/workers/chunks/{65ec21d29e8563fdbc55.js → 94c9d3094c93f7760433.js} +1 -1
  221. package/assets/esri/core/workers/chunks/{177840d5f0076c0de46b.js → 96de78f9994207aa7201.js} +1 -1
  222. package/assets/esri/core/workers/chunks/{366db86914a63e6d0c68.js → 978ffde9ebebf5c83aea.js} +1 -1
  223. package/assets/esri/core/workers/chunks/a1abe9865d66789bd5af.js +1 -0
  224. package/assets/esri/core/workers/chunks/{47e4f66c33bb697fbe6b.js → a8f998b8ec8c56150479.js} +2 -2
  225. package/assets/esri/core/workers/chunks/{f6e18668f728dfd8ba5e.js.LICENSE.txt → a8f998b8ec8c56150479.js.LICENSE.txt} +1 -1
  226. package/assets/esri/core/workers/chunks/{257fd65786feb5951b90.js → a96e58ed9a4a2329ee53.js} +1 -1
  227. package/assets/esri/core/workers/chunks/{0074f1836d7ff69ff6ec.js → aa778e5d7db40d9b9b4a.js} +1 -1
  228. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  229. package/assets/esri/core/workers/chunks/{c78de6dd6c10280cee69.js → baa48614d9567d5f240d.js} +1 -1
  230. package/assets/esri/core/workers/chunks/c1d75c48558ed23c5b2b.js +1 -0
  231. package/assets/esri/core/workers/chunks/c3010d783506f8410f99.js +1 -0
  232. package/assets/esri/core/workers/chunks/c55c096669677321a227.js +1 -0
  233. package/assets/esri/core/workers/chunks/c86ca87959f04075e834.js +1 -0
  234. package/assets/esri/core/workers/chunks/c954d281038f6bf80232.js +1 -0
  235. package/assets/esri/core/workers/chunks/{c50e8d5f554cf151865c.js → ce16489cf7eb0d78c741.js} +2 -2
  236. package/assets/esri/core/workers/chunks/{c50e8d5f554cf151865c.js.LICENSE.txt → ce16489cf7eb0d78c741.js.LICENSE.txt} +1 -1
  237. package/assets/esri/core/workers/chunks/{a48f980c1531805db73b.js → d1fc2c6e95fe2572d297.js} +1 -1
  238. package/assets/esri/core/workers/chunks/{fc5ac54aab66562c8463.js → d51aabb9b950f49df183.js} +1 -1
  239. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  240. package/assets/esri/core/workers/chunks/{639d856cd217914dfe1f.js → de34c21d3e6913befe5a.js} +1 -1
  241. package/assets/esri/core/workers/chunks/e99fc64b67bb0c71dc34.js +1 -0
  242. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  243. package/assets/esri/core/workers/chunks/f6806780ca2aa591475a.js +1 -0
  244. package/assets/esri/themes/dark/main.css +1 -1
  245. package/assets/esri/themes/light/main.css +1 -1
  246. package/assets/esri/themes/light/view.css +1 -1
  247. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ar.json +1 -0
  248. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bg.json +1 -0
  249. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bs.json +1 -0
  250. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ca.json +1 -0
  251. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_cs.json +1 -0
  252. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_da.json +1 -0
  253. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_de.json +1 -0
  254. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_el.json +1 -0
  255. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_en.json +1 -0
  256. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_es.json +1 -0
  257. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_et.json +1 -0
  258. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fi.json +1 -0
  259. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fr.json +1 -0
  260. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_he.json +1 -0
  261. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hr.json +1 -0
  262. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hu.json +1 -0
  263. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_id.json +1 -0
  264. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_it.json +1 -0
  265. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ja.json +1 -0
  266. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ko.json +1 -0
  267. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lt.json +1 -0
  268. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lv.json +1 -0
  269. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_nl.json +1 -0
  270. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_no.json +1 -0
  271. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pl.json +1 -0
  272. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-BR.json +1 -0
  273. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-PT.json +1 -0
  274. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ro.json +1 -0
  275. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ru.json +1 -0
  276. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sk.json +1 -0
  277. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sl.json +1 -0
  278. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sr.json +1 -0
  279. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sv.json +1 -0
  280. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_th.json +1 -0
  281. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_tr.json +1 -0
  282. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_uk.json +1 -0
  283. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_vi.json +1 -0
  284. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-CN.json +1 -0
  285. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-HK.json +1 -0
  286. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-TW.json +1 -0
  287. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  288. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  289. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  290. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  291. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  292. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  293. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  294. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  295. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  296. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  297. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  298. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  299. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  300. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  301. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  302. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  303. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  304. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  305. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  306. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  307. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  308. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  309. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  310. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  311. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  312. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  313. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  314. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  315. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  316. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  317. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  318. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  319. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  320. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  321. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  322. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  323. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  324. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  325. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  326. package/chunks/ComponentShader.glsl.js +15 -16
  327. package/chunks/DefaultMaterial.glsl.js +15 -16
  328. package/chunks/Path.glsl.js +12 -12
  329. package/chunks/RealisticTree.glsl.js +5 -6
  330. package/chunks/aiServices.js +1 -1
  331. package/chunks/array.js +1 -1
  332. package/chunks/languageUtils.js +1 -1
  333. package/config.js +1 -1
  334. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  335. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  336. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  337. package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
  338. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  339. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  340. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  341. package/editing/sharedTemplates/templateDefinitions/parts/FeatureTemplateRelationshipPart.js +1 -1
  342. package/editing/sharedTemplates/templateDefinitions/parts/PresetTemplatePart.js +1 -1
  343. package/editing/sharedTemplates/templateDefinitions/parts/TemplatePartBase.js +1 -1
  344. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  345. package/interfaces.d.ts +106 -47
  346. package/kernel.js +1 -1
  347. package/layers/CSVLayer.js +1 -1
  348. package/layers/FeatureLayer.js +1 -1
  349. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  350. package/layers/OrientedImageryLayer.js +1 -1
  351. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  352. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  353. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  354. package/layers/support/BuildingFieldStatistics.js +5 -0
  355. package/layers/support/BuildingSummaryStatistics.js +1 -1
  356. package/layers/support/ControlPoint.js +5 -0
  357. package/layers/support/ControlPointsGeoreference.js +1 -1
  358. package/layers/support/DateTimeFieldFormat.js +1 -1
  359. package/layers/support/FieldConfiguration.js +1 -1
  360. package/layers/support/FieldFormat.js +1 -1
  361. package/layers/support/NumberFieldFormat.js +1 -1
  362. package/layers/support/Sublayer.js +1 -1
  363. package/layers/support/VideoFrame.js +1 -1
  364. package/layers/support/capabilities.js +1 -1
  365. package/layers/support/fieldConfigUtils.js +1 -1
  366. package/layers/support/fieldFormatUtils.js +5 -0
  367. package/layers/support/mediaUtils.js +1 -1
  368. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  369. package/layers/support/vectorTileLayerLoader.js +1 -1
  370. package/package.json +2 -2
  371. package/popup/FieldInfo.js +1 -1
  372. package/popup/content/FieldsContent.js +1 -1
  373. package/portal/Portal.js +1 -1
  374. package/portal/schemas/definitions.js +1 -1
  375. package/renderers/support/RasterSymbolizer.js +1 -1
  376. package/rest/sharedTemplates/addSharedTemplates.js +5 -0
  377. package/rest/sharedTemplates/querySharedTemplates.js +1 -1
  378. package/rest/sharedTemplates/utils.js +5 -0
  379. package/rest/support/imageMeasureUtils.js +1 -1
  380. package/support/ArcadeExpression.js +1 -1
  381. package/support/revision.js +1 -1
  382. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  383. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  384. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  385. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  386. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +1 -1
  387. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +1 -1
  388. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +1 -1
  389. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +1 -1
  390. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerStretchShader.js +1 -1
  391. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  392. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
  393. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  394. package/views/2d/layers/BaseLayerView2D.js +1 -1
  395. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  396. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  397. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  398. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  399. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +1 -1
  400. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  401. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  402. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  403. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  404. package/views/3d/environment/CloudsComposition.js +1 -1
  405. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  406. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  407. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  408. package/views/3d/layers/GaussianSplatLayerViewPerformanceInfo.js +5 -0
  409. package/views/3d/layers/I3SMeshView3D.js +1 -1
  410. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  411. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  412. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  413. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  414. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  415. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  416. package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
  417. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  418. package/views/3d/state/ViewState.js +1 -1
  419. package/views/3d/state/ViewStateManager.js +1 -1
  420. package/views/3d/support/QualitySettings.js +1 -1
  421. package/views/3d/support/ResourceController.js +1 -1
  422. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  423. package/views/3d/support/orientedBoundingBox.js +1 -1
  424. package/views/3d/terrain/TerrainRenderer.js +1 -1
  425. package/views/3d/webgl/RenderNode.js +1 -1
  426. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  427. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  428. package/views/3d/webgl-engine/collections/Component/{ComponentObjectElevationAgnosticComponentBVH.js → ComponentObjectElevationAgnosticBVH.js} +1 -1
  429. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +5 -0
  430. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  431. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  432. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  433. package/views/3d/webgl-engine/collections/Component/ObjectParameters.js +1 -1
  434. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  435. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  436. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  437. package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +0 -3
  438. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  439. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  440. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  441. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  442. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  443. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  444. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  445. package/views/GroundView.js +1 -1
  446. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +1 -1
  447. package/views/draw/input/DrawEvents.js +1 -1
  448. package/views/interactive/dragEventPipeline.js +1 -1
  449. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  450. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  451. package/views/layers/ImageryTileLayerView.js +1 -1
  452. package/views/support/Scheduler.js +1 -1
  453. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  454. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  455. package/widgets/Editor/EditorViewModel.js +1 -1
  456. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  457. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  458. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  459. package/widgets/Editor/UpdateWorkflow.js +1 -1
  460. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  461. package/widgets/Editor/components/FeatureList.js +1 -1
  462. package/widgets/Editor/workflowUtils.js +1 -1
  463. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  464. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  465. package/widgets/FeatureTable/support/templateUtils.js +1 -1
  466. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  467. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  468. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  469. package/widgets/OrientedImageryViewer.js +1 -1
  470. package/widgets/PanoramicVideoViewer.js +5 -0
  471. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +5 -0
  472. package/widgets/ScaleRangeSlider.js +1 -1
  473. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  474. package/assets/esri/core/workers/chunks/09c2004126f4a5242b85.js +0 -1
  475. package/assets/esri/core/workers/chunks/0dd6b8b3e634bb5f0ca7.js +0 -1
  476. package/assets/esri/core/workers/chunks/0dfc2ca36014910457ef.js +0 -1
  477. package/assets/esri/core/workers/chunks/1c7fffb496af6f2540dd.js +0 -1
  478. package/assets/esri/core/workers/chunks/1fc6311d4f0d27e88737.js +0 -1
  479. package/assets/esri/core/workers/chunks/268f5b233640a9dbbf89.js +0 -2
  480. package/assets/esri/core/workers/chunks/2fe96bf7dedef11a3b63.js +0 -1
  481. package/assets/esri/core/workers/chunks/336b54144afec0c7d396.js +0 -2
  482. package/assets/esri/core/workers/chunks/36a006c55766f9540bfc.js +0 -1
  483. package/assets/esri/core/workers/chunks/4840bd93d8fe15c7aefd.js +0 -1
  484. package/assets/esri/core/workers/chunks/637a5293e36f4f7f2853.js +0 -1
  485. package/assets/esri/core/workers/chunks/7540b34e743a23e67729.js +0 -1
  486. package/assets/esri/core/workers/chunks/7be11a3ef1f49245089f.js +0 -1
  487. package/assets/esri/core/workers/chunks/804e3b3df375177e6c86.js +0 -1
  488. package/assets/esri/core/workers/chunks/819a8bc1f0a694017ee6.js +0 -1
  489. package/assets/esri/core/workers/chunks/88d8ff0140f5ea97c6b7.js +0 -1
  490. package/assets/esri/core/workers/chunks/8de11aab65d91e7f1a4d.js +0 -1
  491. package/assets/esri/core/workers/chunks/96740c75ad65d651cc43.js +0 -1
  492. package/assets/esri/core/workers/chunks/9971de3f38a55735cec9.js +0 -1
  493. package/assets/esri/core/workers/chunks/9e47f680b66320dcfd34.js +0 -1
  494. package/assets/esri/core/workers/chunks/a2652d10bb0bc41c9a8d.js +0 -1
  495. package/assets/esri/core/workers/chunks/a7fcb60d5a9d2d9560e4.js +0 -1
  496. package/assets/esri/core/workers/chunks/aa84775399420e35c6a5.js +0 -1
  497. package/assets/esri/core/workers/chunks/b0508c96338d7cf296c1.js +0 -1
  498. package/assets/esri/core/workers/chunks/b09b34f64a6bc2b49e0a.js +0 -1
  499. package/assets/esri/core/workers/chunks/c0ae186620b68d43b338.js +0 -1
  500. package/assets/esri/core/workers/chunks/cc579c94438f48a0dbab.js +0 -1
  501. package/assets/esri/core/workers/chunks/ce0bf0d0cd9e9a90093b.js +0 -1
  502. package/assets/esri/core/workers/chunks/d142a42755a78bb157ed.js +0 -1
  503. package/assets/esri/core/workers/chunks/f35003a90163847fe1e2.js +0 -1
  504. package/assets/esri/core/workers/chunks/f6e18668f728dfd8ba5e.js +0 -2
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import r from"./FieldFormat.js";const s="auto";let p=class extends r{constructor(t){super(t),this.dateStyle=null,this.hour12=s,this.month=null,this.timeStyle=null,this.type="date-time",this.year=null}};t([o({type:["full","long","medium","short"],json:{write:!0}})],p.prototype,"dateStyle",void 0),t([o({type:["always","auto","never"],nonNullable:!0,json:{default:s,write:!0}})],p.prototype,"hour12",void 0),t([o({type:["long","short"],json:{write:!0}})],p.prototype,"month",void 0),t([o({type:["full","long","medium","short"],json:{write:!0}})],p.prototype,"timeStyle",void 0),t([o({type:["date-time"]})],p.prototype,"type",void 0),t([o({type:["numeric"],json:{write:!0}})],p.prototype,"year",void 0),p=t([e("esri.layers.support.DateTimeFieldFormat")],p);export{p as default};
5
+ import{__decorate as t}from"tslib";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import r from"./FieldFormat.js";const s="auto";let p=class extends r{constructor(t){super(t),this.dateStyle=null,this.hour12=s,this.month=null,this.timeStyle=null,this.type="date-time",this.year=null}};t([o({type:["full","long","medium","short"],json:{write:!0}})],p.prototype,"dateStyle",void 0),t([o({type:["always","auto","never"],nonNullable:!0,json:{default:s,write:!0}})],p.prototype,"hour12",void 0),t([o({type:["long","short"],json:{write:!0}})],p.prototype,"month",void 0),t([o({type:["full","long","medium","short"],json:{write:!0}})],p.prototype,"timeStyle",void 0),t([o({type:["date-time"]})],p.prototype,"type",void 0),t([o({type:["numeric"],json:{write:!0}})],p.prototype,"year",void 0),p=t([e("esri.layers.support.DateTimeFieldFormat")],p);const i=p;export{i as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import s from"./DateTimeFieldFormat.js";import p from"./FieldFormat.js";import a from"./NumberFieldFormat.js";const m={base:p,key:"type",errorContext:"field-configuration-field-format",typeMap:{"date-time":s,number:a}};let l=class extends(r(t)){constructor(o){super(o),this.alias=null,this.name=void 0,this.fieldFormat=null}};o([e({type:String,json:{write:!0}})],l.prototype,"alias",void 0),o([e({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),o([e({types:m,json:{write:!0}})],l.prototype,"fieldFormat",void 0),l=o([i("esri.layers.support.FieldConfiguration")],l);export{l as default};
5
+ import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{formatTypes as i}from"./fieldFormatUtils.js";let p=class extends(r(t)){constructor(o){super(o),this.alias=null,this.name=void 0,this.fieldFormat=null}};o([e({type:String,json:{write:!0}})],p.prototype,"alias",void 0),o([e({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],p.prototype,"name",void 0),o([e({types:i,json:{write:!0}})],p.prototype,"fieldFormat",void 0),p=o([s("esri.layers.support.FieldConfiguration")],p);export{p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as r}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let p=class extends(o(e)){constructor(r){super(r),this.type=null}};r([t({type:["date-time","number"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],p.prototype,"type",void 0),p=r([s("esri.layers.support.FieldFormat")],p);export{p as default};
5
+ import{__decorate as r}from"tslib";import{ClonableMixin as o}from"../../core/Clonable.js";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let p=class extends(o(e)){constructor(r){super(r),this.type=null}};r([t({type:["date-time","number"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],p.prototype,"type",void 0),p=r([s("esri.layers.support.FieldFormat")],p);const a=p;export{a as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{Integer as o}from"../../core/accessorSupport/ensureType.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import i from"./FieldFormat.js";const s={min:0,max:20},p=3,a=0,m="decimal",n="auto";let u=class extends i{constructor(t){super(t),this.maximumFractionDigits=p,this.minimumFractionDigits=a,this.style=m,this.type="number",this.useGrouping=n}};t([e({type:o,nonNullable:!0,range:s,json:{default:p,write:!0}})],u.prototype,"maximumFractionDigits",void 0),t([e({type:o,nonNullable:!0,range:s,json:{default:a,write:!0}})],u.prototype,"minimumFractionDigits",void 0),t([e({type:["decimal"],nonNullable:!0,json:{default:m,write:!0}})],u.prototype,"style",void 0),t([e({type:["number"]})],u.prototype,"type",void 0),t([e({type:["always","auto","never"],nonNullable:!0,json:{default:n,write:!0}})],u.prototype,"useGrouping",void 0),u=t([r("esri.layers.support.NumberFieldFormat")],u);export{u as default};
5
+ import{__decorate as t}from"tslib";import{Integer as o}from"../../core/accessorSupport/ensureType.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import i from"./FieldFormat.js";const s={min:0,max:20},p=3,a=0,m="decimal",n="auto";let u=class extends i{constructor(t){super(t),this.maximumFractionDigits=p,this.minimumFractionDigits=a,this.style=m,this.type="number",this.useGrouping=n}};t([e({type:o,nonNullable:!0,range:s,json:{default:p,write:!0}})],u.prototype,"maximumFractionDigits",void 0),t([e({type:o,nonNullable:!0,range:s,json:{default:a,write:!0}})],u.prototype,"minimumFractionDigits",void 0),t([e({type:["decimal"],nonNullable:!0,json:{default:m,write:!0}})],u.prototype,"style",void 0),t([e({type:["number"]})],u.prototype,"type",void 0),t([e({type:["always","auto","never"],nonNullable:!0,json:{default:n,write:!0}})],u.prototype,"useGrouping",void 0),u=t([r("esri.layers.support.NumberFieldFormat")],u);const l=u;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../PopupTemplate.js";import t from"../../request.js";import i from"../../core/Collection.js";import o from"../../core/Error.js";import has from"../../core/has.js";import{IdentifiableMixin as s}from"../../core/Identifiable.js";import{clone as a}from"../../core/lang.js";import{Loadable as l}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{MultiOriginJSONMixin as p}from"../../core/MultiOriginJSONSupport.js";import{sqlAnd as u}from"../../core/sql.js";import{objectToQuery as y}from"../../core/urlUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import{cast as c}from"../../core/accessorSupport/decorators/cast.js";import{reader as h}from"../../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../../core/accessorSupport/decorators/writer.js";import{ensureInteger as b,ensureType as g,Integer as w,ensureClass as I}from"../../core/accessorSupport/ensureType.js";import{nameToId as S}from"../../core/accessorSupport/PropertyOrigin.js";import{getProperties as v}from"../../core/accessorSupport/utils.js";import j from"../../geometry/Extent.js";import O from"../../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as F}from"../../geometry/support/typeUtils.js";import x from"../../graphic/MapImageGraphicOrigin.js";import L from"../../graphic/TileGraphicOrigin.js";import P from"../graphics/sources/support/QueryTask.js";import{readOrderByInfos as D}from"../mixins/OrderedLayer.js";import{getFeatureType as q}from"./featureLayerUtils.js";import T from"./FeatureType.js";import _ from"./Field.js";import E from"./FieldsIndex.js";import{fixRendererFields as M}from"./fieldUtils.js";import A from"./LabelClass.js";import{validateLabelingInfo as N}from"./labelingInfo.js";import k from"./LayerFloorInfo.js";import R from"./OrderByInfo.js";import B from"./Relationship.js";import{getFeatureLayerCapabilities as C}from"./serviceCapabilitiesUtils.js";import{DataLayerSource as V}from"./source/DataLayerSource.js";import{MapLayerSource as Q}from"./source/MapLayerSource.js";import{webSceneRendererTypes as U,rendererTypes as J}from"../../renderers/support/typeUtils.js";import{parseUrl as $}from"../../rest/utils.js";import G from"../../rest/support/AttachmentQuery.js";import K from"../../rest/support/Query.js";import{createPopupTemplate as z}from"../../support/popupUtils.js";import{isSymbol3D as H}from"../../symbols/support/typeUtils.js";import W from"../../tables/AttributeTableTemplate.js";var X;function Y(e){return"esriSMS"===e?.type}function Z(e,r,t){const i=t.minimumWritableOrigin||t.origin;return!!i&&e.originIdOf(r)>=S(i)}function ee(e,r,t){const i=Z(this,r,t);return{ignoreOrigin:!0,allowNull:i,enabled:!!t&&("map-image"===t.layer?.type&&(t.writeSublayerStructure||i))}}function re(e,r,t){return{enabled:!!t&&("tile"===t.layer?.type&&(Z(this,r,t)||this._isOverridden(r)))}}function te(e,r,t){return{ignoreOrigin:!0,enabled:t&&t.writeSublayerStructure||!1}}function ie(e,r,t){return{ignoreOrigin:!0,enabled:!!t?.writeSublayerStructure&&this.originIdOf(r)>2}}function oe(e,r,t){return{ignoreOrigin:!0,enabled:!!t&&(t.writeSublayerStructure||Z(this,r,t))}}let se=0;const ae=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let le=class extends(p(s(l))){static{X=this}constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise(this.reload(e)),this}readCapabilities(e,r){r=r.layerDefinition||r;const{attachment:t,operations:{supportsQuery:i,supportsQueryAttachments:o},query:{supportsFormatPBF:s,supportsOrderBy:a,supportsPagination:l},data:{supportsAttachment:n},queryRelated:p}=C(r,this.url);return{attachment:{supportsOrderByFields:t?.supportsOrderByFields??!1,supportsResize:t?.supportsResize??!1},exportMap:{supportsModification:!!r.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:o},data:{supportsAttachment:n},query:{supportsFormatPBF:s,supportsOrderBy:a,supportsPagination:l},queryRelated:p}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:r}=this;return{minScale:e,maxScale:r}}readMaxScaleRange(e,r){return{minScale:(r=r.layerDefinition||r).minScale??0,maxScale:r.maxScale??0}}get fieldsIndex(){return new E(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,r){if((r=r.layerDefinition||r).globalIdField)return r.globalIdField;if(r.fields)for(const t of r.fields)if("esriFieldTypeGlobalID"===t.type)return t.name}get graphicOrigin(){if(!this.layer)return null;switch(this.layer.type){case"tile":return new L(this.layer,this);case"map-image":return new x(this.layer,this)}}get id(){const e=this._get("id");return e??se++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,r){return"Table"===r.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,r,t,i){e&&e.length&&(r.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach(r=>r.layer=e)}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,r){return r.minScale||r.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,r){return r.maxScale||r.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,r){if((r=r.layerDefinition||r).objectIdField)return r.objectIdField;const t=r.fields?.find(e=>"esriFieldTypeOID"===e.type);return t?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,r){const{layerDefinition:t}=r;return 1-.01*(t?.transparency??t?.drawingInfo?.transparency??0)}writeOpacity(e,r,t,i){r.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,r){this.parent&&this.parent!==this.layer?r.parentLayerId=b(this.parent.id):r.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:r,layer:t,url:i}=this,{spatialReference:o}=t,s="gdbVersion"in t?t.gdbVersion:void 0,a=has("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new P({fieldsIndex:r,gdbVersion:s,pbfSupported:a,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:o,url:i})}set renderer(e){if(M(e,this.fieldsIndex),e)for(const r of e.symbols)if(H(r)){n.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new Q({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return g(i.ofType(X),e)}writeSublayers(e,r,t){this.sublayers?.length&&(r[t]=this.sublayers.map(e=>e.id).toArray().reverse())}readTitle(e,r){return r.layerDefinition?.name??r.name}readTypeIdField(e,r){let t=(r=r.layerDefinition||r).typeIdField;if(t&&r.fields){t=t.toLowerCase();const e=r.fields.find(e=>e.name.toLowerCase()===t);e&&(t=e.name)}return t}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,r=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===r?.type)return`${e.path}/${r.mapLayerId}`;const t={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${y(t)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,r,t,i){r[t]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=v(this),r=new X;return v(r).store=e.clone(ae),this.commitProperty("url"),r._lastParsedUrl=this._lastParsedUrl,r}createPopupTemplate(e){return z(this,e)}createQuery(){return new K({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await import("../FeatureLayer.js")).default,{layer:r,url:t}=this;let i;if(t&&this.originIdOf("url")>2)i=new e({url:t});else{if(!r?.parsedUrl)throw new o("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const t=r.parsedUrl;i=new e({url:t.path}),t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source)}}return null!=r?.refreshInterval&&(i.refreshInterval=r.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=a(this.floorInfo)),this.originIdOf("labelingInfo")>2&&(i.labelingInfo=a(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(i.visible=this.visible),this.originIdOf("minScale")>0&&(i.minScale=this.minScale),this.originIdOf("maxScale")>0&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(i.popupTemplate=a(this.popupTemplate)),this.originIdOf("renderer")>2&&(i.renderer=a(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(i.title=this.title),"map-image"===r?.type&&r.originIdOf("customParameters")>0&&(i.customParameters=r.customParameters),"tile"===r?.type&&r.originIdOf("customParameters")>0&&(i.customParameters=r.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return q(this.types,this.typeIdField,e)}getFieldDomain(e,r){const t=r?.feature,i=this.getFeatureType(t);if(i){const r=i.domains&&i.domains[e];if(r&&"inherited"!==r.type)return r}return this._getLayerDomain(e)}async queryAttachments(e,r){await this.load(),e=G.from(e);const t=this.capabilities;if(!t?.data?.supportsAttachment)throw new o("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:a,num:l,size:n,start:p,where:u}=e;if(!t?.operations?.supportsQueryAttachments){if(i?.length>0||a?.length>0||n?.length>0||l||p||u)throw new o("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e)}if(!(s?.length||a?.length||u))throw new o("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return!t?.attachment?.supportsOrderByFields&&e.orderByFields?.length&&((e=e.clone()).orderByFields=null),this.queryTask.executeAttachmentQuery(e,r)}async queryFeatureCount(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryFeatureCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryFeatures(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryFeatures:not-supported","this layer has no url.");const t=await this.queryTask.execute(e,{...r,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(t?.features){const e=this.graphicOrigin;for(const r of t.features)r.sourceLayer=this,r.origin=e}return t}async queryObjectIds(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryObjectIds:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeatures(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryRelatedFeatures:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeaturesCount(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new o("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new o("queryRelatedFeaturesCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async reload(e){if("not-loaded"===this.loadStatus)return this.load(e).then(()=>{});const{layer:r,url:i}=this;if(!r&&!i)throw new o("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const s=r?await r.fetchSublayerInfo(this,e):(await t(i,{query:{f:"json"},...e})).data;s&&(this.sourceJSON=s,this.read({layerDefinition:s},{origin:"service",layer:r,url:$(i)}))}toExportImageJSON(e){const r={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},t=u(e,this.definitionExpression);null!=t&&(r.definitionExpression=t);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,r)=>(e[r]=this.originIdOf(r),e),{}),o=Object.keys(i).some(e=>i[e]>2);if(o){const e=r.drawingInfo={};if(i.renderer>2&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>2&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>2)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some(e=>!e.labelPlacement)&&n.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let r=this.labelingInfo;null!=this.geometryType&&(r=N(this.labelingInfo,F.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=r.filter(e=>e.labelPlacement).map(e=>e.toJSON({origin:"service",layer:this.layer}))}else e.showLabels=!1;i.opacity>2&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>2&&(r.orderBy=this.orderBy?.map(e=>e.toJSON())??null),r}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,r){if(e){const t=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of t)Y(e.symbol)&&r(e.symbol);"symbol"in e&&Y(e.symbol)&&r(e.symbol),"defaultSymbol"in e&&Y(e.defaultSymbol)&&r(e.defaultSymbol)}}_setAndNotifyLayer(e,r){const t=this.layer,i=this._get(e);let o,s;switch(e){case"definitionExpression":case"floorInfo":o="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":o="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":o="supportsDynamicLayers",s="supportsModification";break;case"orderBy":o="supportsSublayerOrderBy",s="supportsModification"}const a=v(this).getDefaultOrigin();if("service"!==a){if(o&&!1===this.layer?.capabilities?.exportMap?.[o])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${o}'`);if(s&&!1===this.capabilities?.exportMap[s])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${s}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,r),"service"!==a&&i!==r&&t?.emit&&t.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,r){r&&(r.forEach(e=>{e.parent=null,e.layer=null}),this.removeAllHandles()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(n.getLogger(this).error(new o("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,r){const{layer:t,declaredClass:i}=this;n.getLogger(i).error(new o("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${t?.id}'`,{reason:r,sublayer:this,layer:t}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===ie||e===te||e===ee,isTileImageLayerOverridePolicy:e=>e===re}}};e([d({type:W,json:{name:"attributeTableInfo",write:{overridePolicy:ee},origins:{"web-scene":{write:!1}}}})],le.prototype,"attributeTableTemplate",void 0),e([d({readOnly:!0})],le.prototype,"capabilities",void 0),e([h("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],le.prototype,"readCapabilities",null),e([d()],le.prototype,"defaultPopupTemplate",null),e([d({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:ee}}})],le.prototype,"definitionExpression",null),e([d({readOnly:!0})],le.prototype,"effectiveScaleRange",null),e([h("service","maxScaleRange",["minScale","maxScale"])],le.prototype,"readMaxScaleRange",null),e([d({type:[_],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],le.prototype,"fields",void 0),e([d({readOnly:!0})],le.prototype,"fieldsIndex",null),e([d({type:k,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:ee},origins:{"web-scene":{read:!1,write:!1}}}})],le.prototype,"floorInfo",null),e([d({type:j,json:{read:{source:"layerDefinition.extent"}}})],le.prototype,"fullExtent",void 0),e([d({type:F.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:F.read}}}}})],le.prototype,"geometryType",void 0),e([d({type:String})],le.prototype,"globalIdField",void 0),e([h("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],le.prototype,"readGlobalIdFieldFromService",null),e([d({readOnly:!0})],le.prototype,"graphicOrigin",null),e([d({type:w,json:{write:{ignoreOrigin:!0}}})],le.prototype,"id",null),e([d({readOnly:!0})],le.prototype,"isTable",void 0),e([h("service","isTable",["type"])],le.prototype,"readIsTable",null),e([d({value:null,type:[A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:ie}}})],le.prototype,"labelingInfo",null),e([m("labelingInfo")],le.prototype,"writeLabelingInfo",null),e([d({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:te}}})],le.prototype,"labelsVisible",null),e([d({value:null})],le.prototype,"layer",null),e([d({type:String,json:{write:{overridePolicy:re}}})],le.prototype,"layerItemId",void 0),e([d({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:oe}}})],le.prototype,"legendEnabled",void 0),e([d({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],le.prototype,"listMode",null),e([d({type:Number,value:0,json:{write:{overridePolicy:te}}})],le.prototype,"minScale",null),e([h("minScale",["minScale","layerDefinition.minScale"])],le.prototype,"readMinScale",null),e([d({type:Number,value:0,json:{write:{overridePolicy:te}}})],le.prototype,"maxScale",null),e([h("maxScale",["maxScale","layerDefinition.maxScale"])],le.prototype,"readMaxScale",null),e([d()],le.prototype,"objectIdField",void 0),e([h("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],le.prototype,"readObjectIdFieldFromService",null),e([d({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:te}}})],le.prototype,"opacity",null),e([h("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],le.prototype,"readOpacity",null),e([m("opacity")],le.prototype,"writeOpacity",null),e([d({value:null,type:[R],json:{name:"layerDefinition.orderBy",read:{reader:D},write:{overridePolicy:ee},origins:{"web-scene":{read:!1,write:!1}}}})],le.prototype,"orderBy",null),e([d({json:{type:w,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:te}}})],le.prototype,"parent",void 0),e([m("parent")],le.prototype,"writeParent",null),e([d({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy:oe,writer(e,r,t){r[t]=!e}}}})],le.prototype,"popupEnabled",void 0),e([d({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:oe}}})],le.prototype,"popupTemplate",void 0),e([d({readOnly:!0})],le.prototype,"queryTask",null),e([d({type:[B],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],le.prototype,"relationships",void 0),e([d({types:J,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ie},origins:{"web-scene":{types:U,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ie}}}}})],le.prototype,"renderer",null),e([d({types:{key:"type",base:null,typeMap:{"data-layer":V,"map-layer":Q}},cast(e){if(e){if("mapLayerId"in e)return I(Q,e);if("dataSource"in e)return I(V,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:te}}})],le.prototype,"source",null),e([d()],le.prototype,"sourceJSON",void 0),e([d({type:O,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],le.prototype,"spatialReference",void 0),e([d({value:null,json:{type:[w],write:{target:"subLayerIds",allowNull:!0,overridePolicy:te}}})],le.prototype,"sublayers",null),e([c("sublayers")],le.prototype,"castSublayers",null),e([m("sublayers")],le.prototype,"writeSublayers",null),e([d({type:String,json:{name:"name",write:{overridePolicy:oe}}})],le.prototype,"title",void 0),e([h("service","title",["name","layerDefinition.name"])],le.prototype,"readTitle",null),e([d({type:String})],le.prototype,"typeIdField",void 0),e([d({json:{read:!1},readOnly:!0,value:"sublayer"})],le.prototype,"type",void 0),e([h("typeIdField",["layerDefinition.typeIdField"])],le.prototype,"readTypeIdField",null),e([d({type:[T],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],le.prototype,"types",void 0),e([d({type:String,json:{name:"layerUrl",write:{overridePolicy:re}}})],le.prototype,"url",null),e([d({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:te}}})],le.prototype,"visible",null),e([m("visible")],le.prototype,"writeVisible",null),le=X=e([f("esri.layers.support.Sublayer")],le);export{le as default};
5
+ import{__decorate as e}from"tslib";import r from"../../PopupTemplate.js";import t from"../../request.js";import i from"../../core/Collection.js";import o from"../../core/Error.js";import has from"../../core/has.js";import{IdentifiableMixin as s}from"../../core/Identifiable.js";import{clone as a}from"../../core/lang.js";import{Loadable as l}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{MultiOriginJSONMixin as p}from"../../core/MultiOriginJSONSupport.js";import{sqlAnd as u}from"../../core/sql.js";import{objectToQuery as y}from"../../core/urlUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import{cast as c}from"../../core/accessorSupport/decorators/cast.js";import{reader as h}from"../../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../../core/accessorSupport/decorators/writer.js";import{ensureInteger as b,ensureType as g,Integer as w,ensureClass as I}from"../../core/accessorSupport/ensureType.js";import{nameToId as S}from"../../core/accessorSupport/PropertyOrigin.js";import{getProperties as v}from"../../core/accessorSupport/utils.js";import j from"../../geometry/Extent.js";import O from"../../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as F}from"../../geometry/support/typeUtils.js";import x from"../../graphic/MapImageGraphicOrigin.js";import L from"../../graphic/TileGraphicOrigin.js";import P from"../graphics/sources/support/QueryTask.js";import{readOrderByInfos as D}from"../mixins/OrderedLayer.js";import{getFeatureType as q}from"./featureLayerUtils.js";import T from"./FeatureType.js";import _ from"./Field.js";import E from"./FieldsIndex.js";import{fixRendererFields as M}from"./fieldUtils.js";import A from"./LabelClass.js";import{validateLabelingInfo as N}from"./labelingInfo.js";import k from"./LayerFloorInfo.js";import R from"./OrderByInfo.js";import B from"./Relationship.js";import{getFeatureLayerCapabilities as C}from"./serviceCapabilitiesUtils.js";import{DataLayerSource as V}from"./source/DataLayerSource.js";import{MapLayerSource as Q}from"./source/MapLayerSource.js";import{webSceneRendererTypes as U,rendererTypes as J}from"../../renderers/support/typeUtils.js";import{parseUrl as $}from"../../rest/utils.js";import G from"../../rest/support/AttachmentQuery.js";import K from"../../rest/support/Query.js";import{createPopupTemplate as W}from"../../support/popupUtils.js";import{isSymbol3D as z}from"../../symbols/support/typeUtils.js";import H from"../../tables/AttributeTableTemplate.js";var X;function Y(e){return"esriSMS"===e?.type}function Z(e,r,t){const i=t.minimumWritableOrigin||t.origin;return!!i&&e.originIdOf(r)>=S(i)}function ee(e,r,t){const i=Z(this,r,t);return{ignoreOrigin:!0,allowNull:i,enabled:!!t&&("map-image"===t.layer?.type&&(t.writeSublayerStructure||i))}}function re(e,r,t){return{enabled:!!t&&("tile"===t.layer?.type&&(Z(this,r,t)||this._isOverridden(r)))}}function te(e,r,t){return{ignoreOrigin:!0,enabled:t&&t.writeSublayerStructure||!1}}function ie(e,r,t){return{ignoreOrigin:!0,enabled:!!t?.writeSublayerStructure&&this.originIdOf(r)>2}}function oe(e,r,t){return{ignoreOrigin:!0,enabled:!!t&&(t.writeSublayerStructure||Z(this,r,t))}}let se=0;const ae=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let le=class extends(p(s(l))){static{X=this}constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise(this.reload(e)),this}readCapabilities(e,r){r=r.layerDefinition||r;const{attachment:t,operations:{supportsQuery:i,supportsQueryAttachments:o},query:{supportsFormatPBF:s,supportsOrderBy:a,supportsPagination:l},data:{supportsAttachment:n},queryRelated:p}=C(r,this.url);return{attachment:{supportsOrderByFields:t?.supportsOrderByFields??!1,supportsResize:t?.supportsResize??!1,supportsTypeWildcard:t?.supportsTypeWildcard??!1},exportMap:{supportsModification:!!r.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:o},data:{supportsAttachment:n},query:{supportsFormatPBF:s,supportsOrderBy:a,supportsPagination:l},queryRelated:p}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:r}=this;return{minScale:e,maxScale:r}}readMaxScaleRange(e,r){return{minScale:(r=r.layerDefinition||r).minScale??0,maxScale:r.maxScale??0}}get fieldsIndex(){return new E(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,r){if((r=r.layerDefinition||r).globalIdField)return r.globalIdField;if(r.fields)for(const t of r.fields)if("esriFieldTypeGlobalID"===t.type)return t.name}get graphicOrigin(){if(!this.layer)return null;switch(this.layer.type){case"tile":return new L(this.layer,this);case"map-image":return new x(this.layer,this)}}get id(){const e=this._get("id");return e??se++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,r){return"Table"===r.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,r,t,i){e&&e.length&&(r.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach(r=>r.layer=e)}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,r){return r.minScale||r.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,r){return r.maxScale||r.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,r){if((r=r.layerDefinition||r).objectIdField)return r.objectIdField;const t=r.fields?.find(e=>"esriFieldTypeOID"===e.type);return t?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,r){const{layerDefinition:t}=r;return 1-.01*(t?.transparency??t?.drawingInfo?.transparency??0)}writeOpacity(e,r,t,i){r.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,r){this.parent&&this.parent!==this.layer?r.parentLayerId=b(this.parent.id):r.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:r,layer:t,url:i}=this,{spatialReference:o}=t,s="gdbVersion"in t?t.gdbVersion:void 0,a=has("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new P({fieldsIndex:r,gdbVersion:s,pbfSupported:a,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:o,url:i})}set renderer(e){if(M(e,this.fieldsIndex),e)for(const r of e.symbols)if(z(r)){n.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new Q({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return g(i.ofType(X),e)}writeSublayers(e,r,t){this.sublayers?.length&&(r[t]=this.sublayers.map(e=>e.id).toArray().reverse())}readTitle(e,r){return r.layerDefinition?.name??r.name}readTypeIdField(e,r){let t=(r=r.layerDefinition||r).typeIdField;if(t&&r.fields){t=t.toLowerCase();const e=r.fields.find(e=>e.name.toLowerCase()===t);e&&(t=e.name)}return t}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,r=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===r?.type)return`${e.path}/${r.mapLayerId}`;const t={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${y(t)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,r,t,i){r[t]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=v(this),r=new X;return v(r).store=e.clone(ae),this.commitProperty("url"),r._lastParsedUrl=this._lastParsedUrl,r}createPopupTemplate(e){return W(this,e)}createQuery(){return new K({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await import("../FeatureLayer.js")).default,{layer:r,url:t}=this;let i;if(t&&this.originIdOf("url")>2)i=new e({url:t});else{if(!r?.parsedUrl)throw new o("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const t=r.parsedUrl;i=new e({url:t.path}),t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source)}}return null!=r?.refreshInterval&&(i.refreshInterval=r.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=a(this.floorInfo)),this.originIdOf("labelingInfo")>2&&(i.labelingInfo=a(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(i.visible=this.visible),this.originIdOf("minScale")>0&&(i.minScale=this.minScale),this.originIdOf("maxScale")>0&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(i.popupTemplate=a(this.popupTemplate)),this.originIdOf("renderer")>2&&(i.renderer=a(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(i.title=this.title),"map-image"===r?.type&&r.originIdOf("customParameters")>0&&(i.customParameters=r.customParameters),"tile"===r?.type&&r.originIdOf("customParameters")>0&&(i.customParameters=r.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return q(this.types,this.typeIdField,e)}getFieldDomain(e,r){const t=r?.feature,i=this.getFeatureType(t);if(i){const r=i.domains&&i.domains[e];if(r&&"inherited"!==r.type)return r}return this._getLayerDomain(e)}async queryAttachments(e,r){await this.load(),e=G.from(e);const t=this.capabilities;if(!t?.data?.supportsAttachment)throw new o("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:a,num:l,size:n,start:p,where:u}=e;if(!t?.operations?.supportsQueryAttachments){if(i?.length>0||a?.length>0||n?.length>0||l||p||u)throw new o("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e)}if(!(s?.length||a?.length||u))throw new o("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return!t?.attachment?.supportsOrderByFields&&e.orderByFields?.length&&((e=e.clone()).orderByFields=null),this.queryTask.executeAttachmentQuery(e,r)}async queryFeatureCount(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryFeatureCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryFeatures(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryFeatures:not-supported","this layer has no url.");const t=await this.queryTask.execute(e,{...r,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(t?.features){const e=this.graphicOrigin;for(const r of t.features)r.sourceLayer=this,r.origin=e}return t}async queryObjectIds(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryObjectIds:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeatures(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryRelatedFeatures:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeaturesCount(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new o("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new o("queryRelatedFeaturesCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async reload(e){if("not-loaded"===this.loadStatus)return this.load(e).then(()=>{});const{layer:r,url:i}=this;if(!r&&!i)throw new o("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const s=r?await r.fetchSublayerInfo(this,e):(await t(i,{query:{f:"json"},...e})).data;s&&(this.sourceJSON=s,this.read({layerDefinition:s},{origin:"service",layer:r,url:$(i)}))}toExportImageJSON(e){const r={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},t=u(e,this.definitionExpression);null!=t&&(r.definitionExpression=t);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,r)=>(e[r]=this.originIdOf(r),e),{}),o=Object.keys(i).some(e=>i[e]>2);if(o){const e=r.drawingInfo={};if(i.renderer>2&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>2&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>2)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some(e=>!e.labelPlacement)&&n.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let r=this.labelingInfo;null!=this.geometryType&&(r=N(this.labelingInfo,F.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=r.filter(e=>e.labelPlacement).map(e=>e.toJSON({origin:"service",layer:this.layer}))}else e.showLabels=!1;i.opacity>2&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>2&&(r.orderBy=this.orderBy?.map(e=>e.toJSON())??null),r}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,r){if(e){const t=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of t)Y(e.symbol)&&r(e.symbol);"symbol"in e&&Y(e.symbol)&&r(e.symbol),"defaultSymbol"in e&&Y(e.defaultSymbol)&&r(e.defaultSymbol)}}_setAndNotifyLayer(e,r){const t=this.layer,i=this._get(e);let o,s;switch(e){case"definitionExpression":case"floorInfo":o="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":o="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":o="supportsDynamicLayers",s="supportsModification";break;case"orderBy":o="supportsSublayerOrderBy",s="supportsModification"}const a=v(this).getDefaultOrigin();if("service"!==a){if(o&&!1===this.layer?.capabilities?.exportMap?.[o])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${o}'`);if(s&&!1===this.capabilities?.exportMap[s])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${s}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,r),"service"!==a&&i!==r&&t?.emit&&t.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,r){r&&(r.forEach(e=>{e.parent=null,e.layer=null}),this.removeAllHandles()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(n.getLogger(this).error(new o("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,r){const{layer:t,declaredClass:i}=this;n.getLogger(i).error(new o("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${t?.id}'`,{reason:r,sublayer:this,layer:t}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===ie||e===te||e===ee,isTileImageLayerOverridePolicy:e=>e===re}}};e([d({type:H,json:{name:"attributeTableInfo",write:{overridePolicy:ee},origins:{"web-scene":{write:!1}}}})],le.prototype,"attributeTableTemplate",void 0),e([d({readOnly:!0})],le.prototype,"capabilities",void 0),e([h("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],le.prototype,"readCapabilities",null),e([d()],le.prototype,"defaultPopupTemplate",null),e([d({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:ee}}})],le.prototype,"definitionExpression",null),e([d({readOnly:!0})],le.prototype,"effectiveScaleRange",null),e([h("service","maxScaleRange",["minScale","maxScale"])],le.prototype,"readMaxScaleRange",null),e([d({type:[_],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],le.prototype,"fields",void 0),e([d({readOnly:!0})],le.prototype,"fieldsIndex",null),e([d({type:k,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:ee},origins:{"web-scene":{read:!1,write:!1}}}})],le.prototype,"floorInfo",null),e([d({type:j,json:{read:{source:"layerDefinition.extent"}}})],le.prototype,"fullExtent",void 0),e([d({type:F.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:F.read}}}}})],le.prototype,"geometryType",void 0),e([d({type:String})],le.prototype,"globalIdField",void 0),e([h("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],le.prototype,"readGlobalIdFieldFromService",null),e([d({readOnly:!0})],le.prototype,"graphicOrigin",null),e([d({type:w,json:{write:{ignoreOrigin:!0}}})],le.prototype,"id",null),e([d({readOnly:!0})],le.prototype,"isTable",void 0),e([h("service","isTable",["type"])],le.prototype,"readIsTable",null),e([d({value:null,type:[A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:ie}}})],le.prototype,"labelingInfo",null),e([m("labelingInfo")],le.prototype,"writeLabelingInfo",null),e([d({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:te}}})],le.prototype,"labelsVisible",null),e([d({value:null})],le.prototype,"layer",null),e([d({type:String,json:{write:{overridePolicy:re}}})],le.prototype,"layerItemId",void 0),e([d({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:oe}}})],le.prototype,"legendEnabled",void 0),e([d({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],le.prototype,"listMode",null),e([d({type:Number,value:0,json:{write:{overridePolicy:te}}})],le.prototype,"minScale",null),e([h("minScale",["minScale","layerDefinition.minScale"])],le.prototype,"readMinScale",null),e([d({type:Number,value:0,json:{write:{overridePolicy:te}}})],le.prototype,"maxScale",null),e([h("maxScale",["maxScale","layerDefinition.maxScale"])],le.prototype,"readMaxScale",null),e([d()],le.prototype,"objectIdField",void 0),e([h("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],le.prototype,"readObjectIdFieldFromService",null),e([d({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:te}}})],le.prototype,"opacity",null),e([h("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],le.prototype,"readOpacity",null),e([m("opacity")],le.prototype,"writeOpacity",null),e([d({value:null,type:[R],json:{name:"layerDefinition.orderBy",read:{reader:D},write:{overridePolicy:ee},origins:{"web-scene":{read:!1,write:!1}}}})],le.prototype,"orderBy",null),e([d({json:{type:w,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:te}}})],le.prototype,"parent",void 0),e([m("parent")],le.prototype,"writeParent",null),e([d({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy:oe,writer(e,r,t){r[t]=!e}}}})],le.prototype,"popupEnabled",void 0),e([d({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:oe}}})],le.prototype,"popupTemplate",void 0),e([d({readOnly:!0})],le.prototype,"queryTask",null),e([d({type:[B],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],le.prototype,"relationships",void 0),e([d({types:J,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ie},origins:{"web-scene":{types:U,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ie}}}}})],le.prototype,"renderer",null),e([d({types:{key:"type",base:null,typeMap:{"data-layer":V,"map-layer":Q}},cast(e){if(e){if("mapLayerId"in e)return I(Q,e);if("dataSource"in e)return I(V,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:te}}})],le.prototype,"source",null),e([d()],le.prototype,"sourceJSON",void 0),e([d({type:O,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],le.prototype,"spatialReference",void 0),e([d({value:null,json:{type:[w],write:{target:"subLayerIds",allowNull:!0,overridePolicy:te}}})],le.prototype,"sublayers",null),e([c("sublayers")],le.prototype,"castSublayers",null),e([m("sublayers")],le.prototype,"writeSublayers",null),e([d({type:String,json:{name:"name",write:{overridePolicy:oe}}})],le.prototype,"title",void 0),e([h("service","title",["name","layerDefinition.name"])],le.prototype,"readTitle",null),e([d({type:String})],le.prototype,"typeIdField",void 0),e([d({json:{read:!1},readOnly:!0,value:"sublayer"})],le.prototype,"type",void 0),e([h("typeIdField",["layerDefinition.typeIdField"])],le.prototype,"readTypeIdField",null),e([d({type:[T],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],le.prototype,"types",void 0),e([d({type:String,json:{name:"layerUrl",write:{overridePolicy:re}}})],le.prototype,"url",null),e([d({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:te}}})],le.prototype,"visible",null),e([m("visible")],le.prototype,"writeVisible",null),le=X=e([f("esri.layers.support.Sublayer")],le);export{le as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import r from"../../core/Accessor.js";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as n}from"../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import c from"../../geometry/Point.js";let l=class extends r{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};function m(o){return null!=o?.sourcePoint&&null!=o.mapPoint}o([s()],l.prototype,"sourcePoint",void 0),o([s({type:c})],l.prototype,"mapPoint",void 0),l=o([i("esri.layers.support.VideoFrame.ControlPoint")],l);let a=class extends(t(e)){constructor(o){super(o),this.frame=null,this.controlPoints=null}readControlPoints(o){return o.map(o=>({sourcePoint:{x:o.frameX,y:o.frameY},mapPoint:new c(o.point)}))}writeControlPoints(o,r){null!=o&&m(o[0])&&(r.controlPoints=o.map(o=>{const r=o.sourcePoint,t=o.mapPoint;return{frameX:r.x,frameY:r.y,point:t.toJSON()}}))}};o([s({type:String})],a.prototype,"frame",void 0),o([s({type:[l],json:{write:{allowNull:!1,isRequired:!0}}})],a.prototype,"controlPoints",void 0),o([n("controlPoints")],a.prototype,"readControlPoints",null),o([p("controlPoints")],a.prototype,"writeControlPoints",null),a=o([i("esri.layers.support.VideoFrame")],a);const u=a;export{u as default};
5
+ import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/Point.js";import c from"./ControlPoint.js";function l(o){return null!=o?.sourcePoint&&null!=o.mapPoint}let m=class extends(r(t)){constructor(o){super(o),this.frame=null,this.controlPoints=null}readControlPoints(o){return o.map(o=>({sourcePoint:{x:o.frameX,y:o.frameY},mapPoint:new p(o.point)}))}writeControlPoints(o,r){null!=o&&l(o[0])&&(r.controlPoints=o.map(o=>{const r=o.sourcePoint,t=o.mapPoint;return{frameX:r.x,frameY:r.y,point:t.toJSON()}}))}};o([e({type:String})],m.prototype,"frame",void 0),o([e({type:[c],json:{write:{allowNull:!1,isRequired:!0}}})],m.prototype,"controlPoints",void 0),o([s("controlPoints")],m.prototype,"readControlPoints",null),o([i("controlPoints")],m.prototype,"writeControlPoints",null),m=o([n("esri.layers.support.VideoFrame")],m);const a=m;export{a as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},t={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,maxUniqueIDCount:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}};export{t as zeroCapabilities,s as zeroQueryBins};
5
+ const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},t={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1,supportsTypeWildcard:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,maxUniqueIDCount:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}};export{t as zeroCapabilities,s as zeroQueryBins};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{clone as e}from"../../core/lang.js";import t from"./DateTimeFieldFormat.js";import n from"./FieldConfiguration.js";import{isNumericField as r,isDateField as o,isDateOnlyField as a,isTimeOnlyField as i,isTimestampOffsetField as s,isFieldEditable as l}from"./fieldUtils.js";import u from"./NumberFieldFormat.js";import c from"../../popup/FieldInfo.js";import m from"../../popup/support/FieldInfoFormat.js";function f(e){const{popupTemplate:t,fieldsIndex:r}=e,o=t?.fieldInfos;if(!o?.length||!r)return;const a=[];for(const{fieldName:i,label:s,format:l}of o){const e=r.get(i);if(!e)continue;const t=s&&s!==e.alias?s:null,o=I(e)?l?d(l,e):j(e):null;(t||o)&&a.push(new n({name:e.name,alias:t,fieldFormat:o}))}return a.length?a:null}function d(e,t){if(I(t))switch(t.type){case"integer":case"small-integer":case"big-integer":case"long":return h(e);case"single":case"double":return g(e);case"date":case"timestamp-offset":return p(e);case"date-only":return y(e);case"time-only":return F(e)}}function h(e){return new u({useGrouping:e.digitSeparator?"always":"never"})}function g(e){const t=h(e);return null!=e.places&&(t.maximumFractionDigits=t.minimumFractionDigits=e.places),t}function p(e){return new t({dateStyle:w(e),year:$(e),month:S(e),timeStyle:x(e),hour12:b(e)})}function y(e){return new t({dateStyle:w(e),year:$(e),month:S(e)})}function F(e){return new t({timeStyle:x(e),hour12:b(e)})}function w(e){const{dateFormat:t}=e;return t?t.startsWith("short-date")?"short":t.startsWith("day-short-month-year")?"medium":t.startsWith("long-month-day-year")?"long":t.startsWith("long-date")?"full":null:null}function b(e){return e.dateFormat?.endsWith("-24")?"never":"always"}function S(e){switch(e.dateFormat){case"short-month-year":return"short";case"long-month-year":return"long";default:return null}}function x(e){const{dateFormat:t}=e;return t?t.includes("short-time")?"short":t.includes("long-time")?"medium":null:null}function $(e){switch(e.dateFormat){case"short-month-year":case"long-month-year":case"year":return"numeric";default:return null}}function D(e){const{fields:t}=e;if(!t?.length)return;const r=[];for(const o of t){const e=I(o)?j(o,{maximumFractionDigits:2}):null;e&&r.push(new n({name:o.name,fieldFormat:e}))}return r.length?r:null}function I(e){return r(e)||o(e)||a(e)||i(e)||s(e)}function j(e,n){if(!I(e))return;const r=n?.maximumFractionDigits??3;switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return new u({maximumFractionDigits:0,minimumFractionDigits:0});case"single":case"double":return new u({maximumFractionDigits:r,minimumFractionDigits:0});case"date":case"timestamp-offset":return new t({dateStyle:"short",timeStyle:"short"});case"date-only":return new t({dateStyle:"short"});case"time-only":return new t({timeStyle:"short"})}}function v(e,t){const{popupTemplate:n,fieldsIndex:r}=e;if(!n||!r)return;const o=W(e,t,n.fieldInfos);if(!o)return;const a=n.clone();return a.fieldInfos=o,a}function W(t,n,r){n??=[],r=r?e(r):[];let o=!1;const a=new Map;for(const e of n){const n=t.fieldsIndex.get(e.name);n&&a.set(n.name,e)}for(const e of r){const n=t.fieldsIndex.get(e.fieldName);if(!n)continue;const r=a.get(n.name);e.label=r?.alias||n.alias,e.format=I(n)&&r?.fieldFormat?T(r.fieldFormat,n):null,o=!0,a.delete(n.name)}for(const e of a.values()){const n=N(t,e);n&&(r.push(n),o=!0)}return o?r:null}function N(e,t){const{name:n,alias:r,fieldFormat:o}=t,a=e.fieldsIndex.get(n);if(!a||!r&&!o)return;const i=r||a.alias,s=I(a)&&o?T(o,a):null;return new c({fieldName:a.name,label:i,format:s,visible:!1,isEditable:l(a,e)})}function T(e,t){if(!I(t))return;const n="number"===e.type,r="date-time"===e.type;switch(t.type){case"integer":case"small-integer":case"big-integer":case"long":return n?G(e):null;case"single":case"double":return n?C(e):null;case"date":case"timestamp-offset":return r?E(e):null;case"date-only":return r?M(e):null;case"time-only":return r?U(e):null}}function G(e){return new m({digitSeparator:"never"!==e.useGrouping})}function C(e){const t=G(e);return t.places=e.maximumFractionDigits,t}function E(e){let t;const n=k(e),r=q(e),o="never"===e.hour12?"24":null,a="numeric"===e.year?"year":null,i=z(e);return n&&r&&o?t=`${n}-${r}-${o}`:n&&r?t=`${n}-${r}`:n?t=n:a&&i?t=`${i}-${a}`:a&&(t=a),t?new m({dateFormat:t}):null}function M(e){let t;const n=k(e),r="numeric"===e.year?"year":null,o=z(e);return n?t=n:r&&o?t=`${o}-${r}`:r&&(t=r),t?new m({dateFormat:t}):null}function U(e){let t;const n=q(e),r="never"===e.hour12?"24":null;return n&&r?t=`short-date-${n}-${r}`:n&&(t=`short-date-${n}`),t?new m({dateFormat:t}):null}function k(e){switch(e.dateStyle){case"short":return"short-date";case"medium":return"day-short-month-year";case"long":return"long-month-day-year";case"full":return"long-date";default:return}}function q(e){return e.timeStyle&&("short"===e.timeStyle?"short-time":"long-time")}function z(e){switch(e.month){case"short":return"short-month";case"long":return"long-month";default:return}}export{j as defaultFieldFormat,D as fieldConfigurationsFromFields,f as fieldConfigurationsFromPopupTemplate,d as fieldFormatFromFieldInfoFormat,T as fieldInfoFormatFromFieldFormat,I as isFormattableField,v as popupTemplateWithFieldConfigurations};
5
+ import{clone as n}from"../../core/lang.js";import e from"./FieldConfiguration.js";import{isFormattableField as o,fieldFormatFromFieldInfoFormat as t,defaultFieldFormat as l,fieldInfoFormatFromFieldFormat as i}from"./fieldFormatUtils.js";import{isFieldEditable as f}from"./fieldUtils.js";import s from"../../popup/FieldInfo.js";function r(n){const{popupTemplate:i,fieldsIndex:f}=n,s=i?.fieldInfos;if(!s?.length||!f)return;const r=[];for(const{fieldName:a,label:u,format:m}of s){const n=f.get(a);if(!n)continue;const i=u&&u!==n.alias?u:null,s=o(n)?m?t(m,n):l(n,{hour12:"always",useGrouping:"always"}):null;(i||s)&&r.push(new e({name:n.name,alias:i,fieldFormat:s}))}return r.length?r:null}function a(n){const{fields:t}=n;if(!t?.length)return;const i=[];for(const f of t){const n=o(f)?l(f):null;n&&i.push(new e({name:f.name,fieldFormat:n}))}return i.length?i:null}function u(n,e){const{popupTemplate:o,fieldsIndex:t}=n;if(!o||!t)return;const l=m(n,e,o.fieldInfos);if(!l)return;const i=o.clone();return i.fieldInfos=l,i}function m(e,t,l){t??=[],l=l?n(l):[];let f=!1;const s=new Map;for(const n of t){const o=e.fieldsIndex.get(n.name);o&&s.set(o.name,n)}for(const n of l){const t=e.fieldsIndex.get(n.fieldName);if(!t)continue;const l=s.get(t.name);n.label=l?.alias||t.alias,n.format=o(t)&&l?.fieldFormat?i(l.fieldFormat,t):null,f=!0,s.delete(t.name)}for(const n of s.values()){const o=c(e,n);o&&(l.push(o),f=!0)}return f?l:null}function c(n,e){const{name:t,alias:l,fieldFormat:r}=e,a=n.fieldsIndex.get(t);if(!a||!l&&!r)return;const u=l||a.alias,m=o(a)&&r?i(r,a):null;return new s({fieldName:a.name,label:u,format:m,visible:!1,isEditable:f(a,n)})}export{a as fieldConfigurationsFromFields,r as fieldConfigurationsFromPopupTemplate,u as popupTemplateWithFieldConfigurations};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import t from"./DateTimeFieldFormat.js";import e from"./FieldFormat.js";import{isNumericField as n,isDateField as r,isDateOnlyField as o,isTimeOnlyField as a,isTimestampOffsetField as u}from"./fieldUtils.js";import i from"./NumberFieldFormat.js";import s from"../../popup/support/FieldInfoFormat.js";const l={base:e,key:"type",errorContext:"field-configuration-field-format",typeMap:{"date-time":t,number:i}};function c(t,e){const{dateFormat:n}=t;if(!e)return n?f(t):h(t);if(!m(e))return;const r={hour12:"always"};switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return d(t);case"single":case"double":return h(t);case"date":case"timestamp-offset":return n?f(t):I(e,r);case"date-only":return n?y(t):I(e);case"time-only":return n?g(t):I(e,r)}}function m(t){return n(t)||r(t)||o(t)||a(t)||u(t)}function d(t){return new i({useGrouping:t.digitSeparator?"always":"never"})}function h(t){const e=d(t);return e.maximumFractionDigits=e.minimumFractionDigits=t.places??2,e}function f(e){return new t({dateStyle:p(e),year:$(e),month:w(e),timeStyle:S(e),hour12:F(e)})}function y(e){return new t({dateStyle:p(e),year:$(e),month:w(e)})}function g(e){return new t({timeStyle:S(e),hour12:F(e)})}function p(t){const{dateFormat:e}=t;return e?e.startsWith("short-date")?"short":e.startsWith("day-short-month-year")?"medium":e.startsWith("long-month-day-year")?"long":e.startsWith("long-date")?"full":null:null}function F(t){return t.dateFormat?.endsWith("-24")?"never":"always"}function w(t){switch(t.dateFormat){case"short-month-year":return"short";case"long-month-year":return"long";default:return null}}function S(t){const{dateFormat:e}=t;return e?e.includes("short-time")?"short":e.includes("long-time")?"medium":null:null}function $(t){switch(t.dateFormat){case"short-month-year":case"long-month-year":case"year":return"numeric";default:return null}}function b(t,e){const n="number"===t.type,r="date-time"===t.type;if(!e)return n?x(t):r?j(t):null;if(m(e))switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return n?D(t):null;case"single":case"double":return n?x(t):null;case"date":case"timestamp-offset":return r?j(t):null;case"date-only":return r?v(t):null;case"time-only":return r?G(t):null}}function D(t){return new s({digitSeparator:"never"!==t.useGrouping})}function x(t){const e=D(t);return e.places=t.maximumFractionDigits,e}function j(t){let e;const n=W(t),r=k(t),o="never"===t.hour12?"24":null,a="numeric"===t.year?"year":null,u=C(t);return n&&r&&o?e=`${n}-${r}-${o}`:n&&r?e=`${n}-${r}`:n?e=n:a&&u?e=`${u}-${a}`:a&&(e=a),e?new s({dateFormat:e}):null}function v(t){let e;const n=W(t),r="numeric"===t.year?"year":null,o=C(t);return n?e=n:r&&o?e=`${o}-${r}`:r&&(e=r),e?new s({dateFormat:e}):null}function G(t){let e;const n=k(t),r="never"===t.hour12?"24":null;return n&&r?e=`short-date-${n}-${r}`:n&&(e=`short-date-${n}`),e?new s({dateFormat:e}):null}function W(t){switch(t.dateStyle){case"short":return"short-date";case"medium":return"day-short-month-year";case"long":return"long-month-day-year";case"full":return"long-date";default:return}}function k(t){return t.timeStyle&&("short"===t.timeStyle?"short-time":"long-time")}function C(t){switch(t.month){case"short":return"short-month";case"long":return"long-month";default:return}}function I(e,n){if(!m(e))return;const r=n?.useGrouping??"auto",o=n?.hour12??"auto";switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return new i({maximumFractionDigits:0,minimumFractionDigits:0,useGrouping:r});case"single":case"double":return new i({maximumFractionDigits:2,minimumFractionDigits:0,useGrouping:r});case"date":case"timestamp-offset":return new t({dateStyle:"short",timeStyle:"short",hour12:o});case"date-only":return new t({dateStyle:"short"});case"time-only":return new t({timeStyle:"short",hour12:o})}}export{I as defaultFieldFormat,c as fieldFormatFromFieldInfoFormat,b as fieldInfoFormatFromFieldFormat,l as formatTypes,m as isFormattableField};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{createScreenPoint as e}from"../../core/screenUtils.js";import{nameToId as t}from"../../core/accessorSupport/PropertyOrigin.js";import n from"../../geometry/Extent.js";import o from"../../geometry/Point.js";import{getInfo as r}from"../../geometry/support/spatialReferenceUtils.js";import i from"./ControlPointsGeoreference.js";import s from"./CornersGeoreference.js";import a from"./ExtentAndRotationGeoreference.js";import c from"./GeoreferenceBase.js";const p=100,l=.5;async function y(e,t){e.loaded||await e.load();const{contentWidth:s,contentHeight:a}=e,{spatialReference:c}=t,y=r(c);let m=!1;if(y){const e=y.valid[1]-y.valid[0];t.width>e&&(t=new n({xmin:y.valid[0],ymin:t.ymin,xmax:y.valid[1],ymax:t.ymax,spatialReference:t.spatialReference}),m=!0)}const f=t.expand(l),{center:u,width:P,height:d}=f,x=s/a,w=m||x>1,g=w?p:p*x,h=w?p/x:p,R=w?P:d*x,j=w?P/x:d,v=u.x-R/2,b=u.x+R/2,G=u.y+j/2,O=u.y-j/2;return new i({controlPoints:[{sourcePoint:{x:g,y:a-h},mapPoint:new o({x:v,y:O,spatialReference:c})},{sourcePoint:{x:g,y:h},mapPoint:new o({x:v,y:G,spatialReference:c})},{sourcePoint:{x:s-g,y:h},mapPoint:new o({x:b,y:G,spatialReference:c})},{sourcePoint:{x:s-g,y:a-h},mapPoint:new o({x:b,y:O,spatialReference:c})}],width:s,height:a})}function m(e){const t=e.georeference;if("control-points"!==t.type)return null;const n={wkid:0},{width:r,height:s}=t,a=t.controlPoints;return new i({controlPoints:a.map(e=>{const{x:t,y:r}=e.sourcePoint;return{sourcePoint:{x:t,y:r},mapPoint:new o({x:t,y:s-r,spatialReference:n})}}),width:r,height:s})}function f(e){return"media"===e?.type}function u(e,n){const o=t(n);return f(e)&&!!e.portalItem&&null!=o&&o>3}function P(t,n,r){if(!t||"control-points"===t.type)return t;const{coords:s}=t;if(5!==s?.rings[0]?.length)return null;const[a,c,p,l]=s.rings[0],{spatialReference:y}=s;return new i({controlPoints:[{mapPoint:new o({x:a[0],y:a[1],spatialReference:y}),sourcePoint:e(0,r)},{mapPoint:new o({x:c[0],y:c[1],spatialReference:y}),sourcePoint:e(0,0)},{mapPoint:new o({x:p[0],y:p[1],spatialReference:y}),sourcePoint:e(n,0)},{mapPoint:new o({x:l[0],y:l[1],spatialReference:y}),sourcePoint:e(n,r)}],width:n,height:r})}function d(e,t,n){return{enabled:!u(n?.layer,n?.origin),ignoreOrigin:!0}}const x={json:{name:"url",type:String,write:{overridePolicy:d}}},w={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:d}}},g={types:{key:"type",base:c,typeMap:{"control-points":i,corners:s,"extent-and-rotation":a}},json:{types:{key:"type",base:c,typeMap:{"control-points":i}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};export{y as createDefaultControlPointsGeoreference,m as createLocalModeControlPointsGeoreference,u as isWritingLayerFromItemToWebDocument,x as mediaElementUrlProperty,g as mediaGeoreferenceProperty,w as mediaTypeProperty,P as toControlPointsGeoreference};
5
+ import{createScreenPoint as e}from"../../core/screenUtils.js";import{nameToId as n}from"../../core/accessorSupport/PropertyOrigin.js";import t from"../../geometry/Extent.js";import o from"../../geometry/Point.js";import{getInfo as r}from"../../geometry/support/spatialReferenceUtils.js";import i from"./ControlPoint.js";import s from"./ControlPointsGeoreference.js";import a from"./CornersGeoreference.js";import c from"./ExtentAndRotationGeoreference.js";import p from"./GeoreferenceBase.js";const l=100,y=.5;async function m(e,n){e.loaded||await e.load();const{contentWidth:a,contentHeight:c}=e,{spatialReference:p}=n,m=r(p);let f=!1;if(m){const e=m.valid[1]-m.valid[0];n.width>e&&(n=new t({xmin:m.valid[0],ymin:n.ymin,xmax:m.valid[1],ymax:n.ymax,spatialReference:n.spatialReference}),f=!0)}const u=n.expand(y),{center:w,width:P,height:d}=u,x=a/c,g=f||x>1,h=g?l:l*x,R=g?l/x:l,j=g?P:d*x,v=g?P/x:d,b=w.x-j/2,G=w.x+j/2,O=w.y+v/2,k=w.y-v/2;return new s({controlPoints:[new i({sourcePoint:{x:h,y:c-R},mapPoint:new o({x:b,y:k,spatialReference:p})}),new i({sourcePoint:{x:h,y:R},mapPoint:new o({x:b,y:O,spatialReference:p})}),new i({sourcePoint:{x:a-h,y:R},mapPoint:new o({x:G,y:O,spatialReference:p})}),new i({sourcePoint:{x:a-h,y:c-R},mapPoint:new o({x:G,y:k,spatialReference:p})})],width:a,height:c})}function f(e){const n=e.georeference;if("control-points"!==n.type)return null;const t={wkid:0},{width:r,height:i}=n,a=n.controlPoints;return new s({controlPoints:a.map(e=>{const{x:n,y:r}=e.sourcePoint;return{sourcePoint:{x:n,y:r},mapPoint:new o({x:n,y:i-r,spatialReference:t})}}),width:r,height:i})}function u(e){return"media"===e?.type}function w(e,t){const o=n(t);return u(e)&&!!e.portalItem&&null!=o&&o>3}function P(n,t,r){if(!n||"control-points"===n.type)return n;const{coords:a}=n;if(5!==a?.rings[0]?.length)return null;const[c,p,l,y]=a.rings[0],{spatialReference:m}=a;return new s({controlPoints:[new i({mapPoint:new o({x:c[0],y:c[1],spatialReference:m}),sourcePoint:e(0,r)}),new i({mapPoint:new o({x:p[0],y:p[1],spatialReference:m}),sourcePoint:e(0,0)}),new i({mapPoint:new o({x:l[0],y:l[1],spatialReference:m}),sourcePoint:e(t,0)}),new i({mapPoint:new o({x:y[0],y:y[1],spatialReference:m}),sourcePoint:e(t,r)})],width:t,height:r})}function d(e,n,t){return{enabled:!w(t?.layer,t?.origin),ignoreOrigin:!0}}const x={json:{name:"url",type:String,write:{overridePolicy:d}}},g={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:d}}},h={types:{key:"type",base:p,typeMap:{"control-points":s,corners:a,"extent-and-rotation":c}},json:{types:{key:"type",base:p,typeMap:{"control-points":s}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};export{m as createDefaultControlPointsGeoreference,f as createLocalModeControlPointsGeoreference,w as isWritingLayerFromItemToWebDocument,x as mediaElementUrlProperty,h as mediaGeoreferenceProperty,g as mediaTypeProperty,P as toControlPointsGeoreference};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../core/has.js";import{isHostedAgolService as t,parse as s}from"./arcgisLayerUrl.js";import{getGltfQueryFormat as e}from"./infoFor3D.js";import{readNumber as r,readBoolean as p}from"../../rest/support/jsonUtils.js";const o={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function u(t){const s=t?.supportedSpatialAggregationStatistics?.map(t=>t.toLowerCase());return{envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function n(t,s){const e=t?.supportedOperationsWithCacheHint?.map(t=>t.toLowerCase());return!!e?.includes(s.toLowerCase())}function i(t){const s=t?.supportedStatisticTypes?.map(t=>t.toLowerCase());return{count:!!s?.includes("count"),sum:!!s?.includes("sum"),min:!!s?.includes("min"),max:!!s?.includes("max"),avg:!!s?.includes("avg"),var:!!s?.includes("var"),stddev:!!s?.includes("stddev"),percentileContinuous:!!s?.includes("percentile_cont"),percentileDiscrete:!!s?.includes("percentile_disc"),envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function a(t){const s=t?.supportedNormalizationTypes?.map(t=>t.toLowerCase());return{field:!!s?.includes("field"),log:!!s?.includes("log"),naturalLog:!!s?.includes("naturallog"),percentOfTotal:!!s?.includes("percentoftotal"),squareRoot:!!s?.includes("squareroot")}}function c(t,s){return{analytics:d(t),attachment:l(t),data:y(t),metadata:m(t),operations:g(t.capabilities,t,s),query:C(t,s),queryAttributeBins:Q(t),queryRelated:v(t),queryTopFeatures:h(t),editing:S(t)}}function d(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryAnalytics")}}function l(t){const s=t.attachmentProperties,e={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:n(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:p(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:p(t,"supportsAttachmentsResizing",!1)};return s&&Array.isArray(s)&&s.forEach(t=>{const s=o[t.name];s&&(e[s]=!!t.isEnabled)}),e}function y(t){return{isVersioned:p(t,"isDataVersioned",!1),isBranchVersioned:p(t,"isDataBranchVersioned",!1),supportsAttachment:p(t,"hasAttachments",!1),supportsM:p(t,"hasM",!1),supportsZ:p(t,"hasZ",!1)}}function m(t){return{supportsAdvancedFieldProperties:p(t,"supportsFieldDescriptionProperty",!1)}}function g(t,e,r){const o=t?.toLowerCase().split(",").map(t=>t.trim())??[],u=r?s(r):null,n=o.includes("MapServer"===u?.serverType?"data":"query"),i=o.includes("editing")&&!e.datesInUnknownTimezone&&!(!0===e.uniqueIdInfo?.OIDFieldContainsHashValue);let a=i&&o.includes("create"),c=i&&o.includes("delete"),d=i&&o.includes("update");const l=o.includes("changetracking"),y=e.advancedQueryCapabilities;return i&&!(a||c||d)&&(a=c=d=!0),{supportsCalculate:p(e,"supportsCalculate",!1),supportsTruncate:p(e,"supportsTruncate",!1),supportsValidateSql:p(e,"supportsValidateSql",!1),supportsAdd:a,supportsDelete:c,supportsEditing:i,supportsChangeTracking:l,supportsQuery:n,supportsQueryAnalytics:p(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:p(y,"supportsQueryAttachments",!1),supportsQueryBins:p(y,"supportsQueryBins",!1)||!!e.queryBinsCapabilities,supportsQueryTopFeatures:p(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:p(e,"supportsAttachmentsResizing",!1),supportsSync:o.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:p(e,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:p(e,"supportsAsyncConvert3D",!1)}}function C(s,o){const i=s.advancedQueryCapabilities,a=s.ownershipBasedAccessControlForFeatures,c=s.archivingInfo,d=s.currentVersion,l=o?.includes("MapServer"),y=!l||d>=has("mapserver-pbf-version-support"),m=t(o),g=new Set((s.supportedQueryFormats??"").split(",").map(t=>t.toLowerCase().trim()));return{maxRecordCount:r(s,"maxRecordCount",void 0),maxRecordCountFactor:r(s,"maxRecordCountFactor",void 0),maxUniqueIDCount:r(s,"maxUniqueIDCount",void 0),standardMaxRecordCount:r(s,"standardMaxRecordCount",void 0),supportedSpatialAggregationStatistics:u(i),supportsCacheHint:p(i,"supportsQueryWithCacheHint",!1)||n(i,"query"),supportsCentroid:p(i,"supportsReturningGeometryCentroid",!1),supportsCentroidOnDegeneratedQuantizedGeometry:m||null==o,supportsCompactGeometry:m,supportsCurrentUser:p(i,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:p(i,"supportsDefaultSR",!1),supportsDegeneratedQuantizedGeometry:p(i,"supportsDegeneratedQuantizedGeometry",!1),supportsDisjointSpatialRelationship:p(i,"supportsDisjointSpatialRel",!1),supportsDistance:p(i,"supportsQueryWithDistance",!1),supportsDistinct:p(i,"supportsDistinct",s.supportsAdvancedQueries),supportsExtent:p(i,"supportsReturningQueryExtent",!1),supportsFormatPBF:y&&g.has("pbf"),supportsFullTextSearch:p(i,"supportsFullTextSearch",!1),supportsGeometryProperties:p(i,"supportsReturningGeometryProperties",!1),supportsHavingClause:p(i,"supportsHavingClause",!1),supportsHistoricMoment:p(c,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:p(i,"supportsMaxRecordCountFactor",!1),supportsOrderBy:p(i,"supportsOrderBy",s.supportsAdvancedQueries),supportsPagination:p(i,"supportsPagination",!1),supportsPaginationOnAggregatedQueries:p(i,"supportsPaginationOnAggregatedQueries",!1),supportsPercentileStatistics:p(i,"supportsPercentileStatistics",!1),supportsQuantization:p(s,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:p(s,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:p(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:p(a,"allowOthersToQuery",!0),supportsQueryGeometry:p(s,"supportsReturningQueryGeometry",!1),supportsResultType:p(i,"supportsQueryWithResultType",!1),supportsReturnMesh:!!e(s.infoFor3D),supportsSpatialAggregationStatistics:p(i,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:p(i,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:p(s,"useStandardizedQueries",!1),supportsStatistics:p(i,"supportsStatistics",s.supportsStatistics),supportsTopFeaturesQuery:p(i,"supportsTopFeaturesQuery",!1),supportsTrueCurve:p(i,"supportsTrueCurve",!1),tileMaxRecordCount:r(s,"tileMaxRecordCount",void 0)}}function v(t){const s=t.advancedQueryCapabilities,e=p(s,"supportsAdvancedQueryRelated",!1);return{supportsPagination:p(s,"supportsQueryRelatedPagination",!1),supportsCount:e,supportsOrderBy:e,supportsCacheHint:n(s,"queryRelated")}}function h(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryTopFilter")}}function Q(t){const s=t?t.queryBinsCapabilities:void 0;return{supportsDate:p(s,"supportsDateBin",!1),supportsFixedInterval:p(s,"supportsFixedIntervalBin",!1),supportsAutoInterval:p(s,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:p(s,"supportsFixedBoundariesBin",!1),supportsStackBy:p(s,"supportsStackBy",!1),supportsSplitBy:p(s,"supportsSplitBy",!1),supportsSnapToData:p(s,"supportsSnapToData",!1),supportsReturnFullIntervalBin:p(s,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:p(s,"supportsFirstDayOfWeek",!1),supportsNormalization:p(s,"supportsNormalization",!1),supportedStatistics:i(s),supportedNormalizationTypes:a(s)}}function S(t){const s=t.ownershipBasedAccessControlForFeatures,e=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:p(t,"allowGeometryUpdates",!0),supportsGlobalId:p(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:p(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:p(t,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:p(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:p(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:p(s,"allowAnonymousToDelete",!0),supportsDeleteByOthers:p(s,"allowOthersToDelete",!0),supportsUpdateByAnonymous:p(s,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:p(s,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:p(e,"supportsAsyncApplyEdits",!1),zDefault:r(t,"zDefault",void 0)}}function f(t){return{operations:{supportsAppend:p(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:p(t,"supportsExportClip",!1),supportsExportFrameset:p(t,"supportsExportFrameset",!1),supportsMensuration:p(t,"supportsMensuration",!1),supportsPreviews:p(t,"supportsPreviews",!1),supportsUpdate:p(t,"supportsUpdate",!1)}}}export{c as getFeatureLayerCapabilities,f as getVideoLayerCapabilities};
5
+ import has from"../../core/has.js";import{isHostedAgolService as t,parse as s}from"./arcgisLayerUrl.js";import{getGltfQueryFormat as e}from"./infoFor3D.js";import{readNumber as r,readBoolean as p}from"../../rest/support/jsonUtils.js";const o={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function u(t){const s=t?.supportedSpatialAggregationStatistics?.map(t=>t.toLowerCase());return{envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function n(t,s){const e=t?.supportedOperationsWithCacheHint?.map(t=>t.toLowerCase());return!!e?.includes(s.toLowerCase())}function i(t){const s=t?.supportedStatisticTypes?.map(t=>t.toLowerCase());return{count:!!s?.includes("count"),sum:!!s?.includes("sum"),min:!!s?.includes("min"),max:!!s?.includes("max"),avg:!!s?.includes("avg"),var:!!s?.includes("var"),stddev:!!s?.includes("stddev"),percentileContinuous:!!s?.includes("percentile_cont"),percentileDiscrete:!!s?.includes("percentile_disc"),envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function a(t){const s=t?.supportedNormalizationTypes?.map(t=>t.toLowerCase());return{field:!!s?.includes("field"),log:!!s?.includes("log"),naturalLog:!!s?.includes("naturallog"),percentOfTotal:!!s?.includes("percentoftotal"),squareRoot:!!s?.includes("squareroot")}}function c(t,s){return{analytics:d(t),attachment:l(t),data:y(t),metadata:m(t),operations:g(t.capabilities,t,s),query:C(t,s),queryAttributeBins:Q(t),queryRelated:v(t),queryTopFeatures:h(t),editing:A(t)}}function d(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryAnalytics")}}function l(t){const s=t.attachmentProperties,e={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:n(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:p(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:p(t,"supportsAttachmentsResizing",!1),supportsTypeWildcard:p(t.advancedQueryCapabilities,"supportsQueryAttachmentWithTypeWildcard",!1)};return s&&Array.isArray(s)&&s.forEach(t=>{const s=o[t.name];s&&(e[s]=!!t.isEnabled)}),e}function y(t){return{isVersioned:p(t,"isDataVersioned",!1),isBranchVersioned:p(t,"isDataBranchVersioned",!1),supportsAttachment:p(t,"hasAttachments",!1),supportsM:p(t,"hasM",!1),supportsZ:p(t,"hasZ",!1)}}function m(t){return{supportsAdvancedFieldProperties:p(t,"supportsFieldDescriptionProperty",!1)}}function g(t,e,r){const o=t?.toLowerCase().split(",").map(t=>t.trim())??[],u=r?s(r):null,n=o.includes("MapServer"===u?.serverType?"data":"query"),i=o.includes("editing")&&!e.datesInUnknownTimezone&&!(!0===e.uniqueIdInfo?.OIDFieldContainsHashValue);let a=i&&o.includes("create"),c=i&&o.includes("delete"),d=i&&o.includes("update");const l=o.includes("changetracking"),y=e.advancedQueryCapabilities;return i&&!(a||c||d)&&(a=c=d=!0),{supportsCalculate:p(e,"supportsCalculate",!1),supportsTruncate:p(e,"supportsTruncate",!1),supportsValidateSql:p(e,"supportsValidateSql",!1),supportsAdd:a,supportsDelete:c,supportsEditing:i,supportsChangeTracking:l,supportsQuery:n,supportsQueryAnalytics:p(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:p(y,"supportsQueryAttachments",!1),supportsQueryBins:p(y,"supportsQueryBins",!1)||!!e.queryBinsCapabilities,supportsQueryTopFeatures:p(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:p(e,"supportsAttachmentsResizing",!1),supportsSync:o.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:p(e,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:p(e,"supportsAsyncConvert3D",!1)}}function C(s,o){const i=s.advancedQueryCapabilities,a=s.ownershipBasedAccessControlForFeatures,c=s.archivingInfo,d=s.currentVersion,l=o?.includes("MapServer"),y=!l||d>=has("mapserver-pbf-version-support"),m=t(o),g=new Set((s.supportedQueryFormats??"").split(",").map(t=>t.toLowerCase().trim()));return{maxRecordCount:r(s,"maxRecordCount",void 0),maxRecordCountFactor:r(s,"maxRecordCountFactor",void 0),maxUniqueIDCount:r(s,"maxUniqueIDCount",void 0),standardMaxRecordCount:r(s,"standardMaxRecordCount",void 0),supportedSpatialAggregationStatistics:u(i),supportsCacheHint:p(i,"supportsQueryWithCacheHint",!1)||n(i,"query"),supportsCentroid:p(i,"supportsReturningGeometryCentroid",!1),supportsCentroidOnDegeneratedQuantizedGeometry:m||null==o,supportsCompactGeometry:m,supportsCurrentUser:p(i,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:p(i,"supportsDefaultSR",!1),supportsDegeneratedQuantizedGeometry:p(i,"supportsDegeneratedQuantizedGeometry",!1),supportsDisjointSpatialRelationship:p(i,"supportsDisjointSpatialRel",!1),supportsDistance:p(i,"supportsQueryWithDistance",!1),supportsDistinct:p(i,"supportsDistinct",s.supportsAdvancedQueries),supportsExtent:p(i,"supportsReturningQueryExtent",!1),supportsFormatPBF:y&&g.has("pbf"),supportsFullTextSearch:p(i,"supportsFullTextSearch",!1),supportsGeometryProperties:p(i,"supportsReturningGeometryProperties",!1),supportsHavingClause:p(i,"supportsHavingClause",!1),supportsHistoricMoment:p(c,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:p(i,"supportsMaxRecordCountFactor",!1),supportsOrderBy:p(i,"supportsOrderBy",s.supportsAdvancedQueries),supportsPagination:p(i,"supportsPagination",!1),supportsPaginationOnAggregatedQueries:p(i,"supportsPaginationOnAggregatedQueries",!1),supportsPercentileStatistics:p(i,"supportsPercentileStatistics",!1),supportsQuantization:p(s,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:p(s,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:p(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:p(a,"allowOthersToQuery",!0),supportsQueryGeometry:p(s,"supportsReturningQueryGeometry",!1),supportsResultType:p(i,"supportsQueryWithResultType",!1),supportsReturnMesh:!!e(s.infoFor3D),supportsSpatialAggregationStatistics:p(i,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:p(i,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:p(s,"useStandardizedQueries",!1),supportsStatistics:p(i,"supportsStatistics",s.supportsStatistics),supportsTopFeaturesQuery:p(i,"supportsTopFeaturesQuery",!1),supportsTrueCurve:p(i,"supportsTrueCurve",!1),tileMaxRecordCount:r(s,"tileMaxRecordCount",void 0)}}function v(t){const s=t.advancedQueryCapabilities,e=p(s,"supportsAdvancedQueryRelated",!1);return{supportsPagination:p(s,"supportsQueryRelatedPagination",!1),supportsCount:e,supportsOrderBy:e,supportsCacheHint:n(s,"queryRelated")}}function h(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryTopFilter")}}function Q(t){const s=t?t.queryBinsCapabilities:void 0;return{supportsDate:p(s,"supportsDateBin",!1),supportsFixedInterval:p(s,"supportsFixedIntervalBin",!1),supportsAutoInterval:p(s,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:p(s,"supportsFixedBoundariesBin",!1),supportsStackBy:p(s,"supportsStackBy",!1),supportsSplitBy:p(s,"supportsSplitBy",!1),supportsSnapToData:p(s,"supportsSnapToData",!1),supportsReturnFullIntervalBin:p(s,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:p(s,"supportsFirstDayOfWeek",!1),supportsNormalization:p(s,"supportsNormalization",!1),supportedStatistics:i(s),supportedNormalizationTypes:a(s)}}function A(t){const s=t.ownershipBasedAccessControlForFeatures,e=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:p(t,"allowGeometryUpdates",!0),supportsGlobalId:p(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:p(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:p(t,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:p(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:p(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:p(s,"allowAnonymousToDelete",!0),supportsDeleteByOthers:p(s,"allowOthersToDelete",!0),supportsUpdateByAnonymous:p(s,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:p(s,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:p(e,"supportsAsyncApplyEdits",!1),zDefault:r(t,"zDefault",void 0)}}function S(t){return{operations:{supportsAppend:p(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:p(t,"supportsExportClip",!1),supportsExportFrameset:p(t,"supportsExportFrameset",!1),supportsMensuration:p(t,"supportsMensuration",!1),supportsPreviews:p(t,"supportsPreviews",!1),supportsUpdate:p(t,"supportsUpdate",!1)}}}export{c as getFeatureLayerCapabilities,S as getVideoLayerCapabilities};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../request.js";import{clone as t}from"../../core/lang.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{normalize as r,removeFile as l,getAppBaseUrl as s,removeTrailingSlash as n,addQueryParameters as i,isProtocolRelative as u,isAbsolute as c,join as a}from"../../core/urlUtils.js";import{wgs84 as f,webMercator as p}from"../../geometry/support/spatialReferenceUtils.js";import{geographicToWebMercator as y}from"../../geometry/support/webMercatorUtils.js";import m from"../../views/2d/engine/vectorTiles/style/VectorTileSource.js";async function d(e,t){const o={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,l]="string"==typeof e?[e,null]:[null,e.jsonUrl];await x(o,"esri",e,l,t);return{layerDefinition:o.validatedSource,url:r,serviceUrl:o.sourceUrl,style:o.style,styleUrl:o.styleUrl,spriteUrl:o.style?.sprite&&h(o.styleBase,o.style.sprite),spriteFormat:o.spriteFormat,glyphsUrl:o.style?.glyphs&&h(o.styleBase,o.style.glyphs),sourceNameToSource:o.sourceNameToSource,primarySourceName:o.primarySourceName}}function h(...e){let t;for(const o of e)if(null!=o)if(u(o)){if(t){const e=t.split("://")[0];t=e+":"+o.trim()}}else t=c(o)?o:a(t,o);return t?n(t):void 0}async function x(t,l,s,n,i){let u,c,a;if(o(i),"string"==typeof s){const t=r(s);a=await e(t,{...i,responseType:"json",query:{f:"json",...i?.query}}),a.ssl&&(u&&(u=u.replace(/^http:/i,"https:")),c&&(c=c.replace(/^http:/i,"https:"))),u=t,c=t}else null!=s&&(a={data:s},u=s.jsonUrl||null,c=n);const f=a?.data;if(g(f))return t.styleUrl=u||null,w(t,f,c,i);if(j(f))return t.sourceUrl?U(t,f,c,!1,l,i):(t.sourceUrl=u||null,S(f)&&(l="tilejson"),U(t,f,c,!0,l,i));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function S(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function g(e){return!!e&&"sources"in e&&!!e.sources}function j(e){return!g(e)}async function w(e,t,o,r){const n=o?l(o):s();e.styleBase=n,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const i=[];if(t.sources&&t.sources.esri){const o=t.sources.esri;o.url?await x(e,"esri",h(n,o.url),void 0,r):i.push(x(e,"esri",o,n,r))}for(const l of Object.keys(t.sources))"esri"!==l&&"tilejson"!==l&&"vector"===t.sources[l].type&&(t.sources[l].url?i.push(x(e,l,h(n,t.sources[l].url),void 0,r)):t.sources[l].tiles&&i.push(x(e,l,t.sources[l],n,r)));await Promise.all(i)}async function U(e,t,o,r,l,u){const c=o?n(o)+"/":s(),a=v(t),f=new m(l,i(c,u?.query??{}),a);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(f))return;null!=f.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(f.fullExtent):t.fullExtent=f.fullExtent.clone()),t.tileInfo&&f.tileInfo&&t.tileInfo.lods.length<f.tileInfo.lods.length&&(t.tileInfo=f.tileInfo)}if(r&&(e.sourceBase=c,e.source=t,e.validatedSource=a,e.primarySourceName=l),e.sourceNameToSource[l]=f,!S(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?x(e,"",h(c,t.defaultStyles,"root.json"),void 0,u):x(e,"",t.defaultStyles,h(c,"root.json"),u)}if(S(t)&&a.defaultStyles)return x(e,"",a.defaultStyles,h(c,"root.json"),u)}function v(e){const o=512;if(N(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=o),null==t.cols&&(t.cols=o)),e}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let l,s=null;if(S(e)){const{bounds:o,vector_layers:r}=e;if(o){const e=y({x:o[0],y:o[1],spatialReference:t(f)}),r=y({x:o[2],y:o[3],spatialReference:t(f)});s={xmin:e.x,ymin:e.y,xmax:r.x,ymax:r.y,spatialReference:t(p)}}r&&r.length>0&&(l={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:b(r)})}null===s&&(s=r);let n=78271.51696400007,i=295828763.7957775;const u=[],c=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22,a=0,m=0;for(let t=0;t<=c;t++)u.push({level:t,scale:i,resolution:n}),n/=2,i/=2;return{capabilities:"TilesOnly",initialExtent:s,fullExtent:r,minScale:a,maxScale:m,tiles:e.tiles,tileInfo:{rows:o,cols:o,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:u,spatialReference:t(p)},defaultStyles:l}}function N(e){return e.hasOwnProperty("tileInfo")}function b(e){const t=[];for(const o of e)o.geometry_type?t.push(E(o.geometry_type.toLowerCase(),o,!1)):(t.push(E("polygon",o,!0)),t.push(E("line",o,!0)),t.push(E("circle",o,!0)));return t}function E(e,t,o){const{id:r,minzoom:l,maxzoom:s}=t,n={type:"polygon"===e?"fill":"line"===e?"line":"circle",id:r,source:"tilejson","source-layer":r,minzoom:l,maxzoom:s};switch(e){case"polygon":case"fill":o&&(n.id+="_polygon",n.filter='(["==", "$type", "Polygon"])'),n.paint={"fill-color":"#808080"};break;case"line":o&&(n.id+="_line",n.filter='(["==", "$type", "LineString"])');break;case"circle":case"point":o&&(n.id+="_point",n.filter='(["==", "$type", "Point"])')}return n}export{d as loadMetadata};
5
+ import e from"../../request.js";import{clone as t}from"../../core/lang.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{normalize as r,removeFile as l,getAppBaseUrl as s,removeTrailingSlash as n,addQueryParameters as i,isProtocolRelative as u,isAbsolute as c,join as a}from"../../core/urlUtils.js";import{wgs84 as f,webMercator as y}from"../../geometry/support/spatialReferenceUtils.js";import{geographicToWebMercator as p}from"../../geometry/support/webMercatorUtils.js";import m from"../../views/2d/engine/vectorTiles/style/VectorTileSource.js";async function d(e,t){const o={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,l]="string"==typeof e?[e,null]:[null,e.jsonUrl];await x(o,"esri",e,l,t);return{layerDefinition:o.validatedSource,url:r,serviceUrl:o.sourceUrl,style:o.style,styleUrl:o.styleUrl,spriteUrl:o.style?.sprite&&h(o.styleBase,o.style.sprite),spriteFormat:o.spriteFormat,glyphsUrl:o.style?.glyphs&&h(o.styleBase,o.style.glyphs),sourceNameToSource:o.sourceNameToSource,primarySourceName:o.primarySourceName}}function h(...e){let t;for(const o of e)if(null!=o)if(u(o)){if(t){const e=t.split("://")[0];t=e+":"+o.trim()}}else t=c(o)?o:a(t,o);return t?n(t):void 0}async function x(t,l,s,n,i){let u,c,a;if(o(i),"string"==typeof s){const t=r(s);a=await e(t,{...i,responseType:"json",query:{f:"json",...i?.query}}),a.ssl&&(u&&(u=u.replace(/^http:/i,"https:")),c&&(c=c.replace(/^http:/i,"https:"))),u=t,c=t}else null!=s&&(a={data:s},u=s.jsonUrl||null,c=n);const f=a?.data;if(g(f))return t.styleUrl=u||null,w(t,f,c,i);if(j(f))return t.sourceUrl?U(t,f,c,!1,l,i):(t.sourceUrl=u||null,S(f)&&null==t.style&&(l="tilejson"),U(t,f,c,!0,l,i));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function S(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function g(e){return!!e&&"sources"in e&&!!e.sources}function j(e){return!g(e)}async function w(e,t,o,r){const n=o?l(o):s();e.styleBase=n,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const i=[];if(t.sources&&t.sources.esri){const o=t.sources.esri;o.url?await x(e,"esri",h(n,o.url),void 0,r):i.push(x(e,"esri",o,n,r))}for(const l of Object.keys(t.sources))"esri"!==l&&"tilejson"!==l&&"vector"===t.sources[l].type&&(t.sources[l].url?i.push(x(e,l,h(n,t.sources[l].url),void 0,r)):t.sources[l].tiles&&i.push(x(e,l,t.sources[l],n,r)));await Promise.all(i)}async function U(e,t,o,r,l,u){const c=o?n(o)+"/":s(),a=v(t),f=new m(l,i(c,u?.query??{}),a);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(f))return;null!=f.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(f.fullExtent):t.fullExtent=f.fullExtent.clone()),t.tileInfo&&f.tileInfo&&t.tileInfo.lods.length<f.tileInfo.lods.length&&(t.tileInfo=f.tileInfo)}if(r&&(e.sourceBase=c,e.source=t,e.validatedSource=a,e.primarySourceName=l),e.sourceNameToSource[l]=f,!S(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?x(e,"",h(c,t.defaultStyles,"root.json"),void 0,u):x(e,"",t.defaultStyles,h(c,"root.json"),u)}if(S(t)&&null==e.style&&a.defaultStyles)return x(e,"",a.defaultStyles,h(c,"root.json"),u)}function v(e){const o=512;if(N(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=o),null==t.cols&&(t.cols=o)),e}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let l,s=null;if(S(e)){const{bounds:o,vector_layers:r}=e;if(o){const e=p({x:o[0],y:o[1],spatialReference:t(f)}),r=p({x:o[2],y:o[3],spatialReference:t(f)});s={xmin:e.x,ymin:e.y,xmax:r.x,ymax:r.y,spatialReference:t(y)}}r&&r.length>0&&(l={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:b(r)})}null===s&&(s=r);let n=78271.51696400007,i=295828763.7957775;const u=[],c=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22,a=0,m=0;for(let t=0;t<=c;t++)u.push({level:t,scale:i,resolution:n}),n/=2,i/=2;return{capabilities:"TilesOnly",initialExtent:s,fullExtent:r,minScale:a,maxScale:m,tiles:e.tiles,tileInfo:{rows:o,cols:o,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:u,spatialReference:t(y)},defaultStyles:l}}function N(e){return e.hasOwnProperty("tileInfo")}function b(e){const t=[];for(const o of e)o.geometry_type?t.push(E(o.geometry_type.toLowerCase(),o,!1)):(t.push(E("polygon",o,!0)),t.push(E("line",o,!0)),t.push(E("circle",o,!0)));return t}function E(e,t,o){const{id:r,minzoom:l,maxzoom:s}=t,n={type:"polygon"===e?"fill":"line"===e?"line":"circle",id:r,source:"tilejson","source-layer":r,minzoom:l,maxzoom:s};switch(e){case"polygon":case"fill":o&&(n.id+="_polygon",n.filter='(["==", "$type", "Polygon"])'),n.paint={"fill-color":"#808080"};break;case"line":o&&(n.id+="_line",n.filter='(["==", "$type", "LineString"])');break;case"circle":case"point":o&&(n.id+="_point",n.filter='(["==", "$type", "Point"])')}return n}export{d as loadMetadata};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.34.0-next.87",
3
+ "version": "4.34.0-next.89",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@arcgis/toolkit": "^4.34.0-next.133",
22
22
  "@esri/arcgis-html-sanitizer": "~4.1.0",
23
- "@esri/calcite-components": "^3.3.0-next.95",
23
+ "@esri/calcite-components": "^3.3.0",
24
24
  "@vaadin/grid": "~24.9.0",
25
25
  "@zip.js/zip.js": "~2.8.2",
26
26
  "luxon": "~3.7.2",
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{JSONMap as o}from"../core/jsonMap.js";import{JSONSupport as e}from"../core/JSONSupport.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{enumeration as r}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import p from"./support/FieldInfoFormat.js";var l;let a=l=class extends e{constructor(t){super(t),this.fieldName=null,this.format=void 0,this.isEditable=!0,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){return new l({fieldName:this.fieldName,format:this.format?.clone(),isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};t([i({type:String,json:{write:!0}})],a.prototype,"fieldName",void 0),t([i({type:p,json:{write:!0}})],a.prototype,"format",void 0),t([i({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],a.prototype,"isEditable",void 0),t([i({type:String,json:{write:!0}})],a.prototype,"label",void 0),t([r(new o({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],a.prototype,"stringFieldOption",void 0),t([i({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],a.prototype,"statisticType",void 0),t([i({type:String,json:{write:!0}})],a.prototype,"tooltip",void 0),t([i({type:Boolean,json:{write:!0}})],a.prototype,"visible",void 0),a=l=t([s("esri.popup.FieldInfo")],a);const n=a;export{n as default};
5
+ import{__decorate as t}from"tslib";import{ClonableMixin as o}from"../core/Clonable.js";import{JSONMap as e}from"../core/jsonMap.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{enumeration as s}from"../core/accessorSupport/decorators/enumeration.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{fieldInfoFormatFromFieldFormat as a,fieldFormatFromFieldInfoFormat as m,formatTypes as n}from"../layers/support/fieldFormatUtils.js";import d from"./support/FieldInfoFormat.js";let c=class extends(o(r)){constructor(t){super(t),this.fieldName=null,this.isEditable=!0,this.label=null,this.statisticType=null,this.stringFieldOption="text-box",this.tooltip=null,this.visible=!0}set fieldFormat(t){this._set("fieldFormat",t),this._set("format",t?a(t):null)}set format(t){this._set("format",t),this._set("fieldFormat",t?m(t):null)}readFormat(t,o){if(!o.fieldFormat)return t?d.fromJSON(t):null}};t([i({value:null,types:n,json:{write:{overridePolicy:(t,o,e)=>({enabled:!!e?.writeFieldFormat})}}})],c.prototype,"fieldFormat",null),t([i({type:String,json:{write:!0}})],c.prototype,"fieldName",void 0),t([i({value:null,type:d,json:{write:!0}})],c.prototype,"format",null),t([p("format")],c.prototype,"readFormat",null),t([i({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],c.prototype,"isEditable",void 0),t([i({type:String,json:{write:!0}})],c.prototype,"label",void 0),t([i({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],c.prototype,"statisticType",void 0),t([s(new e({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],c.prototype,"stringFieldOption",void 0),t([i({type:String,json:{write:!0}})],c.prototype,"tooltip",void 0),t([i({type:Boolean,json:{write:!0}})],c.prototype,"visible",void 0),c=t([l("esri.popup.FieldInfo")],c);const u=c;export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{clone as o}from"../../core/lang.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";import s from"../FieldInfo.js";import p from"./Content.js";var n;let l=n=class extends p{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(t,o){o.fieldInfos=t&&t.map(t=>t.toJSON())}clone(){return new n(o({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};t([e({type:Object,json:{write:!0}})],l.prototype,"attributes",void 0),t([e({type:String,json:{write:!0}})],l.prototype,"description",void 0),t([e({type:[s]})],l.prototype,"fieldInfos",void 0),t([i("fieldInfos")],l.prototype,"writeFieldInfos",null),t([e({type:String,json:{write:!0}})],l.prototype,"title",void 0),t([e({type:["fields"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],l.prototype,"type",void 0),l=n=t([r("esri.popup.content.FieldsContent")],l);const d=l;export{d as default};
5
+ import{__decorate as t}from"tslib";import{clone as o}from"../../core/lang.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import i from"../FieldInfo.js";import s from"./Content.js";var p;let n=p=class extends s{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}clone(){return new p(o({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};t([e({type:Object,json:{write:!0}})],n.prototype,"attributes",void 0),t([e({type:String,json:{write:!0}})],n.prototype,"description",void 0),t([e({type:[i],json:{write:!0}})],n.prototype,"fieldInfos",void 0),t([e({type:String,json:{write:!0}})],n.prototype,"title",void 0),t([e({type:["fields"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],n.prototype,"type",void 0),n=p=t([r("esri.popup.content.FieldsContent")],n);const l=n;export{l as default};
package/portal/Portal.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../config.js";import{id as r}from"../kernel.js";import o from"../request.js";import s from"../core/Error.js";import{JSONSupportMixin as i}from"../core/JSONSupport.js";import{Loadable as a}from"../core/Loadable.js";import{destroyMaybe as l,removeMaybe as u}from"../core/maybe.js";import{throwIfAborted as n,isAborted as p,createAbortError as h,throwIfAbortError as d}from"../core/promiseUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import{ensureType as c}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import v from"../geometry/Extent.js";import{getLocale as S}from"../intl/locale.js";import{ensureDefaultPortalInstance as g}from"./portalDefault.js";import P from"./PortalGroup.js";import G from"./PortalQueryParams.js";import D from"./PortalQueryResult.js";import O from"./PortalUser.js";import{isApiKeyApplicable as B,hasBasemapStylesApiKey as Q}from"../support/apiKeyUtils.js";var _;let b;const U={PortalGroup:()=>Promise.resolve({default:P}),PortalItem:()=>import("./PortalItem.js"),PortalUser:()=>Promise.resolve({default:O})};let M=class extends(i(a)){static{_=this}static{this.AUTH_MODE_ANONYMOUS="anonymous"}static{this.AUTH_MODE_AUTO="auto"}static{this.AUTH_MODE_IMMEDIATE="immediate"}static{this.AUTH_MODE_NO_PROMPT="no-prompt"}constructor(e){super(e),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.g3DTilesGalleryGroupQuery=null,this.g3dTilesEnabled=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=t.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){C.unregister(this),this.defaultBasemap=l(this.defaultBasemap),this.defaultDevBasemap=l(this.defaultDevBasemap),this.defaultVectorBasemap=l(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=u(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(e){if(e)for(const r of e)t.request.trustedServers.includes(r)||t.request.trustedServers.push(r);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=this.user?.orgId,t=!e||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get hasAPIKey(){return B(this.restUrl)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get loaded(){return super.loaded}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.slice(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=O.fromJSON(e),t.portal=this),t}load(e){const t=import("../Basemap.js").then(({default:t})=>{n(e),b=t}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,e)).then(e=>{if(!this.hasAPIKey&&r){const e=r;this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==_.AUTH_MODE_AUTO&&this.authMode!==_.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=e.on("credential-create",T(new WeakRef(this))),C.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(t),Promise.resolve(this)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await import("../layers/ElevationLayer.js")).default;return e?e.map(e=>new t({id:e.id,url:e.url})):[]}async fetchBasemaps(e,t){const r=await this._fetchBasemaps(e,t);if(!0===t?.include3d&&!1!==this.use3dBasemaps){if(this.g3dTilesEnabled&&this.g3DTilesGalleryGroupQuery){const e=await this._fetchBasemaps3D(this.g3DTilesGalleryGroupQuery,t);r.unshift(...e)}const o=await this._fetchBasemaps3D(e,t);r.unshift(...o)}return r}async fetchDefault3DBasemap(e){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;const t=new G;t.query=this.default3DBasemapQuery,t.disableExtraQuery=!0;const r=(await this.queryItems(t,e)).results.find(e=>"Web Scene"===e.type);return r?new b({portalItem:r}):null}fetchCategorySchema(e){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",e).then(e=>e.categorySchema):p(e)?Promise.reject(h()):Promise.resolve([])}async fetchClassificationSchema(e){return this.hasClassificationSchema?this.request(this.restUrl+"/portals/self/classification/classificationSchema",e).then(e=>e.classificationSchema):null}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new G({num:100,sortField:"title"});if(t?.length){const o=[];for(const e of t)o.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,e).then(e=>e.results)}return p(e)?Promise.reject(h()):Promise.resolve([])}fetchRegions(e){const t=this.user?.culture||this.culture||S();return this.request(this.restUrl+"/portals/regions",{...e,query:{culture:t}})}fetchSettings(e){const t=this.user?.culture||this.culture||S();return this.request(this.restUrl+"/portals/self/settings",{...e,query:{culture:t}})}static getDefault(){return g(()=>new _)}queryGroups(e,t){return this.queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this.queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this.queryPortal("/community/users",e,"PortalUser",t)}fetchSelf(e=this.authMode,t=!1,r){const o=this.restUrl+"/portals/self",s={authMode:e,query:{culture:S().toLowerCase()},withCredentials:!0,...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),t&&(s.query.default=!0),this.request(o,s)}queryPortal(e,t,r,o){const s=c(G,t),i=t=>this.request(this.restUrl+e,{...s.toRequestOptions(this),...o}).then(e=>{const r=s.clone();return r.start=e.nextStart,new D({nextQueryParams:r,queryParams:s,total:e.total,results:_._resultsToTypedArray(t,{portal:this},e,o)})}).then(e=>Promise.all(e.results.map(t=>"function"==typeof t.when?t.when():e)).then(()=>e,t=>(d(t),e)));return r&&U[r]?U[r]().then(({default:e})=>(n(o),i(e))):i()}signIn(){if(this.hasAPIKey)return this.load().then(()=>{if(!this.user)throw new s("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")});if(this.authMode===_.AUTH_MODE_ANONYMOUS||this.authMode===_.AUTH_MODE_NO_PROMPT&&!r)return Promise.reject(new s("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then(()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then(()=>null)):"loading"===this.loadStatus?this.load().then(()=>this.credential?null:(this.credential=e,this.fetchSelf("immediate"))):this.user&&this.credential===e?null:(this.credential=e,this.fetchSelf("immediate"))).then(e=>{e&&(this.sourceJSON=e,this.read(e))});return r?r.getCredential(this.restUrl,{prompt:this.authMode!==_.AUTH_MODE_NO_PROMPT}).then(t=>e(t)):e(this.credential)}normalizeUrl(e){const t=this.credential?.token;return this._normalizeSSL(t?e+(e.includes("?")?"&":"?")+"token="+t:e)}requestToTypedArray(e,t,r){return this.request(e,t).then(e=>{const t=_._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map(t=>"function"==typeof t.when?t.when():e)).then(()=>t,()=>t)})}request(e,t={}){const r={f:"json",...t.query},{authMode:s=(this.authMode===_.AUTH_MODE_ANONYMOUS||this.authMode===_.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:i=null,cacheBust:a=!1,method:l="auto",responseType:u="json",signal:n}=t,p={authMode:s,body:i,cacheBust:a,method:l,query:r,responseType:u,timeout:0,signal:n};return t.withCredentials&&(p.withCredentials=!0),o(this._normalizeSSL(e),p).then(e=>e.data)}toJSON(){throw new s("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new _({sourceJSON:e})}_getHelperService(e){const t=this.helperServices?.[e];if(!t)throw new s("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}async _fetchBasemaps(e,t){const r=new G;r.query=e||(Q()?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,t);if(!o.total)return[];const s=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=s.sortField||"name",r.sortOrder=s.sortOrder||"desc";const i=await s.queryItems(r,t);if(!i.total)return[];return i.results.filter(e=>"Web Map"===e.type).map(e=>new b({portalItem:e}))}async _fetchBasemaps3D(e,t){const r=e||this.basemapGalleryGroupQuery3D;if(!r)return[];if(Q())return[];const o=new G({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,t);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const a=await i.queryItems(o,t);if(!a.total)return[];return a.results.filter(e=>"Web Scene"===e.type).map(e=>new b({portalItem:e}))}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(e){if(e){const t=b.fromJSON(e);return t.portalItem={portal:this},t}return null}static _resultsToTypedArray(e,t,r,o){let s;if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(s=s.map(r=>{const o=Object.assign(e?e.fromJSON(r):r,t);return"function"==typeof o.load&&o.load(i),o}))}else s=[];return s}};e([y()],M.prototype,"access",void 0),e([y()],M.prototype,"allSSL",void 0),e([y()],M.prototype,"authMode",void 0),e([y()],M.prototype,"authorizedCrossOriginDomains",void 0),e([m("authorizedCrossOriginDomains")],M.prototype,"readAuthorizedCrossOriginDomains",null),e([y()],M.prototype,"basemapGalleryGroupQuery",void 0),e([y({json:{name:"3DBasemapGalleryGroupQuery"}})],M.prototype,"basemapGalleryGroupQuery3D",void 0),e([y({json:{name:"g3DTilesGalleryGroupQuery"}})],M.prototype,"g3DTilesGalleryGroupQuery",void 0),e([y({json:{name:"g3dTilesEnabled"}})],M.prototype,"g3dTilesEnabled",void 0),e([y()],M.prototype,"bingKey",void 0),e([y()],M.prototype,"canListApps",void 0),e([y()],M.prototype,"canListData",void 0),e([y()],M.prototype,"canListPreProvisionedItems",void 0),e([y()],M.prototype,"canProvisionDirectPurchase",void 0),e([y()],M.prototype,"canSearchPublic",void 0),e([y()],M.prototype,"canShareBingPublic",void 0),e([y()],M.prototype,"canSharePublic",void 0),e([y()],M.prototype,"canSignInArcGIS",void 0),e([y()],M.prototype,"canSignInIDP",void 0),e([y()],M.prototype,"colorSetsGroupQuery",void 0),e([y()],M.prototype,"commentsEnabled",void 0),e([y({type:Date})],M.prototype,"created",void 0),e([y()],M.prototype,"credential",void 0),e([y()],M.prototype,"culture",void 0),e([y()],M.prototype,"currentVersion",void 0),e([y()],M.prototype,"customBaseUrl",void 0),e([y()],M.prototype,"default3DBasemapQuery",void 0),e([y()],M.prototype,"defaultBasemap",void 0),e([m("defaultBasemap")],M.prototype,"readDefaultBasemap",null),e([y()],M.prototype,"defaultDevBasemap",void 0),e([m("defaultDevBasemap")],M.prototype,"readDefaultDevBasemap",null),e([y({type:v})],M.prototype,"defaultExtent",void 0),e([y()],M.prototype,"defaultVectorBasemap",void 0),e([m("defaultVectorBasemap")],M.prototype,"readDefaultVectorBasemap",null),e([y()],M.prototype,"description",void 0),e([y()],M.prototype,"devBasemapGalleryGroupQuery",void 0),e([y()],M.prototype,"eueiEnabled",void 0),e([y({readOnly:!0})],M.prototype,"extraQuery",null),e([y()],M.prototype,"featuredGroups",void 0),e([y()],M.prototype,"featuredItemsGroupQuery",void 0),e([y()],M.prototype,"galleryTemplatesGroupQuery",void 0),e([y()],M.prototype,"layoutGroupQuery",void 0),e([y()],M.prototype,"livingAtlasGroupQuery",void 0),e([y({readOnly:!0})],M.prototype,"hasAPIKey",null),e([y()],M.prototype,"hasCategorySchema",void 0),e([y()],M.prototype,"hasClassificationSchema",void 0),e([y()],M.prototype,"helpBase",void 0),e([y()],M.prototype,"helperServices",void 0),e([y()],M.prototype,"helpMap",void 0),e([y()],M.prototype,"homePageFeaturedContent",void 0),e([y()],M.prototype,"homePageFeaturedContentCount",void 0),e([y()],M.prototype,"httpPort",void 0),e([y()],M.prototype,"httpsPort",void 0),e([y()],M.prototype,"id",void 0),e([y()],M.prototype,"ipCntryCode",void 0),e([y({readOnly:!0})],M.prototype,"isOrganization",null),e([y()],M.prototype,"isPortal",void 0),e([y()],M.prototype,"isReadOnly",void 0),e([y({readOnly:!0})],M.prototype,"itemPageUrl",null),e([y()],M.prototype,"layerTemplatesGroupQuery",void 0),e([y()],M.prototype,"maxTokenExpirationMinutes",void 0),e([y({type:Date})],M.prototype,"modified",void 0),e([y()],M.prototype,"name",void 0),e([y()],M.prototype,"portalHostname",void 0),e([y()],M.prototype,"portalMode",void 0),e([y()],M.prototype,"portalProperties",void 0),e([y()],M.prototype,"region",void 0),e([y()],M.prototype,"recycleBinEnabled",void 0),e([y({readOnly:!0})],M.prototype,"restUrl",null),e([y()],M.prototype,"rotatorPanels",void 0),e([y()],M.prototype,"showHomePageDescription",void 0),e([y()],M.prototype,"sourceJSON",void 0),e([y()],M.prototype,"staticImagesUrl",void 0),e([y({json:{name:"2DStylesGroupQuery"}})],M.prototype,"stylesGroupQuery2d",void 0),e([y({json:{name:"stylesGroupQuery"}})],M.prototype,"stylesGroupQuery3d",void 0),e([y()],M.prototype,"supportsHostedServices",void 0),e([y()],M.prototype,"symbolSetsGroupQuery",void 0),e([y()],M.prototype,"templatesGroupQuery",void 0),e([y()],M.prototype,"thumbnail",void 0),e([y({readOnly:!0})],M.prototype,"thumbnailUrl",null),e([y()],M.prototype,"units",void 0),e([y()],M.prototype,"url",void 0),e([y()],M.prototype,"urlKey",void 0),e([m("urlKey")],M.prototype,"readUrlKey",null),e([y()],M.prototype,"user",void 0),e([m("user")],M.prototype,"readUser",null),e([y()],M.prototype,"use3dBasemaps",void 0),e([y()],M.prototype,"useDefault3dBasemap",void 0),e([y()],M.prototype,"useStandardizedQuery",void 0),e([y()],M.prototype,"useVectorBasemaps",void 0),e([y()],M.prototype,"vectorBasemapGalleryGroupQuery",void 0),M=_=e([f("esri.portal.Portal")],M);const C=new FinalizationRegistry(e=>{e.remove()});function T(e){const t=r;return()=>{const r=e.deref();r&&t.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}export{M as default};
5
+ import{__decorate as e}from"tslib";import t from"../config.js";import{id as r}from"../kernel.js";import o from"../request.js";import s from"../core/Error.js";import has from"../core/has.js";import{JSONSupportMixin as a}from"../core/JSONSupport.js";import{Loadable as i}from"../core/Loadable.js";import{destroyMaybe as l,removeMaybe as u}from"../core/maybe.js";import{throwIfAborted as n,isAborted as p,createAbortError as h,throwIfAbortError as d}from"../core/promiseUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import{ensureType as c}from"../core/accessorSupport/ensureType.js";import"../core/RandomLCG.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import v from"../geometry/Extent.js";import{getLocale as S}from"../intl/locale.js";import{ensureDefaultPortalInstance as g}from"./portalDefault.js";import P from"./PortalGroup.js";import G from"./PortalQueryParams.js";import D from"./PortalQueryResult.js";import O from"./PortalUser.js";import{isApiKeyApplicable as B,hasBasemapStylesApiKey as Q}from"../support/apiKeyUtils.js";var b;let _;const U={PortalGroup:()=>Promise.resolve({default:P}),PortalItem:()=>import("./PortalItem.js"),PortalUser:()=>Promise.resolve({default:O})};let M=class extends(a(i)){static{b=this}static{this.AUTH_MODE_ANONYMOUS="anonymous"}static{this.AUTH_MODE_AUTO="auto"}static{this.AUTH_MODE_IMMEDIATE="immediate"}static{this.AUTH_MODE_NO_PROMPT="no-prompt"}constructor(e){super(e),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.g3DTilesGalleryGroupQuery=null,this.g3dTilesEnabled=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=t.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){C.unregister(this),this.defaultBasemap=l(this.defaultBasemap),this.defaultDevBasemap=l(this.defaultDevBasemap),this.defaultVectorBasemap=l(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=u(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(e){if(e)for(const r of e)t.request.trustedServers.includes(r)||t.request.trustedServers.push(r);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=this.user?.orgId,t=!e||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get hasAPIKey(){return B(this.restUrl)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get loaded(){return super.loaded}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.slice(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=O.fromJSON(e),t.portal=this),t}load(e){const t=import("../Basemap.js").then(({default:t})=>{n(e),_=t}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,e)).then(e=>{if(!this.hasAPIKey&&r){const e=r;this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==b.AUTH_MODE_AUTO&&this.authMode!==b.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=e.on("credential-create",T(new WeakRef(this))),C.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(t),Promise.resolve(this)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await import("../layers/ElevationLayer.js")).default;return e?e.map(e=>new t({id:e.id,url:e.url})):[]}async fetchBasemaps(e,t){const r=await this._fetchBasemaps(e,t);if(!0===t?.include3d&&!1!==this.use3dBasemaps){if(this.g3dTilesEnabled&&this.g3DTilesGalleryGroupQuery&&has("enable-feature:basemap-groundlayers")){const e=await this._fetchBasemaps3D(this.g3DTilesGalleryGroupQuery,t);r.unshift(...e)}const o=await this._fetchBasemaps3D(e,t);r.unshift(...o)}return r}async fetchDefault3DBasemap(e){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;const t=new G;t.query=this.default3DBasemapQuery,t.disableExtraQuery=!0;const r=(await this.queryItems(t,e)).results.find(e=>"Web Scene"===e.type);return r?new _({portalItem:r}):null}fetchCategorySchema(e){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",e).then(e=>e.categorySchema):p(e)?Promise.reject(h()):Promise.resolve([])}async fetchClassificationSchema(e){return this.hasClassificationSchema?this.request(this.restUrl+"/portals/self/classification/classificationSchema",e).then(e=>e.classificationSchema):null}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new G({num:100,sortField:"title"});if(t?.length){const o=[];for(const e of t)o.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,e).then(e=>e.results)}return p(e)?Promise.reject(h()):Promise.resolve([])}fetchRegions(e){const t=this.user?.culture||this.culture||S();return this.request(this.restUrl+"/portals/regions",{...e,query:{culture:t}})}fetchSettings(e){const t=this.user?.culture||this.culture||S();return this.request(this.restUrl+"/portals/self/settings",{...e,query:{culture:t}})}static getDefault(){return g(()=>new b)}queryGroups(e,t){return this.queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this.queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this.queryPortal("/community/users",e,"PortalUser",t)}fetchSelf(e=this.authMode,t=!1,r){const o=this.restUrl+"/portals/self",s={authMode:e,query:{culture:S().toLowerCase()},withCredentials:!0,...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),t&&(s.query.default=!0),this.request(o,s)}queryPortal(e,t,r,o){const s=c(G,t),a=t=>this.request(this.restUrl+e,{...s.toRequestOptions(this),...o}).then(e=>{const r=s.clone();return r.start=e.nextStart,new D({nextQueryParams:r,queryParams:s,total:e.total,results:b._resultsToTypedArray(t,{portal:this},e,o)})}).then(e=>Promise.all(e.results.map(t=>"function"==typeof t.when?t.when():e)).then(()=>e,t=>(d(t),e)));return r&&U[r]?U[r]().then(({default:e})=>(n(o),a(e))):a()}signIn(){if(this.hasAPIKey)return this.load().then(()=>{if(!this.user)throw new s("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")});if(this.authMode===b.AUTH_MODE_ANONYMOUS||this.authMode===b.AUTH_MODE_NO_PROMPT&&!r)return Promise.reject(new s("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then(()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then(()=>null)):"loading"===this.loadStatus?this.load().then(()=>this.credential?null:(this.credential=e,this.fetchSelf("immediate"))):this.user&&this.credential===e?null:(this.credential=e,this.fetchSelf("immediate"))).then(e=>{e&&(this.sourceJSON=e,this.read(e))});return r?r.getCredential(this.restUrl,{prompt:this.authMode!==b.AUTH_MODE_NO_PROMPT}).then(t=>e(t)):e(this.credential)}normalizeUrl(e){const t=this.credential?.token;return this._normalizeSSL(t?e+(e.includes("?")?"&":"?")+"token="+t:e)}requestToTypedArray(e,t,r){return this.request(e,t).then(e=>{const t=b._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map(t=>"function"==typeof t.when?t.when():e)).then(()=>t,()=>t)})}request(e,t={}){const r={f:"json",...t.query},{authMode:s=(this.authMode===b.AUTH_MODE_ANONYMOUS||this.authMode===b.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:a=null,cacheBust:i=!1,method:l="auto",responseType:u="json",signal:n}=t,p={authMode:s,body:a,cacheBust:i,method:l,query:r,responseType:u,timeout:0,signal:n};return t.withCredentials&&(p.withCredentials=!0),o(this._normalizeSSL(e),p).then(e=>e.data)}toJSON(){throw new s("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new b({sourceJSON:e})}_getHelperService(e){const t=this.helperServices?.[e];if(!t)throw new s("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}async _fetchBasemaps(e,t){const r=new G;r.query=e||(Q()?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,t);if(!o.total)return[];const s=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=s.sortField||"name",r.sortOrder=s.sortOrder||"desc";const a=await s.queryItems(r,t);if(!a.total)return[];return a.results.filter(e=>"Web Map"===e.type).map(e=>new _({portalItem:e}))}async _fetchBasemaps3D(e,t){const r=e||this.basemapGalleryGroupQuery3D;if(!r)return[];if(Q())return[];const o=new G({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,t);if(!s.total)return[];const a=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=a.sortField||"name",o.sortOrder=a.sortOrder||"desc";const i=await a.queryItems(o,t);if(!i.total)return[];return i.results.filter(e=>"Web Scene"===e.type).map(e=>new _({portalItem:e}))}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(e){if(e){const t=_.fromJSON(e);return t.portalItem={portal:this},t}return null}static _resultsToTypedArray(e,t,r,o){let s;if(r){const a=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(s=s.map(r=>{const o=Object.assign(e?e.fromJSON(r):r,t);return"function"==typeof o.load&&o.load(a),o}))}else s=[];return s}};e([y()],M.prototype,"access",void 0),e([y()],M.prototype,"allSSL",void 0),e([y()],M.prototype,"authMode",void 0),e([y()],M.prototype,"authorizedCrossOriginDomains",void 0),e([m("authorizedCrossOriginDomains")],M.prototype,"readAuthorizedCrossOriginDomains",null),e([y()],M.prototype,"basemapGalleryGroupQuery",void 0),e([y({json:{name:"3DBasemapGalleryGroupQuery"}})],M.prototype,"basemapGalleryGroupQuery3D",void 0),e([y({json:{name:"g3DTilesGalleryGroupQuery"}})],M.prototype,"g3DTilesGalleryGroupQuery",void 0),e([y({json:{name:"g3dTilesEnabled"}})],M.prototype,"g3dTilesEnabled",void 0),e([y()],M.prototype,"bingKey",void 0),e([y()],M.prototype,"canListApps",void 0),e([y()],M.prototype,"canListData",void 0),e([y()],M.prototype,"canListPreProvisionedItems",void 0),e([y()],M.prototype,"canProvisionDirectPurchase",void 0),e([y()],M.prototype,"canSearchPublic",void 0),e([y()],M.prototype,"canShareBingPublic",void 0),e([y()],M.prototype,"canSharePublic",void 0),e([y()],M.prototype,"canSignInArcGIS",void 0),e([y()],M.prototype,"canSignInIDP",void 0),e([y()],M.prototype,"colorSetsGroupQuery",void 0),e([y()],M.prototype,"commentsEnabled",void 0),e([y({type:Date})],M.prototype,"created",void 0),e([y()],M.prototype,"credential",void 0),e([y()],M.prototype,"culture",void 0),e([y()],M.prototype,"currentVersion",void 0),e([y()],M.prototype,"customBaseUrl",void 0),e([y()],M.prototype,"default3DBasemapQuery",void 0),e([y()],M.prototype,"defaultBasemap",void 0),e([m("defaultBasemap")],M.prototype,"readDefaultBasemap",null),e([y()],M.prototype,"defaultDevBasemap",void 0),e([m("defaultDevBasemap")],M.prototype,"readDefaultDevBasemap",null),e([y({type:v})],M.prototype,"defaultExtent",void 0),e([y()],M.prototype,"defaultVectorBasemap",void 0),e([m("defaultVectorBasemap")],M.prototype,"readDefaultVectorBasemap",null),e([y()],M.prototype,"description",void 0),e([y()],M.prototype,"devBasemapGalleryGroupQuery",void 0),e([y()],M.prototype,"eueiEnabled",void 0),e([y({readOnly:!0})],M.prototype,"extraQuery",null),e([y()],M.prototype,"featuredGroups",void 0),e([y()],M.prototype,"featuredItemsGroupQuery",void 0),e([y()],M.prototype,"galleryTemplatesGroupQuery",void 0),e([y()],M.prototype,"layoutGroupQuery",void 0),e([y()],M.prototype,"livingAtlasGroupQuery",void 0),e([y({readOnly:!0})],M.prototype,"hasAPIKey",null),e([y()],M.prototype,"hasCategorySchema",void 0),e([y()],M.prototype,"hasClassificationSchema",void 0),e([y()],M.prototype,"helpBase",void 0),e([y()],M.prototype,"helperServices",void 0),e([y()],M.prototype,"helpMap",void 0),e([y()],M.prototype,"homePageFeaturedContent",void 0),e([y()],M.prototype,"homePageFeaturedContentCount",void 0),e([y()],M.prototype,"httpPort",void 0),e([y()],M.prototype,"httpsPort",void 0),e([y()],M.prototype,"id",void 0),e([y()],M.prototype,"ipCntryCode",void 0),e([y({readOnly:!0})],M.prototype,"isOrganization",null),e([y()],M.prototype,"isPortal",void 0),e([y()],M.prototype,"isReadOnly",void 0),e([y({readOnly:!0})],M.prototype,"itemPageUrl",null),e([y()],M.prototype,"layerTemplatesGroupQuery",void 0),e([y()],M.prototype,"maxTokenExpirationMinutes",void 0),e([y({type:Date})],M.prototype,"modified",void 0),e([y()],M.prototype,"name",void 0),e([y()],M.prototype,"portalHostname",void 0),e([y()],M.prototype,"portalMode",void 0),e([y()],M.prototype,"portalProperties",void 0),e([y()],M.prototype,"region",void 0),e([y()],M.prototype,"recycleBinEnabled",void 0),e([y({readOnly:!0})],M.prototype,"restUrl",null),e([y()],M.prototype,"rotatorPanels",void 0),e([y()],M.prototype,"showHomePageDescription",void 0),e([y()],M.prototype,"sourceJSON",void 0),e([y()],M.prototype,"staticImagesUrl",void 0),e([y({json:{name:"2DStylesGroupQuery"}})],M.prototype,"stylesGroupQuery2d",void 0),e([y({json:{name:"stylesGroupQuery"}})],M.prototype,"stylesGroupQuery3d",void 0),e([y()],M.prototype,"supportsHostedServices",void 0),e([y()],M.prototype,"symbolSetsGroupQuery",void 0),e([y()],M.prototype,"templatesGroupQuery",void 0),e([y()],M.prototype,"thumbnail",void 0),e([y({readOnly:!0})],M.prototype,"thumbnailUrl",null),e([y()],M.prototype,"units",void 0),e([y()],M.prototype,"url",void 0),e([y()],M.prototype,"urlKey",void 0),e([m("urlKey")],M.prototype,"readUrlKey",null),e([y()],M.prototype,"user",void 0),e([m("user")],M.prototype,"readUser",null),e([y()],M.prototype,"use3dBasemaps",void 0),e([y()],M.prototype,"useDefault3dBasemap",void 0),e([y()],M.prototype,"useStandardizedQuery",void 0),e([y()],M.prototype,"useVectorBasemaps",void 0),e([y()],M.prototype,"vectorBasemapGalleryGroupQuery",void 0),M=b=e([f("esri.portal.Portal")],M);const C=new FinalizationRegistry(e=>{e.remove()});function T(e){const t=r;return()=>{const r=e.deref();r&&t.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}export{M as default};