@arcgis/core 5.0.0-next.49 → 5.0.0-next.50

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 (558) hide show
  1. package/applications/Components/baUtils.js +1 -1
  2. package/arcade.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0000781c850b1b4828b3.js +1 -0
  5. package/assets/esri/core/workers/chunks/00f044370bf3bb6b24d7.js +1 -0
  6. package/assets/esri/core/workers/chunks/0136cd1a5da204b6daeb.js +1 -0
  7. package/assets/esri/core/workers/chunks/044a0ccd89741c1ae770.js +1 -0
  8. package/assets/esri/core/workers/chunks/090dad5579f0148d6486.js +1 -0
  9. package/assets/esri/core/workers/chunks/09bd9bd37a339802907a.js +1 -0
  10. package/assets/esri/core/workers/chunks/0bc01d71ed1ab8c3af3c.js +1 -0
  11. package/assets/esri/core/workers/chunks/0d9904ba62558686c289.js +1 -0
  12. package/assets/esri/core/workers/chunks/0fcb40204db8ee5571c3.js +1 -0
  13. package/assets/esri/core/workers/chunks/1065fd655bb7cee243fd.js +1 -0
  14. package/assets/esri/core/workers/chunks/11ab10668632648b2ba7.js +1 -0
  15. package/assets/esri/core/workers/chunks/13167bdd486b41163147.js +1 -0
  16. package/assets/esri/core/workers/chunks/{d8db2c51b2fb42f37b2a.js → 1363345f31f4f5051132.js} +1 -1
  17. package/assets/esri/core/workers/chunks/13be94357dcf5afc4fcb.js +1 -0
  18. package/assets/esri/core/workers/chunks/{e66bcdfd75e0113d1cec.js → 13ce8e8d45779b11ee12.js} +1 -1
  19. package/assets/esri/core/workers/chunks/1693f19f1c37e0a2087e.js +1 -0
  20. package/assets/esri/core/workers/chunks/18ab5959ebf8689f8fe8.js +1 -0
  21. package/assets/esri/core/workers/chunks/18c4cd160a4052b05831.js +1 -0
  22. package/assets/esri/core/workers/chunks/1bf4b5e5402790ccb450.js +1 -0
  23. package/assets/esri/core/workers/chunks/1db058f91a8e17b24db6.js +1 -0
  24. package/assets/esri/core/workers/chunks/1dc3ab52fcde7bff0f23.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a7cd795042ebb8585906.js → 1f0c7ab33e466a37c7f9.js} +1 -1
  26. package/assets/esri/core/workers/chunks/224f01b11fdba9250b1e.js +1 -0
  27. package/assets/esri/core/workers/chunks/{a1a7b0e7ca488c895cb7.js → 22c115ec003351c7d8ee.js} +1 -1
  28. package/assets/esri/core/workers/chunks/24c35a46cf8ed11b774d.js +1 -0
  29. package/assets/esri/core/workers/chunks/27794d48c04a5875fd22.js +1 -0
  30. package/assets/esri/core/workers/chunks/294acaaebfedb05fe81e.js +1 -0
  31. package/assets/esri/core/workers/chunks/2a66841243975cac3e3c.js +1 -0
  32. package/assets/esri/core/workers/chunks/2c12848e4934e9bb2bd0.js +1 -0
  33. package/assets/esri/core/workers/chunks/2d61b6efa17e8c5832da.js +1 -0
  34. package/assets/esri/core/workers/chunks/2d6fa00273a73d44297d.js +1 -0
  35. package/assets/esri/core/workers/chunks/2da13c2269ab90281143.js +1 -0
  36. package/assets/esri/core/workers/chunks/2dfaead2ec6434513d45.js +1 -0
  37. package/assets/esri/core/workers/chunks/2fae37f34b28a46841e3.js +1 -0
  38. package/assets/esri/core/workers/chunks/{3298e96d3f2e49e338d2.js → 308fb48d080e01499a26.js} +1 -1
  39. package/assets/esri/core/workers/chunks/30dd4a7c93b33988a270.js +1 -0
  40. package/assets/esri/core/workers/chunks/355c8d0eadfff9f62dfb.js +1 -0
  41. package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +1 -0
  42. package/assets/esri/core/workers/chunks/36a04be40369111a633d.js +1 -0
  43. package/assets/esri/core/workers/chunks/36d9208895abd1ba4ff1.js +1 -0
  44. package/assets/esri/core/workers/chunks/395a0773ccafd1f24c4d.js +1 -0
  45. package/assets/esri/core/workers/chunks/{81a60dfa600b690098f9.js → 3a612f873e29348370b2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/3b1471f908fdecec2815.js +1 -0
  47. package/assets/esri/core/workers/chunks/{da1e61f355fb943085dc.js → 3c66dd52ad156711a6a2.js} +1 -1
  48. package/assets/esri/core/workers/chunks/3dd0db77a05263000bd8.js +1 -0
  49. package/assets/esri/core/workers/chunks/{08c1ea29678da27136f3.js → 44fb1184eeed0636704a.js} +1 -1
  50. package/assets/esri/core/workers/chunks/46d430a6983b81ba7556.js +1 -0
  51. package/assets/esri/core/workers/chunks/472d290f8eb1c1a85724.js +1 -0
  52. package/assets/esri/core/workers/chunks/47338472f5a8e004a671.js +1 -0
  53. package/assets/esri/core/workers/chunks/48b3906ac3ec57253d90.js +1 -0
  54. package/assets/esri/core/workers/chunks/{2a41283bba2361afa1fd.js → 495af366ec1defd89a72.js} +1 -1
  55. package/assets/esri/core/workers/chunks/49b581782f63abb6dd9f.js +1 -0
  56. package/assets/esri/core/workers/chunks/49df576f0215618aa651.js +1 -0
  57. package/assets/esri/core/workers/chunks/4abe2c56aecc9e9b8e86.js +1 -0
  58. package/assets/esri/core/workers/chunks/4e01e509a761a9d00b52.js +1 -0
  59. package/assets/esri/core/workers/chunks/{9d0f0d055ec25af037e0.js → 51093e552e31344cefa5.js} +1 -1
  60. package/assets/esri/core/workers/chunks/521aac8a665e98e4ca78.js +1 -0
  61. package/assets/esri/core/workers/chunks/54666586754949bfa584.js +1 -0
  62. package/assets/esri/core/workers/chunks/549f4ab9e285deaf04fb.js +1 -0
  63. package/assets/esri/core/workers/chunks/553ca1e55e9f1359839c.js +1 -0
  64. package/assets/esri/core/workers/chunks/{6f3943bebe2d5f4994f7.js → 58242447b72cc60a5040.js} +1 -1
  65. package/assets/esri/core/workers/chunks/58419d362f24b35003c1.js +1 -0
  66. package/assets/esri/core/workers/chunks/5aa354854219361f722b.js +1 -0
  67. package/assets/esri/core/workers/chunks/{aab93e885b6c7c6aa76e.js → 5ce524e0060053f35592.js} +19 -19
  68. package/assets/esri/core/workers/chunks/5d244fcf5c075afccdc6.js +1 -0
  69. package/assets/esri/core/workers/chunks/5e9fdd4eff7189f45932.js +1 -0
  70. package/assets/esri/core/workers/chunks/60954ab810dbbf36e5e1.js +1 -0
  71. package/assets/esri/core/workers/chunks/62ed6b45482e39d67785.js +1 -0
  72. package/assets/esri/core/workers/chunks/63b8193ad90b2ebe6884.js +1 -0
  73. package/assets/esri/core/workers/chunks/63c91421a71ae3b3599e.js +1 -0
  74. package/assets/esri/core/workers/chunks/63cf702cde83692126be.js +1 -0
  75. package/assets/esri/core/workers/chunks/687d2b761dc5b5cf0c31.js +1 -0
  76. package/assets/esri/core/workers/chunks/6cfcfebe9a4c491e453a.js +1 -0
  77. package/assets/esri/core/workers/chunks/{88aa71f02f43bb069345.js → 7033fa18b7dd7bd3e49c.js} +1 -1
  78. package/assets/esri/core/workers/chunks/710b29729f252f11115d.js +1 -0
  79. package/assets/esri/core/workers/chunks/72a520802b8accfd4512.js +1 -0
  80. package/assets/esri/core/workers/chunks/{72fbee59d5d909615408.js → 73892ac79b24b05e6863.js} +1 -1
  81. package/assets/esri/core/workers/chunks/73c3ee2697265b0f7208.js +1 -0
  82. package/assets/esri/core/workers/chunks/73f9cbf0f919b6adc2d5.js +1 -0
  83. package/assets/esri/core/workers/chunks/75e9759290f0f67b2128.js +1 -0
  84. package/assets/esri/core/workers/chunks/7737e69da604d2521da8.js +1 -0
  85. package/assets/esri/core/workers/chunks/{8e8d5422f57269d8c8d2.js → 7891825d5cdca03d2db0.js} +1 -1
  86. package/assets/esri/core/workers/chunks/7cd0ab01933bfb2c6e43.js +1 -0
  87. package/assets/esri/core/workers/chunks/81c2cc77c275a5b555c0.js +1 -0
  88. package/assets/esri/core/workers/chunks/82ace0195b63790b22c9.js +1 -0
  89. package/assets/esri/core/workers/chunks/8892bf3d2367e35de001.js +1 -0
  90. package/assets/esri/core/workers/chunks/8a132d91077ecf849248.js +1 -0
  91. package/assets/esri/core/workers/chunks/8a6e50d95539b46f629c.js +1 -0
  92. package/assets/esri/core/workers/chunks/8d941204425571b656ec.js +1 -0
  93. package/assets/esri/core/workers/chunks/914746077017fa50933f.js +1 -0
  94. package/assets/esri/core/workers/chunks/{004c2a1a37b99a184b13.js → 91fba3bebd78cb956941.js} +1 -1
  95. package/assets/esri/core/workers/chunks/92ec96aa743cabc9475d.js +1 -0
  96. package/assets/esri/core/workers/chunks/{5b290d18de61789417f9.js → 9361834d2c3064eb41fc.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{44f036cc21e3a2308f69.js → 93b139be6488a1b4ba19.js} +1 -1
  98. package/assets/esri/core/workers/chunks/95057105f1b3bf805140.js +1 -0
  99. package/assets/esri/core/workers/chunks/968335b28b895e19913b.js +1 -0
  100. package/assets/esri/core/workers/chunks/973bf2ed34d57f299472.js +1 -0
  101. package/assets/esri/core/workers/chunks/9b6e2099aabf67b9f9f2.js +1 -0
  102. package/assets/esri/core/workers/chunks/{97b01803d0c38541aa08.js → 9c93eadbd19bef1191b4.js} +1 -1
  103. package/assets/esri/core/workers/chunks/a1594486177015e8a6c3.js +1 -0
  104. package/assets/esri/core/workers/chunks/{df458ad51be27df3d79d.js → a1f264abbd6354c333bf.js} +1 -1
  105. package/assets/esri/core/workers/chunks/a3407ca77b0ff62c0e75.js +1 -0
  106. package/assets/esri/core/workers/chunks/{8be61e13530fd0dc2fd1.js → a4f89568205d78d91cfe.js} +1 -1
  107. package/assets/esri/core/workers/chunks/a5e7c9517939f762c518.js +1 -0
  108. package/assets/esri/core/workers/chunks/a63ff3e9a9f3853d12f3.js +1 -0
  109. package/assets/esri/core/workers/chunks/a81a7cba815adb575c36.js +1 -0
  110. package/assets/esri/core/workers/chunks/{fe6fa1f2c2d54d41645e.js → a8dfd246c797f3b979f5.js} +1 -1
  111. package/assets/esri/core/workers/chunks/a8f7e44657083f6aa3fd.js +1 -0
  112. package/assets/esri/core/workers/chunks/a8fd635d1165db8616ab.js +1 -0
  113. package/assets/esri/core/workers/chunks/a92c1171314a68504c1b.js +1 -0
  114. package/assets/esri/core/workers/chunks/aa297e0931213341f51b.js +1 -0
  115. package/assets/esri/core/workers/chunks/aa7a1705266eec353cb6.js +1 -0
  116. package/assets/esri/core/workers/chunks/ab5e2f823960c33cefe4.js +1 -0
  117. package/assets/esri/core/workers/chunks/{f11453f24c0b728669d2.js → ac6f002cfad42e60de8f.js} +1 -1
  118. package/assets/esri/core/workers/chunks/b11c0e80e583f2b7c5de.js +1 -0
  119. package/assets/esri/core/workers/chunks/b14f9a46e583e1625a2b.js +1 -0
  120. package/assets/esri/core/workers/chunks/{8c271e9272e4eaf1325a.js → b1d3d2c93c189e215f67.js} +1 -1
  121. package/assets/esri/core/workers/chunks/b2425f6af7df6902dfc4.js +1 -0
  122. package/assets/esri/core/workers/chunks/b638ce18b93d3cfb9967.js +1 -0
  123. package/assets/esri/core/workers/chunks/b648a1e641cf5c772d67.js +1 -0
  124. package/assets/esri/core/workers/chunks/{1c58064ea80e6a4a4a3b.js → b907d16e82ac908bb896.js} +1 -1
  125. package/assets/esri/core/workers/chunks/b91c13f44f4d1bac5799.js +1 -0
  126. package/assets/esri/core/workers/chunks/ba7e97b1e324118b8156.js +1 -0
  127. package/assets/esri/core/workers/chunks/bb4aefaf9b0327dda738.js +1 -0
  128. package/assets/esri/core/workers/chunks/{9664d9e679abc41f6c42.js → bce81df760f5e34c01d7.js} +1 -1
  129. package/assets/esri/core/workers/chunks/be6a05d5375e80968877.js +1 -0
  130. package/assets/esri/core/workers/chunks/c02b09f16241db233103.js +1 -0
  131. package/assets/esri/core/workers/chunks/c09cba77ee60a3d765e2.js +1 -0
  132. package/assets/esri/core/workers/chunks/c0d6336c10b4081c4e32.js +1 -0
  133. package/assets/esri/core/workers/chunks/c27842a34e73ccb46116.js +1 -0
  134. package/assets/esri/core/workers/chunks/c7802c144959d60e774a.js +1 -0
  135. package/assets/esri/core/workers/chunks/c91201b37d1cb3875fb4.js +1 -0
  136. package/assets/esri/core/workers/chunks/cc4ae105e727d9211d82.js +1 -0
  137. package/assets/esri/core/workers/chunks/cd39a53ef74f47604977.js +1 -0
  138. package/assets/esri/core/workers/chunks/d22e0d733bfe821c0510.js +1 -0
  139. package/assets/esri/core/workers/chunks/{d7878fba02814adaf19f.js → d57577c02fb2932e8305.js} +1 -1
  140. package/assets/esri/core/workers/chunks/d62193323c67b379dee3.js +1 -0
  141. package/assets/esri/core/workers/chunks/d7a62504e00989202c45.js +1 -0
  142. package/assets/esri/core/workers/chunks/{adfe28c1c1619cdd3ca1.js → d8511e71c5108a0ba9eb.js} +2 -2
  143. package/assets/esri/core/workers/chunks/da922e861d5845ae0979.js +1 -0
  144. package/assets/esri/core/workers/chunks/dbe55d4731227d6e9571.js +1 -0
  145. package/assets/esri/core/workers/chunks/de05c59da6d67716795d.js +1 -0
  146. package/assets/esri/core/workers/chunks/de60421029fbcebe2950.js +1 -0
  147. package/assets/esri/core/workers/chunks/e00d56ae5e68267fe269.js +1 -0
  148. package/assets/esri/core/workers/chunks/{fecae7495e53bb05f282.js → e25be3b6b67ce6b03011.js} +1 -1
  149. package/assets/esri/core/workers/chunks/e2973e5626e5039209f9.js +1 -0
  150. package/assets/esri/core/workers/chunks/e2c7c269be93c552dc5b.js +1 -0
  151. package/assets/esri/core/workers/chunks/e4d593ddcbcf06010ab0.js +1 -0
  152. package/assets/esri/core/workers/chunks/e5ac9b048b16fef9840c.js +1 -0
  153. package/assets/esri/core/workers/chunks/{f7163048146ddaedfc36.js → e668ddc7332e5e560e78.js} +1 -1
  154. package/assets/esri/core/workers/chunks/e6bab7b739bfbb39f6cd.js +1 -0
  155. package/assets/esri/core/workers/chunks/{8b578ffc3a83089aa782.js → e7c08a03772f7fccd949.js} +1 -1
  156. package/assets/esri/core/workers/chunks/e8e4d48ab4024e17108d.js +1 -0
  157. package/assets/esri/core/workers/chunks/e9e0f1c355f963cbea74.js +1 -0
  158. package/assets/esri/core/workers/chunks/ec7e6427d99cf3148a61.js +1 -0
  159. package/assets/esri/core/workers/chunks/edd3cf415955309b4ca4.js +1 -0
  160. package/assets/esri/core/workers/chunks/ee361690b456c12c30d8.js +1 -0
  161. package/assets/esri/core/workers/chunks/efa95c50d1ed8e74219f.js +1 -0
  162. package/assets/esri/core/workers/chunks/f142c5cbdd16f1768275.js +1 -0
  163. package/assets/esri/core/workers/chunks/f286f13686f003c5eec5.js +1 -0
  164. package/assets/esri/core/workers/chunks/f379fd459a103f42d447.js +1 -0
  165. package/assets/esri/core/workers/chunks/{f2ba50eb29f93df885d6.js → f3d8d5fe15501220792d.js} +1 -1
  166. package/assets/esri/core/workers/chunks/f56906c443ce8ff68a27.js +1 -0
  167. package/assets/esri/core/workers/chunks/fb6670a929b7333f1764.js +1 -0
  168. package/assets/esri/core/workers/chunks/fbdf553253cf8f22c022.js +1 -0
  169. package/assets/esri/core/workers/chunks/fc10c738bae304721ab2.js +1 -0
  170. package/assets/esri/core/workers/chunks/ff79c2cb28db7e0a1fc4.js +1 -0
  171. package/assets/esri/core/workers/chunks/ffdf1cbc1e54414d0f96.js +1 -0
  172. package/assets/esri/themes/base/widgets/_Attribution.scss +7 -4
  173. package/assets/esri/themes/dark/main.css +1 -1
  174. package/assets/esri/themes/light/main.css +1 -1
  175. package/assets/esri/themes/light/view.css +1 -1
  176. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  177. package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
  178. package/chunks/Envelope.js +1 -1
  179. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  180. package/chunks/GeodeticUtils.js +1 -1
  181. package/chunks/Geometry.js +1 -1
  182. package/chunks/MultiPathImpl.js +1 -1
  183. package/chunks/OperatorCrosses.js +1 -1
  184. package/chunks/OperatorCut.js +1 -1
  185. package/chunks/OperatorGeodesicBuffer.js +1 -1
  186. package/chunks/OperatorGeodeticArea.js +1 -1
  187. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  188. package/chunks/OperatorGeodeticLength.js +1 -1
  189. package/chunks/OperatorIntersects.js +1 -1
  190. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  191. package/chunks/OperatorOverlaps.js +1 -1
  192. package/chunks/OperatorProject.js +1 -1
  193. package/chunks/OperatorProximity.js +1 -1
  194. package/chunks/OperatorProximityGeodesic.js +1 -1
  195. package/chunks/OperatorShapePreservingLength.js +1 -1
  196. package/chunks/OperatorShapePreservingProject.js +1 -1
  197. package/chunks/OperatorSimplifyOGC.js +1 -1
  198. package/chunks/OperatorTouches.js +1 -1
  199. package/chunks/OperatorWithin.js +1 -1
  200. package/chunks/Point2D.js +1 -1
  201. package/chunks/ProjectionTransformation.js +1 -1
  202. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  203. package/chunks/SpatialReference.js +1 -1
  204. package/chunks/boundedPlane.js +1 -1
  205. package/chunks/containsOperator.js +1 -1
  206. package/chunks/disjointOperator.js +1 -1
  207. package/chunks/equalsOperator.js +1 -1
  208. package/chunks/pe.js +1 -1
  209. package/chunks/relateOperator.js +1 -1
  210. package/config.js +1 -1
  211. package/core/units.js +1 -1
  212. package/core/workers/workerFactory.js +1 -1
  213. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  214. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  215. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  216. package/geometry/FlatGeometry.js +1 -1
  217. package/geometry/GeometryCursor.js +1 -1
  218. package/geometry/operators/containsOperator.js +1 -1
  219. package/geometry/operators/disjointOperator.js +1 -1
  220. package/geometry/operators/gx/geodeticUtils.js +1 -1
  221. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  222. package/geometry/operators/gx/operatorBuffer.js +1 -1
  223. package/geometry/operators/gx/operatorDifference.js +1 -1
  224. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  225. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  226. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  227. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  228. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  229. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  230. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  231. package/geometry/operators/gx/operatorIntersection.js +1 -1
  232. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  233. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  234. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  235. package/geometry/operators/gx/operatorProject.js +1 -1
  236. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  237. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  238. package/geometry/operators/gx/operatorSimplify.js +1 -1
  239. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  240. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  241. package/geometry/operators/gx/operatorUnion.js +1 -1
  242. package/geometry/operators/json/containsOperator.js +1 -1
  243. package/geometry/operators/json/disjointOperator.js +1 -1
  244. package/geometry/operators/json/projectOperator.js +1 -1
  245. package/geometry/operators/projectOperator.js +1 -1
  246. package/geometry/operators/reshapeOperator.js +1 -1
  247. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  248. package/geometry/operators/support/initNoPeFactory.js +1 -1
  249. package/geometry/operators/support/jsonConverter.js +1 -1
  250. package/geometry/operators/support/projectionTransformation.js +1 -1
  251. package/geometry/operators/support/projectionZScaling.js +5 -0
  252. package/geometry/projection/projectPointToVector.js +1 -1
  253. package/geometry/projectionUtils.js +1 -1
  254. package/geometry/support/boundedPlane.js +1 -1
  255. package/geometry/support/jsonTypeUtils.js +5 -0
  256. package/geometry/support/jsonUtils.js +1 -1
  257. package/geometry/support/normalizeUtilsCommon.js +1 -1
  258. package/geometry/support/normalizeUtilsSync.js +1 -1
  259. package/geometry/support/quantizationUtils.js +1 -1
  260. package/geometry/support/zscale.js +1 -1
  261. package/interfaces.d.ts +84 -17
  262. package/kernel.js +1 -1
  263. package/layers/SceneLayer.js +1 -1
  264. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  265. package/layers/graphics/data/QueryEngine.js +1 -1
  266. package/layers/graphics/data/queryUtils.js +1 -1
  267. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  268. package/layers/graphics/featureConversionUtils.js +1 -1
  269. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  270. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  271. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  272. package/layers/mixins/ArcGISMapService.js +1 -1
  273. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  274. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  275. package/layers/orientedImagery/transformations/utils.js +1 -1
  276. package/layers/support/ControlPointsGeoreference.js +1 -1
  277. package/layers/support/Sublayer.js +1 -1
  278. package/package.json +4 -4
  279. package/renderers/support/DictionaryLoader.js +1 -1
  280. package/renderers/support/pointCloud/PointSizeFixedSizeAlgorithm.js +1 -1
  281. package/renderers/support/pointCloud/PointSizeSplatAlgorithm.js +1 -1
  282. package/rest/geometryService/cut.js +1 -1
  283. package/rest/geometryService/difference.js +1 -1
  284. package/rest/geometryService/intersect.js +1 -1
  285. package/rest/geometryService/project.js +1 -1
  286. package/rest/geometryService/reshape.js +1 -1
  287. package/rest/geometryService/simplify.js +1 -1
  288. package/rest/geometryService/utils.js +1 -1
  289. package/rest/knowledgeGraph/DataModel.js +1 -1
  290. package/rest/operations/generalize.js +1 -1
  291. package/rest/operations/identify.js +1 -1
  292. package/rest/operations/offset.js +1 -1
  293. package/rest/operations/relation.js +1 -1
  294. package/rest/query/operations/queryAttributeBins.js +1 -1
  295. package/rest/query/operations/queryTopFeatures.js +1 -1
  296. package/rest/query/operations/queryUtils.js +1 -1
  297. package/rest/support/BaseImageMeasureResultValue.js +1 -1
  298. package/rest/support/BufferParameters.js +1 -1
  299. package/rest/support/DensifyParameters.js +1 -1
  300. package/rest/support/DistanceParameters.js +1 -1
  301. package/rest/support/FeatureSet.js +1 -1
  302. package/rest/support/IdentifyParameters.js +1 -1
  303. package/rest/support/ImageAreaParameters.js +1 -1
  304. package/rest/support/ImageDistanceParameters.js +1 -1
  305. package/rest/support/ImageGPSInfoParameters.js +1 -1
  306. package/rest/support/ImageHeightParameters.js +1 -1
  307. package/rest/support/ImageHistogramParameters.js +1 -1
  308. package/rest/support/ImageIdentifyParameters.js +1 -1
  309. package/rest/support/ImageMeasureResultAngleValue.js +1 -1
  310. package/rest/support/ImageMeasureResultAreaValue.js +1 -1
  311. package/rest/support/ImageMeasureResultLengthValue.js +1 -1
  312. package/rest/support/ImagePointParameters.js +1 -1
  313. package/rest/support/ImageSampleParameters.js +1 -1
  314. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  315. package/rest/support/ImageToMapParameters.js +1 -1
  316. package/rest/support/ImageVolumeParameters.js +1 -1
  317. package/rest/support/MapToImageParameters.js +1 -1
  318. package/rest/support/MeasureFromImageParameters.js +1 -1
  319. package/rest/support/ProjectParameters.js +1 -1
  320. package/support/modeUtils.js +1 -1
  321. package/support/revision.js +1 -1
  322. package/support/tests/serviceMockDependencies.js +1 -1
  323. package/symbols/MarkerSymbol.js +1 -1
  324. package/symbols/PictureMarkerSymbol.js +1 -1
  325. package/symbols/SimpleFillSymbol.js +1 -1
  326. package/symbols/SimpleMarkerSymbol.js +1 -1
  327. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  328. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  329. package/symbols/cim/SDFHelper.js +1 -1
  330. package/symbols/cim/effects/EffectOffset.js +1 -1
  331. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  332. package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
  333. package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +1 -1
  334. package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
  335. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  336. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  337. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  338. package/views/2d/layers/MediaLayerView2D.js +1 -1
  339. package/views/2d/layers/TileLayerView2D.js +1 -1
  340. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  341. package/views/2d/layers/graphics/GraphicStoreItem.js +1 -1
  342. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  343. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  344. package/views/3d/analysis/ShadowCast/analysisViewRegister.js +5 -0
  345. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  346. package/views/3d/analysis/Slice/SliceController.js +1 -1
  347. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  348. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  349. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  350. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  351. package/views/3d/analysis/support/projectionUtils.js +1 -1
  352. package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
  353. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  354. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  355. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  356. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  357. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  358. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  359. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  360. package/views/3d/layers/RouteLayerView3D.js +1 -1
  361. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  362. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  363. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  364. package/views/3d/layers/support/featureReference.js +1 -1
  365. package/views/3d/state/ScreenSizePerspective.js +1 -1
  366. package/views/3d/support/ViewSlice.js +1 -1
  367. package/views/3d/support/cameraUtils.js +1 -1
  368. package/views/3d/support/viewpointUtils.js +1 -1
  369. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
  370. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  371. package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
  372. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  373. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  374. package/views/Attribution.js +1 -1
  375. package/views/DOMContainer.js +1 -1
  376. package/views/PopupView.js +1 -1
  377. package/views/SceneView.js +1 -1
  378. package/views/VideoView.js +1 -1
  379. package/views/View.js +1 -1
  380. package/views/View2D.js +1 -1
  381. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  382. package/views/draw/DrawAction.js +1 -1
  383. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  384. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  385. package/views/layers/CatalogFootprintLayerView.js +1 -1
  386. package/views/layers/LayerView.js +1 -1
  387. package/views/support/attributionUtils.js +1 -1
  388. package/views/support/projectionUtils.js +1 -1
  389. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  390. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  391. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  392. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  393. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  394. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  395. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  396. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  397. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  398. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  399. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  400. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +5 -0
  401. package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +5 -0
  402. package/widgets/OrientedImageryViewer/support/urlUtils.js +5 -0
  403. package/widgets/OrientedImageryViewer/utils.js +1 -1
  404. package/widgets/OrientedImageryViewer.js +1 -1
  405. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  406. package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
  407. package/widgets/PanoramicViewer/utils.js +1 -1
  408. package/widgets/PanoramicViewer.js +1 -1
  409. package/widgets/Slice.js +1 -1
  410. package/widgets/Swipe/SwipeViewModel.js +1 -1
  411. package/widgets/TimeSlider.js +1 -1
  412. package/widgets/Track.js +1 -1
  413. package/widgets/UtilityNetworkAssociations.js +1 -1
  414. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  415. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  416. package/widgets/Weather.js +1 -1
  417. package/widgets/support/GridControls.js +1 -1
  418. package/widgets/support/SnappingControls.js +1 -1
  419. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  420. package/assets/esri/core/workers/chunks/00ff4ca88c9d291d82c3.js +0 -1
  421. package/assets/esri/core/workers/chunks/0271a2ca4e9b1e4fd284.js +0 -1
  422. package/assets/esri/core/workers/chunks/02a65563779b4c64b2cf.js +0 -1
  423. package/assets/esri/core/workers/chunks/02d1c48e874dfd985bc4.js +0 -1
  424. package/assets/esri/core/workers/chunks/05b7720ab6bf0874f27c.js +0 -1
  425. package/assets/esri/core/workers/chunks/061def9163a09c804b5c.js +0 -1
  426. package/assets/esri/core/workers/chunks/06221ebadab32111e2c6.js +0 -1
  427. package/assets/esri/core/workers/chunks/063045ac5553e91c0c4c.js +0 -1
  428. package/assets/esri/core/workers/chunks/06d52a570d5d44f8c86e.js +0 -1
  429. package/assets/esri/core/workers/chunks/0a58b57e1777a8b0ea23.js +0 -1
  430. package/assets/esri/core/workers/chunks/0e4d0213d568f50c231f.js +0 -1
  431. package/assets/esri/core/workers/chunks/103153951ba312dc5e9e.js +0 -1
  432. package/assets/esri/core/workers/chunks/169be08394c5e7703628.js +0 -1
  433. package/assets/esri/core/workers/chunks/1a6f3531ef3d671e0289.js +0 -1
  434. package/assets/esri/core/workers/chunks/1c816aff8613d1e4bf38.js +0 -1
  435. package/assets/esri/core/workers/chunks/1e2d42e9984ed3437ba2.js +0 -1
  436. package/assets/esri/core/workers/chunks/2008b22f76071a2dde4e.js +0 -1
  437. package/assets/esri/core/workers/chunks/20e4243ea563d05a5256.js +0 -1
  438. package/assets/esri/core/workers/chunks/2107c93d1fe87f3b8dfa.js +0 -1
  439. package/assets/esri/core/workers/chunks/21f37a4b8d1857369203.js +0 -1
  440. package/assets/esri/core/workers/chunks/229e1ed4282005aa0b83.js +0 -1
  441. package/assets/esri/core/workers/chunks/22b8eaa6afab0e5ffc47.js +0 -1
  442. package/assets/esri/core/workers/chunks/231c0b583fa97f2ca675.js +0 -1
  443. package/assets/esri/core/workers/chunks/233f9eb617f3d72995b5.js +0 -1
  444. package/assets/esri/core/workers/chunks/2463cebf904a3c46c639.js +0 -1
  445. package/assets/esri/core/workers/chunks/249504f7d356be80d214.js +0 -1
  446. package/assets/esri/core/workers/chunks/2550d2ba935cfdf30236.js +0 -1
  447. package/assets/esri/core/workers/chunks/273ac1066095d63d6a6f.js +0 -1
  448. package/assets/esri/core/workers/chunks/28db329528def851efd7.js +0 -1
  449. package/assets/esri/core/workers/chunks/2de32649f8b0c6404d7c.js +0 -1
  450. package/assets/esri/core/workers/chunks/2e2867bc66c94aba7dc7.js +0 -1
  451. package/assets/esri/core/workers/chunks/30c4af16e3a2acc25589.js +0 -1
  452. package/assets/esri/core/workers/chunks/32d32d3c3b38a215d20d.js +0 -1
  453. package/assets/esri/core/workers/chunks/3386d4392f465b807b94.js +0 -1
  454. package/assets/esri/core/workers/chunks/34613b288cf174983f8b.js +0 -1
  455. package/assets/esri/core/workers/chunks/35f086a2ae0585348ae6.js +0 -1
  456. package/assets/esri/core/workers/chunks/37ea150dec5e491f691e.js +0 -1
  457. package/assets/esri/core/workers/chunks/3ac8de121a07c70bae0f.js +0 -1
  458. package/assets/esri/core/workers/chunks/3c94db7ecdcd38eeb1b1.js +0 -1
  459. package/assets/esri/core/workers/chunks/3f7749f06ae54a4437d9.js +0 -1
  460. package/assets/esri/core/workers/chunks/40a722933af28823953b.js +0 -1
  461. package/assets/esri/core/workers/chunks/444026d1938c1078ca97.js +0 -1
  462. package/assets/esri/core/workers/chunks/44f759d723ae05bb1b19.js +0 -1
  463. package/assets/esri/core/workers/chunks/456684b1c1417ed0e611.js +0 -1
  464. package/assets/esri/core/workers/chunks/48e2737182c75005fb8f.js +0 -1
  465. package/assets/esri/core/workers/chunks/48f805929fe6241952f5.js +0 -1
  466. package/assets/esri/core/workers/chunks/4a48b8ec5f3f2fd139b5.js +0 -1
  467. package/assets/esri/core/workers/chunks/4b084f985bc4100e7aec.js +0 -1
  468. package/assets/esri/core/workers/chunks/4b1de1fcd13677b615a8.js +0 -1
  469. package/assets/esri/core/workers/chunks/4d933de84afb2e3b7d18.js +0 -1
  470. package/assets/esri/core/workers/chunks/4f0de45a0a295d66d446.js +0 -1
  471. package/assets/esri/core/workers/chunks/4ff771942531fb2755c4.js +0 -1
  472. package/assets/esri/core/workers/chunks/513a4ef960e27500f986.js +0 -1
  473. package/assets/esri/core/workers/chunks/56b693baa376bb990925.js +0 -1
  474. package/assets/esri/core/workers/chunks/57fd5e1260269002d18a.js +0 -1
  475. package/assets/esri/core/workers/chunks/5b73c77587772120b209.js +0 -1
  476. package/assets/esri/core/workers/chunks/5fe40bb0e9ab333f6854.js +0 -1
  477. package/assets/esri/core/workers/chunks/61373d2fa7e7638d3395.js +0 -1
  478. package/assets/esri/core/workers/chunks/6202922b1c2637e9aaa5.js +0 -1
  479. package/assets/esri/core/workers/chunks/633368ae6fbb46373328.js +0 -1
  480. package/assets/esri/core/workers/chunks/6d0fe4db6b94f3d2c53a.js +0 -1
  481. package/assets/esri/core/workers/chunks/6d702cb26cef46a76963.js +0 -1
  482. package/assets/esri/core/workers/chunks/6e8925412fb90f88d688.js +0 -1
  483. package/assets/esri/core/workers/chunks/6e8c20ff1d28ef2fe72c.js +0 -1
  484. package/assets/esri/core/workers/chunks/708aba69a1870ea41a61.js +0 -1
  485. package/assets/esri/core/workers/chunks/74b1028e95f7cfff387b.js +0 -1
  486. package/assets/esri/core/workers/chunks/755ce019c97f5d527772.js +0 -1
  487. package/assets/esri/core/workers/chunks/780f60210878a8286633.js +0 -1
  488. package/assets/esri/core/workers/chunks/78fccea3445fb2f9120a.js +0 -1
  489. package/assets/esri/core/workers/chunks/7d3c2a063598bdd015e2.js +0 -1
  490. package/assets/esri/core/workers/chunks/7eab0bb42f9f062522ef.js +0 -1
  491. package/assets/esri/core/workers/chunks/804958f3f4ff47a4eff5.js +0 -1
  492. package/assets/esri/core/workers/chunks/82ba4140e30f083fbc87.js +0 -1
  493. package/assets/esri/core/workers/chunks/833fd2bc42c5cb459084.js +0 -1
  494. package/assets/esri/core/workers/chunks/83c8e5a92d8d6193cb32.js +0 -1
  495. package/assets/esri/core/workers/chunks/83da9ee6544ee9d3c124.js +0 -1
  496. package/assets/esri/core/workers/chunks/870022661376442411e4.js +0 -1
  497. package/assets/esri/core/workers/chunks/897ce6fc9cefb1e14a64.js +0 -1
  498. package/assets/esri/core/workers/chunks/898ab7db220e81e921c6.js +0 -1
  499. package/assets/esri/core/workers/chunks/8b75861196d1ce5cba63.js +0 -1
  500. package/assets/esri/core/workers/chunks/8c07396e9ea3007d6404.js +0 -1
  501. package/assets/esri/core/workers/chunks/8e26831f71634288f834.js +0 -1
  502. package/assets/esri/core/workers/chunks/8ec238b5b59ef18a1713.js +0 -1
  503. package/assets/esri/core/workers/chunks/90b8ccee883738917a6d.js +0 -1
  504. package/assets/esri/core/workers/chunks/90bc9c299ae0e8b8b5e5.js +0 -1
  505. package/assets/esri/core/workers/chunks/9100330ed4b4437c819d.js +0 -1
  506. package/assets/esri/core/workers/chunks/933dce4d4ff8b90219c8.js +0 -1
  507. package/assets/esri/core/workers/chunks/934bc1028b287f8df4aa.js +0 -1
  508. package/assets/esri/core/workers/chunks/94dc8b0fa129f1e168c4.js +0 -1
  509. package/assets/esri/core/workers/chunks/96055de47831e59a28bf.js +0 -1
  510. package/assets/esri/core/workers/chunks/963ba863e0f87abfca25.js +0 -1
  511. package/assets/esri/core/workers/chunks/987e19af8a525e77883f.js +0 -1
  512. package/assets/esri/core/workers/chunks/992e9bbdf9d3787ddb0e.js +0 -1
  513. package/assets/esri/core/workers/chunks/9aa8d60483ad905fe13b.js +0 -1
  514. package/assets/esri/core/workers/chunks/9c0efd06c9000ccbd62d.js +0 -1
  515. package/assets/esri/core/workers/chunks/9f1d3c0b53bef07e39bf.js +0 -1
  516. package/assets/esri/core/workers/chunks/9fed9946241bb2a5cfa4.js +0 -1
  517. package/assets/esri/core/workers/chunks/a2662e98857f0abf8e82.js +0 -1
  518. package/assets/esri/core/workers/chunks/a59dab47a58695c639da.js +0 -1
  519. package/assets/esri/core/workers/chunks/a5a9b0a35849b9f2e86d.js +0 -1
  520. package/assets/esri/core/workers/chunks/a60006c9ccf6817fc0d2.js +0 -1
  521. package/assets/esri/core/workers/chunks/a627b7eb94b7fca33210.js +0 -1
  522. package/assets/esri/core/workers/chunks/a651dc3b8f1fc1ab34cc.js +0 -1
  523. package/assets/esri/core/workers/chunks/a96742e678a506c461ab.js +0 -1
  524. package/assets/esri/core/workers/chunks/af663e81c851bcf142f1.js +0 -1
  525. package/assets/esri/core/workers/chunks/af8d6e6949930d0e6c7b.js +0 -1
  526. package/assets/esri/core/workers/chunks/b59be95949445ff5afab.js +0 -1
  527. package/assets/esri/core/workers/chunks/b6dec5dfdeca54bae88d.js +0 -1
  528. package/assets/esri/core/workers/chunks/b88dc7d8ae105747e6a4.js +0 -1
  529. package/assets/esri/core/workers/chunks/b90c786dd474ea1a409c.js +0 -1
  530. package/assets/esri/core/workers/chunks/b92e9e5df8154a128982.js +0 -1
  531. package/assets/esri/core/workers/chunks/bbdfa8ffcf084cbd9938.js +0 -1
  532. package/assets/esri/core/workers/chunks/bff814d34b38ec80c44d.js +0 -1
  533. package/assets/esri/core/workers/chunks/c36d699a75b6e8fb93eb.js +0 -1
  534. package/assets/esri/core/workers/chunks/c50fdf723f2d4316862e.js +0 -1
  535. package/assets/esri/core/workers/chunks/c5e8ff4721b15ac3c6eb.js +0 -1
  536. package/assets/esri/core/workers/chunks/ca61077e0a598654f33f.js +0 -1
  537. package/assets/esri/core/workers/chunks/ca81be5bdb88ef557bf3.js +0 -1
  538. package/assets/esri/core/workers/chunks/ced12ad98f8f48d0dc00.js +0 -1
  539. package/assets/esri/core/workers/chunks/d0320ca67abca4f8b0d2.js +0 -1
  540. package/assets/esri/core/workers/chunks/d561624ddb9388732b25.js +0 -1
  541. package/assets/esri/core/workers/chunks/d5fd6d0eaf96edfab123.js +0 -1
  542. package/assets/esri/core/workers/chunks/d705410c369bd03b1875.js +0 -1
  543. package/assets/esri/core/workers/chunks/d82e17522ed946c2d809.js +0 -1
  544. package/assets/esri/core/workers/chunks/dc29cb16704e2e4d0a46.js +0 -1
  545. package/assets/esri/core/workers/chunks/dc5075b2326c79130baa.js +0 -1
  546. package/assets/esri/core/workers/chunks/dd105d6e0fcedee32644.js +0 -1
  547. package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +0 -1
  548. package/assets/esri/core/workers/chunks/e1148067ceae7d9eaaf8.js +0 -1
  549. package/assets/esri/core/workers/chunks/e5a6a646f27715152714.js +0 -1
  550. package/assets/esri/core/workers/chunks/e8c2e2fbe9cef4c8a8c6.js +0 -1
  551. package/assets/esri/core/workers/chunks/efc293c8bbc12156096d.js +0 -1
  552. package/assets/esri/core/workers/chunks/f693a4d97b2762d0e6ff.js +0 -1
  553. package/assets/esri/core/workers/chunks/f7f53567b0c5b35d6aea.js +0 -1
  554. package/assets/esri/core/workers/chunks/f92a78ce5510e0d0d0f7.js +0 -1
  555. package/assets/esri/core/workers/chunks/fb76b43181077c55a207.js +0 -1
  556. package/assets/esri/core/workers/chunks/fc61443546f21869f8ba.js +0 -1
  557. package/assets/esri/core/workers/chunks/fdaa10a588db394e2f65.js +0 -1
  558. package/chunks/UnitFactory.js +0 -5
package/interfaces.d.ts CHANGED
@@ -1589,7 +1589,7 @@ declare namespace __esri {
1589
1589
  */
1590
1590
  contextEnabled: boolean;
1591
1591
  /**
1592
- * Time period in milliseconds.
1592
+ * Minimum shadow duration (in milliseconds).
1593
1593
  *
1594
1594
  * @default 4 * 3600 * 1000
1595
1595
  *
@@ -1640,7 +1640,7 @@ declare namespace __esri {
1640
1640
  */
1641
1641
  contextOptions?: DiscreteOptionsProperties;
1642
1642
  /**
1643
- * Time period in milliseconds.
1643
+ * Minimum shadow duration (in milliseconds).
1644
1644
  *
1645
1645
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-ThresholdOptions.html#threshold Read more...}
1646
1646
  */
@@ -4358,7 +4358,8 @@ declare namespace __esri {
4358
4358
  | "boolean"
4359
4359
  | "knowledgeGraph"
4360
4360
  | "voxel"
4361
- | "pixel";
4361
+ | "pixel"
4362
+ | "json";
4362
4363
  properties?: ProfileVariable[];
4363
4364
  elementType?: ArrayElementType;
4364
4365
  }
@@ -4518,7 +4519,8 @@ declare namespace __esri {
4518
4519
  | "boolean"
4519
4520
  | "knowledgeGraph"
4520
4521
  | "voxel"
4521
- | "pixel";
4522
+ | "pixel"
4523
+ | "json";
4522
4524
  }
4523
4525
 
4524
4526
  export type VariableInstancesCreator = (inputData: any) => any;
@@ -10666,10 +10668,7 @@ declare namespace __esri {
10666
10668
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#CreateCylinderParameters Read more...}
10667
10669
  */
10668
10670
  export interface CreateCylinderParameters {
10669
- size?: number | any;
10670
- width?: number;
10671
- depth?: number;
10672
- height?: number;
10671
+ size?: number | CreateCylinderParametersSize;
10673
10672
  unit?: LengthUnit;
10674
10673
  densificationFactor?: number;
10675
10674
  vertexSpace?: "local" | "georeferenced";
@@ -10692,10 +10691,7 @@ declare namespace __esri {
10692
10691
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#CreatePlaneParameters Read more...}
10693
10692
  */
10694
10693
  export interface CreatePlaneParameters {
10695
- size?: number | any;
10696
- width?: number;
10697
- depth?: number;
10698
- height?: number;
10694
+ size?: number | CreatePlaneParametersSize;
10699
10695
  facing?: "east" | "west" | "north" | "south" | "up" | "down";
10700
10696
  unit?: LengthUnit;
10701
10697
  vertexSpace?: "local" | "georeferenced";
@@ -10708,10 +10704,7 @@ declare namespace __esri {
10708
10704
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#CreateSphereParameters Read more...}
10709
10705
  */
10710
10706
  export interface CreateSphereParameters {
10711
- size?: number | any;
10712
- width?: number;
10713
- depth?: number;
10714
- height?: number;
10707
+ size?: number | CreateSphereParametersSize;
10715
10708
  unit?: LengthUnit;
10716
10709
  densificationFactor?: number;
10717
10710
  vertexSpace?: "local" | "georeferenced";
@@ -10769,6 +10762,23 @@ declare namespace __esri {
10769
10762
  height?: number;
10770
10763
  }
10771
10764
 
10765
+ export interface CreateCylinderParametersSize {
10766
+ width?: number;
10767
+ depth?: number;
10768
+ height?: number;
10769
+ }
10770
+
10771
+ export interface CreatePlaneParametersSize {
10772
+ width?: number;
10773
+ height?: number;
10774
+ }
10775
+
10776
+ export interface CreateSphereParametersSize {
10777
+ width?: number;
10778
+ depth?: number;
10779
+ height?: number;
10780
+ }
10781
+
10772
10782
  export class Multipoint extends Geometry {
10773
10783
  /**
10774
10784
  * An array of points.
@@ -12241,7 +12251,7 @@ declare namespace __esri {
12241
12251
  }
12242
12252
 
12243
12253
  /**
12244
- * Projects 2D geometries from one {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html SpatialReference} to another.
12254
+ * Projects geometries (with or without Z/elevation data) from one {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html SpatialReference} to another.
12245
12255
  *
12246
12256
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html Read more...}
12247
12257
  */
@@ -100539,6 +100549,8 @@ declare namespace __esri {
100539
100549
 
100540
100550
  export class DOMContainer {
100541
100551
  aria: DOMContainerAria | nullish;
100552
+ readonly attributionHeight: number;
100553
+ attributionMode: "dark" | "light" | nullish;
100542
100554
  readonly focused: boolean;
100543
100555
  readonly height: number;
100544
100556
  readonly resizing: boolean;
@@ -100559,6 +100571,7 @@ declare namespace __esri {
100559
100571
 
100560
100572
  interface DOMContainerProperties {
100561
100573
  aria?: DOMContainerAria | nullish;
100574
+ attributionMode?: "dark" | "light" | nullish;
100562
100575
  container?: HTMLDivElement | nullish | string;
100563
100576
  ui?: DefaultUIProperties;
100564
100577
  }
@@ -105290,6 +105303,18 @@ declare namespace __esri {
105290
105303
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#aria Read more...}
105291
105304
  */
105292
105305
  declare aria: DOMContainer["aria"];
105306
+ /**
105307
+ * The height of the attribution widget in pixels.
105308
+ *
105309
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#attributionHeight Read more...}
105310
+ */
105311
+ declare readonly attributionHeight: DOMContainer["attributionHeight"];
105312
+ /**
105313
+ * The light or dark mode used to display the attribution.
105314
+ *
105315
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#attributionMode Read more...}
105316
+ */
105317
+ declare attributionMode: DOMContainer["attributionMode"];
105293
105318
  /**
105294
105319
  * A convenience property used for defining the breakpoints on the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#height height}
105295
105320
  * and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#width width} of the view.
@@ -105691,6 +105716,12 @@ declare namespace __esri {
105691
105716
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#aria Read more...}
105692
105717
  */
105693
105718
  aria?: DOMContainerProperties["aria"];
105719
+ /**
105720
+ * The light or dark mode used to display the attribution.
105721
+ *
105722
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#attributionMode Read more...}
105723
+ */
105724
+ attributionMode?: DOMContainerProperties["attributionMode"];
105694
105725
  /**
105695
105726
  * A convenience property used for defining the breakpoints on the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#height height}
105696
105727
  * and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#width width} of the view.
@@ -106504,6 +106535,18 @@ declare namespace __esri {
106504
106535
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#aria Read more...}
106505
106536
  */
106506
106537
  declare aria: DOMContainer["aria"];
106538
+ /**
106539
+ * The height of the attribution widget in pixels.
106540
+ *
106541
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#attributionHeight Read more...}
106542
+ */
106543
+ declare readonly attributionHeight: DOMContainer["attributionHeight"];
106544
+ /**
106545
+ * The light or dark mode used to display the attribution.
106546
+ *
106547
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#attributionMode Read more...}
106548
+ */
106549
+ declare attributionMode: DOMContainer["attributionMode"];
106507
106550
  /**
106508
106551
  * Indicates if the browser focus is on the view.
106509
106552
  *
@@ -106682,6 +106725,12 @@ declare namespace __esri {
106682
106725
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#aria Read more...}
106683
106726
  */
106684
106727
  aria?: DOMContainerProperties["aria"];
106728
+ /**
106729
+ * The light or dark mode used to display the attribution.
106730
+ *
106731
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-VideoView.html#attributionMode Read more...}
106732
+ */
106733
+ attributionMode?: DOMContainerProperties["attributionMode"];
106685
106734
  /**
106686
106735
  * The `id` or node representing the DOM element containing the view.
106687
106736
  *
@@ -107605,6 +107654,18 @@ declare namespace __esri {
107605
107654
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#aria Read more...}
107606
107655
  */
107607
107656
  declare aria: DOMContainer["aria"];
107657
+ /**
107658
+ * The height of the attribution widget in pixels.
107659
+ *
107660
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#attributionHeight Read more...}
107661
+ */
107662
+ declare readonly attributionHeight: DOMContainer["attributionHeight"];
107663
+ /**
107664
+ * The light or dark mode used to display the attribution.
107665
+ *
107666
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#attributionMode Read more...}
107667
+ */
107668
+ declare attributionMode: DOMContainer["attributionMode"];
107608
107669
  /**
107609
107670
  * A convenience property used for defining the breakpoints on the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#height height}
107610
107671
  * and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#width width} of the view.
@@ -107924,6 +107985,12 @@ declare namespace __esri {
107924
107985
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#aria Read more...}
107925
107986
  */
107926
107987
  aria?: DOMContainerProperties["aria"];
107988
+ /**
107989
+ * The light or dark mode used to display the attribution.
107990
+ *
107991
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#attributionMode Read more...}
107992
+ */
107993
+ attributionMode?: DOMContainerProperties["attributionMode"];
107927
107994
  /**
107928
107995
  * The background color of the MapView.
107929
107996
  *
package/kernel.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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.49",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
5
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.50",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,throwIfAborted as y,isAbortError as u,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as h}from"../core/reactiveUtils.js";import{property as f,subclass as m}from"../core/accessorSupport/decorators.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectWithZConversion as b}from"../geometry/projectionUtils.js";import w from"../graphic/SceneGraphicOrigin.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as O}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as _}from"./mixins/EditBusLayer.js";import{OperationalLayer as P}from"./mixins/OperationalLayer.js";import{PortalLayer as A}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as T}from"./mixins/ScaleRangeLayer.js";import{SceneService as x}from"./mixins/SceneService.js";import{useViewTimeProperty as E}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as D}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as q}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as R}from"./support/capabilities.js";import{elevationInfo as C,labelsVisible as N,legendEnabled as G,popupEnabled as Q,attributeTableTemplate as V,screenSizePerspectiveEnabled as M}from"./support/commonProperties.js";import{getFieldDomain as k,computeEffectiveEditingEnabled as K,getGlobalIdToObjectIdMap as $}from"./support/featureLayerUtils.js";import{FeatureReduction as H}from"./support/FeatureReduction.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import Z from"./support/FieldsIndex.js";import{fixRendererFields as B,unpackFieldNames as J}from"./support/fieldUtils.js";import{I3SNodePageDefinition as X,I3SMaterialDefinition as Y,I3STextureSetDefinition as ee,I3SGeometryDefinition as te}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as re,isFileSupported as ie}from"./support/infoFor3D.js";import se from"./support/LabelClass.js";import{reader as oe}from"./support/labelingInfo.js";import ae from"./support/LayerFloorInfo.js";import{layerLookupMap as ne}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as le}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as pe}from"./support/RangeInfo.js";import de from"./support/SceneFilter.js";import{cacheIsOutOfSync as ye}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as ce}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as me,elevationModeUnsupportedMessage as ge,featureExpressionUnsupportedMessage as ve}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as we}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as Ie}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Le,getFetchPopupTemplate as je}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Fe}from"../webdoc/support/opacityUtils.js";import{reader as Se}from"../core/accessorSupport/decorators/reader.js";const Oe=new Set(["3DObject","Point"]),_e=W();let Pe=class extends(D(_(x(S(P(A(T(p(O(F(i(I)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new w(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?k(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:X.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&K(this.associatedLayer)}get geometryType(){return Te[this.profile]||"mesh"}set renderer(e){B(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:R;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ae[r]?Ae[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await ce(this,{origin:"service"},t),B(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=J(this.fieldsIndex,await Le(this,je(this)));return Ie(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await $(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);y(t);const s=i.reduce((e,t)=>re(this.infoFor3D,t)?e+1:e,0);0===s&&r(new L),s>1&&r(new j);const a=this.spatialReference,l=t.origin,p=await b(l??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:a}),a,t),d=a.isGeographic?"local":"georeferenced",{default:u}=await import("../geometry/Mesh.js");y(t);const c=u.createWithExternalSource(p,{type:"client",files:i},{vertexSpace:d,transform:le(a),unitConversionDisabled:!0}),[h]=await this.uploadAssets([c],{...t,useAssetOrigin:!l});return h}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await we(e)).filter(e=>ie(t,e))}validateLayer(e){if(e.layerType&&!Oe.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!ye(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await q(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ne.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){u(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await h(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&me(n.getLogger(this),ge("Mesh scene layers","relative-to-scene",e)),me(n.getLogger(this),ve("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([f({types:{key:"type",base:H,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Pe.prototype,"featureReduction",void 0),e([f({type:[pe],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Pe.prototype,"rangeInfos",void 0),e([f({json:{read:!1}})],Pe.prototype,"associatedLayer",void 0),e([f({type:["show","hide"]})],Pe.prototype,"listMode",void 0),e([f({type:["ArcGISSceneServiceLayer"]})],Pe.prototype,"operationalLayerType",void 0),e([f({json:{read:!1},readOnly:!0})],Pe.prototype,"type",void 0),e([f({..._e.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"fields",void 0),e([f()],Pe.prototype,"types",null),e([f()],Pe.prototype,"typeIdField",null),e([f()],Pe.prototype,"templates",null),e([f()],Pe.prototype,"formTemplate",null),e([f({readOnly:!0})],Pe.prototype,"graphicOrigin",void 0),e([f({readOnly:!0,clonable:!1})],Pe.prototype,"fieldsIndex",null),e([f({type:ae,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Pe.prototype,"floorInfo",void 0),e([f(_e.outFields)],Pe.prototype,"outFields",void 0),e([f({type:X,readOnly:!0,json:{read:!1},clonable:!1})],Pe.prototype,"nodePages",void 0),e([Se("service","nodePages",["nodePages","pointNodePages"])],Pe.prototype,"readNodePages",null),e([f({type:[Y],readOnly:!0,clonable:!1})],Pe.prototype,"materialDefinitions",void 0),e([f({type:[ee],readOnly:!0,clonable:!1})],Pe.prototype,"textureSetDefinitions",void 0),e([f({type:[te],readOnly:!0,clonable:!1})],Pe.prototype,"geometryDefinitions",void 0),e([f({readOnly:!0})],Pe.prototype,"serviceUpdateTimeStamp",void 0),e([f({readOnly:!0})],Pe.prototype,"attributeStorageInfo",void 0),e([f({readOnly:!0})],Pe.prototype,"statisticsInfo",void 0),e([f({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Pe.prototype,"excludeObjectIds",void 0),e([f({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Pe.prototype,"definitionExpression",void 0),e([f({type:de,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Pe.prototype,"filter",void 0),e([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Pe.prototype,"path",void 0),e([f(C)],Pe.prototype,"elevationInfo",null),e([f({readOnly:!0,json:{read:!1}})],Pe.prototype,"effectiveCapabilities",null),e([f({readOnly:!0})],Pe.prototype,"effectiveEditingEnabled",null),e([f({type:String})],Pe.prototype,"geometryType",null),e([f(N)],Pe.prototype,"labelsVisible",void 0),e([f({type:[se],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:oe},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:oe},write:!0}})],Pe.prototype,"labelingInfo",void 0),e([f(G)],Pe.prototype,"legendEnabled",void 0),e([f({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Fe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Pe.prototype,"opacity",void 0),e([f({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"priority",void 0),e([f({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"semantic",void 0),e([f({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Pe.prototype,"renderer",null),e([f({json:{read:!1}})],Pe.prototype,"cachedDrawingInfo",void 0),e([Se("service","cachedDrawingInfo")],Pe.prototype,"readCachedDrawingInfo",null),e([f({readOnly:!0,json:{read:!1}})],Pe.prototype,"capabilities",null),e([f({type:Boolean,json:{read:!1}})],Pe.prototype,"editingEnabled",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"infoFor3D",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"relationships",null),e([f(Q)],Pe.prototype,"popupEnabled",void 0),e([f({type:r,json:{name:"popupInfo",write:!0}})],Pe.prototype,"popupTemplate",void 0),e([f({readOnly:!0,json:{read:!1}})],Pe.prototype,"defaultPopupTemplate",null),e([f(V)],Pe.prototype,"attributeTableTemplate",void 0),e([f({type:String,json:{read:!1}})],Pe.prototype,"objectIdField",void 0),e([Se("service","objectIdField",["objectIdField","fields"])],Pe.prototype,"readObjectIdField",null),e([f({type:String,json:{read:!1}})],Pe.prototype,"globalIdField",void 0),e([Se("service","globalIdField",["globalIdField","fields"])],Pe.prototype,"readGlobalIdField",null),e([f({readOnly:!0,type:String,json:{read:!1}})],Pe.prototype,"displayField",null),e([f({type:String,json:{read:!1}})],Pe.prototype,"profile",void 0),e([Se("service","profile",["store.profile"])],Pe.prototype,"readProfile",null),e([f({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Pe.prototype,"normalReferenceFrame",void 0),e([f(M)],Pe.prototype,"screenSizePerspectiveEnabled",void 0),e([f({json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"serviceItemId",void 0),e([f(E)],Pe.prototype,"useViewTime",null),Pe=e([m("esri.layers.SceneLayer")],Pe);const Ae={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Te={"mesh-pyramids":"mesh",points:"point"},xe=Pe;export{xe as default};
5
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,throwIfAborted as y,isAbortError as u,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as h}from"../core/reactiveUtils.js";import{property as f,subclass as m}from"../core/accessorSupport/decorators.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as b}from"../geometry/projectionUtils.js";import w from"../graphic/SceneGraphicOrigin.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as O}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as _}from"./mixins/EditBusLayer.js";import{OperationalLayer as P}from"./mixins/OperationalLayer.js";import{PortalLayer as A}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as T}from"./mixins/ScaleRangeLayer.js";import{SceneService as x}from"./mixins/SceneService.js";import{useViewTimeProperty as E}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as D}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as q}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as R}from"./support/capabilities.js";import{elevationInfo as C,labelsVisible as N,legendEnabled as G,popupEnabled as Q,attributeTableTemplate as V,screenSizePerspectiveEnabled as M}from"./support/commonProperties.js";import{getFieldDomain as k,computeEffectiveEditingEnabled as K,getGlobalIdToObjectIdMap as $}from"./support/featureLayerUtils.js";import{FeatureReduction as H}from"./support/FeatureReduction.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import Z from"./support/FieldsIndex.js";import{fixRendererFields as B,unpackFieldNames as J}from"./support/fieldUtils.js";import{I3SNodePageDefinition as X,I3SMaterialDefinition as Y,I3STextureSetDefinition as ee,I3SGeometryDefinition as te}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as re,isFileSupported as ie}from"./support/infoFor3D.js";import se from"./support/LabelClass.js";import{reader as oe}from"./support/labelingInfo.js";import ae from"./support/LayerFloorInfo.js";import{layerLookupMap as ne}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as le}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as pe}from"./support/RangeInfo.js";import de from"./support/SceneFilter.js";import{cacheIsOutOfSync as ye}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as ce}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as me,elevationModeUnsupportedMessage as ge,featureExpressionUnsupportedMessage as ve}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as we}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as Ie}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Le,getFetchPopupTemplate as je}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Fe}from"../webdoc/support/opacityUtils.js";import{reader as Se}from"../core/accessorSupport/decorators/reader.js";const Oe=new Set(["3DObject","Point"]),_e=W();let Pe=class extends(D(_(x(S(P(A(T(p(O(F(i(I)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new w(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?k(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:X.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&K(this.associatedLayer)}get geometryType(){return Te[this.profile]||"mesh"}set renderer(e){B(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:R;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ae[r]?Ae[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await ce(this,{origin:"service"},t),B(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=J(this.fieldsIndex,await Le(this,je(this)));return Ie(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await $(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);y(t);const s=i.reduce((e,t)=>re(this.infoFor3D,t)?e+1:e,0);0===s&&r(new L),s>1&&r(new j);const a=this.spatialReference,l=t.origin,p=await b(l??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:a}),a,t),d=a.isGeographic?"local":"georeferenced",{default:u}=await import("../geometry/Mesh.js");y(t);const c=u.createWithExternalSource(p,{type:"client",files:i},{vertexSpace:d,transform:le(a),unitConversionDisabled:!0}),[h]=await this.uploadAssets([c],{...t,useAssetOrigin:!l});return h}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await we(e)).filter(e=>ie(t,e))}validateLayer(e){if(e.layerType&&!Oe.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!ye(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await q(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ne.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){u(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await h(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&me(n.getLogger(this),ge("Mesh scene layers","relative-to-scene",e)),me(n.getLogger(this),ve("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([f({types:{key:"type",base:H,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Pe.prototype,"featureReduction",void 0),e([f({type:[pe],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Pe.prototype,"rangeInfos",void 0),e([f({json:{read:!1}})],Pe.prototype,"associatedLayer",void 0),e([f({type:["show","hide"]})],Pe.prototype,"listMode",void 0),e([f({type:["ArcGISSceneServiceLayer"]})],Pe.prototype,"operationalLayerType",void 0),e([f({json:{read:!1},readOnly:!0})],Pe.prototype,"type",void 0),e([f({..._e.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"fields",void 0),e([f()],Pe.prototype,"types",null),e([f()],Pe.prototype,"typeIdField",null),e([f()],Pe.prototype,"templates",null),e([f()],Pe.prototype,"formTemplate",null),e([f({readOnly:!0})],Pe.prototype,"graphicOrigin",void 0),e([f({readOnly:!0,clonable:!1})],Pe.prototype,"fieldsIndex",null),e([f({type:ae,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Pe.prototype,"floorInfo",void 0),e([f(_e.outFields)],Pe.prototype,"outFields",void 0),e([f({type:X,readOnly:!0,json:{read:!1},clonable:!1})],Pe.prototype,"nodePages",void 0),e([Se("service","nodePages",["nodePages","pointNodePages"])],Pe.prototype,"readNodePages",null),e([f({type:[Y],readOnly:!0,clonable:!1})],Pe.prototype,"materialDefinitions",void 0),e([f({type:[ee],readOnly:!0,clonable:!1})],Pe.prototype,"textureSetDefinitions",void 0),e([f({type:[te],readOnly:!0,clonable:!1})],Pe.prototype,"geometryDefinitions",void 0),e([f({readOnly:!0})],Pe.prototype,"serviceUpdateTimeStamp",void 0),e([f({readOnly:!0})],Pe.prototype,"attributeStorageInfo",void 0),e([f({readOnly:!0})],Pe.prototype,"statisticsInfo",void 0),e([f({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Pe.prototype,"excludeObjectIds",void 0),e([f({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Pe.prototype,"definitionExpression",void 0),e([f({type:de,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Pe.prototype,"filter",void 0),e([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Pe.prototype,"path",void 0),e([f(C)],Pe.prototype,"elevationInfo",null),e([f({readOnly:!0,json:{read:!1}})],Pe.prototype,"effectiveCapabilities",null),e([f({readOnly:!0})],Pe.prototype,"effectiveEditingEnabled",null),e([f({type:String})],Pe.prototype,"geometryType",null),e([f(N)],Pe.prototype,"labelsVisible",void 0),e([f({type:[se],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:oe},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:oe},write:!0}})],Pe.prototype,"labelingInfo",void 0),e([f(G)],Pe.prototype,"legendEnabled",void 0),e([f({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Fe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Pe.prototype,"opacity",void 0),e([f({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"priority",void 0),e([f({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"semantic",void 0),e([f({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Pe.prototype,"renderer",null),e([f({json:{read:!1}})],Pe.prototype,"cachedDrawingInfo",void 0),e([Se("service","cachedDrawingInfo")],Pe.prototype,"readCachedDrawingInfo",null),e([f({readOnly:!0,json:{read:!1}})],Pe.prototype,"capabilities",null),e([f({type:Boolean,json:{read:!1}})],Pe.prototype,"editingEnabled",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"infoFor3D",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"relationships",null),e([f(Q)],Pe.prototype,"popupEnabled",void 0),e([f({type:r,json:{name:"popupInfo",write:!0}})],Pe.prototype,"popupTemplate",void 0),e([f({readOnly:!0,json:{read:!1}})],Pe.prototype,"defaultPopupTemplate",null),e([f(V)],Pe.prototype,"attributeTableTemplate",void 0),e([f({type:String,json:{read:!1}})],Pe.prototype,"objectIdField",void 0),e([Se("service","objectIdField",["objectIdField","fields"])],Pe.prototype,"readObjectIdField",null),e([f({type:String,json:{read:!1}})],Pe.prototype,"globalIdField",void 0),e([Se("service","globalIdField",["globalIdField","fields"])],Pe.prototype,"readGlobalIdField",null),e([f({readOnly:!0,type:String,json:{read:!1}})],Pe.prototype,"displayField",null),e([f({type:String,json:{read:!1}})],Pe.prototype,"profile",void 0),e([Se("service","profile",["store.profile"])],Pe.prototype,"readProfile",null),e([f({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Pe.prototype,"normalReferenceFrame",void 0),e([f(M)],Pe.prototype,"screenSizePerspectiveEnabled",void 0),e([f({json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"serviceItemId",void 0),e([f(E)],Pe.prototype,"useViewTime",null),Pe=e([m("esri.layers.SceneLayer")],Pe);const Ae={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Te={"mesh-pyramids":"mesh",points:"point"},xe=Pe;export{xe 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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import has from"../../../core/has.js";import s from"../../../core/Error.js";import{clone as a}from"../../../core/lang.js";import l from"../../../core/Logger.js";import{destroyMaybe as n,removeMaybe as o,abortMaybe as h}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,watch as m,syncAndInitial as f,sync as y}from"../../../core/reactiveUtils.js";import{sqlAnd as _}from"../../../core/sql.js";import{property as g,subclass as F}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as x}from"../../../core/support/UpdatingHandles.js";import{projectWithZConversion as v}from"../../../geometry/projectionUtils.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as D}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as C}from"../../support/layerUtils.js";import b from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as S,virtualSnapshotTileId as E,virtualDisplayFilterHighlightTileId as T}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as V}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as H}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as I}from"../../../views/3d/support/debugFlags.js";let L=class extends(u(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void l.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get snappingComplexityExceeded(){return this._tileFetcher?.snappingComplexityExceeded??!0}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===M.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===M.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,r=i?.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>M.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new S(0,0,0,null,E);return new r([e])}const e=this.layerView.view.featureTiles;if(!e)return new r;const t=e.tiles;if(this.layerView.displayFilterEnabled&&null!=this.layerView.effectiveDisplayFilterClause&&"1=1"!==this.layerView.effectiveDisplayFilterClause&&this.layerView.highlightIds?.length>0){const e=new S(0,0,0,this.layerView.view.featureTiles?.tilingScheme,T);return new r([...t,e])}return t}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new x,this.serviceDataExtent=null,this.serviceDataCount=M.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add(()=>this.displayFeatureLimit,e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal))),this._updatingHandles.add(()=>this.mode,()=>this._modeChanged(),p),this._updatingHandles.add(()=>this.mode,(e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)},p),this.addResolvingPromise(Promise.resolve().then(()=>this._verifyCapabilities()).then(()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo())).then(()=>this._initializeTileFetcher()))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!C(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=n(this._tileFetcher),this._tilesHandle=o(this._tilesHandle),this._lifeCycleAbortController=h(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new V({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=s,this._suspended?s.suspend():s.resume(),e&&this.addHandles(m(()=>e.quality,e=>s.memoryFactor=e,f));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(m(()=>this.layerView.view?.qualitySettings?.graphics3D?.[a],e=>s.lodFactor=e||1,p));const l=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},o=e=>{s.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==r.type&&this._updatingHandles.add(()=>r.createQueryVersion,()=>this._dataFilterChanged()),this._updatingHandles.add(()=>this.layerView.effectiveDisplayFilter,()=>this._effectiveDisplayFilterChanged()),this._updatingHandles.add(()=>this.layerView.highlightIds,()=>this._displayFilterHighlightIdsChanged()),this._updatingHandles.add(()=>t.availableFields,(e,t)=>this._availableFieldsChanged(t,e)),this._updatingHandles.add(()=>t.requiredFields,(e,t)=>this._requiredFieldsChanged(t,e)),"customParameters"in r&&this._updatingHandles.add(()=>r.customParameters,()=>this.restart()),this.addHandles([r.on("apply-edits",e=>this._applyEdits(e)),m(()=>this.extent,e=>s.filterExtent=e,y),m(()=>this.tileDescriptors,e=>s.tileDescriptors=e,y),m(()=>this.maximumNumberOfFeatures,l,f),m(()=>this.serviceDataCount,o,f),m(()=>({featureTiles:e.featureTiles,show:I.FEATURE_TILE_FETCH_SHOW_TILES}),({show:t,featureTiles:i})=>{t&&s&&i?s.debugger??=new H(s,i.tilingScheme.toTileInfo(),e):s.debugger=n(s.debugger)},p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add(()=>this.maxTotalSnapshotVertices,()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal)))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.enableFeatureTiles());break;default:l.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_displayFilterHighlightIdsChanged(){"snapshot"!==this.mode&&null!=this._tileFetcher&&this._tileFetcher.refetchDisplayFilterHighlightTile()}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then(e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}}).catch(e=>{if(!d(e))throw e})}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new b({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=_(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=a(t.fullExtentInLocalViewSpatialReference),l=i.fullExtent,n=this._fullExtentIsAccurate(),o=this.serviceDataCount;if(r&&o<=M.maxFeatureCountForExtent&&(!s||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:M.queryExtentTimeout,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=l){const e=l.spatialReference?await v(l,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",M.noServiceDataCount);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:M.queryStatisticsTimeout,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(d(r.error))throw r.error;this._set("serviceDataCount",M.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,r){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:s,averageSymbolComplexity:a}=e,{verticesPerFeature:l,verticesPerCoordinate:n}=a,o=l<=0,h=this._minimumNumberOfVerticesForGeometry>1;if(!o&&!h)return void(this._snapshotLimitExceeded=!1);0!==l&&null!=t&&await t;const u=Math.min(s,A),c=this.serviceDataCount,p=c!==M.noServiceDataCount;let m=p?Math.ceil((u-c*l)/(n||1)):Math.ceil(u/(n||1));if(h&&(m=Math.min(m,N)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:M.queryStatisticsTimeout,signal:r}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await D(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),s=r.then(()=>this._updateServiceDataExtent(t)).catch(e=>{d(e)||l.getLogger(this).error("#fetchServiceDataInfo()",e)}).then(()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null});return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then(()=>{},()=>{})}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([g({readOnly:!0})],L.prototype,"type",void 0),e([g({constructOnly:!0})],L.prototype,"graphics",void 0),e([g({constructOnly:!0})],L.prototype,"layerView",void 0),e([g({constructOnly:!0})],L.prototype,"context",void 0),e([g({readOnly:!0})],L.prototype,"dataUpdating",null),e([g()],L.prototype,"extent",null),e([g()],L.prototype,"updating",null),e([g({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([g()],L.prototype,"updatingTotal",null),e([g()],L.prototype,"updatingRemaining",null),e([g()],L.prototype,"expectedFeatureDiff",null),e([g()],L.prototype,"memoryForUnusedFeatures",null),e([g()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([g()],L.prototype,"snappingComplexityExceeded",null),e([g({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([g()],L.prototype,"_snapshotLimitExceeded",void 0),e([g()],L.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([g({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([g()],L.prototype,"_forceTilesMode",void 0),e([g({readOnly:!0})],L.prototype,"mode",null),e([g({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0})],L.prototype,"tileDescriptors",null),e([g()],L.prototype,"_tileFetcher",void 0),e([g()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,A=1e6,q=12e3,j=1e4,N=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}class M{static{this.noServiceDataCount=1/0}static{this.maxSnapshotMinScaleFactor=5}static reset(){M.maxFeatureCountForExtent=O,M.queryStatisticsTimeout=q,M.queryExtentTimeout=j}}M.reset();export{L as FeatureTileController3D,M as FeatureTileController3DConstants};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import has from"../../../core/has.js";import s from"../../../core/Error.js";import{clone as a}from"../../../core/lang.js";import l from"../../../core/Logger.js";import{destroyMaybe as n,removeMaybe as o,abortMaybe as h}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,watch as m,syncAndInitial as f,sync as y}from"../../../core/reactiveUtils.js";import{sqlAnd as _}from"../../../core/sql.js";import{property as g,subclass as F}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as x}from"../../../core/support/UpdatingHandles.js";import{projectAsync as v}from"../../../geometry/projectionUtils.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as D}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as C}from"../../support/layerUtils.js";import b from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as S,virtualSnapshotTileId as E,virtualDisplayFilterHighlightTileId as T}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as V}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as H}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as I}from"../../../views/3d/support/debugFlags.js";let L=class extends(u(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void l.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get snappingComplexityExceeded(){return this._tileFetcher?.snappingComplexityExceeded??!0}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===M.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===M.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,r=i?.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>M.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new S(0,0,0,null,E);return new r([e])}const e=this.layerView.view.featureTiles;if(!e)return new r;const t=e.tiles;if(this.layerView.displayFilterEnabled&&null!=this.layerView.effectiveDisplayFilterClause&&"1=1"!==this.layerView.effectiveDisplayFilterClause&&this.layerView.highlightIds?.length>0){const e=new S(0,0,0,this.layerView.view.featureTiles?.tilingScheme,T);return new r([...t,e])}return t}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new x,this.serviceDataExtent=null,this.serviceDataCount=M.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add(()=>this.displayFeatureLimit,e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal))),this._updatingHandles.add(()=>this.mode,()=>this._modeChanged(),p),this._updatingHandles.add(()=>this.mode,(e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)},p),this.addResolvingPromise(Promise.resolve().then(()=>this._verifyCapabilities()).then(()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo())).then(()=>this._initializeTileFetcher()))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!C(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=n(this._tileFetcher),this._tilesHandle=o(this._tilesHandle),this._lifeCycleAbortController=h(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new V({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=s,this._suspended?s.suspend():s.resume(),e&&this.addHandles(m(()=>e.quality,e=>s.memoryFactor=e,f));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(m(()=>this.layerView.view?.qualitySettings?.graphics3D?.[a],e=>s.lodFactor=e||1,p));const l=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},o=e=>{s.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==r.type&&this._updatingHandles.add(()=>r.createQueryVersion,()=>this._dataFilterChanged()),this._updatingHandles.add(()=>this.layerView.effectiveDisplayFilter,()=>this._effectiveDisplayFilterChanged()),this._updatingHandles.add(()=>this.layerView.highlightIds,()=>this._displayFilterHighlightIdsChanged()),this._updatingHandles.add(()=>t.availableFields,(e,t)=>this._availableFieldsChanged(t,e)),this._updatingHandles.add(()=>t.requiredFields,(e,t)=>this._requiredFieldsChanged(t,e)),"customParameters"in r&&this._updatingHandles.add(()=>r.customParameters,()=>this.restart()),this.addHandles([r.on("apply-edits",e=>this._applyEdits(e)),m(()=>this.extent,e=>s.filterExtent=e,y),m(()=>this.tileDescriptors,e=>s.tileDescriptors=e,y),m(()=>this.maximumNumberOfFeatures,l,f),m(()=>this.serviceDataCount,o,f),m(()=>({featureTiles:e.featureTiles,show:I.FEATURE_TILE_FETCH_SHOW_TILES}),({show:t,featureTiles:i})=>{t&&s&&i?s.debugger??=new H(s,i.tilingScheme.toTileInfo(),e):s.debugger=n(s.debugger)},p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add(()=>this.maxTotalSnapshotVertices,()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal)))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.enableFeatureTiles());break;default:l.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_displayFilterHighlightIdsChanged(){"snapshot"!==this.mode&&null!=this._tileFetcher&&this._tileFetcher.refetchDisplayFilterHighlightTile()}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then(e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}}).catch(e=>{if(!d(e))throw e})}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new b({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=_(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=a(t.fullExtentInLocalViewSpatialReference),l=i.fullExtent,n=this._fullExtentIsAccurate(),o=this.serviceDataCount;if(r&&o<=M.maxFeatureCountForExtent&&(!s||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:M.queryExtentTimeout,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=l){const e=l.spatialReference?await v(l,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",M.noServiceDataCount);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:M.queryStatisticsTimeout,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(d(r.error))throw r.error;this._set("serviceDataCount",M.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,r){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:s,averageSymbolComplexity:a}=e,{verticesPerFeature:l,verticesPerCoordinate:n}=a,o=l<=0,h=this._minimumNumberOfVerticesForGeometry>1;if(!o&&!h)return void(this._snapshotLimitExceeded=!1);0!==l&&null!=t&&await t;const u=Math.min(s,A),c=this.serviceDataCount,p=c!==M.noServiceDataCount;let m=p?Math.ceil((u-c*l)/(n||1)):Math.ceil(u/(n||1));if(h&&(m=Math.min(m,N)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:M.queryStatisticsTimeout,signal:r}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await D(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),s=r.then(()=>this._updateServiceDataExtent(t)).catch(e=>{d(e)||l.getLogger(this).error("#fetchServiceDataInfo()",e)}).then(()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null});return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then(()=>{},()=>{})}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([g({readOnly:!0})],L.prototype,"type",void 0),e([g({constructOnly:!0})],L.prototype,"graphics",void 0),e([g({constructOnly:!0})],L.prototype,"layerView",void 0),e([g({constructOnly:!0})],L.prototype,"context",void 0),e([g({readOnly:!0})],L.prototype,"dataUpdating",null),e([g()],L.prototype,"extent",null),e([g()],L.prototype,"updating",null),e([g({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([g()],L.prototype,"updatingTotal",null),e([g()],L.prototype,"updatingRemaining",null),e([g()],L.prototype,"expectedFeatureDiff",null),e([g()],L.prototype,"memoryForUnusedFeatures",null),e([g()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([g()],L.prototype,"snappingComplexityExceeded",null),e([g({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([g()],L.prototype,"_snapshotLimitExceeded",void 0),e([g()],L.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([g({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([g()],L.prototype,"_forceTilesMode",void 0),e([g({readOnly:!0})],L.prototype,"mode",null),e([g({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0})],L.prototype,"tileDescriptors",null),e([g()],L.prototype,"_tileFetcher",void 0),e([g()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,A=1e6,q=12e3,j=1e4,N=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}class M{static{this.noServiceDataCount=1/0}static{this.maxSnapshotMinScaleFactor=5}static reset(){M.maxFeatureCountForExtent=O,M.queryStatisticsTimeout=q,M.queryExtentTimeout=j}}M.reset();export{L as FeatureTileController3D,M as FeatureTileController3DConstants};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{indexOf as e,PositionHint as t}from"../../../core/arrayUtils.js";import{toConst as i}from"../../../core/compilerUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{clone as s}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{signalFromSignalOrOptions as l,throwIfAborted as u}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as o}from"../../../core/units.js";import{isSerializable as c}from"../../../core/support/jsonUtils.js";import{isLoaded as y}from"../../../geometry/projectionUtils.js";import{set as h,create as d,expandWithAABB as m,negativeInfinity as f}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as p,create as x}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as g}from"../../../geometry/support/boundsUtils.js";import{fromJSON as _,isExtent as F,isPolygon as w}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as Q}from"../../../geometry/support/normalizeUtils.js";import{equals as S,isValid as R}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as I}from"../featureConversionUtils.js";import{getWhereClause as j}from"./attributeSupport.js";import{getGeometry as b,cleanFromGeometryEngine as E}from"./geometryUtils.js";import{checkProjectionSupport as T,project as A,projectMany as v}from"./projectionSupport.js";import{QueryEngineCache as G}from"./QueryEngineCache.js";import{queryCapabilities as k}from"./QueryEngineCapabilities.js";import{QueryEngineResult as C}from"./QueryEngineResult.js";import{queryEngineEmptyResult as O,normalizeAttributeBinsQuery as P,normalizeQueryLike as q,normalizeQuery as z}from"./queryUtils.js";import{validateAttributeBinsQuery as U,validateQuery as B,validateStatisticsQuery as M}from"./queryValidationUtils.js";import{getSpatialQueryOperator as H,canQueryWithRBush as N}from"./spatialQuerySupport.js";import{getTimeExtent as Z,getTimeOperator as J}from"./timeSupport.js";import L from"../../support/FieldsIndex.js";import{ImmediateTask as V}from"../../../views/support/Scheduler.js";const D="unsupported-query";class K{constructor(e,t=null,i,r,s){this.attributes=e,this.geometry=i,this.centroid=r,this.filterFlags=s,this.groupId=-1,this.displayId=t}}class W{constructor(e){this._changeHandle=null,this.capabilities={query:k},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new G,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=c(e.fieldsIndex)?e.fieldsIndex:L.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=V}destroy(){this._changeHandle=a(this._changeHandle),this._frameTask=a(this._frameTask),this._clearCache(),n(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=l(t);if(!this.timeInfo?.trackIdField)throw new r(D,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=l(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=l(t);return e=s(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),r)}async executeQueryForUniqueValues(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),r)}async executeQueryForClassBreaks(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),r)}async executeQueryForHistogram(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),r)}async executeQueryForSnapping(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=l(e);this._timeExtentPromise||=Z(this.timeInfo,this.featureStore);const[i,r]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return u(t),{fullExtent:i,timeExtent:r}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(t){if(t!==O)throw t;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const r=i.size;if(!r)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:r,extent:s}}catch(i){if(i===O)return{count:0,extent:null};throw i}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,r=new Set;for(const e of i)r.add(t.featureAdapter.getObjectId(e));return r}catch(t){if(t===O)return new Set;throw t}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await P(e,this.definitionExpression,this.spatialReference),yield,e=await U(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==O)throw i;t=new C([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:r,field3:s,valueExpression:a}=t,n=yield*this._executeQueryForStatistics(e,{field:i,field2:r,field3:s,valueExpression:a});return yield,await n.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:r,returnEdge:a,vertexMode:n}=e;if(!a&&"none"===n)return{candidates:[]};let l=s(e.query);l=await q(l,this.definitionExpression,this.spatialReference),yield,l=await B(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const u=!S(i.spatialReference,this.spatialReference);u&&(await T(i.spatialReference,this.spatialReference),yield);const o="number"==typeof r?r:r.x,c="number"==typeof r?r:r.y,y={xmin:i.x-o,xmax:i.x+o,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},h=u?A(y,this.spatialReference):y;if(!h)return{candidates:[]};const d=(await Q(_(i),null,{signal:t}))[0];yield;const m=(await Q(_(h),null,{signal:t}))[0];if(yield,null==d||null==m)return{candidates:[]};const f=await this._searchFeatures(X(m.toJSON()));yield;const p=new C(f,l,this);this._executeObjectIdsQuery(p),yield,this._executeTimeQuery(p),yield,this._executeAttributesQuery(p),yield,yield*this._executeGeometryQueryForSnapping(p),yield;const x=d.toJSON(),g=u?A(x,this.spatialReference):x,F=u?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:r;return p.createSnappingResponse({...e,point:g,distance:F},l.returnZ,i.spatialReference)}async _getBounds(e,t,i){const r=h(d(),f);return await this.featureStore.forEachBounds(e,e=>m(r,e)),Y(r,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new C(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>i(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=s(e),e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),r}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:r}=e,s=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,n=null==s||S(s,a.spatialReference)?a:A(a,s);if(!n)return null;const l=i||r,u=R(t)&&!S(this.spatialReference,t)&&l?async e=>this._project(e,t):e=>e;yield;const o=this.featureAdapter,c=await this._searchFeatures(X(n));yield;if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(o.getObjectId(e));const i=await this._getAllFeatures();yield;const r=await H("esriSpatialRelDisjoint",n,this.geometryType);yield;const s=e=>!t.has(o.getObjectId(e))||r(o.getGeometry(e)),a=yield*this._runSpatialFilter(i,s);yield;const l=new C(a,e,this);return await u(l)}if(!c.length)return new C([],e,this);if(this._canExecuteSinglePass(n,e))return await u(new C(c,e,this));const y=await H("esriSpatialRelContains",n,this.geometryType);yield;const h=yield*this._runSpatialFilter(c,e=>y(o.getGeometry(e)));return yield,await u(new C(h,e,this))}async*_executeGeometryQuery(i,r){if(null!=r&&0===r.items.length)return r;const{geometry:s,outSR:a,returnGeometry:n,returnCentroid:l}=i,u=r?null:this._getCacheKey(i),o=u?this._cache.get(u):null;if(o)return new C(o,i,this);const c=R(a)&&!S(this.spatialReference,a),y=n||l,h=async e=>(c&&y&&await this._project(e,a),u&&this._cache.put(u,e.items),e),d=this.featureStore.featureSpatialReference,m=!s||null==d||S(d,s.spatialReference)?s:A(s,d);if(!m)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));yield;const f=this.featureAdapter;let p=await this._searchFeatures(X(s));yield;const x=i.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===x){if(!p.length)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));const e=new Set;for(const i of p)e.add(f.getObjectId(i));let t;null!=r?t=r.items:(yield,t=await this._getAllFeatures(),yield);const s=await H(x,m,this.geometryType);yield;const a=t=>!e.has(f.getObjectId(t))||s(f.getGeometry(t)),n=yield*this._runSpatialFilter(t,a);yield;const l=new C(n,i,this);return await h(l)}if(null!=r){const i=new t;p=p.filter(t=>e(r.items,t,r.items.length,i)>=0)}if(!p.length){const e=new C([],i,this);return u&&this._cache.put(u,e.items),e}if(this._canExecuteSinglePass(m,i))return await h(new C(p,i,this));const g=await H(x,m,this.geometryType);yield;const _=yield*this._runSpatialFilter(p,e=>g(f.getGeometry(e)));return yield,await h(new C(_,i,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const r of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(r).forEach(e=>t.add(e))}const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=J(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=j(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const r=await H(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,a=e=>r(s.getGeometry(e)),n=yield*this._runSpatialFilter(e.items,a);e.items=n}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const r=new Array;for(const s of e)t(s)&&r.push(s),i.madeProgress(),i.done&&(i=yield);return r}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:r}=this.timeInfo,s=r||i,a=new Map,n=this.featureAdapter.getAttribute;for(const l of e.items){const e=n(l,t),i=n(l,s),r=a.get(e);(!r||i>n(r,s))&&a.set(e,l)}e.items=Array.from(a.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:r,returnCentroid:s,outSR:a,resultType:n,cacheHint:l}=e;if("tile"!==n&&!l)return null;const u=r||s;return R(a)&&!S(this.spatialReference,a)&&u?JSON.stringify([t,i,a]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return N(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||S(this.spatialReference,t))return e;const r=this.featureAdapter,s=y()?await this._getFullExtent():void 0,a=await v(e.items.map(e=>b(this.geometryType,r.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:s});return e.items=i(a.map((t,i)=>r.cloneWithGeometry(e.items[i],I(t,this.hasZ,this.hasM)))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=s(e);try{e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await M(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),yield,r}catch(i){if(i!==O)throw i;return new C([],e,this)}}get test(){}}function X(e){if(N(e)){if(F(e))return[p(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(w(e))return e.rings.map(e=>p(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[g(x(),e)]}function Y(e,t,i,r,s){const a={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:E(r)};s&&isFinite(e[2])&&isFinite(e[5])&&(a.zmin=e[2],a.zmax=e[5],a.hasZ=!0);const n=A(a,t,i);if(n.spatialReference=E(i),n.xmax-n.xmin===0){const e=o(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin===0){const e=o(n.spatialReference);n.ymin-=e,n.ymax+=e}if(s&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin===0){const e=o(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}export{K as Feature,W as QueryEngine,Y as getQueryResultExtent};
5
+ import{indexOf as e,PositionHint as t}from"../../../core/arrayUtils.js";import{toConst as i}from"../../../core/compilerUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{clone as s}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{signalFromSignalOrOptions as l,throwIfAborted as o}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as u}from"../../../core/units.js";import{isSerializable as c}from"../../../core/support/jsonUtils.js";import{isLoaded as y}from"../../../geometry/projectionUtils.js";import{set as h,create as d,expandWithAABB as m,negativeInfinity as f}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as p,create as x}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as g}from"../../../geometry/support/boundsUtils.js";import{isExtent as _,isPolygon as F}from"../../../geometry/support/jsonTypeUtils.js";import{fromJSON as w}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as Q}from"../../../geometry/support/normalizeUtils.js";import{equals as S,isValid as R}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as I}from"../featureConversionUtils.js";import{getWhereClause as j}from"./attributeSupport.js";import{getGeometry as b,cleanFromGeometryEngine as E}from"./geometryUtils.js";import{checkProjectionSupport as T,project as A,projectMany as v}from"./projectionSupport.js";import{QueryEngineCache as G}from"./QueryEngineCache.js";import{queryCapabilities as k}from"./QueryEngineCapabilities.js";import{QueryEngineResult as C}from"./QueryEngineResult.js";import{queryEngineEmptyResult as O,normalizeAttributeBinsQuery as P,normalizeQueryLike as q,normalizeQuery as z}from"./queryUtils.js";import{validateAttributeBinsQuery as U,validateQuery as B,validateStatisticsQuery as M}from"./queryValidationUtils.js";import{getSpatialQueryOperator as H,canQueryWithRBush as N}from"./spatialQuerySupport.js";import{getTimeExtent as Z,getTimeOperator as J}from"./timeSupport.js";import L from"../../support/FieldsIndex.js";import{ImmediateTask as V}from"../../../views/support/Scheduler.js";const D="unsupported-query";class K{constructor(e,t=null,i,r,s){this.attributes=e,this.geometry=i,this.centroid=r,this.filterFlags=s,this.groupId=-1,this.displayId=t}}class W{constructor(e){this._changeHandle=null,this.capabilities={query:k},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new G,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=c(e.fieldsIndex)?e.fieldsIndex:L.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=V}destroy(){this._changeHandle=a(this._changeHandle),this._frameTask=a(this._frameTask),this._clearCache(),n(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=l(t);if(!this.timeInfo?.trackIdField)throw new r(D,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=l(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=l(t);return e=s(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),r)}async executeQueryForUniqueValues(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),r)}async executeQueryForClassBreaks(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),r)}async executeQueryForHistogram(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),r)}async executeQueryForSnapping(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=l(e);this._timeExtentPromise||=Z(this.timeInfo,this.featureStore);const[i,r]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return o(t),{fullExtent:i,timeExtent:r}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(t){if(t!==O)throw t;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const r=i.size;if(!r)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:r,extent:s}}catch(i){if(i===O)return{count:0,extent:null};throw i}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,r=new Set;for(const e of i)r.add(t.featureAdapter.getObjectId(e));return r}catch(t){if(t===O)return new Set;throw t}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await P(e,this.definitionExpression,this.spatialReference),yield,e=await U(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==O)throw i;t=new C([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:r,field3:s,valueExpression:a}=t,n=yield*this._executeQueryForStatistics(e,{field:i,field2:r,field3:s,valueExpression:a});return yield,await n.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:r,returnEdge:a,vertexMode:n}=e;if(!a&&"none"===n)return{candidates:[]};let l=s(e.query);l=await q(l,this.definitionExpression,this.spatialReference),yield,l=await B(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const o=!S(i.spatialReference,this.spatialReference);o&&(await T(i.spatialReference,this.spatialReference),yield);const u="number"==typeof r?r:r.x,c="number"==typeof r?r:r.y,y={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},h=o?A(y,this.spatialReference):y;if(!h)return{candidates:[]};const d=(await Q(w(i),null,{signal:t}))[0];yield;const m=(await Q(w(h),null,{signal:t}))[0];if(yield,null==d||null==m)return{candidates:[]};const f=await this._searchFeatures(X(m.toJSON()));yield;const p=new C(f,l,this);this._executeObjectIdsQuery(p),yield,this._executeTimeQuery(p),yield,this._executeAttributesQuery(p),yield,yield*this._executeGeometryQueryForSnapping(p),yield;const x=d.toJSON(),g=o?A(x,this.spatialReference):x,_=o?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:r;return p.createSnappingResponse({...e,point:g,distance:_},l.returnZ,i.spatialReference)}async _getBounds(e,t,i){const r=h(d(),f);return await this.featureStore.forEachBounds(e,e=>m(r,e)),Y(r,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new C(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>i(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=s(e),e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),r}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:r}=e,s=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,n=null==s||S(s,a.spatialReference)?a:A(a,s);if(!n)return null;const l=i||r,o=R(t)&&!S(this.spatialReference,t)&&l?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(X(n));yield;if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const r=await H("esriSpatialRelDisjoint",n,this.geometryType);yield;const s=e=>!t.has(u.getObjectId(e))||r(u.getGeometry(e)),a=yield*this._runSpatialFilter(i,s);yield;const l=new C(a,e,this);return await o(l)}if(!c.length)return new C([],e,this);if(this._canExecuteSinglePass(n,e))return await o(new C(c,e,this));const y=await H("esriSpatialRelContains",n,this.geometryType);yield;const h=yield*this._runSpatialFilter(c,e=>y(u.getGeometry(e)));return yield,await o(new C(h,e,this))}async*_executeGeometryQuery(i,r){if(null!=r&&0===r.items.length)return r;const{geometry:s,outSR:a,returnGeometry:n,returnCentroid:l}=i,o=r?null:this._getCacheKey(i),u=o?this._cache.get(o):null;if(u)return new C(u,i,this);const c=R(a)&&!S(this.spatialReference,a),y=n||l,h=async e=>(c&&y&&await this._project(e,a),o&&this._cache.put(o,e.items),e),d=this.featureStore.featureSpatialReference,m=!s||null==d||S(d,s.spatialReference)?s:A(s,d);if(!m)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));yield;const f=this.featureAdapter;let p=await this._searchFeatures(X(s));yield;const x=i.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===x){if(!p.length)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));const e=new Set;for(const i of p)e.add(f.getObjectId(i));let t;null!=r?t=r.items:(yield,t=await this._getAllFeatures(),yield);const s=await H(x,m,this.geometryType);yield;const a=t=>!e.has(f.getObjectId(t))||s(f.getGeometry(t)),n=yield*this._runSpatialFilter(t,a);yield;const l=new C(n,i,this);return await h(l)}if(null!=r){const i=new t;p=p.filter(t=>e(r.items,t,r.items.length,i)>=0)}if(!p.length){const e=new C([],i,this);return o&&this._cache.put(o,e.items),e}if(this._canExecuteSinglePass(m,i))return await h(new C(p,i,this));const g=await H(x,m,this.geometryType);yield;const _=yield*this._runSpatialFilter(p,e=>g(f.getGeometry(e)));return yield,await h(new C(_,i,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const r of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(r).forEach(e=>t.add(e))}const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=J(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=j(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const r=await H(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,a=e=>r(s.getGeometry(e)),n=yield*this._runSpatialFilter(e.items,a);e.items=n}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const r=new Array;for(const s of e)t(s)&&r.push(s),i.madeProgress(),i.done&&(i=yield);return r}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:r}=this.timeInfo,s=r||i,a=new Map,n=this.featureAdapter.getAttribute;for(const l of e.items){const e=n(l,t),i=n(l,s),r=a.get(e);(!r||i>n(r,s))&&a.set(e,l)}e.items=Array.from(a.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:r,returnCentroid:s,outSR:a,resultType:n,cacheHint:l}=e;if("tile"!==n&&!l)return null;const o=r||s;return R(a)&&!S(this.spatialReference,a)&&o?JSON.stringify([t,i,a]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return N(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||S(this.spatialReference,t))return e;const r=this.featureAdapter,s=y()?await this._getFullExtent():void 0,a=await v(e.items.map(e=>b(this.geometryType,r.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:s});return e.items=i(a.map((t,i)=>r.cloneWithGeometry(e.items[i],I(t,this.hasZ,this.hasM)))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=s(e);try{e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await M(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),yield,r}catch(i){if(i!==O)throw i;return new C([],e,this)}}get test(){}}function X(e){if(N(e)){if(_(e))return[p(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(F(e))return e.rings.map(e=>p(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[g(x(),e)]}function Y(e,t,i,r,s){const a={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:E(r)};s&&isFinite(e[2])&&isFinite(e[5])&&(a.zmin=e[2],a.zmax=e[5],a.hasZ=!0);const n=A(a,t,i);if(n.spatialReference=E(i),n.xmax-n.xmin===0){const e=u(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin===0){const e=u(n.spatialReference);n.ymin-=e,n.ymax+=e}if(s&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin===0){const e=u(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}export{K as Feature,W as QueryEngine,Y as getQueryResultExtent};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/Error.js";import{JSONMap as e}from"../../../core/jsonMap.js";import{getUnitString as i}from"../../../core/units.js";import{canProjectWithoutEngine as r}from"../../../geometry/projectionUtils.js";import{getGeometryExtent as n}from"../../../geometry/support/extentUtils.js";import{fromJSON as a,isPolygon as o,isExtent as s,isPolyline as l}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as m}from"../../../geometry/support/normalizeUtils.js";import{isGeographic as u,isWebMercator as c,wgs84 as p,equals as f}from"../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as y,project as d}from"./projectionSupport.js";const g=new e({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),S=Object.freeze({}),R="frequency";async function x(t,e,i){const r=t.bin;return r.onField&&(r.onField=r.onField.trim()),r.onExpression?.value&&(r.onExpression.value=r.onExpression.value.trim()),r.splitBy&&(r.splitBy.value&&(r.splitBy.value=r.splitBy.value.trim()),r.splitBy.outAlias&&(r.splitBy.outAlias=r.splitBy.outAlias.trim())),r.stackBy&&(r.stackBy.value&&(r.stackBy.value=r.stackBy.value.trim()),r.stackBy.outAlias&&(r.stackBy.outAlias=r.stackBy.outAlias.trim())),"normalizationField"in r.parameters&&r.parameters.normalizationField&&(r.parameters.normalizationField=r.parameters.normalizationField.trim()),t.outStatistics?.length||(t.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:R}]),w(t,e,i)}async function w(t,e,i){const{outFields:r,orderByFields:n,groupByFieldsForStatistics:a,outStatistics:o}=t;if(r)for(let s=0;s<r.length;s++)r[s]=r[s].trim();if(n)for(let s=0;s<n.length;s++)n[s]=n[s].trim();if(a)for(let s=0;s<a.length;s++)a[s]=a[s].trim();if(o)for(let s=0;s<o.length;s++)o[s].onStatisticField&&(o[s].onStatisticField=o[s].onStatisticField.trim());return t.geometry&&!t.outSR&&(t.outSR=t.geometry.spatialReference),B(t,e,i)}async function B(t,e,i){if(!t)return null;let{where:r}=t;if(t.where=r=r?.trim(),(!r||/^1 *= *1$/.test(r)||e&&e===r)&&(t.where=null),!t.geometry)return t;let o=await v(t);if(t.distance=0,t.units=null,"esriSpatialRelEnvelopeIntersects"===t.spatialRel){const{spatialReference:e}=t.geometry;o=n(o),o.spatialReference=e}if(o){await y(o.spatialReference,i),o=j(o,i);const e=(await m(a(o)))[0];if(null==e)throw S;const r="quantizationParameters"in t&&t.quantizationParameters?.tolerance||"maxAllowableOffset"in t&&t.maxAllowableOffset||0,n=r&&F(o,i)?{extendedParams:{densificationStep:8*r}}:void 0,s=e.toJSON(),l=d(s,s.spatialReference,i,n);if(!l)throw S;l.spatialReference=i,t.geometry=l}return t}function F(t,e){if(!t)return!1;const i=t.spatialReference;return(s(t)||o(t)||l(t))&&!f(i,e)&&!r(i,e)}function j(t,e){const i=t.spatialReference;return F(t,e)&&s(t)?{spatialReference:i,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:t}async function v(e){const{distance:r,units:n}=e,a=e.geometry;if(null==r||"vertexAttributes"in a)return a;const s=a.spatialReference,l=n?g.fromJSON(n):i(s),m=s&&(u(s)||c(s))?a:await y(s,p).then(()=>d(a,p)),f=await import("../../../geometry/operators/json/geodesicBufferOperator.js");await f.load();const S=f.execute(m,r||1,{unit:l})??void 0;if(!S||!o(S)||0===S.rings.length)throw new t("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return S}function h(t,e){return null==t?null:"string"==typeof t?e?new Date(`1970-01-01T${t}Z`).getTime():new Date(t).getTime():t instanceof Date?t.getTime():t}export{h as getDateInNumber,x as normalizeAttributeBinsQuery,w as normalizeQuery,B as normalizeQueryLike,S as queryEngineEmptyResult,g as unitsKebabDict};
5
+ import t from"../../../core/Error.js";import{JSONMap as e}from"../../../core/jsonMap.js";import{getUnitString as i}from"../../../core/units.js";import{canProjectWithoutEngine as r}from"../../../geometry/projectionUtils.js";import{getGeometryExtent as n}from"../../../geometry/support/extentUtils.js";import{isPolygon as o,isExtent as s,isPolyline as a}from"../../../geometry/support/jsonTypeUtils.js";import{fromJSON as l}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as m}from"../../../geometry/support/normalizeUtils.js";import{isGeographic as u,isWebMercator as c,wgs84 as p,equals as f}from"../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as y,project as d}from"./projectionSupport.js";const g=new e({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),S=Object.freeze({}),R="frequency";async function x(t,e,i){const r=t.bin;return r.onField&&(r.onField=r.onField.trim()),r.onExpression?.value&&(r.onExpression.value=r.onExpression.value.trim()),r.splitBy&&(r.splitBy.value&&(r.splitBy.value=r.splitBy.value.trim()),r.splitBy.outAlias&&(r.splitBy.outAlias=r.splitBy.outAlias.trim())),r.stackBy&&(r.stackBy.value&&(r.stackBy.value=r.stackBy.value.trim()),r.stackBy.outAlias&&(r.stackBy.outAlias=r.stackBy.outAlias.trim())),"normalizationField"in r.parameters&&r.parameters.normalizationField&&(r.parameters.normalizationField=r.parameters.normalizationField.trim()),t.outStatistics?.length||(t.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:R}]),j(t,e,i)}async function j(t,e,i){const{outFields:r,orderByFields:n,groupByFieldsForStatistics:o,outStatistics:s}=t;if(r)for(let a=0;a<r.length;a++)r[a]=r[a].trim();if(n)for(let a=0;a<n.length;a++)n[a]=n[a].trim();if(o)for(let a=0;a<o.length;a++)o[a]=o[a].trim();if(s)for(let a=0;a<s.length;a++)s[a].onStatisticField&&(s[a].onStatisticField=s[a].onStatisticField.trim());return t.geometry&&!t.outSR&&(t.outSR=t.geometry.spatialReference),w(t,e,i)}async function w(t,e,i){if(!t)return null;let{where:r}=t;if(t.where=r=r?.trim(),(!r||/^1 *= *1$/.test(r)||e&&e===r)&&(t.where=null),!t.geometry)return t;let o=await v(t);if(t.distance=0,t.units=null,"esriSpatialRelEnvelopeIntersects"===t.spatialRel){const{spatialReference:e}=t.geometry;o=n(o),o.spatialReference=e}if(o){await y(o.spatialReference,i),o=F(o,i);const e=(await m(l(o)))[0];if(null==e)throw S;const r="quantizationParameters"in t&&t.quantizationParameters?.tolerance||"maxAllowableOffset"in t&&t.maxAllowableOffset||0,n=r&&B(o,i)?{extendedParams:{densificationStep:8*r}}:void 0,s=e.toJSON(),a=d(s,s.spatialReference,i,n);if(!a)throw S;a.spatialReference=i,t.geometry=a}return t}function B(t,e){if(!t)return!1;const i=t.spatialReference;return(s(t)||o(t)||a(t))&&!f(i,e)&&!r(i,e)}function F(t,e){const i=t.spatialReference;return B(t,e)&&s(t)?{spatialReference:i,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:t}async function v(e){const{distance:r,units:n}=e,s=e.geometry;if(null==r||"vertexAttributes"in s)return s;const a=s.spatialReference,l=n?g.fromJSON(n):i(a),m=a&&(u(a)||c(a))?s:await y(a,p).then(()=>d(s,p)),f=await import("../../../geometry/operators/json/geodesicBufferOperator.js");await f.load();const S=f.execute(m,r||1,{unit:l})??void 0;if(!S||!o(S)||0===S.rings.length)throw new t("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return S}function h(t,e){return null==t?null:"string"==typeof t?e?new Date(`1970-01-01T${t}Z`).getTime():new Date(t).getTime():t instanceof Date?t.getTime():t}export{h as getDateInNumber,x as normalizeAttributeBinsQuery,j as normalizeQuery,w as normalizeQueryLike,S as queryEngineEmptyResult,g as unitsKebabDict};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import{extentContainsPoint as r,extentContainsMultipoint as t}from"../../../geometry/support/contains.js";import{getExtentIntersector as i}from"../../../geometry/support/intersects.js";import{isPolygon as o,isExtent as s,getJsonType as n}from"../../../geometry/support/jsonUtils.js";import{isValid as a}from"../../../geometry/support/spatialReferenceUtils.js";import{polygonContainsPoint as l,polygonContainsMultipoint as p}from"../contains.js";import{convertFromPolygon as u}from"../featureConversionUtils.js";import{getGeometry as m}from"./geometryUtils.js";import{checkProjectionSupport as y}from"./projectionSupport.js";const c="unsupported-query",f={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}};function R(e){return null!=e&&!0===f.spatialRelationship[e]}function S(e){return null!=e&&!0===f.queryGeometry[n(e)]}function j(e){return null!=e&&!0===f.layerGeometry[e]}const g={esriSpatialRelIntersects:()=>import("../../../geometry/operators/json/intersectsOperator.js"),esriSpatialRelContains:()=>import("../../../geometry/operators/json/containsOperator.js"),esriSpatialRelCrosses:()=>import("../../../geometry/operators/json/crossesOperator.js"),esriSpatialRelDisjoint:()=>import("../../../geometry/operators/json/disjointOperator.js"),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>import("../../../geometry/operators/json/overlapsOperator.js"),esriSpatialRelTouches:()=>import("../../../geometry/operators/json/touchesOperator.js"),esriSpatialRelWithin:()=>import("../../../geometry/operators/json/withinOperator.js"),esriSpatialRelRelation:null};function G(e){const r=g[e];if(null==r)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return r()}async function h(e,n,a){if(o(n)){if("esriGeometryPoint"===a&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=u(n,!1,!1);return r=>l(e,r)}if("esriGeometryMultipoint"===a){const r=u(n,!1,!1);if("esriSpatialRelContains"===e)return e=>p(r,e)}}if(s(n)){if("esriGeometryPoint"===a&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>r(n,m(a,e));if("esriGeometryMultipoint"===a&&"esriSpatialRelContains"===e)return e=>t(n,m(a,e));if("esriSpatialRelIntersects"===e){const e=i(a);return r=>e(n,m(a,r))}}"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const y=await G(e);return e=>y.execute(n,m(a,e))}async function I(r,t,i){const{spatialRel:o,geometry:s}=r;if(s){if(!R(o))throw new e(c,"Unsupported query spatial relationship",{query:r});if(a(s.spatialReference)&&a(i)){if(!S(s))throw new e(c,"Unsupported query geometry type",{query:r});if(!j(t))throw new e(c,"Unsupported layer geometry type",{query:r});if(r.outSR)return y(r.geometry?.spatialReference,r.outSR)}}}function w(e){if(s(e))return!0;if(o(e)){for(const r of e.rings){if(5!==r.length)return!1;if(r[0][0]!==r[1][0]||r[0][0]!==r[4][0]||r[2][0]!==r[3][0]||r[0][1]!==r[3][1]||r[0][1]!==r[4][1]||r[1][1]!==r[2][1])return!1}return!0}return!1}export{w as canQueryWithRBush,I as checkSpatialQuerySupport,h as getSpatialQueryOperator};
5
+ import e from"../../../core/Error.js";import{extentContainsPoint as r,extentContainsMultipoint as t}from"../../../geometry/support/contains.js";import{getExtentIntersector as i}from"../../../geometry/support/intersects.js";import{isPolygon as o,isExtent as s,getJsonType as n}from"../../../geometry/support/jsonTypeUtils.js";import{isValid as a}from"../../../geometry/support/spatialReferenceUtils.js";import{polygonContainsPoint as l,polygonContainsMultipoint as p}from"../contains.js";import{convertFromPolygon as u}from"../featureConversionUtils.js";import{getGeometry as m}from"./geometryUtils.js";import{checkProjectionSupport as y}from"./projectionSupport.js";const c="unsupported-query",f={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}};function R(e){return null!=e&&!0===f.spatialRelationship[e]}function S(e){return null!=e&&!0===f.queryGeometry[n(e)]}function j(e){return null!=e&&!0===f.layerGeometry[e]}const g={esriSpatialRelIntersects:()=>import("../../../geometry/operators/json/intersectsOperator.js"),esriSpatialRelContains:()=>import("../../../geometry/operators/json/containsOperator.js"),esriSpatialRelCrosses:()=>import("../../../geometry/operators/json/crossesOperator.js"),esriSpatialRelDisjoint:()=>import("../../../geometry/operators/json/disjointOperator.js"),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>import("../../../geometry/operators/json/overlapsOperator.js"),esriSpatialRelTouches:()=>import("../../../geometry/operators/json/touchesOperator.js"),esriSpatialRelWithin:()=>import("../../../geometry/operators/json/withinOperator.js"),esriSpatialRelRelation:null};function G(e){const r=g[e];if(null==r)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return r()}async function h(e,n,a){if(o(n)){if("esriGeometryPoint"===a&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=u(n,!1,!1);return r=>l(e,r)}if("esriGeometryMultipoint"===a){const r=u(n,!1,!1);if("esriSpatialRelContains"===e)return e=>p(r,e)}}if(s(n)){if("esriGeometryPoint"===a&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>r(n,m(a,e));if("esriGeometryMultipoint"===a&&"esriSpatialRelContains"===e)return e=>t(n,m(a,e));if("esriSpatialRelIntersects"===e){const e=i(a);return r=>e(n,m(a,r))}}"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const y=await G(e);return e=>y.execute(n,m(a,e))}async function I(r,t,i){const{spatialRel:o,geometry:s}=r;if(s){if(!R(o))throw new e(c,"Unsupported query spatial relationship",{query:r});if(a(s.spatialReference)&&a(i)){if(!S(s))throw new e(c,"Unsupported query geometry type",{query:r});if(!j(t))throw new e(c,"Unsupported layer geometry type",{query:r});if(r.outSR)return y(r.geometry?.spatialReference,r.outSR)}}}function w(e){if(s(e))return!0;if(o(e)){for(const r of e.rings){if(5!==r.length)return!1;if(r[0][0]!==r[1][0]||r[0][0]!==r[4][0]||r[2][0]!==r[3][0]||r[0][1]!==r[3][1]||r[0][1]!==r[4][1]||r[1][1]!==r[2][1])return!1}return!0}return!1}export{w as canQueryWithRBush,I as checkSpatialQuerySupport,h as getSpatialQueryOperator};