@arcgis/core 4.34.0-next.37 → 4.34.0-next.39

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 (1090) hide show
  1. package/Basemap.js +1 -1
  2. package/Camera.js +1 -1
  3. package/Graphic.js +1 -1
  4. package/Ground.js +1 -1
  5. package/PopupTemplate.js +1 -1
  6. package/Viewpoint.js +1 -1
  7. package/WebDocument2D.js +1 -1
  8. package/WebScene.js +1 -1
  9. package/analysis/Analysis.js +1 -1
  10. package/analysis/DimensionSimpleStyle.js +1 -1
  11. package/analysis/LengthDimension.js +1 -1
  12. package/analysis/LineOfSightAnalysisObserver.js +1 -1
  13. package/analysis/LineOfSightAnalysisTarget.js +1 -1
  14. package/analysis/SlicePlane.js +1 -1
  15. package/analysis/Viewshed.js +1 -1
  16. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  17. package/analysis/support/SliceAnalysisExcludedLayer.js +1 -1
  18. package/assets/esri/core/workers/RemoteClient.js +1 -1
  19. package/assets/esri/core/workers/chunks/{1c8dbdb833a66f7183fc.js → 00ae094cc21bc42faa54.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{36d15d1dd19417b37d2f.js → 01ae7d36bda6b6186786.js} +1 -1
  21. package/assets/esri/core/workers/chunks/01bd8f90e55081e65b38.js +1 -0
  22. package/assets/esri/core/workers/chunks/03df4668002eb4cb4f98.js +1 -0
  23. package/assets/esri/core/workers/chunks/{c4a20b8038bfbb2af329.js → 09f0c9f0b6aa58ae3c52.js} +1 -1
  24. package/assets/esri/core/workers/chunks/0a27f9b11d03874809ee.js +346 -0
  25. package/assets/esri/core/workers/chunks/{1a5ddb6d36249fe09cc8.js → 0e8d3d38e9b1f6abf6f2.js} +1 -1
  26. package/assets/esri/core/workers/chunks/0f51e51db83f303ce5a6.js +1 -0
  27. package/assets/esri/core/workers/chunks/0faec78b2dd6990a5da0.js +1 -0
  28. package/assets/esri/core/workers/chunks/{2d7bbd001b64138db3c1.js → 14b536e0c1de6c7422bc.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{170fa807b71babedd185.js → 14d3039f92b0d96944f0.js} +1 -1
  30. package/assets/esri/core/workers/chunks/19391d60c76a1dc7c262.js +1 -0
  31. package/assets/esri/core/workers/chunks/{7e9d5beca1991c961ed8.js → 1acc620bfd2983d6853f.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{8e7dced4a8d089185c3a.js → 1cbd59918c60a1a21494.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{ccf3f29d0b1bde90c3cf.js → 1cd15aa69f85ecfa32b0.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{6b5be459ec4c418cc6fd.js → 1d9212a70df68a508dca.js} +1 -1
  35. package/assets/esri/core/workers/chunks/21a9f9c0cc1cde2fee90.js +1 -0
  36. package/assets/esri/core/workers/chunks/{5d4e74eb4c659e8f42d6.js → 21dd626a5b5ea6a7e18e.js} +1 -1
  37. package/assets/esri/core/workers/chunks/224872bfd923cf4c9d78.js +1 -0
  38. package/assets/esri/core/workers/chunks/27027493a8dba8305693.js +1 -0
  39. package/assets/esri/core/workers/chunks/{2b9c403f4b20b8f62804.js → 2a26c3fc324d672ebe88.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{ee28cd411a93245fb90c.js → 2ae0bda04fd5386b462f.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{7efc3ac70a005a771b9c.js → 2c399991e8627baa51b3.js} +1 -1
  42. package/assets/esri/core/workers/chunks/306a68137e62656b0f05.js +1 -0
  43. package/assets/esri/core/workers/chunks/{4c54239974a5847b8fdd.js → 30b9c131b69297ee186f.js} +1 -1
  44. package/assets/esri/core/workers/chunks/31ad9949b08a5b07218c.js +989 -0
  45. package/assets/esri/core/workers/chunks/{e4d08a85d158c705aa3d.js → 31e6eb2685872baf538a.js} +1 -1
  46. package/assets/esri/core/workers/chunks/3264d58aeef8cf074b86.js +1 -0
  47. package/assets/esri/core/workers/chunks/3358c1b04490706681cc.js +1 -0
  48. package/assets/esri/core/workers/chunks/3386420c9ae891db5be7.js +2 -0
  49. package/assets/esri/core/workers/chunks/34f677e8c1691c10e4e9.js +1 -0
  50. package/assets/esri/core/workers/chunks/35df19d1eab3a694c3fa.js +1 -0
  51. package/assets/esri/core/workers/chunks/364fb103cb139f26b455.js +1 -0
  52. package/assets/esri/core/workers/chunks/{33aafaabea07b4f80209.js → 3984ca7e05f30724adaf.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{4d2dcd667b30a98dd341.js → 3af4a410ff0bca7ba2e3.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{b8c1a08020d44ee03a17.js → 3f7d7dc05e63fc50325e.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{02435c653064f879f547.js → 4162c633efefc63c5506.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{0852abaa440c14cc2b36.js → 4459c8e495a37d4c4eb8.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{6e36b247a24172edd5ea.js → 476a6e5ca558db2adaa1.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{cd9e6b86ab0103044370.js → 4970d439d9648e97fd5a.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{5228f535719f5fc38b28.js → 4ae15645e68e7f6dd6b7.js} +1 -1
  60. package/assets/esri/core/workers/chunks/4e6e5677b90b00622146.js +1 -0
  61. package/assets/esri/core/workers/chunks/4f3c187a7cb2b1444281.js +1 -0
  62. package/assets/esri/core/workers/chunks/5156410dd84ea1232a6c.js +1 -0
  63. package/assets/esri/core/workers/chunks/{c64aa9793764eba2c6da.js → 51ddda291bbbf5db9905.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{2177c0ef06c8e7e3e28e.js → 554c789f4e875d7e6fd5.js} +1 -1
  65. package/assets/esri/core/workers/chunks/560bb06cf1bf30df4af3.js +1 -0
  66. package/assets/esri/core/workers/chunks/{36024406932b0a44a74a.js → 5b2ff220aebe464dac23.js} +1 -1
  67. package/assets/esri/core/workers/chunks/5b91a49202129eedaf00.js +1 -0
  68. package/assets/esri/core/workers/chunks/{a0dfd99dc8f4eac0b7ae.js → 5d1d909354c90cb8eb60.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{2f52a57e8c05a3ca1de8.js → 5f11fff5bc16fdec42db.js} +1 -1
  70. package/assets/esri/core/workers/chunks/5fe3c279d57f44416c28.js +1 -0
  71. package/assets/esri/core/workers/chunks/{1c87ed3a5960f8f06fc8.js → 647cff1eaaf1b622f439.js} +1 -1
  72. package/assets/esri/core/workers/chunks/6530449cd1975deb61f1.js +1 -0
  73. package/assets/esri/core/workers/chunks/{c78d98ab82f31ddda362.js → 6759319f3fd2d03c446b.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{e91800c1ea026e5b2d9b.js → 6acffacbb4a03af52e3b.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{23e0fd2d921f74834b12.js → 6b5b609b357924fa35be.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{cab294fd04f2a5eda81d.js → 712c740cf58c2e282efc.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{68edbc3b124eb8e28dd6.js → 719b89341b26c3568c2f.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{6f122e4a2a1f913523b4.js → 774844eea928efa811f2.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{5cdeb6dc72f452d6d1bc.js → 77ee4afaa4a1c7047940.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{904e701e1a12f67beaee.js → 787d281b2fe1edf6cf30.js} +1 -1
  81. package/assets/esri/core/workers/chunks/78de16f65ea297452a65.js +1 -0
  82. package/assets/esri/core/workers/chunks/{a76792c4edd1d688fba2.js → 791b3130b34b52160c1f.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{056fdd5570af28d334cd.js → 79b389baf972d329c38d.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{cf1f8fd1d62be0e02e10.js → 7a5808c6e67c43274d86.js} +1 -1
  85. package/assets/esri/core/workers/chunks/7b1fc59822ac2d421a5a.js +1 -0
  86. package/assets/esri/core/workers/chunks/{826e4bf6374f324d7f19.js → 7b82ed4cc475c782256b.js} +1 -1
  87. package/assets/esri/core/workers/chunks/7b95da70d39ba316b051.js +1 -0
  88. package/assets/esri/core/workers/chunks/{bb1213adeb05d89fbfdb.js → 7d082bfcd13ad6e8c89d.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{7641e24ffa0215d51c34.js → 7ef29640de297a0cf744.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{ac88e0aabbd6c1f1ec98.js → 7f523fa4d4ade4316625.js} +1 -1
  91. package/assets/esri/core/workers/chunks/85bfd380d4f522ff8e83.js +1 -0
  92. package/assets/esri/core/workers/chunks/{21ea48186d01bf459ef6.js → 88308a0dcc479688e67c.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{360223d8bd4ee77ecda1.js → 896c7d137bfd7a8fa0bc.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{74db0831bcbd48152c1d.js → 899f493412acd5a5d91f.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{b331543767c35e5edcc6.js → 8c1bd9bcfc59497de3b5.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{ce211163d078d3d742ce.js → 8ca95499e00ce8b0af9a.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{4ff7c8420c77256f595a.js → 8d51b6823ef5d290c670.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{1512ed7b869b3e8e07bc.js → 8e40c409a9b0a2a768a9.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{938baf4f99332dfdf29d.js → 91be247f868ce6596c9e.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{64553b5eae4edc7f46dc.js → 9247d768c3eccc0828a9.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{02bd15e0adaffcdd645b.js → 947085d176bd3a930e6f.js} +1 -1
  102. package/assets/esri/core/workers/chunks/{dca2b487152cde45fb65.js → 94850c094e076d81a016.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{5fac0b2a5aa33e8a3a84.js → 95f0c15d83d1f38e01d0.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{b45dbbeae54cea2bbc10.js → 962c0ef63de1635fb4aa.js} +1 -1
  105. package/assets/esri/core/workers/chunks/98ac849cccc4d5316021.js +1 -0
  106. package/assets/esri/core/workers/chunks/9928e432b884c75c3436.js +1 -0
  107. package/assets/esri/core/workers/chunks/{d80e26a1f4a61b1c4cf9.js → 9b5e04d87116ce2b68b2.js} +1 -1
  108. package/assets/esri/core/workers/chunks/9c60599131860f635483.js +1 -0
  109. package/assets/esri/core/workers/chunks/{ca5f63c0297612059486.js → 9cd9b22354dbdf1b1df0.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{bd1ba44362b967977003.js → 9e7af4c3c0f8cf0f5c5b.js} +1 -1
  111. package/assets/esri/core/workers/chunks/9f869b331dff505b6b55.js +1 -0
  112. package/assets/esri/core/workers/chunks/{183130521210c855c565.js → a13a36207f265f720255.js} +1 -1
  113. package/assets/esri/core/workers/chunks/a85acb948cc7d22be592.js +1 -0
  114. package/assets/esri/core/workers/chunks/{afb51b8562f8cb29b97e.js → a89c060ad302381aaf7d.js} +1 -1
  115. package/assets/esri/core/workers/chunks/{ada46055fafb8ae21dbe.js → aaab7694eb333ad480f5.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{871da12fb3029177df6f.js → ad106f5f6d6848f40de3.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{dec9656997683ef01ba6.js → ad1e5c24c1eae5ab8e45.js} +1 -1
  118. package/assets/esri/core/workers/chunks/b1c2e5e0a70fb5d27da5.js +1 -0
  119. package/assets/esri/core/workers/chunks/b40845b45f8d7cd347a1.js +1 -0
  120. package/assets/esri/core/workers/chunks/{54a686643e1ec1ea00ac.js → b481807b31e59cce9931.js} +1 -1
  121. package/assets/esri/core/workers/chunks/b5f6a0607b620b027cdd.js +1 -0
  122. package/assets/esri/core/workers/chunks/{8abcf9d3343dd8d45103.js → b884bd2f50aaccfa24c5.js} +1 -1
  123. package/assets/esri/core/workers/chunks/{1285ccdde515aca9a2d5.js → bb23371335ac049861e6.js} +1 -1
  124. package/assets/esri/core/workers/chunks/{469a018d94080fbcde22.js → bbdadced49446c907361.js} +1 -1
  125. package/assets/esri/core/workers/chunks/bc27cdd7c415ab166536.js +1 -0
  126. package/assets/esri/core/workers/chunks/{c06dda7263e64d696c88.js → c110941e87923ba47193.js} +1 -1
  127. package/assets/esri/core/workers/chunks/c474800508e3ad5ce9d7.js +1 -0
  128. package/assets/esri/core/workers/chunks/{67627b1965b27b2f1857.js → c51e2a048df152abd901.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{5c5509147bda78ce338a.js → c52314b987c63cd630f7.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{b12c44faa1efa60067b0.js → c660b6e67d5d13583f19.js} +1 -1
  131. package/assets/esri/core/workers/chunks/c6e3d4c6bb02d58d5cfe.js +1 -0
  132. package/assets/esri/core/workers/chunks/{a1591d7f82e06cab5de4.js → c8d57588267e2fc4406c.js} +1 -1
  133. package/assets/esri/core/workers/chunks/{f5bb7c90f48cae594bc3.js → ca7c9756802214e41c56.js} +1 -1
  134. package/assets/esri/core/workers/chunks/cf474c055a85bdbfa8d0.js +1 -0
  135. package/assets/esri/core/workers/chunks/{9f933a7e9d3b0cd69383.js → d08b80583a23ba253c7e.js} +1 -1
  136. package/assets/esri/core/workers/chunks/d1635a7ab0c204852237.js +1 -0
  137. package/assets/esri/core/workers/chunks/{d16484b389d56a43d204.js → d465e1b3a8a53d9c0a12.js} +1 -1
  138. package/assets/esri/core/workers/chunks/{4c7162883b228db563c6.js → d578c3880eaf2dd62324.js} +1 -1
  139. package/assets/esri/core/workers/chunks/{b8bd0f1be54b318990f6.js → d7c679374aa2d256becf.js} +1 -1
  140. package/assets/esri/core/workers/chunks/{bb0c5275e51d170ac795.js → d93b24e863379116b2aa.js} +1 -1
  141. package/assets/esri/core/workers/chunks/{fae53d825dd9fef0426c.js → da228aed337f492456cc.js} +1 -1
  142. package/assets/esri/core/workers/chunks/{6589133542fa130c0628.js → dd1d9913b33d4e48baff.js} +1 -1
  143. package/assets/esri/core/workers/chunks/{b49b73e2d0d643dfa351.js → de499e33035b56b6697d.js} +1 -1
  144. package/assets/esri/core/workers/chunks/{e59fdb8f625e9080f097.js → e08b2e9213d35f85916f.js} +1 -1
  145. package/assets/esri/core/workers/chunks/{c5c9f0c8da5f7bf41728.js → e177d0ab454dfa024b39.js} +1 -1
  146. package/assets/esri/core/workers/chunks/{948ecf0bfbc886ec3b52.js → e1b25b1ce3bd4f0f2cda.js} +1 -1
  147. package/assets/esri/core/workers/chunks/{eedf97211883713c413e.js → e1b573840ec1f7c3afd3.js} +1 -1
  148. package/assets/esri/core/workers/chunks/{b117e054a2bc54f5f93b.js → e3f2cdf5d71a7040894b.js} +1 -1
  149. package/assets/esri/core/workers/chunks/{dfc5936fbbd26f27a92a.js → e666ca4d14b6490485d6.js} +1 -1
  150. package/assets/esri/core/workers/chunks/e6d08230adb90b9a2a17.js +1 -0
  151. package/assets/esri/core/workers/chunks/{672751823261a5763684.js → e92d9e0ac789bcf1cdf4.js} +1 -1
  152. package/assets/esri/core/workers/chunks/{d3b932ff2299c89c2582.js → e95a8c988ef822723503.js} +1 -1
  153. package/assets/esri/core/workers/chunks/{ae667084cb6a08b97c37.js → eb7dd722e4cd7f83b3f5.js} +1 -1
  154. package/assets/esri/core/workers/chunks/ec9ed7c9d64f88fcb806.js +1 -0
  155. package/assets/esri/core/workers/chunks/{06bd2f5358c6b85d5420.js → f42938e1602306cfa7a8.js} +1 -1
  156. package/assets/esri/core/workers/chunks/{77e083d1e425026fa030.js → f4b145feab275b268c2e.js} +1 -1
  157. package/assets/esri/core/workers/chunks/{568f49f9e50c505b2736.js → f4d7cbd33ef8710d7316.js} +1 -1
  158. package/assets/esri/core/workers/chunks/{451ae19a0a120b27c6da.js → fb0f729eff2f2911d6c3.js} +1 -1
  159. package/assets/esri/core/workers/chunks/{ce0683921ccefc580018.js → fd3009164d5e38fda85f.js} +1 -1
  160. package/assets/esri/core/workers/chunks/{4c77102f083198ae2a6a.js → ff34fdda7899e784ac73.js} +1 -1
  161. package/chunks/ColorMaterial.glsl.js +2 -2
  162. package/chunks/DefaultMaterial.glsl.js +4 -4
  163. package/chunks/HUDMaterial.glsl.js +5 -5
  164. package/chunks/LineMarker.glsl.js +19 -19
  165. package/chunks/Pattern.glsl.js +6 -6
  166. package/chunks/RibbonLine.glsl.js +2 -2
  167. package/chunks/TimeExtent.js +1 -1
  168. package/chunks/TimeInterval.js +1 -1
  169. package/chunks/pe.js +1 -1
  170. package/config.js +1 -1
  171. package/core/AsyncUpdate.js +1 -1
  172. package/core/Collection.js +1 -1
  173. package/core/Evented.js +1 -1
  174. package/core/JSONSupport.d.ts +1 -1
  175. package/core/JSONSupport.js +1 -1
  176. package/core/Loadable.js +1 -1
  177. package/core/MultiOriginJSONSupport.js +1 -1
  178. package/core/Promise.d.ts +1 -1
  179. package/core/Promise.js +1 -1
  180. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  181. package/core/has.js +1 -1
  182. package/core/object.js +1 -1
  183. package/core/workers/RemoteClient.js +1 -1
  184. package/core/workers/utils.js +1 -1
  185. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  186. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  187. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  188. package/editing/sharedTemplates/templateDefinitions/parts/TemplatePartBase.js +1 -1
  189. package/effects/FocusArea.js +1 -1
  190. package/effects/FocusAreaOutline.js +1 -1
  191. package/effects/FocusAreas.js +1 -1
  192. package/form/ExpressionInfo.js +1 -1
  193. package/form/FormTemplate.js +1 -1
  194. package/form/elements/Element.js +1 -1
  195. package/form/elements/inputs/Input.js +1 -1
  196. package/form/elements/inputs/attachments/Input.js +1 -1
  197. package/geometry/Geometry.js +1 -1
  198. package/geometry/HeightModelInfo.js +1 -1
  199. package/geometry/Mesh.js +1 -1
  200. package/geometry/SpatialReference.js +1 -1
  201. package/geometry/support/MeshComponent.js +1 -1
  202. package/geometry/support/MeshGeoreferencedVertexSpace.js +1 -1
  203. package/geometry/support/MeshLocalVertexSpace.js +1 -1
  204. package/geometry/support/MeshMaterial.js +1 -1
  205. package/geometry/support/MeshTexture.js +1 -1
  206. package/geometry/support/MeshTextureTransform.js +1 -1
  207. package/geometry/support/MeshTransform.js +1 -1
  208. package/geometry/support/MeshVertexAttributes.js +1 -1
  209. package/geometry/support/heightModelInfoUtils.js +1 -1
  210. package/grids/MeasuredGrid.js +1 -1
  211. package/ground/NavigationConstraint.js +1 -1
  212. package/identity/IdentityManagerBase.js +1 -1
  213. package/identity/OAuthInfo.js +1 -1
  214. package/identity/ServerInfo.js +1 -1
  215. package/kernel.js +1 -1
  216. package/layers/BuildingSceneLayer.js +1 -1
  217. package/layers/GaussianSplatLayer.js +5 -0
  218. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  219. package/layers/buildingSublayers/BuildingGroupSublayer.js +1 -1
  220. package/layers/buildingSublayers/utils.js +5 -0
  221. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  222. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  223. package/layers/graphics/sources/MemorySource.js +1 -1
  224. package/layers/knowledgeGraph/IdealEdgeLengthTypeOptions.js +1 -1
  225. package/layers/mixins/OperationalLayer.js +1 -1
  226. package/layers/mixins/TemporalSceneLayer.js +1 -1
  227. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  228. package/layers/orientedImagery/core/CameraOrientationHPR.js +1 -1
  229. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  230. package/layers/orientedImagery/core/CameraOrientationOPK.js +1 -1
  231. package/layers/orientedImagery/core/CameraOrientationYPR.js +1 -1
  232. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
  233. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  234. package/layers/pointCloudFilters/PointCloudFilter.js +1 -1
  235. package/layers/support/AggregateField.js +1 -1
  236. package/layers/support/BuildingFilter.js +1 -1
  237. package/layers/support/BuildingFilterAuthoringInfo.js +1 -1
  238. package/layers/support/BuildingFilterAuthoringInfoBlock.js +1 -1
  239. package/layers/support/BuildingFilterAuthoringInfoType.js +1 -1
  240. package/layers/support/BuildingFilterBlock.js +1 -1
  241. package/layers/support/BuildingFilterMode.js +1 -1
  242. package/layers/support/BuildingSummaryStatistics.js +1 -1
  243. package/layers/support/CodedValue.js +1 -1
  244. package/layers/support/ControlPointsGeoreference.js +1 -1
  245. package/layers/support/DimensionalDefinition.js +1 -1
  246. package/layers/support/DisplayFilter.js +1 -1
  247. package/layers/support/DisplayFilterInfo.js +1 -1
  248. package/layers/support/Domain.js +1 -1
  249. package/layers/support/EditFieldsInfo.js +1 -1
  250. package/layers/support/ExportImageServiceParameters.js +1 -1
  251. package/layers/support/ExpressionInfo.js +1 -1
  252. package/layers/support/FacilityLayerInfo.js +1 -1
  253. package/layers/support/FeatureEffect.js +1 -1
  254. package/layers/support/FeatureFilter.js +1 -1
  255. package/layers/support/FeatureIndex.js +1 -1
  256. package/layers/support/FeatureReduction.js +1 -1
  257. package/layers/support/FeatureReductionCluster.js +1 -1
  258. package/layers/support/FeatureTemplate.js +1 -1
  259. package/layers/support/FeatureType.js +1 -1
  260. package/layers/support/Field.js +1 -1
  261. package/layers/support/GeometryFieldsInfo.js +1 -1
  262. package/layers/support/I3SLayerDefinitions.js +1 -1
  263. package/layers/support/KMLMapImage.js +1 -1
  264. package/layers/support/KMLSublayer.js +1 -1
  265. package/layers/support/LOD.js +1 -1
  266. package/layers/support/LabelClass.js +1 -1
  267. package/layers/support/LabelExpressionInfo.js +1 -1
  268. package/layers/support/LayerContingentValuesCache.js +1 -1
  269. package/layers/support/LayerFloorInfo.js +1 -1
  270. package/layers/support/LayerTimeOptions.js +1 -1
  271. package/layers/support/LevelLayerInfo.js +1 -1
  272. package/layers/support/LocalMediaElementSource.js +1 -1
  273. package/layers/support/MapImage.js +1 -1
  274. package/layers/support/MosaicRule.js +1 -1
  275. package/layers/support/MultidimensionalSubset.js +1 -1
  276. package/layers/support/OrderByInfo.js +1 -1
  277. package/layers/support/ParquetEncodingBase.js +1 -1
  278. package/layers/support/ParquetEncodingLocation.js +1 -1
  279. package/layers/support/ParquetEncodingWkb.js +1 -1
  280. package/layers/support/PixelBlock.js +1 -1
  281. package/layers/support/PlaybackInfo.js +1 -1
  282. package/layers/support/PolygonCollection.js +1 -1
  283. package/layers/support/PurgeOptions.js +1 -1
  284. package/layers/support/RangeInfo.js +1 -1
  285. package/layers/support/RasterBandInfo.js +1 -1
  286. package/layers/support/RasterFunction.js +1 -1
  287. package/layers/support/RasterFunctionInfo.js +1 -1
  288. package/layers/support/RasterFunctionProperties.js +1 -1
  289. package/layers/support/RasterFunctionTemplate.js +1 -1
  290. package/layers/support/RasterFunctionVariable.js +1 -1
  291. package/layers/support/RasterInfo.js +1 -1
  292. package/layers/support/RasterSensorInfo.js +1 -1
  293. package/layers/support/RasterStorageInfo.js +1 -1
  294. package/layers/support/Relationship.js +1 -1
  295. package/layers/support/RouteStopSymbols.js +1 -1
  296. package/layers/support/RouteSymbols.js +1 -1
  297. package/layers/support/SceneFilter.js +1 -1
  298. package/layers/support/SceneModification.js +1 -1
  299. package/layers/support/SceneModifications.js +1 -1
  300. package/layers/support/SiteLayerInfo.js +1 -1
  301. package/layers/support/Subtype.js +1 -1
  302. package/layers/support/TelemetryData.js +1 -1
  303. package/layers/support/TelemetryDisplay.js +1 -1
  304. package/layers/support/TileInfo.js +1 -1
  305. package/layers/support/TileMatrixSet.js +1 -1
  306. package/layers/support/TimeInfo.js +1 -1
  307. package/layers/support/TrackInfo.js +1 -1
  308. package/layers/support/TrackPartInfo.js +1 -1
  309. package/layers/support/VideoFrame.js +1 -1
  310. package/layers/support/VideoTimeExtent.js +1 -1
  311. package/layers/support/WMTSLayerInfo.js +1 -1
  312. package/layers/support/WMTSStyle.js +1 -1
  313. package/layers/support/WMTSSublayer.js +1 -1
  314. package/layers/support/lazyLayerLoader.js +1 -1
  315. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  316. package/layers/support/rasterFunctions/BaseFunctionArguments.js +1 -1
  317. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  318. package/layers/support/rasterTransforms/BaseRasterTransform.js +1 -1
  319. package/layers/support/source/DataLayerSource.js +1 -1
  320. package/layers/support/source/MapLayerSource.js +1 -1
  321. package/layers/support/source/QueryTableDataSource.js +1 -1
  322. package/layers/support/source/RasterDataSource.js +1 -1
  323. package/layers/support/source/TableDataSource.js +1 -1
  324. package/layers/voxel/VoxelColorStop.js +1 -1
  325. package/layers/voxel/VoxelDimension.js +1 -1
  326. package/layers/voxel/VoxelDynamicSection.js +1 -1
  327. package/layers/voxel/VoxelFormat.js +1 -1
  328. package/layers/voxel/VoxelIrregularSpacing.js +1 -1
  329. package/layers/voxel/VoxelIsosurface.js +1 -1
  330. package/layers/voxel/VoxelOpacityStop.js +1 -1
  331. package/layers/voxel/VoxelRangeFilter.js +1 -1
  332. package/layers/voxel/VoxelRegularSpacing.js +1 -1
  333. package/layers/voxel/VoxelSection.js +1 -1
  334. package/layers/voxel/VoxelSimpleShading.js +1 -1
  335. package/layers/voxel/VoxelSlice.js +1 -1
  336. package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
  337. package/layers/voxel/VoxelUniqueValue.js +1 -1
  338. package/layers/voxel/VoxelVariable.js +1 -1
  339. package/layers/voxel/VoxelVariableStyle.js +1 -1
  340. package/layers/voxel/VoxelVolume.js +1 -1
  341. package/layers/voxel/VoxelVolumeIndex.js +1 -1
  342. package/layers/voxel/VoxelVolumeStyle.js +1 -1
  343. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  344. package/linkChart/ChronologicalLayoutSettings.js +1 -1
  345. package/linkChart/LayoutSettings.js +1 -1
  346. package/linkChart/NonspatialDataDisplay.js +1 -1
  347. package/linkChart/OrganicLayoutSettings.js +1 -1
  348. package/networks/CircuitManager.js +1 -1
  349. package/networks/RulesTable.js +1 -1
  350. package/networks/UnitIdentifierManager.js +1 -1
  351. package/networks/support/Terminal.js +1 -1
  352. package/networks/support/TerminalConfiguration.js +1 -1
  353. package/networks/support/TraceConfiguration.js +1 -1
  354. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  355. package/package.json +2 -2
  356. package/popup/ElementExpressionInfo.js +1 -1
  357. package/popup/ExpressionInfo.js +1 -1
  358. package/popup/FieldInfo.js +1 -1
  359. package/popup/LayerOptions.js +1 -1
  360. package/popup/RelatedRecordsInfo.js +1 -1
  361. package/popup/content/Content.js +1 -1
  362. package/popup/content/mixins/MediaInfo.js +1 -1
  363. package/popup/content/support/ChartMediaInfoValue.js +1 -1
  364. package/popup/content/support/ImageMediaInfoValue.js +1 -1
  365. package/popup/support/AttachmentsOrderByInfo.js +1 -1
  366. package/popup/support/FieldInfoFormat.js +1 -1
  367. package/popup/support/RelatedRecordsInfoFieldOrder.js +1 -1
  368. package/popup/support/UtilityNetworkAssociationType.js +1 -1
  369. package/portal/Portal.js +1 -1
  370. package/portal/PortalFolder.js +1 -1
  371. package/portal/PortalGroup.js +1 -1
  372. package/portal/PortalItem.js +1 -1
  373. package/portal/PortalUser.js +1 -1
  374. package/renderers/FlowRenderer.js +1 -1
  375. package/renderers/PointCloudClassBreaksRenderer.js +1 -1
  376. package/renderers/PointCloudRenderer.js +1 -1
  377. package/renderers/PointCloudStretchRenderer.js +1 -1
  378. package/renderers/PointCloudUniqueValueRenderer.js +1 -1
  379. package/renderers/RasterColormapRenderer.js +1 -1
  380. package/renderers/RasterShadedReliefRenderer.js +1 -1
  381. package/renderers/RasterStretchRenderer.js +1 -1
  382. package/renderers/Renderer.js +1 -1
  383. package/renderers/VectorFieldRenderer.js +1 -1
  384. package/renderers/support/AttributeColorInfo.js +1 -1
  385. package/renderers/support/AuthoringInfo.js +1 -1
  386. package/renderers/support/AuthoringInfoClassBreakInfo.js +1 -1
  387. package/renderers/support/AuthoringInfoFieldInfo.js +1 -1
  388. package/renderers/support/AuthoringInfoSizeStop.js +1 -1
  389. package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
  390. package/renderers/support/ClassBreakInfo.js +1 -1
  391. package/renderers/support/ColormapInfo.js +1 -1
  392. package/renderers/support/DotDensityLegendOptions.js +1 -1
  393. package/renderers/support/HeatmapColorStop.js +1 -1
  394. package/renderers/support/HeatmapLegendOptions.js +1 -1
  395. package/renderers/support/OthersCategory.js +1 -1
  396. package/renderers/support/RasterPresetRenderer.js +1 -1
  397. package/renderers/support/RasterSymbolizer.js +1 -1
  398. package/renderers/support/RendererLegendOptions.js +1 -1
  399. package/renderers/support/UniqueValue.js +1 -1
  400. package/renderers/support/UniqueValueClass.js +1 -1
  401. package/renderers/support/UniqueValueGroup.js +1 -1
  402. package/renderers/support/UniqueValueInfo.js +1 -1
  403. package/renderers/support/pointCloud/ColorClassBreakInfo.js +1 -1
  404. package/renderers/support/pointCloud/ColorModulation.js +1 -1
  405. package/renderers/support/pointCloud/ColorUniqueValueInfo.js +1 -1
  406. package/renderers/support/pointCloud/PointSizeAlgorithm.js +1 -1
  407. package/renderers/support/pointCloud/fieldsMap.js +5 -0
  408. package/renderers/visualVariables/VisualVariable.js +1 -1
  409. package/renderers/visualVariables/support/ColorSizeStop.js +1 -1
  410. package/renderers/visualVariables/support/ColorStop.js +1 -1
  411. package/renderers/visualVariables/support/OpacityStop.js +1 -1
  412. package/renderers/visualVariables/support/SizeStop.js +1 -1
  413. package/renderers/visualVariables/support/VisualVariableLegendOptions.js +1 -1
  414. package/rest/featureService/FeatureService.js +1 -1
  415. package/rest/knowledgeGraph/DataModel.js +1 -1
  416. package/rest/knowledgeGraph/FieldIndex.js +1 -1
  417. package/rest/knowledgeGraph/GraphObject.js +1 -1
  418. package/rest/knowledgeGraph/GraphObjectType.js +1 -1
  419. package/rest/knowledgeGraph/GraphProperty.js +1 -1
  420. package/rest/knowledgeGraph/KnowledgeGraph.js +1 -1
  421. package/rest/knowledgeGraph/Path.js +1 -1
  422. package/rest/knowledgeGraph/ProtoFeatureCollection.js +1 -1
  423. package/rest/knowledgeGraph/ServiceDefinition.js +1 -1
  424. package/rest/knowledgeGraph/SourceTypeValueBehavior.js +1 -1
  425. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.js +1 -1
  426. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.js +1 -1
  427. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.js +1 -1
  428. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.js +1 -1
  429. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
  430. package/rest/knowledgeGraph/wasmInterface/WasmQueryWrapperInterfaces.js +1 -1
  431. package/rest/knowledgeGraph/wasmInterface/WasmSerializedLayerData.js +1 -1
  432. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  433. package/rest/knowledgeGraph/wasmInterface/wasmToFeatureFactories.js +1 -1
  434. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  435. package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
  436. package/rest/networks/circuits/support/CreateAlterCircuitParameters.js +1 -1
  437. package/rest/networks/circuits/support/DeleteCircuitsParameters.js +1 -1
  438. package/rest/networks/circuits/support/EditCircuitsResult.js +1 -1
  439. package/rest/networks/circuits/support/ExportCircuitsParameters.js +1 -1
  440. package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
  441. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  442. package/rest/networks/circuits/support/QueryCircuitsResult.js +1 -1
  443. package/rest/networks/circuits/support/VerifyCircuitsParameters.js +1 -1
  444. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  445. package/rest/networks/support/AggregatedGeometry.js +1 -1
  446. package/rest/networks/support/Association.js +1 -1
  447. package/rest/networks/support/AssociationGeometriesResult.js +1 -1
  448. package/rest/networks/support/CircuitPath.js +1 -1
  449. package/rest/networks/support/CircuitPathConnectivityElement.js +1 -1
  450. package/rest/networks/support/CircuitTraceResult.js +1 -1
  451. package/rest/networks/support/FunctionResult.js +1 -1
  452. package/rest/networks/support/NetworkElement.js +1 -1
  453. package/rest/networks/support/QueryAssociationsParameters.js +1 -1
  454. package/rest/networks/support/QueryAssociationsResult.js +1 -1
  455. package/rest/networks/support/QueryNamedTraceConfigurationsParameters.js +1 -1
  456. package/rest/networks/support/QueryNamedTraceConfigurationsResult.js +1 -1
  457. package/rest/networks/support/SynthesizeAssociationGeometriesParameters.js +1 -1
  458. package/rest/networks/support/TraceLocation.js +1 -1
  459. package/rest/networks/support/TraceParameters.js +1 -1
  460. package/rest/networks/support/TraceResult.js +1 -1
  461. package/rest/networks/support/ValidateNetworkTopologyParameters.js +1 -1
  462. package/rest/networks/support/ValidateNetworkTopologyResult.js +1 -1
  463. package/rest/networks/unitIdentifiers/support/EditUnitIdentifiersResult.js +1 -1
  464. package/rest/networks/unitIdentifiers/support/InsertGapParameters.js +1 -1
  465. package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js +1 -1
  466. package/rest/networks/unitIdentifiers/support/ResetParameters.js +1 -1
  467. package/rest/networks/unitIdentifiers/support/ResizeParameters.js +1 -1
  468. package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +1 -1
  469. package/rest/query/support/AttachmentInfo.js +1 -1
  470. package/rest/support/AddressCandidate.js +1 -1
  471. package/rest/support/AddressToLocationsParameters.js +1 -1
  472. package/rest/support/AddressesToLocationsParameters.js +1 -1
  473. package/rest/support/ArealUnit.js +1 -1
  474. package/rest/support/AreasAndLengthsParameters.js +1 -1
  475. package/rest/support/AttachmentQuery.js +1 -1
  476. package/rest/support/AttributeBinsGrouping.js +1 -1
  477. package/rest/support/AttributeBinsQuery.js +1 -1
  478. package/rest/support/BaseImageMeasureParameters.js +1 -1
  479. package/rest/support/BaseImageMeasureResult.js +1 -1
  480. package/rest/support/BinParametersBase.js +1 -1
  481. package/rest/support/BufferParameters.js +1 -1
  482. package/rest/support/CameraInfo.js +1 -1
  483. package/rest/support/ClassBreaksDefinition.js +1 -1
  484. package/rest/support/ClosestFacilityParameters.js +1 -1
  485. package/rest/support/ClosestFacilitySolveResult.js +1 -1
  486. package/rest/support/ColorRamp.js +1 -1
  487. package/rest/support/DataFile.js +1 -1
  488. package/rest/support/DataLayer.js +1 -1
  489. package/rest/support/DateBinTimeInterval.js +1 -1
  490. package/rest/support/DensifyParameters.js +1 -1
  491. package/rest/support/DirectionLine.js +1 -1
  492. package/rest/support/DirectionPoint.js +1 -1
  493. package/rest/support/DirectionsEvent.js +1 -1
  494. package/rest/support/DirectionsString.js +1 -1
  495. package/rest/support/FeatureSet.js +1 -1
  496. package/rest/support/FindImagesParameters.js +1 -1
  497. package/rest/support/FindImagesResult.js +1 -1
  498. package/rest/support/FindParameters.js +1 -1
  499. package/rest/support/FindResult.js +1 -1
  500. package/rest/support/FullTextSearch.js +1 -1
  501. package/rest/support/GPMessage.js +1 -1
  502. package/rest/support/GeneralizeParameters.js +1 -1
  503. package/rest/support/GenerateRendererParameters.js +1 -1
  504. package/rest/support/IdentifyParameters.js +1 -1
  505. package/rest/support/IdentifyResult.js +1 -1
  506. package/rest/support/ImageAngleParameters.js +1 -1
  507. package/rest/support/ImageAngleResult.js +1 -1
  508. package/rest/support/ImageBoundaryParameters.js +1 -1
  509. package/rest/support/ImageBoundaryResult.js +1 -1
  510. package/rest/support/ImageGPSInfo.js +1 -1
  511. package/rest/support/ImageGPSInfoParameters.js +1 -1
  512. package/rest/support/ImageGPSInfoResult.js +1 -1
  513. package/rest/support/ImageHistogramParameters.js +1 -1
  514. package/rest/support/ImageIdentifyParameters.js +1 -1
  515. package/rest/support/ImageIdentifyResult.js +1 -1
  516. package/rest/support/ImageInspectionInfo.js +1 -1
  517. package/rest/support/ImagePixelLocationParameters.js +1 -1
  518. package/rest/support/ImagePixelLocationResult.js +1 -1
  519. package/rest/support/ImageSample.js +1 -1
  520. package/rest/support/ImageSampleParameters.js +1 -1
  521. package/rest/support/ImageSampleResult.js +1 -1
  522. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  523. package/rest/support/ImageToMapParameters.js +1 -1
  524. package/rest/support/ImageUrlParameters.js +1 -1
  525. package/rest/support/ImageUrlResult.js +1 -1
  526. package/rest/support/ImageVolume.js +1 -1
  527. package/rest/support/ImageVolumeParameters.js +1 -1
  528. package/rest/support/ImageVolumeResult.js +1 -1
  529. package/rest/support/JobInfo.js +1 -1
  530. package/rest/support/LegendLayer.js +1 -1
  531. package/rest/support/LengthsParameters.js +1 -1
  532. package/rest/support/LinearUnit.js +1 -1
  533. package/rest/support/LocationToAddressParameters.js +1 -1
  534. package/rest/support/MapToImageParameters.js +1 -1
  535. package/rest/support/MeasureAreaFromImageResult.js +1 -1
  536. package/rest/support/MeasureFromImageParameters.js +1 -1
  537. package/rest/support/MeasureLengthFromImageResult.js +1 -1
  538. package/rest/support/MultipartColorRamp.js +1 -1
  539. package/rest/support/NetworkAttribute.js +1 -1
  540. package/rest/support/NetworkDataset.js +1 -1
  541. package/rest/support/NetworkServiceDescription.js +1 -1
  542. package/rest/support/NetworkUrl.js +1 -1
  543. package/rest/support/OffsetParameters.js +1 -1
  544. package/rest/support/ParameterValue.js +1 -1
  545. package/rest/support/PointBarrier.js +1 -1
  546. package/rest/support/PolygonBarrier.js +1 -1
  547. package/rest/support/PolylineBarrier.js +1 -1
  548. package/rest/support/ProjectParameters.js +1 -1
  549. package/rest/support/QuantizationParameters.js +1 -1
  550. package/rest/support/Query.js +1 -1
  551. package/rest/support/RasterData.js +1 -1
  552. package/rest/support/RelationParameters.js +1 -1
  553. package/rest/support/RelationshipQuery.js +1 -1
  554. package/rest/support/RouteInfo.js +1 -1
  555. package/rest/support/RouteParameters.js +1 -1
  556. package/rest/support/RouteResult.js +1 -1
  557. package/rest/support/RouteSettings.js +1 -1
  558. package/rest/support/RouteSolveResult.js +1 -1
  559. package/rest/support/ServiceAreaParameters.js +1 -1
  560. package/rest/support/ServiceAreaSolveResult.js +1 -1
  561. package/rest/support/StatisticDefinition.js +1 -1
  562. package/rest/support/Stop.js +1 -1
  563. package/rest/support/SuggestLocationsParameters.js +1 -1
  564. package/rest/support/SuggestionCandidate.js +1 -1
  565. package/rest/support/TopFeaturesQuery.js +1 -1
  566. package/rest/support/TopFilter.js +1 -1
  567. package/rest/support/TranslateContent.js +1 -1
  568. package/rest/support/TranslateParameters.js +1 -1
  569. package/rest/support/TranslateResult.js +1 -1
  570. package/rest/support/TravelMode.js +1 -1
  571. package/rest/support/TrimExtendParameters.js +1 -1
  572. package/rest/support/UniqueValueDefinition.js +1 -1
  573. package/rest/support/imageMeasureUtils.js +1 -1
  574. package/rest/versionManagement/gdbVersion/support/AlterVersionParameters.js +1 -1
  575. package/rest/versionManagement/gdbVersion/support/ConflictsParameters.js +1 -1
  576. package/rest/versionManagement/gdbVersion/support/ConflictsResult.js +1 -1
  577. package/rest/versionManagement/gdbVersion/support/DeleteForwardEditsParameters.js +1 -1
  578. package/rest/versionManagement/gdbVersion/support/DifferencesParameters.js +1 -1
  579. package/rest/versionManagement/gdbVersion/support/DifferencesResult.js +1 -1
  580. package/rest/versionManagement/gdbVersion/support/InspectConflictsParameters.js +1 -1
  581. package/rest/versionManagement/gdbVersion/support/PostParameters.js +1 -1
  582. package/rest/versionManagement/gdbVersion/support/PostResult.js +1 -1
  583. package/rest/versionManagement/gdbVersion/support/ReconcileParameters.js +1 -1
  584. package/rest/versionManagement/gdbVersion/support/ReconcileResult.js +1 -1
  585. package/rest/versionManagement/gdbVersion/support/RestoreRowsParameters.js +1 -1
  586. package/rest/versionManagement/gdbVersion/support/RestoreRowsResult.js +1 -1
  587. package/rest/versionManagement/support/CreateVersionParameters.js +1 -1
  588. package/rest/versionManagement/support/DeleteVersionParameters.js +1 -1
  589. package/rest/versionManagement/support/GetVersionInfosParameters.js +1 -1
  590. package/rest/versionManagement/support/GetVersionInfosResult.js +1 -1
  591. package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
  592. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  593. package/support/MapFloorInfo.js +1 -1
  594. package/support/revision.js +1 -1
  595. package/symbols/Font.js +1 -1
  596. package/symbols/LineStyleMarker3D.js +1 -1
  597. package/symbols/LineSymbolMarker.js +1 -1
  598. package/symbols/Symbol.js +1 -1
  599. package/symbols/Symbol3DLayer.js +1 -1
  600. package/symbols/callouts/Callout3D.js +1 -1
  601. package/symbols/callouts/LineCallout3DBorder.js +1 -1
  602. package/symbols/edges/Edges3D.js +1 -1
  603. package/symbols/patterns/LinePattern3D.js +1 -1
  604. package/symbols/patterns/Pattern3D.js +1 -1
  605. package/symbols/support/ElevationInfo.js +1 -1
  606. package/symbols/support/FeatureExpressionInfo.js +1 -1
  607. package/symbols/support/IconSymbol3DLayerResource.js +1 -1
  608. package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
  609. package/symbols/support/Symbol3DEmissive.js +1 -1
  610. package/symbols/support/Symbol3DHalo.js +1 -1
  611. package/symbols/support/Symbol3DIconOutline.js +1 -1
  612. package/symbols/support/Symbol3DMaterial.js +1 -1
  613. package/symbols/support/Symbol3DOutline.js +1 -1
  614. package/symbols/support/Symbol3DTextBackground.js +1 -1
  615. package/symbols/support/Symbol3DVerticalOffset.js +1 -1
  616. package/tables/AttributeTableTemplate.js +1 -1
  617. package/tables/elements/AttributeTableElement.js +1 -1
  618. package/tables/support/FieldOrder.js +1 -1
  619. package/undoredo/support/Services.js +1 -1
  620. package/versionManagement/VersionManagementService.js +1 -1
  621. package/versionManagement/VersioningState.js +1 -1
  622. package/views/2d/AnimationManager.js +1 -1
  623. package/views/2d/ViewState.js +1 -1
  624. package/views/2d/engine/AFeatureContainer.js +1 -1
  625. package/views/2d/engine/Bitmap.js +1 -1
  626. package/views/2d/engine/Stage.js +1 -1
  627. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  628. package/views/2d/engine/flow/styles/Particles.js +1 -1
  629. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  630. package/views/2d/engine/imagery/BrushVectorField.js +1 -1
  631. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  632. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  633. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  634. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  635. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  636. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  637. package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
  638. package/views/2d/engine/webgl/ClippingInfo.js +1 -1
  639. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  640. package/views/2d/engine/webgl/MaterialManager.js +1 -1
  641. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  642. package/views/2d/engine/webgl/Overlay.js +1 -1
  643. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  644. package/views/2d/engine/webgl/Painter.js +1 -1
  645. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  646. package/views/2d/engine/webgl/Utils.js +1 -1
  647. package/views/2d/engine/webgl/VertexStream.js +1 -1
  648. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  649. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  650. package/views/2d/engine/webgl/animations/store/AnimationStore.js +1 -1
  651. package/views/2d/engine/webgl/brushes/BrushClip.js +1 -1
  652. package/views/2d/engine/webgl/brushes/WGLBrushStencil.js +1 -1
  653. package/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo.js +1 -1
  654. package/views/2d/engine/webgl/brushes/WGLBrushVTLBackground.js +1 -1
  655. package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
  656. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  657. package/views/2d/engine/webgl/effects/highlight/HighlightRenderer.js +1 -1
  658. package/views/2d/engine/webgl/effects/post-processing/Bloom.js +1 -1
  659. package/views/2d/engine/webgl/effects/post-processing/Blur.js +1 -1
  660. package/views/2d/engine/webgl/effects/post-processing/Colorize.js +1 -1
  661. package/views/2d/engine/webgl/effects/post-processing/DropShadow.js +1 -1
  662. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  663. package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
  664. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  665. package/views/2d/engine/webgl/shaderGraph/techniques/TestDisplayObject.js +1 -1
  666. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
  667. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
  668. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
  669. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  670. package/views/2d/engine/webgl/shaders/BackgroundPrograms.js +1 -1
  671. package/views/2d/engine/webgl/shaders/BitBlitPrograms.js +1 -1
  672. package/views/2d/engine/webgl/shaders/HighlightPrograms.js +1 -1
  673. package/views/2d/engine/webgl/shaders/MaterialPrograms.js +1 -1
  674. package/views/2d/engine/webgl/shaders/StencilPrograms.js +1 -1
  675. package/views/2d/engine/webgl/shaders/TileInfoPrograms.js +1 -1
  676. package/views/2d/grid/GridView2D.js +1 -1
  677. package/views/2d/layerViewModuleImportUtils.js +1 -1
  678. package/views/2d/layers/BaseDynamicLayerView2D.js +1 -1
  679. package/views/2d/layers/BaseLayerView2D.js +1 -1
  680. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  681. package/views/2d/layers/CatalogDynamicGroupLayerView2D.js +1 -1
  682. package/views/2d/layers/CatalogFootprintLayerView2D.js +1 -1
  683. package/views/2d/layers/CatalogLayerView2D.js +1 -1
  684. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  685. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  686. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  687. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  688. package/views/2d/layers/MediaLayerView2D.js +1 -1
  689. package/views/2d/layers/OGCFeatureLayerView2D.js +1 -1
  690. package/views/2d/layers/StreamLayerView2D.js +1 -1
  691. package/views/2d/layers/TileLayerView2D.js +1 -1
  692. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  693. package/views/2d/layers/WMSLayerView2D.js +1 -1
  694. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  695. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  696. package/views/2d/layers/features/support/TileStore.js +1 -1
  697. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  698. package/views/2d/layers/support/DebugOverlay.js +1 -1
  699. package/views/2d/magnifier/MagnifierView2D.js +1 -1
  700. package/views/3d/FocusAreasView.js +1 -1
  701. package/views/3d/analysis/AnalysisView3D.js +1 -1
  702. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  703. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  704. package/views/3d/environment/CloudsCompositionTechnique.js +1 -1
  705. package/views/3d/environment/CloudsRenderer.js +1 -1
  706. package/views/3d/environment/CloudsTechnique.js +1 -1
  707. package/views/3d/environment/CloudyWeather.js +1 -1
  708. package/views/3d/environment/FogTechnique.js +1 -1
  709. package/views/3d/environment/FoggyWeather.js +1 -1
  710. package/views/3d/environment/LocalAtmosphere.js +1 -1
  711. package/views/3d/environment/MarsAtmosphere.js +1 -1
  712. package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
  713. package/views/3d/environment/Precipitation.js +1 -1
  714. package/views/3d/environment/RainyWeather.js +1 -1
  715. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  716. package/views/3d/environment/SnowyWeather.js +1 -1
  717. package/views/3d/environment/SunLighting.js +1 -1
  718. package/views/3d/environment/SunnyWeather.js +1 -1
  719. package/views/3d/glTF/internal/Resource.js +1 -1
  720. package/views/3d/glTF/loader.js +1 -1
  721. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  722. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  723. package/views/3d/layerViewModuleImportUtils.js +1 -1
  724. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  725. package/views/3d/layers/CatalogDynamicGroupLayerView3D.js +1 -1
  726. package/views/3d/layers/CatalogFootprintLayerView3D.js +1 -1
  727. package/views/3d/layers/CatalogLayerView3D.js +1 -1
  728. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  729. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  730. package/views/3d/layers/GaussianSplatLayerView3D.js +5 -0
  731. package/views/3d/layers/I3SMeshView3D.js +1 -1
  732. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  733. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  734. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  735. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  736. package/views/3d/layers/StreamLayerView3D.js +1 -1
  737. package/views/3d/layers/TileLayerView3D.js +1 -1
  738. package/views/3d/layers/WMSLayerView3D.js +1 -1
  739. package/views/3d/layers/WMTSLayerView3D.js +1 -1
  740. package/views/3d/layers/graphics/GraphicStateTracking.js +1 -1
  741. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  742. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  743. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  744. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  745. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  746. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  747. package/views/3d/layers/graphics/StreamController.js +1 -1
  748. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  749. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  750. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  751. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  752. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  753. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
  754. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  755. package/views/3d/layers/graphics/pipeline/symbolization/ObjectSymbolLayerRenderer.js +1 -1
  756. package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
  757. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  758. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  759. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  760. package/views/3d/layers/support/FeatureTile.js +1 -1
  761. package/views/3d/layers/support/FlowTileTree3DDebugger.js +5 -0
  762. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  763. package/views/3d/state/controllers/AnimationController.js +1 -1
  764. package/views/3d/support/DisplayQualityProfile.js +1 -1
  765. package/views/3d/support/LimitGraphicsMap.js +1 -1
  766. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  767. package/views/3d/support/buffer/glUtil.js +1 -1
  768. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  769. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  770. package/views/3d/terrain/PatchRenderData.js +1 -1
  771. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  772. package/views/3d/terrain/TerrainAttributes.js +1 -1
  773. package/views/3d/terrain/TerrainAttributesCache.js +1 -1
  774. package/views/3d/terrain/TileCompositor.js +1 -1
  775. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  776. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  777. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  778. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  779. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  780. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  781. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  782. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +2 -2
  783. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -2
  784. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +4 -4
  785. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -2
  786. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
  787. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +1 -1
  788. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +4 -4
  789. package/views/3d/webgl-engine/core/shaderModules/glsl.js +1 -1
  790. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  791. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  792. package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
  793. package/views/3d/webgl-engine/effects/bloom/BloomBlurTechnique.js +1 -1
  794. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechnique.js +1 -1
  795. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +3 -3
  796. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  797. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  798. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  799. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  800. package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
  801. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  802. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  803. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  804. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  805. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  806. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  807. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  808. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
  809. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  810. package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
  811. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  812. package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
  813. package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
  814. package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
  815. package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
  816. package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
  817. package/views/3d/webgl-engine/effects/ssao/SSAOTechnique.js +1 -1
  818. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  819. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  820. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  821. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  822. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  823. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  824. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  825. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  826. package/views/3d/webgl-engine/lib/Material.js +1 -1
  827. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  828. package/views/3d/webgl-engine/lib/Program.js +1 -1
  829. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  830. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  831. package/views/3d/webgl-engine/lib/RenderingContextOptions.js +5 -0
  832. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  833. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  834. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  835. package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
  836. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  837. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  838. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  839. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  840. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  841. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  842. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  843. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  844. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  845. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  846. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  847. package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
  848. package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
  849. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  850. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  851. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  852. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  853. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  854. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  855. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  856. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  857. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  858. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  859. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  860. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  861. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  862. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  863. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  864. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  865. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  866. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  867. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  868. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  869. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  870. package/views/3d/webgl-engine/materials/renderers/VaoCache.js +1 -1
  871. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  872. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  873. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +5 -5
  874. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  875. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  876. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  877. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  878. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  879. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  880. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  881. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  882. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +1 -1
  883. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  884. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  885. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  886. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  887. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  888. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  889. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  890. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  891. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  892. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  893. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  894. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +0 -1
  895. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
  896. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  897. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  898. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  899. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  900. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  901. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  902. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  903. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
  904. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  905. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +1 -1
  906. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  907. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  908. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  909. package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
  910. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  911. package/views/3d/webgl.js +1 -1
  912. package/views/SceneView.js +1 -1
  913. package/views/VideoView.js +1 -1
  914. package/views/View.js +1 -1
  915. package/views/View2D.js +1 -1
  916. package/views/ViewAnimation.js +1 -1
  917. package/views/draw/DrawAction.js +1 -1
  918. package/views/draw/support/ConnectedReshapeManager.js +1 -1
  919. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  920. package/views/interactive/snapping/Settings.js +1 -1
  921. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  922. package/views/layers/CatalogDynamicGroupLayerView.d.ts +1 -1
  923. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  924. package/views/layers/CatalogFootprintLayerView.d.ts +1 -1
  925. package/views/layers/CatalogFootprintLayerView.js +1 -1
  926. package/views/layers/CatalogLayerView.d.ts +1 -1
  927. package/views/layers/CatalogLayerView.js +1 -1
  928. package/views/layers/FeatureLayerView.d.ts +1 -1
  929. package/views/layers/FeatureLayerView.js +1 -1
  930. package/views/layers/LayerView.js +1 -1
  931. package/views/layers/OGCFeatureLayerView.d.ts +1 -1
  932. package/views/layers/OGCFeatureLayerView.js +1 -1
  933. package/views/layers/PointCloudLayerView.d.ts +1 -1
  934. package/views/layers/PointCloudLayerView.js +1 -1
  935. package/views/layers/RefreshableLayerView.js +1 -1
  936. package/views/layers/StreamLayerView.d.ts +1 -1
  937. package/views/layers/StreamLayerView.js +1 -1
  938. package/views/layers/WMSLayerView.js +1 -1
  939. package/views/layers/support/ClipArea.js +1 -1
  940. package/views/support/PixelHighlightOptions.js +1 -1
  941. package/views/support/Scheduler.js +1 -1
  942. package/views/support/TileTreeDebugger.js +1 -1
  943. package/views/support/imageReprojection.js +1 -1
  944. package/views/support/screenshotUtils.js +1 -1
  945. package/views/webgl/FramebufferObject.js +1 -1
  946. package/views/webgl/InstanceCounter.js +1 -1
  947. package/views/webgl/Parameters.js +1 -1
  948. package/views/webgl/Program.js +1 -1
  949. package/views/webgl/ProgramCache.js +1 -1
  950. package/views/webgl/ProgramTemplate.js +1 -1
  951. package/views/webgl/RenderingContext.js +1 -1
  952. package/views/webgl/RenderingContextOptions.js +5 -0
  953. package/views/webgl/ShaderBuilder.js +1 -1
  954. package/views/webgl/Texture.js +1 -1
  955. package/views/webgl/TextureDescriptor.js +1 -1
  956. package/views/webgl/Util.js +1 -1
  957. package/views/webgl/VertexArrayObject.js +1 -1
  958. package/views/webgl/VertexAttributeLayouts.js +5 -0
  959. package/views/webgl/VertexAttributeLocations.js +5 -0
  960. package/views/webgl/VertexBuffer.js +5 -0
  961. package/views/webgl/capabilities/Capabilities.js +1 -1
  962. package/views/webgl/enums.js +1 -1
  963. package/views/webgl/heatmapTextureUtils.js +1 -1
  964. package/views/webgl/rasterUtils.js +1 -1
  965. package/views/webgl/testAppleAmdDrawArrays.js +1 -1
  966. package/views/webgl/testFloatBufferBlend.js +1 -1
  967. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  968. package/views/webgl/textureUtils.js +1 -1
  969. package/webdoc/GeotriggersInfo.js +1 -1
  970. package/webdoc/IPSInfo.js +1 -1
  971. package/webdoc/RangeInfo.js +1 -1
  972. package/webdoc/Widgets.js +1 -1
  973. package/webdoc/applicationProperties/Search.js +1 -1
  974. package/webdoc/applicationProperties/SearchLayer.js +1 -1
  975. package/webdoc/applicationProperties/SearchLayerField.js +1 -1
  976. package/webdoc/applicationProperties/SearchTable.js +1 -1
  977. package/webdoc/applicationProperties/SearchTableField.js +1 -1
  978. package/webdoc/applicationProperties/Viewing.js +1 -1
  979. package/webdoc/geotriggersInfo/DeviceLocationFeed.js +1 -1
  980. package/webdoc/geotriggersInfo/ExpressionInfo.js +1 -1
  981. package/webdoc/geotriggersInfo/FeatureFenceParameters.js +1 -1
  982. package/webdoc/geotriggersInfo/FeatureFilter.js +1 -1
  983. package/webdoc/geotriggersInfo/FeatureLayerSource.js +1 -1
  984. package/webdoc/geotriggersInfo/Geotrigger.js +1 -1
  985. package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.js +1 -1
  986. package/webdoc/ips/AppleIPSProperties.js +1 -1
  987. package/webdoc/ips/Configuration.js +1 -1
  988. package/webdoc/ips/GNSSProperties.js +1 -1
  989. package/webdoc/ips/PathSnappingProperties.js +1 -1
  990. package/webdoc/ips/PositioningService.js +1 -1
  991. package/webdoc/ips/SmoothingProperties.js +1 -1
  992. package/webdoc/support/SlideThumbnail.js +1 -1
  993. package/webdoc/widgets/FloorFilter.js +1 -1
  994. package/webdoc/widgets/Range.js +1 -1
  995. package/webdoc/widgets/TimeSlider.js +1 -1
  996. package/webmap/ApplicationProperties.js +1 -1
  997. package/webmap/Bookmark.js +1 -1
  998. package/webmap/background/ColorBackground.js +1 -1
  999. package/webscene/ApplicationProperties.js +1 -1
  1000. package/webscene/Environment.js +1 -1
  1001. package/webscene/InitialViewProperties.js +1 -1
  1002. package/webscene/Presentation.js +1 -1
  1003. package/webscene/Slide.js +1 -1
  1004. package/webscene/SlideLegendInfo.js +1 -1
  1005. package/webscene/SunLighting.js +1 -1
  1006. package/webscene/TransportationNetwork.js +1 -1
  1007. package/webscene/VirtualLighting.js +1 -1
  1008. package/webscene/background/Background.js +1 -1
  1009. package/webscene/support/Description.js +1 -1
  1010. package/webscene/support/FeatureReference.js +1 -1
  1011. package/webscene/support/FeatureReferenceId.js +1 -1
  1012. package/webscene/support/LayerReference.js +1 -1
  1013. package/webscene/support/SlideElements.js +1 -1
  1014. package/webscene/support/SlideEnvironment.js +1 -1
  1015. package/webscene/support/SlideGround.js +1 -1
  1016. package/webscene/support/SlidePopupInfo.js +1 -1
  1017. package/webscene/support/SlideVisibleLayer.js +1 -1
  1018. package/webscene/support/Title.js +1 -1
  1019. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  1020. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  1021. package/widgets/Compass/CompassViewModel.js +1 -1
  1022. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  1023. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  1024. package/widgets/Directions/DirectionsViewModel.js +1 -1
  1025. package/widgets/Directions/support/directionsUtils.js +1 -1
  1026. package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
  1027. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  1028. package/widgets/FeatureForm/Format.js +1 -1
  1029. package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
  1030. package/widgets/FeatureTable/support/TableTemplate.js +1 -1
  1031. package/widgets/Features/FeaturesViewModel.js +1 -1
  1032. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  1033. package/widgets/Home/HomeViewModel.js +1 -1
  1034. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  1035. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  1036. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  1037. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  1038. package/widgets/Print/CustomTemplate.js +1 -1
  1039. package/widgets/Print/PrintViewModel.js +1 -1
  1040. package/widgets/Search/SearchSource.js +1 -1
  1041. package/widgets/Search/SearchViewModel.js +1 -1
  1042. package/widgets/Widget.js +1 -1
  1043. package/widgets/support/GeolocationPositioning.js +1 -1
  1044. package/widgets/support/GoTo.d.ts +1 -1
  1045. package/widgets/support/GoTo.js +1 -1
  1046. package/assets/esri/core/workers/chunks/040a233ce6fbcc061cdb.js +0 -1
  1047. package/assets/esri/core/workers/chunks/04798411698a48438bd3.js +0 -1
  1048. package/assets/esri/core/workers/chunks/053086e0a043b00f1cca.js +0 -1
  1049. package/assets/esri/core/workers/chunks/05d6ccca0cf38c012873.js +0 -1
  1050. package/assets/esri/core/workers/chunks/0801f9dde41ec5f36cca.js +0 -1
  1051. package/assets/esri/core/workers/chunks/08b4a4c9f3d6478df40a.js +0 -1
  1052. package/assets/esri/core/workers/chunks/0906f977d50b1c5d6ed5.js +0 -1
  1053. package/assets/esri/core/workers/chunks/307df66d00ba5f88780d.js +0 -1
  1054. package/assets/esri/core/workers/chunks/47cdd5a6351e0db3b2e9.js +0 -346
  1055. package/assets/esri/core/workers/chunks/50f56b417992eb30243e.js +0 -1
  1056. package/assets/esri/core/workers/chunks/56aafa6f8862629070d8.js +0 -1
  1057. package/assets/esri/core/workers/chunks/5c5678b15b59f9964bf0.js +0 -1
  1058. package/assets/esri/core/workers/chunks/641ca71d7c1a07bde66a.js +0 -1
  1059. package/assets/esri/core/workers/chunks/6b6ab092f578b20c8e56.js +0 -1
  1060. package/assets/esri/core/workers/chunks/72e0fda211d980572292.js +0 -1
  1061. package/assets/esri/core/workers/chunks/761dab8780495286ec4e.js +0 -1
  1062. package/assets/esri/core/workers/chunks/860bd6d6f0c74ca301a4.js +0 -1
  1063. package/assets/esri/core/workers/chunks/8d914ea9b18b32fd62b8.js +0 -1
  1064. package/assets/esri/core/workers/chunks/97a56b058f8472fec1b2.js +0 -1
  1065. package/assets/esri/core/workers/chunks/9a4d0006c118ae5b45c0.js +0 -1
  1066. package/assets/esri/core/workers/chunks/a2bfb7b2f3f909dc5e59.js +0 -1
  1067. package/assets/esri/core/workers/chunks/afb7e346779adefa4b05.js +0 -1
  1068. package/assets/esri/core/workers/chunks/b2f2c1108fb7cbdd1a68.js +0 -1
  1069. package/assets/esri/core/workers/chunks/b3466edccd553ae0a5d0.js +0 -990
  1070. package/assets/esri/core/workers/chunks/b50841f898d4eb420b73.js +0 -1
  1071. package/assets/esri/core/workers/chunks/b810e2f87c9c59ae04b1.js +0 -1
  1072. package/assets/esri/core/workers/chunks/bf60d4da0dff1e14da8e.js +0 -1
  1073. package/assets/esri/core/workers/chunks/c18ac2018aea6ba97eec.js +0 -1
  1074. package/assets/esri/core/workers/chunks/c3d3e55abf01dae271fb.js +0 -1
  1075. package/assets/esri/core/workers/chunks/d54e18e0f30734610f35.js +0 -1
  1076. package/assets/esri/core/workers/chunks/d7ec905d87a19a1061e7.js +0 -1
  1077. package/assets/esri/core/workers/chunks/d9f206e7ac1fad940be7.js +0 -2
  1078. package/assets/esri/core/workers/chunks/debd832b6c2c0b2ea362.js +0 -1
  1079. package/assets/esri/core/workers/chunks/dfa3ad5d750d7b143a06.js +0 -1
  1080. package/assets/esri/core/workers/chunks/e01fa6389bd0b1ae51a5.js +0 -1
  1081. package/assets/esri/core/workers/chunks/e7cbd1b5e4cb32851a5c.js +0 -1
  1082. package/assets/esri/core/workers/chunks/ed1cd90e899dc9c15ee3.js +0 -1
  1083. package/assets/esri/core/workers/chunks/ef3a11f7e047cff6183c.js +0 -1
  1084. package/assets/esri/core/workers/chunks/f79c9b37f2842ed88a9b.js +0 -1
  1085. package/assets/esri/core/workers/chunks/faa0cfee8c1de9b5b78c.js +0 -1
  1086. package/assets/esri/core/workers/chunks/fe6fa1f2c2d54d41645e.js +0 -1
  1087. package/views/2d/engine/webgl/DefaultVertexAttributeLayouts.js +0 -5
  1088. package/views/2d/engine/webgl/shaderGraph/typed/TypedVertexArrayObject.js +0 -5
  1089. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +0 -5
  1090. /package/assets/esri/core/workers/chunks/{d9f206e7ac1fad940be7.js.LICENSE.txt → 3386420c9ae891db5be7.js.LICENSE.txt} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{isSome as e}from"../../core/arrayUtils.js";import s from"../../core/Collection.js";import i from"../../core/Error.js";import{EventedAccessor as o}from"../../core/Evented.js";import{clone as a}from"../../core/lang.js";import{LoadableMixin as r}from"../../core/Loadable.js";import l from"../../core/Promise.js";import n from"../../core/ReactiveMap.js";import{watch as p,initial as m}from"../../core/reactiveUtils.js";import{createScreenPoint as h}from"../../core/screenUtils.js";import{unitType as d,convertUnit as u,getMetersPerUnitForSR as c,inchesPerMeter as f}from"../../core/unitUtils.js";import{property as y}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as T}from"../../core/accessorSupport/decorators/subclass.js";import v from"../../geometry/Extent.js";import w from"../../geometry/SpatialReference.js";import{formatDate as _,convertDateFormatToIntlOptions as I}from"../../intl/date.js";import{getLocaleLanguage as g}from"../../intl/locale.js";import x from"../../portal/Portal.js";import O from"../../portal/PortalQueryParams.js";import{reArcGISOnlineDomain as b}from"../../portal/support/urlUtils.js";import{execute as E,getTaskInfo as P}from"../../rest/print.js";import{formatJsonMap as L}from"../../rest/support/fileFormat.js";import{fromJSON as S}from"../../rest/support/layoutTemplate.js";import U from"../../rest/support/PrintParameters.js";import k from"../../rest/support/PrintTemplate.js";import{getExtent as C}from"../../views/2d/viewpointUtils.js";import{ViewEventPriorities as j}from"../../views/input/InputManager.js";import F from"../../views/overlay/BoxOverlayItem.js";import H from"./CustomTemplate.js";import M from"./FileLink.js";import D from"./TemplateOptions.js";import{fetchLayoutTemplateInfos as A,valueUnitKebabDict as W}from"./utils.js";const R=[30,144,255,255],N=[237,211,23,255],z=[216,48,32,255],V=new Set(["GISProfessionalStdUT","GISProfessionalAdvUT"]),B=/(\/GPServer\/).+/i,G=96,q=s.ofType(H),$=s.ofType(M);function J(t){t.layoutOptions??={},t.layoutOptions.customTextElements??=[];const e="date";if(!t.layoutOptions.customTextElements.find(t=>e in t)){const{customTextElements:e}=t.layoutOptions;let s=_(Date.now(),I("short-date"));"ar"===g()&&(s="‏"+s),e.push({date:s})}}function Q(t,e,s){if(!e)return;!(e.visible===s)&&t.layoutOptions&&(t.layoutOptions.elementOverrides?t.layoutOptions.elementOverrides[e.name]={visible:s}:t.layoutOptions.elementOverrides={[e.name]:{visible:s}})}let K=class extends(r(l.EsriPromiseMixin(o))){constructor(t){super(t),this._serviceTemplateCustomTextElements=null,this._templateIdToCustomTemplate=new n,this._isFreeHand=!1,this._freeHandWidth=0,this._freehandHeight=0,this._asyncPrintTaskUrl=null,this._layoutInfoTaskUrl=null,this._portalLayoutInfoTaskUrl=null,this._customLayoutOptions=null,this._exportedFileNameMap={},this._layoutTemplateInfosCache=new Map,this._tasksInfoCache=new Map,this.allowedFormats="all",this.allowedLayouts="all",this.browseTemplates=new q,this.defaultTemplates=new q,this.error=null,this.exportedLinks=new $,this.extraParameters=null,this.includeDefaultTemplates=!0,this.outSpatialReference=null,this.portal=x.getDefault(),this.portalTemplateIds=[],this.printServiceTemplates=new q,this.defaultTemplate=null,this.showPrintAreaEnabled=!1,this.printServiceUrl=null,this.printTimeout=12e4,this.saveExportEnabled=!1,this.templatesInfo=null,this.updateDelay=1e3,this.view=null,this.templateCustomTextElements=null,this.templateOptions=new D}initialize(){this.addHandles([p(()=>[this.showPrintAreaEnabled,this.view],()=>{this.showPrintAreaEnabled?this._enablePrintPreview():(this.removeHandles("overlay-handler"),this.view?.overlay?.removeItem(this._getOverlayItem()))}),p(()=>[this.templateOptions.layout,this.templateOptions.layoutItem],()=>{this.loaded&&this._processTemplateOptions()}),p(()=>[this.allowedFormats,this.allowedLayouts],()=>{this.loaded&&this._loadTemplateInfos()}),p(()=>this.exportedLinks,()=>{for(const{name:t,extension:e}of this.exportedLinks)t&&e&&this._updateExportedFileNameMap(`${t}${e}`)},m)])}destroy(){this.removeHandles("overlay-handler"),this.view&&(this._overlayItem&&(this.view.overlay?.removeItem(this._overlayItem),this._overlayItem.destroy(),this._overlayItem=null),this.view=null)}get effectivePrintServiceUrl(){return this.printServiceUrl??null}get effectiveTemplateCustomTextElements(){if(!this._serviceTemplateCustomTextElements)return{};const t=a(this._serviceTemplateCustomTextElements);return this.templateCustomTextElements&&Object.keys(this.templateCustomTextElements).forEach(e=>{const s=t[e];if(s){const t=this.templateCustomTextElements?.[e];s.forEach(e=>{const[s]=Object.entries(e)[0];t?.forEach(t=>{const[i,o]=Object.entries(t)[0];s===i&&(e[s]=o)})})}}),Object.freeze(t)}get state(){return"loading"===this.loadStatus?"initializing":"failed"===this.loadStatus||this.error?"error":"loaded"===this.loadStatus&&this.view?.ready?"ready":"disabled"}async load(t){return this.addResolvingPromise(this._loadResources(t).catch(t=>this.error=t)),this}async print(t){const{view:e,extraParameters:s,updateDelay:o,outSpatialReference:a}=this;if(!e)throw new i("print:view-required","view is not set");J(t);const r=this._getOverlayItem(),l=t.scalePreserved||!this.showPrintAreaEnabled?void 0:C(new v,e.viewpoint,"map-only"===t.layout?[t.exportOptions.width,t.exportOptions.height]:[r.boxWidth,r.boxHeight]),n=new U({view:e,template:t,extent:l,extraParameters:s,updateDelay:o,outSpatialReference:a});try{const e=!!t.layoutItem?.id&&(this.portalTemplateIds.includes(t.layoutItem.id)||this.browseTemplates.some(e=>e.layoutItem?.id===t.layoutItem?.id));return await E(e&&this._asyncPrintTaskUrl?this._asyncPrintTaskUrl:this.effectivePrintServiceUrl,n,{timeout:this.printTimeout})}catch(p){throw new i("print:export-error","An error occurred while exporting the web map.",{error:p})}}toPrintTemplate({attributionEnabled:t,author:e,copyright:s,customTextElements:o,dpi:a,forceFeatureAttributes:r,format:l,height:n,id:p,includeTables:m,layout:h,layoutItem:d,legendEnabled:u,northArrowEnabled:c,scale:f,scaleBarEnabled:y,scaleEnabled:T,title:v,width:w}){if(!h&&!d)throw new i("print:layout-required","layout is not set");const _=new k({attributionVisible:t,forceFeatureAttributes:r,format:l,includeTables:m,layout:h,layoutItem:d,layoutOptions:{authorText:e||"",copyrightText:s||"",customTextElements:o,titleText:v||""},outScale:f??0,scalePreserved:T});if(w&&(_.exportOptions.width=w),n&&(_.exportOptions.height=n),a&&(_.exportOptions.dpi=a),_.layoutOptions){u||(_.layoutOptions.legendLayers=[]);const t=this.getLayoutTemplateById(p)?.mapSurroundInfoOptions;if(t){const e=t.northArrow;for(const t of e)Q(_,t,c);const s=t.scaleBar;for(const t of s)Q(_,t,y);const i=t.legend;for(const t of i)Q(_,t,u)}}return _}getLayoutTemplateById(t){return t?this._templateIdToCustomTemplate.get(t):null}async addPortalTemplate(t){if(!this.portal||!t?.id)return;try{t.loaded||await t.load()}catch{return void this.applyTemplate(this.defaultTemplate)}const e=new H({type:"browse-template",layoutInfoTaskUrl:this._portalLayoutInfoTaskUrl,label:t.title,layoutItem:t});this._templateIdToCustomTemplate.set(e.id,e),this.browseTemplates.add(e)}removePortalTemplate(t){t.layoutItem&&this.templateOptions.id===t.layoutItem.id&&(this.defaultTemplate?this.applyTemplate(this.defaultTemplate):this.templateOptions.reset()),this.browseTemplates.remove(t),this._templateIdToCustomTemplate.delete(t.id)}async applyTemplate(t){if(t&&t===this.getLayoutTemplateById(this.templateOptions.id))return;if(this.templateOptions.reset(),!t)return;if("map-only"===t)return void(this.templateOptions.layout="map-only");!t.layout||!this.templatesInfo||this.templatesInfo.layout.choiceList.includes(t.layout)||(this.defaultTemplate?t=this.defaultTemplate:this.templateOptions.reset());const e=t.layout||t.layoutItem?.id,s=e?this.templateCustomTextElements?.[e]:void 0;if(await this.templateOptions.applyTemplate(t,{customTextElements:s,customLayoutOptions:this._customLayoutOptions}),e&&this._serviceTemplateCustomTextElements&&!this._serviceTemplateCustomTextElements[e]&&t.layoutTemplateInfo?.layoutOptions?.customTextElements){const s=a(this._serviceTemplateCustomTextElements);s[e]=t.layoutTemplateInfo.layoutOptions.customTextElements,this._serviceTemplateCustomTextElements=Object.freeze(s)}}createExportedFileLink(t){const e=this.toPrintTemplate(this.templateOptions).format.toLowerCase(),s=e.includes("png")?"png":e,i=t+s;return this._updateExportedFileNameMap(i),new M({name:t,extension:s,count:this._exportedFileNameMap[i]})}export(t){const e=this.createExportedFileLink(t);this.exportedLinks.add(e);const s=this.print(this.toPrintTemplate(this.templateOptions)).then(t=>e.set({url:t?.url,state:"ready"})).catch(t=>e.set({error:t,state:"error"}));return this.emit("submit",{link:e,saveExportEnabled:this.saveExportEnabled}),s.then(t=>this.emit("complete",{link:t,saveExportEnabled:this.saveExportEnabled})),{link:e,promise:s}}async _loadResources(t){this.destroyed||(await this._loadUrls(t),await this._loadTemplateInfos(t),this._updateOverLayItem())}async _loadTemplateInfos(t){const e=[...this.defaultTemplates,...this.printServiceTemplates];for(const{id:o}of e)this._templateIdToCustomTemplate.delete(o);this.defaultTemplates.removeAll(),this.printServiceTemplates.removeAll();const[s,i]=await Promise.all([this._getLayoutToLayoutTemplateInfos(t),this._getPrintServiceTemplatesInfo(t)]);await this._loadAllTemplates(s,i,t),this._processPrintServiceTemplatesInfo(i),await this._processTemplateOptions()}_updateExportedFileNameMap(t){void 0!==this._exportedFileNameMap[t]?this._exportedFileNameMap[t]++:this._exportedFileNameMap[t]=0}async _processTemplateOptions(){const{layout:t,layoutItem:e}=this.templateOptions;if("map-only"!==t)if(this._customLayoutOptions={legend:this.templateOptions.legendEnabled,northArrow:this.templateOptions.northArrowEnabled,scaleBar:this.templateOptions.scaleBarEnabled},e?.id){try{e.loaded||await e.load()}catch{return void this.applyTemplate(this.defaultTemplate)}let t=this._templateIdToCustomTemplate.get(e.id);t||(t=new H({label:e.title,layoutItem:e,layoutInfoTaskUrl:this._portalLayoutInfoTaskUrl}),this._templateIdToCustomTemplate.set(t.id,t)),await this.applyTemplate(t)}else if(t){const t=this.defaultTemplates.find(t=>t.layout===this.templateOptions.layout)??this.printServiceTemplates.find(t=>t.layout===this.templateOptions.layout);await this.applyTemplate(t??this.defaultTemplate)}}async _loadPortal(t){try{await this.portal.load(t)}catch(e){throw new i("print:could-not-load-portal","Cannot load print resource information from portal",{error:e,url:this.effectivePrintServiceUrl})}}async _loadUrls(t){if(this.printServiceUrl)this._set("effectivePrintServiceUrl",this.printServiceUrl),this._layoutInfoTaskUrl=await this._getLayoutInfoTaskUrl(this.effectivePrintServiceUrl,t);else{await this._loadPortal(t);const{printTask:e,asyncPrintTask:s,layoutInfoTask:i}=this.portal?.helperServices??{};this._set("effectivePrintServiceUrl",e?.url),this._asyncPrintTaskUrl=s?.url,this._layoutInfoTaskUrl=await this._getLayoutInfoTaskUrl(this.effectivePrintServiceUrl,t),i?.url&&this.effectivePrintServiceUrl!==i.url?this._portalLayoutInfoTaskUrl=await this._getLayoutInfoTaskUrl(i.url,t):this._portalLayoutInfoTaskUrl=this._layoutInfoTaskUrl}const e=this.effectivePrintServiceUrl?.toLowerCase().split("/");if(!e?.includes("gpserver"))throw new i("print:invalid-print-service-url","Can't fetch print templates information from provided URL",{url:this.effectivePrintServiceUrl})}async _getLayoutInfoTaskUrl(t,e){if(!t)return null;const s=await P(t,"GetLayoutTemplatesInfo",e);return s?t.replace(B,`$1${encodeURI(s.displayName)}`):null}_getPortalDefaultTemplates(t,e){return this.portal?.helperServices?.printTask?.templates?.filter(t=>"map_only"!==t.layout.toLowerCase()&&(!e||e.includes(S(t.layout))))?.map(e=>{const s=H.fromJSON(e);if(s.type="default-template",s.layoutInfoTaskUrl=this._layoutInfoTaskUrl,s.layout){const e=t.get(s.layout);e&&s.setLayoutTemplateInfo(e)}return s})??[]}async _getPortalCustomTemplates(t){if(this.printServiceUrl||!this.portal)return[];const{layoutGroupQuery:e,user:s}=this.portal,i=b.test(this.portal.url),o=s?.userLicenseTypeId,a=o&&V.has(o);if(!e||i&&!a)return[];const r=new O({query:e,disableExtraQuery:!0}),l=await this.portal.queryGroups(r,t);if(!l.total)return[];const n=l.results[0],p=new O({num:100,query:"type:Layout",sortField:n.sortField,sortOrder:n.sortOrder??void 0}),m=(await n.queryItems(p,t)).results;if(!m.length)return[];return m.map(t=>(this.portalTemplateIds.push(t.id),new H({type:"default-template",label:t.title,layoutItem:t,layoutInfoTaskUrl:this._portalLayoutInfoTaskUrl})))}async _loadAllTemplates(t,e,s){let i=!1;const o=e?.layout?.choiceList;if(this.includeDefaultTemplates&&this.portal&&!this.printServiceUrl){const e=this._getPortalDefaultTemplates(t,o);i=!!e.length,this.defaultTemplates.addMany(e);const a=await this._getPortalCustomTemplates(s);this.defaultTemplates.addMany(a);for(const t of this.defaultTemplates)this._templateIdToCustomTemplate.set(t.id,t)}i||t.forEach((t,e)=>{if(!o||o.includes(e)){const s=new H({type:"print-service-template",layout:e,layoutInfoTaskUrl:this._layoutInfoTaskUrl});s.setLayoutTemplateInfo(t),this.printServiceTemplates.add(s),this._templateIdToCustomTemplate.set(s.id,s)}})}_processPrintServiceTemplatesInfo(t){this._set("templatesInfo",t);const e=t?.layout?.defaultValue;if(e&&"map-only"!==e){const t=this.defaultTemplates.find(t=>t.layout===e)??this.printServiceTemplates.find(t=>t.layout===e)??this.defaultTemplates.at(0)??this.printServiceTemplates.at(0);this._set("defaultTemplate",t)}}async _getLayoutToLayoutTemplateInfos(t){const e=this._layoutInfoTaskUrl,s=e?this._layoutTemplateInfosCache.get(e):void 0,i=s??await A(e,void 0,t);s||this._layoutTemplateInfosCache.set(e,i);const o=new Map,a={};for(const r of i){const t=S(r.layoutTemplate);o.set(t,r),a[t]=r.layoutOptions.customTextElements}return this._serviceTemplateCustomTextElements=Object.freeze(a),o}async _getPrintServiceTemplatesInfo(t){const e=this.effectivePrintServiceUrl?this._tasksInfoCache.get(this.effectivePrintServiceUrl):void 0,s=e??await P(this.effectivePrintServiceUrl,"ExportWebMap",t);if(!s)throw new i("print:unavailable-service-info","Can't fetch templates info from service");e||this._tasksInfoCache.set(this.effectivePrintServiceUrl,s);const{parameters:o}=s,a=o.find(({name:t})=>"Format"===t),r=o.find(({name:t})=>"Layout_Template"===t);return{format:this._getFormat(a),layout:this._getLayout(r)}}_getFormat(t){const s="all"===this.allowedFormats?t.choiceList:t.choiceList.filter(t=>"string"!=typeof this.allowedFormats&&this.allowedFormats.some(e=>new RegExp(`\\b${e}\\b`,"i").test(t))),i=(s.length?s:t.choiceList).map(t=>L.fromJSON(t)).filter(e),o=L.fromJSON(t.defaultValue),a=i.some(t=>new RegExp(`\\b${o}\\b`,"i").test(t))?o:i[0];return{choiceList:i,defaultValue:a}}_getLayout(t){const s=t.choiceList.filter(t=>"map_only"!==t.toLowerCase()),i="all"===this.allowedLayouts?s:s.filter(t=>this.allowedLayouts.includes(S(t))),o=(i.length?i:s).map(S).filter(e),a=S(t.defaultValue),r=o.includes(a)?a:o.find(t=>/(?=.*letter)(?=.*landscape)/i.test(t))??o.find(t=>/(?=.*a4)(?=.*landscape)/i.test(t))??o[0];return{choiceList:o,defaultValue:r}}_getOverlayItem(){return this._overlayItem||(this._overlayItem=new F({strokeDash:[5],strokeWidth:2,strokeColor:[30,144,255,255]})),this._overlayItem}_enablePrintPreview(){if(!this.view?.overlay)return;const t=this.templateOptions,e=this._getOverlayItem();this.addHandles([p(()=>[t.width,t.height,t.scaleEnabled,t.scale,t.layout,t.layoutItem,t.id,t.state,t.dpi,this.view?.scale,this.view?.size,this.view?.state.paddedViewState.size,this.view?.state.padding,this.loaded],()=>this._updateOverLayItem(),m),this.view?.on("drag",["Shift"],t=>this._handleDrag(t),j.WIDGET),this.view?.on("key-down",["Escape"],()=>this._resetDrag(),j.WIDGET)],"overlay-handler"),this.view.overlay.addItem(e)}_updateOverLayItem(){if(!this.view)return;const t=this.templateOptions,e=this._getOverlayItem(),s=t.layoutItem?.id??t.layout,i=this.view,o=i.spatialReference,[a,r]=i.state.paddedViewState.size,l=i.state.padding;let n=0,p=0;if("map-only"===s)null!=t.width&&null!=t.height&&(n=t.width,p=t.height);else if(s){const e=t.id?this._templateIdToCustomTemplate.get(t.id):null,{webMapFrameSize:s,pageUnits:i}=e?.layoutTemplateInfo??{};let l=!1;if(s&&i)if(this._isFreeHand){const t=s[0]/s[1];n=this._freeHandWidth,p=this._freehandHeight,n>p?p=n/t:n=p*t}else{const t=W.fromJSON(i.toLowerCase()),e=o.unit;d(t)===d(e)?(n=u(s[0],t,e),p=u(s[1],t,e)):(l=!0,n=s[0],p=s[1])}if(!this._isFreeHand)if(t.scaleEnabled&&t.scale){const e=l?Math.min(a/n,r/p):c(o)*f*t.dpi;n*=e,p*=e}else if(0===n||0===p)n=a,p=r;else{const t=(a-.1*a)/n,e=(r-.1*r)/p,s=Math.min(t,e);n*=s,p*=s}}const{scaleEnabled:m,scale:h}=t,y=m&&h?h/this.view.scale:1,T=m&&h?G/t.dpi:1;if(e.boxWidth=n*y*T||a,e.boxHeight=p*y*T||r,l&&(e.padding=l),e.backgroundWidth=a??0,e.backgroundHeight=r??0,"loading"===this.loadStatus)e.strokeColor=N;else if("loaded"===this.loadStatus)switch(this.templateOptions.state){case"pending":e.strokeColor=N;break;case"ready":e.strokeColor=R;break;case"error":e.strokeColor=z}}_resetDrag(){this._isFreeHand=!1,this._updateOverLayItem()}_handleDrag(t){switch(t.action){case"start":this._start();break;case"update":this._update(t);break;case"end":this._end()}t.stopPropagation()}_start(){this._isFreeHand=!0}_update(t){const e=this._getOverlayItem(),{x:s,y:i}=t,{x:o,y:a}=t.origin;s>o?(e.x=o,e.boxWidth=s-o):(e.x=s,e.boxWidth=o-s),i>a?(e.y=a,e.boxHeight=i-a):(e.y=i,e.boxHeight=a-i)}_end(){const t=this._getOverlayItem();if(!this.view||null==t.x||null==t.y)return;const e=this.view,s=e.toMap(h(t.x+.5*t.boxWidth,t.y+.5*t.boxHeight));t.x=null,t.y=null,e.goTo({center:s}),this._freeHandWidth=t.boxWidth,this._freehandHeight=t.boxHeight,"map-only"===this.templateOptions.layout&&(this.templateOptions.width=this._freeHandWidth,this.templateOptions.height=this._freehandHeight),this.templateOptions.scale=this.view.scale,this._updateOverLayItem()}};t([y()],K.prototype,"_serviceTemplateCustomTextElements",void 0),t([y()],K.prototype,"_templateIdToCustomTemplate",void 0),t([y()],K.prototype,"allowedFormats",void 0),t([y()],K.prototype,"allowedLayouts",void 0),t([y({type:q})],K.prototype,"browseTemplates",void 0),t([y({type:q})],K.prototype,"defaultTemplates",void 0),t([y()],K.prototype,"error",void 0),t([y({type:$})],K.prototype,"exportedLinks",void 0),t([y()],K.prototype,"extraParameters",void 0),t([y()],K.prototype,"includeDefaultTemplates",void 0),t([y({readOnly:!0})],K.prototype,"effectivePrintServiceUrl",null),t([y()],K.prototype,"effectiveTemplateCustomTextElements",null),t([y({type:w})],K.prototype,"outSpatialReference",void 0),t([y({type:x})],K.prototype,"portal",void 0),t([y()],K.prototype,"portalTemplateIds",void 0),t([y({type:q})],K.prototype,"printServiceTemplates",void 0),t([y({readOnly:!0})],K.prototype,"defaultTemplate",void 0),t([y()],K.prototype,"showPrintAreaEnabled",void 0),t([y()],K.prototype,"printServiceUrl",void 0),t([y()],K.prototype,"printTimeout",void 0),t([y()],K.prototype,"saveExportEnabled",void 0),t([y({readOnly:!0})],K.prototype,"state",null),t([y({readOnly:!0})],K.prototype,"templatesInfo",void 0),t([y()],K.prototype,"updateDelay",void 0),t([y()],K.prototype,"view",void 0),t([y()],K.prototype,"templateCustomTextElements",void 0),t([y({type:D})],K.prototype,"templateOptions",void 0),K=t([T("esri.widgets.Print.PrintViewModel")],K);const X=K;export{X as default};
5
+ import{__decorate as t}from"tslib";import{isSome as e}from"../../core/arrayUtils.js";import s from"../../core/Collection.js";import i from"../../core/Error.js";import{EventedAccessor as o}from"../../core/Evented.js";import{clone as a}from"../../core/lang.js";import{LoadableMixin as r}from"../../core/Loadable.js";import{EsriPromiseMixin as l}from"../../core/Promise.js";import n from"../../core/ReactiveMap.js";import{watch as p,initial as m}from"../../core/reactiveUtils.js";import{createScreenPoint as h}from"../../core/screenUtils.js";import{unitType as d,convertUnit as u,getMetersPerUnitForSR as c,inchesPerMeter as f}from"../../core/unitUtils.js";import{property as y}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as T}from"../../core/accessorSupport/decorators/subclass.js";import v from"../../geometry/Extent.js";import w from"../../geometry/SpatialReference.js";import{formatDate as _,convertDateFormatToIntlOptions as I}from"../../intl/date.js";import{getLocaleLanguage as g}from"../../intl/locale.js";import x from"../../portal/Portal.js";import O from"../../portal/PortalQueryParams.js";import{reArcGISOnlineDomain as b}from"../../portal/support/urlUtils.js";import{execute as E,getTaskInfo as P}from"../../rest/print.js";import{formatJsonMap as L}from"../../rest/support/fileFormat.js";import{fromJSON as S}from"../../rest/support/layoutTemplate.js";import U from"../../rest/support/PrintParameters.js";import k from"../../rest/support/PrintTemplate.js";import{getExtent as C}from"../../views/2d/viewpointUtils.js";import{ViewEventPriorities as j}from"../../views/input/InputManager.js";import F from"../../views/overlay/BoxOverlayItem.js";import H from"./CustomTemplate.js";import M from"./FileLink.js";import D from"./TemplateOptions.js";import{fetchLayoutTemplateInfos as A,valueUnitKebabDict as W}from"./utils.js";const R=[30,144,255,255],N=[237,211,23,255],z=[216,48,32,255],V=new Set(["GISProfessionalStdUT","GISProfessionalAdvUT"]),B=/(\/GPServer\/).+/i,G=96,q=s.ofType(H),$=s.ofType(M);function J(t){t.layoutOptions??={},t.layoutOptions.customTextElements??=[];const e="date";if(!t.layoutOptions.customTextElements.find(t=>e in t)){const{customTextElements:e}=t.layoutOptions;let s=_(Date.now(),I("short-date"));"ar"===g()&&(s="‏"+s),e.push({date:s})}}function Q(t,e,s){if(!e)return;!(e.visible===s)&&t.layoutOptions&&(t.layoutOptions.elementOverrides?t.layoutOptions.elementOverrides[e.name]={visible:s}:t.layoutOptions.elementOverrides={[e.name]:{visible:s}})}let K=class extends(r(l(o))){constructor(t){super(t),this._serviceTemplateCustomTextElements=null,this._templateIdToCustomTemplate=new n,this._isFreeHand=!1,this._freeHandWidth=0,this._freehandHeight=0,this._asyncPrintTaskUrl=null,this._layoutInfoTaskUrl=null,this._portalLayoutInfoTaskUrl=null,this._customLayoutOptions=null,this._exportedFileNameMap={},this._layoutTemplateInfosCache=new Map,this._tasksInfoCache=new Map,this.allowedFormats="all",this.allowedLayouts="all",this.browseTemplates=new q,this.defaultTemplates=new q,this.error=null,this.exportedLinks=new $,this.extraParameters=null,this.includeDefaultTemplates=!0,this.outSpatialReference=null,this.portal=x.getDefault(),this.portalTemplateIds=[],this.printServiceTemplates=new q,this.defaultTemplate=null,this.showPrintAreaEnabled=!1,this.printServiceUrl=null,this.printTimeout=12e4,this.saveExportEnabled=!1,this.templatesInfo=null,this.updateDelay=1e3,this.view=null,this.templateCustomTextElements=null,this.templateOptions=new D}initialize(){this.addHandles([p(()=>[this.showPrintAreaEnabled,this.view],()=>{this.showPrintAreaEnabled?this._enablePrintPreview():(this.removeHandles("overlay-handler"),this.view?.overlay?.removeItem(this._getOverlayItem()))}),p(()=>[this.templateOptions.layout,this.templateOptions.layoutItem],()=>{this.loaded&&this._processTemplateOptions()}),p(()=>[this.allowedFormats,this.allowedLayouts],()=>{this.loaded&&this._loadTemplateInfos()}),p(()=>this.exportedLinks,()=>{for(const{name:t,extension:e}of this.exportedLinks)t&&e&&this._updateExportedFileNameMap(`${t}${e}`)},m)])}destroy(){this.removeHandles("overlay-handler"),this.view&&(this._overlayItem&&(this.view.overlay?.removeItem(this._overlayItem),this._overlayItem.destroy(),this._overlayItem=null),this.view=null)}get effectivePrintServiceUrl(){return this.printServiceUrl??null}get effectiveTemplateCustomTextElements(){if(!this._serviceTemplateCustomTextElements)return{};const t=a(this._serviceTemplateCustomTextElements);return this.templateCustomTextElements&&Object.keys(this.templateCustomTextElements).forEach(e=>{const s=t[e];if(s){const t=this.templateCustomTextElements?.[e];s.forEach(e=>{const[s]=Object.entries(e)[0];t?.forEach(t=>{const[i,o]=Object.entries(t)[0];s===i&&(e[s]=o)})})}}),Object.freeze(t)}get state(){return"loading"===this.loadStatus?"initializing":"failed"===this.loadStatus||this.error?"error":"loaded"===this.loadStatus&&this.view?.ready?"ready":"disabled"}async load(t){return this.addResolvingPromise(this._loadResources(t).catch(t=>this.error=t)),this}async print(t){const{view:e,extraParameters:s,updateDelay:o,outSpatialReference:a}=this;if(!e)throw new i("print:view-required","view is not set");J(t);const r=this._getOverlayItem(),l=t.scalePreserved||!this.showPrintAreaEnabled?void 0:C(new v,e.viewpoint,"map-only"===t.layout?[t.exportOptions.width,t.exportOptions.height]:[r.boxWidth,r.boxHeight]),n=new U({view:e,template:t,extent:l,extraParameters:s,updateDelay:o,outSpatialReference:a});try{const e=!!t.layoutItem?.id&&(this.portalTemplateIds.includes(t.layoutItem.id)||this.browseTemplates.some(e=>e.layoutItem?.id===t.layoutItem?.id));return await E(e&&this._asyncPrintTaskUrl?this._asyncPrintTaskUrl:this.effectivePrintServiceUrl,n,{timeout:this.printTimeout})}catch(p){throw new i("print:export-error","An error occurred while exporting the web map.",{error:p})}}toPrintTemplate({attributionEnabled:t,author:e,copyright:s,customTextElements:o,dpi:a,forceFeatureAttributes:r,format:l,height:n,id:p,includeTables:m,layout:h,layoutItem:d,legendEnabled:u,northArrowEnabled:c,scale:f,scaleBarEnabled:y,scaleEnabled:T,title:v,width:w}){if(!h&&!d)throw new i("print:layout-required","layout is not set");const _=new k({attributionVisible:t,forceFeatureAttributes:r,format:l,includeTables:m,layout:h,layoutItem:d,layoutOptions:{authorText:e||"",copyrightText:s||"",customTextElements:o,titleText:v||""},outScale:f??0,scalePreserved:T});if(w&&(_.exportOptions.width=w),n&&(_.exportOptions.height=n),a&&(_.exportOptions.dpi=a),_.layoutOptions){u||(_.layoutOptions.legendLayers=[]);const t=this.getLayoutTemplateById(p)?.mapSurroundInfoOptions;if(t){const e=t.northArrow;for(const t of e)Q(_,t,c);const s=t.scaleBar;for(const t of s)Q(_,t,y);const i=t.legend;for(const t of i)Q(_,t,u)}}return _}getLayoutTemplateById(t){return t?this._templateIdToCustomTemplate.get(t):null}async addPortalTemplate(t){if(!this.portal||!t?.id)return;try{t.loaded||await t.load()}catch{return void this.applyTemplate(this.defaultTemplate)}const e=new H({type:"browse-template",layoutInfoTaskUrl:this._portalLayoutInfoTaskUrl,label:t.title,layoutItem:t});this._templateIdToCustomTemplate.set(e.id,e),this.browseTemplates.add(e)}removePortalTemplate(t){t.layoutItem&&this.templateOptions.id===t.layoutItem.id&&(this.defaultTemplate?this.applyTemplate(this.defaultTemplate):this.templateOptions.reset()),this.browseTemplates.remove(t),this._templateIdToCustomTemplate.delete(t.id)}async applyTemplate(t){if(t&&t===this.getLayoutTemplateById(this.templateOptions.id))return;if(this.templateOptions.reset(),!t)return;if("map-only"===t)return void(this.templateOptions.layout="map-only");!t.layout||!this.templatesInfo||this.templatesInfo.layout.choiceList.includes(t.layout)||(this.defaultTemplate?t=this.defaultTemplate:this.templateOptions.reset());const e=t.layout||t.layoutItem?.id,s=e?this.templateCustomTextElements?.[e]:void 0;if(await this.templateOptions.applyTemplate(t,{customTextElements:s,customLayoutOptions:this._customLayoutOptions}),e&&this._serviceTemplateCustomTextElements&&!this._serviceTemplateCustomTextElements[e]&&t.layoutTemplateInfo?.layoutOptions?.customTextElements){const s=a(this._serviceTemplateCustomTextElements);s[e]=t.layoutTemplateInfo.layoutOptions.customTextElements,this._serviceTemplateCustomTextElements=Object.freeze(s)}}createExportedFileLink(t){const e=this.toPrintTemplate(this.templateOptions).format.toLowerCase(),s=e.includes("png")?"png":e,i=t+s;return this._updateExportedFileNameMap(i),new M({name:t,extension:s,count:this._exportedFileNameMap[i]})}export(t){const e=this.createExportedFileLink(t);this.exportedLinks.add(e);const s=this.print(this.toPrintTemplate(this.templateOptions)).then(t=>e.set({url:t?.url,state:"ready"})).catch(t=>e.set({error:t,state:"error"}));return this.emit("submit",{link:e,saveExportEnabled:this.saveExportEnabled}),s.then(t=>this.emit("complete",{link:t,saveExportEnabled:this.saveExportEnabled})),{link:e,promise:s}}async _loadResources(t){this.destroyed||(await this._loadUrls(t),await this._loadTemplateInfos(t),this._updateOverLayItem())}async _loadTemplateInfos(t){const e=[...this.defaultTemplates,...this.printServiceTemplates];for(const{id:o}of e)this._templateIdToCustomTemplate.delete(o);this.defaultTemplates.removeAll(),this.printServiceTemplates.removeAll();const[s,i]=await Promise.all([this._getLayoutToLayoutTemplateInfos(t),this._getPrintServiceTemplatesInfo(t)]);await this._loadAllTemplates(s,i,t),this._processPrintServiceTemplatesInfo(i),await this._processTemplateOptions()}_updateExportedFileNameMap(t){void 0!==this._exportedFileNameMap[t]?this._exportedFileNameMap[t]++:this._exportedFileNameMap[t]=0}async _processTemplateOptions(){const{layout:t,layoutItem:e}=this.templateOptions;if("map-only"!==t)if(this._customLayoutOptions={legend:this.templateOptions.legendEnabled,northArrow:this.templateOptions.northArrowEnabled,scaleBar:this.templateOptions.scaleBarEnabled},e?.id){try{e.loaded||await e.load()}catch{return void this.applyTemplate(this.defaultTemplate)}let t=this._templateIdToCustomTemplate.get(e.id);t||(t=new H({label:e.title,layoutItem:e,layoutInfoTaskUrl:this._portalLayoutInfoTaskUrl}),this._templateIdToCustomTemplate.set(t.id,t)),await this.applyTemplate(t)}else if(t){const t=this.defaultTemplates.find(t=>t.layout===this.templateOptions.layout)??this.printServiceTemplates.find(t=>t.layout===this.templateOptions.layout);await this.applyTemplate(t??this.defaultTemplate)}}async _loadPortal(t){try{await this.portal.load(t)}catch(e){throw new i("print:could-not-load-portal","Cannot load print resource information from portal",{error:e,url:this.effectivePrintServiceUrl})}}async _loadUrls(t){if(this.printServiceUrl)this._set("effectivePrintServiceUrl",this.printServiceUrl),this._layoutInfoTaskUrl=await this._getLayoutInfoTaskUrl(this.effectivePrintServiceUrl,t);else{await this._loadPortal(t);const{printTask:e,asyncPrintTask:s,layoutInfoTask:i}=this.portal?.helperServices??{};this._set("effectivePrintServiceUrl",e?.url),this._asyncPrintTaskUrl=s?.url,this._layoutInfoTaskUrl=await this._getLayoutInfoTaskUrl(this.effectivePrintServiceUrl,t),i?.url&&this.effectivePrintServiceUrl!==i.url?this._portalLayoutInfoTaskUrl=await this._getLayoutInfoTaskUrl(i.url,t):this._portalLayoutInfoTaskUrl=this._layoutInfoTaskUrl}const e=this.effectivePrintServiceUrl?.toLowerCase().split("/");if(!e?.includes("gpserver"))throw new i("print:invalid-print-service-url","Can't fetch print templates information from provided URL",{url:this.effectivePrintServiceUrl})}async _getLayoutInfoTaskUrl(t,e){if(!t)return null;const s=await P(t,"GetLayoutTemplatesInfo",e);return s?t.replace(B,`$1${encodeURI(s.displayName)}`):null}_getPortalDefaultTemplates(t,e){return this.portal?.helperServices?.printTask?.templates?.filter(t=>"map_only"!==t.layout.toLowerCase()&&(!e||e.includes(S(t.layout))))?.map(e=>{const s=H.fromJSON(e);if(s.type="default-template",s.layoutInfoTaskUrl=this._layoutInfoTaskUrl,s.layout){const e=t.get(s.layout);e&&s.setLayoutTemplateInfo(e)}return s})??[]}async _getPortalCustomTemplates(t){if(this.printServiceUrl||!this.portal)return[];const{layoutGroupQuery:e,user:s}=this.portal,i=b.test(this.portal.url),o=s?.userLicenseTypeId,a=o&&V.has(o);if(!e||i&&!a)return[];const r=new O({query:e,disableExtraQuery:!0}),l=await this.portal.queryGroups(r,t);if(!l.total)return[];const n=l.results[0],p=new O({num:100,query:"type:Layout",sortField:n.sortField,sortOrder:n.sortOrder??void 0}),m=(await n.queryItems(p,t)).results;if(!m.length)return[];return m.map(t=>(this.portalTemplateIds.push(t.id),new H({type:"default-template",label:t.title,layoutItem:t,layoutInfoTaskUrl:this._portalLayoutInfoTaskUrl})))}async _loadAllTemplates(t,e,s){let i=!1;const o=e?.layout?.choiceList;if(this.includeDefaultTemplates&&this.portal&&!this.printServiceUrl){const e=this._getPortalDefaultTemplates(t,o);i=!!e.length,this.defaultTemplates.addMany(e);const a=await this._getPortalCustomTemplates(s);this.defaultTemplates.addMany(a);for(const t of this.defaultTemplates)this._templateIdToCustomTemplate.set(t.id,t)}i||t.forEach((t,e)=>{if(!o||o.includes(e)){const s=new H({type:"print-service-template",layout:e,layoutInfoTaskUrl:this._layoutInfoTaskUrl});s.setLayoutTemplateInfo(t),this.printServiceTemplates.add(s),this._templateIdToCustomTemplate.set(s.id,s)}})}_processPrintServiceTemplatesInfo(t){this._set("templatesInfo",t);const e=t?.layout?.defaultValue;if(e&&"map-only"!==e){const t=this.defaultTemplates.find(t=>t.layout===e)??this.printServiceTemplates.find(t=>t.layout===e)??this.defaultTemplates.at(0)??this.printServiceTemplates.at(0);this._set("defaultTemplate",t)}}async _getLayoutToLayoutTemplateInfos(t){const e=this._layoutInfoTaskUrl,s=e?this._layoutTemplateInfosCache.get(e):void 0,i=s??await A(e,void 0,t);s||this._layoutTemplateInfosCache.set(e,i);const o=new Map,a={};for(const r of i){const t=S(r.layoutTemplate);o.set(t,r),a[t]=r.layoutOptions.customTextElements}return this._serviceTemplateCustomTextElements=Object.freeze(a),o}async _getPrintServiceTemplatesInfo(t){const e=this.effectivePrintServiceUrl?this._tasksInfoCache.get(this.effectivePrintServiceUrl):void 0,s=e??await P(this.effectivePrintServiceUrl,"ExportWebMap",t);if(!s)throw new i("print:unavailable-service-info","Can't fetch templates info from service");e||this._tasksInfoCache.set(this.effectivePrintServiceUrl,s);const{parameters:o}=s,a=o.find(({name:t})=>"Format"===t),r=o.find(({name:t})=>"Layout_Template"===t);return{format:this._getFormat(a),layout:this._getLayout(r)}}_getFormat(t){const s="all"===this.allowedFormats?t.choiceList:t.choiceList.filter(t=>"string"!=typeof this.allowedFormats&&this.allowedFormats.some(e=>new RegExp(`\\b${e}\\b`,"i").test(t))),i=(s.length?s:t.choiceList).map(t=>L.fromJSON(t)).filter(e),o=L.fromJSON(t.defaultValue),a=i.some(t=>new RegExp(`\\b${o}\\b`,"i").test(t))?o:i[0];return{choiceList:i,defaultValue:a}}_getLayout(t){const s=t.choiceList.filter(t=>"map_only"!==t.toLowerCase()),i="all"===this.allowedLayouts?s:s.filter(t=>this.allowedLayouts.includes(S(t))),o=(i.length?i:s).map(S).filter(e),a=S(t.defaultValue),r=o.includes(a)?a:o.find(t=>/(?=.*letter)(?=.*landscape)/i.test(t))??o.find(t=>/(?=.*a4)(?=.*landscape)/i.test(t))??o[0];return{choiceList:o,defaultValue:r}}_getOverlayItem(){return this._overlayItem||(this._overlayItem=new F({strokeDash:[5],strokeWidth:2,strokeColor:[30,144,255,255]})),this._overlayItem}_enablePrintPreview(){if(!this.view?.overlay)return;const t=this.templateOptions,e=this._getOverlayItem();this.addHandles([p(()=>[t.width,t.height,t.scaleEnabled,t.scale,t.layout,t.layoutItem,t.id,t.state,t.dpi,this.view?.scale,this.view?.size,this.view?.state.paddedViewState.size,this.view?.state.padding,this.loaded],()=>this._updateOverLayItem(),m),this.view?.on("drag",["Shift"],t=>this._handleDrag(t),j.WIDGET),this.view?.on("key-down",["Escape"],()=>this._resetDrag(),j.WIDGET)],"overlay-handler"),this.view.overlay.addItem(e)}_updateOverLayItem(){if(!this.view)return;const t=this.templateOptions,e=this._getOverlayItem(),s=t.layoutItem?.id??t.layout,i=this.view,o=i.spatialReference,[a,r]=i.state.paddedViewState.size,l=i.state.padding;let n=0,p=0;if("map-only"===s)null!=t.width&&null!=t.height&&(n=t.width,p=t.height);else if(s){const e=t.id?this._templateIdToCustomTemplate.get(t.id):null,{webMapFrameSize:s,pageUnits:i}=e?.layoutTemplateInfo??{};let l=!1;if(s&&i)if(this._isFreeHand){const t=s[0]/s[1];n=this._freeHandWidth,p=this._freehandHeight,n>p?p=n/t:n=p*t}else{const t=W.fromJSON(i.toLowerCase()),e=o.unit;d(t)===d(e)?(n=u(s[0],t,e),p=u(s[1],t,e)):(l=!0,n=s[0],p=s[1])}if(!this._isFreeHand)if(t.scaleEnabled&&t.scale){const e=l?Math.min(a/n,r/p):c(o)*f*t.dpi;n*=e,p*=e}else if(0===n||0===p)n=a,p=r;else{const t=(a-.1*a)/n,e=(r-.1*r)/p,s=Math.min(t,e);n*=s,p*=s}}const{scaleEnabled:m,scale:h}=t,y=m&&h?h/this.view.scale:1,T=m&&h?G/t.dpi:1;if(e.boxWidth=n*y*T||a,e.boxHeight=p*y*T||r,l&&(e.padding=l),e.backgroundWidth=a??0,e.backgroundHeight=r??0,"loading"===this.loadStatus)e.strokeColor=N;else if("loaded"===this.loadStatus)switch(this.templateOptions.state){case"pending":e.strokeColor=N;break;case"ready":e.strokeColor=R;break;case"error":e.strokeColor=z}}_resetDrag(){this._isFreeHand=!1,this._updateOverLayItem()}_handleDrag(t){switch(t.action){case"start":this._start();break;case"update":this._update(t);break;case"end":this._end()}t.stopPropagation()}_start(){this._isFreeHand=!0}_update(t){const e=this._getOverlayItem(),{x:s,y:i}=t,{x:o,y:a}=t.origin;s>o?(e.x=o,e.boxWidth=s-o):(e.x=s,e.boxWidth=o-s),i>a?(e.y=a,e.boxHeight=i-a):(e.y=i,e.boxHeight=a-i)}_end(){const t=this._getOverlayItem();if(!this.view||null==t.x||null==t.y)return;const e=this.view,s=e.toMap(h(t.x+.5*t.boxWidth,t.y+.5*t.boxHeight));t.x=null,t.y=null,e.goTo({center:s}),this._freeHandWidth=t.boxWidth,this._freehandHeight=t.boxHeight,"map-only"===this.templateOptions.layout&&(this.templateOptions.width=this._freeHandWidth,this.templateOptions.height=this._freehandHeight),this.templateOptions.scale=this.view.scale,this._updateOverLayItem()}};t([y()],K.prototype,"_serviceTemplateCustomTextElements",void 0),t([y()],K.prototype,"_templateIdToCustomTemplate",void 0),t([y()],K.prototype,"allowedFormats",void 0),t([y()],K.prototype,"allowedLayouts",void 0),t([y({type:q})],K.prototype,"browseTemplates",void 0),t([y({type:q})],K.prototype,"defaultTemplates",void 0),t([y()],K.prototype,"error",void 0),t([y({type:$})],K.prototype,"exportedLinks",void 0),t([y()],K.prototype,"extraParameters",void 0),t([y()],K.prototype,"includeDefaultTemplates",void 0),t([y({readOnly:!0})],K.prototype,"effectivePrintServiceUrl",null),t([y()],K.prototype,"effectiveTemplateCustomTextElements",null),t([y({type:w})],K.prototype,"outSpatialReference",void 0),t([y({type:x})],K.prototype,"portal",void 0),t([y()],K.prototype,"portalTemplateIds",void 0),t([y({type:q})],K.prototype,"printServiceTemplates",void 0),t([y({readOnly:!0})],K.prototype,"defaultTemplate",void 0),t([y()],K.prototype,"showPrintAreaEnabled",void 0),t([y()],K.prototype,"printServiceUrl",void 0),t([y()],K.prototype,"printTimeout",void 0),t([y()],K.prototype,"saveExportEnabled",void 0),t([y({readOnly:!0})],K.prototype,"state",null),t([y({readOnly:!0})],K.prototype,"templatesInfo",void 0),t([y()],K.prototype,"updateDelay",void 0),t([y()],K.prototype,"view",void 0),t([y()],K.prototype,"templateCustomTextElements",void 0),t([y({type:D})],K.prototype,"templateOptions",void 0),K=t([T("esri.widgets.Print.PrintViewModel")],K);const X=K;export{X as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import t from"../../PopupTemplate.js";import{IdentifiableMixin as e}from"../../core/Identifiable.js";import s from"../../core/JSONSupport.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";let r=class extends(e(s)){constructor(o){super(o),this.autoNavigate=null,this.filter=null,this.getResults=null,this.getSuggestions=null,this.maxResults=null,this.maxSuggestions=null,this.minSuggestCharacters=null,this.outFields=null,this.placeholder="",this.popupEnabled=null,this.popupTemplate=null,this.prefix="",this.resultGraphicEnabled=null,this.resultSymbol=null,this.suffix="",this.suggestionsEnabled=null,this.withinViewEnabled=!1,this.zoomScale=null}};o([p()],r.prototype,"autoNavigate",void 0),o([p()],r.prototype,"filter",void 0),o([p()],r.prototype,"getResults",void 0),o([p()],r.prototype,"getSuggestions",void 0),o([p()],r.prototype,"maxResults",void 0),o([p()],r.prototype,"maxSuggestions",void 0),o([p()],r.prototype,"minSuggestCharacters",void 0),o([p()],r.prototype,"outFields",void 0),o([p()],r.prototype,"placeholder",void 0),o([p()],r.prototype,"popupEnabled",void 0),o([p({type:t})],r.prototype,"popupTemplate",void 0),o([p()],r.prototype,"prefix",void 0),o([p()],r.prototype,"resultGraphicEnabled",void 0),o([p()],r.prototype,"resultSymbol",void 0),o([p()],r.prototype,"suffix",void 0),o([p()],r.prototype,"suggestionsEnabled",void 0),o([p()],r.prototype,"withinViewEnabled",void 0),o([p()],r.prototype,"zoomScale",void 0),r=o([i("esri.widgets.Search.SearchSource")],r);const l=r;export{l as default};
5
+ import{__decorate as o}from"tslib";import t from"../../PopupTemplate.js";import{IdentifiableMixin as e}from"../../core/Identifiable.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";let r=class extends(e(s)){constructor(o){super(o),this.autoNavigate=null,this.filter=null,this.getResults=null,this.getSuggestions=null,this.maxResults=null,this.maxSuggestions=null,this.minSuggestCharacters=null,this.outFields=null,this.placeholder="",this.popupEnabled=null,this.popupTemplate=null,this.prefix="",this.resultGraphicEnabled=null,this.resultSymbol=null,this.suffix="",this.suggestionsEnabled=null,this.withinViewEnabled=!1,this.zoomScale=null}};o([p()],r.prototype,"autoNavigate",void 0),o([p()],r.prototype,"filter",void 0),o([p()],r.prototype,"getResults",void 0),o([p()],r.prototype,"getSuggestions",void 0),o([p()],r.prototype,"maxResults",void 0),o([p()],r.prototype,"maxSuggestions",void 0),o([p()],r.prototype,"minSuggestCharacters",void 0),o([p()],r.prototype,"outFields",void 0),o([p()],r.prototype,"placeholder",void 0),o([p()],r.prototype,"popupEnabled",void 0),o([p({type:t})],r.prototype,"popupTemplate",void 0),o([p()],r.prototype,"prefix",void 0),o([p()],r.prototype,"resultGraphicEnabled",void 0),o([p()],r.prototype,"resultSymbol",void 0),o([p()],r.prototype,"suffix",void 0),o([p()],r.prototype,"suggestionsEnabled",void 0),o([p()],r.prototype,"withinViewEnabled",void 0),o([p()],r.prototype,"zoomScale",void 0),r=o([i("esri.widgets.Search.SearchSource")],r);const l=r;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{getAssetUrl as t}from"../../assets.js";import r from"../../Graphic.js";import s from"../../PopupTemplate.js";import{isSome as o}from"../../core/arrayUtils.js";import i from"../../core/Collection.js";import l from"../../core/Error.js";import{EventedAccessor as a}from"../../core/Evented.js";import n from"../../core/Logger.js";import{mappedFind as u}from"../../core/maybe.js";import{eachAlways as c,after as h}from"../../core/promiseUtils.js";import{watch as p,initial as g,whenOnce as d}from"../../core/reactiveUtils.js";import{property as m}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as y}from"../../core/accessorSupport/decorators/subclass.js";import f from"../../geometry/Point.js";import S from"../../geometry/SpatialReference.js";import{getPointFromGeometry as _,getPointWithElevation as v}from"../../geometry/support/geometryUtils.js";import{onLocaleChange as w}from"../../intl/locale.js";import{fetchMessageBundle as b}from"../../intl/messages.js";import x from"../../portal/Portal.js";import{isApiKeyApplicable as L}from"../../support/apiKeyUtils.js";import I from"../../symbols/PictureMarkerSymbol.js";import T from"../../symbols/SimpleFillSymbol.js";import R from"../../symbols/SimpleLineSymbol.js";import E from"../../symbols/TextSymbol.js";import{highlightsSupported as F}from"../../views/support/layerViewUtils.js";import P from"./LayerSearchSource.js";import j from"./LocatorSearchSource.js";import C from"./SearchSource.js";import{isArcGISWorldGeocoder as G,meteredArcGISLocatorUrl as O,isProxiedArcGISWorldGeocoder as A,isMeteredArcGISWorldGeocoder as N}from"./support/locatorUtils.js";import{supported as D,getCurrentPosition as M,positionToPoint as V}from"../support/geolocationUtils.js";import J from"../support/GoTo.js";function U(e,t){return e.hasOwnProperty(t)&&null!=e[t]&&""!==e[t]}const k=()=>b("esri/widgets/Search/t9n/Search"),H="highlight",B=i.ofType({key:e=>e.layer?"layer":"locator",base:C,typeMap:{layer:P,locator:j}}),Q=S.WGS84,Z="esri/images/search/search-symbol-32.png",q=/<[\s\S]*?>/g,z=-1;let K=class extends(J(a)){constructor(e){super(e),this._gotoController=null,this._searching=null,this._updatingPromise=null,this._createdFeatureLayers=[],this.autoNavigate=!0,this.autoSelect=!0,this.defaultPopupTemplate=null,this.defaultSources=new B,this.defaultSymbols={point:new I({url:t(Z),size:24,width:24,height:24}),polyline:new R({color:[130,130,130,1],width:2}),polygon:new T({color:[235,235,235,.4],outline:{color:[130,130,130,1],width:2}})},this.includeDefaultSources=!0,this.maxInputLength=128,this.maxResults=6,this.maxSuggestions=6,this.messages=null,this.minSuggestCharacters=3,this.popupEnabled=!0,this.popupTemplate=null,this.portal=x.getDefault(),this.resultCount=null,this.resultGraphicEnabled=!0,this.resultGraphic=null,this.results=null,this.selectedSuggestion=null,this.searchAllEnabled=!0,this.selectedResult=null,this.sources=new B,this.suggestionDelay=350,this.suggestionCount=null,this.suggestions=null,this.suggestionsEnabled=!0,this.view=null}initialize(){const e=async()=>{const e=await k();this.messages=e,this.defaultPopupTemplate=new s({title:e.searchResult,content:"{Match_addr}"})};e(),this.addHandles([p(()=>[this.includeDefaultSources,this.view,this.portal],()=>this._update(),g),w(e)])}destroy(){this._destroyFeatureLayers(),this._abortGoTo(),this.clearGraphics()}static{this.ALL_INDEX=z}get activeSource(){return this.allSources.at(this.activeSourceIndex)??null}get activeSourceIndex(){return 1===this.allSources.length||!this.searchAllEnabled?0:z}set activeSourceIndex(e){this._overrideIfSome("activeSourceIndex",e)}get allPlaceholder(){return this.messages?.allPlaceholder}set allPlaceholder(e){this._overrideIfSome("allPlaceholder",e)}get allSources(){const{sources:e,defaultSources:t,includeDefaultSources:r}=this,s="function"==typeof r?r.call(null,{sources:e,defaultSources:t}):r?t.concat(e):e,o=this._get("allSources")||new B;return o.removeAll(),o.addMany(s.filter(Boolean)),o}get locationEnabled(){return this._get("locationEnabled")||D()}set locationEnabled(e){if(void 0===e)return void this._clearOverride("locationEnabled");const t=D();if(e&&!t){const e=new l("locationEnabled:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});n.getLogger(this).error(e)}this._override("locationEnabled",!!e&&t)}get placeholder(){const{allSources:e,activeSourceIndex:t,allPlaceholder:r}=this;if(t===z)return r??"";const s=e.at(t);return s?.placeholder??""}set searchTerm(e){this._set("searchTerm",e||""),this.clearGraphics(),this.selectedSuggestion&&this.selectedSuggestion.text!==e&&this._set("selectedSuggestion",null),""===e&&this._clear()}get searchTerm(){return this._get("searchTerm")||""}get state(){return this._searching?"searching":this.updating?"loading":0===this.allSources.length?"disabled":"ready"}get updating(){return null!=this._updatingPromise}clear(){this.searchTerm=""}clearGraphics(){this._removeHighlight(),this._closePopup();const{view:e,resultGraphic:t}=this;e&&t&&e.graphics.remove(t),this._set("resultGraphic",null)}search(e,t){this.emit("search-start"),this.clearGraphics();const r=this._createSuggestionForSearch(e),s=(async()=>{try{await this.when();const e=await this._getResultsFromSources(r,t);if(t?.signal?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:r.text??"",numResults:0,numErrors:0,errors:[],results:[]};this._formatResponse(s,e,r);const o=this._getFirstResult(s.results),i=r.location&&o?o.name:r.text,l=i?.replace(q,"");return this._set("searchTerm",l),(r.key&&"number"==typeof r.sourceIndex||r.location)&&this._set("selectedSuggestion",r),this._set("results",s.results),this._set("resultCount",s.results.reduce((e,t)=>e+(t.results?.length??0),0)),this.emit("search-complete",s),await this._selectFirstResult(o),s}finally{this._clearSearching()}})();return this._searching=s,s}async searchNearby(e){if(!this.locationEnabled){const e=new l("searchNearby:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});throw n.getLogger(this).error(e),e}const t=(async()=>{try{const t=await M(),r=await V({position:t,view:this.view},e);return await this.search(r,e)}finally{this._clearSearching()}})();return this._searching=t,t}async select(e){if(this.clearGraphics(),!e){const t=new l("select:missing-parameter","Cannot select without a searchResult.",{searchResult:e});throw n.getLogger(this).error(t),t}const{view:t}=this,s=U(e,"sourceIndex")?e.sourceIndex:this._getSourceIndexOfResult(e),o=null!=s?this.allSources.at(s):null;if(!o){const e=new l("select:missing-source","Cannot select without a source.",{source:o});throw n.getLogger(this).error(e),e}const i=o instanceof P?this._getLayerSourcePopupTemplate(o):o.popupTemplate,a=o.resultSymbol||this._getDefaultSymbol(e),u=U(o,"resultGraphicEnabled")?o.resultGraphicEnabled:this.resultGraphicEnabled,h=U(o,"autoNavigate")?o.autoNavigate:this.autoNavigate,p=U(o,"popupEnabled")?o.popupEnabled:this.popupEnabled,g=p?i||this.popupTemplate||this.defaultPopupTemplate:null,{feature:d}=e;if(!d){const e=new l("select:missing-feature","Cannot select without a feature.",{feature:d});throw n.getLogger(this).error(e),e}const{attributes:m,geometry:y,layer:f,sourceLayer:S}=d,w=y?_(y):null,b={layerViewQuery:this._getLayerView(d),elevationQuery:t&&null!=w?v(w,t):Promise.resolve(w)},x=await c(b),L=x.layerViewQuery.value,I=x.elevationQuery.value;a instanceof E&&(a.text=e.name);const T=t&&h?e.target||e.extent:null,R=null!=T?this._goToSearchResult(T):Promise.resolve();await R;const j=L?d:new r({geometry:y,symbol:a,attributes:m,layer:f,sourceLayer:S,popupTemplate:g}),C=t?.popup,G=C&&p&&j.getEffectivePopupTemplate(C.defaultPopupTemplateEnabled);return G&&await t.openPopup({features:[j],location:I}),L&&F(L)&&!G&&this._highlightFeature({graphic:j,layerView:L}),!L&&u&&t&&t.graphics.push(j),this._setResultFloor(e),this._set("selectedResult",e),this._set("resultGraphic",j),this.emit("select-result",{result:e,source:o,sourceIndex:s}),e}async suggest(e,t,r){const s=e||this.searchTerm;this.emit("suggest-start",{searchTerm:s}),await this._suggestTimer(t,r);const o=await this._suggestImmediate(s,r);return this._set("suggestions",o?.results),this._set("suggestionCount",o?.results.reduce((e,t)=>e+(t.results?.length??0),0)??null),this.emit("suggest-complete",o),o}async when(){await d(()=>!this.updating)}async _update(){const{portal:e,view:t}=this;if(this.includeDefaultSources){const r=this._updatingPromise=c([e?.load(),t?.when()]);if(this.destroyed)return;if(await r,r!==this._updatingPromise)return}await d(()=>this.messages),this.destroyed||this._updateDefaultSources(),this._updatingPromise=null}_clearSearching(){this._searching=null}_convertHelperServices(){const e=this.portal?.helperServices?.geocode;if(!e)return[];return e.map(e=>{if(!1===e.placefinding)return;const t=G(e.url)&&L(e.url)?{url:O}:null,r=j.fromJSON({...e,...t}),s=r.url;if(G(s)||A(s)||N(s)){const e=r.outFields??["Addr_type","Match_addr","StAddr","City"],t=(r.placeholder||this.messages?.placeholder)??"",s="number"==typeof r.defaultZoomScale?r.defaultZoomScale:2500;r.singleLineFieldName="SingleLine",r.outFields=e,r.placeholder=t,r.defaultZoomScale=s}return r.singleLineFieldName?r:void 0}).filter(o)}_destroyFeatureLayers(){this._createdFeatureLayers.forEach(e=>e?.destroy()),this._createdFeatureLayers=[]}_getLayerSources(e,t){const r=this.view?.map;return e.map(e=>{const s=r.findLayerById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=P.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then(e=>{i.layer=e}),i}).filter(o).toArray()}_getTableSources(e,t){const r=this.view?.map;return e.map(e=>{if(!e.id)return;const s=r.findTableById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=P.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then(e=>{i.layer=e}),i}).filter(o).toArray()}_convertApplicationProperties(){const e=this.view?.map,t=e?.applicationProperties?.viewing?.search;if(!t)return[];const{enabled:r,hintText:s,layers:o,tables:i}=t;if(!r)return[];return[...this._getLayerSources(o,s),...this._getTableSources(i,s)]}async _getSubLayer(e,t){if(await e.load(),!e.allSublayers)throw new Error;const r=e.allSublayers.find(e=>e.id===t.subLayer);if(!r)throw new Error;const s=await(r.createFeatureLayer?.());if(!s)throw new Error;return this._createdFeatureLayers.push(s),s}async _getBuildingSubLayer(e,t){await e.load();const r=e.allSublayers.find(e=>e.id===t.subLayer);if("building-component"!==r?.type)throw new Error;if(await r.load(),null==r.associatedLayer)throw new Error;return await r.associatedLayer.load(),r}async _getLayer(e,t){if("feature"===e.type||"scene"===e.type||"csv"===e.type||"geojson"===e.type||"ogc-feature"===e.type)return e;if("map-image"===e.type)try{return await this._getSubLayer(e,t)}catch(r){const t=new l("search:create-featurelayer","Could not create a FeatureLayer from the MapImageLayer",{layer:e});return n.getLogger(this).error(t),null}return"building-scene"===e.type?this._getBuildingSubLayer(e,t):null}_getLayerJSON(e){return"function"==typeof e.toJSON?e.toJSON():e}_updateDefaultSources(){const{defaultSources:e,includeDefaultSources:t}=this;this._destroyFeatureLayers(),e.removeAll(),t&&e.addMany([...this._convertApplicationProperties(),...this._convertHelperServices()])}_abortGoTo(){this._gotoController&&this._gotoController.abort(),this._gotoController=null}_clear(){this._abortGoTo(),this._set("resultCount",null),this._set("results",null),this._set("suggestions",null),this._set("suggestionCount",null),this._set("selectedResult",null),this._set("selectedSuggestion",null),this.emit("search-clear")}_closePopup(){const e=this.view?.popup,{resultGraphic:t}=this;if(!e||!t)return;const r="selectedFeature"in e,s=r?e.selectedFeature:null;r&&(s&&s===t)&&e.close()}_suggestTimer(e,t){const r=null!=e?e:this.suggestionDelay;return h(r,null,t?.signal)}_createLocationForSearch(e){return e instanceof r&&e.geometry?_(e.geometry):e instanceof f?e:Array.isArray(e)&&2===e.length?new f({longitude:e[0],latitude:e[1]}):null}_createSuggestionForSearch(e){if(e&&U(e,"key")&&U(e,"text")&&U(e,"sourceIndex"))return e;const t=this._createLocationForSearch(e),r="string"==typeof e?e:this.searchTerm,{selectedSuggestion:s,selectedResult:o}=this,i=!e&&s&&o,l=i&&s.key===o.key&&s.sourceIndex===o.sourceIndex,a=i&&s.location;return l||a?s:{location:t,text:t?"":r,sourceIndex:null,key:null}}_getFirstResult(e){return u(e,({results:e})=>e?.[0])??null}async _selectFirstResult(e){return this.autoSelect&&e?this.select(e):null}async _suggestImmediate(e,t){await this.when();const r=await this._getSuggestionsFromSources(e,t);if(t?.signal?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:e??"",numResults:0,numErrors:0,errors:[],results:[]};return this._formatResponse(s,r),s}_formatSourceResponse(e,t,r){const s=t?.value||[],o=t?.error,i=this.allSources.at(r);if(o){const t={sourceIndex:r,source:i,error:o};e.errors.push(t),n.getLogger(this).error(o),e.numErrors++}else{const t={sourceIndex:r,source:i,results:s};e.results.push(t),e.numResults+=s.length}}_formatResponse(e,t,r){if(t)if(e.activeSourceIndex===z){const s=r&&U(r,"sourceIndex")&&-1!==r.sourceIndex?r.sourceIndex:void 0;t.forEach((t,r)=>{const o=void 0!==s?s:r;this._formatSourceResponse(e,t,o)})}else this._formatSourceResponse(e,t[0],e.activeSourceIndex)}async _getResultsFromSources(e,t){const{allSources:r}=this,s=!e.location&&U(e,"sourceIndex")?e.sourceIndex:this.activeSourceIndex,o=[];if(!r.length){const e=new l("search:no-sources-defined","At least one source is required.",{allSources:r});throw n.getLogger(this).error(e),e}return s===z?r.forEach((r,s)=>{o.push(this._getResultsFromSource(e,s,t))}):o.push(this._getResultsFromSource(e,s,t)),c(o)}async _getSuggestionsFromSources(e,t){const{allSources:r,activeSourceIndex:s}=this,o=[];if(!r.length){const e=new l("suggest:no-sources-defined","At least one source is required.",{allSources:r});throw n.getLogger(this).error(e),e}return s===z?r.forEach((r,s)=>{o.push(this._getSuggestionsFromSource(e,s,t))}):o.push(this._getSuggestionsFromSource(e,s,t)),c(o)}async _getResultsFromSource(e,t,r){const s=null!=t?this.allSources.at(t):null;if(!s)return null;const{location:o=null}=e,i=this.view?.spatialReference??Q,l=U(s,"maxResults")?s.maxResults:this.maxResults,a=!!(s instanceof P&&U(s,"exactMatch"))&&s.exactMatch,{view:n}=this;return s.getResults?.({exactMatch:a,location:o,maxResults:l,sourceIndex:t,spatialReference:i,suggestResult:e,view:n},r)}async _getSuggestionsFromSource(e,t,r){const s=this.allSources.at(t);if(!s)return null;e??="";const o=U(s,"suggestionsEnabled")?s.suggestionsEnabled:this.suggestionsEnabled,i=e?.length,l=U(s,"minSuggestCharacters")?s.minSuggestCharacters:this.minSuggestCharacters;if(o&&e.trim()&&i>=l){const o=this.view?.spatialReference||Q,i=U(s,"maxSuggestions")?s.maxSuggestions:this.maxSuggestions,{view:l}=this,a=!!(s instanceof P&&U(s,"exactMatch"))&&s.exactMatch;return s.getSuggestions?.({view:l,sourceIndex:t,suggestTerm:e,spatialReference:o,maxSuggestions:i,exactMatch:a},r)}return null}_getLayerSourcePopupTemplate(e){const{layer:t}=e;if(t)return U(e,"popupTemplate")?e.popupTemplate:t.popupTemplate}_getSourceIndexOfResult(e){return u(this.results??[],({results:t,sourceIndex:r})=>{const s=t?.includes(e);return s?r:null})??null}async _goToSearchResult(e){this._abortGoTo();const t=new AbortController;this._gotoController=t;const r={target:{target:e},options:{signal:t.signal}};e||(r.options.animate=!1),await this.callGoTo(r),this._gotoController=null}_getDefaultSymbol(e){const{defaultSymbols:t}=this,r=e.feature?.geometry;if(null==r)return null;switch(r.type){case"point":case"multipoint":return t.point;case"polyline":return t.polyline;case"extent":case"polygon":return t.polygon;default:return null}}_removeHighlight(){this.removeHandles(H)}async _getLayerView(e){const{view:t}=this;if(!e||!t)return null;const{layer:r,sourceLayer:s}=e,o=r??s;return o&&"building-component"!==o.type&&"subtype-sublayer"!==o.type?(await t.when(),t.whenLayerView(o)):null}_highlightFeature(e){const{graphic:t,layerView:r}=e,{attributes:s,layer:o,sourceLayer:i}=t,l=o??i,{objectIdField:a}=l,n=(a&&s?.[a])??null,u=r.highlight(n??t);this.addHandles(u,H)}_setResultFloor(e){const{view:t}=this,r=e.feature?.attributes,s=e.feature?.sourceLayer;if(s&&"floorInfo"in s&&s?.floorInfo?.floorField&&r){const e=r[s.floorInfo.floorField];t?.emit("select-result-floor",e)}}};e([m()],K.prototype,"_searching",void 0),e([m()],K.prototype,"_updatingPromise",void 0),e([m({readOnly:!0,value:null})],K.prototype,"activeSource",null),e([m()],K.prototype,"activeSourceIndex",null),e([m()],K.prototype,"allPlaceholder",null),e([m({readOnly:!0})],K.prototype,"allSources",null),e([m()],K.prototype,"autoNavigate",void 0),e([m()],K.prototype,"autoSelect",void 0),e([m({type:s})],K.prototype,"defaultPopupTemplate",void 0),e([m({readOnly:!0})],K.prototype,"defaultSources",void 0),e([m()],K.prototype,"defaultSymbols",void 0),e([m()],K.prototype,"includeDefaultSources",void 0),e([m()],K.prototype,"locationEnabled",null),e([m()],K.prototype,"maxInputLength",void 0),e([m()],K.prototype,"maxResults",void 0),e([m()],K.prototype,"maxSuggestions",void 0),e([m()],K.prototype,"messages",void 0),e([m()],K.prototype,"minSuggestCharacters",void 0),e([m({readOnly:!0})],K.prototype,"placeholder",null),e([m()],K.prototype,"popupEnabled",void 0),e([m({type:s})],K.prototype,"popupTemplate",void 0),e([m({type:x})],K.prototype,"portal",void 0),e([m()],K.prototype,"resultCount",void 0),e([m()],K.prototype,"resultGraphicEnabled",void 0),e([m({readOnly:!0})],K.prototype,"resultGraphic",void 0),e([m({readOnly:!0})],K.prototype,"results",void 0),e([m({readOnly:!0})],K.prototype,"selectedSuggestion",void 0),e([m()],K.prototype,"searchAllEnabled",void 0),e([m({readOnly:!0})],K.prototype,"selectedResult",void 0),e([m()],K.prototype,"searchTerm",null),e([m({type:B})],K.prototype,"sources",void 0),e([m({readOnly:!0})],K.prototype,"state",null),e([m()],K.prototype,"suggestionDelay",void 0),e([m()],K.prototype,"suggestionCount",void 0),e([m({readOnly:!0})],K.prototype,"suggestions",void 0),e([m()],K.prototype,"suggestionsEnabled",void 0),e([m({readOnly:!0})],K.prototype,"updating",null),e([m()],K.prototype,"view",void 0),e([m()],K.prototype,"clear",null),K=e([y("esri.widgets.Search.SearchViewModel")],K);const W=K;export{W as default};
5
+ import{__decorate as e}from"tslib";import{getAssetUrl as t}from"../../assets.js";import r from"../../Graphic.js";import s from"../../PopupTemplate.js";import{isSome as o}from"../../core/arrayUtils.js";import i from"../../core/Collection.js";import l from"../../core/Error.js";import{EventedAccessor as a}from"../../core/Evented.js";import n from"../../core/Logger.js";import{mappedFind as u}from"../../core/maybe.js";import{eachAlways as c,after as h}from"../../core/promiseUtils.js";import{watch as p,initial as g,whenOnce as d}from"../../core/reactiveUtils.js";import{property as m}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as y}from"../../core/accessorSupport/decorators/subclass.js";import f from"../../geometry/Point.js";import S from"../../geometry/SpatialReference.js";import{getPointFromGeometry as _,getPointWithElevation as v}from"../../geometry/support/geometryUtils.js";import{onLocaleChange as w}from"../../intl/locale.js";import{fetchMessageBundle as b}from"../../intl/messages.js";import x from"../../portal/Portal.js";import{isApiKeyApplicable as L}from"../../support/apiKeyUtils.js";import I from"../../symbols/PictureMarkerSymbol.js";import T from"../../symbols/SimpleFillSymbol.js";import R from"../../symbols/SimpleLineSymbol.js";import E from"../../symbols/TextSymbol.js";import{highlightsSupported as F}from"../../views/support/layerViewUtils.js";import P from"./LayerSearchSource.js";import j from"./LocatorSearchSource.js";import C from"./SearchSource.js";import{isArcGISWorldGeocoder as G,meteredArcGISLocatorUrl as O,isProxiedArcGISWorldGeocoder as A,isMeteredArcGISWorldGeocoder as N}from"./support/locatorUtils.js";import{supported as D,getCurrentPosition as M,positionToPoint as V}from"../support/geolocationUtils.js";import{GoTo as J}from"../support/GoTo.js";function U(e,t){return e.hasOwnProperty(t)&&null!=e[t]&&""!==e[t]}const k=()=>b("esri/widgets/Search/t9n/Search"),H="highlight",B=i.ofType({key:e=>e.layer?"layer":"locator",base:C,typeMap:{layer:P,locator:j}}),Q=S.WGS84,Z="esri/images/search/search-symbol-32.png",q=/<[\s\S]*?>/g,z=-1;let K=class extends(J(a)){constructor(e){super(e),this._gotoController=null,this._searching=null,this._updatingPromise=null,this._createdFeatureLayers=[],this.autoNavigate=!0,this.autoSelect=!0,this.defaultPopupTemplate=null,this.defaultSources=new B,this.defaultSymbols={point:new I({url:t(Z),size:24,width:24,height:24}),polyline:new R({color:[130,130,130,1],width:2}),polygon:new T({color:[235,235,235,.4],outline:{color:[130,130,130,1],width:2}})},this.includeDefaultSources=!0,this.maxInputLength=128,this.maxResults=6,this.maxSuggestions=6,this.messages=null,this.minSuggestCharacters=3,this.popupEnabled=!0,this.popupTemplate=null,this.portal=x.getDefault(),this.resultCount=null,this.resultGraphicEnabled=!0,this.resultGraphic=null,this.results=null,this.selectedSuggestion=null,this.searchAllEnabled=!0,this.selectedResult=null,this.sources=new B,this.suggestionDelay=350,this.suggestionCount=null,this.suggestions=null,this.suggestionsEnabled=!0,this.view=null}initialize(){const e=async()=>{const e=await k();this.messages=e,this.defaultPopupTemplate=new s({title:e.searchResult,content:"{Match_addr}"})};e(),this.addHandles([p(()=>[this.includeDefaultSources,this.view,this.portal],()=>this._update(),g),w(e)])}destroy(){this._destroyFeatureLayers(),this._abortGoTo(),this.clearGraphics()}static{this.ALL_INDEX=z}get activeSource(){return this.allSources.at(this.activeSourceIndex)??null}get activeSourceIndex(){return 1===this.allSources.length||!this.searchAllEnabled?0:z}set activeSourceIndex(e){this._overrideIfSome("activeSourceIndex",e)}get allPlaceholder(){return this.messages?.allPlaceholder}set allPlaceholder(e){this._overrideIfSome("allPlaceholder",e)}get allSources(){const{sources:e,defaultSources:t,includeDefaultSources:r}=this,s="function"==typeof r?r.call(null,{sources:e,defaultSources:t}):r?t.concat(e):e,o=this._get("allSources")||new B;return o.removeAll(),o.addMany(s.filter(Boolean)),o}get locationEnabled(){return this._get("locationEnabled")||D()}set locationEnabled(e){if(void 0===e)return void this._clearOverride("locationEnabled");const t=D();if(e&&!t){const e=new l("locationEnabled:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});n.getLogger(this).error(e)}this._override("locationEnabled",!!e&&t)}get placeholder(){const{allSources:e,activeSourceIndex:t,allPlaceholder:r}=this;if(t===z)return r??"";const s=e.at(t);return s?.placeholder??""}set searchTerm(e){this._set("searchTerm",e||""),this.clearGraphics(),this.selectedSuggestion&&this.selectedSuggestion.text!==e&&this._set("selectedSuggestion",null),""===e&&this._clear()}get searchTerm(){return this._get("searchTerm")||""}get state(){return this._searching?"searching":this.updating?"loading":0===this.allSources.length?"disabled":"ready"}get updating(){return null!=this._updatingPromise}clear(){this.searchTerm=""}clearGraphics(){this._removeHighlight(),this._closePopup();const{view:e,resultGraphic:t}=this;e&&t&&e.graphics.remove(t),this._set("resultGraphic",null)}search(e,t){this.emit("search-start"),this.clearGraphics();const r=this._createSuggestionForSearch(e),s=(async()=>{try{await this.when();const e=await this._getResultsFromSources(r,t);if(t?.signal?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:r.text??"",numResults:0,numErrors:0,errors:[],results:[]};this._formatResponse(s,e,r);const o=this._getFirstResult(s.results),i=r.location&&o?o.name:r.text,l=i?.replace(q,"");return this._set("searchTerm",l),(r.key&&"number"==typeof r.sourceIndex||r.location)&&this._set("selectedSuggestion",r),this._set("results",s.results),this._set("resultCount",s.results.reduce((e,t)=>e+(t.results?.length??0),0)),this.emit("search-complete",s),await this._selectFirstResult(o),s}finally{this._clearSearching()}})();return this._searching=s,s}async searchNearby(e){if(!this.locationEnabled){const e=new l("searchNearby:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});throw n.getLogger(this).error(e),e}const t=(async()=>{try{const t=await M(),r=await V({position:t,view:this.view},e);return await this.search(r,e)}finally{this._clearSearching()}})();return this._searching=t,t}async select(e){if(this.clearGraphics(),!e){const t=new l("select:missing-parameter","Cannot select without a searchResult.",{searchResult:e});throw n.getLogger(this).error(t),t}const{view:t}=this,s=U(e,"sourceIndex")?e.sourceIndex:this._getSourceIndexOfResult(e),o=null!=s?this.allSources.at(s):null;if(!o){const e=new l("select:missing-source","Cannot select without a source.",{source:o});throw n.getLogger(this).error(e),e}const i=o instanceof P?this._getLayerSourcePopupTemplate(o):o.popupTemplate,a=o.resultSymbol||this._getDefaultSymbol(e),u=U(o,"resultGraphicEnabled")?o.resultGraphicEnabled:this.resultGraphicEnabled,h=U(o,"autoNavigate")?o.autoNavigate:this.autoNavigate,p=U(o,"popupEnabled")?o.popupEnabled:this.popupEnabled,g=p?i||this.popupTemplate||this.defaultPopupTemplate:null,{feature:d}=e;if(!d){const e=new l("select:missing-feature","Cannot select without a feature.",{feature:d});throw n.getLogger(this).error(e),e}const{attributes:m,geometry:y,layer:f,sourceLayer:S}=d,w=y?_(y):null,b={layerViewQuery:this._getLayerView(d),elevationQuery:t&&null!=w?v(w,t):Promise.resolve(w)},x=await c(b),L=x.layerViewQuery.value,I=x.elevationQuery.value;a instanceof E&&(a.text=e.name);const T=t&&h?e.target||e.extent:null,R=null!=T?this._goToSearchResult(T):Promise.resolve();await R;const j=L?d:new r({geometry:y,symbol:a,attributes:m,layer:f,sourceLayer:S,popupTemplate:g}),C=t?.popup,G=C&&p&&j.getEffectivePopupTemplate(C.defaultPopupTemplateEnabled);return G&&await t.openPopup({features:[j],location:I}),L&&F(L)&&!G&&this._highlightFeature({graphic:j,layerView:L}),!L&&u&&t&&t.graphics.push(j),this._setResultFloor(e),this._set("selectedResult",e),this._set("resultGraphic",j),this.emit("select-result",{result:e,source:o,sourceIndex:s}),e}async suggest(e,t,r){const s=e||this.searchTerm;this.emit("suggest-start",{searchTerm:s}),await this._suggestTimer(t,r);const o=await this._suggestImmediate(s,r);return this._set("suggestions",o?.results),this._set("suggestionCount",o?.results.reduce((e,t)=>e+(t.results?.length??0),0)??null),this.emit("suggest-complete",o),o}async when(){await d(()=>!this.updating)}async _update(){const{portal:e,view:t}=this;if(this.includeDefaultSources){const r=this._updatingPromise=c([e?.load(),t?.when()]);if(this.destroyed)return;if(await r,r!==this._updatingPromise)return}await d(()=>this.messages),this.destroyed||this._updateDefaultSources(),this._updatingPromise=null}_clearSearching(){this._searching=null}_convertHelperServices(){const e=this.portal?.helperServices?.geocode;if(!e)return[];return e.map(e=>{if(!1===e.placefinding)return;const t=G(e.url)&&L(e.url)?{url:O}:null,r=j.fromJSON({...e,...t}),s=r.url;if(G(s)||A(s)||N(s)){const e=r.outFields??["Addr_type","Match_addr","StAddr","City"],t=(r.placeholder||this.messages?.placeholder)??"",s="number"==typeof r.defaultZoomScale?r.defaultZoomScale:2500;r.singleLineFieldName="SingleLine",r.outFields=e,r.placeholder=t,r.defaultZoomScale=s}return r.singleLineFieldName?r:void 0}).filter(o)}_destroyFeatureLayers(){this._createdFeatureLayers.forEach(e=>e?.destroy()),this._createdFeatureLayers=[]}_getLayerSources(e,t){const r=this.view?.map;return e.map(e=>{const s=r.findLayerById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=P.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then(e=>{i.layer=e}),i}).filter(o).toArray()}_getTableSources(e,t){const r=this.view?.map;return e.map(e=>{if(!e.id)return;const s=r.findTableById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=P.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then(e=>{i.layer=e}),i}).filter(o).toArray()}_convertApplicationProperties(){const e=this.view?.map,t=e?.applicationProperties?.viewing?.search;if(!t)return[];const{enabled:r,hintText:s,layers:o,tables:i}=t;if(!r)return[];return[...this._getLayerSources(o,s),...this._getTableSources(i,s)]}async _getSubLayer(e,t){if(await e.load(),!e.allSublayers)throw new Error;const r=e.allSublayers.find(e=>e.id===t.subLayer);if(!r)throw new Error;const s=await(r.createFeatureLayer?.());if(!s)throw new Error;return this._createdFeatureLayers.push(s),s}async _getBuildingSubLayer(e,t){await e.load();const r=e.allSublayers.find(e=>e.id===t.subLayer);if("building-component"!==r?.type)throw new Error;if(await r.load(),null==r.associatedLayer)throw new Error;return await r.associatedLayer.load(),r}async _getLayer(e,t){if("feature"===e.type||"scene"===e.type||"csv"===e.type||"geojson"===e.type||"ogc-feature"===e.type)return e;if("map-image"===e.type)try{return await this._getSubLayer(e,t)}catch(r){const t=new l("search:create-featurelayer","Could not create a FeatureLayer from the MapImageLayer",{layer:e});return n.getLogger(this).error(t),null}return"building-scene"===e.type?this._getBuildingSubLayer(e,t):null}_getLayerJSON(e){return"function"==typeof e.toJSON?e.toJSON():e}_updateDefaultSources(){const{defaultSources:e,includeDefaultSources:t}=this;this._destroyFeatureLayers(),e.removeAll(),t&&e.addMany([...this._convertApplicationProperties(),...this._convertHelperServices()])}_abortGoTo(){this._gotoController&&this._gotoController.abort(),this._gotoController=null}_clear(){this._abortGoTo(),this._set("resultCount",null),this._set("results",null),this._set("suggestions",null),this._set("suggestionCount",null),this._set("selectedResult",null),this._set("selectedSuggestion",null),this.emit("search-clear")}_closePopup(){const e=this.view?.popup,{resultGraphic:t}=this;if(!e||!t)return;const r="selectedFeature"in e,s=r?e.selectedFeature:null;r&&(s&&s===t)&&e.close()}_suggestTimer(e,t){const r=null!=e?e:this.suggestionDelay;return h(r,null,t?.signal)}_createLocationForSearch(e){return e instanceof r&&e.geometry?_(e.geometry):e instanceof f?e:Array.isArray(e)&&2===e.length?new f({longitude:e[0],latitude:e[1]}):null}_createSuggestionForSearch(e){if(e&&U(e,"key")&&U(e,"text")&&U(e,"sourceIndex"))return e;const t=this._createLocationForSearch(e),r="string"==typeof e?e:this.searchTerm,{selectedSuggestion:s,selectedResult:o}=this,i=!e&&s&&o,l=i&&s.key===o.key&&s.sourceIndex===o.sourceIndex,a=i&&s.location;return l||a?s:{location:t,text:t?"":r,sourceIndex:null,key:null}}_getFirstResult(e){return u(e,({results:e})=>e?.[0])??null}async _selectFirstResult(e){return this.autoSelect&&e?this.select(e):null}async _suggestImmediate(e,t){await this.when();const r=await this._getSuggestionsFromSources(e,t);if(t?.signal?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:e??"",numResults:0,numErrors:0,errors:[],results:[]};return this._formatResponse(s,r),s}_formatSourceResponse(e,t,r){const s=t?.value||[],o=t?.error,i=this.allSources.at(r);if(o){const t={sourceIndex:r,source:i,error:o};e.errors.push(t),n.getLogger(this).error(o),e.numErrors++}else{const t={sourceIndex:r,source:i,results:s};e.results.push(t),e.numResults+=s.length}}_formatResponse(e,t,r){if(t)if(e.activeSourceIndex===z){const s=r&&U(r,"sourceIndex")&&-1!==r.sourceIndex?r.sourceIndex:void 0;t.forEach((t,r)=>{const o=void 0!==s?s:r;this._formatSourceResponse(e,t,o)})}else this._formatSourceResponse(e,t[0],e.activeSourceIndex)}async _getResultsFromSources(e,t){const{allSources:r}=this,s=!e.location&&U(e,"sourceIndex")?e.sourceIndex:this.activeSourceIndex,o=[];if(!r.length){const e=new l("search:no-sources-defined","At least one source is required.",{allSources:r});throw n.getLogger(this).error(e),e}return s===z?r.forEach((r,s)=>{o.push(this._getResultsFromSource(e,s,t))}):o.push(this._getResultsFromSource(e,s,t)),c(o)}async _getSuggestionsFromSources(e,t){const{allSources:r,activeSourceIndex:s}=this,o=[];if(!r.length){const e=new l("suggest:no-sources-defined","At least one source is required.",{allSources:r});throw n.getLogger(this).error(e),e}return s===z?r.forEach((r,s)=>{o.push(this._getSuggestionsFromSource(e,s,t))}):o.push(this._getSuggestionsFromSource(e,s,t)),c(o)}async _getResultsFromSource(e,t,r){const s=null!=t?this.allSources.at(t):null;if(!s)return null;const{location:o=null}=e,i=this.view?.spatialReference??Q,l=U(s,"maxResults")?s.maxResults:this.maxResults,a=!!(s instanceof P&&U(s,"exactMatch"))&&s.exactMatch,{view:n}=this;return s.getResults?.({exactMatch:a,location:o,maxResults:l,sourceIndex:t,spatialReference:i,suggestResult:e,view:n},r)}async _getSuggestionsFromSource(e,t,r){const s=this.allSources.at(t);if(!s)return null;e??="";const o=U(s,"suggestionsEnabled")?s.suggestionsEnabled:this.suggestionsEnabled,i=e?.length,l=U(s,"minSuggestCharacters")?s.minSuggestCharacters:this.minSuggestCharacters;if(o&&e.trim()&&i>=l){const o=this.view?.spatialReference||Q,i=U(s,"maxSuggestions")?s.maxSuggestions:this.maxSuggestions,{view:l}=this,a=!!(s instanceof P&&U(s,"exactMatch"))&&s.exactMatch;return s.getSuggestions?.({view:l,sourceIndex:t,suggestTerm:e,spatialReference:o,maxSuggestions:i,exactMatch:a},r)}return null}_getLayerSourcePopupTemplate(e){const{layer:t}=e;if(t)return U(e,"popupTemplate")?e.popupTemplate:t.popupTemplate}_getSourceIndexOfResult(e){return u(this.results??[],({results:t,sourceIndex:r})=>{const s=t?.includes(e);return s?r:null})??null}async _goToSearchResult(e){this._abortGoTo();const t=new AbortController;this._gotoController=t;const r={target:{target:e},options:{signal:t.signal}};e||(r.options.animate=!1),await this.callGoTo(r),this._gotoController=null}_getDefaultSymbol(e){const{defaultSymbols:t}=this,r=e.feature?.geometry;if(null==r)return null;switch(r.type){case"point":case"multipoint":return t.point;case"polyline":return t.polyline;case"extent":case"polygon":return t.polygon;default:return null}}_removeHighlight(){this.removeHandles(H)}async _getLayerView(e){const{view:t}=this;if(!e||!t)return null;const{layer:r,sourceLayer:s}=e,o=r??s;return o&&"building-component"!==o.type&&"subtype-sublayer"!==o.type?(await t.when(),t.whenLayerView(o)):null}_highlightFeature(e){const{graphic:t,layerView:r}=e,{attributes:s,layer:o,sourceLayer:i}=t,l=o??i,{objectIdField:a}=l,n=(a&&s?.[a])??null,u=r.highlight(n??t);this.addHandles(u,H)}_setResultFloor(e){const{view:t}=this,r=e.feature?.attributes,s=e.feature?.sourceLayer;if(s&&"floorInfo"in s&&s?.floorInfo?.floorField&&r){const e=r[s.floorInfo.floorField];t?.emit("select-result-floor",e)}}};e([m()],K.prototype,"_searching",void 0),e([m()],K.prototype,"_updatingPromise",void 0),e([m({readOnly:!0,value:null})],K.prototype,"activeSource",null),e([m()],K.prototype,"activeSourceIndex",null),e([m()],K.prototype,"allPlaceholder",null),e([m({readOnly:!0})],K.prototype,"allSources",null),e([m()],K.prototype,"autoNavigate",void 0),e([m()],K.prototype,"autoSelect",void 0),e([m({type:s})],K.prototype,"defaultPopupTemplate",void 0),e([m({readOnly:!0})],K.prototype,"defaultSources",void 0),e([m()],K.prototype,"defaultSymbols",void 0),e([m()],K.prototype,"includeDefaultSources",void 0),e([m()],K.prototype,"locationEnabled",null),e([m()],K.prototype,"maxInputLength",void 0),e([m()],K.prototype,"maxResults",void 0),e([m()],K.prototype,"maxSuggestions",void 0),e([m()],K.prototype,"messages",void 0),e([m()],K.prototype,"minSuggestCharacters",void 0),e([m({readOnly:!0})],K.prototype,"placeholder",null),e([m()],K.prototype,"popupEnabled",void 0),e([m({type:s})],K.prototype,"popupTemplate",void 0),e([m({type:x})],K.prototype,"portal",void 0),e([m()],K.prototype,"resultCount",void 0),e([m()],K.prototype,"resultGraphicEnabled",void 0),e([m({readOnly:!0})],K.prototype,"resultGraphic",void 0),e([m({readOnly:!0})],K.prototype,"results",void 0),e([m({readOnly:!0})],K.prototype,"selectedSuggestion",void 0),e([m()],K.prototype,"searchAllEnabled",void 0),e([m({readOnly:!0})],K.prototype,"selectedResult",void 0),e([m()],K.prototype,"searchTerm",null),e([m({type:B})],K.prototype,"sources",void 0),e([m({readOnly:!0})],K.prototype,"state",null),e([m()],K.prototype,"suggestionDelay",void 0),e([m()],K.prototype,"suggestionCount",void 0),e([m({readOnly:!0})],K.prototype,"suggestions",void 0),e([m()],K.prototype,"suggestionsEnabled",void 0),e([m({readOnly:!0})],K.prototype,"updating",null),e([m()],K.prototype,"view",void 0),e([m()],K.prototype,"clear",null),K=e([y("esri.widgets.Search.SearchViewModel")],K);const W=K;export{W as default};
package/widgets/Widget.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../intl.js";import{byId as t}from"../core/domUtils.js";import{EventedAccessor as r}from"../core/Evented.js";import{isEventedOrEventTarget as s,on as o}from"../core/events.js";import"../core/has.js";import{clone as i}from"../core/lang.js";import n from"../core/Logger.js";import{destroyMaybe as a}from"../core/maybe.js";import d from"../core/Promise.js";import{debounce as l,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{watch as h,syncAndInitial as p,when as u}from"../core/reactiveUtils.js";import{generateUUID as m}from"../core/uuid.js";import{property as g}from"../core/accessorSupport/decorators/property.js";import{cast as y}from"../core/accessorSupport/decorators/cast.js";import{subclass as v}from"../core/accessorSupport/decorators/subclass.js";import{runTracked as f}from"../core/accessorSupport/tracking.js";import{SimpleTrackingTarget as _}from"../core/accessorSupport/tracking/SimpleTrackingTarget.js";import{createAdvancedProjector as j}from"../libs/maquette-advanced-projector/projector.js";import{commitAssetPath as b}from"./support/componentsUtils.js";import{isWidgetConstructor as w,processWidgets as S}from"./support/jsxWidgetSupport.js";import{widgetSymbol as R,widgetTestDataSymbol as P}from"./support/symbols.js";import{registerAlive as k,registerLoading as C}from"./support/tests.js";import{getVNodeCache as E,setVNodeCache as F,deleteVNodeCache as L,clearVNodeCache as T}from"./support/vnodeCache.js";import{classes as I}from"./support/widgetUtils.js";import{fetchMessageBundle as N}from"../intl/messages.js";import{onLocaleChange as H}from"../intl/locale.js";var $;let U=0;function z(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?z(e[s],t[s]):e[s]=t[s]);return e}const x=j({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,o,i)=>{const n=t?.(e,s,o,i),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in o)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>n?.call(o,e);o.addEventListener(t,r,a);const s=()=>o.removeEventListener(t,r,a),d=i.afterRemoved;i.afterRemoved=e=>{d?.(e),s()}}return n}},handleInterceptedEvent(e,t,r,s){const{eventPhase:o,type:i}=s,n=o===Event.CAPTURING_PHASE;let a=`on${i}${n?"capture":""}`;const d=t.properties;(d&&a in d||(a=`on${i[0].toUpperCase()}${i.slice(1)}${n?"Capture":""}`,d&&a in d))&&(T(),e.scheduleRender(),d[a].call(d.bind||r,s))}});let M=!1,O=class extends(d.EsriPromiseMixin(r)){static{this[$]=!0}constructor(e,t){super(e,t),this._attached=!1,this._projector=x,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this._loadLocale=l(async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await N(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=z(i(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&n.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles(k()),b();const r="esri-widget-uid-"+m(),s=this.render.bind(this);this._trackingTarget=new _(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const o=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),a=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??o(),t=e.properties??={};if(t.key??=r,w(e.vnodeSelector)){if(!this.visible)return o()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let i=0;return e.children?.forEach(e=>{w(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${i++}`)}),S(this,e)};this.render=()=>{if(M)return a();let e=E(this)??null;if(e)return e;this._trackingTarget.clear(),M=!0;try{e=f(this._trackingTarget,a)}catch(t){throw n.getLogger(this).error(t),t}finally{M=!1}return e&&F(this,e),e};const d=this.beforeFirstRender();d?this._resourcesFetch=d.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),C(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(c):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||(a(this._trackingTarget),a(this.viewModel),this._detach(this.container),this._set("container",null),this._emitter.clear(),this.render=()=>null,this._projector=null,L(this))}set container(e){this._get("container")||this._set("container",e)}castContainer(e){return t(e)}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+U++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[($=R,P)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(L(this),this._projector.scheduleRender())}classes(...e){return I.apply(this,e)}renderNow(){L(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles(h(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&s(e)&&this.addHandles(this._delegatedEventNames.map(t=>o(e,t,e=>{this.emit(t,e)})),"delegated-events")},p)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(c),this.scheduleRender()};this.addHandles([H(e),h(()=>this.uiStrings,e)]),this.addHandles(u(()=>this.container,e=>{this.destroyed||this._attach(e)},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};e([g()],O.prototype,"_readyForTrueRender",void 0),e([g({value:null})],O.prototype,"container",null),e([y("container")],O.prototype,"castContainer",null),e([g()],O.prototype,"icon",null),e([g()],O.prototype,"id",null),e([g()],O.prototype,"label",null),e([g()],O.prototype,"renderable",null),e([g()],O.prototype,"uiStrings",void 0),e([g()],O.prototype,"viewModel",void 0),e([g({value:!0})],O.prototype,"visible",null),e([g()],O.prototype,"key",void 0),e([g()],O.prototype,"children",void 0),e([g()],O.prototype,"afterCreate",void 0),e([g()],O.prototype,"afterUpdate",void 0),e([g()],O.prototype,"afterRemoved",void 0),O=e([v("esri.widgets.Widget")],O);const A=O;export{A as default};
5
+ import{__decorate as e}from"tslib";import"../intl.js";import{byId as t}from"../core/domUtils.js";import{EventedAccessor as r}from"../core/Evented.js";import{isEventedOrEventTarget as s,on as o}from"../core/events.js";import"../core/has.js";import{clone as i}from"../core/lang.js";import n from"../core/Logger.js";import{destroyMaybe as a}from"../core/maybe.js";import{EsriPromiseMixin as d}from"../core/Promise.js";import{debounce as l,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{watch as h,syncAndInitial as p,when as u}from"../core/reactiveUtils.js";import{generateUUID as m}from"../core/uuid.js";import{property as g}from"../core/accessorSupport/decorators/property.js";import{cast as y}from"../core/accessorSupport/decorators/cast.js";import{subclass as v}from"../core/accessorSupport/decorators/subclass.js";import{runTracked as f}from"../core/accessorSupport/tracking.js";import{SimpleTrackingTarget as _}from"../core/accessorSupport/tracking/SimpleTrackingTarget.js";import{createAdvancedProjector as j}from"../libs/maquette-advanced-projector/projector.js";import{commitAssetPath as b}from"./support/componentsUtils.js";import{isWidgetConstructor as w,processWidgets as S}from"./support/jsxWidgetSupport.js";import{widgetSymbol as R,widgetTestDataSymbol as P}from"./support/symbols.js";import{registerAlive as k,registerLoading as C}from"./support/tests.js";import{getVNodeCache as E,setVNodeCache as F,deleteVNodeCache as L,clearVNodeCache as T}from"./support/vnodeCache.js";import{classes as I}from"./support/widgetUtils.js";import{fetchMessageBundle as N}from"../intl/messages.js";import{onLocaleChange as H}from"../intl/locale.js";var $;let U=0;function z(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?z(e[s],t[s]):e[s]=t[s]);return e}const x=j({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,o,i)=>{const n=t?.(e,s,o,i),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in o)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>n?.call(o,e);o.addEventListener(t,r,a);const s=()=>o.removeEventListener(t,r,a),d=i.afterRemoved;i.afterRemoved=e=>{d?.(e),s()}}return n}},handleInterceptedEvent(e,t,r,s){const{eventPhase:o,type:i}=s,n=o===Event.CAPTURING_PHASE;let a=`on${i}${n?"capture":""}`;const d=t.properties;(d&&a in d||(a=`on${i[0].toUpperCase()}${i.slice(1)}${n?"Capture":""}`,d&&a in d))&&(T(),e.scheduleRender(),d[a].call(d.bind||r,s))}});let O=!1,A=class extends(d(r)){static{this[$]=!0}constructor(e,t){super(e,t),this._attached=!1,this._projector=x,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this._loadLocale=l(async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await N(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=z(i(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&n.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles(k()),b();const r="esri-widget-uid-"+m(),s=this.render.bind(this);this._trackingTarget=new _(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const o=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),a=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??o(),t=e.properties??={};if(t.key??=r,w(e.vnodeSelector)){if(!this.visible)return o()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let i=0;return e.children?.forEach(e=>{w(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${i++}`)}),S(this,e)};this.render=()=>{if(O)return a();let e=E(this)??null;if(e)return e;this._trackingTarget.clear(),O=!0;try{e=f(this._trackingTarget,a)}catch(t){throw n.getLogger(this).error(t),t}finally{O=!1}return e&&F(this,e),e};const d=this.beforeFirstRender();d?this._resourcesFetch=d.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),C(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(c):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||(a(this._trackingTarget),a(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,L(this))}set container(e){this._get("container")||this._set("container",e)}castContainer(e){return t(e)}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+U++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[($=R,P)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(L(this),this._projector.scheduleRender())}classes(...e){return I.apply(this,e)}renderNow(){L(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles(h(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&s(e)&&this.addHandles(this._delegatedEventNames.map(t=>o(e,t,e=>{this.emit(t,e)})),"delegated-events")},p)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(c),this.scheduleRender()};this.addHandles([H(e),h(()=>this.uiStrings,e)]),this.addHandles(u(()=>this.container,e=>{this.destroyed||this._attach(e)},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};e([g()],A.prototype,"_readyForTrueRender",void 0),e([g({value:null})],A.prototype,"container",null),e([y("container")],A.prototype,"castContainer",null),e([g()],A.prototype,"icon",null),e([g()],A.prototype,"id",null),e([g()],A.prototype,"label",null),e([g()],A.prototype,"renderable",null),e([g()],A.prototype,"uiStrings",void 0),e([g()],A.prototype,"viewModel",void 0),e([g({value:!0})],A.prototype,"visible",null),e([g()],A.prototype,"key",void 0),e([g()],A.prototype,"children",void 0),e([g()],A.prototype,"afterCreate",void 0),e([g()],A.prototype,"afterUpdate",void 0),e([g()],A.prototype,"afterRemoved",void 0),A=e([v("esri.widgets.Widget")],A);const B=A;export{B as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../Graphic.js";import i from"../../core/Error.js";import{EventedAccessor as o}from"../../core/Evented.js";import{throwIfAborted as r,isAbortError as a}from"../../core/promiseUtils.js";import{watch as n,initial as s}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../symbols/CIMSymbol.js";import{supported as m,positionToPoint as d}from"./geolocationUtils.js";import y from"./GoTo.js";const g=2500,h={type:"CIMPictureMarker",primitiveName:"headingOverride",enable:!0,anchorPoint:{x:0,y:-.5},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:36,billboardMode3D:"FaceNearPlane",invertBackfaceTexture:!0,scaleX:1,textureFilter:"Picture",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAYAAACe0YppAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYaSURBVHgBvVfNb1VFFD/nzP16xRYJKYREEiJoDLLShQkrSNzoHv8I2QgxwY8FJWHhxoVxISEu2AordWNiQjAxEBeEsKAmhCCwkPDRAn1t33v33jnH37n3Fam0pa8kTjOde+/MnN/5+J0z85jW08yYTpxgfzx0bS+fO0R0YHqyeb9w7YEtLTv+9rSdOH7ciNleJJJX/Do1JQ3AltdlT35fiN6gG8kD8akdmzO+6w/zM7wdw725rUY78DBXtmATA6PZntFgm9Kjm6o/HFJpdi5Xhp+16sDBC+H+gUmZfjIXHKC+35U42ZHZfpe30BZS7okNFnhu8wTRk2ek5LEV2q+N8nEj6yuNVRjHddftrt4ahyJbOxF+Uppi/Rf47NlA05Pp9vkyRNkkD8sqUJHwOGfSpYFQFXhTJryQBaZSeAxbFus+U1K0gJm2oy3QKwuZzqeuSK5kpW6BEsE6+nCsAHDXQWuaOljzU8uP/ToxUW4KcwKg8QzOSdFL6Swm0hurAC7N2qIW7ncwNgYKF4la3/w7RnzrUK29KseXWqmTKXGl45Zrd9CLrsSjr96fcw4kS46mTsJznSTrVBR6VQJQdDbpZTWexxgCYCFz30cquD8oYVQgtUAUzfo8wGtqGoNRFmFZ1KKulJMQu3Vpm/I8Pup3ekvES57GaabXo4lsszEA6zrkhcmAAkBNshi59O9wVsokBLZUCQAxllXVBkyCDRQuTlLLiLSEqw3gfUqU0kVdsKymsnzyPLm8fXZxDxVZgvUhg9QyaKDI7AhpSlRVEaA83JM+/V8pGO0PMTHyZwra9FQVk4i1e0D6dPK9v5agkmXAhc0Bw5MjlAQQE0lSDbUmbBX4kGfsiiQWuSZtdle1S4F73cUKJgviyw4mmmqlVSoR/FAK2d1noWQZ8N79MySw0tgNzhN00jRFaPM6y3IyLWBxXuOdvMfhaIy1MQctmvnEMGrMq2Y/ekC3dHF14I84gmZP2s0pgiJFHVwYhIIrMC1zgT4fQgsS0CG48LWtslAsgeKZK5U1c5Slj+nEvvJZqOWubr5ks8iE3bVqCMQCz4p5aiUqpMrOdHz2qLFTxAMSPLwY8WpmntNwrXIMCWvESGH+7n9hVi6ZJ6/sR5gnycFFQgsCQEEB8T9TbsCGy4PrZrEBjGyIt4EApoGRXWKP6Mt3fnvOvhWBjR4gdjtJEDmGQQkBSCS6Teys5qECABTPWOBwcPWgAPIU+E2+Rq3J8lsrQawMHNPbqAXvRqasWcMB/mK42N3twM6/FsbJTZK2Fru15K7niPVIp6RHn++9vRKErAg8ta+MFq4LBxAJKY1EajpxLj5KUzFzOMTni4btxoUzXPzIIOwLnEPxGVqlyWoTdO/WNRUXJhDmAgNAJVd0eABj8FTCvLbpEnxdOycJlFNXVq6MDvzthwOQ654LaMGGVofQWIWtXhM9xaCQp85QIZFMPXcpuUPH3uquJj6htVonvySD+KY6c2AulPAzHdVaZElvPCGBgvkIRUECr1J4qmV6LdGyJvAnu+94HZMla1Eg1AuGVyQWnNCwzqsUXK5+AIsUyPRc1Rbpi93X1xK9tsXtkj9U7INWSWvU0DaZ6OlVAmUDiqgbrwY2Z3ThRVKFXrgi/R0x9GMplxAyER6ynAtZin1DQoLVznLMU+/mywMf3dlDpbyMlbjLQDhLw/Sh24sm5dhTrlHKgS/T0X2zLw/sLeGr5OlEbg2uHwAFw5reKuKsJj8kcIj0zq9H5PqAj+z6E8y+YRIaUhnAEOrcWgv9m3shQ1H7mz5duVJtDLhZqZcNlrEDwXKwCzncdFg+PJeVf1m3uPUupLR7Hq6tHNyLhw1TCmdGbm0BmaUjr63LzaMBH943D9f+yO5uZ7HfcLktqdwqMU0jtPUDN6vDOfzgKFrXtta6q83vfHU4M5KoURbT4W3zsPIqrgQFO8GozV8ocZGOTN4dRdRowN6CnOLmKkk5t7H1i+HPNGJj2kj7buYajoRXh2+36eOt+2nENrrF3ozODEmFC0D4hjbQNgYc+DSYjd9qqGSJXqL/tZ16/DWdfvw9bbCt41hcpYn9RAEX9Q22fwC74ny5v9iplQAAAABJRU5ErkJggg=="},A=new c({data:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:14,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:2,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:[0,122,194,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:16,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:0,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:[0,0,0,66]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,offsetX:0,offsetY:-1},h],angleAlignment:"Map"},primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"Rotation",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Rotation override",expression:"360 - $feature.heading",returnType:"Default"}},{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"TintColor",valueExpressionInfo:{type:"CIMExpressionInfo",title:"TintColor override",expression:"IIF(IsEmpty($feature.heading), [255, 255, 255, 0], [255, 255, 255, 1])",returnType:"Default"}}]}});let u=class extends(y(o)){constructor(){super(...arguments),this._geolocationUsable=!0,this.geolocationOptions=null,this.goToLocationEnabled=!0,this.graphic=new t({symbol:A}),this.scale=null,this.rotationEnabled=!0,this.view=null}initialize(){m()||(this._geolocationUsable=!1),this.addHandles([n(()=>this.view?.type,()=>this._handleViewTypeChange(),s)])}destroy(){this._clearGraphic(),this.view=null}_clearGraphic(){const{view:e,graphic:t}=this;e&&t&&e.graphics.remove(t)}_addGraphic(){const{view:e,graphic:t}=this;e?.graphics&&t&&!e.graphics.includes(t)&&e.graphics.push(t)}_handleViewTypeChange(){h.enable="2d"===this.view?.type}_getScaleWithinConstraints(e,t){if(!t)return e;if("2d"===t.type){const{effectiveMaxScale:i,effectiveMinScale:o}=t.constraints;return Math.min(o,Math.max(i,e))}return e}_getScale(e){const{scale:t}=this,i="number"==typeof t?t:g;return this._getScaleWithinConstraints(i,e)}_getHeading(e,t){const i=t?.spatialReference,o=i?.isWebMercator||i?.isGeographic,r=e.coords?.heading;return!o||"number"!=typeof r||isNaN(r)||r<0||r>360?null:r}_addHeading(e){const{heading:t,target:i,view:o}=e;o&&null!==t&&("3d"!==o.type?"2d"===o.type&&(i.rotation=360-t):i.heading=t)}async _animatePoint(e,t,i,o){const{view:a}=this;if(!this.goToLocationEnabled||!a)return;const n={target:e,scale:t};this.rotationEnabled&&this._addHeading({heading:i,target:n,view:a});const s={signal:o.signal};r(s),await this.callGoTo({target:n,options:s})}async updatePosition(e,t){try{const i=this.view,o=await d({position:e,view:i},{signal:t.signal}),{graphic:r}=this,{timestamp:a,coords:n}=e,{accuracy:s,altitude:l,altitudeAccuracy:p,latitude:c,longitude:m,speed:y}=n,g=this._getHeading(e,i),h={timestamp:a,accuracy:s,altitude:l,altitudeAccuracy:p,heading:g,latitude:c,longitude:m,speed:y};r&&(r.geometry=o,r.attributes=h);const A=this._getScale(i);await this._animatePoint(o,A,g,t)}catch(o){if(!a(o))throw new i("geolocation-positioning:invalid-point","Cannot position invalid point",{error:o})}return e}};e([l()],u.prototype,"_geolocationUsable",void 0),e([l()],u.prototype,"geolocationOptions",void 0),e([l()],u.prototype,"goToLocationEnabled",void 0),e([l({type:t,nonNullable:!0})],u.prototype,"graphic",void 0),e([l()],u.prototype,"scale",void 0),e([l()],u.prototype,"rotationEnabled",void 0),e([l()],u.prototype,"view",void 0),u=e([p("esri.widgets.support.GeolocationPositioning")],u);const v=u;export{v as default};
5
+ import{__decorate as e}from"tslib";import t from"../../Graphic.js";import i from"../../core/Error.js";import{EventedAccessor as o}from"../../core/Evented.js";import{throwIfAborted as r,isAbortError as a}from"../../core/promiseUtils.js";import{watch as n,initial as s}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../symbols/CIMSymbol.js";import{supported as m,positionToPoint as d}from"./geolocationUtils.js";import{GoTo as y}from"./GoTo.js";const g=2500,h={type:"CIMPictureMarker",primitiveName:"headingOverride",enable:!0,anchorPoint:{x:0,y:-.5},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:36,billboardMode3D:"FaceNearPlane",invertBackfaceTexture:!0,scaleX:1,textureFilter:"Picture",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAYAAACe0YppAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYaSURBVHgBvVfNb1VFFD/nzP16xRYJKYREEiJoDLLShQkrSNzoHv8I2QgxwY8FJWHhxoVxISEu2AordWNiQjAxEBeEsKAmhCCwkPDRAn1t33v33jnH37n3Fam0pa8kTjOde+/MnN/5+J0z85jW08yYTpxgfzx0bS+fO0R0YHqyeb9w7YEtLTv+9rSdOH7ciNleJJJX/Do1JQ3AltdlT35fiN6gG8kD8akdmzO+6w/zM7wdw725rUY78DBXtmATA6PZntFgm9Kjm6o/HFJpdi5Xhp+16sDBC+H+gUmZfjIXHKC+35U42ZHZfpe30BZS7okNFnhu8wTRk2ek5LEV2q+N8nEj6yuNVRjHddftrt4ahyJbOxF+Uppi/Rf47NlA05Pp9vkyRNkkD8sqUJHwOGfSpYFQFXhTJryQBaZSeAxbFus+U1K0gJm2oy3QKwuZzqeuSK5kpW6BEsE6+nCsAHDXQWuaOljzU8uP/ToxUW4KcwKg8QzOSdFL6Swm0hurAC7N2qIW7ncwNgYKF4la3/w7RnzrUK29KseXWqmTKXGl45Zrd9CLrsSjr96fcw4kS46mTsJznSTrVBR6VQJQdDbpZTWexxgCYCFz30cquD8oYVQgtUAUzfo8wGtqGoNRFmFZ1KKulJMQu3Vpm/I8Pup3ekvES57GaabXo4lsszEA6zrkhcmAAkBNshi59O9wVsokBLZUCQAxllXVBkyCDRQuTlLLiLSEqw3gfUqU0kVdsKymsnzyPLm8fXZxDxVZgvUhg9QyaKDI7AhpSlRVEaA83JM+/V8pGO0PMTHyZwra9FQVk4i1e0D6dPK9v5agkmXAhc0Bw5MjlAQQE0lSDbUmbBX4kGfsiiQWuSZtdle1S4F73cUKJgviyw4mmmqlVSoR/FAK2d1noWQZ8N79MySw0tgNzhN00jRFaPM6y3IyLWBxXuOdvMfhaIy1MQctmvnEMGrMq2Y/ekC3dHF14I84gmZP2s0pgiJFHVwYhIIrMC1zgT4fQgsS0CG48LWtslAsgeKZK5U1c5Slj+nEvvJZqOWubr5ks8iE3bVqCMQCz4p5aiUqpMrOdHz2qLFTxAMSPLwY8WpmntNwrXIMCWvESGH+7n9hVi6ZJ6/sR5gnycFFQgsCQEEB8T9TbsCGy4PrZrEBjGyIt4EApoGRXWKP6Mt3fnvOvhWBjR4gdjtJEDmGQQkBSCS6Teys5qECABTPWOBwcPWgAPIU+E2+Rq3J8lsrQawMHNPbqAXvRqasWcMB/mK42N3twM6/FsbJTZK2Fru15K7niPVIp6RHn++9vRKErAg8ta+MFq4LBxAJKY1EajpxLj5KUzFzOMTni4btxoUzXPzIIOwLnEPxGVqlyWoTdO/WNRUXJhDmAgNAJVd0eABj8FTCvLbpEnxdOycJlFNXVq6MDvzthwOQ654LaMGGVofQWIWtXhM9xaCQp85QIZFMPXcpuUPH3uquJj6htVonvySD+KY6c2AulPAzHdVaZElvPCGBgvkIRUECr1J4qmV6LdGyJvAnu+94HZMla1Eg1AuGVyQWnNCwzqsUXK5+AIsUyPRc1Rbpi93X1xK9tsXtkj9U7INWSWvU0DaZ6OlVAmUDiqgbrwY2Z3ThRVKFXrgi/R0x9GMplxAyER6ynAtZin1DQoLVznLMU+/mywMf3dlDpbyMlbjLQDhLw/Sh24sm5dhTrlHKgS/T0X2zLw/sLeGr5OlEbg2uHwAFw5reKuKsJj8kcIj0zq9H5PqAj+z6E8y+YRIaUhnAEOrcWgv9m3shQ1H7mz5duVJtDLhZqZcNlrEDwXKwCzncdFg+PJeVf1m3uPUupLR7Hq6tHNyLhw1TCmdGbm0BmaUjr63LzaMBH943D9f+yO5uZ7HfcLktqdwqMU0jtPUDN6vDOfzgKFrXtta6q83vfHU4M5KoURbT4W3zsPIqrgQFO8GozV8ocZGOTN4dRdRowN6CnOLmKkk5t7H1i+HPNGJj2kj7buYajoRXh2+36eOt+2nENrrF3ozODEmFC0D4hjbQNgYc+DSYjd9qqGSJXqL/tZ16/DWdfvw9bbCt41hcpYn9RAEX9Q22fwC74ny5v9iplQAAAABJRU5ErkJggg=="},A=new c({data:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:14,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:2,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:[0,122,194,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:16,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:0,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:[0,0,0,66]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,offsetX:0,offsetY:-1},h],angleAlignment:"Map"},primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"Rotation",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Rotation override",expression:"360 - $feature.heading",returnType:"Default"}},{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"TintColor",valueExpressionInfo:{type:"CIMExpressionInfo",title:"TintColor override",expression:"IIF(IsEmpty($feature.heading), [255, 255, 255, 0], [255, 255, 255, 1])",returnType:"Default"}}]}});let u=class extends(y(o)){constructor(){super(...arguments),this._geolocationUsable=!0,this.geolocationOptions=null,this.goToLocationEnabled=!0,this.graphic=new t({symbol:A}),this.scale=null,this.rotationEnabled=!0,this.view=null}initialize(){m()||(this._geolocationUsable=!1),this.addHandles([n(()=>this.view?.type,()=>this._handleViewTypeChange(),s)])}destroy(){this._clearGraphic(),this.view=null}_clearGraphic(){const{view:e,graphic:t}=this;e&&t&&e.graphics.remove(t)}_addGraphic(){const{view:e,graphic:t}=this;e?.graphics&&t&&!e.graphics.includes(t)&&e.graphics.push(t)}_handleViewTypeChange(){h.enable="2d"===this.view?.type}_getScaleWithinConstraints(e,t){if(!t)return e;if("2d"===t.type){const{effectiveMaxScale:i,effectiveMinScale:o}=t.constraints;return Math.min(o,Math.max(i,e))}return e}_getScale(e){const{scale:t}=this,i="number"==typeof t?t:g;return this._getScaleWithinConstraints(i,e)}_getHeading(e,t){const i=t?.spatialReference,o=i?.isWebMercator||i?.isGeographic,r=e.coords?.heading;return!o||"number"!=typeof r||isNaN(r)||r<0||r>360?null:r}_addHeading(e){const{heading:t,target:i,view:o}=e;o&&null!==t&&("3d"!==o.type?"2d"===o.type&&(i.rotation=360-t):i.heading=t)}async _animatePoint(e,t,i,o){const{view:a}=this;if(!this.goToLocationEnabled||!a)return;const n={target:e,scale:t};this.rotationEnabled&&this._addHeading({heading:i,target:n,view:a});const s={signal:o.signal};r(s),await this.callGoTo({target:n,options:s})}async updatePosition(e,t){try{const i=this.view,o=await d({position:e,view:i},{signal:t.signal}),{graphic:r}=this,{timestamp:a,coords:n}=e,{accuracy:s,altitude:l,altitudeAccuracy:p,latitude:c,longitude:m,speed:y}=n,g=this._getHeading(e,i),h={timestamp:a,accuracy:s,altitude:l,altitudeAccuracy:p,heading:g,latitude:c,longitude:m,speed:y};r&&(r.geometry=o,r.attributes=h);const A=this._getScale(i);await this._animatePoint(o,A,g,t)}catch(o){if(!a(o))throw new i("geolocation-positioning:invalid-point","Cannot position invalid point",{error:o})}return e}};e([l()],u.prototype,"_geolocationUsable",void 0),e([l()],u.prototype,"geolocationOptions",void 0),e([l()],u.prototype,"goToLocationEnabled",void 0),e([l({type:t,nonNullable:!0})],u.prototype,"graphic",void 0),e([l()],u.prototype,"scale",void 0),e([l()],u.prototype,"rotationEnabled",void 0),e([l()],u.prototype,"view",void 0),u=e([p("esri.widgets.support.GeolocationPositioning")],u);const v=u;export{v as default};
@@ -1,4 +1,4 @@
1
1
  import "../../interfaces";
2
2
 
3
3
  import GoTo = __esri.GoTo;
4
- export default GoTo;
4
+ export { GoTo };
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import{assertIsSome as r}from"../../core/maybe.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 e}from"../../core/accessorSupport/decorators/subclass.js";import{goTo as s}from"./goToUtils.js";const i=i=>{const p=i;let c=class extends p{constructor(...o){super(...o),this.goToOverride=null,this.view=null}callGoTo(o){const{view:t}=this;return r(t),this.goToOverride?this.goToOverride(t,o):s(t,o.target,o.options)}};return o([t()],c.prototype,"goToOverride",void 0),o([t()],c.prototype,"view",void 0),c=o([e("esri.widgets.support.GoTo")],c),c};export{i as default};
5
+ import{__decorate as o}from"tslib";import{assertIsSome as r}from"../../core/maybe.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 e}from"../../core/accessorSupport/decorators/subclass.js";import{goTo as s}from"./goToUtils.js";const i=i=>{const p=i;let c=class extends p{constructor(...o){super(...o),this.goToOverride=null,this.view=null}callGoTo(o){const{view:t}=this;return r(t),this.goToOverride?this.goToOverride(t,o):s(t,o.target,o.options)}};return o([t()],c.prototype,"goToOverride",void 0),o([t()],c.prototype,"view",void 0),c=o([e("esri.widgets.support.GoTo")],c),c};export{i as GoTo};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4123,5245,7136],{4197:(e,t,i)=>{i.d(t,{cj:()=>o,jh:()=>r,l5:()=>a,xm:()=>n});var s=i(34275);function r(e,t=!1){return e<=s.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function n(e){return((0,s.iu)(e)?e.byteLength/8:e.length)<=s.y9?Array.from(e):new Float64Array(e)}function a(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function o(e){return[...e]}},5834:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(31635),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function h(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},7320:(e,t,i)=>{i.d(t,{g:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const s=new r(e.getPointX(t),e.getPointY(t),i),n=e.hasZ(t),a=e.hasM(t);return n&&(s.z=e.getPointZ(t)),a&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,i){return new n(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new a(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new o(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const s=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(s){const i=e.getZExtent(t);n.zmin=i.vmin,n.zmax=i.vmax}if(r){const i=e.getMExtent(t);n.mmin=i.vmin,n.mmax=i.vmax}return n}};class r{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class n{constructor(e,t,i,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class a{constructor(e,t,i,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class o{constructor(e,t,i,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class l{constructor(e,t,i,s,r){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=s,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,i)=>{i.d(t,{G:()=>E});var s=i(4718),r=i(12359),n=i(90634),a=i(62577),o=i(21325),l=i(29441),u=i(51441),c=i(30524),h=i(87445),d=i(1873),p=i(43668);class m{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,l.Wq)(t),r=this.fieldsIndex.get(s),n=r?null:(0,l.j4)(s,i),a=r?r.name:(0,l.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){const s=i?i.name:t;let r=null;return this._fieldDataCache.has(s)?r=this._fieldDataCache.get(s)?.clause:i||(r=(0,l.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:r})),i?this.featureAdapter.getAttribute(e,s):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,c.zD)(n)||(0,c.Ah)(n),o=(0,c.OH)(n);return e.map(e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,d.gJ)(n)}${t.fieldDelimiter}${(0,d.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,d.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&i&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,h.rb)(n):null)),s&&Number.isFinite(n)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,d.zS)(n,s,i,r)}return n})}async getExpressionValues(e,t,i,s,r){const{arcadeUtils:n}=await(0,p.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(i),c={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:c,geometry:a?{...(0,u.pL)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},h=n.createExecContext(t,l,r);return n.executeFunction(o,h)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:r}=this._fieldDataCache.get(s);i[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let r=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++r),r>1?null:e}}var f=i(31464),y=i(58727);function g(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function _(e,t,i,s,r,n=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:r,draped:n}}var T=i(5834),x=i(59977),F=i(57231),I=i(11440),R=i(60909),S=i(98623),v=i(96285);const w="bin";class E{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new m(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of s){const{statisticType:s}=r,l="exceedslimit"!==s?r.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,n);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:r}=u[t],n=s.join(",");i&&!e.validateItems(r,i)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...(0,f.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,r=b(this.hasZ,this.hasM),{point:n,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,d=this._getPointCreator(a,t,this.spatialReference,i),p=new M(null,0),m=new M(null,0),f={x:0,y:0,z:0};for(const t of this.items){const i=s.getGeometry(t);if(null==i)continue;const{coords:a}=i,y=i.isPoint?C:i.lengths;if(p.coords=a,m.coords=a,e.returnEdge){let e=0;for(let i=0;i<y.length;i++){const a=y[i],h=e;for(let i=0;i<a;i++,e+=r){if(!c&&i===a-1)continue;const y=p;y.coordsIndex=e;const g=m;g.coordsIndex=i===a-1?h:e+r;const T=f;if(!A(f,n,y,g))continue;const x=(n.x-T.x)/o,F=(n.y-T.y)/l,I=x*x+F*F;I<=1&&u.candidates.push(_(s.getObjectId(t),d(T),Math.sqrt(I),d(y),d(g)))}}}if("all"===e.vertexMode){let e=0;for(let i=0;i<y.length;i++){const a=y[i],h=e,f=m;f.coordsIndex=h;for(let i=0;i<a;i++,e+=r){const r=p;if(r.coordsIndex=e,c&&i===a-1&&r.x===f.x&&r.y===f.y)continue;const h=(n.x-r.x)/o,m=(n.y-r.y)/l,y=h*h+m*m;y<=1&&u.candidates.push(g(s.getObjectId(t),d(r),Math.sqrt(y)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const i=[];for(let t=0;t<y.length;t++){i.push(e);const s=y[t];e+=s*r,!c&&s>1&&i.push(e-r)}for(const e of i){const i=p;i.coordsIndex=e;const r=(n.x-i.x)/o,a=(n.y-i.y)/l,c=r*r+a*a;c<=1&&u.candidates.push(g(s.getObjectId(t),d(i),Math.sqrt(c)))}}}return u.candidates.sort((e,t)=>e.distance-t.distance),u}_getPointCreator(e,t,i,s){const r=null==s||(0,o.aI)(i,s)?e=>e:e=>(0,f.Cv)(e,i,s),{hasZ:n}=this;return"3d"===e?n&&t?({x:e,y:t,z:i})=>r({x:e,y:t,z:i}):({x:e,y:t})=>r({x:e,y:t,z:0}):({x:e,y:t})=>r({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:h}=e,p=this.fieldsIndex.get(t),m=(0,c.vE)(p)||(0,c.zD)(p)||(0,c.Ah)(p),f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,d.Vb)({normalizationType:r,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:p?.type},_=(0,c.yM)(p)?(0,d.z9)({values:f,supportsNullCount:y,percentileParams:g,outStatisticTypes:h}):(0,d.G_)({values:f,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:h});return(0,d.oZ)(_,h,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:a},this.items,!1),l=(0,d.b3)(o);return(0,d.lv)(l,s,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:p}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:p},this.items),f=(0,d.Rw)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,d.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:p}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:p},this.items);return(0,d.$y)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,d.FM)(n?.type,a);e.sort((e,t)=>{const s=i(e,r,n),a=i(t,r,n);return o(s,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:r,objectIdField:n,spatialReference:o}=this,{outFields:l,outSR:c,quantizationParameters:h,resultRecordCount:d,resultOffset:p,returnZ:m,returnM:f}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&f,hasZ:r&&m,objectIdFieldName:n,spatialReference:(0,u.ag)(c||o),transform:h&&(0,a.VV)(h)||null}}_createFeatures(e,t){const i=new m(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:r}=this,{orderByFields:n,quantizationParameters:o,returnGeometry:l,returnCentroid:c,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:f=!1,returnM:y=!1}=e,g=r&&f,_=s&&y;let T=[],x=0;const F=[...t];if(this._sortFeatures(F,n,(e,t,s)=>i.getFieldValue(e,t,s)),this.geometryType&&(l||c)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!c)for(const s of F){const r=this.featureAdapter.getGeometry(s),n={attributes:i.getAttributes(s),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_),metadata:this.featureAdapter.getMetadata?.(s)};t&&r&&!n.geometry&&(n.centroid=(0,u.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),T[x++]=n}else if(!l&&c)for(const t of F)T[x++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of F)T[x++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,g,_),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of F){const t=i.getAttributes(e);t&&(T[x++]={attributes:t})}const I=d||0;if(null!=p){const e=I+p;T=T.slice(I,Math.min(T.length,e))}return T}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=b(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new m(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:h,having:d,orderByFields:p,resultRecordCount:f}=e,y=h?.length,g=!!y,_=g?h[0]:null,T=g&&!this.fieldsIndex.get(_);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,m=e,f="exceedslimit"!==p?e.onStatisticField:void 0,x="percentile_disc"===p||"percentile_cont"===p,F="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,I=g&&1===y&&(f===_||T)&&"count"===p;if(g){if(!a.has(f)){const e=[];for(const i of h){const s=this._getAttributeValues(l,i,t,r);e.push(s)}a.set(f,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const e=a.get(f);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:n,items:a,itemPositions:c}=e[s],p=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(F){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(m,a);e.aggregateGeometries[i]=t}else{let s=null;if(I)s=i;else{const e=this._getAttributeValues(l,f,t,r),i=c.map(t=>e[t]);s=x&&"statisticParameters"in m?this._getPercentileValue(m,i):this._getStatisticValue(m,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;h.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=n[i]),o.set(p,e)}}}else if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(m,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,f,t,r);i.attributes[u]=x&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,n,l.returnDistinctValues)}const R="min"!==p&&"max"!==p||!(0,c.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;s.push({name:u,alias:u,type:R||"esriFieldTypeDouble"})}const x=g?Array.from(o.values()):[i];return this._sortFeatures(x,p,(e,t)=>e.attributes[t]),f&&(x.length=Math.min(f,x.length)),{fields:s,features:x}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,c.vE)(t)||(0,c.zD)(t)||(0,c.Ah)(t)||(0,c.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:a}=await Promise.all([i.e(9930),i.e(9940)]).then(i.bind(i,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:c,spatialReference:h,geometryType:d,hasZ:p,hasM:m}=this,f=t.map(e=>(0,u.pL)(d,p,m,c.getGeometry(e))),y=s(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,n.v)(y):(0,n.HA)(a(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,r.l8)(y):(0,r.Z4)((0,n.HA)(a(h,f)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:h},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,i,s){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=i?.has(r)?i.get(r):(0,c.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,d.z9)({values:t,returnDistinct:s}):(0,d.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:r}=e,{value:n,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,d.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const r=this.fieldsIndex.get(t),n=i.map(i=>e.getFieldValue(i,t,r));return s.set(t,n),n}_calculateUniqueValues(e,t,i){const s={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(i||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t,i=!0){const r=new m(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,s.o8)(e),i)}async _calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,r=t.min??0,n=t.max??0,a=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=r&&o<=n){const e=(0,d.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:r}=t,n=[],a=[{name:s??i,alias:s??i,type:r??"esriFieldTypeString"},{name:w,alias:w,type:"esriFieldTypeInteger"}],o=new m(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),h=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in h){const{items:r}=h[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(x.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(I.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(R.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,d.sU)(c,{field:s,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,y.dO)(l,!1),maxValue:(0,y.dO)(u,!1)}),p=await this._calculateHistogramBins(c,h,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:r,start:n,end:a,snapToData:o,returnFullIntervalBin:l}=e,u=r.unit,h=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,c.OH)(this.fieldsIndex.get(s)),p=F.g.toJSON(u),m=h.filter(Boolean).sort((e,t)=>e-t),f=null!=n?(0,y.dO)(n,d):m[0],g=null!=a?(0,y.dO)(a,d):m[m.length-1],_={zone:t.outTimeReference?.ianaTimeZone??S.n$},T=v.c9.fromMillis(f,_),x=v.c9.fromMillis(g,_),I=[];if("last"===o){let e=x;for(;e>T;){const t=e.minus({[p]:r.value});if(t<T){I.unshift([l?t.toMillis():T.toMillis(),e.toMillis()]);break}I.unshift([t.toMillis(),e.toMillis()]),e=t}}else{let e="first"===o?T:T.startOf(p);for(;e<=x;){const t=e.plus({[p]:r.value});if(t>x){I.push([e.toMillis(),l?t.toMillis():x.toMillis()]);break}I.push([e.toMillis(),t.toMillis()]),e=t}}const R=await this._calculateHistogramBins(h,{intervals:I,min:f,max:g},i);return this._createFeaturesFromHistogramBins(R,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,r=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),n=(0,c.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map(e=>(0,y.dO)(e,n)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=await this._calculateHistogramBins(r,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:r,start:n,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=(0,c.OH)(this.fieldsIndex.get(s)),u=(0,d.sU)(o,{field:s,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,y.dO)(n,l),maxValue:(0,y.dO)(a,l)},!0),h=await this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(h,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,r=s||"lowerBoundary",n=i||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:w,alias:w,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const h="dateBin"===t.bin.type,d=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:s,items:p}=i,m={attributes:{}};let f;if(m.attributes[r]=h&&d&&null!=e?v.c9.fromMillis(e,{zone:d}).toISO():e,m.attributes[n]=h&&d&&null!=s?v.c9.fromMillis(s,{zone:d}).toISO():s,l?(f=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},p),m.attributes[w]=++c,"flat"===t.bin.jsonStyle?a.push(...f.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=f.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(m))):(t.bin?.splitBy&&(m.attributes[w]=++c),f=await this._createStatisticsQueryResponse(t,p,m),a.push(m)),f.fields)for(const e of f.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function A(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+r*c,e.y=i.y+n*c,!0}function b(e,t){return e?t?4:3:t?3:2}class M{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const C=[1]},11006:(e,t,i)=>{function s(e,t,i,s,n){r(e,t,i||0,s||e.length-1,n||a)}function r(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/o+h)),Math.min(s,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=i,m=s;for(n(e,i,t),a(e[s],d)>0&&n(e,i,s);p<m;){for(n(e,p,m),p++,m--;a(e[p],d)<0;)p++;for(;a(e[m],d)>0;)m--}0===a(e[i],d)?n(e,i,m):n(e,++m,s),m<=t&&(i=m+1),t<=m&&(s=m-1)}}function n(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},11440:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(31635),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,r.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],c.prototype,"boundaries",void 0),(0,s.Cg)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c),c.from=(0,a.dp)(c)},17136:(e,t,i)=>{i.d(t,{O7:()=>R,el:()=>I});var s=i(92602),r=i(49186),n=i(53966),a=i(39829),o=i(82799),l=i(80754),u=i(21325),c=i(28735),h=i(78888),d=i(65864),p=i(2272),m=i(84952),f=i(92300);const y=()=>n.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function T(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A("internal:geometry",e)}const i=(0,l.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],n=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,a=c*s+r,o=u*s+n;i.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,s=c*e+r,a=u*e+n;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new o.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function x(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function F(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],n=t.geometries[s],a=(0,l.r8)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=n.getPoint(e,i);n.setPoint(e,i,t.clone().offset(s,0))}return!0}})}if(r===i){if(g(e))for(const t of(0,l.r8)(n))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,l.r8)(n))e[r]=e[r].addPath(t)}else i=r,e[r]=n}return e}async function I(e,t,i){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let n,g,_,R,S,v,w,E,A=0;const b=[],M=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,g=(0,u.Vp)(n),_=n.isWebMercator,v=_?102100:4326,R=l.j7[v].maxX,S=l.j7[v].minX,w=l.j7[v].plus180Line,E=l.j7[v].minus180Line),g)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(x(t.clone(),R,S));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>x(e,R,S)),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);M.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,S)*(2*R);let s=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(w)&&n!==R?(A=n>A?n:A,s=T(s,_),b.push(s),M.push("cut")):e.intersects(E)&&r!==S?(A=n*(2*R)>A?n*(2*R):A,s=T(s,_,360),b.push(s),M.push("cut")):M.push(s)}else M.push(t.clone());else M.push(t);else M.push(t);let C=(0,l.kd)(A,R),N=-90;const O=C,P=new o.A;for(;C>0;){const e=360*C-180;P.addPath([[e,N],[e,-1*N]]),N*=-1,C--}if(b.length>0&&O>0){const t=F(b,await async function(e,t,i,s){const r=(0,p.Dl)(e),n=t[0].spatialReference,a={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(n),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,d.rS)(e);return t.spatialReference=n,t})}}(r,b,P,i)),s=[],n=[];for(let i=0;i<M.length;i++){const r=M[i];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(s.push(r),n.push("simplify")):n.push(_?(0,c.Gh)(r):r)}}if(!s.length)return n;const a=await async function(e,t,i){const s="string"==typeof e?(0,m.An)(e):e,r=t[0].spatialReference,n=(0,d.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,f.X)(t))}},{data:o}=await(0,h.A)(s.path+"/simplify",a);return(0,f.V)(o.geometries,n,r)}(r,s,i),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const B=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)B.push(t);else{const e=b.shift();B.push(!0===_?(0,c.Gh)(e):e)}}return B}function R(e,t,i){const s=(0,u.Vp)(i);if(null==s)return e;const[r,n]=s.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let c=e+(o-l)*a;const h=c-t;return h>n?c-=a:h<r&&(c+=a),c}},29441:(e,t,i)=>{i.d(t,{MG:()=>_,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>m,j4:()=>f,vl:()=>u});var s=i(49186),r=i(44123),n=i(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),h=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function d(e,t,i={}){const r=f(t,e);if(!r){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const n=i.expressionName||"expression";if(i.validateStandardized&&!r.isStandardized)throw new s.A(o,`${n} is not standard`,{expression:t});if(i.validateAggregate&&!r.isAggregate)throw new s.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function p(e,t,i,s){if(!i)return!0;const r="where clause";return _(e,t,d(e,i,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:s}),!0}function m(e,t,i,r,n){if(!i)return!0;const a="having clause",l=d(e,i,{validateAggregate:!0,expressionName:a});_(e,t,l,{expressionName:a,query:n});const u=f(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:s}=t,n=e.get(s)?.name;return r.some(t=>{const{onStatisticField:s,statisticType:r}=t,a=e.get(s)?.name;return a===n&&r.toLowerCase().trim()===i})});if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function f(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function _(e,t,i,r={}){const n=new Map;if(function(e,t,i,s,r){const n=r.includes("*")?[...i,...r.filter(e=>"*"!==e)]:r;for(const r of n)if(t.get(r))T(e,t,i,s,r);else try{const n=d(t,y(r),{validateStandardized:!0});for(const r of n)T(e,t,i,s,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??h,i),n.size){const e=r.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function T(e,t,i,s,r){const a=t.get(r);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,e=>n.m.fromJSON(e))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var s=i(4576),r=i(74887),n=i(98988),a=i(7320),o=i(21325),l=i(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,u),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,u),[i.xmax,i.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const i=[];for(const s of e)i.push(d(s,t));return i}function d(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,n.initializeProjection)(i.map(e=>({source:e,dest:t})))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(i)||(0,o.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,o.K8)(i)?m(e):f(e);return t.spatialReference=i,t}return(0,n.projectMany)(a.g,[e],t,i,null,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,o.aI)(t,i))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:s,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:r,geographicTransformation:u}=e;(0,l.y7)(i,s)?(0,o.K8)(s)?r(t.map(m)):r(t.map(f)):r((0,n.projectMany)(a.g,t,i,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,i,s){return g.push(e,t,i,s)}},41266:(e,t,i)=>{i.d(t,{A:()=>y});var s=i(31635),r=i(69540),n=i(66552),a=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(56507);const h=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,r.O)(a.A)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,s.Cg)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,s.Cg)([(0,l.e)(h)],d.prototype,"valueType",void 0),d=(0,s.Cg)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,c.dp)(d);const m=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends((0,r.O)(a.A)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,s.Cg)([(0,l.e)(m,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,s.Cg)([(0,l.e)(f)],y.prototype,"transformation",void 0),y=(0,s.Cg)([(0,u.$)("esri.rest.support.BinParametersBase")],y)},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>u});var s=i(31635),r=i(66552),n=i(53966),a=i(10107),o=(i(44208),i(87811),i(93223)),l=i(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,o.e)(u,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,s.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},44123:(e,t,i)=>{i.r(t),i.d(t,{WhereClauseCache:()=>n});var s=i(66344),r=i(88368);class n{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=r.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),r=i(62788),n=i(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var s=i(90708),r=i(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:s.DF,esriGeometryPolyline:s.BW,esriGeometryPolygon:s.z5,esriGeometryMultipoint:s.qK};function u(e,t,i,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(i){const u=(0,s.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",i,r,n);return(0,s.DF)(u,a,l)}return(0,s.DF)(t,a,l)}function c(e,t,i,r,u,c,h=t,d=i){const p=t&&h,m=i&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,s.kz)(a,f,t,i,e,u,h,d);return c&&(r=(0,s.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,s.Nl)(o,f,t,i,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,s.Q4)(n,f,t,i,h,d),l[e]?.(n,p,m)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,p)):e}const d="_geVersion",p=(e,t)=>e===d?void 0:t},54339:(e,t,i)=>{function s(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const s of t.fieldNames)i.push(e.attributes[s]??null);return JSON.stringify(i)}}}function r(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>s,r:()=>r})},57231:(e,t,i)=>{i.d(t,{g:()=>s});const s=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},58727:(e,t,i)=>{i.d(t,{GC:()=>y,T2:()=>g,VY:()=>d,dO:()=>T,iJ:()=>f,v8:()=>p});var s=i(49186),r=i(66552),n=i(83047),a=i(98988),o=i(90634),l=i(65864),u=i(17136),c=i(21325),h=i(31464);const d=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m="frequency";async function f(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?d.fromJSON(r):(0,n.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,h.Nk)(o,c.KK).then(()=>(0,h.Cv)(a,c.KK)),m=await i.e(9159).then(i.bind(i,49159));await m.load();const f=m.execute(p,t||1,{unit:u})??void 0;if(!f||!(0,l.Bi)(f)||0===f.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return f}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,h.Nk)(m.spatialReference,r),m=function(e,t){const i=e.spatialReference;return _(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,u.el)((0,l.rS)(m)))[0];if(null==t)throw p;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&_(m,r)?{densificationStep:8*i}:void 0,n=t.toJSON(),a=(0,h.Cv)(n,n.spatialReference,r,s);if(!a)throw p;a.spatialReference=r,e.geometry=a}return e}function _(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function T(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>g});var s=i(31635),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(69540),h=i(25482),d=i(57231);let p=class extends((0,c.O)(h.A)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,s.Cg)([(0,o.e)(d.g)],p.prototype,"unit",void 0),p=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],p);const m=p;function f(e,t,i){(0,r.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function y(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let g=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,s.Cg)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>y(t,"end")},write:{writer:f}}})],g.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({type:m,json:{name:"parameters",write:!0}})],g.prototype,"interval",void 0),(0,s.Cg)([(0,n.MZ)({type:m,json:{name:"parameters.offset",write:!0}})],g.prototype,"offset",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],g.prototype,"returnFullIntervalBin",void 0),(0,s.Cg)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>y(t,"start")},write:{writer:f}}})],g.prototype,"start",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],g.prototype,"snapToData",void 0),(0,s.Cg)([(0,o.e)({dateBin:"date"},{readOnly:!0})],g.prototype,"type",void 0),g=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinParameters")],g),g.from=(0,a.dp)(g)},60909:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(31635),r=i(93637),n=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function h(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},62660:(e,t,i)=>{i.d(t,{tC:()=>F,c0:()=>x,xt:()=>T});var s=i(49186),r=i(94078),n=i(12176),a=i(65864),o=i(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,r,n){const a=l(r,n),{coords:o,lengths:u}=s;if(!u)return!1;for(let s=0,r=0;s<u.length;s++,r+=a)if(!c(e,t,i,o[r],o[r+1]))return!1;return!0}function c(e,t,i,s,r){if(!e)return!1;const n=l(t,i),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,s,r),c+=e*n;return u}function h(e,t,i,s,r,n,a){let o=e,l=s;for(let e=s,u=s+r*i;e<u;e+=i){l=e+i,l===u&&(l=s);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=i(90708),p=i(92722),m=i(51441),f=i(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},_={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function T(e,t,i,s,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===i){const i=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,!1,!1,e,s,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(i,s,o,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(i,s,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=i)?n.xB:(0,n.xK)(l);return r=>e(t,(0,m.pL)(i,s,o,r))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const h=await function(e){const t=_[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>h.execute(t,(0,m.pL)(i,s,o,e))}async function x(e,t,i){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new s.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(n))throw new s.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new s.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}}function F(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},62798:(e,t,i)=>{i.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var s=i(49186),r=i(29441),n=i(31464),a=i(62660),o=i(43668);const l="unsupported-query";async function u(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new s.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:i,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new s.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,i){const{outStatistics:n,groupByFieldsForStatistics:a,having:o}=i,u=a?.length,c=n?.length;if(o){if(!u||!c)throw new s.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,r.eD)(e,t,o,n,i)}if(c){if(null==(h=n)||!h.every(e=>"exceedslimit"!==e.statisticType))return;const o=n.map(e=>e.onStatisticField).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:i}),u&&(0,r.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:i});for(const a of n){const{onStatisticField:n,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(n)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[n],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:i});else{const{statisticParameters:e}=a;if(!e)throw new s.A(l,"statisticParameters should be set for percentile type",{definition:a,query:i})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,i,o),(0,n.Nk)(o,e.outSR)]).then(()=>e)}function h(e,t,i){const{returnDistinctValues:n,outStatistics:a}=i,o=a?a.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const s=" asc",n=" desc",a=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(n)?t.split(n)[0]:e}).filter(e=>!o.includes(e));(0,r.MG)(e,t,a,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,r.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(n)throw new s.A(l,"outFields should be specified for returnDistinctValues",{query:i});(0,r.SN)(e,t,i.where,i)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:i,geometryType:r,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new s.A(l,"Unsupported query options",{query:e});return h(i,u,e),Promise.all([m(i,u,t,e),(0,a.c0)(e,r,o),(0,n.Nk)(o,e.outSR)]).then(()=>e)}async function m(e,t,i,n){let a=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,o.l)();a=e.extractFieldNames(i.valueExpression)}if(i.field&&a.push(i.field),i.field2&&a.push(i.field2),i.field3&&a.push(i.field3),i.normalizationField&&a.push(i.normalizationField),!a.length&&!i.valueExpression)throw new s.A(l,"field or valueExpression is required",{params:i});(0,r.MG)(e,t,a,{expressionName:"statistics",query:n})}},70328:(e,t,i)=>{i.d(t,{BI:()=>_,Ej:()=>d,Ie:()=>y,Jt:()=>g,Ne:()=>p,RF:()=>c,aI:()=>x,fA:()=>a,gE:()=>l,hZ:()=>f,iT:()=>h,is:()=>T,qv:()=>F,vI:()=>m,vY:()=>o,v_:()=>I,vt:()=>n,w1:()=>u});var s=i(5443),r=(i(19419),i(4197));function n(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,s,r,a,o=n()){return o[0]=e,o[1]=t,o[2]=i,o[3]=s,o[4]=r,o[5]=a,o}function o(e,t=n()){return function(e,t,i,s=n()){return f(s,F),function(e,t,i=0,s=t.length/3){let r=e[0],n=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)r=Math.min(r,t[i+3*e]),n=Math.min(n,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=r,e[1]=n,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(s,e,t,i),s}(e,0,e.length/3,t)}function l(e,t=(0,r.jh)(24)){const[i,s,n,a,o,l]=e;return t[0]=i,t[1]=s,t[2]=n,t[3]=i,t[4]=s,t[5]=l,t[6]=i,t[7]=o,t[8]=n,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=s,t[14]=n,t[15]=a,t[16]=s,t[17]=l,t[18]=a,t[19]=o,t[20]=n,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new s.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?f(e,F):n(F)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function _(e,t,i,s,r){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function T(e){return 6===e.length}function x(e,t,i){if(null==e||null==t)return e===t;if(!T(e)||!T(t))return!1;if(i){for(let s=0;s<e.length;s++)if(!i(e[s],t[s]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];n()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),r=i(16930),n=i(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>n,W:()=>r});var s=i(21818);async function r(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach(e=>{const t=i.getAttribute((0,s.zI)(e),r),l=i.getAttribute((0,s.zI)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=r||n;await t.forEach(t=>{const r=i.getAttribute((0,s.zI)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))})}return{start:a,end:o}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:r}=e;if(!s&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&r?function(e,t,i,s,r){return null!=s&&null!=r?n=>{const a=e(n,t),o=e(n,i);return(null==a||a<=r)&&(null==o||o>=s)}:null!=s?t=>{const r=e(t,i);return null==r||r>=s}:null!=r?i=>{const s=e(i,t);return null==s||s<=r}:void 0}(o,s,r,n,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?r=>{const n=e(r,t);return null!=n&&n>=i&&n<=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r>=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r<=s}:void 0}(o,s||r,n,a)}},92300:(e,t,i)=>{i.d(t,{V:()=>n,X:()=>r});var s=i(65864);function r(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function n(e,t,i){const r=(0,s.xD)(t);return e.map(e=>{const t=r.fromJSON(e);return t.spatialReference=i,t})}},95422:(e,t,i)=>{i.d(t,{do:()=>le,ux:()=>ue});var s=i(4576),r=i(21818),n=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(83047),c=i(12195),h=i(98988),d=i(70328),p=i(19419),m=i(537),f=i(65864),y=i(21325),g=i(90708),_=i(29441),T=i(51441),x=i(31464);class F{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new R(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let I=0;class R{constructor(e){this.items=e,this.time=performance.now(),this.id=I++}}var S=i(99352),v=i(8384),w=i(58727),E=i(62798),A=i(62660),b=i(86420),M=i(95466),C=i(71511),N=i(53966),O=i(61604),P=i(36708),B=i(44794),G=i(78659);const k=Symbol("Yield");class z{constructor(){this._tasks=new Array,this._numPendingTasks=(0,B.v)(0),this._readyToRun=(0,B.v)(!1)}get length(){return this._tasks.length}get updating(){return this._numPendingTasks.value>0}get readyToRun(){return this._readyToRun.value}_updateReadyToRun(){this._readyToRun.value=this._tasks.length>0}destroy(){this.cancelAll()}runTask(e){if(0===this.length)return k;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,i){return this._addTask((s,r)=>new q(s,r,e,t,i),Array.prototype.push)}unshift(e,t,i){return this._addTask((s,r)=>new q(s,r,e,t,i),Array.prototype.unshift)}pushGenerator(e,t,i){const s=Array.prototype.push;return this._addTask((r,n)=>new Z(r,n,e,t,i,s),s)}unshiftGenerator(e,t,i){const s=Array.prototype.unshift;return this._addTask((r,n)=>new Z(r,n,e,t,i,s),s)}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();this._updateReadyToRun();try{if((0,l.G4)(t.signal))this._cancelTask(t,(0,l.NK)());else switch(t.type){case 0:this._processSimple(t,e);break;case 1:this._processGenerator(t,e);break;case 2:this._processIterator(t,e);break;default:(0,r.Xb)(t)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,l.NK)();for(const t of this._tasks)this._cancelTask(t,e);this._tasks.length=0,this._updateReadyToRun()}_cancelTask(e,t){if(e.abortCallback){const i=e.abortCallback(t);2===e.type&&e.iterator.return&&D(e.iterator.return()),(0,l.$X)(i)?i.then(e.resolve,e.reject):e.resolve(i)}else 2===e.type&&e.iterator.throw&&D(e.iterator.throw(t)),e.reject(t)}_onIteratorResult(e,t){t.done?e.resolve(t.value):(e.scheduleFunction.call(this._tasks,e),this._updateReadyToRun())}_processSimple(e,t){const i=e.callback(t);(0,l.$X)(i)?i.then(e.resolve,e.reject):e.resolve(i)}_processGenerator(e,t){const i=e.generatorFunction(t),s=new Q(e.resolve,e.reject,i,e.signal,e.abortCallback,e.scheduleFunction);this._processIterator(s,t)}_processIterator(e,t){const i=e.iterator.next(t);(0,l.$X)(i)?i.then(t=>this._onIteratorResult(e,t),e.reject):this._onIteratorResult(e,i)}_addTask(e,t){return new Promise((i,s)=>{const r=e(i,s);t.call(this._tasks,r),++this._numPendingTasks.value,this._updateReadyToRun()}).finally(()=>--this._numPendingTasks.value)}}function D(e){(0,l.$X)(e)?e.then(L):L(e)}function L(e){e.done||N.A.getLogger("esri.layers.support.PromiseQueue").warn("Generator iterator was aborted, but it is not done.")}class V{constructor(e,t,i=void 0,s=void 0){this.resolve=e,this.reject=t,this.signal=i,this.abortCallback=s}}class q extends V{constructor(e,t,i,s,r){super(e,t,s,r),this.callback=i,this.type=0}}class Z extends V{constructor(e,t,i,s,r,n){super(e,t,s,r),this.generatorFunction=i,this.scheduleFunction=n,this.type=1}}class Q extends V{constructor(e,t,i,s,r,n){super(e,t,s,r),this.iterator=i,this.scheduleFunction=n,this.type=2}}var j=i(31635),U=i(69622),H=i(10107),$=(i(87811),i(40608));let W=class extends U.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,j.Cg)([(0,H.MZ)()],W.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,j.Cg)([(0,H.MZ)()],W.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),W=(0,j.Cg)([(0,$.$)("esri.views.support.debugFlags")],W);const Y=new W;var J;!function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.STREAM_CONTROLLER="stream controller",e.OVERLAY="overlay",e.OVERLAY_RENDERER="overlay renderer",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.FLOW_GENERATOR="flow generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(J||(J={}));const X=new Map([[J.RESOURCE_CONTROLLER_IMMEDIATE,0],[J.RESOURCE_CONTROLLER,4],[J.SLIDE,0],[J.STREAM_DATA_LOADER,0],[J.ELEVATION_QUERY,0],[J.TERRAIN_SURFACE,1],[J.SURFACE_GEOMETRY_UPDATES,1],[J.LOD_RENDERER,2],[J.GRAPHICS_CORE,2],[J.I3S_CONTROLLER,2],[J.POINT_CLOUD_LAYER,2],[J.FEATURE_TILE_FETCHER,2],[J.STREAM_CONTROLLER,2],[J.CLOUDS_GENERATOR,2],[J.OVERLAY,4],[J.OVERLAY_RENDERER,4],[J.STAGE,4],[J.GRAPHICS_DECONFLICTOR,4],[J.FILTER_VISIBILITY,4],[J.SCALE_VISIBILITY,4],[J.FRUSTUM_VISIBILITY,4],[J.POINT_OF_INTEREST_FREQUENT,6],[J.POINT_OF_INTEREST_INFREQUENT,30],[J.LABELER,8],[J.FEATURE_QUERY_ENGINE,8],[J.FEATURE_TILE_TREE,16],[J.FEATURE_TILE_TREE_ACTIVE,0],[J.ELEVATION_ALIGNMENT,12],[J.ELEVATION_ALIGNMENT_SCENE,14],[J.TEXT_TEXTURE_ATLAS,12],[J.TEXTURE_UNLOAD,12],[J.LINE_OF_SIGHT_TOOL,16],[J.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[J.SNAPPING,0],[J.SHADOW_ACCUMULATOR,30],[J.FLOW_GENERATOR,12],[J.MAPVIEW_FETCH_QUEUE,0],[J.MAPVIEW_LAYERVIEW_UPDATE,2],[J.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function K(e){return X.has(e)?X.get(e):"number"==typeof e?e:1}const ee=(0,G.l5)(6.5),te=(0,G.l5)(1),ie=(0,G.l5)(30),se=(0,G.l5)(1e3/30),re=(0,G.l5)(100);var ne;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=(0,B.v)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new O.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new i,this._state=1,this._tasks=new Array,this._runQueue=new Array,this._load=0,this._idleStateCallbacks=new Array,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,P.wB)(()=>Y.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,P.Vh);for(const e of Object.keys(J))this.performanceInfo.tasks.set(J[e],new O.A(J[e]))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._idleStateCallbacks.length=0,this._runQueue.length=0,(0,o.xt)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,i){const s=new t(this,e,i);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new O.A(e)),s}registerIdleStateCallbacks(e,t){const i={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(i),2===this.state&&this._idleUpdatesStartFired&&i.idleBegin();const s=this;return{remove:()=>this._removeIdleStateCallbacks(i),set idleBegin(e){s._idleUpdatesStartFired&&(i.idleEnd(),2===s._state&&e()),i.idleBegin=e},set idleEnd(e){i.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,2!==this.state&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forEach(e=>e.idleEnd())))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=ee,i=e.frameDuration,s=te;switch(this.state){case 2:t=(0,G.l5)(0),i=(0,G.l5)(Math.max(re,e.frameDuration)),s=ie;break;case 1:i=(0,G.l5)(Math.max(se,e.frameDuration))}return i=(0,G.l5)(i-e.elapsedFrameTime-t),2!==this.state&&i<te&&!this._forceTask?(this._forceTask=!0,!1):(i=(0,G.l5)(Math.max(i,s)),this._budget.reset(i),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case 2:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forEach(e=>e.idleBegin())),this._runIdle();break;case 1:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset((0,G.l5)(0)),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),(0,s.Xy)(this._idleStateCallbacks,e)}removeTask(e){(0,s.Xy)(this._tasks,e),(0,s.Xy)(this._runQueue,e),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return"s";let t="i";return this._tasks.forEach(i=>{i.name===e&&i.needsUpdate&&(i.schedulePriority<=1?t="r":"r"!==t&&(t="w"))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(i=>{i.name===e&&(t+=i.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,i)=>{t+=e>1?` ${e}x ${i}`:` ${i}`}),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=.9*this._load+e*(1-.9)}_schedule(){for((0,s.$i)(this._runQueue,e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forEach(i=>{i.needsUpdate&&0!==i.schedulePriority&&0!==i.basePriority&&i.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,i.basePriority),1===i.schedulePriority?(i.schedulePriority=0,this._runQueue.push(i)):--i.schedulePriority)}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===k&&(t.blockFrame=this._frameNumber)}catch(e){N.A.getLogger("esri.views.support.Scheduler").error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,J.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const i=this._budget.now()-e;if(t.runtime+=i,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(J))this._frameTaskTimes.set(J[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}};class t{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,i){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new z,this._handles=new C.A,this._basePriority=K(t),this.schedulePriority=this._basePriority,this._task=(0,B.v)(null!=i?i:this._queue),this._handles.add((0,P.z7)(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this.processQueue(ae),this._scheduler.removeTask(this),this.schedule=oe.schedule,this.reschedule=oe.reschedule,this.scheduleGenerator=oe.scheduleGenerator,this.rescheduleGenerator=oe.rescheduleGenerator,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=K(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,i){return this._queue.push(e,t,i)}reschedule(e,t,i){return this._queue.unshift(e,t,i)}scheduleGenerator(e,t,i){return this._queue.pushGenerator(e,t,i)}rescheduleGenerator(e,t,i){return this._queue.unshiftGenerator(e,t,i)}processQueue(e){return this._queue.runTask(e)}}class i{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=i}(ne||(ne={}));const ae=new ne.Budget;ae.enabled=!1;const oe=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(ae))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const s=e(ae);for(;;){const e=s.next(ae),r=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}if(r.done)return r.value}}rescheduleGenerator(e,t,i){return this.rescheduleGenerator(e,t,i)}};class le{constructor(e){this._changeHandle=null,this.capabilities={query:S.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new F,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:M.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{},i);return await t.createQueryResponse()}catch(t){if(t!==w.v8)throw t;return new v.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},i)).createQueryResponseForCount()}catch(e){if(e!==w.v8)throw e;return 0}}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t),s=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===w.v8)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then(e=>Array.from(e))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),s=t.items,r=new Set;return await this.reschedule(()=>{for(const e of s)r.add(t.featureAdapter.getObjectId(e))},i),r}catch(e){if(e===w.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},i);return await this.reschedule(()=>this._filterLatest(t),i),await t.createQueryResponse()}catch(t){if(t!==w.v8)throw t;return new v.G([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);let s;e=(0,a.o8)(e);try{e=await this.schedule(()=>(0,w.iJ)(e,this.definitionExpression,this.spatialReference),i),e=await this.reschedule(()=>(0,E.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),i);const t=await this.reschedule(()=>this._executeSceneFilterQuery(e,i),i);s=await this.reschedule(()=>this._executeGeometryQuery(e,t,i),i),await this.reschedule(()=>this._executeAggregateIdsQuery(s),i),await this.reschedule(()=>this.executeObjectIdsQuery(s),i),await this.reschedule(()=>this.executeTimeQuery(s),i),await this.reschedule(()=>this.executeAttributesQuery(s),i)}catch(t){if(t!==w.v8)throw t;s=new v.G([],e,this)}return s.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,b.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}async _getBounds(e,t,i){const s=(0,d.hZ)((0,d.vt)(),d.qv);await this.featureStore.forEachBounds(e,e=>(0,d.RF)(s,e));const r={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:(0,T.ag)(this.spatialReference)};this.hasZ&&isFinite(s[2])&&isFinite(s[5])&&(r.zmin=s[2],r.zmax=s[5],r.hasZ=!0);const n=(0,x.Cv)(r,t,i);if(n.spatialReference=(0,T.ag)(i),n.xmax-n.xmin===0){const e=(0,u.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin===0){const e=(0,u.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin===0){const e=(0,u.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async schedule(e,t){return this._frameTask?.schedule(e,t)??e(ae)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(ae)}async _getAllFeaturesQueryEngineResult(e){return new v.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,r.zI)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,i){e=(0,a.o8)(e),e=await this.schedule(()=>(0,w.GC)(e,this.definitionExpression,this.spatialReference),i),e=await this.reschedule(()=>(0,E.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),i),e={...e,...t};const s=await this.reschedule(()=>this._executeSceneFilterQuery(e,i),i),r=await this.reschedule(()=>this._executeGeometryQuery(e,s,i),i);return await this.reschedule(()=>this._executeAggregateIdsQuery(r),i),await this.reschedule(()=>this.executeObjectIdsQuery(r),i),await this.reschedule(()=>this.executeTimeQuery(r),i),await this.reschedule(()=>this.executeAttributesQuery(r),i),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,y.aI)(n,a.spatialReference)?a:(0,x.Cv)(a,n);if(!o)return null;const l=s||r,u=(0,y.fn)(i)&&!(0,y.aI)(this.spatialReference,i)&&l?async e=>this._project(e,i):e=>e,c=this.featureAdapter,h=await this.reschedule(()=>this.searchFeatures(ue(o)),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const i=new Set;for(const e of h)i.add(c.getObjectId(e));const s=await this.reschedule(()=>this._getAllFeatures(),t),r=await this.reschedule(async()=>{const r=await(0,A.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(s,e=>!i.has(c.getObjectId(e))||r(c.getGeometry(e)),t);return new v.G(n,e,this)},t);return u(r)}if(!h.length)return new v.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new v.G(h,e,this));const d=await(0,A.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this.runSpatialFilter(h,e=>d(c.getGeometry(e)),t);return u(new v.G(p,e,this))}async _executeGeometryQuery(e,t,i){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:n,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new v.G(u,e,this);const c=(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n),h=a||o,d=async e=>(c&&h&&await this._project(e,n),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,m=!r||null==p||(0,y.aI)(p,r.spatialReference)?r:(0,x.Cv)(r,p);if(!m)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const f=this.featureAdapter;let g=await this.reschedule(()=>this.searchFeatures(ue(r)),i);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const s=new Set;for(const e of g)s.add(f.getObjectId(e));const r=null!=t?t.items:await this.reschedule(()=>this._getAllFeatures(),i),n=await this.reschedule(async()=>{const t=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(r,e=>!s.has(f.getObjectId(e))||t(f.getGeometry(e)),i);return new v.G(n,e,this)},i);return d(n)}if(null!=t){const e=new s.vW;g=g.filter(i=>(0,s.qh)(t.items,i,t.items.length,e)>=0)}if(!g.length){const t=new v.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new v.G(g,e,this));const T=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),F=await this.runSpatialFilter(g,e=>T(f.getGeometry(e)),i);return d(new v.G(F,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}executeTimeQuery(e){if(0===e.items.length)return;const t=(0,b.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async runSpatialFilter(e,t,i){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let s=0;const r=new Array,n=async a=>{for(;s<e.length;){const o=e[s++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this.reschedule(e=>n(e),i)}};return this.reschedule(e=>n(e),i).then(()=>r)}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,n=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,r),o=n.get(e);(!o||s>a(o,r))&&n.set(e,i)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||r;return(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n)&&l?JSON.stringify([t,i,n]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,A.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,y.aI)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const n=await(0,x.lK)(e.items.map(e=>(0,T.pL)(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e))),this.spatialReference,t,s);return e.items=(0,r.zI)(n.map((t,s)=>i.cloneWithGeometry(e.items[s],(0,g.Ux)(t,this.hasZ,this.hasM)))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async _executeQueryForStatistics(e,t,i){e=(0,a.o8)(e);try{e=await this.schedule(()=>(0,w.GC)(e,this.definitionExpression,this.spatialReference),i),e=await this.reschedule(()=>(0,E.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),i);const s=await this.reschedule(()=>this._executeSceneFilterQuery(e,i),i),r=await this.reschedule(()=>this._executeGeometryQuery(e,s,i),i);return await this.reschedule(()=>this._executeAggregateIdsQuery(r),i),await this.reschedule(()=>this.executeObjectIdsQuery(r),i),await this.reschedule(()=>this.executeTimeQuery(r),i),await this.reschedule(()=>this.executeAttributesQuery(r),i),r}catch(t){if(t!==w.v8)throw t;return new v.G([],e,this)}}get test(){}}function ue(e){if((0,A.tC)(e)){if((0,f.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,f.Bi)(e))return e.rings.map(e=>(0,p.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,m.Rg)((0,p.vt)(),e)]}},95466:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(49186),r=i(53966),n=i(91869),a=i(3330),o=i(12195),l=i(30524),u=i(98623),c=i(56400),h=i(96285);const d=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],g(e))}static fromLayerJSON(e){return new p(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,s=f(t);if(t&&s){const r=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(s,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(r.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new s.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?h.mQ.utcInstance:(0,n.tE)(d,t,()=>h.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,o.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function f(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:r}=e,n=(s?"startField"in s?s.startField:s.startTimeField:"")??"",a=(s?"endField"in s?s.endField:s.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=r?function(e){return"timeZone"in e}(r)?r.timeZone??o:r.dateFieldsTimeReference?(0,c.ZS)(r.dateFieldsTimeReference):o??u.n$:null,h=s?function(e){return"timeZone"in e}(s)?s.timeZone??o:s.timeReference?(0,c.ZS)(s.timeReference):o:null,d=new Map([[m(r?.creationDateField??""),l],[m(r?.editDateField??""),l],[m(n),h],[m(a),h]]);for(const{name:s,type:r}of e.fields)if(y.has(r))t.set(s,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(s,null);else if(i)t.set(s,u.L5);else{const e=d.get(m(s??""))??o;t.set(s,e)}return t}},99352:(e,t,i)=>{i.d(t,{F:()=>s,P:()=>r});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);