@arcgis/core 4.33.0-next.20250507 → 4.33.0-next.20250509

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 (499) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/applications/SceneViewer/sceneViewerUtils.d.ts +2 -0
  3. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  4. package/arcade/batchExec.js +5 -0
  5. package/arcade/featureset/support/RecentlyUsedCache.js +1 -1
  6. package/arcade/functions/aiServices.js +1 -1
  7. package/arcade.js +1 -1
  8. package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
  9. package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
  10. package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
  11. package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
  12. package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
  13. package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
  14. package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
  15. package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
  16. package/assets/components/assets/input-time-picker/t9n/messages.en.json +1 -1
  17. package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
  18. package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
  19. package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
  20. package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
  21. package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
  22. package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
  23. package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
  24. package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
  25. package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
  26. package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
  27. package/assets/components/assets/input-time-picker/t9n/messages.json +1 -1
  28. package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
  29. package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
  30. package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
  31. package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
  32. package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
  33. package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
  34. package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
  35. package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
  36. package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
  37. package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
  38. package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
  39. package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
  40. package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
  41. package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
  42. package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
  43. package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
  44. package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
  45. package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
  46. package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
  47. package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
  48. package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
  49. package/assets/esri/core/workers/RemoteClient.js +1 -1
  50. package/assets/esri/core/workers/chunks/029a118e6dfb3f544a5c.js +1 -0
  51. package/assets/esri/core/workers/chunks/0516bd18334d3af6c555.js +1 -0
  52. package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js +2 -0
  53. package/assets/esri/core/workers/chunks/{543eb46b55cacd6e1dbc.js.LICENSE.txt → 0766ecb677d667e5fb83.js.LICENSE.txt} +1 -1
  54. package/assets/esri/core/workers/chunks/{c607d618b64d3accecc4.js → 0aca29f7156b2b412f2e.js} +1 -1
  55. package/assets/esri/core/workers/chunks/0bbb38f59f37c51c72f0.js +1 -0
  56. package/assets/esri/core/workers/chunks/10e6dffa57aa1a626708.js +1 -0
  57. package/assets/esri/core/workers/chunks/1abd026ed12c863e1d94.js +1 -0
  58. package/assets/esri/core/workers/chunks/1c6542315390037053a6.js +1 -0
  59. package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js +2 -0
  60. package/assets/esri/core/workers/chunks/{d8dc922f7466300b668f.js.LICENSE.txt → 218a66d53f7cf4f285aa.js.LICENSE.txt} +2 -2
  61. package/assets/esri/core/workers/chunks/243dc74ec62891ba1ef7.js +1 -0
  62. package/assets/esri/core/workers/chunks/{7cd32b10ed0e18e44ef2.js → 2b01e3bce78541620a86.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{f74b5659b6496a5c4c0c.js → 2e0af748eba93f3ea6cb.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{cd81df932b87583b7e4c.js → 306e262f148b3057b11b.js} +1 -1
  65. package/assets/esri/core/workers/chunks/352b7dcd1633e0c98194.js +1 -0
  66. package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js +2 -0
  67. package/assets/esri/core/workers/chunks/{7b4523ab392966624d97.js.LICENSE.txt → 3596540ef49e5330ceb2.js.LICENSE.txt} +1 -7
  68. package/assets/esri/core/workers/chunks/391b1c3e736a62befbaf.js +1 -0
  69. package/assets/esri/core/workers/chunks/{cbec01223d51cdb9ee79.js → 3c45603af279ad7fed8c.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{a22c88b0a525e602dce0.js → 3d0e09ef78dc2fd6957a.js} +1 -1
  71. package/assets/esri/core/workers/chunks/40e556a0645af8658658.js +1 -0
  72. package/assets/esri/core/workers/chunks/4402336db7210cd583e0.js +1 -0
  73. package/assets/esri/core/workers/chunks/46104db7f77952bb6c12.js +1 -0
  74. package/assets/esri/core/workers/chunks/{5383dc4814b0ba42e871.js → 47cd99ab3ed11a931084.js} +1 -1
  75. package/assets/esri/core/workers/chunks/47f64a340b5d56bf9e59.js +1 -0
  76. package/assets/esri/core/workers/chunks/49f0e53b3c9ba8451442.js +1 -0
  77. package/assets/esri/core/workers/chunks/4feb774f123da26e9f2a.js +1 -0
  78. package/assets/esri/core/workers/chunks/515e3295495d0958db7e.js +1 -0
  79. package/assets/esri/core/workers/chunks/{ee1d104e2bcc5d808fa4.js → 5228fc7fcdf57f44781e.js} +1 -1
  80. package/assets/esri/core/workers/chunks/5371df31553626528c69.js +1 -0
  81. package/assets/esri/core/workers/chunks/54f4a1131f99468db076.js +1 -0
  82. package/assets/esri/core/workers/chunks/{49c968e91c3c48aaa110.js → 5583d18032ed8bc17c74.js} +1 -1
  83. package/assets/esri/core/workers/chunks/5ddf463c85c33428e807.js +1 -0
  84. package/assets/esri/core/workers/chunks/5e7f35bf1aab93cb1c52.js +1 -0
  85. package/assets/esri/core/workers/chunks/61c74a733718d667b071.js +1 -0
  86. package/assets/esri/core/workers/chunks/{69f7fe6c58e4931597f6.js → 631205dc4d73d49ec9ed.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{875a0e2d023094c8e15e.js → 66e79aa02b3aa12b3778.js} +1 -1
  88. package/assets/esri/core/workers/chunks/{a5a43d54684747561aa9.js → 6b42bcfbb60432e3ed1f.js} +1 -1
  89. package/assets/esri/core/workers/chunks/6e12900a9f4c3c9941ec.js +1 -0
  90. package/assets/esri/core/workers/chunks/6e5d8a6b29c06a27998c.js +1 -0
  91. package/assets/esri/core/workers/chunks/6eabced7123a65d47292.js +1 -0
  92. package/assets/esri/core/workers/chunks/6f506303017903b9a06f.js +1 -0
  93. package/assets/esri/core/workers/chunks/6f6bf67a7960b7e9b03e.js +1 -0
  94. package/assets/esri/core/workers/chunks/{52a3d0e041717da7697e.js → 736cb9f74bf050b70f4c.js} +1 -1
  95. package/assets/esri/core/workers/chunks/7c49a8877bd744daa3d5.js +1 -0
  96. package/assets/esri/core/workers/chunks/7e8f78b96d43c224c7b6.js +1 -0
  97. package/assets/esri/core/workers/chunks/7ed9a9c33a08ebba5570.js +346 -0
  98. package/assets/esri/core/workers/chunks/83fcc6f770ad084b8ab9.js +1 -0
  99. package/assets/esri/core/workers/chunks/85efb318cda7260221ae.js +1 -0
  100. package/assets/esri/core/workers/chunks/86138c297095af1ac604.js +1 -0
  101. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  102. package/assets/esri/core/workers/chunks/8b74b609de4f70e1a75c.js +1 -0
  103. package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js +2 -0
  104. package/assets/esri/core/workers/chunks/{ac9c6779771ec855da79.js.LICENSE.txt → 90ae15ce22a49bd84876.js.LICENSE.txt} +3 -3
  105. package/assets/esri/core/workers/chunks/90f93091fe088875f80f.js +1 -0
  106. package/assets/esri/core/workers/chunks/91a02ee91f61cf841111.js +1 -0
  107. package/assets/esri/core/workers/chunks/93cc26e5636040fdc0b8.js +1 -0
  108. package/assets/esri/core/workers/chunks/9ca480eb8b2312381ccf.js +1 -0
  109. package/assets/esri/core/workers/chunks/{77c7b7c4426c2b1a5b42.js → 9fc35ec8185beba96715.js} +1 -1
  110. package/assets/esri/core/workers/chunks/a0d2bd5d4ed3c90f6b1c.js +1 -0
  111. package/assets/esri/core/workers/chunks/{4f627eb62caee760215a.js → a1f27c4f4b5ef3e359f7.js} +1 -1
  112. package/assets/esri/core/workers/chunks/a31658f544ac6e1801d6.js +1 -0
  113. package/assets/esri/core/workers/chunks/{3a205f87f100832ef9f5.js → a5e746e10239a3bfe237.js} +1 -1
  114. package/assets/esri/core/workers/chunks/a6bcae413e62cd879b46.js +1 -0
  115. package/assets/esri/core/workers/chunks/a73c6b4bc5baf440f85a.js +1 -0
  116. package/assets/esri/core/workers/chunks/{59d4c41172e921922cac.js → a8b42d8c0b76c234c09f.js} +100 -62
  117. package/assets/esri/core/workers/chunks/{3a517393619af3639b83.js → ad9bcd9dae45cdf90cbb.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{e46c05ef7272c7f1f70c.js → b1035bf4a016b1199236.js} +1 -1
  119. package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js +2 -0
  120. package/assets/esri/core/workers/chunks/{ce9de24cb96b56d20562.js.LICENSE.txt → b4f38fe9cc948a39ad87.js.LICENSE.txt} +1 -1
  121. package/assets/esri/core/workers/chunks/b5d68d8460b7c15001dd.js +1 -0
  122. package/assets/esri/core/workers/chunks/b816b608f31954128246.js +1 -0
  123. package/assets/esri/core/workers/chunks/bd7b54db7fd278b15500.js +1 -0
  124. package/assets/esri/core/workers/chunks/c1175477dfcdee90a453.js +1 -0
  125. package/assets/esri/core/workers/chunks/{85d87cd1bf7eecd54100.js → c16e0da7a19310c71e8b.js} +1 -1
  126. package/assets/esri/core/workers/chunks/c17c269cc30e7e1d0bfb.js +1 -0
  127. package/assets/esri/core/workers/chunks/c28d4717ed588c0d8bf1.js +1 -0
  128. package/assets/esri/core/workers/chunks/c2f925167a43f63289a7.js +1 -0
  129. package/assets/esri/core/workers/chunks/c9ab067b07d1eab974d1.js +1 -0
  130. package/assets/esri/core/workers/chunks/cb80b7ddc9acf625d754.js +1 -0
  131. package/assets/esri/core/workers/chunks/{812d8554144ef5a7cd4b.js → cd4fb107489594c57438.js} +1 -1
  132. package/assets/esri/core/workers/chunks/cd5c380196db7fb55242.js +1 -0
  133. package/assets/esri/core/workers/chunks/d22f91bc16a7641bcbef.js +1 -0
  134. package/assets/esri/core/workers/chunks/d7b640f7a181bd26c7c7.js +1 -0
  135. package/assets/esri/core/workers/chunks/d874d24568b1acedebc4.js +1 -0
  136. package/assets/esri/core/workers/chunks/{2bdbf678d4f013543dbb.js → d971571a957de70d5a8d.js} +1 -1
  137. package/assets/esri/core/workers/chunks/dc3a6beb3028009b3c23.js +1 -0
  138. package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js +2 -0
  139. package/assets/esri/core/workers/chunks/{670a66617249f2d15a62.js.LICENSE.txt → e0dc8794343c2a949ffb.js.LICENSE.txt} +1 -1
  140. package/assets/esri/core/workers/chunks/e3c1aea34ece8336dae1.js +1 -0
  141. package/assets/esri/core/workers/chunks/e483d2f169e51a361742.js +1 -0
  142. package/assets/esri/core/workers/chunks/e662c86b8bafc5512d3d.js +1 -0
  143. package/assets/esri/core/workers/chunks/e697dd4508f02dcfe329.js +1 -0
  144. package/assets/esri/core/workers/chunks/{a50cb1fc8c4c585c0e11.js → ec8e8048b3df2c92008d.js} +1 -1
  145. package/assets/esri/core/workers/chunks/ed6d0fea159dea638c2f.js +1 -0
  146. package/assets/esri/core/workers/chunks/f7ab3511f6627f467796.js +1 -0
  147. package/assets/esri/core/workers/chunks/f98689562017583f73ee.js +1 -0
  148. package/assets/esri/core/workers/chunks/fb2e28e6a87956267d1c.js +66 -0
  149. package/assets/esri/core/workers/chunks/fbcd94f60f92257a7303.js +2 -0
  150. package/assets/esri/core/workers/chunks/{c2594024d72133d3ed7b.js.LICENSE.txt → fbcd94f60f92257a7303.js.LICENSE.txt} +1 -1
  151. package/assets/esri/core/workers/chunks/fda48126f67e80034404.js +1 -0
  152. package/assets/esri/themes/base/widgets/_Daylight.scss +0 -4
  153. package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
  154. package/assets/esri/themes/base/widgets/_ShadowCast.scss +27 -28
  155. package/assets/esri/themes/dark/main.css +1 -1
  156. package/assets/esri/themes/light/main.css +1 -1
  157. package/assets/esri/themes/light/view.css +1 -1
  158. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast.json +1 -1
  159. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  160. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  161. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  162. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  163. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  164. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  165. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  166. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  167. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  168. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  169. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  170. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  171. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  172. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  173. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  174. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  175. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  176. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  177. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  178. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  179. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  180. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  181. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  182. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  183. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  184. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  185. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  186. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  187. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  188. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  189. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  190. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  191. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  192. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  193. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  194. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  195. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  196. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  197. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  198. package/chunks/HUDMaterial.glsl.js +1 -1
  199. package/chunks/Laserlines.glsl.js +2 -2
  200. package/chunks/aiServices.js +1 -1
  201. package/chunks/boundedPlane.js +1 -1
  202. package/chunks/cameraUtilsSpherical.js +1 -1
  203. package/chunks/vec32.js +1 -1
  204. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  205. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  206. package/core/mapCollectionUtils.js +1 -1
  207. package/core/perspectiveUtils.js +1 -1
  208. package/geometry/support/axisAngleDegrees.js +1 -1
  209. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  210. package/geometry/support/curves/circleUtils.js +1 -1
  211. package/geometry/support/curves/curveExtent.js +5 -0
  212. package/geometry/support/curves/curveLength.js +5 -0
  213. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  214. package/geometry/support/curves/ellipticArc4Utils.js +1 -1
  215. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  216. package/geometry/support/curves/mathUtils.js +1 -1
  217. package/geometry/support/curves/splitCurveAtPoint.js +1 -1
  218. package/geometry/support/frustum.js +1 -1
  219. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  220. package/geometry/support/meshUtils/primitives.js +1 -1
  221. package/geometry/support/meshUtils/projection.js +1 -1
  222. package/geometry/support/meshUtils/rotate.js +1 -1
  223. package/geometry/support/meshUtils/scale.js +1 -1
  224. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  225. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  226. package/geometry/support/plane.js +1 -1
  227. package/interfaces.d.ts +111 -6
  228. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  229. package/layers/KnowledgeGraphLayer.js +1 -1
  230. package/layers/LinkChartLayer.js +1 -1
  231. package/layers/MapImageLayer.js +1 -1
  232. package/layers/VoxelWasmPerSceneView.js +1 -1
  233. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  234. package/layers/graphics/sources/MemorySource.js +1 -1
  235. package/layers/mixins/SublayersOwner.js +1 -1
  236. package/layers/support/Sublayer.js +1 -1
  237. package/layers/video/VideoCameraSensorModel.js +1 -1
  238. package/layers/voxel/VoxelVolume.js +1 -1
  239. package/layers/voxel/voxelPlaneUtils.js +1 -1
  240. package/package.json +1 -1
  241. package/rest/print.js +1 -1
  242. package/rest/support/JobInfo.js +1 -1
  243. package/rest/support/TranslateContent.js +1 -1
  244. package/rest/support/TranslateParameters.js +1 -1
  245. package/rest/support/TranslateResult.js +1 -1
  246. package/support/loadArcade.js +1 -1
  247. package/support/revision.js +1 -1
  248. package/symbols/cim/cimAnalyzer.js +1 -1
  249. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  250. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js +1 -1
  251. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  252. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  253. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
  254. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  255. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  256. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  257. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  258. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  259. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  260. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  261. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  262. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  263. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  264. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  265. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  266. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  267. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  268. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  269. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  270. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  271. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  272. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  273. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  274. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  275. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  276. package/views/3d/camera/constraintUtils/distance.js +1 -1
  277. package/views/3d/camera/intersectionUtils.js +1 -1
  278. package/views/3d/interactive/Manipulator3D.js +1 -1
  279. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  280. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  281. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  282. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  283. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  284. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  285. package/views/3d/layers/I3SMeshView3D.js +1 -1
  286. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  287. package/views/3d/layers/PointCloudWorker.js +1 -1
  288. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  289. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  290. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  291. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  292. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  293. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  294. package/views/3d/layers/graphics/Labeler.js +1 -1
  295. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  296. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  297. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  298. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  299. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  300. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  301. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  302. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  303. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  304. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  305. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  306. package/views/3d/layers/i3s/Intersector.js +1 -1
  307. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  308. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  309. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  310. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  311. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  312. package/views/3d/state/Frustum.js +1 -1
  313. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  314. package/views/3d/state/controllers/InteractiveController.js +1 -1
  315. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  316. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  317. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  318. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  319. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  320. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  321. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  322. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  323. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  324. package/views/3d/support/hitTest.js +1 -1
  325. package/views/3d/support/orientedBoundingBox.js +1 -1
  326. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  327. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  328. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  329. package/views/3d/support/viewpointUtils.js +1 -1
  330. package/views/3d/terrain/Intersector.js +1 -1
  331. package/views/3d/terrain/OverlayManager.js +1 -1
  332. package/views/3d/terrain/TerrainRenderer.js +1 -1
  333. package/views/3d/terrain/TerrainSurface.js +1 -1
  334. package/views/3d/webgl/ManagedDepthTexture.js +1 -1
  335. package/views/3d/webgl/RenderCamera.js +1 -1
  336. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  337. package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
  338. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  339. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  340. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  341. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  342. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  343. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  344. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  345. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  346. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  347. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
  348. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  349. package/views/3d/webgl-engine/lib/HUDIntersectorResult.js +5 -0
  350. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  351. package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
  352. package/views/3d/webgl-engine/lib/IntersectorResult.js +5 -0
  353. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  354. package/views/3d/webgl-engine/lib/IntersectorType.js +5 -0
  355. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  356. package/views/3d/webgl-engine/lib/Material.js +1 -1
  357. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  358. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  359. package/views/3d/webgl-engine/lib/ObjectIntersectorResult.js +5 -0
  360. package/views/3d/webgl-engine/lib/ObjectTarget.js +5 -0
  361. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  362. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  363. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  364. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  365. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  366. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  367. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  368. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  369. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  370. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  371. package/views/3d/webgl-engine/lib/lodRendering/Intersector.js +1 -1
  372. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  373. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  374. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  375. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  376. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  377. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  378. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  379. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  380. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  381. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  382. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  383. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  384. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  385. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  386. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  387. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  388. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  389. package/views/FocusArea.js +1 -1
  390. package/views/FocusAreaOutline.js +5 -0
  391. package/views/FocusAreaOutlineItem.js +5 -0
  392. package/views/FocusAreas.js +1 -1
  393. package/views/FocusAreasUtils.js +5 -0
  394. package/views/FocusAreasView.js +5 -0
  395. package/views/SceneView.js +1 -1
  396. package/views/analysis/DimensionAnalysisView.js +1 -1
  397. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  398. package/views/interactive/ToolIntersector.js +1 -1
  399. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  400. package/views/interactive/sketch/constraints.js +1 -1
  401. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  402. package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
  403. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  404. package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
  405. package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
  406. package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
  407. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  408. package/views/layers/DimensionLayerView.js +1 -1
  409. package/views/support/angularMeasurementUtils.js +1 -1
  410. package/views/support/geometry3dUtils.js +1 -1
  411. package/widgets/BasemapLayerList.js +1 -1
  412. package/widgets/BatchAttributeForm.js +1 -1
  413. package/widgets/Daylight/DaylightViewModel.js +1 -1
  414. package/widgets/Daylight/css.js +1 -1
  415. package/widgets/Daylight.js +1 -1
  416. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  417. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  418. package/widgets/FeatureForm.js +1 -1
  419. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  420. package/widgets/FeatureTable.js +1 -1
  421. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  422. package/widgets/ShadowCast/css.js +1 -1
  423. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  424. package/widgets/UtilityNetworkTrace.js +1 -1
  425. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  426. package/widgets/VideoPlayer/components/MetadataSection.js +1 -1
  427. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  428. package/widgets/support/FilterBuilder.js +1 -1
  429. package/widgets/support/SketchTooltipControls.js +1 -1
  430. package/widgets/support/SnappingControls.js +1 -1
  431. package/assets/esri/core/workers/chunks/00e49ed684cc167c4481.js +0 -1
  432. package/assets/esri/core/workers/chunks/02e1332e91393ee985e8.js +0 -1
  433. package/assets/esri/core/workers/chunks/0366d46c78aa3b4a0523.js +0 -1
  434. package/assets/esri/core/workers/chunks/076a205298026e926d70.js +0 -1
  435. package/assets/esri/core/workers/chunks/07adf428f5fdba5c7cdf.js +0 -1
  436. package/assets/esri/core/workers/chunks/0c338364cb55afdbd580.js +0 -1
  437. package/assets/esri/core/workers/chunks/1349d4ea29fbf41e22bc.js +0 -1
  438. package/assets/esri/core/workers/chunks/2934fd7ec0c07371c4fe.js +0 -1
  439. package/assets/esri/core/workers/chunks/2a72f272051721767ca1.js +0 -319
  440. package/assets/esri/core/workers/chunks/2a9f206c23f69045d3f2.js +0 -1
  441. package/assets/esri/core/workers/chunks/2ac2c9cb88a7d1249b56.js +0 -1
  442. package/assets/esri/core/workers/chunks/2ad47c0ba1680f7d5e03.js +0 -1
  443. package/assets/esri/core/workers/chunks/2b3aa568356f4b70afe8.js +0 -1
  444. package/assets/esri/core/workers/chunks/2da01fe20200b6d74851.js +0 -1
  445. package/assets/esri/core/workers/chunks/35002d23c5b9f37c6331.js +0 -1
  446. package/assets/esri/core/workers/chunks/35b138f6d0687c5bee4f.js +0 -1
  447. package/assets/esri/core/workers/chunks/45d64b72b7e93e9c64d7.js +0 -1
  448. package/assets/esri/core/workers/chunks/4957450197305498d327.js +0 -1
  449. package/assets/esri/core/workers/chunks/4b63f36189730396721b.js +0 -1
  450. package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js +0 -2
  451. package/assets/esri/core/workers/chunks/55def679b9f1c7c4d4d3.js +0 -1
  452. package/assets/esri/core/workers/chunks/598fade09fa4da759ac2.js +0 -1
  453. package/assets/esri/core/workers/chunks/60f7cd05e88701f43d3f.js +0 -1
  454. package/assets/esri/core/workers/chunks/6118144588af9cd8e49b.js +0 -1
  455. package/assets/esri/core/workers/chunks/62c5030557595c9a7c37.js +0 -1
  456. package/assets/esri/core/workers/chunks/62d1e6e7d8685ffc152f.js +0 -1
  457. package/assets/esri/core/workers/chunks/670a66617249f2d15a62.js +0 -2
  458. package/assets/esri/core/workers/chunks/687a11f49772bf5e1f5a.js +0 -1
  459. package/assets/esri/core/workers/chunks/6b554b42e16ad32b433d.js +0 -1
  460. package/assets/esri/core/workers/chunks/6fc39a58f3011291c602.js +0 -1
  461. package/assets/esri/core/workers/chunks/7978b66cdfe078960ddd.js +0 -1
  462. package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +0 -2
  463. package/assets/esri/core/workers/chunks/7c2ec96749972e0b8a13.js +0 -1
  464. package/assets/esri/core/workers/chunks/7fa70851868f80eaccfc.js +0 -1
  465. package/assets/esri/core/workers/chunks/8d09cc782dae1dcfc6c4.js +0 -1
  466. package/assets/esri/core/workers/chunks/8ec0a762ec73d1f91fce.js +0 -1
  467. package/assets/esri/core/workers/chunks/919673d958045ab94c95.js +0 -1
  468. package/assets/esri/core/workers/chunks/9321e3244ccb1ee9985a.js +0 -1
  469. package/assets/esri/core/workers/chunks/97a4f8504e76c877893b.js +0 -1
  470. package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +0 -1
  471. package/assets/esri/core/workers/chunks/a1278a1c4a913c671989.js +0 -1
  472. package/assets/esri/core/workers/chunks/a2452958b0ced28fc1e5.js +0 -1
  473. package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js +0 -2
  474. package/assets/esri/core/workers/chunks/aed72cbac8d463b1d2e0.js +0 -1
  475. package/assets/esri/core/workers/chunks/af44ba2ee6c7670ddcc1.js +0 -1
  476. package/assets/esri/core/workers/chunks/b2f1d1721a9dd88a1adf.js +0 -1
  477. package/assets/esri/core/workers/chunks/b52a738ca2b5c39f8e15.js +0 -1
  478. package/assets/esri/core/workers/chunks/b60504e6326464a512df.js +0 -1
  479. package/assets/esri/core/workers/chunks/b79e8d1e3f2c214549b7.js +0 -1
  480. package/assets/esri/core/workers/chunks/ba4aafa8dfa76006c3e7.js +0 -1
  481. package/assets/esri/core/workers/chunks/bbcc5c5ef7cb92c2e213.js +0 -39
  482. package/assets/esri/core/workers/chunks/bbff052a991a2dc36960.js +0 -1
  483. package/assets/esri/core/workers/chunks/bceb837623aa79fcfbed.js +0 -1
  484. package/assets/esri/core/workers/chunks/bf190d672dcbaedc1a41.js +0 -1
  485. package/assets/esri/core/workers/chunks/bfd39cd1d83291ba014b.js +0 -1
  486. package/assets/esri/core/workers/chunks/c255c9279815359fdce5.js +0 -1
  487. package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +0 -2
  488. package/assets/esri/core/workers/chunks/ca8c631172902c6623fa.js +0 -1
  489. package/assets/esri/core/workers/chunks/ce9de24cb96b56d20562.js +0 -2
  490. package/assets/esri/core/workers/chunks/cf008faa999e8d07116f.js +0 -1
  491. package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js +0 -2
  492. package/assets/esri/core/workers/chunks/dbf6011dd7933f02d41d.js +0 -66
  493. package/assets/esri/core/workers/chunks/dcb9ab790e694328d02c.js +0 -1
  494. package/assets/esri/core/workers/chunks/e4e9dd635bdef18d0bd5.js +0 -1
  495. package/assets/esri/core/workers/chunks/e69f2e3c2d5e71fbb42f.js +0 -1
  496. package/assets/esri/core/workers/chunks/e93222c65bd28203ddf7.js +0 -1
  497. package/assets/esri/core/workers/chunks/ea70cabea50960dc8167.js +0 -1
  498. package/assets/esri/core/workers/chunks/f07b3aecff90a6a400d8.js +0 -1
  499. package/assets/esri/core/workers/chunks/f61632c06c05b72e7017.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import i from"../core/Identifiable.js";import s from"../core/ReactiveMap.js";import{on as o,watch as r,initial as l,syncAndInitial as n}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import d from"./Widget.js";import p from"./BasemapLayerList/BasemapLayerListViewModel.js";import m from"./BasemapLayerList/BasemapLayerListVisibleElements.js";import{css as h}from"./BasemapLayerList/css.js";import u from"./LayerList/LayerListItem.js";import f from"./LayerList/ListItem.js";import{minFilterItems as y,getItem as g,getLayerType as _,removeDestroyedListItems as b,setFilterPredicate as L,sortLayersToIds as v,sortChildLayersToIds as I}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as w}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{incrementHeadingLevel as E}from"./support/Heading.js";import{calciteListFilterProps as C}from"./support/listUtils.js";import{setFocus as T}from"./support/widgetUtils.js";import{messageBundle as M}from"./support/decorators/messageBundle.js";import{vmEvent as P}from"./support/decorators/vmEvent.js";import{tsx as O}from"./support/jsxFactory.js";const A=t.ofType(f),R="nested",B=".*\\S+.*",k="data-basemap-layer-type";let j=class extends(i.IdentifiableMixin(d)){constructor(e,i){super(e,i),this._baseListEl=null,this._referenceListEl=null,this._activeItem=null,this._tooltipReferenceMap=new Map,this._editTitleInput=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this._layerListMap=new s,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.baseFilterPredicate=null,this.baseFilterText="",this.referenceFilterPredicate=null,this.referenceFilterText="",this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minFilterItems=y,this.openedLayers=new t,this.openedLayerLists=new t,this.tableList=null,this.selectedItems=new A,this.selectionMode="none",this.tileOptions=null,this.viewModel=new p,this.visibilityAppearance="default",this.visibleElements=new m,this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{const o="pull"===s?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,r=g(e);if(!r?.sortable)return!1;const l=g(t),n=_(t),a=g(i),c=_(i),d=!!n&&!!c&&n===c,p={selected:r,from:l,to:a},m=t.group,h=i.group,u=l?.layer?.type??"",f=a?.layer?.type??"",y=new Set(["map-image","catalog","knowledge-graph"]),b="sublayer";return m&&h&&"function"==typeof o?o.call(null,p):d&&!y.has(u)&&!y.has(f)&&r?.layer?.type!==b},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find((e=>e.classList?.contains(h.item)));this._activeItem=g(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:o,newIndex:r}=e;if(!s||!i||t?.newIndex===r&&t?.dragEl===o&&t?.toEl===i&&t?.fromEl===s)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=o.value;const l=s,n=i;if(l!==n)this._moveLayerFromChildList({toEl:n,fromEl:l,dragEl:o,newIndex:r});else{const e=Array.from(s.children).filter((e=>e?.matches("calcite-list-item"))).map((e=>e.value));this._sortLayers(l,e)}}}initialize(){this.addHandles([o((()=>this.openedLayers),"change",(()=>this._handleOpenedLayersChange()),l),r((()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()]),(()=>b(this.selectedItems)),n),r((()=>[this.baseFilterPredicate,this._baseListEl]),(()=>L(this._baseListEl,this.baseFilterPredicate))),r((()=>[this.referenceFilterPredicate,this._referenceListEl]),(()=>L(this._referenceListEl,this.referenceFilterPredicate)))])}loadDependencies(){return w({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._tooltipReferenceMap.clear(),this._destroyOpenedLayerLists()}get _visibleBaseItems(){return this.baseItems?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error)))}get _visibleReferenceItems(){return this.referenceItems?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error)))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten((e=>e.children)).filter((({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled))}get _totalBaseItems(){return this.viewModel.baseItems.flatten((e=>e.children.filter((e=>"catalog-dynamic-group"!==e.layer?.type)))).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten((e=>e.children.filter((e=>"catalog-dynamic-group"!==e.layer?.type)))).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.visibleElements.filter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){const{openedLayers:e}=this;return e.toArray().map(((t,i)=>this._renderLayerFlowItem(t,i===e.length-1)))}get basemapTitle(){return this.viewModel.basemapTitle}set basemapTitle(e){this.viewModel.basemapTitle=e}get baseListItemCreatedFunction(){return this.viewModel.baseListItemCreatedFunction}set baseListItemCreatedFunction(e){this.viewModel.baseListItemCreatedFunction=e}get icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get referenceListItemCreatedFunction(){return this.viewModel.referenceListItemCreatedFunction}set referenceListItemCreatedFunction(e){this.viewModel.referenceListItemCreatedFunction=e}get baseItems(){return this.viewModel.baseItems}get referenceItems(){return this.viewModel.referenceItems}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const{state:e}=this.viewModel,t={[F.hidden]:"loading"===e,[F.disabled]:"disabled"===e};return O("div",{class:this.classes(h.base,F.widget,F.panel,t)},this._renderItems())}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:s,view:o,filterPlaceholder:r,minFilterItems:l,selectionMode:n,visibilityAppearance:a,_onCatalogOpen:c,_onTablesOpen:d,layerTablesEnabled:p}=this;return new t({headingLevel:i,view:o,filterPlaceholder:r,minFilterItems:l,selectionMode:n,visibilityAppearance:a,...s,catalogLayer:e,layerTablesEnabled:p,onCatalogOpen:c,onTablesOpen:d})}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){const{default:t}=await import("./TableList.js"),{headingLevel:i,selectionMode:s,dragEnabled:o}=this;return new t({headingLevel:i,selectionMode:s,dragEnabled:o,...this._getTableListParams(e)})}async _createFlowList(e,t){const{_layerListMap:i}=this,s=i.get(e);if(s)return s;const o="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,o),o}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const s=new AbortController,{signal:o}=s;this._openedLayersController=s,e.forEach(((i,s)=>{t.includes(s)||(i.destroy(),e.delete(s))}));const r=await Promise.all(t.map((e=>this._createFlowList(e,o))));if(o.aborted)return;i.removeAll(),i.addMany(r);const l=i.at(-1);l?"catalogLayer"in l?(this._set("catalogLayerList",l),this._set("tableList",null)):(this._set("catalogLayerList",null),this._set("tableList",l)):(this._set("catalogLayerList",null),this._set("tableList",null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){return e?O("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:this._tooltipReferenceMap.get(e.layer?.uid)},this.messages.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter((e=>!e.hidden)).toArray().map((e=>this._renderItemTooltipNodes(e)))}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems)?.toArray().map((e=>this._renderItemTooltipNodes(e)))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,T(e))}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map((({title:i,panel:s},o)=>{const r=()=>this._handlePanelFlowItemBack(s);return O("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:s.title,headingLevel:this.headingLevel,key:`flow-panel-${s.uid}`,selected:!t.length&&o===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),r()}},s.render(),O("calcite-button",{appearance:"transparent",onclick:r,slot:"footer-actions",width:"full"},this.messagesCommon.back))}))}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusEditingFlowItemNode(e){this._focusEditingFlowItem&&(this._focusEditingFlowItem=!1,T(e))}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,T(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,T(e))}_renderItem(e,t,i,s){return O(u,{activeItem:this._activeItem,canMove:this._canMove,css:h,displayMode:R,dragEnabled:!t&&this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){const o=g(i),r=g(e),l=g(t),n=D(t),a=D(e);n&&a&&this.viewModel.moveListItem({targetItem:o,fromParentItem:l,toParentItem:r,newIndex:s,from:n,to:a})}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:s}=e;t.insertBefore(i,t.children[s])}_sortLayers(e,t){if(e)if(e===this._referenceListEl||e===this._baseListEl){const i=e===this._referenceListEl?"reference":"base",s="base"===i?this.view?.map?.basemap?.baseLayers:"reference"===i?this.view?.map?.basemap?.referenceLayers:null;v(s,t)}else{const i=g(e);if(!i)return;I(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const s=e.target.selectedItems.map((e=>g(e))).filter(Boolean);i.removeAll(),i.addMany(s)}_renderEditingInput(){const{messages:e}=this,{basemapTitle:t}=this.viewModel;return O("div",{class:h.editing},O("calcite-label",null,e.basemapTitle,O("calcite-input",{afterCreate:e=>this._editTitleInput=e,label:e.basemapTitle,name:"basemaptitle",pattern:B,placeholder:e.basemapTitle,required:!0,title:e.basemapTitle,type:"text",value:t??void 0})))}_renderCancelButton(){const{messagesCommon:{cancel:e}}=this;return O("calcite-button",{appearance:"outline",bind:this,label:e,onclick:this._toggleEditingTitle,slot:"footer",title:e,width:"full"},e)}_renderSubmitButton(){const{messagesCommon:e}=this;return O("calcite-button",{label:e.form.submit,slot:"footer",title:e.form.submit,type:"submit",width:"full"},e.form.ok)}_renderEditingForm(){return this.editingTitle?O("form",{bind:this,class:h.editingForm,onsubmit:this._formSubmit},O("calcite-flow-item",{afterCreate:this._focusEditingFlowItemNode,afterUpdate:this._focusEditingFlowItemNode,bind:this,heading:this.visibleElements.heading?this.messages.basemapTitle:void 0,headingLevel:this.headingLevel,selected:0===this.openedLayers.length&&0===this._openedPanelItems.length,onCalciteFlowItemBack:e=>{e.preventDefault(),this._toggleEditingTitle()}},this._renderEditingInput(),this._renderCancelButton(),this._renderSubmitButton())):null}_renderEditTitleButton(){const{editingTitle:e,visibleElements:t,messagesCommon:i}=this,s=i.edit;return t.editTitleButton&&!e?O("calcite-action",{bind:this,icon:"pencil",onclick:this._toggleEditingTitle,slot:"header-actions-end",text:s,title:s}):null}_renderNoLayersInfoMessage(e){return O("div",{slot:"message"},e)}_renderNoLayersInfo(e,t){return O("div",{class:h.itemMessage},O("calcite-notice",{icon:"information",key:t,kind:"info",open:!0,width:"full"},this._renderNoLayersInfoMessage(e)))}_renderItems(){const{collapsed:e,visible:t,visibleElements:{closeButton:i,collapseButton:s,heading:o,flow:r},messages:l,viewModel:n}=this,a=[O("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:i,closed:!t,collapsed:e,collapsible:s,heading:o?n.basemapTitle??l.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!this.editingTitle&&0===this.openedLayers.length&&0===this._openedPanelItems.length,onCalciteFlowItemClose:()=>this.visible=!1},this._renderEditTitleButton(),this._renderReferenceSection(),this._renderBaseSection()),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return t?[r?O("calcite-flow",{key:"root-flow"},a):a,this._renderItemTooltips()]:null}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:s}=this,o=e.title||this.messages.untitledLayer;return O("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:o,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),s.pop();const t=s.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderList(e,t,i){const{messages:s,dragEnabled:o,selectionMode:r,filterPlaceholder:l,baseFilterText:n,referenceFilterText:a,_baseFilterEnabled:c,_referenceFilterEnabled:d,_rootGroupUid:p}=this,m="reference"===t?s.noReferenceLayers:s.noBaseLayers,u="reference"===t?d:c;return O("calcite-block",{class:h.section,collapsible:!0,heading:"reference"===t?s.referenceHeading:s.baseHeading,headingLevel:E(this.headingLevel),key:`block-${t}`,open:!0},0===e?.length?this._renderNoLayersInfo(m,t):null,O("calcite-list",{afterCreate:e=>{"reference"===t?this._referenceListEl=e:this._baseListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{"reference"===t?this._referenceListEl=null:this._baseListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),displayMode:R,filterProps:C,[k]:t,"data-layer-type":p,dragEnabled:o,filterEnabled:u,filterPlaceholder:l,filterText:u?"reference"===t?a:n:"",group:p,key:`list-${t}`,label:s.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,selectionAppearance:"border",selectionMode:r,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this["reference"===t?"referenceFilterText":"baseFilterText"]=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},e?.toArray().map((e=>this._renderItem(e,i))),e?.length&&u?O("div",{class:h.filterNoResults,slot:"filter-no-results"},O("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoLayersInfoMessage(m))):null))}_renderBaseSection(){const{_visibleBaseItems:e}=this;return this.visibleElements.baseLayers?this._renderList(e,"base",1===e?.length):null}_renderReferenceSection(){return this.visibleElements.referenceLayers?this._renderList(this._visibleReferenceItems,"reference",!1):null}_toggleEditingTitle(){const{editingTitle:e}=this,t=!e;this.editingTitle=t,t?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0}_formSubmit(e){e.preventDefault();const t=this._editTitleInput?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()}};function D(e){return e?.closest(`[${k}]`)?.getAttribute(k)}e([a()],j.prototype,"_baseListEl",void 0),e([a()],j.prototype,"_referenceListEl",void 0),e([a()],j.prototype,"_activeItem",void 0),e([a()],j.prototype,"_tooltipReferenceMap",void 0),e([a()],j.prototype,"_focusRootFlowItem",void 0),e([a()],j.prototype,"_focusPanelFlowItem",void 0),e([a()],j.prototype,"_focusLayerFlowItem",void 0),e([a()],j.prototype,"_focusEditingFlowItem",void 0),e([a()],j.prototype,"_layerListMap",void 0),e([a()],j.prototype,"_visibleBaseItems",null),e([a()],j.prototype,"_visibleReferenceItems",null),e([a()],j.prototype,"_openedPanelItems",null),e([a()],j.prototype,"_totalBaseItems",null),e([a()],j.prototype,"_totalReferenceItems",null),e([a()],j.prototype,"_baseFilterEnabled",null),e([a()],j.prototype,"_referenceFilterEnabled",null),e([a()],j.prototype,"_renderedOpenLayerFlowItems",null),e([a()],j.prototype,"basemapTitle",null),e([a({readOnly:!0})],j.prototype,"catalogLayerList",void 0),e([a()],j.prototype,"catalogOptions",void 0),e([a()],j.prototype,"collapsed",void 0),e([a()],j.prototype,"dragEnabled",void 0),e([a()],j.prototype,"editingTitle",void 0),e([a()],j.prototype,"filterPlaceholder",void 0),e([a()],j.prototype,"baseFilterPredicate",void 0),e([a()],j.prototype,"baseFilterText",void 0),e([a()],j.prototype,"referenceFilterPredicate",void 0),e([a()],j.prototype,"referenceFilterText",void 0),e([a()],j.prototype,"listItemCanGiveFunction",void 0),e([a()],j.prototype,"listItemCanReceiveFunction",void 0),e([a()],j.prototype,"baseListItemCreatedFunction",null),e([a()],j.prototype,"headingLevel",void 0),e([a()],j.prototype,"icon",null),e([a()],j.prototype,"knowledgeGraphOptions",void 0),e([a()],j.prototype,"label",null),e([a()],j.prototype,"layerTablesEnabled",void 0),e([a()],j.prototype,"mapImageOptions",void 0),e([a(),M("esri/widgets/BasemapLayerList/t9n/BasemapLayerList")],j.prototype,"messages",void 0),e([a(),M("esri/t9n/common")],j.prototype,"messagesCommon",void 0),e([a()],j.prototype,"minFilterItems",void 0),e([a({readOnly:!0})],j.prototype,"openedLayers",void 0),e([a({readOnly:!0})],j.prototype,"openedLayerLists",void 0),e([a()],j.prototype,"referenceListItemCreatedFunction",null),e([a({readOnly:!0})],j.prototype,"tableList",void 0),e([a({readOnly:!0})],j.prototype,"baseItems",null),e([a({readOnly:!0})],j.prototype,"referenceItems",null),e([a({type:A})],j.prototype,"selectedItems",void 0),e([a()],j.prototype,"selectionMode",void 0),e([a()],j.prototype,"tileOptions",void 0),e([a()],j.prototype,"view",null),e([P("trigger-action"),a({type:p})],j.prototype,"viewModel",void 0),e([a()],j.prototype,"visibilityAppearance",void 0),e([a({type:m,nonNullable:!0})],j.prototype,"visibleElements",void 0),j=e([c("esri.widgets.BasemapLayerList")],j);const x=j;export{x as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import i from"../core/Identifiable.js";import s from"../core/ReactiveMap.js";import{on as o,watch as r,initial as l,syncAndInitial as n}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import d from"./Widget.js";import p from"./BasemapLayerList/BasemapLayerListViewModel.js";import m from"./BasemapLayerList/BasemapLayerListVisibleElements.js";import{css as h}from"./BasemapLayerList/css.js";import u from"./LayerList/LayerListItem.js";import f from"./LayerList/ListItem.js";import{minFilterItems as y,getItem as g,getLayerType as _,removeDestroyedListItems as b,setFilterPredicate as L,sortLayersToIds as v,sortChildLayersToIds as I}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as w}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{incrementHeadingLevel as E}from"./support/Heading.js";import{calciteListFilterProps as C}from"./support/listUtils.js";import{setFocus as T}from"./support/widgetUtils.js";import{messageBundle as M}from"./support/decorators/messageBundle.js";import{vmEvent as P}from"./support/decorators/vmEvent.js";import{tsx as O}from"./support/jsxFactory.js";const A=t.ofType(f),R="nested",B=".*\\S+.*",k="data-basemap-layer-type";let j=class extends(i.IdentifiableMixin(d)){constructor(e,i){super(e,i),this._baseListEl=null,this._referenceListEl=null,this._activeItem=null,this._tooltipReferenceMap=new Map,this._editTitleInput=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this._layerListMap=new s,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.baseFilterPredicate=null,this.baseFilterText="",this.referenceFilterPredicate=null,this.referenceFilterText="",this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minFilterItems=y,this.openedLayers=new t,this.openedLayerLists=new t,this.tableList=null,this.selectedItems=new A,this.selectionMode="none",this.tileOptions=null,this.viewModel=new p,this.visibilityAppearance="default",this.visibleElements=new m,this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{const o="pull"===s?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,r=g(e);if(!r?.sortable)return!1;const l=g(t),n=_(t),a=g(i),c=_(i),d=!!n&&!!c&&n===c,p={selected:r,from:l,to:a},m=t.group,h=i.group,u=l?.layer?.type??"",f=a?.layer?.type??"",y=new Set(["map-image","catalog","knowledge-graph"]),b="sublayer";return m&&h&&"function"==typeof o?o.call(null,p):d&&!y.has(u)&&!y.has(f)&&r?.layer?.type!==b},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find((e=>e.classList?.contains(h.item)));this._activeItem=g(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:o,newIndex:r}=e;if(!s||!i||t?.newIndex===r&&t?.dragEl===o&&t?.toEl===i&&t?.fromEl===s)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=o.value;const l=s,n=i;if(l!==n)this._moveLayerFromChildList({toEl:n,fromEl:l,dragEl:o,newIndex:r});else{const e=Array.from(s.children).filter((e=>e?.matches("calcite-list-item"))).map((e=>e.value));this._sortLayers(l,e)}}}initialize(){this.addHandles([o((()=>this.openedLayers),"change",(()=>this._handleOpenedLayersChange()),l),r((()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()]),(()=>b(this.selectedItems)),n),r((()=>[this.baseFilterPredicate,this._baseListEl]),(()=>L(this._baseListEl,this.baseFilterPredicate))),r((()=>[this.referenceFilterPredicate,this._referenceListEl]),(()=>L(this._referenceListEl,this.referenceFilterPredicate)))])}loadDependencies(){return w({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._tooltipReferenceMap.clear(),this._destroyOpenedLayerLists()}get _visibleBaseItems(){return this.baseItems?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error)))}get _visibleReferenceItems(){return this.referenceItems?.filter((e=>!e.hidden&&(this.visibleElements.errors||!e.error)))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten((e=>e.children)).filter((({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled))}get _totalBaseItems(){return this.viewModel.baseItems.flatten((e=>e.children.filter((e=>"catalog-dynamic-group"!==e.layer?.type)))).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten((e=>e.children.filter((e=>"catalog-dynamic-group"!==e.layer?.type)))).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.visibleElements.filter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){const{openedLayers:e}=this;return e.toArray().map(((t,i)=>this._renderLayerFlowItem(t,i===e.length-1)))}get basemapTitle(){return this.viewModel.basemapTitle}set basemapTitle(e){this.viewModel.basemapTitle=e}get baseListItemCreatedFunction(){return this.viewModel.baseListItemCreatedFunction}set baseListItemCreatedFunction(e){this.viewModel.baseListItemCreatedFunction=e}get icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get referenceListItemCreatedFunction(){return this.viewModel.referenceListItemCreatedFunction}set referenceListItemCreatedFunction(e){this.viewModel.referenceListItemCreatedFunction=e}get baseItems(){return this.viewModel.baseItems}get referenceItems(){return this.viewModel.referenceItems}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const{state:e}=this.viewModel,t={[F.hidden]:"loading"===e,[F.disabled]:"disabled"===e};return O("div",{class:this.classes(h.base,F.widget,F.panel,t)},this._renderItems())}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:s,view:o,filterPlaceholder:r,minFilterItems:l,selectionMode:n,visibilityAppearance:a,_onCatalogOpen:c,_onTablesOpen:d,layerTablesEnabled:p}=this;return new t({headingLevel:i,view:o,filterPlaceholder:r,minFilterItems:l,selectionMode:n,visibilityAppearance:a,...s,catalogLayer:e,layerTablesEnabled:p,onCatalogOpen:c,onTablesOpen:d})}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){const{default:t}=await import("./TableList.js"),{headingLevel:i,selectionMode:s,dragEnabled:o}=this;return new t({headingLevel:i,selectionMode:s,dragEnabled:o,...this._getTableListParams(e)})}async _createFlowList(e,t){const{_layerListMap:i}=this,s=i.get(e);if(s)return s;const o="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,o),o}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const s=new AbortController,{signal:o}=s;this._openedLayersController=s,e.forEach(((i,s)=>{t.includes(s)||(i.destroy(),e.delete(s))}));const r=await Promise.all(t.map((e=>this._createFlowList(e,o))));if(o.aborted)return;i.removeAll(),i.addMany(r);const l=i.at(-1);l?"catalogLayer"in l?(this._set("catalogLayerList",l),this._set("tableList",null)):(this._set("catalogLayerList",null),this._set("tableList",l)):(this._set("catalogLayerList",null),this._set("tableList",null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){return e?O("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:this._tooltipReferenceMap.get(e.layer?.uid)},this.messages.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter((e=>!e.hidden)).toArray().map((e=>this._renderItemTooltipNodes(e)))}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems)?.toArray().map((e=>this._renderItemTooltipNodes(e)))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,T(e))}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map((({title:i,panel:s},o)=>{const r=()=>this._handlePanelFlowItemBack(s);return O("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:s.title,headingLevel:this.headingLevel,key:`flow-panel-${s.uid}`,selected:!t.length&&o===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),r()}},s.render(),O("calcite-button",{appearance:"transparent",onclick:r,slot:"footer-actions",width:"full"},this.messagesCommon.back))}))}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusEditingFlowItemNode(e){this._focusEditingFlowItem&&(this._focusEditingFlowItem=!1,T(e))}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,T(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,T(e))}_renderItem(e,t,i,s){return O(u,{activeItem:this._activeItem,canMove:this._canMove,css:h,displayMode:R,dragEnabled:!t&&this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){const o=g(i),r=g(e),l=g(t),n=x(t),a=x(e);n&&a&&this.viewModel.moveListItem({targetItem:o,fromParentItem:l,toParentItem:r,newIndex:s,from:n,to:a})}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:s}=e;t.insertBefore(i,t.children[s])}_sortLayers(e,t){if(e)if(e===this._referenceListEl||e===this._baseListEl){const i=e===this._referenceListEl?"reference":"base",s="base"===i?this.view?.map?.basemap?.baseLayers:"reference"===i?this.view?.map?.basemap?.referenceLayers:null;v(s,t)}else{const i=g(e);if(!i)return;I(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const s=e.target.selectedItems.map((e=>g(e))).filter(Boolean);i.removeAll(),i.addMany(s)}_renderEditingInput(){const{messages:e}=this,{basemapTitle:t}=this.viewModel;return O("div",{class:h.editing},O("calcite-label",null,e.basemapTitle,O("calcite-input",{afterCreate:e=>this._editTitleInput=e,label:e.basemapTitle,name:"basemaptitle",pattern:B,placeholder:e.basemapTitle,required:!0,title:e.basemapTitle,type:"text",value:t??void 0})))}_renderCancelButton(){const{messagesCommon:{cancel:e}}=this;return O("calcite-button",{appearance:"outline",bind:this,label:e,onclick:this._toggleEditingTitle,slot:"footer",title:e,width:"full"},e)}_renderSubmitButton(){const{messagesCommon:e}=this;return O("calcite-button",{label:e.form.submit,slot:"footer",title:e.form.submit,type:"submit",width:"full"},e.form.ok)}_renderEditingForm(){return this.editingTitle?O("form",{bind:this,class:h.editingForm,onsubmit:this._formSubmit},O("calcite-flow-item",{afterCreate:this._focusEditingFlowItemNode,afterUpdate:this._focusEditingFlowItemNode,bind:this,heading:this.visibleElements.heading?this.messages.basemapTitle:void 0,headingLevel:this.headingLevel,selected:0===this.openedLayers.length&&0===this._openedPanelItems.length,onCalciteFlowItemBack:e=>{e.preventDefault(),this._toggleEditingTitle()}},this._renderEditingInput(),this._renderCancelButton(),this._renderSubmitButton())):null}_renderEditTitleButton(){const{editingTitle:e,visibleElements:t,messagesCommon:i}=this,s=i.edit;return t.editTitleButton&&!e?O("calcite-action",{bind:this,icon:"pencil",onclick:this._toggleEditingTitle,slot:"header-actions-end",text:s,title:s}):null}_renderNoLayersInfoMessage(e){return O("div",{slot:"message"},e)}_renderNoLayersInfo(e,t){return O("div",{class:h.itemMessage},O("calcite-notice",{icon:"information",key:t,kind:"info",open:!0,width:"full"},this._renderNoLayersInfoMessage(e)))}_renderItems(){const{collapsed:e,visible:t,visibleElements:{closeButton:i,collapseButton:s,heading:o,flow:r},messages:l,viewModel:n}=this,a=[O("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:i,closed:!t,collapsed:e,collapsible:s,heading:o?n.basemapTitle??l.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!this.editingTitle&&0===this.openedLayers.length&&0===this._openedPanelItems.length,onCalciteFlowItemClose:()=>this.visible=!1},this._renderEditTitleButton(),this._renderReferenceSection(),this._renderBaseSection()),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return t?[r?O("calcite-flow",{key:"root-flow"},a):a,this._renderItemTooltips()]:null}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:s}=this,o=e.title||this.messages.untitledLayer;return O("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:o,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),s.pop();const t=s.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderList(e,t,i){const{messages:s,dragEnabled:o,selectionMode:r,filterPlaceholder:l,baseFilterText:n,referenceFilterText:a,_baseFilterEnabled:c,_referenceFilterEnabled:d,_rootGroupUid:p}=this,m="reference"===t?s.noReferenceLayers:s.noBaseLayers,u="reference"===t?d:c;return O("calcite-block",{class:h.section,collapsible:!0,expanded:!0,heading:"reference"===t?s.referenceHeading:s.baseHeading,headingLevel:E(this.headingLevel),key:`block-${t}`},0===e?.length?this._renderNoLayersInfo(m,t):null,O("calcite-list",{afterCreate:e=>{"reference"===t?this._referenceListEl=e:this._baseListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{"reference"===t?this._referenceListEl=null:this._baseListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),displayMode:R,filterProps:C,[k]:t,"data-layer-type":p,dragEnabled:o,filterEnabled:u,filterPlaceholder:l,filterText:u?"reference"===t?a:n:"",group:p,key:`list-${t}`,label:s.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,selectionAppearance:"border",selectionMode:r,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this["reference"===t?"referenceFilterText":"baseFilterText"]=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},e?.toArray().map((e=>this._renderItem(e,i))),e?.length&&u?O("div",{class:h.filterNoResults,slot:"filter-no-results"},O("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoLayersInfoMessage(m))):null))}_renderBaseSection(){const{_visibleBaseItems:e}=this;return this.visibleElements.baseLayers?this._renderList(e,"base",1===e?.length):null}_renderReferenceSection(){return this.visibleElements.referenceLayers?this._renderList(this._visibleReferenceItems,"reference",!1):null}_toggleEditingTitle(){const{editingTitle:e}=this,t=!e;this.editingTitle=t,t?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0}_formSubmit(e){e.preventDefault();const t=this._editTitleInput?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()}};function x(e){return e?.closest(`[${k}]`)?.getAttribute(k)}e([a()],j.prototype,"_baseListEl",void 0),e([a()],j.prototype,"_referenceListEl",void 0),e([a()],j.prototype,"_activeItem",void 0),e([a()],j.prototype,"_tooltipReferenceMap",void 0),e([a()],j.prototype,"_focusRootFlowItem",void 0),e([a()],j.prototype,"_focusPanelFlowItem",void 0),e([a()],j.prototype,"_focusLayerFlowItem",void 0),e([a()],j.prototype,"_focusEditingFlowItem",void 0),e([a()],j.prototype,"_layerListMap",void 0),e([a()],j.prototype,"_visibleBaseItems",null),e([a()],j.prototype,"_visibleReferenceItems",null),e([a()],j.prototype,"_openedPanelItems",null),e([a()],j.prototype,"_totalBaseItems",null),e([a()],j.prototype,"_totalReferenceItems",null),e([a()],j.prototype,"_baseFilterEnabled",null),e([a()],j.prototype,"_referenceFilterEnabled",null),e([a()],j.prototype,"_renderedOpenLayerFlowItems",null),e([a()],j.prototype,"basemapTitle",null),e([a({readOnly:!0})],j.prototype,"catalogLayerList",void 0),e([a()],j.prototype,"catalogOptions",void 0),e([a()],j.prototype,"collapsed",void 0),e([a()],j.prototype,"dragEnabled",void 0),e([a()],j.prototype,"editingTitle",void 0),e([a()],j.prototype,"filterPlaceholder",void 0),e([a()],j.prototype,"baseFilterPredicate",void 0),e([a()],j.prototype,"baseFilterText",void 0),e([a()],j.prototype,"referenceFilterPredicate",void 0),e([a()],j.prototype,"referenceFilterText",void 0),e([a()],j.prototype,"listItemCanGiveFunction",void 0),e([a()],j.prototype,"listItemCanReceiveFunction",void 0),e([a()],j.prototype,"baseListItemCreatedFunction",null),e([a()],j.prototype,"headingLevel",void 0),e([a()],j.prototype,"icon",null),e([a()],j.prototype,"knowledgeGraphOptions",void 0),e([a()],j.prototype,"label",null),e([a()],j.prototype,"layerTablesEnabled",void 0),e([a()],j.prototype,"mapImageOptions",void 0),e([a(),M("esri/widgets/BasemapLayerList/t9n/BasemapLayerList")],j.prototype,"messages",void 0),e([a(),M("esri/t9n/common")],j.prototype,"messagesCommon",void 0),e([a()],j.prototype,"minFilterItems",void 0),e([a({readOnly:!0})],j.prototype,"openedLayers",void 0),e([a({readOnly:!0})],j.prototype,"openedLayerLists",void 0),e([a()],j.prototype,"referenceListItemCreatedFunction",null),e([a({readOnly:!0})],j.prototype,"tableList",void 0),e([a({readOnly:!0})],j.prototype,"baseItems",null),e([a({readOnly:!0})],j.prototype,"referenceItems",null),e([a({type:A})],j.prototype,"selectedItems",void 0),e([a()],j.prototype,"selectionMode",void 0),e([a()],j.prototype,"tileOptions",void 0),e([a()],j.prototype,"view",null),e([P("trigger-action"),a({type:p})],j.prototype,"viewModel",void 0),e([a()],j.prototype,"visibilityAppearance",void 0),e([a({type:m,nonNullable:!0})],j.prototype,"visibleElements",void 0),j=e([c("esri.widgets.BasemapLayerList")],j);const D=j;export{D 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import"../core/has.js";import{abortHandle as t}from"../core/handleUtils.js";import{getOrCreateMapValue as i}from"../core/MapUtils.js";import{watch as n,whenOnce as o}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{isIntegerField as r}from"../layers/support/fieldUtils.js";import{isString as l}from"../support/guards.js";import d from"./Widget.js";import{getHiddenFieldsValidationErrorMessage as p,getVisibleFieldInputValidationErrorMessage as u,isElementTemplateWithInputType as c}from"./BatchAttributeForm/batchAttributeFormUtils.js";import m from"./BatchAttributeForm/BatchAttributeFormViewModel.js";import{css as h}from"./BatchAttributeForm/css.js";import{VisibleElements as v}from"./BatchAttributeForm/VisibleElements.js";import{InputVisibilityCode as f,isGroupInput as b,isFieldInput as _,differentValuesString as C}from"./BatchAttributeForm/inputs/support/inputUtils.js";import{loadCalciteComponents as g}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as I,getIntlOptionsForField as y,prepareISOFieldValueForDateComponents as F,prepareUnixFieldValueForDateComponents as w,normalizeTimeOnlyString as x,getISOFieldValueFromDateComponents as k,getUnixFieldValueFromDateComponents as D}from"./support/dateUtils.js";import{globalCss as O}from"./support/globalCss.js";import{setFocus as M}from"./support/widgetUtils.js";import{messageBundle as T}from"./support/decorators/messageBundle.js";import{vmEvent as V}from"./support/decorators/vmEvent.js";import{tsx as S}from"./support/jsxFactory.js";import{isEmptyValue as E}from"./support/forms/formUtils.js";import{substitute as U}from"../intl/substitute.js";const R="data-element-id";let L=class extends d{constructor(e,t){super(e,t),this.headingLevel=2,this.messagesCommon=null,this.messages=null,this.featureFormMessages=null,this.readOnly=!1,this.viewModel=new m,this.visibleElements=new v,this.groupDisplay="all",this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._touchedInputs=new Set,this._focusedFieldInput=null,this._batchSwitchInputInitialValues=new Map,this._saveInput=this._saveInput.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentUpdate=this._afterDateComponentUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n((()=>this.features),(()=>{this._dateComponentMap.clear();const e=new AbortController;o((()=>!this.viewModel.updating),e.signal).then((()=>{this._attemptFocusOnNextRender=!0})),this.addHandles(t(e))})),n((()=>this.viewModel.activeForm),(()=>{this._batchSwitchInputInitialValues.clear()}))])}loadDependencies(){return g({input:()=>import("@esri/calcite-components/dist/components/calcite-input"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group")})}get activeFeatureIndex(){return this.viewModel.activeFeatureIndex}set activeFeatureIndex(e){this.viewModel.activeFeatureIndex=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get _effectiveDisabled(){return this.disabled||this.viewModel.updating}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get icon(){return"edit-attributes"}set icon(e){this._overrideIfSome("icon",e)}goToClosestError(){const e=this.viewModel.getFirstVisibleInvalidFieldInput();if(!e)return;const{groupInput:t}=e;t&&(t.open||(t.open=!0)),setTimeout((()=>{if(!this.domNode)return;const t=this.domNode.querySelector(`[data-element-id="${e.input.template.elementId}"]`);t&&M(t)}),10)}render(){const{status:e}=this.viewModel;return"failed"===e?this._renderErrorNotice(this.messages.formFailedToLoad):this.viewModel.expressionEvaluationFailed?this._renderErrorNotice(this.messages.expressionEvaluationFailed):this.viewModel.hasLayersWithContingentValues?this._renderErrorNotice(this.messages.unsupportedContingentValues):S("div",{class:this.classes(h.base,O.widget,O.panel)},"loaded"===e?this._renderForm():"loading"===e?S("calcite-loader",{key:"loader",label:this.messagesCommon?.loading}):null)}_setDateTimeTimeZoneMap(e){const{datePart:t,elementId:n}=e.dataset,o=this._getCalciteElementFromDateTimeTimeZonePicker(e,t);if(!o)return;const a=i(this._dateComponentMap,`${n}`,(()=>({placeholder:{date:"",time:"",timeZone:""}})));switch(a.placeholder[t]=o.placeholder??"",t){case"date":a.date=e;break;case"time":a.time=e;break;case"timeZone":a.timeZone=e,a.defaultComboboxItemElements=o.selectedItems}"timeZone"===t&&(a.defaultComboboxItemElements=o.selectedItems)}_getCalciteElementFromDateTimeTimeZonePicker(e,t){const i=e.shadowRoot;return i?"timeZone"===t?i.querySelector("calcite-combobox"):i.querySelector("calcite-input-text"):null}_updateDateTimeOrTimeZoneShadowDom(e,t){const{datePart:i,elementId:n}=e.dataset,o=this._dateComponentMap.get(`${n}`);if(!o)return;const a=this._getCalciteElementFromDateTimeTimeZonePicker(e,i);if(a)switch(i){case"date":case"time":a.placeholder=t?this.messages.differentValues:o.placeholder[i];break;case"timeZone":t?(a.value="",a.placeholder=this.messages.differentValues):(!a.selectedItems.length&&o.defaultComboboxItemElements?.length&&(a.selectedItems[0]=o.defaultComboboxItemElements[0]),a.placeholder=o.placeholder[i])}}_renderErrorNotice(e){return S("div",{class:this.classes(h.base,O.widget,O.panel)},S("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},S("div",{slot:"message"},e)))}_renderForm(){return S("form",{onsubmit:this._onFormSubmit},this._renderInvisibleFieldsError(),this._renderContent())}_renderInvisibleFieldsError(){const{viewModel:e}=this,{hasNonActiveInvalidFeatures:t,activeForm:i}=e;let n;if(!e.submitHasBeenAttempted)return null;if(i.invalidHiddenInputs.length>0)if(n=p(i,e.mode,this.messages),"batch"===this.viewModel.mode){const e=i.invalidHiddenInputs.filter((e=>e.effectiveVisibilityCode===f.HIDDEN_GROUP_VISIBILITY_EXPRESSION_ALL||e.visibilityCode===f.HIDDEN_VISIBILITY_EXPRESSION_ALL));e.length>0?n+=` (${e.map((e=>e.label)).join(", ")})`:n=null}else n+=` (${i.invalidHiddenInputs.map((e=>e.label)).join(", ")})`;else if(t)return null;return n?S("calcite-notice",{class:h.noticeError,icon:!0,kind:"danger",open:!0},S("div",{slot:"message"},n)):null}_renderContent(){if(!this.viewModel.hasVisibleInputs)return[S("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},S("div",{slot:"message"},this.messages.noVisibleFields[this.viewModel.noVisibleElementsReason]))];const{inputs:e}=this.viewModel.activeForm;return e.filter((e=>e.visible)).map((e=>this._renderInput(e)))}_renderInput(e){return b(e)?this._renderGroupInput(e):_(e)?this._renderLabeledField(e):void 0}_renderGroupInput(e){const{inputs:t,template:i,open:n}=e,o=t.filter((e=>e.visible)),a=i.label??"";return S("calcite-block",{class:this.classes(h.group,"sequential"===this.groupDisplay?h.groupSequential:null,this.disabled?h.inputDisabled:null),collapsible:!0,description:i.description??void 0,disabled:this._effectiveDisabled,heading:a,headingLevel:this.headingLevel,key:`{${i.elementId}-key}`,label:a,open:n,onCalciteBlockClose:()=>{e.open=!1},onCalciteBlockOpen:()=>{e.open=!0}},o.map((e=>this._renderInput(e))))}_renderLabeledField(e){const{label:t,elementId:i}=e.template,{required:n,dataType:o}=e,a=n?U(this.messages.requiredFieldLabel,{name:t}):t;return S("calcite-label",{"aria-label":a,class:h.label,key:`field--${i}`},S("div",{class:h.labelTextContent,key:"labelTextContainer"},t,n?S("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==o?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e))}_renderFieldInput(e){const t=this.getCommonInputProps(e),{dataType:i}=e;return"date"===i?this._renderDateComponents(e,t):"coded-value"===e.domain?.type?this._renderCodedInputs({input:e,props:t}):"number"===i?this._renderNumberComponent(e,t):this._renderStringComponent(e,t)}_renderAuxiliaryText(e){const{compositeError:t,description:i,submittable:n}=e,o=!n&&t&&(this.viewModel.submitHasBeenAttempted||this._touchedInputs.has(e.template.elementId))?u(e,t,this.messages):null;return o?S("calcite-input-message",{icon:!0,status:"invalid"},o):i?S("calcite-input-message",{class:h.description,icon:!1,status:"idle"},i):null}_renderCodedInputs({input:e,props:t}){const i=e.template.input?.type??null,n=e.codedValueOptions;switch(i){case"switch":return this._renderSwitchField({input:e,props:t});case"radio-buttons":return this._renderRadioButtonGroupComponent({input:e,options:n.flat(),props:t});default:return this._renderComboBoxComponent({options:n,props:t,input:e})}}_renderSwitchField({input:e,props:t}){if((this._batchSwitchInputInitialValues.get(e)===C||e.value===C)&&"batch"===this.viewModel.mode){const i={dropdown:{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,disabled:t.readOnly,open:!1,[R]:t[R]},trigger:{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral",slot:"trigger",label:t.label},group:{mode:"single"}};return this._renderDropdownComponent({buttonValue:e.value,dropdownProps:i,options:[{name:this.messages.differentValues,value:C,disabled:!0},...e.codedValueDomainOptions]})}return this._renderSwitchComponent({input:e,props:t})}_renderSwitchComponent({input:e,props:t}){return S("calcite-switch",{...t,checked:!!c(e.template,"switch")&&e.value===e.template.input.onValue,class:h.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldInput=null},onCalciteSwitchChange:({currentTarget:e})=>this._saveInput(e)})}_renderDropdownComponent({buttonValue:e,options:t,dropdownProps:i}){const{trigger:n,dropdown:o,group:a}=i;return S("calcite-dropdown",{...o,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,onCalciteDropdownSelect:({currentTarget:e})=>this._saveInput(e)},S("calcite-button",{...n},e===C?this.messages.differentValues:e),S("calcite-dropdown-group",{selectionMode:a.mode},t.map((t=>S("calcite-dropdown-item",{disabled:t.disabled,label:String(t.name),selected:e===t.value},t.name)))))}_renderComboBoxComponent({input:e,options:t,props:i}){const n="INSERT"===this.viewModel.editType,o=this._touchedInputs.has(e?.template?.elementId),a=n&&e.showNoValueOptionEnabled&&!o?()=>{}:i.onblur,s={...i,onblur:a};return S("calcite-combobox",{...s,selectionMode:"single",value:i.placeholder===this.messages.differentValues?C:String(i.value),onCalciteComboboxChange:({currentTarget:e})=>{e.value!==C&&this._saveInput(e)}},this.renderComboboxOptionsList({input:e,options:t,props:i}))}renderComboboxOptionsList({input:e,options:t,props:i}){const[n,o]=t.map((e=>e.map((({name:e,value:t})=>S("calcite-combobox-item",{key:`#${t}`,selected:i.value===t,textLabel:e,value:`${t}`}))))),a=[...n];o.length>0&&a.push(S("calcite-combobox-item-group",{key:"unsupported",label:this.featureFormMessages.subtypes.unsupportedDomainGroupTitle},o));const s=i.placeholder===this.messages.differentValues,r=!s&&E(i.value);return e.showNoValueOptionEnabled&&a.unshift(S("calcite-combobox-item",{key:"empty-option",selected:r,textLabel:e.showNoValueLabel||this.messages.empty,value:""})),s&&a.unshift(S("calcite-combobox-item",{key:C,selected:!0,textLabel:this.messages.differentValues,value:C})),a}_renderRadioButtonGroupComponent({input:e,options:t,props:i}){const n=t.map((({name:t,value:n})=>this._renderRadioButtons({label:t,value:n,selected:n===e.value,props:i})));if(e.showNoValueOptionEnabled){const t="",o=e.showNoValueLabel||this.messages.empty,a=E(e.value);n.unshift(this._renderRadioButtons({label:o,value:t,selected:a,props:i}))}return S("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:h.inputRadioGroup,disabled:i.readOnly,key:`${i.key}-radio-group`,layout:"vertical",name:i.name,required:i.required},n,i.placeholder===this.messages.differentValues?S("calcite-label",{class:h.placeholderRadio,key:i.label,layout:"inline"},S("calcite-radio-button",{checked:!0,class:h.inputRadio,disabled:!0,name:i.placeholder,value:i.placeholder}),i.placeholder):null)}_renderRadioButtons({value:e,selected:t,label:i,props:n}){return S("calcite-label",{class:h.inputRadioLabel,key:n.label,layout:"inline"},S("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:t,class:h.inputRadio,disabled:n.readOnly,name:n.label,onblur:()=>{this._focusedFieldInput=null},value:e,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveInput(e)}}),i)}_renderStringComponent(e,t){const{template:i}=e;return i.field.editable?i.input&&"text-area"===i.input.type?S("calcite-text-area",{...t,class:this.classes(h.individualElement),resize:"vertical",value:t.value?String(t.value):"",onCalciteTextAreaInput:({currentTarget:e})=>this._saveInput(e)}):S("calcite-input",{...t,class:this.classes(h.individualElement),type:"text",value:t.value?String(t.value):"",onCalciteInputInput:({currentTarget:e})=>this._saveInput(e)}):this._renderReadOnlyComponent(e)}_renderNumberComponent(e,t){const i=r(e.field);return S("calcite-input-number",{...t,integer:i,type:"number",value:i&&""!==t.value?Math.round(parseFloat(String(t.value))).toString():String(t.value),onCalciteInputNumberInput:({currentTarget:e})=>this._saveInput(e)})}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return S("calcite-input",{...i,class:this.classes(h.fieldInput,h.inputDisabled,h.individualElement),readOnly:!0,type:"text",value:String(t??i.value??"")})}_renderDateComponents(e,t){const{type:i}=e.field;switch(i){case"date":return this._renderDateFieldComponents(e,t);case"date-only":return this._renderDateOnlyFieldComponent(e,t);case"time-only":return this._renderTimeOnlyFieldComponent(e,t);case"timestamp-offset":return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,I(e.field,t.value,{timeZone:e.effectiveTimeZone,...y(e.template.field)}))}}_renderDateOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range;return S("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentUpdate,class:i,"data-date-part":"date","data-element-id":t[R],key:`${n}-date-input`,max:l(a)?a:void 0,min:l(s)?s:void 0,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===C?"":e.value?String(e.value):"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t;return S("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentUpdate,class:i,"data-date-part":"time","data-element-id":t[R],key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===C?"":e.value?String(e.value):"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range,r=F(a),l=F(s),d=F(e.value===C?"":e.value),p=e.includeTimeOffset,u={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentUpdate,overlayPositioning:"fixed",readOnly:o,[R]:t[R],onfocus:this._onComponentFocus};return S("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},S("calcite-input-date-picker",{...u,class:i,"data-date-part":"date",key:`${n}-date-input`,max:r?.date??void 0,min:l?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:d.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),S("calcite-input-time-picker",{...u,class:i,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},value:d.time??"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),p?S("calcite-input-time-zone",{...u,class:i,"data-date-part":"timeZone",key:`${n}-timezone-input`,onblur:()=>{this._focusedFieldInput=null},value:d.timeZoneOffset??"0",onCalciteInputTimeZoneChange:t=>this._saveValueFromDateComponent(e,t.target)}):null)}_renderDateFieldComponents(e,t){const{class:i,key:n,readOnly:o,min:a,max:s}=t,r=e.effectiveTimeZone,l=w(e.value===C?"":e.value,r),d=w(s,r),p=w(a,r),u=e.includeTime,c={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentUpdate,overlayPositioning:"fixed",readOnly:o,[R]:t[R],onfocus:this._onComponentFocus};return S("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},S("calcite-input-date-picker",{...c,class:i,"data-date-part":"date",key:`${n}-date-input`,max:d?.date??void 0,min:p?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:l.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),u?S("calcite-input-time-picker",{...c,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},step:1,value:l.time??"",onCalciteInputTimePickerChange:t=>{this._saveValueFromDateComponent(e,t.target)}}):null)}getCommonInputProps(e){const{_effectiveDisabled:t}=this,{template:i,valid:n,value:o,minLength:a,maxLength:s,required:r,fieldName:l,editable:d,userHasChangedValue:p,range:{max:u,min:c}}=e,m=!d||t;let v=i.hint??void 0,f=!1;return o===C&&(v=this.messages.differentValues,f=!0),{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":n?"false":"true",class:this.classes(h.fieldInput,m?h.inputDisabled:null),status:!p&&!this.viewModel.submitHasBeenAttempted||n?"idle":"invalid",maxLength:s&&s>-1?s:void 0,minLength:a&&a>-1?a:void 0,key:i.elementId,label:l,name:l,max:null!=u?u:void 0,min:null!=c?c:void 0,readOnly:m,onblur:this._onComponentBlur,required:r,placeholder:v,value:f?"":o??"",[R]:i.elementId,onfocus:this._onComponentFocus}}_onFormSubmit(e){e.preventDefault()}_getFieldInputFromHTMLElement(e){return this.viewModel.findFieldInput(e.getAttribute(R))}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),n=t||i;n&&this._afterComponentCreateOrUpdate(n)}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._touchedInputs.add(i.template.elementId),this._focusedFieldInput=i}_afterComponentCreateOrUpdate(e){const t=this._getFieldInputFromHTMLElement(e),i=this._focusedFieldInput;this._attemptFocusOnNextRender&&i===t&&(this._attemptFocusOnNextRender=!1,M(e))}_onComponentBlur(){this._focusedFieldInput=null}_parseValue(e,t){if(c(t.template,"switch")){if("calcite-dropdown"===e.localName&&t.domain)for(const i of t.domain.codedValues)if(i.name===e.selectedItems[0].textContent)return i.code;return e.checked?t.template.input.onValue:t.template.input.offValue}const i=e.value;return null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_saveInput(e){const t=this._getFieldInputFromHTMLElement(e),{elementId:n}=t.template;if(!t)return;const o=t?.value;if(c(t.template,"switch")&&"single"!==this.viewModel.mode){const e=i(this._batchSwitchInputInitialValues,t,(()=>t.value));this._batchSwitchInputInitialValues.set(t,null===e?o:e)}const a=this._parseValue(e,t);a!==o&&this.viewModel.setValue(n,a)}async _afterDateComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e);await e.componentOnReady(),this._setDateTimeTimeZoneMap(e),this._updateDateTimeOrTimeZoneShadowDom(e,t.value===C),this._afterComponentCreateOrUpdate(e)}async _afterDateComponentUpdate(e){const{value:t}=this._getFieldInputFromHTMLElement(e);await e.componentOnReady(),this._updateDateTimeOrTimeZoneShadowDom(e,t===C),this._afterComponentCreateOrUpdate(e)}_saveValueFromDateComponent(e,t){const{elementId:i}=e.template,n=e.field.type,o=this._dateComponentMap.get(`${i}`);if(!o)return;const a=e.effectiveTimeZone;let s=e.value===C?void 0:e.value,r=null;"date-only"===n?r=Array.isArray(t.value)?t.value[0]:t.value:"time-only"===n?(s=x(s),r=x(t.value)):r="timestamp-offset"===n?null!=t.value?k({dateComponent:o.date,timeComponent:o.time,oldValue:s,timeZoneComponent:o.timeZone,defaultTimeZone:a}):null:null!=t.value?D({oldValue:s,dateComponent:o.date,timeZone:a,timeComponent:o.time?.value===C?void 0:o.time}):null,s!==r&&(null!==r&&t.value?this.viewModel.setValue(`${i}`,r):this.viewModel.setValue(`${i}`,null))}};e([a()],L.prototype,"activeFeatureIndex",null),e([a()],L.prototype,"disabled",null),e([a()],L.prototype,"_effectiveDisabled",null),e([a()],L.prototype,"features",null),e([a()],L.prototype,"map",null),e([a()],L.prototype,"spatialReference",null),e([a()],L.prototype,"timeZone",null),e([a()],L.prototype,"headingLevel",void 0),e([a()],L.prototype,"icon",null),e([a(),T("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([a(),T("esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm")],L.prototype,"messages",void 0),e([a(),T("esri/widgets/FeatureForm/t9n/FeatureForm")],L.prototype,"featureFormMessages",void 0),e([a()],L.prototype,"readOnly",void 0),e([a(),V(["value-change","submit"])],L.prototype,"viewModel",void 0),e([a({type:v,nonNullable:!0})],L.prototype,"visibleElements",void 0),e([a()],L.prototype,"groupDisplay",void 0),L=e([s("esri.widgets.BatchAttributeForm")],L);const j=L;export{j as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import"../core/has.js";import{abortHandle as t}from"../core/handleUtils.js";import{getOrCreateMapValue as i}from"../core/MapUtils.js";import{watch as n,whenOnce as o}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{isIntegerField as r}from"../layers/support/fieldUtils.js";import{isString as l}from"../support/guards.js";import d from"./Widget.js";import{getHiddenFieldsValidationErrorMessage as p,getVisibleFieldInputValidationErrorMessage as u,isElementTemplateWithInputType as c}from"./BatchAttributeForm/batchAttributeFormUtils.js";import m from"./BatchAttributeForm/BatchAttributeFormViewModel.js";import{css as h}from"./BatchAttributeForm/css.js";import{VisibleElements as v}from"./BatchAttributeForm/VisibleElements.js";import{InputVisibilityCode as f,isGroupInput as b,isFieldInput as _,differentValuesString as C}from"./BatchAttributeForm/inputs/support/inputUtils.js";import{loadCalciteComponents as g}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as I,getIntlOptionsForField as y,prepareISOFieldValueForDateComponents as F,prepareUnixFieldValueForDateComponents as w,normalizeTimeOnlyString as x,getISOFieldValueFromDateComponents as k,getUnixFieldValueFromDateComponents as D}from"./support/dateUtils.js";import{globalCss as O}from"./support/globalCss.js";import{setFocus as M}from"./support/widgetUtils.js";import{messageBundle as T}from"./support/decorators/messageBundle.js";import{vmEvent as V}from"./support/decorators/vmEvent.js";import{tsx as S}from"./support/jsxFactory.js";import{isEmptyValue as E}from"./support/forms/formUtils.js";import{substitute as U}from"../intl/substitute.js";const R="data-element-id";let L=class extends d{constructor(e,t){super(e,t),this.headingLevel=2,this.messagesCommon=null,this.messages=null,this.featureFormMessages=null,this.readOnly=!1,this.viewModel=new m,this.visibleElements=new v,this.groupDisplay="all",this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._touchedInputs=new Set,this._focusedFieldInput=null,this._batchSwitchInputInitialValues=new Map,this._saveInput=this._saveInput.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentUpdate=this._afterDateComponentUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n((()=>this.features),(()=>{this._dateComponentMap.clear();const e=new AbortController;o((()=>!this.viewModel.updating),e.signal).then((()=>{this._attemptFocusOnNextRender=!0})),this.addHandles(t(e))})),n((()=>this.viewModel.activeForm),(()=>{this._batchSwitchInputInitialValues.clear()}))])}loadDependencies(){return g({input:()=>import("@esri/calcite-components/dist/components/calcite-input"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group")})}get activeFeatureIndex(){return this.viewModel.activeFeatureIndex}set activeFeatureIndex(e){this.viewModel.activeFeatureIndex=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get _effectiveDisabled(){return this.disabled||this.viewModel.updating}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get icon(){return"edit-attributes"}set icon(e){this._overrideIfSome("icon",e)}goToClosestError(){const e=this.viewModel.getFirstVisibleInvalidFieldInput();if(!e)return;const{groupInput:t}=e;t&&(t.open||(t.open=!0)),setTimeout((()=>{if(!this.domNode)return;const t=this.domNode.querySelector(`[data-element-id="${e.input.template.elementId}"]`);t&&M(t)}),10)}render(){const{status:e}=this.viewModel;return"failed"===e?this._renderErrorNotice(this.messages.formFailedToLoad):this.viewModel.expressionEvaluationFailed?this._renderErrorNotice(this.messages.expressionEvaluationFailed):this.viewModel.hasLayersWithContingentValues?this._renderErrorNotice(this.messages.unsupportedContingentValues):S("div",{class:this.classes(h.base,O.widget,O.panel)},"loaded"===e?this._renderForm():"loading"===e?S("calcite-loader",{key:"loader",label:this.messagesCommon?.loading}):null)}_setDateTimeTimeZoneMap(e){const{datePart:t,elementId:n}=e.dataset,o=this._getCalciteElementFromDateTimeTimeZonePicker(e,t);if(!o)return;const a=i(this._dateComponentMap,`${n}`,(()=>({placeholder:{date:"",time:"",timeZone:""}})));switch(a.placeholder[t]=o.placeholder??"",t){case"date":a.date=e;break;case"time":a.time=e;break;case"timeZone":a.timeZone=e,a.defaultComboboxItemElements=o.selectedItems}"timeZone"===t&&(a.defaultComboboxItemElements=o.selectedItems)}_getCalciteElementFromDateTimeTimeZonePicker(e,t){const i=e.shadowRoot;return i?"timeZone"===t?i.querySelector("calcite-combobox"):i.querySelector("calcite-input-text"):null}_updateDateTimeOrTimeZoneShadowDom(e,t){const{datePart:i,elementId:n}=e.dataset,o=this._dateComponentMap.get(`${n}`);if(!o)return;const a=this._getCalciteElementFromDateTimeTimeZonePicker(e,i);if(a)switch(i){case"date":case"time":a.placeholder=t?this.messages.differentValues:o.placeholder[i];break;case"timeZone":t?(a.value="",a.placeholder=this.messages.differentValues):(!a.selectedItems.length&&o.defaultComboboxItemElements?.length&&(a.selectedItems[0]=o.defaultComboboxItemElements[0]),a.placeholder=o.placeholder[i])}}_renderErrorNotice(e){return S("div",{class:this.classes(h.base,O.widget,O.panel)},S("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},S("div",{slot:"message"},e)))}_renderForm(){return S("form",{onsubmit:this._onFormSubmit},this._renderInvisibleFieldsError(),this._renderContent())}_renderInvisibleFieldsError(){const{viewModel:e}=this,{hasNonActiveInvalidFeatures:t,activeForm:i}=e;let n;if(!e.submitHasBeenAttempted)return null;if(i.invalidHiddenInputs.length>0)if(n=p(i,e.mode,this.messages),"batch"===this.viewModel.mode){const e=i.invalidHiddenInputs.filter((e=>e.effectiveVisibilityCode===f.HIDDEN_GROUP_VISIBILITY_EXPRESSION_ALL||e.visibilityCode===f.HIDDEN_VISIBILITY_EXPRESSION_ALL));e.length>0?n+=` (${e.map((e=>e.label)).join(", ")})`:n=null}else n+=` (${i.invalidHiddenInputs.map((e=>e.label)).join(", ")})`;else if(t)return null;return n?S("calcite-notice",{class:h.noticeError,icon:!0,kind:"danger",open:!0},S("div",{slot:"message"},n)):null}_renderContent(){if(!this.viewModel.hasVisibleInputs)return[S("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},S("div",{slot:"message"},this.messages.noVisibleFields[this.viewModel.noVisibleElementsReason]))];const{inputs:e}=this.viewModel.activeForm;return e.filter((e=>e.visible)).map((e=>this._renderInput(e)))}_renderInput(e){return b(e)?this._renderGroupInput(e):_(e)?this._renderLabeledField(e):void 0}_renderGroupInput(e){const{inputs:t,template:i,open:n}=e,o=t.filter((e=>e.visible)),a=i.label??"";return S("calcite-block",{class:this.classes(h.group,"sequential"===this.groupDisplay?h.groupSequential:null,this.disabled?h.inputDisabled:null),collapsible:!0,description:i.description??void 0,disabled:this._effectiveDisabled,expanded:n,heading:a,headingLevel:this.headingLevel,key:`{${i.elementId}-key}`,label:a,onCalciteBlockClose:()=>{e.open=!1},onCalciteBlockOpen:()=>{e.open=!0}},o.map((e=>this._renderInput(e))))}_renderLabeledField(e){const{label:t,elementId:i}=e.template,{required:n,dataType:o}=e,a=n?U(this.messages.requiredFieldLabel,{name:t}):t;return S("calcite-label",{"aria-label":a,class:h.label,key:`field--${i}`},S("div",{class:h.labelTextContent,key:"labelTextContainer"},t,n?S("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==o?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e))}_renderFieldInput(e){const t=this.getCommonInputProps(e),{dataType:i}=e;return"date"===i?this._renderDateComponents(e,t):"coded-value"===e.domain?.type?this._renderCodedInputs({input:e,props:t}):"number"===i?this._renderNumberComponent(e,t):this._renderStringComponent(e,t)}_renderAuxiliaryText(e){const{compositeError:t,description:i,submittable:n}=e,o=!n&&t&&(this.viewModel.submitHasBeenAttempted||this._touchedInputs.has(e.template.elementId))?u(e,t,this.messages):null;return o?S("calcite-input-message",{icon:!0,status:"invalid"},o):i?S("calcite-input-message",{class:h.description,icon:!1,status:"idle"},i):null}_renderCodedInputs({input:e,props:t}){const i=e.template.input?.type??null,n=e.codedValueOptions;switch(i){case"switch":return this._renderSwitchField({input:e,props:t});case"radio-buttons":return this._renderRadioButtonGroupComponent({input:e,options:n.flat(),props:t});default:return this._renderComboBoxComponent({options:n,props:t,input:e})}}_renderSwitchField({input:e,props:t}){if((this._batchSwitchInputInitialValues.get(e)===C||e.value===C)&&"batch"===this.viewModel.mode){const i={dropdown:{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,disabled:t.readOnly,open:!1,[R]:t[R]},trigger:{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral",slot:"trigger",label:t.label},group:{mode:"single"}};return this._renderDropdownComponent({buttonValue:e.value,dropdownProps:i,options:[{name:this.messages.differentValues,value:C,disabled:!0},...e.codedValueDomainOptions]})}return this._renderSwitchComponent({input:e,props:t})}_renderSwitchComponent({input:e,props:t}){return S("calcite-switch",{...t,checked:!!c(e.template,"switch")&&e.value===e.template.input.onValue,class:h.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldInput=null},onCalciteSwitchChange:({currentTarget:e})=>this._saveInput(e)})}_renderDropdownComponent({buttonValue:e,options:t,dropdownProps:i}){const{trigger:n,dropdown:o,group:a}=i;return S("calcite-dropdown",{...o,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,onCalciteDropdownSelect:({currentTarget:e})=>this._saveInput(e)},S("calcite-button",{...n},e===C?this.messages.differentValues:e),S("calcite-dropdown-group",{selectionMode:a.mode},t.map((t=>S("calcite-dropdown-item",{disabled:t.disabled,label:String(t.name),selected:e===t.value},t.name)))))}_renderComboBoxComponent({input:e,options:t,props:i}){const n="INSERT"===this.viewModel.editType,o=this._touchedInputs.has(e?.template?.elementId),a=n&&e.showNoValueOptionEnabled&&!o?()=>{}:i.onblur,s={...i,onblur:a};return S("calcite-combobox",{...s,selectionMode:"single",value:i.placeholder===this.messages.differentValues?C:String(i.value),onCalciteComboboxChange:({currentTarget:e})=>{e.value!==C&&this._saveInput(e)}},this.renderComboboxOptionsList({input:e,options:t,props:i}))}renderComboboxOptionsList({input:e,options:t,props:i}){const[n,o]=t.map((e=>e.map((({name:e,value:t})=>S("calcite-combobox-item",{key:`#${t}`,selected:i.value===t,textLabel:e,value:`${t}`}))))),a=[...n];o.length>0&&a.push(S("calcite-combobox-item-group",{key:"unsupported",label:this.featureFormMessages.subtypes.unsupportedDomainGroupTitle},o));const s=i.placeholder===this.messages.differentValues,r=!s&&E(i.value);return e.showNoValueOptionEnabled&&a.unshift(S("calcite-combobox-item",{key:"empty-option",selected:r,textLabel:e.showNoValueLabel||this.messages.empty,value:""})),s&&a.unshift(S("calcite-combobox-item",{key:C,selected:!0,textLabel:this.messages.differentValues,value:C})),a}_renderRadioButtonGroupComponent({input:e,options:t,props:i}){const n=t.map((({name:t,value:n})=>this._renderRadioButtons({label:t,value:n,selected:n===e.value,props:i})));if(e.showNoValueOptionEnabled){const t="",o=e.showNoValueLabel||this.messages.empty,a=E(e.value);n.unshift(this._renderRadioButtons({label:o,value:t,selected:a,props:i}))}return S("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:h.inputRadioGroup,disabled:i.readOnly,key:`${i.key}-radio-group`,layout:"vertical",name:i.name,required:i.required},n,i.placeholder===this.messages.differentValues?S("calcite-label",{class:h.placeholderRadio,key:i.label,layout:"inline"},S("calcite-radio-button",{checked:!0,class:h.inputRadio,disabled:!0,name:i.placeholder,value:i.placeholder}),i.placeholder):null)}_renderRadioButtons({value:e,selected:t,label:i,props:n}){return S("calcite-label",{class:h.inputRadioLabel,key:n.label,layout:"inline"},S("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:t,class:h.inputRadio,disabled:n.readOnly,name:n.label,onblur:()=>{this._focusedFieldInput=null},value:e,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveInput(e)}}),i)}_renderStringComponent(e,t){const{template:i}=e;return i.field.editable?i.input&&"text-area"===i.input.type?S("calcite-text-area",{...t,class:this.classes(h.individualElement),resize:"vertical",value:t.value?String(t.value):"",onCalciteTextAreaInput:({currentTarget:e})=>this._saveInput(e)}):S("calcite-input",{...t,class:this.classes(h.individualElement),type:"text",value:t.value?String(t.value):"",onCalciteInputInput:({currentTarget:e})=>this._saveInput(e)}):this._renderReadOnlyComponent(e)}_renderNumberComponent(e,t){const i=r(e.field);return S("calcite-input-number",{...t,integer:i,type:"number",value:i&&""!==t.value?Math.round(parseFloat(String(t.value))).toString():String(t.value),onCalciteInputNumberInput:({currentTarget:e})=>this._saveInput(e)})}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return S("calcite-input",{...i,class:this.classes(h.fieldInput,h.inputDisabled,h.individualElement),readOnly:!0,type:"text",value:String(t??i.value??"")})}_renderDateComponents(e,t){const{type:i}=e.field;switch(i){case"date":return this._renderDateFieldComponents(e,t);case"date-only":return this._renderDateOnlyFieldComponent(e,t);case"time-only":return this._renderTimeOnlyFieldComponent(e,t);case"timestamp-offset":return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,I(e.field,t.value,{timeZone:e.effectiveTimeZone,...y(e.template.field)}))}}_renderDateOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range;return S("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentUpdate,class:i,"data-date-part":"date","data-element-id":t[R],key:`${n}-date-input`,max:l(a)?a:void 0,min:l(s)?s:void 0,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===C?"":e.value?String(e.value):"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t;return S("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentUpdate,class:i,"data-date-part":"time","data-element-id":t[R],key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===C?"":e.value?String(e.value):"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range,r=F(a),l=F(s),d=F(e.value===C?"":e.value),p=e.includeTimeOffset,u={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentUpdate,overlayPositioning:"fixed",readOnly:o,[R]:t[R],onfocus:this._onComponentFocus};return S("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},S("calcite-input-date-picker",{...u,class:i,"data-date-part":"date",key:`${n}-date-input`,max:r?.date??void 0,min:l?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:d.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),S("calcite-input-time-picker",{...u,class:i,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},value:d.time??"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),p?S("calcite-input-time-zone",{...u,class:i,"data-date-part":"timeZone",key:`${n}-timezone-input`,onblur:()=>{this._focusedFieldInput=null},value:d.timeZoneOffset??"0",onCalciteInputTimeZoneChange:t=>this._saveValueFromDateComponent(e,t.target)}):null)}_renderDateFieldComponents(e,t){const{class:i,key:n,readOnly:o,min:a,max:s}=t,r=e.effectiveTimeZone,l=w(e.value===C?"":e.value,r),d=w(s,r),p=w(a,r),u=e.includeTime,c={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentUpdate,overlayPositioning:"fixed",readOnly:o,[R]:t[R],onfocus:this._onComponentFocus};return S("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},S("calcite-input-date-picker",{...c,class:i,"data-date-part":"date",key:`${n}-date-input`,max:d?.date??void 0,min:p?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:l.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),u?S("calcite-input-time-picker",{...c,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},step:1,value:l.time??"",onCalciteInputTimePickerChange:t=>{this._saveValueFromDateComponent(e,t.target)}}):null)}getCommonInputProps(e){const{_effectiveDisabled:t}=this,{template:i,valid:n,value:o,minLength:a,maxLength:s,required:r,fieldName:l,editable:d,userHasChangedValue:p,range:{max:u,min:c}}=e,m=!d||t;let v=i.hint??void 0,f=!1;return o===C&&(v=this.messages.differentValues,f=!0),{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":n?"false":"true",class:this.classes(h.fieldInput,m?h.inputDisabled:null),status:!p&&!this.viewModel.submitHasBeenAttempted||n?"idle":"invalid",maxLength:s&&s>-1?s:void 0,minLength:a&&a>-1?a:void 0,key:i.elementId,label:l,name:l,max:null!=u?u:void 0,min:null!=c?c:void 0,readOnly:m,onblur:this._onComponentBlur,required:r,placeholder:v,value:f?"":o??"",[R]:i.elementId,onfocus:this._onComponentFocus}}_onFormSubmit(e){e.preventDefault()}_getFieldInputFromHTMLElement(e){return this.viewModel.findFieldInput(e.getAttribute(R))}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),n=t||i;n&&this._afterComponentCreateOrUpdate(n)}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._touchedInputs.add(i.template.elementId),this._focusedFieldInput=i}_afterComponentCreateOrUpdate(e){const t=this._getFieldInputFromHTMLElement(e),i=this._focusedFieldInput;this._attemptFocusOnNextRender&&i===t&&(this._attemptFocusOnNextRender=!1,M(e))}_onComponentBlur(){this._focusedFieldInput=null}_parseValue(e,t){if(c(t.template,"switch")){if("calcite-dropdown"===e.localName&&t.domain)for(const i of t.domain.codedValues)if(i.name===e.selectedItems[0].textContent)return i.code;return e.checked?t.template.input.onValue:t.template.input.offValue}const i=e.value;return null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_saveInput(e){const t=this._getFieldInputFromHTMLElement(e),{elementId:n}=t.template;if(!t)return;const o=t?.value;if(c(t.template,"switch")&&"single"!==this.viewModel.mode){const e=i(this._batchSwitchInputInitialValues,t,(()=>t.value));this._batchSwitchInputInitialValues.set(t,null===e?o:e)}const a=this._parseValue(e,t);a!==o&&this.viewModel.setValue(n,a)}async _afterDateComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e);await e.componentOnReady(),this._setDateTimeTimeZoneMap(e),this._updateDateTimeOrTimeZoneShadowDom(e,t.value===C),this._afterComponentCreateOrUpdate(e)}async _afterDateComponentUpdate(e){const{value:t}=this._getFieldInputFromHTMLElement(e);await e.componentOnReady(),this._updateDateTimeOrTimeZoneShadowDom(e,t===C),this._afterComponentCreateOrUpdate(e)}_saveValueFromDateComponent(e,t){const{elementId:i}=e.template,n=e.field.type,o=this._dateComponentMap.get(`${i}`);if(!o)return;const a=e.effectiveTimeZone;let s=e.value===C?void 0:e.value,r=null;"date-only"===n?r=Array.isArray(t.value)?t.value[0]:t.value:"time-only"===n?(s=x(s),r=x(t.value)):r="timestamp-offset"===n?null!=t.value?k({dateComponent:o.date,timeComponent:o.time,oldValue:s,timeZoneComponent:o.timeZone,defaultTimeZone:a}):null:null!=t.value?D({oldValue:s,dateComponent:o.date,timeZone:a,timeComponent:o.time?.value===C?void 0:o.time}):null,s!==r&&(null!==r&&t.value?this.viewModel.setValue(`${i}`,r):this.viewModel.setValue(`${i}`,null))}};e([a()],L.prototype,"activeFeatureIndex",null),e([a()],L.prototype,"disabled",null),e([a()],L.prototype,"_effectiveDisabled",null),e([a()],L.prototype,"features",null),e([a()],L.prototype,"map",null),e([a()],L.prototype,"spatialReference",null),e([a()],L.prototype,"timeZone",null),e([a()],L.prototype,"headingLevel",void 0),e([a()],L.prototype,"icon",null),e([a(),T("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([a(),T("esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm")],L.prototype,"messages",void 0),e([a(),T("esri/widgets/FeatureForm/t9n/FeatureForm")],L.prototype,"featureFormMessages",void 0),e([a()],L.prototype,"readOnly",void 0),e([a(),V(["value-change","submit"])],L.prototype,"viewModel",void 0),e([a({type:v,nonNullable:!0})],L.prototype,"visibleElements",void 0),e([a()],L.prototype,"groupDisplay",void 0),L=e([s("esri.widgets.BatchAttributeForm")],L);const j=L;export{j as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import{makeHandle as i}from"../../core/handleUtils.js";import n from"../../core/Logger.js";import{removeMaybe as s}from"../../core/maybe.js";import{when as a,watch as l,on as r,initial as o,syncAndInitial as h}from"../../core/reactiveUtils.js";import{schedule as g}from"../../core/scheduling.js";import{truncateLocalTime as d,isValidDate as p,resetUTCDate as u,offsetDate as c}from"../../core/timeUtils.js";import{property as y}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as _}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../views/3d/environment/SunLighting.js";import f from"../../views/3d/environment/VirtualLighting.js";import{positionToTimezoneInfo as w}from"../../views/3d/support/earthUtils.js";import{dateTimeToSliderPos as D,sliderPosToDateTime as S,getSeasonFromDate as T,getNorthernHemisphereSeason as U,getSeasonDate as v,Hemisphere as L,calculatePlaySpeed as P}from"./support/daylightUtils.js";import{SliderWithDropdownViewModel as b}from"./support/SliderWithDropdownViewModel.js";import{formatSliderLabel as O,getSunriseAndSunsetTimes as C}from"../support/timeWidgetUtils.js";let E=class extends e{constructor(t){super(t),this.view=null,this.timeSliderViewModel=new b({min:0,max:1439,values:[0],labelFormatFunction:O,inputFormatFunction:O}),this.lightingUpdateInterval=200,this._oldLighting=null,this.playSpeedMultiplier=1,this._lastTime=null,this._sunrise=null,this._sunset=null,this._cachedLightingDateUTC=new Date(0),this._cachedDisplayUTCOffset=0,this._firstInteraction=!0,this._lastLightingUpdate=0,this._lightingUpdateHandle=null}initialize(){this.addHandles([a((()=>this.view),(t=>t.when((()=>this._updateLighting()))),o),l((()=>{const t=this._lighting;return"sun"===t?.type?this._ensureValidDate(t):null}),(t=>this._scheduleLightingUpdate(t))),r((()=>this._lighting),"timezone-will-change",(t=>this._timezoneWillChange(t)),{onListenerAdd:()=>this._timezoneWillChange(null)}),l((()=>!0===this.view?.stationary),(()=>{(this.dayPlaying||this.yearPlaying)&&this._updateSunriseAndSunset()}),o),l((()=>{const t=this.timeSliderViewModel;return{vm:t,state:t.state,sliderPosition:this.timeSliderPosition}}),(({vm:t,state:e,sliderPosition:i})=>{"ready"===e&&t.setValue(0,i)})),l((()=>this.timeSliderViewModel?.utcOffset),(t=>{null!=t&&(this.utcOffset=t)})),l((()=>({utcOffset:this.utcOffset,sliderViewModel:this.timeSliderViewModel})),(({utcOffset:t,sliderViewModel:e})=>{e&&(e.utcOffset=t)}),h),l((()=>this.timeSliderViewModel.timezonePickerOpen),(()=>this.stopPlaying())),l((()=>this.timeSliderViewModel.values),(t=>this._setTimeSliderPosition(t?.[0]??0,{forceLightingUpdate:!1})))])}destroy(){this._cancelLightingUpdate(),this.view=null}get isSupported(){return null==this.view||"3d"===this.view.type}get utcOffset(){return this._cachedDisplayUTCOffset}set utcOffset(t){t!==this.utcOffset&&null!=this._lighting&&"virtual"!==this._lighting.type&&(this._lighting.displayUTCOffset=t,this._updateLighting())}get localDate(){return d(this._lightingDateDisplay)}set localDate(t){this.view?.ready?p(t)&&t.getTime()!==this.localDate.getTime()&&(this._lightingDateDisplay=u(this._lightingDateDisplay,t)):n.getLogger(this).error("The localDate property cannot be set before the view and the widget are ready.")}get timeSliderPosition(){return D(this._lightingDateDisplay)}set timeSliderPosition(t){this.view?.ready&&"ready"===this.timeSliderViewModel?.state?this._setTimeSliderPosition(t,{forceLightingUpdate:!0}):n.getLogger(this).error("The timeSliderPosition property cannot be set before the view and the widget are ready.")}_setTimeSliderPosition(t,e){Math.abs(t-this.timeSliderPosition)<=1/60||(this.stopPlaying(),this._enableDirectShadowsIfFirstInteraction(),e.forceLightingUpdate&&(this._cancelLightingUpdate(),this._updateLighting()),this._lightingDateDisplay=S(this._lightingDateDisplay,t))}_timezoneFromCamera(t,e){if(null==e||!t.cameraTrackingEnabled)return 0;const i=w([e.longitude,e.latitude]);return null==i?0:Math.round(i.hours+i.minutes/60+i.seconds/3600)}get directShadowsEnabled(){return this._lighting?.directShadowsEnabled??!1}set directShadowsEnabled(t){const e=this._lighting;e&&(e.directShadowsEnabled=t)}get sunLightingEnabled(){return"sun"===this._lightingType}set sunLightingEnabled(t){const e=this._environment;if(t===this._get("sunLightingEnabled")||null==e)return;const i=e.lighting,n=this._oldLighting;this._oldLighting=i;const s={directShadowsEnabled:i.directShadowsEnabled,cameraTrackingEnabled:i.cameraTrackingEnabled},a=t?"sun":"virtual";let l;l=null!=n&&n.type===a?n:t?new m:new f,l.set(s),e.lighting=l,t||(this.stopPlaying(),this.timeSliderViewModel.timezonePickerOpen=!1)}set playingState(t){this.playingState!==t&&(this._set("playingState",t),"none"!==t&&this.sunLightingEnabled&&(this._updateSunriseAndSunset(),this._lastTime=Date.now(),this._play(),this._enableDirectShadowsIfFirstInteraction()))}get dayPlaying(){return"day"===this.playingState}set dayPlaying(t){t?this.playingState="day":this.dayPlaying&&(this.playingState="none")}get yearPlaying(){return"year"===this.playingState}set yearPlaying(t){t?this.playingState="year":this.yearPlaying&&(this.playingState="none")}get currentSeason(){return T(this.localDate,this._currentHemisphere)}set currentSeason(t){this.stopPlaying();const e=U(t,this._currentHemisphere);this.localDate=v(this.localDate,e,L.NORTHERN)}get _currentHemisphere(){const t=this.view?.camera?.position?.latitude;return null==t||t>=0?L.NORTHERN:L.SOUTHERN}get _environment(){return this.view?.environment}get _lighting(){return this._environment?.lighting}get _lightingType(){return this._lighting?.type}get _lightingDateDisplay(){return c(this._cachedLightingDateUTC,this._cachedDisplayUTCOffset,"hours")}set _lightingDateDisplay(t){const e=this._lighting;if(null==e||!this.sunLightingEnabled||"virtual"===e.type||!p(t))return;const i=this._ensureValidDate(e),n=c(t,-this._cachedDisplayUTCOffset,"hours");n.getTime()!==i.getTime()&&(e.date=n,this._updateLighting())}stopPlaying(){this.playingState="none"}toggleDayPlaying(){this.dayPlaying=!this.dayPlaying}toggleYearPlaying(){this.yearPlaying=!this.yearPlaying}toggleSunLightingEnabled(){this.stopPlaying(),this.sunLightingEnabled=!this.sunLightingEnabled}toggleDirectShadowsEnabled(){this.stopPlaying(),this.directShadowsEnabled=!this.directShadowsEnabled}onDateChange(t){this.dayPlaying=!1,this.localDate=t}_enableDirectShadowsIfFirstInteraction(){this._firstInteraction&&(this._firstInteraction=!1,this.directShadowsEnabled=!0)}_updateLighting(t){const e=Date.now();this._lastLightingUpdate=e;const{view:i}=this,n=this._lighting;if(null==i||null==n||"virtual"===n.type)return;t??=this._ensureValidDate(n);const s=n.displayUTCOffset,a=null!=s?s:this._timezoneFromCamera(n,i.camera?.position);this._cachedLightingDateUTC.getTime()!==t.getTime()&&(this._cachedLightingDateUTC=new Date(t.getTime())),this._cachedDisplayUTCOffset!==a&&(this._cachedDisplayUTCOffset=a)}_timezoneWillChange(t){const e=this._lighting;if(null==e||"virtual"===e.type||!e.cameraTrackingEnabled)return;let i;if(t)i=t.timezoneOffset;else{if(null!=e.displayUTCOffset)return;i=m.calculateTimezoneOffset(e.positionTimezoneInfo)}e.displayUTCOffset=i,this._scheduleLightingUpdate()}_scheduleLightingUpdate(t){if(t&&(this._lightingUpdateHandle=s(this._lightingUpdateHandle),!p(t)))return;if(this._lightingUpdateHandle)return;const e=Date.now()-this._lastLightingUpdate,n=this.lightingUpdateInterval-e;let a=null;const l=()=>{this._updateLighting(t),this._lightingUpdateHandle===a&&(this._lightingUpdateHandle=null)};if(n<=0)this._lightingUpdateHandle=a=g(l);else{const t=setTimeout(l,n);this._lightingUpdateHandle=a=i((()=>clearTimeout(t)))}}_cancelLightingUpdate(){this._lightingUpdateHandle=s(this._lightingUpdateHandle)}_play(){const t=this._lighting;if(null==t||!this.sunLightingEnabled||"virtual"===t.type)return;const e=this._ensureValidDate(t);if(this.dayPlaying||this.yearPlaying){const i=Date.now()-(this._lastTime??0);if(this.dayPlaying){this._lastTime=Date.now();const n=P(this._sunrise,this._sunset,e)*this.playSpeedMultiplier/100*i;if(n>0){let i=new Date(e.getTime()+n);const s=t.displayUTCOffset??0;if(((i.getUTCHours()+s)%24+24)%24<((e.getUTCHours()+s)%24+24)%24){const t=864e5;i=new Date(e.getTime()+n-t)}t.date=i}}else{if(i>1e3){this._lastTime=Date.now();const i=(e.getUTCMonth()+1)%12,n=new Date(e.getTime());n.setUTCMonth(i),t.date=n}}requestAnimationFrame((()=>this._play()))}}_updateSunriseAndSunset(){const t=this._lighting;if(null==t||"virtual"===t.type||!this.sunLightingEnabled)return;const e=this.view?.camera?.position;if(null==e)return;const{latitude:i,longitude:n}=e,{date:s,displayUTCOffset:a}=t,l=C(s,i,n,a??0);l&&(this._sunrise=new Date(l.sunrise),this._sunset=new Date(l.sunset))}_ensureValidDate(t){return p(t.date)||(n.getLogger(this).warn("Invalid date. Reverting to the current date/time."),t.date=new Date),t.date}};t([y()],E.prototype,"view",void 0),t([y({type:b,nonNullable:!0})],E.prototype,"timeSliderViewModel",void 0),t([y()],E.prototype,"isSupported",null),t([y()],E.prototype,"lightingUpdateInterval",void 0),t([y()],E.prototype,"utcOffset",null),t([y({type:Date})],E.prototype,"localDate",null),t([y()],E.prototype,"timeSliderPosition",null),t([y()],E.prototype,"directShadowsEnabled",null),t([y()],E.prototype,"sunLightingEnabled",null),t([y({type:["none","day","year"],value:"none"})],E.prototype,"playingState",null),t([y()],E.prototype,"dayPlaying",null),t([y()],E.prototype,"yearPlaying",null),t([y()],E.prototype,"playSpeedMultiplier",void 0),t([y()],E.prototype,"currentSeason",null),t([y()],E.prototype,"_lastTime",void 0),t([y()],E.prototype,"_sunrise",void 0),t([y()],E.prototype,"_sunset",void 0),t([y()],E.prototype,"_cachedLightingDateUTC",void 0),t([y()],E.prototype,"_cachedDisplayUTCOffset",void 0),t([y()],E.prototype,"_firstInteraction",void 0),t([y()],E.prototype,"_currentHemisphere",null),t([y()],E.prototype,"_environment",null),t([y()],E.prototype,"_lighting",null),t([y()],E.prototype,"_lightingType",null),t([y()],E.prototype,"_lightingDateDisplay",null),E=t([_("esri.widgets.Daylight.DaylightViewModel")],E);const H=E;export{H as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Evented.js";import{makeHandle as i}from"../../core/handleUtils.js";import n from"../../core/Logger.js";import{removeMaybe as s}from"../../core/maybe.js";import{when as a,watch as l,on as r,initial as o,syncAndInitial as h}from"../../core/reactiveUtils.js";import{schedule as g}from"../../core/scheduling.js";import{truncateLocalTime as d,isValidDate as p,resetUTCDate as u,offsetDate as c}from"../../core/timeUtils.js";import{property as y}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import _ from"../../views/3d/environment/SunLighting.js";import f from"../../views/3d/environment/VirtualLighting.js";import{positionToTimezoneInfo as D}from"../../views/3d/support/earthUtils.js";import{dateTimeToSliderPos as w,sliderPosToDateTime as T,getSeasonFromDate as S,getNorthernHemisphereSeason as U,getSeasonDate as v,Hemisphere as L,calculatePlaySpeed as P}from"./support/daylightUtils.js";import{SliderWithDropdownViewModel as b}from"./support/SliderWithDropdownViewModel.js";import{formatSliderLabel as C,getSunriseAndSunsetTimes as E}from"../support/timeWidgetUtils.js";let O=class extends e.EventedAccessor{constructor(t){super(t),this.view=null,this.timeSliderViewModel=new b({min:0,max:1439,values:[0],labelFormatFunction:C,inputFormatFunction:C}),this.lightingUpdateInterval=200,this._oldLighting=null,this.playSpeedMultiplier=1,this._lastTime=null,this._sunrise=null,this._sunset=null,this._cachedLightingDateUTC=new Date(0),this._cachedDisplayUTCOffset=0,this._lastLightingUpdate=0,this._lightingUpdateHandle=null}initialize(){this.addHandles([a((()=>this.view),(t=>t.when((()=>this._updateLighting()))),o),l((()=>{const t=this._lighting;return"sun"===t?.type?this._ensureValidDate(t):null}),(t=>this._scheduleLightingUpdate(t))),r((()=>this._lighting),"timezone-will-change",(t=>this._timezoneWillChange(t)),{onListenerAdd:()=>this._timezoneWillChange(null)}),l((()=>!0===this.view?.stationary),(()=>{(this.dayPlaying||this.yearPlaying)&&this._updateSunriseAndSunset()}),o),l((()=>{const t=this.timeSliderViewModel;return{vm:t,state:t.state,sliderPosition:this.timeSliderPosition}}),(({vm:t,state:e,sliderPosition:i})=>{"ready"===e&&t.setValue(0,i)})),l((()=>this.timeSliderViewModel?.utcOffset),(t=>{null!=t&&(this.utcOffset=t)})),l((()=>({utcOffset:this.utcOffset,sliderViewModel:this.timeSliderViewModel})),(({utcOffset:t,sliderViewModel:e})=>{e&&(e.utcOffset=t)}),h),l((()=>this.timeSliderViewModel.timezonePickerOpen),(()=>this.stopPlaying())),l((()=>this.timeSliderViewModel.values),(t=>this._setTimeSliderPosition(t?.[0]??0,{forceLightingUpdate:!1})))])}destroy(){this._cancelLightingUpdate(),this.view=null}get isSupported(){return null==this.view||"3d"===this.view.type}get utcOffset(){return this._cachedDisplayUTCOffset}set utcOffset(t){t!==this.utcOffset&&null!=this._lighting&&"virtual"!==this._lighting.type&&(this._lighting.displayUTCOffset=t,this._updateLighting())}get localDate(){return d(this._lightingDateDisplay)}set localDate(t){this.view?.ready?p(t)&&t.getTime()!==this.localDate.getTime()&&(this._lightingDateDisplay=u(this._lightingDateDisplay,t)):n.getLogger(this).error("The localDate property cannot be set before the view and the widget are ready.")}get timeSliderPosition(){return w(this._lightingDateDisplay)}set timeSliderPosition(t){this.view?.ready&&"ready"===this.timeSliderViewModel?.state?this._setTimeSliderPosition(t,{forceLightingUpdate:!0}):n.getLogger(this).error("The timeSliderPosition property cannot be set before the view and the widget are ready.")}_setTimeSliderPosition(t,e){Math.abs(t-this.timeSliderPosition)<=1/60||(this.stopPlaying(),this._onUserDateTimeChange(),e.forceLightingUpdate&&(this._cancelLightingUpdate(),this._updateLighting()),this._lightingDateDisplay=T(this._lightingDateDisplay,t))}_timezoneFromCamera(t,e){if(null==e||!t.cameraTrackingEnabled)return 0;const i=D([e.longitude,e.latitude]);return null==i?0:Math.round(i.hours+i.minutes/60+i.seconds/3600)}get directShadowsEnabled(){return this._lighting?.directShadowsEnabled??!1}set directShadowsEnabled(t){const e=this._lighting;e&&(e.directShadowsEnabled=t)}get sunLightingEnabled(){return"sun"===this._lightingType}set sunLightingEnabled(t){const e=this._environment;if(t===this._get("sunLightingEnabled")||null==e)return;const i=e.lighting,n=this._oldLighting;this._oldLighting=i;const s={directShadowsEnabled:i.directShadowsEnabled,cameraTrackingEnabled:i.cameraTrackingEnabled},a=t?"sun":"virtual";let l;l=null!=n&&n.type===a?n:t?new _:new f,l.set(s),e.lighting=l,t||(this.stopPlaying(),this.timeSliderViewModel.timezonePickerOpen=!1)}set playingState(t){this.playingState!==t&&(this._set("playingState",t),"none"!==t&&this.sunLightingEnabled&&(this._updateSunriseAndSunset(),this._lastTime=Date.now(),this._play(),this._onUserDateTimeChange()))}get dayPlaying(){return"day"===this.playingState}set dayPlaying(t){t?this.playingState="day":this.dayPlaying&&(this.playingState="none")}get yearPlaying(){return"year"===this.playingState}set yearPlaying(t){t?this.playingState="year":this.yearPlaying&&(this.playingState="none")}get currentSeason(){return S(this.localDate,this._currentHemisphere)}set currentSeason(t){this.stopPlaying(),this._onUserDateTimeChange();const e=U(t,this._currentHemisphere);this.localDate=v(this.localDate,e,L.NORTHERN)}get _currentHemisphere(){const t=this.view?.camera?.position?.latitude;return null==t||t>=0?L.NORTHERN:L.SOUTHERN}get _environment(){return this.view?.environment}get _lighting(){return this._environment?.lighting}get _lightingType(){return this._lighting?.type}get _lightingDateDisplay(){return c(this._cachedLightingDateUTC,this._cachedDisplayUTCOffset,"hours")}set _lightingDateDisplay(t){const e=this._lighting;if(null==e||!this.sunLightingEnabled||"virtual"===e.type||!p(t))return;const i=this._ensureValidDate(e),n=c(t,-this._cachedDisplayUTCOffset,"hours");n.getTime()!==i.getTime()&&(e.date=n,this._updateLighting())}stopPlaying(){this.playingState="none"}toggleDayPlaying(){this.dayPlaying=!this.dayPlaying}toggleYearPlaying(){this.yearPlaying=!this.yearPlaying}toggleSunLightingEnabled(){this.stopPlaying(),this.sunLightingEnabled=!this.sunLightingEnabled}toggleDirectShadowsEnabled(){this.stopPlaying(),this.directShadowsEnabled=!this.directShadowsEnabled}onDateChange(t){this.dayPlaying=!1,this.localDate=t,this._onUserDateTimeChange()}_updateLighting(t){const e=Date.now();this._lastLightingUpdate=e;const{view:i}=this,n=this._lighting;if(null==i||null==n||"virtual"===n.type)return;t??=this._ensureValidDate(n);const s=n.displayUTCOffset,a=null!=s?s:this._timezoneFromCamera(n,i.camera?.position);this._cachedLightingDateUTC.getTime()!==t.getTime()&&(this._cachedLightingDateUTC=new Date(t.getTime())),this._cachedDisplayUTCOffset!==a&&(this._cachedDisplayUTCOffset=a)}_timezoneWillChange(t){const e=this._lighting;if(null==e||"virtual"===e.type||!e.cameraTrackingEnabled)return;let i;if(t)i=t.timezoneOffset;else{if(null!=e.displayUTCOffset)return;i=_.calculateTimezoneOffset(e.positionTimezoneInfo)}e.displayUTCOffset=i,this._scheduleLightingUpdate()}_scheduleLightingUpdate(t){if(t&&(this._lightingUpdateHandle=s(this._lightingUpdateHandle),!p(t)))return;if(this._lightingUpdateHandle)return;const e=Date.now()-this._lastLightingUpdate,n=this.lightingUpdateInterval-e;let a=null;const l=()=>{this._updateLighting(t),this._lightingUpdateHandle===a&&(this._lightingUpdateHandle=null)};if(n<=0)this._lightingUpdateHandle=a=g(l);else{const t=setTimeout(l,n);this._lightingUpdateHandle=a=i((()=>clearTimeout(t)))}}_cancelLightingUpdate(){this._lightingUpdateHandle=s(this._lightingUpdateHandle)}_play(){const t=this._lighting;if(null==t||!this.sunLightingEnabled||"virtual"===t.type)return;const e=this._ensureValidDate(t);if(this.dayPlaying||this.yearPlaying){const i=Date.now()-(this._lastTime??0);if(this.dayPlaying){this._lastTime=Date.now();const n=P(this._sunrise,this._sunset,e)*this.playSpeedMultiplier/100*i;if(n>0){let i=new Date(e.getTime()+n);const s=t.displayUTCOffset??0;if(((i.getUTCHours()+s)%24+24)%24<((e.getUTCHours()+s)%24+24)%24){const t=864e5;i=new Date(e.getTime()+n-t)}t.date=i}}else{if(i>1e3){this._lastTime=Date.now();const i=(e.getUTCMonth()+1)%12,n=new Date(e.getTime());n.setUTCMonth(i),t.date=n}}requestAnimationFrame((()=>this._play()))}}_updateSunriseAndSunset(){const t=this._lighting;if(null==t||"virtual"===t.type||!this.sunLightingEnabled)return;const e=this.view?.camera?.position;if(null==e)return;const{latitude:i,longitude:n}=e,{date:s,displayUTCOffset:a}=t,l=E(s,i,n,a??0);l&&(this._sunrise=new Date(l.sunrise),this._sunset=new Date(l.sunset))}_ensureValidDate(t){return p(t.date)||(n.getLogger(this).warn("Invalid date. Reverting to the current date/time."),t.date=new Date),t.date}_onUserDateTimeChange(){this.emit("user-date-time-change",{})}};t([y()],O.prototype,"view",void 0),t([y({type:b,nonNullable:!0})],O.prototype,"timeSliderViewModel",void 0),t([y()],O.prototype,"isSupported",null),t([y()],O.prototype,"lightingUpdateInterval",void 0),t([y()],O.prototype,"utcOffset",null),t([y({type:Date})],O.prototype,"localDate",null),t([y()],O.prototype,"timeSliderPosition",null),t([y()],O.prototype,"directShadowsEnabled",null),t([y()],O.prototype,"sunLightingEnabled",null),t([y({type:["none","day","year"],value:"none"})],O.prototype,"playingState",null),t([y()],O.prototype,"dayPlaying",null),t([y()],O.prototype,"yearPlaying",null),t([y()],O.prototype,"playSpeedMultiplier",void 0),t([y()],O.prototype,"currentSeason",null),t([y()],O.prototype,"_lastTime",void 0),t([y()],O.prototype,"_sunrise",void 0),t([y()],O.prototype,"_sunset",void 0),t([y()],O.prototype,"_cachedLightingDateUTC",void 0),t([y()],O.prototype,"_cachedDisplayUTCOffset",void 0),t([y()],O.prototype,"_currentHemisphere",null),t([y()],O.prototype,"_environment",null),t([y()],O.prototype,"_lighting",null),t([y()],O.prototype,"_lightingType",null),t([y()],O.prototype,"_lightingDateDisplay",null),O=t([m("esri.widgets.Daylight.DaylightViewModel")],O);const H=O;export{H 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.33/esri/copyright.txt for details.
4
4
  */
5
- const e="esri-daylight",a=`${e}__container`,n="esri-slider",o={base:e,dayContainer:`${a} ${e}__day-container`,dateContainer:`${a} ${e}__date-container`,containerDisabled:`${a}--disabled`,slider:n,sliderShadowOff:`${n}--shadow-off`,sliderShadowOn:`${n}--shadow-on`,sliderAmPmOn:`${n}--ampm-on`,sliderDateOff:`${n}--date-off`,sliderDateOn:`${n}--date-on`,playPauseButton:`${e}__play-pause-button`,datePicker:`${e}__date-picker`,seasonPicker:`${e}__season-picker`,panelError:`${e}__panel--error`,sunLightingCheckbox:`${e}__sun-lighting-checkbox`,shadowsCheckbox:`${e}__shadows-checkbox`};export{o as css};
5
+ const e="esri-daylight",a=`${e}__container`,n="esri-slider",i={base:e,dayContainer:`${a} ${e}__day-container`,dateContainer:`${a} ${e}__date-container`,containerDisabled:`${a}--disabled`,slider:n,sliderAmPmOn:`${n}--ampm-on`,sliderDateOff:`${n}--date-off`,sliderDateOn:`${n}--date-on`,playPauseButton:`${e}__play-pause-button`,datePicker:`${e}__date-picker`,seasonPicker:`${e}__season-picker`,panelError:`${e}__panel--error`,sunLightingCheckbox:`${e}__sun-lighting-checkbox`,shadowsCheckbox:`${e}__shadows-checkbox`};export{i as css};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Logger.js";import{watch as i,syncAndInitial as s}from"../core/reactiveUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{onLocaleChange as a}from"../intl/locale.js";import n from"./Widget.js";import{css as r}from"./Daylight/css.js";import d from"./Daylight/DaylightViewModel.js";import c from"./Daylight/VisibleElements.js";import{orderedSeasons as p}from"./Daylight/support/daylightUtils.js";import h from"./Daylight/support/SliderWithDropdown.js";import{css as g}from"./Slider/css.js";import{loadCalciteComponents as m}from"./support/componentsUtils.js";import{globalCss as u}from"./support/globalCss.js";import{Heading as y}from"./support/Heading.js";import{onPrimaryTickCreated as b,onSecondaryTickCreated as S,adjustTimeSliderForLocale as v,useAmPm as w}from"./support/timeWidgetUtils.js";import"./support/widgetUtils.js";import{messageBundle as k}from"./support/decorators/messageBundle.js";import{tsx as _,tsxFragment as C}from"./support/jsxFactory.js";const D="date";let M=class extends n{constructor(e,t){super(e,t),this.headingLevel=3,this.viewModel=new d,this.visibleElements=new c,this.dateOrSeason=D,this._timeSlider=new h({viewModel:this.viewModel.timeSliderViewModel,steps:this.timeSliderSteps,labelInputsEnabled:!1,visibleElements:{labels:!0},tickConfigs:[{mode:"position",values:[0,360,720,1080,1439],labelsVisible:!0,tickCreatedFunction:(e,t,i)=>b({tickElement:t,labelElement:i,tickClasses:f,onClick:this._makeGoToTime(e)})},{mode:"position",values:[120,240,480,600,840,960,1200,1320],tickCreatedFunction:(e,t)=>S({tickElement:t,tickClasses:f,onClick:this._makeGoToTime(e)})}]}),this._onPlayDayClick=()=>{this.viewModel.toggleDayPlaying()},this._onDateChange=e=>{const t=e.currentTarget.valueAsDate;this.viewModel.onDateChange(Array.isArray(t)?t[0]:t)},this._onYearPlayClick=()=>{this.viewModel.toggleYearPlaying()},this._onSeasonChange=e=>{this.viewModel.currentSeason=e.currentTarget.value},this._onSunLightingCheckboxChange=()=>{this.viewModel.toggleSunLightingEnabled()},this._onShadowCheckboxChange=()=>{this.viewModel.toggleDirectShadowsEnabled()}}get icon(){return"brightness"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.title??""}set label(e){this._overrideIfSome("label",e)}get playSpeedMultiplier(){return this.viewModel.playSpeedMultiplier}set playSpeedMultiplier(e){this.viewModel.playSpeedMultiplier=e}get timeSliderSteps(){return this._timeSlider?.steps??5}set timeSliderSteps(e){this._timeSlider.steps=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}postInitialize(){this.viewModel.isSupported&&(this.addHandles([i((()=>this.viewModel.timeSliderViewModel),(e=>this._timeSlider.viewModel=e),s),i((()=>this.visibleElements?.timezone),(e=>this._timeSlider.showDropDown=e),s),i((()=>!this.viewModel.sunLightingEnabled),(e=>{this._timeSlider.disabled=e}),s),a((()=>this._adjustTimeSliderPadding()))]),this._adjustTimeSliderPadding())}destroy(){this._timeSlider.destroy()}render(){const{messages:e,viewModel:t,visibleElements:i}=this,s=t.isSupported;return _("div",{class:this.classes(r.base,u.widget)},s?_(C,null,i.header?_(y,{level:this.headingLevel},e.title):null,this._renderTimeOptions(),i.datePicker?this._renderDateOrSeason():null,i.sunLightingToggle?this._renderSunLightingToggle():null,i.shadowsToggle?this._renderShadowsToggle():null):_("div",{class:r.panelError,key:"unsupported"},_("p",null,e.unsupported)))}loadDependencies(){return m({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select")})}_adjustTimeSliderPadding(){v(this.domNode?.querySelector(`.${g.base}`))}_renderTimeOptions(){const{viewModel:e,visibleElements:t,messages:i}=this,{directShadowsEnabled:s,dayPlaying:o}=e,l=!e.sunLightingEnabled;return _("div",{class:this.classes(r.dayContainer,{[r.sliderShadowOn]:s,[r.sliderShadowOff]:!s,[r.sliderDateOn]:t.datePicker,[r.sliderDateOff]:!t.datePicker,[r.sliderAmPmOn]:w(),[r.containerDisabled]:l}),key:"daylight-time-options"},this._timeSlider.render(),t.playButtons?this._renderPlayPauseButton({playing:o,disabled:l,label:i.playDay,onClick:this._onPlayDayClick}):null)}_renderDateOptions(){const{viewModel:e,visibleElements:t,messages:i}=this,{yearPlaying:s}=e,o=!e.sunLightingEnabled;return _("div",{class:this.classes(r.dateContainer,o&&r.containerDisabled),key:r.dateContainer},_("calcite-input-date-picker",{class:r.datePicker,"data-testid":"daylight-date-picker",disabled:o,key:r.datePicker,overlayPositioning:"fixed",placement:"bottom",valueAsDate:e.localDate,onCalciteInputDatePickerChange:this._onDateChange}),t.playButtons?this._renderPlayPauseButton({playing:s,disabled:o,label:i.playYear,onClick:this._onYearPlayClick}):null)}_renderPlayPauseButton({playing:e,disabled:t,label:i,onClick:s}){return _("calcite-button",{appearance:"solid",class:r.playPauseButton,disabled:t,iconStart:e?"pause-f":"play-f",label:i,onclick:s,round:!0,title:i,type:"button"})}_renderSeasonSelect(){const{messages:e,viewModel:t}=this,i=!t.sunLightingEnabled;return _("calcite-select",{class:this.classes(r.seasonPicker),disabled:i,label:e.season,onCalciteSelectChange:this._onSeasonChange},p.map((i=>_("calcite-option",{selected:t.currentSeason===i,value:i},e[i]))))}_renderDateOrSeason(){return"date"===this.dateOrSeason?this._renderDateOptions():this._renderSeasonSelect()}_renderSunLightingToggle(){const e=this.messages?.sunLightingToggle;return _("calcite-label",{key:"date-time-toggle",layout:"inline",scale:"s",title:e?.tooltip},_("calcite-checkbox",{checked:this.viewModel.sunLightingEnabled,class:r.sunLightingCheckbox,onCalciteCheckboxChange:this._onSunLightingCheckboxChange}),e?.label)}_renderShadowsToggle(){const e=this.messages.shadowsToggle;return _("calcite-label",{key:"shadow-toggle",layout:"inline",scale:"s",title:e?.tooltip},_("calcite-checkbox",{checked:this.viewModel.directShadowsEnabled,class:r.shadowsCheckbox,onCalciteCheckboxChange:this._onShadowCheckboxChange}),e.label)}_makeGoToTime(e){return()=>{this.viewModel.timeSliderPosition=e}}};e([o(),k("esri/widgets/Daylight/t9n/Daylight")],M.prototype,"messages",void 0),e([o(),k("esri/widgets/support/t9n/timezone")],M.prototype,"timezoneMessages",void 0),e([o()],M.prototype,"headingLevel",void 0),e([o()],M.prototype,"icon",null),e([o()],M.prototype,"label",null),e([o()],M.prototype,"playSpeedMultiplier",null),e([o()],M.prototype,"timeSliderSteps",null),e([o()],M.prototype,"view",null),e([o({type:d})],M.prototype,"viewModel",void 0),e([o({type:c,nonNullable:!0})],M.prototype,"visibleElements",void 0),e([o({cast(e){return"season"===e||"date"===e?e:(t.getLogger(this).warn(`"${e}" is not a valid option. Acceptable values are only "date" or "season". Defaulting to "${D}".`),D)}})],M.prototype,"dateOrSeason",void 0),e([o()],M.prototype,"_timeSlider",void 0),M=e([l("esri.widgets.Daylight")],M);const f=[u.interactive,u.anchor],P=M;export{P as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Logger.js";import{watch as i,syncAndInitial as s}from"../core/reactiveUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{onLocaleChange as a}from"../intl/locale.js";import n from"./Widget.js";import{css as r}from"./Daylight/css.js";import d from"./Daylight/DaylightViewModel.js";import c from"./Daylight/VisibleElements.js";import{orderedSeasons as p}from"./Daylight/support/daylightUtils.js";import h from"./Daylight/support/SliderWithDropdown.js";import{css as g}from"./Slider/css.js";import{loadCalciteComponents as m}from"./support/componentsUtils.js";import{globalCss as u}from"./support/globalCss.js";import{Heading as y}from"./support/Heading.js";import{onPrimaryTickCreated as b,onSecondaryTickCreated as v,adjustTimeSliderForLocale as S,useAmPm as w}from"./support/timeWidgetUtils.js";import"./support/widgetUtils.js";import{messageBundle as k}from"./support/decorators/messageBundle.js";import{vmEvent as _}from"./support/decorators/vmEvent.js";import{tsx as C,tsxFragment as D}from"./support/jsxFactory.js";const M="date";let f=class extends n{constructor(e,t){super(e,t),this.headingLevel=3,this.viewModel=new d,this.visibleElements=new c,this.dateOrSeason=M,this._timeSlider=new h({viewModel:this.viewModel.timeSliderViewModel,steps:this.timeSliderSteps,labelInputsEnabled:!1,visibleElements:{labels:!0},tickConfigs:[{mode:"position",values:[0,360,720,1080,1439],labelsVisible:!0,tickCreatedFunction:(e,t,i)=>b({tickElement:t,labelElement:i,tickClasses:P,onClick:this._makeGoToTime(e)})},{mode:"position",values:[120,240,480,600,840,960,1200,1320],tickCreatedFunction:(e,t)=>v({tickElement:t,tickClasses:P,onClick:this._makeGoToTime(e)})}]}),this._onPlayDayClick=()=>{this.viewModel.toggleDayPlaying()},this._onDateChange=e=>{const t=e.currentTarget.valueAsDate;this.viewModel.onDateChange(Array.isArray(t)?t[0]:t)},this._onYearPlayClick=()=>{this.viewModel.toggleYearPlaying()},this._onSeasonChange=e=>{this.viewModel.currentSeason=e.currentTarget.value},this._onSunLightingCheckboxChange=()=>{this.viewModel.toggleSunLightingEnabled()},this._onShadowCheckboxChange=()=>{this.viewModel.toggleDirectShadowsEnabled()}}get icon(){return"brightness"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.title??""}set label(e){this._overrideIfSome("label",e)}get playSpeedMultiplier(){return this.viewModel.playSpeedMultiplier}set playSpeedMultiplier(e){this.viewModel.playSpeedMultiplier=e}get timeSliderSteps(){return this._timeSlider?.steps??5}set timeSliderSteps(e){this._timeSlider.steps=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}postInitialize(){this.viewModel.isSupported&&(this.addHandles([i((()=>this.viewModel.timeSliderViewModel),(e=>this._timeSlider.viewModel=e),s),i((()=>this.visibleElements?.timezone),(e=>this._timeSlider.showDropDown=e),s),i((()=>!this.viewModel.sunLightingEnabled),(e=>{this._timeSlider.disabled=e}),s),a((()=>this._adjustTimeSliderPadding()))]),this._adjustTimeSliderPadding())}destroy(){this._timeSlider.destroy()}render(){const{messages:e,viewModel:t,visibleElements:i}=this,s=t.isSupported;return C("div",{class:this.classes(r.base,u.widget)},s?C(D,null,i.header?C(y,{level:this.headingLevel},e.title):null,this._renderTimeOptions(),i.datePicker?this._renderDateOrSeason():null,i.sunLightingToggle?this._renderSunLightingToggle():null,i.shadowsToggle?this._renderShadowsToggle():null):C("div",{class:r.panelError,key:"unsupported"},C("p",null,e.unsupported)))}loadDependencies(){return m({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select")})}_adjustTimeSliderPadding(){S(this.domNode?.querySelector(`.${g.base}`))}_renderTimeOptions(){const{viewModel:e,visibleElements:t,messages:i}=this,{dayPlaying:s}=e,o=!e.sunLightingEnabled;return C("div",{class:this.classes(r.dayContainer,{[r.sliderDateOn]:t.datePicker,[r.sliderDateOff]:!t.datePicker,[r.sliderAmPmOn]:w(),[r.containerDisabled]:o}),key:"daylight-time-options"},this._timeSlider.render(),t.playButtons?this._renderPlayPauseButton({playing:s,disabled:o,label:i.playDay,onClick:this._onPlayDayClick}):null)}_renderDateOptions(){const{viewModel:e,visibleElements:t,messages:i}=this,{yearPlaying:s}=e,o=!e.sunLightingEnabled;return C("div",{class:this.classes(r.dateContainer,o&&r.containerDisabled),key:r.dateContainer},C("calcite-input-date-picker",{class:r.datePicker,"data-testid":"daylight-date-picker",disabled:o,key:r.datePicker,overlayPositioning:"fixed",placement:"bottom",valueAsDate:e.localDate,onCalciteInputDatePickerChange:this._onDateChange}),t.playButtons?this._renderPlayPauseButton({playing:s,disabled:o,label:i.playYear,onClick:this._onYearPlayClick}):null)}_renderPlayPauseButton({playing:e,disabled:t,label:i,onClick:s}){return C("calcite-button",{appearance:"solid",class:r.playPauseButton,disabled:t,iconStart:e?"pause-f":"play-f",label:i,onclick:s,round:!0,title:i,type:"button"})}_renderSeasonSelect(){const{messages:e,viewModel:t}=this,i=!t.sunLightingEnabled;return C("calcite-select",{class:this.classes(r.seasonPicker),disabled:i,label:e.season,onCalciteSelectChange:this._onSeasonChange},p.map((i=>C("calcite-option",{selected:t.currentSeason===i,value:i},e[i]))))}_renderDateOrSeason(){return"date"===this.dateOrSeason?this._renderDateOptions():this._renderSeasonSelect()}_renderSunLightingToggle(){const e=this.messages?.sunLightingToggle;return C("calcite-label",{key:"date-time-toggle",layout:"inline",scale:"s",title:e?.tooltip},C("calcite-checkbox",{checked:this.viewModel.sunLightingEnabled,class:r.sunLightingCheckbox,onCalciteCheckboxChange:this._onSunLightingCheckboxChange}),e?.label)}_renderShadowsToggle(){const e=this.messages.shadowsToggle;return C("calcite-label",{key:"shadow-toggle",layout:"inline",scale:"s",title:e?.tooltip},C("calcite-checkbox",{checked:this.viewModel.directShadowsEnabled,class:r.shadowsCheckbox,onCalciteCheckboxChange:this._onShadowCheckboxChange}),e.label)}_makeGoToTime(e){return()=>{this.viewModel.timeSliderPosition=e}}};e([o(),k("esri/widgets/Daylight/t9n/Daylight")],f.prototype,"messages",void 0),e([o(),k("esri/widgets/support/t9n/timezone")],f.prototype,"timezoneMessages",void 0),e([o()],f.prototype,"headingLevel",void 0),e([o()],f.prototype,"icon",null),e([o()],f.prototype,"label",null),e([o()],f.prototype,"playSpeedMultiplier",null),e([o()],f.prototype,"timeSliderSteps",null),e([o()],f.prototype,"view",null),e([_("user-date-time-change"),o({type:d})],f.prototype,"viewModel",void 0),e([o({type:c,nonNullable:!0})],f.prototype,"visibleElements",void 0),e([o({cast(e){return"season"===e||"date"===e?e:(t.getLogger(this).warn(`"${e}" is not a valid option. Acceptable values are only "date" or "season". Defaulting to "${M}".`),M)}})],f.prototype,"dateOrSeason",void 0),e([o()],f.prototype,"_timeSlider",void 0),f=e([l("esri.widgets.Daylight")],f);const P=[u.interactive,u.anchor],j=f;export{j as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Color.js";import{handlesGroup as r}from"../../core/handleUtils.js";import{memoize as i}from"../../core/memoize.js";import{watch as o,on as n}from"../../core/reactiveUtils.js";import{union as s}from"../../core/SetUtils.js";import{getMetersPerVerticalUnitForSR as l}from"../../core/unitUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{i as u}from"../../chunks/vec32.js";import{create as p}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as d}from"../../geometry/ellipsoidUtils.js";import{create as m,fromPoints as v}from"../../geometry/support/ray.js";import{GeometryDescriptor as y}from"../../layers/support/ElevationQuery.js";import{externalToInternalIntersectOptions as f}from"../../views/3d/support/hitTest.js";import{newIntersector as h}from"../../views/3d/webgl-engine/lib/Intersector.js";import{StoreResults as w}from"../../views/3d/webgl-engine/lib/IntersectorInterfaces.js";import{toGraphic as _}from"../../views/3d/webgl-engine/lib/intersectorUtilsConversions.js";import g from"./ElevationProfileLine.js";const j=2e5;let b=class extends g{constructor(e){super(e),this.type="view",this.color=new t("#cf4ccf"),this.viewVisualizationEnabled=!0,this.include=null,this.exclude=null,this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependencies=i(((e,t,r,i,o,n,s)=>({inputGraphicUid:null!=e?x(e):null,visibleLayers:t,maxIntersectionDistance:r,intersectOptions:i,view:o,stationary:n,spatialReference:s}))),this._vecA=p(),this._vecB=p(),this._ray=m()}get minDemResolution(){const e=this._viewModel?.view;if(null==e||"3d"!==e.type)return null;const t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return null==t?null:t*l(e.spatialReference)}get queryElevationDependencies(){const e=this._view;return e?this._getQueryElevationDependencies(this._viewModel?.input,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter((e=>e.visible)).toArray()??[]}get _intersectOptions(){const e=this._view;if(null==e||e.destroyed)return{};const t=f(e,{include:this.include,exclude:this.exclude}),r=f(e,{exclude:this._pointCloudLayers});return t.exclude=s(t.exclude,r.exclude),t}get _pointCloudLayers(){const e=this._view;return null==e?[]:e.allLayerViews.toArray().filter((e=>"point-cloud"===e.layer?.type)).map((e=>e.layer))}get _view(){const e=this._viewModel?.view;return null!=e&&"3d"===e.type?e:null}get _maxIntersectionDistance(){const e=this._view;return e?.renderCoordsHelper?d(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters:Number.POSITIVE_INFINITY}get _intersector(){const e=this._view;if(null==e)return null;const t=h(e.state.viewingMode),r=t.options;return r.hud=!1,r.invisibleTerrain=!1,r.backfacesTerrain=!1,r.selectionMode=!1,r.store=w.ALL,t}async queryElevation(e,{noDataValue:t,signal:r}){const i=this.queryElevationDependencies;if(null==i)throw new Error("ElevationProfileLineInput: no dependencies");const o=this._intersector;if(null==o)throw new Error("ElevationProfileLineInput: no view");const{intersectOptions:n,view:s,spatialReference:l}=i,c=s.renderCoordsHelper,a=s.sceneIntersectionHelper,p=this._vecA,d=this._vecA,m=this._vecB,f=this._ray;if(!l)return{geometry:e,noDataValue:t};const h=await y.fromGeometry(e).project(l,r);if(!h)return{geometry:e,noDataValue:t};const w=h.coordinates,_=w.length;for(let y=0;y<_;++y){const e=w[y];u(m,e.x,e.y,e.z??0),c.toRenderCoords(m,l,m),c.setAltitude(p,j,m);const r=v(p,m,f);a.computeIntersection(r,o,n,!0);const s=I(i,o.results.all);s?(s.getIntersectionPoint(d),c.fromRenderCoords(d,d,l),e.z=d[2]):e.z=t}return{geometry:h.export(),noDataValue:t}}attach(e){const t=()=>this._onChange();return r([super.attach(e),o((()=>this.queryElevationDependencies),t),n((()=>e.elevationProvider),"elevation-change",t,{onListenerAdd:t,onListenerRemove:t})])}};function I({view:e,inputGraphicUid:t,maxIntersectionDistance:r},i){for(const o of i){if(!o.withinDistance(r))continue;const i=_(o,e);if(null==i||x(i)!==t)return o}return null}function x(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}e([c({type:t,nonNullable:!0})],b.prototype,"color",void 0),e([c()],b.prototype,"viewVisualizationEnabled",void 0),e([c()],b.prototype,"include",void 0),e([c()],b.prototype,"exclude",void 0),e([c({readOnly:!0})],b.prototype,"minDemResolution",null),e([c()],b.prototype,"queryElevationDependencies",null),e([c()],b.prototype,"_visibleLayers",null),e([c()],b.prototype,"_intersectOptions",null),e([c()],b.prototype,"_pointCloudLayers",null),e([c()],b.prototype,"_view",null),e([c()],b.prototype,"_maxIntersectionDistance",null),e([c()],b.prototype,"_intersector",null),b=e([a("esri.widgets.ElevationProfile.ElevationProfileLineView")],b);const L=b;export{L as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Color.js";import{handlesGroup as r}from"../../core/handleUtils.js";import{memoize as i}from"../../core/memoize.js";import{watch as o,on as n}from"../../core/reactiveUtils.js";import{union as s}from"../../core/SetUtils.js";import{getMetersPerVerticalUnitForSR as l}from"../../core/unitUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{i as u}from"../../chunks/vec32.js";import{create as p}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as d}from"../../geometry/ellipsoidUtils.js";import{create as m,fromPoints as v}from"../../geometry/support/ray.js";import{GeometryDescriptor as y}from"../../layers/support/ElevationQuery.js";import{externalToInternalIntersectOptions as f}from"../../views/3d/support/hitTest.js";import{Intersector as h}from"../../views/3d/webgl-engine/lib/Intersector.js";import{StoreResults as w}from"../../views/3d/webgl-engine/lib/IntersectorInterfaces.js";import{toGraphic as _}from"../../views/3d/webgl-engine/lib/intersectorUtilsConversions.js";import g from"./ElevationProfileLine.js";const j=2e5;let b=class extends g{constructor(e){super(e),this.type="view",this.color=new t("#cf4ccf"),this.viewVisualizationEnabled=!0,this.include=null,this.exclude=null,this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependencies=i(((e,t,r,i,o,n,s)=>({inputGraphicUid:null!=e?x(e):null,visibleLayers:t,maxIntersectionDistance:r,intersectOptions:i,view:o,stationary:n,spatialReference:s}))),this._vecA=p(),this._vecB=p(),this._ray=m()}get minDemResolution(){const e=this._viewModel?.view;if(null==e||"3d"!==e.type)return null;const t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return null==t?null:t*l(e.spatialReference)}get queryElevationDependencies(){const e=this._view;return e?this._getQueryElevationDependencies(this._viewModel?.input,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter((e=>e.visible)).toArray()??[]}get _intersectOptions(){const e=this._view;if(null==e||e.destroyed)return{};const t=f(e,{include:this.include,exclude:this.exclude}),r=f(e,{exclude:this._pointCloudLayers});return t.exclude=s(t.exclude,r.exclude),t}get _pointCloudLayers(){const e=this._view;return null==e?[]:e.allLayerViews.toArray().filter((e=>"point-cloud"===e.layer?.type)).map((e=>e.layer))}get _view(){const e=this._viewModel?.view;return null!=e&&"3d"===e.type?e:null}get _maxIntersectionDistance(){const e=this._view;return e?.renderCoordsHelper?d(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters:Number.POSITIVE_INFINITY}get _intersector(){const e=this._view;if(null==e)return null;const t=new h(e.state.viewingMode),r=t.options;return r.hud=!1,r.invisibleTerrain=!1,r.backfacesTerrain=!1,r.selectionMode=!1,r.store=w.ALL,t}async queryElevation(e,{noDataValue:t,signal:r}){const i=this.queryElevationDependencies;if(null==i)throw new Error("ElevationProfileLineInput: no dependencies");const o=this._intersector;if(null==o)throw new Error("ElevationProfileLineInput: no view");const{intersectOptions:n,view:s,spatialReference:l}=i,c=s.renderCoordsHelper,a=s.sceneIntersectionHelper,p=this._vecA,d=this._vecA,m=this._vecB,f=this._ray;if(!l)return{geometry:e,noDataValue:t};const h=await y.fromGeometry(e).project(l,r);if(!h)return{geometry:e,noDataValue:t};const w=h.coordinates,_=w.length;for(let y=0;y<_;++y){const e=w[y];u(m,e.x,e.y,e.z??0),c.toRenderCoords(m,l,m),c.setAltitude(p,j,m);const r=v(p,m,f);a.computeIntersection(r,o,!0,n);const s=I(i,o.results.all);s?(s.getIntersectionPoint(d),c.fromRenderCoords(d,d,l),e.z=d[2]):e.z=t}return{geometry:h.export(),noDataValue:t}}attach(e){const t=()=>this._onChange();return r([super.attach(e),o((()=>this.queryElevationDependencies),t),n((()=>e.elevationProvider),"elevation-change",t,{onListenerAdd:t,onListenerRemove:t})])}};function I({view:e,inputGraphicUid:t,maxIntersectionDistance:r},i){for(const o of i){if(!o.withinDistance(r))continue;const i=_(o,e);if(null==i||x(i)!==t)return o}return null}function x(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}e([c({type:t,nonNullable:!0})],b.prototype,"color",void 0),e([c()],b.prototype,"viewVisualizationEnabled",void 0),e([c()],b.prototype,"include",void 0),e([c()],b.prototype,"exclude",void 0),e([c({readOnly:!0})],b.prototype,"minDemResolution",null),e([c()],b.prototype,"queryElevationDependencies",null),e([c()],b.prototype,"_visibleLayers",null),e([c()],b.prototype,"_intersectOptions",null),e([c()],b.prototype,"_pointCloudLayers",null),e([c()],b.prototype,"_view",null),e([c()],b.prototype,"_maxIntersectionDistance",null),e([c()],b.prototype,"_intersector",null),b=e([a("esri.widgets.ElevationProfile.ElevationProfileLineView")],b);const L=b;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.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../Widget.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as s}from"../../support/globalCss.js";import"../../support/widgetUtils.js";import{messageBundle as r}from"../../support/decorators/messageBundle.js";import{tsx as c}from"../../support/jsxFactory.js";import{getAssociationTitle as a}from"../../support/UtilityNetworkAssociations/utils/getAssociationTitle.js";import{isFromElement as l}from"../../support/UtilityNetworkAssociations/utils/isFromElement.js";const m="esri-feature-form-utility-network-association-settings",u={base:m,infoContainer:`${m}__info-container`};let d=class extends i{constructor(e,t){super(e,t),this.percentAlong=50,this.headingLevel=5,this.messagesFeature=null,this.messagesCommon=null,this.messagesFeatureForm=null,this.readOnly=!1,this.sourceFeature=null,this.targetFeature=null,this.utilityNetwork=null}loadDependencies(){return n({block:()=>import("@esri/calcite-components/dist/components/calcite-block"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch")})}get association(){return this._get("association")}set association(e){this.percentAlong=e.percentAlong?100*e.percentAlong:50,this._set("association",e)}get associationType(){return this.association.associationType}set associationType(e){this.association.associationType=e,"junction-edge-to-connectivity"!==e&&"junction-edge-from-connectivity"!==e||(this.association.percentAlong=void 0)}render(){return c("div",{class:this.classes(u.base,s.widget)},this._renderFromAssociationEndpoint(),this._renderToAssociationEndpoint(),this._renderAdditionalContent())}_renderFromAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?o:i,r=s.label,c=a(t,"from",n.associations);switch(e){case"connectivity":case"junction-junction-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-from-connectivity":case"junction-edge-to-connectivity":return this._renderAssociationEndpoint(r,c,this._renderConnectivityContent(s.feature,t.fromNetworkElement))}return this._renderAssociationEndpoint(r,c)}_renderToAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?i:o,r=s.label,c=a(t,"to",n.associations);let m;switch(e){case"connectivity":case"junction-junction-connectivity":m=this._renderConnectivityContent(s.feature,t.toNetworkElement);break;case"containment":m=this._isNonspatial(s.feature)?null:this._renderContainmentContent()}return this._renderAssociationEndpoint(r,c,m)}_renderAssociationEndpoint(e,t,o){return c("calcite-block",{description:t,heading:e,open:!0},o)}_renderContainmentContent(){const{messagesFeatureForm:e,association:t}=this,o=t.isContentVisible??!1;return c("calcite-label",{layout:"inline"},e.associations.visible,c("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{t.isContentVisible=e.checked}}))}_renderConnectivityContent(e,t){const{messagesFeatureForm:o,utilityNetwork:i}=this,n=i.getTerminalConfiguration(e),s=n?.terminals.map((e=>this._renderComboboxListItemNumber(e.id,t.terminalId,e.name)))||[];return c("calcite-label",null,o.associations.terminal,c("calcite-combobox",{allowCustomValues:!1,clearDisabled:!0,label:o.associations.terminalComboboxLabel,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:e})=>{t.terminalId=parseInt(e.value,10)}},...s))}_renderAdditionalContent(){const{associationType:e}=this;switch(e){case"connectivity":case"junction-junction-connectivity":case"attachment":case"containment":return}const t="junction-edge-midspan-connectivity"===e?e:"junction-edge-from-connectivity",{messagesFeatureForm:o}=this,i=[this._renderComboboxListItemString("junction-edge-midspan-connectivity",t,o.associations.midspanEdge),this._renderComboboxListItemString("junction-edge-from-connectivity",t,o.associations.endpointEdge)];return c("div",{class:u.infoContainer},c("calcite-label",{key:"additional-content"},o.associations.connectTo,c("calcite-combobox",{allowCustomValues:!1,clearDisabled:!0,label:o.associations.edgeConnectionComboboxLabel,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:e})=>{this.associationType=e.value}},...i)),"junction-edge-midspan-connectivity"===t?this._renderMidspanEdgeContent():this._renderEndpointEdgeContent())}_renderMidspanEdgeContent(){const{messagesFeatureForm:e,percentAlong:t,association:o}=this;return o.percentAlong=t/100,c("calcite-label",{key:"midspan-edge"},e.associations.midspanLocation,c("calcite-input-number",{max:100,min:0,numberButtonType:"vertical",suffixText:"%",value:`${t}`,onCalciteInputNumberInput:({currentTarget:e})=>{this.percentAlong=parseFloat(e.value)}}))}_renderEndpointEdgeContent(){const{associationType:e,messagesFeatureForm:t}=this,o="junction-edge-to-connectivity"===e;return c("calcite-label",{key:"endpoint-edge"},t.associations.edgeSide,c("calcite-label",{layout:"inline"},t.associations.fromSide,c("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{const t=e.checked?"junction-edge-to-connectivity":"junction-edge-from-connectivity";this.associationType=t}}),t.associations.toSide))}_renderComboboxListItemNumber(e,t,o){return c("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_renderComboboxListItemString(e,t,o){return c("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_isNonspatial(e){const{sourceLayer:t}=e;return null!=t&&"geometryType"in t&&null==t.geometryType}};e([t()],d.prototype,"association",null),e([t()],d.prototype,"percentAlong",void 0),e([t()],d.prototype,"associationType",null),e([t()],d.prototype,"headingLevel",void 0),e([t(),r("esri/widgets/Feature/t9n/Feature")],d.prototype,"messagesFeature",void 0),e([t(),r("esri/t9n/common")],d.prototype,"messagesCommon",void 0),e([t(),r("esri/widgets/FeatureForm/t9n/FeatureForm")],d.prototype,"messagesFeatureForm",void 0),e([t()],d.prototype,"readOnly",void 0),e([t()],d.prototype,"sourceFeature",void 0),e([t()],d.prototype,"targetFeature",void 0),e([t()],d.prototype,"utilityNetwork",void 0),d=e([o("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.UtilityNetworkAssociationSettings")],d);const p=d;export{p as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../Widget.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as s}from"../../support/globalCss.js";import"../../support/widgetUtils.js";import{messageBundle as r}from"../../support/decorators/messageBundle.js";import{tsx as a}from"../../support/jsxFactory.js";import{getAssociationTitle as c}from"../../support/UtilityNetworkAssociations/utils/getAssociationTitle.js";import{isFromElement as l}from"../../support/UtilityNetworkAssociations/utils/isFromElement.js";const m="esri-feature-form-utility-network-association-settings",u={base:m,infoContainer:`${m}__info-container`};let d=class extends i{constructor(e,t){super(e,t),this.percentAlong=50,this.headingLevel=5,this.messagesFeature=null,this.messagesCommon=null,this.messagesFeatureForm=null,this.readOnly=!1,this.sourceFeature=null,this.targetFeature=null,this.utilityNetwork=null}loadDependencies(){return n({block:()=>import("@esri/calcite-components/dist/components/calcite-block"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch")})}get association(){return this._get("association")}set association(e){this.percentAlong=e.percentAlong?100*e.percentAlong:50,this._set("association",e)}get associationType(){return this.association.associationType}set associationType(e){this.association.associationType=e,"junction-edge-to-connectivity"!==e&&"junction-edge-from-connectivity"!==e||(this.association.percentAlong=void 0)}render(){return a("div",{class:this.classes(u.base,s.widget)},this._renderFromAssociationEndpoint(),this._renderToAssociationEndpoint(),this._renderAdditionalContent())}_renderFromAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?o:i,r=s.label,a=c(t,"from",n.associations);switch(e){case"connectivity":case"junction-junction-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-from-connectivity":case"junction-edge-to-connectivity":return this._renderAssociationEndpoint(r,a,this._renderConnectivityContent(s.feature,t.fromNetworkElement))}return this._renderAssociationEndpoint(r,a)}_renderToAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?i:o,r=s.label,a=c(t,"to",n.associations);let m;switch(e){case"connectivity":case"junction-junction-connectivity":m=this._renderConnectivityContent(s.feature,t.toNetworkElement);break;case"containment":m=this._isNonspatial(s.feature)?null:this._renderContainmentContent()}return this._renderAssociationEndpoint(r,a,m)}_renderAssociationEndpoint(e,t,o){return a("calcite-block",{description:t,expanded:!0,heading:e},o)}_renderContainmentContent(){const{messagesFeatureForm:e,association:t}=this,o=t.isContentVisible??!1;return a("calcite-label",{layout:"inline"},e.associations.visible,a("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{t.isContentVisible=e.checked}}))}_renderConnectivityContent(e,t){const{messagesFeatureForm:o,utilityNetwork:i}=this,n=i.getTerminalConfiguration(e),s=n?.terminals.map((e=>this._renderComboboxListItemNumber(e.id,t.terminalId,e.name)))||[];return a("calcite-label",null,o.associations.terminal,a("calcite-combobox",{allowCustomValues:!1,clearDisabled:!0,label:o.associations.terminalComboboxLabel,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:e})=>{t.terminalId=parseInt(e.value,10)}},...s))}_renderAdditionalContent(){const{associationType:e}=this;switch(e){case"connectivity":case"junction-junction-connectivity":case"attachment":case"containment":return}const t="junction-edge-midspan-connectivity"===e?e:"junction-edge-from-connectivity",{messagesFeatureForm:o}=this,i=[this._renderComboboxListItemString("junction-edge-midspan-connectivity",t,o.associations.midspanEdge),this._renderComboboxListItemString("junction-edge-from-connectivity",t,o.associations.endpointEdge)];return a("div",{class:u.infoContainer},a("calcite-label",{key:"additional-content"},o.associations.connectTo,a("calcite-combobox",{allowCustomValues:!1,clearDisabled:!0,label:o.associations.edgeConnectionComboboxLabel,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:e})=>{this.associationType=e.value}},...i)),"junction-edge-midspan-connectivity"===t?this._renderMidspanEdgeContent():this._renderEndpointEdgeContent())}_renderMidspanEdgeContent(){const{messagesFeatureForm:e,percentAlong:t,association:o}=this;return o.percentAlong=t/100,a("calcite-label",{key:"midspan-edge"},e.associations.midspanLocation,a("calcite-input-number",{max:100,min:0,numberButtonType:"vertical",suffixText:"%",value:`${t}`,onCalciteInputNumberInput:({currentTarget:e})=>{this.percentAlong=parseFloat(e.value)}}))}_renderEndpointEdgeContent(){const{associationType:e,messagesFeatureForm:t}=this,o="junction-edge-to-connectivity"===e;return a("calcite-label",{key:"endpoint-edge"},t.associations.edgeSide,a("calcite-label",{layout:"inline"},t.associations.fromSide,a("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{const t=e.checked?"junction-edge-to-connectivity":"junction-edge-from-connectivity";this.associationType=t}}),t.associations.toSide))}_renderComboboxListItemNumber(e,t,o){return a("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_renderComboboxListItemString(e,t,o){return a("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_isNonspatial(e){const{sourceLayer:t}=e;return null!=t&&"geometryType"in t&&null==t.geometryType}};e([t()],d.prototype,"association",null),e([t()],d.prototype,"percentAlong",void 0),e([t()],d.prototype,"associationType",null),e([t()],d.prototype,"headingLevel",void 0),e([t(),r("esri/widgets/Feature/t9n/Feature")],d.prototype,"messagesFeature",void 0),e([t(),r("esri/t9n/common")],d.prototype,"messagesCommon",void 0),e([t(),r("esri/widgets/FeatureForm/t9n/FeatureForm")],d.prototype,"messagesFeatureForm",void 0),e([t()],d.prototype,"readOnly",void 0),e([t()],d.prototype,"sourceFeature",void 0),e([t()],d.prototype,"targetFeature",void 0),e([t()],d.prototype,"utilityNetwork",void 0),d=e([o("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.UtilityNetworkAssociationSettings")],d);const p=d;export{p as default};