@arcgis/core 5.1.0-next.71 → 5.1.0-next.72

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 (365) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/003fd7745966fe03510c.js +1 -0
  4. package/assets/esri/core/workers/chunks/00bae4b7e179336e0362.js +1 -0
  5. package/assets/esri/core/workers/chunks/{36031cb53c486630f3c9.js → 026d3fa331caec1ea3d2.js} +1 -1
  6. package/assets/esri/core/workers/chunks/027c3ea756db68e51f0a.js +1 -0
  7. package/assets/esri/core/workers/chunks/{c06d021180418f2014de.js → 02876e434dc91c42b2f4.js} +1 -1
  8. package/assets/esri/core/workers/chunks/041c372e98a6fba90b36.js +1 -0
  9. package/assets/esri/core/workers/chunks/{a5a46d0a0831497cf1b4.js → 0783890816bac45277b9.js} +1 -1
  10. package/assets/esri/core/workers/chunks/07aac6245a0d1adbb2d4.js +1 -0
  11. package/assets/esri/core/workers/chunks/0839da55707f7c4cf780.js +1 -0
  12. package/assets/esri/core/workers/chunks/0c00e5e4bd18467bcecd.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d69110ec4078c583a05e.js → 0d96e39380fd84cea9ba.js} +1 -1
  14. package/assets/esri/core/workers/chunks/0dad0bca8d58b2c63d22.js +1 -0
  15. package/assets/esri/core/workers/chunks/0ef93722524620023f69.js +1 -0
  16. package/assets/esri/core/workers/chunks/127cd8fee3717a473fc5.js +1 -0
  17. package/assets/esri/core/workers/chunks/1286f41f245ef22b3a26.js +1 -0
  18. package/assets/esri/core/workers/chunks/161d60fdac2013c15543.js +1 -0
  19. package/assets/esri/core/workers/chunks/1661684357912726a72a.js +1 -0
  20. package/assets/esri/core/workers/chunks/168de44a789d1cecc1f8.js +1 -0
  21. package/assets/esri/core/workers/chunks/1961b59756933e0a82f2.js +1 -0
  22. package/assets/esri/core/workers/chunks/1d9d7915cf7449e5d468.js +1 -0
  23. package/assets/esri/core/workers/chunks/1f85646936200a399c15.js +1 -0
  24. package/assets/esri/core/workers/chunks/{deb8a0b306d7b9c86b97.js → 2171aaa147aa4d9fc5b5.js} +1 -1
  25. package/assets/esri/core/workers/chunks/235cb82952a18ff8d206.js +1 -0
  26. package/assets/esri/core/workers/chunks/260d4571722cb1ff1366.js +1 -0
  27. package/assets/esri/core/workers/chunks/{3e972ae291df1844017d.js → 266ba61b72a278d93a26.js} +1 -1
  28. package/assets/esri/core/workers/chunks/27b80c386cebadcaca3c.js +1 -0
  29. package/assets/esri/core/workers/chunks/29d3890a5a43d934067a.js +1 -0
  30. package/assets/esri/core/workers/chunks/{333a0038d782d8a34d58.js → 2abf124e2956e4f76688.js} +1 -1
  31. package/assets/esri/core/workers/chunks/2f17438d215bea3ce70f.js +1 -0
  32. package/assets/esri/core/workers/chunks/{f6d5dd2eef0d9918096e.js → 30e710ec4d22c43d4e7e.js} +1 -1
  33. package/assets/esri/core/workers/chunks/356cb86606b8c674f947.js +1 -0
  34. package/assets/esri/core/workers/chunks/398e0dd2bc7e1ab84831.js +1 -0
  35. package/assets/esri/core/workers/chunks/3b1052aa30af3f6186cc.js +1 -0
  36. package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +1 -0
  37. package/assets/esri/core/workers/chunks/3cd9bd20e75ba4d5b294.js +1 -0
  38. package/assets/esri/core/workers/chunks/3e87e3ad857d72f6ecbb.js +1 -0
  39. package/assets/esri/core/workers/chunks/{7cb6d8f7eaf762279632.js → 3ea5a18b264628dc37f0.js} +1 -1
  40. package/assets/esri/core/workers/chunks/41809c16544ec25120fa.js +1 -0
  41. package/assets/esri/core/workers/chunks/41913575dd45c65d645e.js +1 -0
  42. package/assets/esri/core/workers/chunks/42e483fde18f12da32a6.js +1 -0
  43. package/assets/esri/core/workers/chunks/43ab44d37bc0ea97ef98.js +1 -0
  44. package/assets/esri/core/workers/chunks/46e622857ba92a72a317.js +1 -0
  45. package/assets/esri/core/workers/chunks/47f2113357b2aa4f4f37.js +1 -0
  46. package/assets/esri/core/workers/chunks/488ed9584b527ec47be3.js +1 -0
  47. package/assets/esri/core/workers/chunks/4ad32580e0c0699fde1f.js +1 -0
  48. package/assets/esri/core/workers/chunks/4d0f793dee4ad919221b.js +1 -0
  49. package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +1 -0
  50. package/assets/esri/core/workers/chunks/{916a8f3eed1fafdc7242.js → 54d07eadf113f0e4e506.js} +1 -1
  51. package/assets/esri/core/workers/chunks/54ed37ec9682ea739deb.js +1 -0
  52. package/assets/esri/core/workers/chunks/{9187d1caca1fd2d713e0.js → 55369c5bd65bcaf78da1.js} +1 -1
  53. package/assets/esri/core/workers/chunks/56fd3da911c2c4511e5d.js +1 -0
  54. package/assets/esri/core/workers/chunks/59592bb25f226865e88a.js +1 -0
  55. package/assets/esri/core/workers/chunks/{e77d958cb62536b8eebc.js → 5a4d7ba6dc1d4b41d80d.js} +1 -1
  56. package/assets/esri/core/workers/chunks/5d55b4449bcb24cd72b6.js +1 -0
  57. package/assets/esri/core/workers/chunks/5d8fe41a3c06ddb4094b.js +1 -0
  58. package/assets/esri/core/workers/chunks/{fe68c28d3c61f116ff23.js → 5ef37f37e405b3bb5450.js} +1 -1
  59. package/assets/esri/core/workers/chunks/608d707fd9d9f9088473.js +1 -0
  60. package/assets/esri/core/workers/chunks/{c92352b0e39576ca317a.js → 61ef14e42bc09b787d89.js} +1 -1
  61. package/assets/esri/core/workers/chunks/656d6963e8f837fbf28f.js +1 -0
  62. package/assets/esri/core/workers/chunks/68b47a5a50e0b5fffca2.js +1 -0
  63. package/assets/esri/core/workers/chunks/{a5afcd633b32e6ee31a7.js → 6a0352d20596ca3f4b64.js} +1 -1
  64. package/assets/esri/core/workers/chunks/6c7ff968bd4fc816442d.js +1 -0
  65. package/assets/esri/core/workers/chunks/6e526c06825ecc6c99c0.js +1 -0
  66. package/assets/esri/core/workers/chunks/6ea8b0d68881d16a2432.js +1 -0
  67. package/assets/esri/core/workers/chunks/6f9ea461c268c421f9c9.js +1 -0
  68. package/assets/esri/core/workers/chunks/7027d93dc5a4595d70c6.js +1 -0
  69. package/assets/esri/core/workers/chunks/70b35b2446558d5280e3.js +1 -0
  70. package/assets/esri/core/workers/chunks/7349cb45a93e6916f115.js +1 -0
  71. package/assets/esri/core/workers/chunks/751609831b283903ba48.js +1 -0
  72. package/assets/esri/core/workers/chunks/76edaeaf8fe344bb77a8.js +1 -0
  73. package/assets/esri/core/workers/chunks/76fe5b821d6b54db5721.js +1 -0
  74. package/assets/esri/core/workers/chunks/81d30c9062ad0120a863.js +1 -0
  75. package/assets/esri/core/workers/chunks/84772b023d04e415f17f.js +1 -0
  76. package/assets/esri/core/workers/chunks/{123e920e4460124ec3bb.js → 88b480a1d1fb01778798.js} +9 -30
  77. package/assets/esri/core/workers/chunks/88c5f7c712c6b89b5109.js +1 -0
  78. package/assets/esri/core/workers/chunks/88e469b82d2594f23649.js +1 -0
  79. package/assets/esri/core/workers/chunks/8a14e3db28c403b046cf.js +1 -0
  80. package/assets/esri/core/workers/chunks/8a664451845a47048859.js +1 -0
  81. package/assets/esri/core/workers/chunks/8a8242e7cc7e6a9e7876.js +1 -0
  82. package/assets/esri/core/workers/chunks/{4d51261d6131c07402cd.js → 8acee3fba488f202f82f.js} +1 -1
  83. package/assets/esri/core/workers/chunks/91a0227a64a944af3286.js +596 -0
  84. package/assets/esri/core/workers/chunks/9444ed8ea117861ae89b.js +1 -0
  85. package/assets/esri/core/workers/chunks/96bba4d93a32ad34a1c8.js +1 -0
  86. package/assets/esri/core/workers/chunks/9a38fd68b02b617c45d3.js +1 -0
  87. package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +1 -0
  88. package/assets/esri/core/workers/chunks/9f4b97204def91567e3c.js +1 -0
  89. package/assets/esri/core/workers/chunks/a37c28e3c4a2be9fd1d5.js +1 -0
  90. package/assets/esri/core/workers/chunks/{58b3c888c8bfedbe6443.js → a37fc886227365f7ecd5.js} +1 -1
  91. package/assets/esri/core/workers/chunks/a8d7f59927bdad564141.js +1 -0
  92. package/assets/esri/core/workers/chunks/{f89976ec97938bf86996.js → abc06d10c7ac8ba5b0e4.js} +1 -1
  93. package/assets/esri/core/workers/chunks/abe22ae8ee0dcc9efbb7.js +1 -0
  94. package/assets/esri/core/workers/chunks/{fef5dc19736f12dfa99a.js → af5db0372d526e592fcc.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{eb3cdc4ff45243fc3cc5.js → b475f5492c6e3fd4cca8.js} +1 -1
  96. package/assets/esri/core/workers/chunks/b495f14d90abe8d1a558.js +1 -0
  97. package/assets/esri/core/workers/chunks/{6ac5ec3ecbca8860338b.js → b54b7cc6b23a70fed700.js} +1 -1
  98. package/assets/esri/core/workers/chunks/b702279c48f3009f6dd8.js +1 -0
  99. package/assets/esri/core/workers/chunks/b79058f5bda6fcac22f8.js +1 -0
  100. package/assets/esri/core/workers/chunks/b801631b58e6fc6cec8a.js +1 -0
  101. package/assets/esri/core/workers/chunks/{31071a43e2c03984d619.js → b92794def31592a6a25f.js} +1 -1
  102. package/assets/esri/core/workers/chunks/be1d6a571f76933dfbb0.js +1 -0
  103. package/assets/esri/core/workers/chunks/bea70be8e38b8c83ccd2.js +1 -0
  104. package/assets/esri/core/workers/chunks/bfcdc5c315131aae34d8.js +1 -0
  105. package/assets/esri/core/workers/chunks/c0f624a2ca0d07ef8f8c.js +1 -0
  106. package/assets/esri/core/workers/chunks/c1838822b096d5f36a8b.js +1 -0
  107. package/assets/esri/core/workers/chunks/c3381b9a36299210ee47.js +1 -0
  108. package/assets/esri/core/workers/chunks/{c2882a9e67124b7c18be.js → c503c79ba5761f7abbeb.js} +1 -1
  109. package/assets/esri/core/workers/chunks/cb5e4b9b4a59c2622eb5.js +1 -0
  110. package/assets/esri/core/workers/chunks/d201a5dff18a5bb467ab.js +1 -0
  111. package/assets/esri/core/workers/chunks/{3b7cda16e656db450f11.js → d2aa75816e84b1e7fd25.js} +1 -1
  112. package/assets/esri/core/workers/chunks/{4d8670f6fa8952b7bab6.js → d950d5c2844206502ff0.js} +1 -1
  113. package/assets/esri/core/workers/chunks/db3c484bfa607dec6050.js +1 -0
  114. package/assets/esri/core/workers/chunks/db588bf3256e95c977b7.js +1 -0
  115. package/assets/esri/core/workers/chunks/{967758a05170545cd371.js → dcc719e15b2e0cce1f3b.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{6bb090f3e5c18604cb39.js → dd5b362bded458afa2d6.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{e957d52cb9643961a843.js → de583214195eff13cb00.js} +58 -45
  118. package/assets/esri/core/workers/chunks/dec6d41d614105e6fd93.js +1 -0
  119. package/assets/esri/core/workers/chunks/dfdd474fddcd1d6091ce.js +1 -0
  120. package/assets/esri/core/workers/chunks/e235ea4293d5d463acfb.js +1 -0
  121. package/assets/esri/core/workers/chunks/e43486113aaf72ac4dc1.js +1 -0
  122. package/assets/esri/core/workers/chunks/ea4c3393c5757e309a71.js +1 -0
  123. package/assets/esri/core/workers/chunks/ed216ddeb7f59f510bd0.js +1 -0
  124. package/assets/esri/core/workers/chunks/ef8886dff54063928bcb.js +1 -0
  125. package/assets/esri/core/workers/chunks/{231f502cd15f30d12be2.js → f1673e723b336204ad77.js} +1 -1
  126. package/assets/esri/core/workers/chunks/f5223ffb3be548c9b0a1.js +1 -0
  127. package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +1 -0
  128. package/chunks/CheckerBoard.glsl.js +3 -5
  129. package/chunks/ColorMaterial.glsl.js +4 -6
  130. package/chunks/ComponentShader.glsl.js +42 -44
  131. package/chunks/DefaultMaterial.glsl.js +21 -23
  132. package/chunks/EdgeShader.glsl.js +9 -11
  133. package/chunks/GaussianSplat.glsl.js +8 -8
  134. package/chunks/ImageMaterial.glsl.js +5 -7
  135. package/chunks/LineCallout.glsl.js +9 -12
  136. package/chunks/LineMarker.glsl.js +24 -26
  137. package/chunks/Path.glsl.js +15 -17
  138. package/chunks/Pattern.glsl.js +25 -27
  139. package/chunks/RealisticTree.glsl.js +11 -13
  140. package/chunks/RibbonLine.glsl.js +42 -45
  141. package/chunks/ShadedColorMaterial.glsl.js +8 -9
  142. package/chunks/Water.glsl.js +18 -20
  143. package/config.js +1 -1
  144. package/kernel.js +1 -1
  145. package/layers/VoxelWasmPerSceneView.js +1 -1
  146. package/layers/graphics/FlatFeature.js +1 -1
  147. package/layers/graphics/FlatFeatureSet.js +1 -1
  148. package/layers/graphics/OptimizedFeature.js +1 -1
  149. package/layers/graphics/data/AttributesBuilder.js +1 -1
  150. package/layers/graphics/data/QueryEngineResult.js +1 -1
  151. package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +1 -1
  152. package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
  153. package/layers/graphics/featureConversionUtils.js +1 -1
  154. package/layers/support/LabelClass.js +1 -1
  155. package/layers/support/featureLayerUtils.js +1 -1
  156. package/layers/support/labelUtils.js +1 -1
  157. package/layers/video/videoUtils.js +1 -1
  158. package/package.json +1 -1
  159. package/popupTemplateUtils.js +2 -0
  160. package/renderers/visualVariables/SizeVariable.js +1 -1
  161. package/renderers/visualVariables/support/sizeVariableUtils.js +1 -1
  162. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  163. package/rest/support/OutDistance.js +2 -0
  164. package/rest/support/Query.js +1 -1
  165. package/smartMapping/statistics/support/utils.js +1 -1
  166. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  167. package/support/arcadeUtils.js +1 -1
  168. package/support/revision.js +1 -1
  169. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  170. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  171. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  172. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  173. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  174. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  175. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  176. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  177. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  178. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  179. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  180. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  181. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  182. package/views/3d/layers/IntegratedMeshNormals.js +1 -1
  183. package/views/3d/layers/StreamLayerView3D.js +1 -1
  184. package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
  185. package/views/3d/state/ViewStateManager.js +1 -1
  186. package/views/3d/terrain/OverlayRenderer.js +1 -1
  187. package/views/3d/terrain/TerrainRenderer.js +1 -1
  188. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  189. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
  190. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  191. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  192. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  193. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +20 -32
  194. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +5 -3
  195. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  196. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  197. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  198. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  199. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  200. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  201. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  202. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  203. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  204. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  205. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  206. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  207. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
  208. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  209. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  210. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  211. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  212. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  213. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  214. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  215. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  216. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  217. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  218. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  219. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  220. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  221. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  222. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  223. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  224. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  225. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  226. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  227. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  228. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  229. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  230. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  231. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  232. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  233. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  234. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  235. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  236. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  237. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  238. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  239. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  240. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  241. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  242. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  243. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  244. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  245. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  246. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  247. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  248. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  249. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  250. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
  251. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
  252. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  253. package/views/VideoView.js +1 -1
  254. package/views/layers/FeatureLikeLayerView.js +1 -1
  255. package/views/video/VideoOperationalDataView.js +1 -1
  256. package/views/webgl/ShaderBuilder.js +1 -1
  257. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +19 -3
  258. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  259. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  260. package/widgets/FeatureTable/VisibleElements.d.ts +15 -1
  261. package/widgets/FeatureTable/VisibleElements.js +1 -1
  262. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  263. package/widgets/FeatureTable.d.ts +15 -1
  264. package/widgets/FeatureTable.js +1 -1
  265. package/widgets/Search/SearchViewModel.js +1 -1
  266. package/assets/esri/core/workers/chunks/09ecb36e44096e577af8.js +0 -1
  267. package/assets/esri/core/workers/chunks/0ca06ea649bbdb93ff49.js +0 -1
  268. package/assets/esri/core/workers/chunks/10308c9f3f0d709d96bc.js +0 -1
  269. package/assets/esri/core/workers/chunks/141edf5ed890105a079b.js +0 -1
  270. package/assets/esri/core/workers/chunks/160b9a76b75875507c86.js +0 -1
  271. package/assets/esri/core/workers/chunks/16dfdee05704df249e95.js +0 -1
  272. package/assets/esri/core/workers/chunks/17ef955dc48e329aa184.js +0 -1
  273. package/assets/esri/core/workers/chunks/18001536ed345955121a.js +0 -1
  274. package/assets/esri/core/workers/chunks/20e715e3aeb1c3265901.js +0 -1
  275. package/assets/esri/core/workers/chunks/238f51d0b36f998017b8.js +0 -1
  276. package/assets/esri/core/workers/chunks/2cee6d751c5e73fe09d4.js +0 -1
  277. package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +0 -1
  278. package/assets/esri/core/workers/chunks/3158a3487d3e8a61b680.js +0 -1
  279. package/assets/esri/core/workers/chunks/3b1446286a9b87f34761.js +0 -1
  280. package/assets/esri/core/workers/chunks/3f7fd58ee7d71989fc83.js +0 -1
  281. package/assets/esri/core/workers/chunks/41396724040180d2537f.js +0 -1
  282. package/assets/esri/core/workers/chunks/416e031bafc0189544fa.js +0 -1
  283. package/assets/esri/core/workers/chunks/55ee78923987ed17ea8c.js +0 -1
  284. package/assets/esri/core/workers/chunks/56c7d7c7217557375fb6.js +0 -1
  285. package/assets/esri/core/workers/chunks/5a1d975b3e9e6b7eff67.js +0 -1
  286. package/assets/esri/core/workers/chunks/5f6942ac94acd7842926.js +0 -1
  287. package/assets/esri/core/workers/chunks/6118706b9a038e9a06b8.js +0 -1
  288. package/assets/esri/core/workers/chunks/6d15229b3fa84a7acf4d.js +0 -599
  289. package/assets/esri/core/workers/chunks/7314c0131403cac84ad7.js +0 -1
  290. package/assets/esri/core/workers/chunks/73545bb13c70f6a347a4.js +0 -1
  291. package/assets/esri/core/workers/chunks/73a045061e69a22b6869.js +0 -1
  292. package/assets/esri/core/workers/chunks/75669912cddcb5db52c8.js +0 -1
  293. package/assets/esri/core/workers/chunks/7ca32806e47be15109a4.js +0 -1
  294. package/assets/esri/core/workers/chunks/7d6ed65bbcd279448191.js +0 -1
  295. package/assets/esri/core/workers/chunks/81f149e45c79b9b086fb.js +0 -1
  296. package/assets/esri/core/workers/chunks/84fa25f66a6949290221.js +0 -1
  297. package/assets/esri/core/workers/chunks/852aabbf671d2ca9cd33.js +0 -1
  298. package/assets/esri/core/workers/chunks/854fe80272b59fafc2e9.js +0 -1
  299. package/assets/esri/core/workers/chunks/861817be5e050e9522ab.js +0 -1
  300. package/assets/esri/core/workers/chunks/89345a682dea60ef1643.js +0 -1
  301. package/assets/esri/core/workers/chunks/8985402c328b90af5724.js +0 -1
  302. package/assets/esri/core/workers/chunks/89fdf9ad10ca8fbb08a5.js +0 -1
  303. package/assets/esri/core/workers/chunks/8b094330323d9b16fb5d.js +0 -1
  304. package/assets/esri/core/workers/chunks/90aed8c4b266832f84ca.js +0 -1
  305. package/assets/esri/core/workers/chunks/9776c2db337222ceceef.js +0 -1
  306. package/assets/esri/core/workers/chunks/990853e9df38fdfc58b5.js +0 -1
  307. package/assets/esri/core/workers/chunks/9a21ba0c45a96b94c05e.js +0 -1
  308. package/assets/esri/core/workers/chunks/9a235c92f21df2c17aa8.js +0 -1
  309. package/assets/esri/core/workers/chunks/9b56162ac67c992193ce.js +0 -1
  310. package/assets/esri/core/workers/chunks/9f1f5fb648302c43ad12.js +0 -1
  311. package/assets/esri/core/workers/chunks/a1e6187c239fdc7553ed.js +0 -1
  312. package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +0 -1
  313. package/assets/esri/core/workers/chunks/a760be8fa6c6ea6b745c.js +0 -1
  314. package/assets/esri/core/workers/chunks/a8782286ce3c0d6c20e6.js +0 -1
  315. package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +0 -1
  316. package/assets/esri/core/workers/chunks/a994a3c912a33b2f4100.js +0 -1
  317. package/assets/esri/core/workers/chunks/aa7aaeae31ddb259e55e.js +0 -1
  318. package/assets/esri/core/workers/chunks/abcc5fb71be2bd94878c.js +0 -1
  319. package/assets/esri/core/workers/chunks/aecb05df4ad1454f5435.js +0 -1
  320. package/assets/esri/core/workers/chunks/aecb105db7cec2c9c4c5.js +0 -1
  321. package/assets/esri/core/workers/chunks/b19f33e026a2a43b17c4.js +0 -1
  322. package/assets/esri/core/workers/chunks/b3950d5f1f3352521504.js +0 -1
  323. package/assets/esri/core/workers/chunks/b3f0600729227b458a75.js +0 -1
  324. package/assets/esri/core/workers/chunks/b5922991d2f450e6a9d9.js +0 -1
  325. package/assets/esri/core/workers/chunks/b8643976a7f984552d94.js +0 -1
  326. package/assets/esri/core/workers/chunks/b8a11d32a4847513619b.js +0 -1
  327. package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +0 -1
  328. package/assets/esri/core/workers/chunks/ba4259aa050169c1d523.js +0 -1
  329. package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +0 -1
  330. package/assets/esri/core/workers/chunks/bcefdf9753d9d2f6f1be.js +0 -1
  331. package/assets/esri/core/workers/chunks/c178e2cfc34603661b1d.js +0 -1
  332. package/assets/esri/core/workers/chunks/c3e80c0e29ac6a7a6f80.js +0 -1
  333. package/assets/esri/core/workers/chunks/c79827f879d1d58d3f1b.js +0 -1
  334. package/assets/esri/core/workers/chunks/c92b40a532e708e506cc.js +0 -1
  335. package/assets/esri/core/workers/chunks/cb903ccbce87172a0757.js +0 -1
  336. package/assets/esri/core/workers/chunks/cda2e445eb2ac269abdf.js +0 -1
  337. package/assets/esri/core/workers/chunks/ce44e172e2847fd8df14.js +0 -1
  338. package/assets/esri/core/workers/chunks/cff7e921649aef715c78.js +0 -1
  339. package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +0 -1
  340. package/assets/esri/core/workers/chunks/d8c0d18f0132872decd3.js +0 -1
  341. package/assets/esri/core/workers/chunks/db0061a6d5bf454cc509.js +0 -1
  342. package/assets/esri/core/workers/chunks/dcfafcf4386f2940d000.js +0 -1
  343. package/assets/esri/core/workers/chunks/e2b034c391c603f7f825.js +0 -1
  344. package/assets/esri/core/workers/chunks/e3a73d9acebccd3ba49b.js +0 -1
  345. package/assets/esri/core/workers/chunks/e67bdd8bf38ebe89a344.js +0 -1
  346. package/assets/esri/core/workers/chunks/e797d45eba0884dc7e6f.js +0 -1
  347. package/assets/esri/core/workers/chunks/e81a3da05fcff97b4752.js +0 -1
  348. package/assets/esri/core/workers/chunks/e9dd60d0220036545ebb.js +0 -1
  349. package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +0 -1
  350. package/assets/esri/core/workers/chunks/eb9982bc866976fef960.js +0 -1
  351. package/assets/esri/core/workers/chunks/ec4669a0edeca94710e0.js +0 -1
  352. package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +0 -1
  353. package/assets/esri/core/workers/chunks/f09446b9ff937a84d6d3.js +0 -1
  354. package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +0 -1
  355. package/assets/esri/core/workers/chunks/f653970d983f17fb764b.js +0 -1
  356. package/assets/esri/core/workers/chunks/f9edc685099f51363f41.js +0 -1
  357. package/assets/esri/core/workers/chunks/fa687ba2d66fcc2501da.js +0 -1
  358. package/assets/esri/core/workers/chunks/fb9a889ec9fd23739a14.js +0 -1
  359. package/assets/esri/core/workers/chunks/fe1b67ab7748a3aef231.js +0 -1
  360. package/chunks/HUDCompositing.glsl.js +0 -2
  361. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +0 -5
  362. package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +0 -8
  363. package/views/3d/webgl-engine/effects/fboFormatUtils.js +0 -2
  364. package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +0 -2
  365. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{id as e}from"../../kernel.js";import{resultOrAbort as t}from"../../core/asyncUtils.js";import r from"../../core/Error.js";import{JSONMap as n}from"../../core/jsonMap.js";import o from"../../core/Logger.js";import{parseWhereClause as i}from"../../core/sql.js";import{normalizeGlobalID as s}from"../../core/uuid.js";import{createTypeReader as a}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as u}from"./arcgisLayerUrl.js";import c from"./CodedValue.js";import l from"./CodedValueDomain.js";import{queryAllJSON as p}from"./featureQueryAll.js";import{isStringField as d,isIntegerField as f}from"./fieldUtils.js";import{isLayerWithFeatureCapabilities as y,getOwningPortalUrl as m}from"./layerUtils.js";import h from"../../renderers/SimpleRenderer.js";import w from"../../renderers/UniqueValueRenderer.js";import b from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as g}from"../../rest/support/NormalizationBinParametersMixin.js";import I from"../../rest/support/Query.js";import j from"../../rest/support/RelationshipQuery.js";import{symbolTypesRenderer as F}from"../../symbols/support/typeUtils.js";const x=()=>o.getLogger("esri.layers.support.featureLayerUtils"),P=new n({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function S(e,t,n,o){const i=await W(e);if(await q(e,t,o),!i.addAttachment)throw new r(o,"Layer source does not support addAttachment capability");return i.addAttachment(t,n)}function q(e,t,n){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&o[i]?Promise.resolve():Promise.reject(new r(n,`feature is missing the identifying attribute ${i}`)):Promise.reject(new r(n,"'attributes' are required on a feature to query attachments")):Promise.reject(new r(n,"A feature is required to add/delete/update attachments")):Promise.reject(new r(n,"this layer doesn't support attachments"))}async function v(e,t,n,o,i){const s=await W(e);if(await q(e,t,i),!s.updateAttachment)throw new r(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,n,o)}async function L(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:a,globalIdField:c}=o;return"feature"===a&&u(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=c&&(i={...i,globalIdToObjectId:await ae(o,t.deleteFeatures,c)}),n(o,o.source,t,i)}async function O(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function A(e,t,n,o){const i=await W(e);if(await q(e,t,o),!i.deleteAttachments)throw new r(o,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,n)}async function E(e,t,n){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new r(n,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function D(e,t,n,o){let i=b.from(t);await e.load();const s=e.source,a=e.capabilities;if(!a?.data?.supportsAttachment)throw new r(o,"this layer doesn't support attachments");const{attachmentTypes:u,objectIds:c,globalIds:l,num:p,size:d,start:f,where:y}=i;if(!a?.operations?.supportsQueryAttachments){if(u?.length>0||l?.length>0||d?.length>0||p||f||y)throw new r(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(c?.length||l?.length||y))throw new r(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!s.queryAttachments)throw new r(o,"Layer source does not support queryAttachments capability",i);return!a?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),s.queryAttachments(i)}async function T(e,t,n,o){const i=await W(e);if(!i.queryObjectIds)throw new r(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(I.from(t)??e.createQuery(),n)}async function C(e,t,n,o){const i=await W(e);if(!i.queryFeatureCount)throw new r(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(I.from(t)??e.createQuery(),n)}async function B(e,t,n,o){const i=await W(e);if(!i.queryExtent)throw new r(o,"Layer source does not support queryExtent capability");return i.queryExtent(I.from(t)??e.createQuery(),n)}async function R(e,t,n,o){const i=await W(e);if(!i.queryRelatedFeatures)throw new r(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(j.from(t),n)}async function M(e,t,n,o){const i=await W(e);if(!i.queryRelatedFeaturesCount)throw new r(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(j.from(t),n)}async function k(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await i(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function z(e){const t=new I;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function U(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function N(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function Q(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function V(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=$(e,t);if(r)return r}const s=i&&G(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=ue(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=J(e,t);if(r)return r}return null}function G(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function $(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new c({code:H(e.code,i),name:e.name}));if(t?.length)return new l({codedValues:t})}return null}function J(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length&&Z(e.types)){const t=e.types?.map(e=>new c({code:H(e.id,o),name:e.name}));return new l({codedValues:t})}return null}function Z(e){const t=new Set,r=new Set;for(const n of e){if(t.has(n.id)||r.has(n.name))return!1;t.add(n.id),r.add(n.name)}return!0}function H(e,t){return t?d({type:t})&&"number"==typeof e?`${e}`:f({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function W(e){return(await e.load()).source}async function _(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await m(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function K(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await m(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function X(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await K(n,r)}async function Y(e){const t=e.parsedUrl?.path;t&&ee(e)&&await K(t)}function ee(e){return te(e)&&("serviceDefinitionExpression"in e&&re(e.serviceDefinitionExpression)||"definitionExpression"in e&&re(e.definitionExpression))}function te(e){return!(!y(e)||!e.capabilities?.query.supportsCurrentUser)}function re(e){return!!e?.toLowerCase().includes("current_user")}function ne(e){return!ce(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const oe=a({types:F});function ie(e,t){if(e.defaultSymbol)return e.types?.length?new w({defaultSymbol:oe(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:oe(e.symbol,e,t)}))}):new h({symbol:oe(e.defaultSymbol,e,t)})}function se(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function ae(e,r,n){if(null==r)return null;const o=[],{objectIdField:i}=e;if(r.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[i]&&-1!==r[i]?r[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const a=e.createQuery();a.where=o.map(e=>`${n}='${e}'`).join(" OR "),a.returnGeometry=!1,a.outFields=[i,n],a.cacheHint=!1;const u=await t(p(e,a));if(!u.ok)return null;const c=new Map,l=u.value.features;for(const t of l){const e=t.attributes[n],r=t.attributes[i];null!=e&&null!=r&&-1!==r&&c.set(s(e),r)}return c}function ue(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);if(null==n)return null;const o=e.filter(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()});return o.length>1&&x().warn("getFeatureType",`Cannot unambiguously determine feature type because multiple types have the id ${n}.`),o[0]??null}function ce(e){return e.sourceJSON?.isMultiServicesView||le(e)}function le(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function pe(e,t,n){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new r(n,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new r(n,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!de(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new r(n,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new r(n,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new r(n,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new r(n,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new r(n,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new r(n,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!de(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new r(n,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new r(n,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new r(n,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new r(n,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new r(n,`Layer source does not support ${o} statistic type`)}}}function de(e,t){return null!=e&&!!t?.[g.toJSON(e)]}export{S as addAttachment,L as applyEdits,Y as checkServiceCurrentUserSupport,$ as computeDomainFromSubtypes,J as computeDomainFromTypes,ne as computeEffectiveEditingEnabled,ie as createDefaultRenderer,z as createQuery,A as deleteAttachments,K as ensureCredentialIfSignedIn,X as ensureLayerCredential,E as fetchRecomputedExtents,P as geometryTypeKebabDict,G as getFeatureSubtype,ue as getFeatureType,V as getFieldDomain,ae as getGlobalIdToObjectIdMap,_ as getSignedInUser,re as hasCurrentUser,k as hasDataChanged,se as isLayerCacheStale,D as queryAttachments,B as queryExtent,C as queryFeatureCount,T as queryObjectIds,R as queryRelatedFeatures,M as queryRelatedFeaturesCount,U as readGlobalIdField,N as readObjectIdField,Q as readVersion,ce as supportsQueryOnly,Z as typesHaveUniqueIdsAndNames,v as updateAttachment,O as uploadAssets,pe as validateBinsQuery};
2
+ import{id as e}from"../../kernel.js";import{isPopupTemplate as t}from"../../popupTemplateUtils.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{parseWhereClause as s}from"../../core/sql.js";import{normalizeGlobalID as a}from"../../core/uuid.js";import{createTypeReader as u}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as l}from"./arcgisLayerUrl.js";import c from"./CodedValue.js";import p from"./CodedValueDomain.js";import{queryAllJSON as d}from"./featureQueryAll.js";import{isStringField as f,isIntegerField as y}from"./fieldUtils.js";import{isLabelClass as m}from"./labelUtils.js";import{isLayerWithFeatureCapabilities as b,getOwningPortalUrl as h}from"./layerUtils.js";import w from"../../renderers/SimpleRenderer.js";import g from"../../renderers/UniqueValueRenderer.js";import{isSizeVariable as I}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import j from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as x}from"../../rest/support/NormalizationBinParametersMixin.js";import F from"../../rest/support/Query.js";import v from"../../rest/support/RelationshipQuery.js";import{loadArcade as S}from"../../support/loadArcade.js";import{symbolTypesRenderer as P}from"../../symbols/support/typeUtils.js";const L=()=>i.getLogger("esri.layers.support.featureLayerUtils"),q=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function A(e,t,r,o){const i=await Y(e);if(await E(e,t,o),!i.addAttachment)throw new n(o,"Layer source does not support addAttachment capability");return i.addAttachment(t,r)}function E(e,t,r){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&o[i]?Promise.resolve():Promise.reject(new n(r,`feature is missing the identifying attribute ${i}`)):Promise.reject(new n(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n(r,"this layer doesn't support attachments"))}async function M(e,t,r,o,i){const s=await Y(e);if(await E(e,t,i),!s.updateAttachment)throw new n(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,r,o)}async function O(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:a,globalIdField:u}=o;return"feature"===a&&l(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=u&&(i={...i,globalIdToObjectId:await pe(o,t.deleteFeatures,u)}),n(o,o.source,t,i)}async function C(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function D(e,t,r,o){const i=await Y(e);if(await E(e,t,o),!i.deleteAttachments)throw new n(o,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,r)}async function T(e,t,r){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new n(r,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function z(e,t,r,o){let i=j.from(t);await e.load();const s=e.source,a=e.capabilities;if(!a?.data?.supportsAttachment)throw new n(o,"this layer doesn't support attachments");const{attachmentTypes:u,objectIds:l,globalIds:c,num:p,size:d,start:f,where:y}=i;if(!a?.operations?.supportsQueryAttachments){if(u?.length>0||c?.length>0||d?.length>0||p||f||y)throw new n(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(l?.length||c?.length||y))throw new n(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!s.queryAttachments)throw new n(o,"Layer source does not support queryAttachments capability",i);return!a?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),s.queryAttachments(i)}async function U(e,t,r,o){const i=await Y(e);if(!i.queryObjectIds)throw new n(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(F.from(t)??e.createQuery(),r)}async function k(e,t,r,o){const i=await Y(e);if(!i.queryFeatureCount)throw new n(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(F.from(t)??e.createQuery(),r)}async function B(e,t,r,o){const i=await Y(e);if(!i.queryExtent)throw new n(o,"Layer source does not support queryExtent capability");return i.queryExtent(F.from(t)??e.createQuery(),r)}async function V(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeatures)throw new n(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(v.from(t),r)}async function R(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeaturesCount)throw new n(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(v.from(t),r)}async function N(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await s(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function G(e){const t=new F;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function Q(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function Z(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function $(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function J(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=W(e,t);if(r)return r}const s=i&&H(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=de(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=_(e,t);if(r)return r}return null}function H(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function W(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new c({code:X(e.code,i),name:e.name}));if(t?.length)return new p({codedValues:t})}return null}function _(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length&&K(e.types)){const t=e.types?.map(e=>new c({code:X(e.id,o),name:e.name}));return new p({codedValues:t})}return null}function K(e){const t=new Set,r=new Set;for(const n of e){if(t.has(n.id)||r.has(n.name))return!1;t.add(n.id),r.add(n.name)}return!0}function X(e,t){return t?f({type:t})&&"number"==typeof e?`${e}`:y({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function Y(e){return(await e.load()).source}async function ee(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await h(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function te(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await h(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function re(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await te(n,r)}async function ne(e){const t=e.parsedUrl?.path;t&&oe(e)&&await te(t)}function oe(e){return ie(e)&&("serviceDefinitionExpression"in e&&se(e.serviceDefinitionExpression)||"definitionExpression"in e&&se(e.definitionExpression))}function ie(e){return!(!b(e)||!e.capabilities?.query.supportsCurrentUser)}function se(e){return!!e?.toLowerCase().includes("current_user")}function ae(e){return!fe(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const ue=u({types:P});function le(e,t){if(e.defaultSymbol)return e.types?.length?new g({defaultSymbol:ue(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:ue(e.symbol,e,t)}))}):new w({symbol:ue(e.defaultSymbol,e,t)})}function ce(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function pe(e,t,n){if(null==t)return null;const o=[],{objectIdField:i}=e;if(t.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[i]&&-1!==r[i]?r[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const s=e.createQuery();s.where=o.map(e=>`${n}='${e}'`).join(" OR "),s.returnGeometry=!1,s.outFields=[i,n],s.cacheHint=!1;const u=await r(d(e,s));if(!u.ok)return null;const l=new Map,c=u.value.features;for(const r of c){const e=r.attributes[n],t=r.attributes[i];null!=e&&null!=t&&-1!==t&&l.set(a(e),t)}return l}function de(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);if(null==n)return null;const o=e.filter(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()});return o.length>1&&L().warn("getFeatureType",`Cannot unambiguously determine feature type because multiple types have the id ${n}.`),o[0]??null}function fe(e){return e.sourceJSON?.isMultiServicesView||ye(e)}function ye(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function me(e,t,r){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new n(r,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new n(r,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new n(r,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new n(r,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new n(r,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new n(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new n(r,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new n(r,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new n(r,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new n(r,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new n(r,`Layer source does not support ${o} statistic type`)}}}function be(e,t){return null!=e&&!!t?.[x.toJSON(e)]}function he(e){return m(e)?Boolean(e.labelExpressionInfo?.expression):t(e)?!!e.expressionInfos?.some(e=>e.expression)||!!Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type&&e.expressionInfo?.expression):!("dot-density"!==e.type||!e.attributes?.some(e=>e.valueExpression))||(!(!("valueExpression"in e)||!e.valueExpression)||"visualVariables"in e&&null!=e.visualVariables&&e.visualVariables.some(e=>!!e.valueExpression||"size"===e.type&&(I(e.minSize)&&e.minSize.valueExpression||I(e.maxSize)&&e.maxSize.valueExpression)))}function we(e){if("renderer"in e&&e.renderer&&he(e.renderer))return!0;if("labelingInfo"in e&&e.labelingInfo)for(const t of e.labelingInfo)if(m(t)&&he(t))return!0;return!1}async function ge(e){let t="returnZ"in e&&e.returnZ,r="returnM"in e&&e.returnM;if(null!=t&&null!=r)return{returnZ:t,returnM:r};if(we(e)){const{arcadeUtils:n}=await S();n.layerHasGeometryFunctions(e)&&(t??=!0,r??=!0)}if("renderer"in e&&e.renderer?.symbols)for(const n of e.renderer.symbols)"cim"===n.type&&(Ie??=(await import("../../symbols/cim/CIMSymbolHelper.js")).forEachSymbolLayer,Ie(n.data.symbol,e=>{switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":if("CIMMarkerPlacementAtMeasuredUnits"===e.markerPlacement?.type)r??=!0}}));return{returnZ:t,returnM:r}}let Ie;export{A as addAttachment,O as applyEdits,ne as checkServiceCurrentUserSupport,W as computeDomainFromSubtypes,_ as computeDomainFromTypes,ae as computeEffectiveEditingEnabled,le as createDefaultRenderer,G as createQuery,D as deleteAttachments,te as ensureCredentialIfSignedIn,re as ensureLayerCredential,T as fetchRecomputedExtents,q as geometryTypeKebabDict,H as getFeatureSubtype,de as getFeatureType,J as getFieldDomain,pe as getGlobalIdToObjectIdMap,ee as getSignedInUser,se as hasCurrentUser,N as hasDataChanged,ce as isLayerCacheStale,ge as layerRequiresGeometryZM,z as queryAttachments,B as queryExtent,k as queryFeatureCount,U as queryObjectIds,V as queryRelatedFeatures,R as queryRelatedFeaturesCount,Q as readGlobalIdField,Z as readObjectIdField,$ as readVersion,fe as supportsQueryOnly,K as typesHaveUniqueIdsAndNames,M as updateAttachment,C as uploadAssets,me as validateBinsQuery};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{replace as e}from"../../core/string.js";const n="__begin__",r="__end__",s=new RegExp(n,"ig"),t=new RegExp(r,"ig"),l=new RegExp("^"+n,"i"),o=new RegExp(r+"$","i"),i='"',a=i+" + ",c=" + "+i;function p(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function u(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function x(e){const n={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(n.expression=e.labelExpressionInfo.value,n.type="conventional"):e.labelExpressionInfo.expression&&(n.expression=e.labelExpressionInfo.expression,n.type="arcade"):null!=e.labelExpression&&(n.expression=p(e.labelExpression),n.type="conventional"),n}function f(e){const n=x(e);if(!n)return null;switch(n.type){case"conventional":return E(n.expression);case"arcade":return n.expression}return null}function g(e){const n=x(e);if(!n)return null;switch(n.type){case"conventional":return $(n.expression);case"arcade":return _(n.expression)}return null}function E(p){let u;return p?(u=e(p,e=>n+'$feature["'+e+'"]'+r),u=l.test(u)?u.replace(l,""):i+u,u=o.test(u)?u.replace(o,""):u+i,u=u.replaceAll(s,a).replaceAll(t,c)):u='""',u}const w=/^\s*\{([^}]+)\}\s*$/i;function $(e){const n=e?.match(w);return n?.[1].trim()||null}const b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,m=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,R=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function _(e){if(!e)return null;let n=b.exec(e)||m.exec(e);return n?n[1]||n[3]:(n=R.exec(e),n?n[2]:null)}export{E as convertTemplatedStringToArcade,x as getLabelExpression,f as getLabelExpressionArcade,g as getLabelExpressionSingleField,_ as getSingleFieldArcadeExpression,$ as getSingleFieldTemplatedString,p as sqlToTemplateString,u as templateStringToSql};
2
+ import{replace as e}from"../../core/string.js";const n="__begin__",r="__end__",s=new RegExp(n,"ig"),t=new RegExp(r,"ig"),l=new RegExp("^"+n,"i"),o=new RegExp(r+"$","i"),i='"',a=i+" + ",c=" + "+i;function u(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function p(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function x(e){const n={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(n.expression=e.labelExpressionInfo.value,n.type="conventional"):e.labelExpressionInfo.expression&&(n.expression=e.labelExpressionInfo.expression,n.type="arcade"):null!=e.labelExpression&&(n.expression=u(e.labelExpression),n.type="conventional"),n}function f(e){const n=x(e);if(!n)return null;switch(n.type){case"conventional":return E(n.expression);case"arcade":return n.expression}return null}function g(e){const n=x(e);if(!n)return null;switch(n.type){case"conventional":return $(n.expression);case"arcade":return R(n.expression)}return null}function E(u){let p;return u?(p=e(u,e=>n+'$feature["'+e+'"]'+r),p=l.test(p)?p.replace(l,""):i+p,p=o.test(p)?p.replace(o,""):p+i,p=p.replaceAll(s,a).replaceAll(t,c)):p='""',p}const w=/^\s*\{([^}]+)\}\s*$/i;function $(e){const n=e?.match(w);return n?.[1].trim()||null}const b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,m=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,y=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function R(e){if(!e)return null;let n=b.exec(e)||m.exec(e);return n?n[1]||n[3]:(n=y.exec(e),n?n[2]:null)}const _=Symbol("LabelClassInstance");function v(e){return null!=e&&"object"==typeof e&&_ in e}export{_ as LabelClassSymbol,E as convertTemplatedStringToArcade,x as getLabelExpression,f as getLabelExpressionArcade,g as getLabelExpressionSingleField,R as getSingleFieldArcadeExpression,$ as getSingleFieldTemplatedString,v as isLabelClass,u as sqlToTemplateString,p as templateStringToSql};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../geometry/Point.js";import t from"../../geometry/Polygon.js";import r from"../../geometry/Polyline.js";import n from"../support/TelemetryData.js";import o from"../support/VideoTimeExtent.js";import{applyCIMSymbolColor as i}from"../../symbols/support/cimSymbolUtils.js";import{applyColorToSymbol as a}from"../../symbols/support/utils.js";const u="application/x-mpegURL",s="video/mp4",l="video/webm",d={UASDatalinkLocalSet:1e4,PrecisionTimeStamp:10002,MissionId:10003,PlatformTailNumber:10004,PlatformHeadingAngle:10005,PlatformPitchAngle:10006,PlatformRollAngle:10007,PlatformTrueAirspeed:10008,PlatformIndicatedAirspeed:10009,PlatformDesignation:10010,ImageSourceSensor:10011,ImageCoordinateSystem:10012,SensorLatitude:10013,SensorLongitude:10014,SensorTrueAltitude:10015,SensorHorizontalFOV:10016,SensorVerticalFOV:10017,SensorAzimuthAngle:10018,SensorElevationAngle:10019,SensorRollAngle:10020,PlatformSlantRange:10021,TargetWidth:10022,FrameCenterLatitude:10023,FrameCenterLongitude:10024,FrameCenterElevation:10025,OffsetCorner1Latitude:10026,OffsetCorner1Longitude:10027,OffsetCorner2Latitude:10028,OffsetCorner2Longitude:10029,OffsetCorner3Latitude:10030,OffsetCorner3Longitude:10031,OffsetCorner4Latitude:10032,OffsetCorner4Longitude:10033,TargetLocationLatitude:10040,TargetLocationLongitude:10041,TargetLocationElevation:10042,TargetTrackGateWidth:10043,TargetTrackGateHeight:10044,TargetErrorEstimateHorizontal:10045,TargetErrorEstimateLateral:10046,GenericFlagData:10047,PlatformGroundSpeed:10056,PlatformGroundRange:10057,PlatformRemainingFuel:10058,PlatformCallSign:10059,SensorFOVName:10063,PlatformMagneticHeading:10064,LDSVersionNumber:10065,AlternatePlatformName:10070,EventStartTimeUTC:10072,VMTIDataSet:10074,SensorEllipsoidHeight:10075,OperationalMode:10077,FrameCenterAboveEllipsoid:10078,CornerLatitudePoint1:10082,CornerLongitudePoint1:10083,CornerLatitudePoint2:10084,CornerLongitudePoint2:10085,CornerLatitudePoint3:10086,CornerLongitudePoint3:10087,CornerLatitudePoint4:10088,CornerLongitudePoint4:10089,SARMotionImageryMetadata:10095,SecurityClassification:20001,SecurityClassifyingAuthority:20002,SecurityClassifyingCountry:20003,SecuritySCI:20004,SecurityCaveats:20005,SecurityReleaseInstructions:20006,SecurityLDSVersion:20022,EsriVideoWidth:90001,EsriVideoHeight:90002,EsriFrameCenterLatitude:90050,EsriFrameCenterLongitude:90051,EsriCornerLatitudePt1:90052,EsriCornerLongitudePt1:90053,EsriCornerLatitudePt2:90054,EsriCornerLongitudePt2:90055,EsriCornerLatitudePt3:90056,EsriCornerLongitudePt3:90057,EsriCornerLatitudePt4:90058,EsriCornerLongitudePt4:90059,EsriFrameOutline:90060,EsriSensorPosition:90061,EsriHorizonPixelPack:90063,EsriGroundControlPoints:90064};function f(e,t=1e4){if(!e||!e.length)return[];let r=[],n=[];for(let i=0;i<e.length;i++){const t=e[i],n=t?.text?JSON.parse(t.text):null;"EsriVideoServer"===n?.source&&(r=[...n.data])}const o=r.find(e=>e.tagId===t);return Array.isArray(o?.value)&&(n=[...o.value]),n}function g(e){const{duration:t,end:r,start:n,timezone:i="UTC"}=e||{};return"number"!=typeof t?null:new o({duration:t||null,end:"number"==typeof r?new Date(r):null,start:"number"==typeof n?new Date(n):null,timezone:i})}function m(e,t){const r=[...t],n=r.findIndex(t=>t.equals(e));return n>-1&&r.splice(n),r.push(e),r}function C(e){if(!e?.size)return new n;const t=b(e),r=P(e),o=O(e),i=A(t,r);return new n({frameCenter:r,frameOutline:o,lineOfSight:i,sensorLocation:t})}function L(e){if(!e?.size)return null;return e.get(d.EsriGroundControlPoints)?.value??null??null}function c(e){return e?.size?e.get(d.EsriHorizonPixelPack)?.value??null:null}function P(e){return S(e)??y(e)}function E(e){if(!e)return u;const t=e.match(/\.(\w{3,4})(?:$|\?)/i);if(!t)return u;switch(t[1].toLowerCase()){case"mp4":return s;case"webm":return l;default:return u}}function p(e){const t=e?.layers;return t?.length?t.map(e=>({layerId:e.id,posterUrl:e.poster,sourceType:e.serviceType,title:e.name,type:e.type||"Video Layer"})):[]}function v(e,t,r){if(!e)return null;const n=e.clone();switch(n.type){case"simple-fill":a(n,r),n.outline.color=t;break;case"simple-line":a(n,t);break;case"simple-marker":a(n,t),n?.outline?.color&&(n.outline.color=t);break;case"cim":i(n,t)}return n}function h(e){const{cameraAzimuth:t,platformHeading:r,source:n=null,symbolOffset:o=0}=e||{};let i=0;if(!n)return i;i="platformHeading"===n?r+o:r+t+o;const a=i>360?i-360:i;return Math.round(Math.abs(a))}function S(t){return t&&t.has(d.EsriFrameCenterLatitude)&&t.has(d.EsriFrameCenterLongitude)?new e({x:t.get(d.EsriFrameCenterLongitude).value,y:t.get(d.EsriFrameCenterLatitude).value,z:t.get(d.FrameCenterAboveEllipsoid)?.value??t.get(d.FrameCenterElevation)?.value}):null}function y(t){return t&&t.has(d.FrameCenterLatitude)&&t.has(d.FrameCenterLongitude)?new e({x:t.get(d.FrameCenterLongitude)?.value,y:t.get(d.FrameCenterLatitude)?.value,z:t.get(d.FrameCenterElevation)?.value}):null}function O(e){if(!e)return null;const r=e.get(d.EsriFrameOutline)?.value;return r?t.fromJSON(r.geometry):F(e)??T(e)}function F(e){if(!(e.has(d.EsriCornerLatitudePt1)&&e.has(d.EsriCornerLongitudePt1)&&e.has(d.EsriCornerLatitudePt2)&&e.has(d.EsriCornerLongitudePt2)&&e.has(d.EsriCornerLatitudePt3)&&e.has(d.EsriCornerLongitudePt3)&&e.has(d.EsriCornerLatitudePt4)&&e.has(d.EsriCornerLongitudePt4)))return null;const r=[e.get(d.EsriCornerLongitudePt1)?.value,e.get(d.EsriCornerLatitudePt1)?.value],n=[e.get(d.EsriCornerLongitudePt2)?.value,e.get(d.EsriCornerLatitudePt2)?.value],o=[e.get(d.EsriCornerLongitudePt3)?.value,e.get(d.EsriCornerLatitudePt3)?.value],i=[e.get(d.EsriCornerLongitudePt4)?.value,e.get(d.EsriCornerLatitudePt4)?.value];return new t({rings:[[r,n,o,i]]})}function T(e){if(!(e.has(d.OffsetCorner1Latitude)&&e.has(d.OffsetCorner1Longitude)&&e.has(d.OffsetCorner2Latitude)&&e.has(d.OffsetCorner2Longitude)&&e.has(d.OffsetCorner3Latitude)&&e.has(d.OffsetCorner3Longitude)&&e.has(d.OffsetCorner4Latitude)&&e.has(d.OffsetCorner4Longitude)&&e.has(d.FrameCenterLatitude)&&e.has(d.FrameCenterLongitude)))return null;const r=e.get(d.FrameCenterLatitude)?.value,n=e.get(d.FrameCenterLongitude)?.value,o=r+e.get(d.OffsetCorner1Latitude)?.value,i=n+e.get(d.OffsetCorner1Longitude)?.value,a=r+e.get(d.OffsetCorner2Latitude)?.value,u=n+e.get(d.OffsetCorner2Longitude)?.value,s=r+e.get(d.OffsetCorner3Latitude)?.value,l=n+e.get(d.OffsetCorner3Longitude)?.value,f=r+e.get(d.OffsetCorner4Latitude)?.value,g=n+e.get(d.OffsetCorner4Longitude)?.value;return new t({rings:[[[i,o],[u,a],[l,s],[g,f]]]})}function A(e,t){if(!e||!t)return null;const n=[e.x,e.y,e.z??0],o=[t.x,t.y,t.z??0];return new r({paths:[[n,o]]})}function b(t){if(!t?.size)return null;if(t.has(d.EsriSensorPosition)){const r=t.get(d.EsriSensorPosition)?.value;if(r)return e.fromJSON(r.geometry)}return t.has(d.SensorLongitude)&&t.has(d.SensorLatitude)?new e({x:t.get(d.SensorLongitude)?.value,y:t.get(d.SensorLatitude)?.value,z:t.get(d.SensorTrueAltitude)?.value}):null}export{P as getFrameCenter,c as getFrameHorizonPoints,L as getGroundControlPoints,m as getSensorTrailPoints,p as getServiceLayersInfo,v as getStyledTelemetrySymbol,h as getSymbolDisplayAngle,C as getTelemetryData,f as getVideoMetadataFromCueList,E as getVideoMimeType,g as readVideoTimeExtent,d as videoMetadataEntryId};
2
+ import e from"../../geometry/Point.js";import t from"../../geometry/Polygon.js";import r from"../../geometry/Polyline.js";import n from"../../geometry/SpatialReference.js";import{execute as o}from"../../geometry/operators/projectOperator.js";import i from"../support/TelemetryData.js";import a from"../support/VideoTimeExtent.js";import{applyCIMSymbolColor as u}from"../../symbols/support/cimSymbolUtils.js";import{applyColorToSymbol as s}from"../../symbols/support/utils.js";const l="application/x-mpegURL",f="video/mp4",d="video/webm",g={UASDatalinkLocalSet:1e4,PrecisionTimeStamp:10002,MissionId:10003,PlatformTailNumber:10004,PlatformHeadingAngle:10005,PlatformPitchAngle:10006,PlatformRollAngle:10007,PlatformTrueAirspeed:10008,PlatformIndicatedAirspeed:10009,PlatformDesignation:10010,ImageSourceSensor:10011,ImageCoordinateSystem:10012,SensorLatitude:10013,SensorLongitude:10014,SensorTrueAltitude:10015,SensorHorizontalFOV:10016,SensorVerticalFOV:10017,SensorAzimuthAngle:10018,SensorElevationAngle:10019,SensorRollAngle:10020,PlatformSlantRange:10021,TargetWidth:10022,FrameCenterLatitude:10023,FrameCenterLongitude:10024,FrameCenterElevation:10025,OffsetCorner1Latitude:10026,OffsetCorner1Longitude:10027,OffsetCorner2Latitude:10028,OffsetCorner2Longitude:10029,OffsetCorner3Latitude:10030,OffsetCorner3Longitude:10031,OffsetCorner4Latitude:10032,OffsetCorner4Longitude:10033,TargetLocationLatitude:10040,TargetLocationLongitude:10041,TargetLocationElevation:10042,TargetTrackGateWidth:10043,TargetTrackGateHeight:10044,TargetErrorEstimateHorizontal:10045,TargetErrorEstimateLateral:10046,GenericFlagData:10047,PlatformGroundSpeed:10056,PlatformGroundRange:10057,PlatformRemainingFuel:10058,PlatformCallSign:10059,SensorFOVName:10063,PlatformMagneticHeading:10064,LDSVersionNumber:10065,AlternatePlatformName:10070,EventStartTimeUTC:10072,VMTIDataSet:10074,SensorEllipsoidHeight:10075,OperationalMode:10077,FrameCenterAboveEllipsoid:10078,CornerLatitudePoint1:10082,CornerLongitudePoint1:10083,CornerLatitudePoint2:10084,CornerLongitudePoint2:10085,CornerLatitudePoint3:10086,CornerLongitudePoint3:10087,CornerLatitudePoint4:10088,CornerLongitudePoint4:10089,SARMotionImageryMetadata:10095,SecurityClassification:20001,SecurityClassifyingAuthority:20002,SecurityClassifyingCountry:20003,SecuritySCI:20004,SecurityCaveats:20005,SecurityReleaseInstructions:20006,SecurityLDSVersion:20022,EsriVideoWidth:90001,EsriVideoHeight:90002,EsriFrameCenterLatitude:90050,EsriFrameCenterLongitude:90051,EsriCornerLatitudePt1:90052,EsriCornerLongitudePt1:90053,EsriCornerLatitudePt2:90054,EsriCornerLongitudePt2:90055,EsriCornerLatitudePt3:90056,EsriCornerLongitudePt3:90057,EsriCornerLatitudePt4:90058,EsriCornerLongitudePt4:90059,EsriFrameOutline:90060,EsriSensorPosition:90061,EsriHorizonPixelPack:90063,EsriGroundControlPoints:90064};function m(e,t=1e4){if(!e||!e.length)return[];let r=[],n=[];for(let i=0;i<e.length;i++){const t=e[i],n=t?.text?JSON.parse(t.text):null;"EsriVideoServer"===n?.source&&(r=[...n.data])}const o=r.find(e=>e.tagId===t);return Array.isArray(o?.value)&&(n=[...o.value]),n}function C(e){const{duration:t,end:r,start:n,timezone:o="UTC"}=e||{};return"number"!=typeof t?null:new a({duration:t||null,end:"number"==typeof r?new Date(r):null,start:"number"==typeof n?new Date(n):null,timezone:o})}function c(e,t){const r=[...t],n=r.findIndex(t=>t.equals(e));return n>-1&&r.splice(n),r.push(e),r}function L(e){if(!e?.size)return new i;const t=z(e),r=p(e),n=w(e),o=b(t,r);return new i({frameCenter:r,frameOutline:n,lineOfSight:o,sensorLocation:t})}function y(e){if(!e?.size)return null;return e.get(g.EsriGroundControlPoints)?.value??null??null}function P(e){return e?.size?e.get(g.EsriHorizonPixelPack)?.value??null:null}function p(e){return O(e)??F(e)}function E(e){if(!e)return l;const t=e.match(/\.(\w{3,4})(?:$|\?)/i);if(!t)return l;switch(t[1].toLowerCase()){case"mp4":return f;case"webm":return d;default:return l}}function S(e){const t=e?.layers;return t?.length?t.map(e=>({layerId:e.id,posterUrl:e.poster,sourceType:e.serviceType,title:e.name,type:e.type||"Video Layer"})):[]}function h(e,t,r){if(!e)return null;const n=e.clone();switch(n.type){case"simple-fill":s(n,r),n.outline.color=t;break;case"simple-line":s(n,t);break;case"simple-marker":s(n,t),n?.outline?.color&&(n.outline.color=t);break;case"cim":u(n,t)}return n}function v(e){const{cameraAzimuth:t,platformHeading:r,source:n=null,symbolOffset:o=0}=e||{};let i=0;if(!n)return i;i="platformHeading"===n?r+o:r+t+o;const a=i>360?i-360:i;return Math.round(Math.abs(a))}function x(t,r,i){if(!r||r.length<3)return null;const a=[...r].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y),u=Array.from(new Set(a.map(e=>e.x))).sort((e,t)=>e-t),s=Array.from(new Set(a.map(e=>e.y)));let l=-1;for(let e=u.length-2;e>=0;e--)if(t.x>=u[e]&&t.x<=u[e+1]){l=e;break}let f=-1;for(let e=s.length-2;e>=0;e--)if(t.y>=s[e]&&t.y<=s[e+1]){f=e;break}if(l<0||f<0||l>=u.length-1||f>=s.length-1)return null;const d=u[l],g=u[l+1],m=s[f],C=s[f+1],c=(e,t)=>{const n=r.find(r=>r.x===e&&r.y===t);if(!n)throw new Error(`Control point not found for x: ${e}, y: ${t}`);return n},L=c(d,m),y=c(g,m),P=c(d,C),p=c(g,C),E=t.x,S=t.y;let h,v;if(G(L.x,L.y,y.x,y.y,p.x,p.y,E,S)){const t=new e(L.lon,L.lat,n.WGS84),r=new e(y.lon,y.lat,n.WGS84),a=new e(p.lon,p.lat,n.WGS84);v=[L,y,p],h=[o(t,i),o(r,i),o(a,i)]}else{if(!G(L.x,L.y,p.x,p.y,P.x,P.y,E,S))return null;{const t=new e(L.lon,L.lat,n.WGS84),r=new e(p.lon,p.lat,n.WGS84),a=new e(P.lon,P.lat,n.WGS84);v=[L,p,P],h=[o(t,i),o(r,i),o(a,i)]}}const[x,O,F]=v,[w,T,A]=h,b=(O.y-F.y)*(x.x-F.x)+(F.x-O.x)*(x.y-F.y),z=((O.y-F.y)*(E-F.x)+(F.x-O.x)*(S-F.y))/b,V=((F.y-x.y)*(E-F.x)+(x.x-F.x)*(S-F.y))/b,k=1-z-V;return[z*w.x+V*T.x+k*A.x,z*w.y+V*T.y+k*A.y]}function O(t){return t&&t.has(g.EsriFrameCenterLatitude)&&t.has(g.EsriFrameCenterLongitude)?new e({x:t.get(g.EsriFrameCenterLongitude).value,y:t.get(g.EsriFrameCenterLatitude).value,z:t.get(g.FrameCenterAboveEllipsoid)?.value??t.get(g.FrameCenterElevation)?.value}):null}function F(t){return t&&t.has(g.FrameCenterLatitude)&&t.has(g.FrameCenterLongitude)?new e({x:t.get(g.FrameCenterLongitude)?.value,y:t.get(g.FrameCenterLatitude)?.value,z:t.get(g.FrameCenterElevation)?.value}):null}function w(e){if(!e)return null;const r=e.get(g.EsriFrameOutline)?.value;return r?t.fromJSON(r.geometry):T(e)??A(e)}function T(e){if(!(e.has(g.EsriCornerLatitudePt1)&&e.has(g.EsriCornerLongitudePt1)&&e.has(g.EsriCornerLatitudePt2)&&e.has(g.EsriCornerLongitudePt2)&&e.has(g.EsriCornerLatitudePt3)&&e.has(g.EsriCornerLongitudePt3)&&e.has(g.EsriCornerLatitudePt4)&&e.has(g.EsriCornerLongitudePt4)))return null;const r=[e.get(g.EsriCornerLongitudePt1)?.value,e.get(g.EsriCornerLatitudePt1)?.value],n=[e.get(g.EsriCornerLongitudePt2)?.value,e.get(g.EsriCornerLatitudePt2)?.value],o=[e.get(g.EsriCornerLongitudePt3)?.value,e.get(g.EsriCornerLatitudePt3)?.value],i=[e.get(g.EsriCornerLongitudePt4)?.value,e.get(g.EsriCornerLatitudePt4)?.value];return new t({rings:[[r,n,o,i]]})}function A(e){if(!(e.has(g.OffsetCorner1Latitude)&&e.has(g.OffsetCorner1Longitude)&&e.has(g.OffsetCorner2Latitude)&&e.has(g.OffsetCorner2Longitude)&&e.has(g.OffsetCorner3Latitude)&&e.has(g.OffsetCorner3Longitude)&&e.has(g.OffsetCorner4Latitude)&&e.has(g.OffsetCorner4Longitude)&&e.has(g.FrameCenterLatitude)&&e.has(g.FrameCenterLongitude)))return null;const r=e.get(g.FrameCenterLatitude)?.value,n=e.get(g.FrameCenterLongitude)?.value,o=r+e.get(g.OffsetCorner1Latitude)?.value,i=n+e.get(g.OffsetCorner1Longitude)?.value,a=r+e.get(g.OffsetCorner2Latitude)?.value,u=n+e.get(g.OffsetCorner2Longitude)?.value,s=r+e.get(g.OffsetCorner3Latitude)?.value,l=n+e.get(g.OffsetCorner3Longitude)?.value,f=r+e.get(g.OffsetCorner4Latitude)?.value,d=n+e.get(g.OffsetCorner4Longitude)?.value;return new t({rings:[[[i,o],[u,a],[l,s],[d,f]]]})}function b(e,t){if(!e||!t)return null;const n=[e.x,e.y,e.z??0],o=[t.x,t.y,t.z??0];return new r({paths:[[n,o]]})}function z(t){if(!t?.size)return null;if(t.has(g.EsriSensorPosition)){const r=t.get(g.EsriSensorPosition)?.value;if(r)return e.fromJSON(r.geometry)}return t.has(g.SensorLongitude)&&t.has(g.SensorLatitude)?new e({x:t.get(g.SensorLongitude)?.value,y:t.get(g.SensorLatitude)?.value,z:t.get(g.SensorTrueAltitude)?.value}):null}function G(e,t,r,n,o,i,a,u){return(o-a)*(t-u)-(e-a)*(i-u)>=0&&(e-a)*(n-u)-(r-a)*(t-u)>=0&&(r-a)*(i-u)-(o-a)*(n-u)>=0}export{x as computeVideoToMapBaricentric,p as getFrameCenter,P as getFrameHorizonPoints,y as getGroundControlPoints,c as getSensorTrailPoints,S as getServiceLayersInfo,h as getStyledTelemetrySymbol,v as getSymbolDisplayAngle,L as getTelemetryData,m as getVideoMetadataFromCueList,E as getVideoMimeType,C as readVideoTimeExtent,g as videoMetadataEntryId};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.1.0-next.71",
3
+ "version": "5.1.0-next.72",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ const n=Symbol("PopupTemplateInstance");function t(t){return null!=t&&"object"==typeof t&&n in t}export{n as PopupTemplateSymbol,t as isPopupTemplate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{property as s,subclass as r}from"../../core/accessorSupport/decorators.js";import n from"./VisualVariable.js";import{castSizeFromStringOrNumber as a}from"./support/castSizeVariable.js";import o from"./support/SizeStop.js";import l from"./support/SizeVariableLegendOptions.js";import{isSizeVariable as p,getInputValueType as u,getTransformationType as m}from"./support/sizeVariableUtils.js";import{viewScaleRE as h}from"./support/visualVariableUtils.js";import{addPropertyUnsupportedError as d,addUnsupportedMessage as y}from"../../webdoc/support/unsupportedErrors.js";import{reader as c}from"../../core/accessorSupport/decorators/reader.js";import{writer as S}from"../../core/accessorSupport/decorators/writer.js";var z;const x=new t({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),w=new t({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"});function v(e){if(null!=e)return"string"==typeof e||"number"==typeof e?a(e):"size"===e.type?p(e)?e:(delete(e={...e}).type,new V(e)):void 0}function g(e,t,i){if("object"!=typeof e)return e;if("web-scene"===i.origin)return;const s=new V;return s.read(e,i),s}function f(e,t,i,s){"number"!=typeof e?"web-scene"!==s?.origin?t[i]=e.toJSON(s):y(s,"error","property",`Size variable '${i}' can only be a number in web scenes.`):t[i]=e}let V=z=class extends n{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:null!=this.valueExpression&&h.test(this.valueExpression)}}set index(e){p(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),p(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return u(this)}set maxDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}get maxSize(){return this._get("maxSize")}set maxSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",v(e))}readMaxSize(e,t,i){return g(e,t,i)}writeMaxSize(e,t,i,s){return f(e,t,i,s)}set minDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}get minSize(){return this._get("minSize")}set minSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",v(e))}readMinSize(e,t,i){return g(e,t,i)}writeMinSize(e,t,i,s){return f(e,t,i,s)}get arcadeRequired(){return!!this.valueExpression||(null!=this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||null!=this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired)}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value):e&&(i.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return m(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,i,s){if(h.test(e)){if(s?.messages){const e=this.index;d(s,`visualVariables[${"string"==typeof e?e:`visualVariables[${e}]`}].valueExpression`,"SizeVariable with '$view.scale' valueExpression is not supported in Web Scene. Please remove this property to save the Web Scene.")}}else t[i]=e}readValueUnit(e){return e?w.read(e):null}clone(){return new z({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:p(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:p(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops?.map(e=>e.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions?.clone()})}flipSizes(){if("clamped-linear"===this.transformationType){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if("stops"===this.transformationType){const e=this.stops;if(!e)return this;const t=e.map(e=>e.size).reverse(),i=e.length;for(let s=0;s<i;s++)e[s].size=t[s];return this}return this}_interpolateData(){return this.stops?.map(e=>e.value||0)}};e([s({readOnly:!0})],V.prototype,"cache",null),e([s({type:x.apiValues,json:{type:x.jsonValues,origins:{"web-map":{read:!1}},read:x.read,write:x.write}})],V.prototype,"axis",void 0),e([s()],V.prototype,"index",null),e([s({type:String,readOnly:!0})],V.prototype,"inputValueType",null),e([s({type:l,json:{write:!0}})],V.prototype,"legendOptions",void 0),e([s({type:Number,value:null,json:{write:!0}})],V.prototype,"maxDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],V.prototype,"maxSize",null),e([c("maxSize")],V.prototype,"readMaxSize",null),e([S("maxSize")],V.prototype,"writeMaxSize",null),e([s({type:Number,value:null,json:{write:!0}})],V.prototype,"minDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],V.prototype,"minSize",null),e([c("minSize")],V.prototype,"readMinSize",null),e([S("minSize")],V.prototype,"writeMinSize",null),e([s({type:String,json:{write:!0}})],V.prototype,"normalizationField",void 0),e([s({readOnly:!0})],V.prototype,"arcadeRequired",null),e([s({type:String})],V.prototype,"scaleBy",void 0),e([s({type:[o],value:null,json:{write:!0}})],V.prototype,"stops",null),e([s({type:["outline"],json:{write:!0}})],V.prototype,"target",void 0),e([s({type:String,readOnly:!0})],V.prototype,"transformationType",null),e([s({type:["size"],json:{type:["sizeInfo"]}})],V.prototype,"type",void 0),e([s({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],V.prototype,"useSymbolValue",void 0),e([s({type:String,json:{write:!0}})],V.prototype,"valueExpression",void 0),e([c("valueExpression",["valueExpression","expression"])],V.prototype,"readValueExpression",null),e([S("web-scene","valueExpression")],V.prototype,"writeValueExpressionWebScene",null),e([s({type:["radius","diameter","area","width","distance"],json:{write:!0}})],V.prototype,"valueRepresentation",void 0),e([s({type:w.apiValues,json:{write:w.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],V.prototype,"valueUnit",void 0),e([c("valueUnit")],V.prototype,"readValueUnit",null),V=z=e([r("esri.renderers.visualVariables.SizeVariable")],V);export{V as default};
2
+ import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{property as s,subclass as r}from"../../core/accessorSupport/decorators.js";import n from"./VisualVariable.js";import{castSizeFromStringOrNumber as a}from"./support/castSizeVariable.js";import o from"./support/SizeStop.js";import l from"./support/SizeVariableLegendOptions.js";import{isSizeVariable as p,getInputValueType as u,getTransformationType as m,SizeVariableSymbol as h}from"./support/sizeVariableUtils.js";import{viewScaleRE as d}from"./support/visualVariableUtils.js";import{addPropertyUnsupportedError as y,addUnsupportedMessage as c}from"../../webdoc/support/unsupportedErrors.js";import{reader as S}from"../../core/accessorSupport/decorators/reader.js";import{writer as z}from"../../core/accessorSupport/decorators/writer.js";var x,w;const v=new t({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),g=new t({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"});function f(e){if(null!=e)return"string"==typeof e||"number"==typeof e?a(e):"size"===e.type?p(e)?e:(delete(e={...e}).type,new j(e)):void 0}function V(e,t,i){if("object"!=typeof e)return e;if("web-scene"===i.origin)return;const s=new j;return s.read(e,i),s}function b(e,t,i,s){"number"!=typeof e?"web-scene"!==s?.origin?t[i]=e.toJSON(s):c(s,"error","property",`Size variable '${i}' can only be a number in web scenes.`):t[i]=e}let j=w=class extends n{static{x=h}constructor(e){super(e),this[x]=!0,this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:null!=this.valueExpression&&d.test(this.valueExpression)}}set index(e){p(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),p(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return u(this)}set maxDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}get maxSize(){return this._get("maxSize")}set maxSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",f(e))}readMaxSize(e,t,i){return V(e,t,i)}writeMaxSize(e,t,i,s){return b(e,t,i,s)}set minDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}get minSize(){return this._get("minSize")}set minSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",f(e))}readMinSize(e,t,i){return V(e,t,i)}writeMinSize(e,t,i,s){return b(e,t,i,s)}get arcadeRequired(){return!!this.valueExpression||(null!=this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||null!=this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired)}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value):e&&(i.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return m(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,i,s){if(d.test(e)){if(s?.messages){const e=this.index;y(s,`visualVariables[${"string"==typeof e?e:`visualVariables[${e}]`}].valueExpression`,"SizeVariable with '$view.scale' valueExpression is not supported in Web Scene. Please remove this property to save the Web Scene.")}}else t[i]=e}readValueUnit(e){return e?g.read(e):null}clone(){return new w({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:p(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:p(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops?.map(e=>e.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions?.clone()})}flipSizes(){if("clamped-linear"===this.transformationType){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if("stops"===this.transformationType){const e=this.stops;if(!e)return this;const t=e.map(e=>e.size).reverse(),i=e.length;for(let s=0;s<i;s++)e[s].size=t[s];return this}return this}_interpolateData(){return this.stops?.map(e=>e.value||0)}};e([s({readOnly:!0})],j.prototype,"cache",null),e([s({type:v.apiValues,json:{type:v.jsonValues,origins:{"web-map":{read:!1}},read:v.read,write:v.write}})],j.prototype,"axis",void 0),e([s()],j.prototype,"index",null),e([s({type:String,readOnly:!0})],j.prototype,"inputValueType",null),e([s({type:l,json:{write:!0}})],j.prototype,"legendOptions",void 0),e([s({type:Number,value:null,json:{write:!0}})],j.prototype,"maxDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],j.prototype,"maxSize",null),e([S("maxSize")],j.prototype,"readMaxSize",null),e([z("maxSize")],j.prototype,"writeMaxSize",null),e([s({type:Number,value:null,json:{write:!0}})],j.prototype,"minDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],j.prototype,"minSize",null),e([S("minSize")],j.prototype,"readMinSize",null),e([z("minSize")],j.prototype,"writeMinSize",null),e([s({type:String,json:{write:!0}})],j.prototype,"normalizationField",void 0),e([s({readOnly:!0})],j.prototype,"arcadeRequired",null),e([s({type:String})],j.prototype,"scaleBy",void 0),e([s({type:[o],value:null,json:{write:!0}})],j.prototype,"stops",null),e([s({type:["outline"],json:{write:!0}})],j.prototype,"target",void 0),e([s({type:String,readOnly:!0})],j.prototype,"transformationType",null),e([s({type:["size"],json:{type:["sizeInfo"]}})],j.prototype,"type",void 0),e([s({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],j.prototype,"useSymbolValue",void 0),e([s({type:String,json:{write:!0}})],j.prototype,"valueExpression",void 0),e([S("valueExpression",["valueExpression","expression"])],j.prototype,"readValueExpression",null),e([z("web-scene","valueExpression")],j.prototype,"writeValueExpressionWebScene",null),e([s({type:["radius","diameter","area","width","distance"],json:{write:!0}})],j.prototype,"valueRepresentation",void 0),e([s({type:g.apiValues,json:{write:g.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],j.prototype,"valueUnit",void 0),e([S("valueUnit")],j.prototype,"readValueUnit",null),j=w=e([r("esri.renderers.visualVariables.SizeVariable")],j);export{j as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function n(n){return n&&"esri.renderers.visualVariables.SizeVariable"===n.declaredClass}function e(n){return null!=n&&!isNaN(n)&&isFinite(n)}function i(n){return n.valueExpression?"expression":n.field&&"string"==typeof n.field?"field":"unknown"}function l(n,e){const l=e||i(n),a=n.valueUnit||"unknown";return"unknown"===l?"constant":n.stops?"stops":null!=n.minSize&&null!=n.maxSize&&null!=n.minDataValue&&null!=n.maxDataValue?"clamped-linear":"unknown"===a?null!=n.minSize&&null!=n.minDataValue?n.minSize&&n.minDataValue?"proportional":"additive":"identity":"real-world-size"}export{i as getInputValueType,l as getTransformationType,n as isSizeVariable,e as isValidNumber};
2
+ const n=Symbol("SizeVariableInstance");function i(i){return null!=i&&"object"==typeof i&&n in i}function e(n){return null!=n&&!isNaN(n)&&isFinite(n)}function l(n){return n.valueExpression?"expression":n.field&&"string"==typeof n.field?"field":"unknown"}function t(n,i){const e=i||l(n),t=n.valueUnit||"unknown";return"unknown"===e?"constant":n.stops?"stops":null!=n.minSize&&null!=n.maxSize&&null!=n.minDataValue&&null!=n.maxDataValue?"clamped-linear":"unknown"===t?null!=n.minSize&&null!=n.minDataValue?n.minSize&&n.minDataValue?"proportional":"additive":"identity":"real-world-size"}export{n as SizeVariableSymbol,l as getInputValueType,t as getTransformationType,i as isSizeVariable,e as isValidNumber};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as t}from"tslib";import s from"../../../core/Error.js";import r from"../../../core/pbf.js";import{featureGeometryTypeKebabDictionary as n}from"../../../geometry/support/typeUtils.js";const a=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],i=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function l(e,t){const s=e.getEnum();return s<t.length?t[s]:void 0}function u(e,t){e.featureSet.geometryType=e.usesShortGeometryTypes?n.fromJSON(t):t}function g(e,t=e.featureSet.geometryType){return e.usesShortGeometryTypes?n.toJSON(t):t}function p(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function f(e){const t=e.asUnsafe(),s={type:o[0]};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=l(t,o);break;case 3:s.alias=t.getString();break;case 4:s.sqlType=l(t,i);break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function y(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}let d=[];function h(e,t,s){let r=g(t),n=0;const o=e.asUnsafe();for(;o.next();)switch(o.tag()){case 1:1===s?r=g(t,l(o,a)):o.skip();continue;case 2:for(const e=o.getPackedEnd();o.pos()<e;)d[n++]=o.getUInt32();continue;case 3:n>0?(d.length=n,null!=t.geometry(s,r,d)&&(d=[])):t.geometry(s,r,[]);for(const e=o.getPackedEnd();o.pos()<e;)t.coord(o.getSInt64());continue;default:o.skip()}}function m(e,t){const s=[],r=e.asUnsafe();for(;r.next();)if(3!==r.tag())r.skip();else for(const e=r.getPackedEnd();r.pos()<e;)s.push(r.getSInt64());t.centroid(s)}let k=[],T=[],b=[];function S(s,r){const n={stack:[],error:void 0,hasError:!1};try{let o=0;const i=d;let c=0;const l=s.asUnsafe(),u=e(n,l.clonePooled().asUnsafe(),!1);for(;l.next();)switch(l.tag()){case 2:for(const p=l.getPackedEnd();l.pos()<p;)i[o++]=l.getUInt32();continue;case 3:if(!("curvedGeometry"in r))throw new Error(`Tried to parse curved geometry in a ${r.constructor.name}, which doesn't support them.`);l.processMessageWithArgs(I,c++);continue;case 4:{const f=l.getUInt32(),y=l.pos()+f;if(0===c||0===o||0===f){l.move(y);continue}i.length=o,b.length=T.length=c,r.curvedGeometry(g(r),i,T,b);const{hasZ:h,hasM:m}=r.featureSet,S=[],q=[0,0];function w(){for(let e=0;e<q.length;++e)S[e]=q[e],q[e]=l.getSInt64()}h&&q.push(0),m&&q.push(0);const F=[0,0],U=[0,0],D=F,M=F;let x=0;for(let G=0;G<o;++G){w(),S.fill(0),r.startCurvedPart(q);for(const E=x+i[G];x<E;++x){const v=T[x],A=b[x];switch(v){case 0:for(let P=0;P<A;++P)w(),q[0]+=S[0],q[1]+=S[1],r.lineSegment(S,q);continue;case 1:for(let W=0;W<A;++W)w(),D[0]=l.getSInt64(),D[1]=l.getSInt64(),r.circularArcSegment(S,q,D);continue;case 2:for(let O=0;O<A;++O)w(),F[0]=l.getSInt64(),F[1]=l.getSInt64(),U[0]=l.getSInt64(),U[1]=l.getSInt64(),r.bezierSegment(S,q,F,U);continue;case 3:u.move(k[x]);if(u.getUInt32()<7*A)throw new Error("Not implemented: compressed full circle encoding");for(let B=0;B<A;++B){w(),M[0]=u.getDouble(),M[1]=u.getDouble();const N=u.getDouble(),V=u.getDouble(),L=u.getDouble(),C=u.getDouble(),R=u.getDouble();r.ellipticArcSegment(S,q,M,N,V,L,C,R)}continue}}r.finishCurvedPart(q)}continue}default:l.skip()}}catch(a){n.error=a,n.hasError=!0}finally{t(n)}}function I(e,t){const s=e.asUnsafe();let r=0,n=0,a=0;for(;s.next();)switch(s.tag()){case 1:r=s.getEnum();continue;case 2:n=s.getUInt32();continue;case 3:a=s.pos(),s.skip();continue;default:s.skip()}if(3===r&&0===a)throw new Error("An elliptic arc segment set did not include a parameters array");T[t]=r,b[t]=n,k[t]=a}function q(e,t){t.feature();const s=t.featureSet.features.at(-1);let r=0;const{fields:n}=t.featureSet;for(;e.next();)switch(e.tag()){case 1:if(null==n)throw new Error("A Feature had attributes but the FeatureResult didn't include any fields");s.attributes[n[r++].name]=e.processMessage(p);continue;case 2:e.processMessageWithArgs(h,t,0);continue;case 4:e.processMessageWithArgs(m,t);continue;case 7:e.processMessageWithArgs(S,t);continue;default:e.skip();continue}t.finishFeature?.()}function w(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function F(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function U(e){const t={originPosition:c[0]},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=l(s,c);break;case 2:t.scale=s.processMessage(w);break;case 3:t.translate=s.processMessage(F);break;default:s.skip()}return t}function D(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function M(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.wkid=e.getUInt32();break;case 5:t.wkt=e.getString();break;case 2:t.latestWkid=e.getUInt32();break;case 3:t.vcsWkid=e.getUInt32();break;case 4:t.latestVcsWkid=e.getUInt32();break;default:e.skip()}return t}function x(e,t){const s=e.asUnsafe();if(t.featureSet.features.length=0,"features"===t.parseOnly?.type){const e=t.parseOnly.indices.values();let r=0,n=e.next().value;for(;s.next();)15===s.tag()&&r++===n?(n=e.next().value,s.processMessageWithArgs(q,t)):s.skip();return}let r=!1;for("metadata"===t.parseOnly?.type&&(r=!0,t.parseOnly.featureCount=0),u(t,"esriGeometryPoint");s.next();)switch(s.tag()){case 1:t.idField(s.getString());continue;case 3:t.featureSet.globalIdFieldName=s.getString();continue;case 4:t.featureSet.geohashFieldName=s.getString();continue;case 5:t.featureSet.geometryProperties=s.processMessage(D);continue;case 7:u(t,l(s,a));continue;case 8:t.featureSet.spatialReference=s.processMessageWithArgs(M);continue;case 10:t.featureSet.hasZ=s.getBool();continue;case 11:t.featureSet.hasM=s.getBool();continue;case 12:t.featureSet.transform=s.processMessage(U);continue;case 9:t.featureSet.exceededTransferLimit=s.getBool();continue;case 13:t.featureSet.fields??=[],t.featureSet.fields.push(s.processMessage(f));continue;case 15:if(r){++t.parseOnly.featureCount,s.skip();continue}s.processMessageWithArgs(q,t);continue;case 2:t.idField(s.processMessage(y));continue;default:s.skip()}}function G(e,t,s){let r=-1;for(;e.next();)switch(e.tag()){case 4:r=e.pos(),e.skip();continue;case 1:e.processMessageWithArgs(x,t);continue;default:e.skip()}if(-1!==r){if(!t.queryGeometry()){const s=e.pos();e.move(r),e.processMessageWithArgs(h,t,1),e.move(s)}s.queryGeometryType=t.queryGeometryType(),s.queryGeometry=t.queryGeometry()}t.finish(),s.featureResult=t.featureSet}function E(n,a){const o={stack:[],error:void 0,hasError:!1};try{e(o,{[Symbol.dispose](){d=[],k=[],T=[],b=[]}},!1);try{const s={stack:[],error:void 0,hasError:!1};try{const t=e(s,r.constructPooled(new Uint8Array(n),new DataView(n)),!1);let o;for(;t.next();)if(2===t.tag())o={},t.processMessageWithArgs(G,a,o);else t.skip();return o}catch(i){s.error=i,s.hasError=!0}finally{t(s)}}catch(c){throw new s("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:c})}}catch(l){o.error=l,o.hasError=!0}finally{t(o)}}export{E as parseFeatureQuery,f as parseField,U as parseTransform};
2
+ import{__addDisposableResource as e,__disposeResources as t}from"tslib";import s from"../../../core/Error.js";import r from"../../../core/pbf.js";import{featureGeometryTypeKebabDictionary as n}from"../../../geometry/support/typeUtils.js";const a=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],i=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function l(e,t){const s=e.getEnum();return s<t.length?t[s]:void 0}function u(e,t){e.featureSet.geometryType=e.usesShortGeometryTypes?n.fromJSON(t):t}function g(e,t=e.featureSet.geometryType){return e.usesShortGeometryTypes?n.toJSON(t):t}function p(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function f(e){const t=e.asUnsafe(),s={type:o[0]};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=l(t,o);break;case 3:s.alias=t.getString();break;case 4:s.sqlType=l(t,i);break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function y(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}let d=[];function h(e,t,s){let r=g(t),n=0;const o=e.asUnsafe();for(;o.next();)switch(o.tag()){case 1:1===s?r=g(t,l(o,a)):o.skip();continue;case 2:for(const e=o.getPackedEnd();o.pos()<e;)d[n++]=o.getUInt32();continue;case 3:n>0?(d.length=n,null!=t.geometry(s,r,d)&&(d=[])):t.geometry(s,r,[]);for(const e=o.getPackedEnd();o.pos()<e;)t.coord(o.getSInt64());continue;default:o.skip()}}function m(e,t){const s=[],r=e.asUnsafe();for(;r.next();)if(3!==r.tag())r.skip();else for(const e=r.getPackedEnd();r.pos()<e;)s.push(r.getSInt64());t.centroid(s)}let k=[],b=[],T=[];function S(s,r){const n={stack:[],error:void 0,hasError:!1};try{let o=0;const i=d;let c=0;const l=s.asUnsafe(),u=e(n,l.clonePooled().asUnsafe(),!1);for(;l.next();)switch(l.tag()){case 2:for(const p=l.getPackedEnd();l.pos()<p;)i[o++]=l.getUInt32();continue;case 3:if(!("curvedGeometry"in r))throw new Error(`Tried to parse curved geometry in a ${r.constructor.name}, which doesn't support them.`);l.processMessageWithArgs(I,c++);continue;case 4:{const f=l.getUInt32(),y=l.pos()+f;if(0===c||0===o||0===f){l.move(y);continue}i.length=o,T.length=b.length=c,r.curvedGeometry(g(r),i,b,T);const{hasZ:h,hasM:m}=r.featureSet,S=[],q=[0,0];function w(){for(let e=0;e<q.length;++e)S[e]=q[e],q[e]=l.getSInt64()}h&&q.push(0),m&&q.push(0);const F=[0,0],D=[0,0],U=F,M=F;let x=0;for(let G=0;G<o;++G){w(),S.fill(0),r.startCurvedPart(q);for(const E=x+i[G];x<E;++x){const v=b[x],A=T[x];switch(v){case 0:for(let P=0;P<A;++P)w(),q[0]+=S[0],q[1]+=S[1],r.lineSegment(S,q);continue;case 1:for(let W=0;W<A;++W)w(),U[0]=l.getSInt64(),U[1]=l.getSInt64(),r.circularArcSegment(S,q,U);continue;case 2:for(let O=0;O<A;++O)w(),F[0]=l.getSInt64(),F[1]=l.getSInt64(),D[0]=l.getSInt64(),D[1]=l.getSInt64(),r.bezierSegment(S,q,F,D);continue;case 3:u.move(k[x]);if(u.getUInt32()<7*A)throw new Error("Not implemented: compressed full circle encoding");for(let B=0;B<A;++B){w(),M[0]=u.getDouble(),M[1]=u.getDouble();const N=u.getDouble(),V=u.getDouble(),L=u.getDouble(),C=u.getDouble(),R=u.getDouble();r.ellipticArcSegment(S,q,M,N,V,L,C,R)}continue}}r.finishCurvedPart(q)}continue}default:l.skip()}}catch(a){n.error=a,n.hasError=!0}finally{t(n)}}function I(e,t){const s=e.asUnsafe();let r=0,n=0,a=0;for(;s.next();)switch(s.tag()){case 1:r=s.getEnum();continue;case 2:n=s.getUInt32();continue;case 3:a=s.pos(),s.skip();continue;default:s.skip()}if(3===r&&0===a)throw new Error("An elliptic arc segment set did not include a parameters array");b[t]=r,T[t]=n,k[t]=a}function q(e,t){t.feature();const s=t.featureSet.features.at(-1);let r=0;const{fields:n}=t.featureSet;for(;e.next();)switch(e.tag()){case 1:if(null==n)throw new Error("A Feature had attributes but the FeatureResult didn't include any fields");s.attributes[n[r++].name]=e.processMessage(p);continue;case 2:e.processMessageWithArgs(h,t,0);continue;case 4:e.processMessageWithArgs(m,t);continue;case 7:e.processMessageWithArgs(S,t);continue;case 11:s.distance=e.getDouble();continue;default:e.skip();continue}t.finishFeature?.()}function w(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function F(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function D(e){const t={originPosition:c[0]},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=l(s,c);break;case 2:t.scale=s.processMessage(w);break;case 3:t.translate=s.processMessage(F);break;default:s.skip()}return t}function U(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function M(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.wkid=e.getUInt32();break;case 5:t.wkt=e.getString();break;case 2:t.latestWkid=e.getUInt32();break;case 3:t.vcsWkid=e.getUInt32();break;case 4:t.latestVcsWkid=e.getUInt32();break;default:e.skip()}return t}function x(e,t){const s=e.asUnsafe();if(t.featureSet.features.length=0,"features"===t.parseOnly?.type){const e=t.parseOnly.indices.values();let r=0,n=e.next().value;for(;s.next();)15===s.tag()&&r++===n?(n=e.next().value,s.processMessageWithArgs(q,t)):s.skip();return}let r=!1;for("metadata"===t.parseOnly?.type&&(r=!0,t.parseOnly.featureCount=0),u(t,"esriGeometryPoint");s.next();)switch(s.tag()){case 1:t.idField(s.getString());continue;case 3:t.featureSet.globalIdFieldName=s.getString();continue;case 4:t.featureSet.geohashFieldName=s.getString();continue;case 5:t.featureSet.geometryProperties=s.processMessage(U);continue;case 7:u(t,l(s,a));continue;case 8:t.featureSet.spatialReference=s.processMessageWithArgs(M);continue;case 10:t.featureSet.hasZ=s.getBool();continue;case 11:t.featureSet.hasM=s.getBool();continue;case 12:t.featureSet.transform=s.processMessage(D);continue;case 9:t.featureSet.exceededTransferLimit=s.getBool();continue;case 13:t.featureSet.fields??=[],t.featureSet.fields.push(s.processMessage(f));continue;case 15:if(r){++t.parseOnly.featureCount,s.skip();continue}s.processMessageWithArgs(q,t);continue;case 2:t.idField(s.processMessage(y));continue;default:s.skip()}}function G(e,t,s){let r=-1;for(;e.next();)switch(e.tag()){case 4:r=e.pos(),e.skip();continue;case 1:e.processMessageWithArgs(x,t);continue;default:e.skip()}if(-1!==r){if(!t.queryGeometry()){const s=e.pos();e.move(r),e.processMessageWithArgs(h,t,1),e.move(s)}s.queryGeometryType=t.queryGeometryType(),s.queryGeometry=t.queryGeometry()}t.finish(),s.featureResult=t.featureSet}function E(n,a){const o={stack:[],error:void 0,hasError:!1};try{e(o,{[Symbol.dispose](){d=[],k=[],b=[],T=[]}},!1);try{const s={stack:[],error:void 0,hasError:!1};try{const t=e(s,r.constructPooled(new Uint8Array(n),new DataView(n)),!1);let o;for(;t.next();)if(2===t.tag())o={},t.processMessageWithArgs(G,a,o);else t.skip();return o}catch(i){s.error=i,s.hasError=!0}finally{t(s)}}catch(c){throw new s("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:c})}}catch(l){o.error=l,o.hasError=!0}finally{t(o)}}export{E as parseFeatureQuery,f as parseField,D as parseTransform};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as r}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e,subclass as s}from"../../core/accessorSupport/decorators.js";var o;let n=class extends t{constructor(){super(...arguments),this.returnDistance=!0,this.ascendingOrder=!0}static{o=this}clone(){return new o({returnDistance:this.returnDistance,ascendingOrder:this.ascendingOrder})}};r([e()],n.prototype,"returnDistance",void 0),r([e()],n.prototype,"ascendingOrder",void 0),n=o=r([s("esri.rest.support.OutDistance")],n);const i=n;export{i as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as i,cast as s,subclass as n}from"../../core/accessorSupport/decorators.js";import{ensureClass as a}from"../../core/accessorSupport/ensureType.js";import l from"../../geometry/Point.js";import p from"../../geometry/SpatialReference.js";import{fromJSON as u}from"../../geometry/support/jsonUtils.js";import{geometryTypes as m}from"../../geometry/support/typeUtils.js";import d from"../layerSources/DynamicDataLayer.js";import c from"./FullTextSearch.js";import y from"./QuantizationParameters.js";import{spatialRelKebabDict as h}from"./spatialRelationships.js";import f from"./StatisticDefinition.js";import j from"../../time/TimeExtent.js";import{writer as v}from"../../core/accessorSupport/decorators/writer.js";import{enumeration as w}from"../../core/accessorSupport/decorators/enumeration.js";var S;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"});let R=class extends r{static{S=this}static from(t){return a(S,t)}constructor(t){super(t),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.where=null}castDatumTransformation(t){return"number"==typeof t||"object"==typeof t?t:null}writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeParameterValues(t,e){if(t){const r={};for(const e in t){const o=t[e];Array.isArray(o)?r[e]=o.map(t=>t instanceof Date?t.getTime():t):o instanceof Date?r[e]=o.getTime():r[e]=o}e.parameterValues=r}}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,e.where="1=1"}writeWhere(t,e){e.where=t||"1=1"}clone(){return new S(o({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:null!=this.historicMoment?new Date(this.historicMoment):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,where:this.where}))}static{this.MAX_MAX_RECORD_COUNT_FACTOR=5}};t([i({json:{write:!0}})],R.prototype,"aggregateIds",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"compactGeometryEnabled",void 0),t([i({json:{write:!0}})],R.prototype,"datumTransformation",void 0),t([s("datumTransformation")],R.prototype,"castDatumTransformation",null),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"defaultSpatialReferenceEnabled",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"distance",void 0),t([i({type:d,json:{write:!0}})],R.prototype,"dynamicDataSource",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"formatOf3DObjects",void 0),t([i({type:[c],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.fullText&&this.fullText.length>0}}}}})],R.prototype,"fullText",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"gdbVersion",void 0),t([i({types:m,json:{read:u,write:!0}})],R.prototype,"geometry",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"groupByFieldsForStatistics",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"having",void 0),t([i({type:Date})],R.prototype,"historicMoment",void 0),t([v("historicMoment")],R.prototype,"writeHistoricMoment",null),t([i({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),t([i({type:Number,cast:t=>t<1?1:t>R.MAX_MAX_RECORD_COUNT_FACTOR?R.MAX_MAX_RECORD_COUNT_FACTOR:t,json:{write:{overridePolicy:t=>({enabled:t>1})}}})],R.prototype,"maxRecordCountFactor",void 0),t([i({type:["xyFootprint"],json:{write:!0}})],R.prototype,"multipatchOption",void 0),t([i({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),t([i({json:{write:!0}})],R.prototype,"objectIds",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),t([i({type:p,json:{name:"outSR",write:!0}})],R.prototype,"outSpatialReference",void 0),t([i({type:[f],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],R.prototype,"outStatistics",void 0),t([i({json:{write:!0}})],R.prototype,"parameterValues",void 0),t([v("parameterValues")],R.prototype,"writeParameterValues",null),t([i({type:l,json:{write:!0}})],R.prototype,"pixelSize",void 0),t([i({type:y,json:{write:!0}})],R.prototype,"quantizationParameters",void 0),t([i({type:[Object],json:{write:!0}})],R.prototype,"rangeValues",void 0),t([i({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:"relation"===this.spatialRelationship}}}}})],R.prototype,"relationParameter",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnCentroid",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnDistinctValues",void 0),t([i({type:Boolean,json:{default:!0,write:!0}})],R.prototype,"returnExceededLimitFeatures",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnQueryGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnM",void 0),t([i({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],R.prototype,"returnZ",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnTrueCurves",void 0),t([i({type:p,json:{write:!0}})],R.prototype,"sourceSpatialReference",void 0),t([w(h,{ignoreUnknown:!1,name:"spatialRel"})],R.prototype,"spatialRelationship",void 0),t([i({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),t([v("start"),v("num")],R.prototype,"writeStart",null),t([i({type:String,json:{write:!0}})],R.prototype,"sqlFormat",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"text",void 0),t([i({type:j,json:{write:!0}})],R.prototype,"timeExtent",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"timeReferenceUnknownClient",void 0),t([w(g,{ignoreUnknown:!1}),i({json:{write:{overridePolicy(t){return{enabled:!!t&&null!=this.distance}}}}})],R.prototype,"units",void 0),t([i({type:String,json:{write:{overridePolicy(t){return{enabled:null!=t||null!=this.start&&this.start>0}}}}})],R.prototype,"where",void 0),t([v("where")],R.prototype,"writeWhere",null),R=S=t([n("esri.rest.support.Query")],R);export{R as default};
2
+ import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as i,cast as s,subclass as n}from"../../core/accessorSupport/decorators.js";import{ensureClass as a}from"../../core/accessorSupport/ensureType.js";import l from"../../geometry/Point.js";import p from"../../geometry/SpatialReference.js";import{fromJSON as u}from"../../geometry/support/jsonUtils.js";import{geometryTypes as m}from"../../geometry/support/typeUtils.js";import d from"../layerSources/DynamicDataLayer.js";import c from"./FullTextSearch.js";import y from"./QuantizationParameters.js";import{spatialRelKebabDict as h}from"./spatialRelationships.js";import f from"./StatisticDefinition.js";import j from"../../time/TimeExtent.js";import{writer as v}from"../../core/accessorSupport/decorators/writer.js";import{enumeration as w}from"../../core/accessorSupport/decorators/enumeration.js";var S;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"});let R=class extends r{static{S=this}static from(t){return a(S,t)}constructor(t){super(t),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.outDistance=null,this.where=null}castDatumTransformation(t){return"number"==typeof t||"object"==typeof t?t:null}writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeParameterValues(t,e){if(t){const r={};for(const e in t){const o=t[e];Array.isArray(o)?r[e]=o.map(t=>t instanceof Date?t.getTime():t):o instanceof Date?r[e]=o.getTime():r[e]=o}e.parameterValues=r}}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,e.where="1=1"}writeWhere(t,e){e.where=t||"1=1"}clone(){return new S(o({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:null!=this.historicMoment?new Date(this.historicMoment):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,outDistance:this.outDistance,where:this.where}))}static{this.MAX_MAX_RECORD_COUNT_FACTOR=5}};t([i({json:{write:!0}})],R.prototype,"aggregateIds",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"compactGeometryEnabled",void 0),t([i({json:{write:!0}})],R.prototype,"datumTransformation",void 0),t([s("datumTransformation")],R.prototype,"castDatumTransformation",null),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"defaultSpatialReferenceEnabled",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"distance",void 0),t([i({type:d,json:{write:!0}})],R.prototype,"dynamicDataSource",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"formatOf3DObjects",void 0),t([i({type:[c],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.fullText&&this.fullText.length>0}}}}})],R.prototype,"fullText",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"gdbVersion",void 0),t([i({types:m,json:{read:u,write:!0}})],R.prototype,"geometry",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"groupByFieldsForStatistics",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"having",void 0),t([i({type:Date})],R.prototype,"historicMoment",void 0),t([v("historicMoment")],R.prototype,"writeHistoricMoment",null),t([i({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),t([i({type:Number,cast:t=>t<1?1:t>R.MAX_MAX_RECORD_COUNT_FACTOR?R.MAX_MAX_RECORD_COUNT_FACTOR:t,json:{write:{overridePolicy:t=>({enabled:t>1})}}})],R.prototype,"maxRecordCountFactor",void 0),t([i({type:["xyFootprint"],json:{write:!0}})],R.prototype,"multipatchOption",void 0),t([i({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),t([i({json:{write:!0}})],R.prototype,"objectIds",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),t([i({type:p,json:{name:"outSR",write:!0}})],R.prototype,"outSpatialReference",void 0),t([i({type:[f],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],R.prototype,"outStatistics",void 0),t([i({json:{write:!0}})],R.prototype,"parameterValues",void 0),t([v("parameterValues")],R.prototype,"writeParameterValues",null),t([i({type:l,json:{write:!0}})],R.prototype,"pixelSize",void 0),t([i({type:y,json:{write:!0}})],R.prototype,"quantizationParameters",void 0),t([i({type:[Object],json:{write:!0}})],R.prototype,"rangeValues",void 0),t([i({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:"relation"===this.spatialRelationship}}}}})],R.prototype,"relationParameter",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnCentroid",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnDistinctValues",void 0),t([i({type:Boolean,json:{default:!0,write:!0}})],R.prototype,"returnExceededLimitFeatures",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnQueryGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnM",void 0),t([i({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],R.prototype,"returnZ",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnTrueCurves",void 0),t([i({type:p,json:{write:!0}})],R.prototype,"sourceSpatialReference",void 0),t([w(h,{ignoreUnknown:!1,name:"spatialRel"})],R.prototype,"spatialRelationship",void 0),t([i({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),t([v("start"),v("num")],R.prototype,"writeStart",null),t([i({type:String,json:{write:!0}})],R.prototype,"sqlFormat",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"text",void 0),t([i({type:j,json:{write:!0}})],R.prototype,"timeExtent",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"timeReferenceUnknownClient",void 0),t([w(g,{ignoreUnknown:!1}),i({json:{write:{overridePolicy(t){return{enabled:!!t&&null!=this.distance}}}}})],R.prototype,"units",void 0),t([i()],R.prototype,"outDistance",void 0),t([i({type:String,json:{write:{overridePolicy(t){return{enabled:null!=t||null!=this.start&&this.start>0}}}}})],R.prototype,"where",void 0),t([v("where")],R.prototype,"writeWhere",null),R=S=t([n("esri.rest.support.Query")],R);export{R as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../core/Error.js";import{pt2px as t}from"../../../core/screenUtils.js";import{timeOnlyToMilliseconds as n}from"../../../core/timeUtils.js";import o from"../../../geometry/Point.js";import i from"../../../geometry/SpatialReference.js";import{quantizePoint as r}from"../../../geometry/support/quantizationUtils.js";import{isWrappable as s,getInfo as l}from"../../../geometry/support/spatialReferenceUtils.js";import a from"../../../layers/support/FieldsIndex.js";import{isTimeOnlyField as u,isNumericField as f,numericTypes as c}from"../../../layers/support/fieldUtils.js";import{createValueFunction as p,evaluateDensityKernel as m}from"../../../renderers/support/heatmapUtils.js";import{isAnyDateField as d,getWhereClause as h}from"../../support/utils.js";import{processNullValue as y,getNormalizedValue as $}from"../../../statistics/utils.js";import{loadArcade as g}from"../../../support/loadArcade.js";let j=null;function w(e,t,n){return e.x<0?e.x+=t:e.x>n&&(e.x-=t),e}function x(e,t,n,i){const a=s(n)?l(n):null,u=a?Math.round((a.valid[1]-a.valid[0])/t.scale[0]):null;return e.map(e=>{const n=new o(e.geometry);return r(t,n,n),e.geometry=a?w(n,u??0,i[0]):n,e})}function I(e,n=18,o,i,r){const s=new Float64Array(i*r);n=Math.round(t(n));let l=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const u=p(o);for(const{geometry:t,attributes:f}of e){const{x:e,y:o}=t,c=Math.max(0,e-n),p=Math.max(0,o-n),d=Math.min(r,o+n),h=Math.min(i,e+n),y=+u(f);for(let t=p;t<d;t++)for(let r=c;r<h;r++){const u=t*i+r,f=m(r-e,t-o,n)*y,c=s[u]+=f;l=Math.min(l,c),a=Math.max(a,c)}}return{min:l,max:a}}async function F(e,t,o=!0){if(!t)return[];const{field:r,field2:s,field3:l,fieldDelimiter:f,sqlExpression:c,fieldInfos:p,timeZone:m}=e,w=r&&p?.find(e=>e.name.toLowerCase()===r.toLowerCase()),x=!!w&&u(w),I=!!w&&d(w),F=e.valueExpression,b=e.normalizationType,E=e.normalizationField,v=e.normalizationTotal,N=[],U=e.viewInfoParams;let M=null,T=null;if(F){if(!j){const{arcadeUtils:e}=await g();j=e}j.hasGeometryOperations(F)&&await j.enableGeometryOperations(),M=j.createFunction(F),T=U?j.getViewInfo({viewingMode:U.viewingMode,scale:U.scale,spatialReference:new i(U.spatialReference)}):null}const z=e.fieldInfos,O=!(t[0]&&"declaredClass"in t[0]&&"esri.Graphic"===t[0].declaredClass)&&z?{fields:z}:null;for await(const i of t){const e=i.attributes;let t;if(c){const e=await h(c,new a(z));e&&(t=e.calculateValue(i.attributes))}else if(F){const e=O?Object.assign({},i,{layer:O}):i,n=j.createExecContext(e,T,m);t=j.executeFunction(M,n)}else e&&(t=e[r],s?(t=`${y(t)}${f}${y(e[s])}`,l&&(t=`${t}${f}${y(e[l])}`)):"string"==typeof t&&o&&(I?t=t?new Date(t).getTime():null:x&&(t=t?n(t):null)));if(b&&"number"==typeof t&&isFinite(t)){const n=e&&parseFloat(e[E]);t=$(t,b,n,v)}N.push(t)}return N}function b(e){const t=e.field,n=e.normalizationType,o=e.normalizationField;let i;return"field"===n?i="(NOT "+o+" = 0)":"log"!==n&&"natural-log"!==n&&"square-root"!==n||(i=`(${t} > 0)`),i}function E(e,t,n){const o=null!=t?e+" >= "+t:"",i=null!=n?e+" <= "+n:"";let r="";return r=o&&i?U(o,i):o||i,r?"("+r+")":""}function v(t,n,o,i){let r;return n?n.name!==t.objectIdField&&i.includes(n.type)||(r=new e(o,"'field' should be one of these types: "+i.join(","))):r=new e(o,"'field' is not defined in the layer schema"),r}function N(t,n,o){let i;return n?n.name!==t.objectIdField&&f(n)||(i=new e(o,"'field' should be one of these numeric types: "+c.join(","))):i=new e(o,"'field' is not defined in the layer schema"),i}function U(e,t){let n=null!=e?e:"";return null!=t&&t&&(n=n?"("+n+") AND ("+t+")":t),n}function M(t,n){if(t&&"intersects"!==t.spatialRelationship)return new e(n,"Only 'intersects' spatialRelationship is supported for featureFilter")}function T(t,n,o){const i=z({layer:t,fields:n});if(i.length)return new e(o,"Unknown fields: "+i.join(", ")+". You can only use fields defined in the layer schema");const r=O({layer:t,fields:n});return r.length?new e(o,"Unsupported fields: "+r.join(", ")+". You can only use fields that can be fetched i.e. AdapterFieldUsageInfo.supportsStatistics must be true"):void 0}function z(e){const t=e.layer;return e.fields.filter(e=>!t.getField(e))}function O(e){const t=e.layer;return e.fields.filter(e=>{const n=t.getFieldUsageInfo(e);return!n||!n.supportsStatistics})}function R(e,t,n){const o=[],i=[],r=[],s=[],l=[];e.forEach((e,t)=>{const a=e.field?"field":"expression",u=e.field||e.valueExpression;e.field?(l.push(u),i.push(`var ${a}${t} = Number($feature["${u}"]);`)):(o.push(`function getValueForExpr${t}() {\n ${u} \n}`),i.push(`var ${a}${t} = Number(getValueForExpr${t}());`)),n||r.push(`${a}${t} = IIf(${a}${t} < 0, 0, ${a}${t});`),s.push(`${a}${t}`)});const a=o.length?null:l.reduce((e,t)=>`${e} + ${t}`);let u=null;t||n?t?n||a&&(u=`(( ${a} ) >= 0)`):a&&(u=`(( ${a} ) <> 0)`):a&&(u=`(( ${a} ) > 0)`);return{valueExpression:[o.length?o.join("\n"):"",i.join("\n"),r.join("\n"),`var total = ${s.join(" + ")};`,"return total;"].filter(Boolean).join("\n\n"),sqlExpression:a,sqlWhere:u}}export{I as calculateHeatmapStats,F as getDataValues,E as getRangeExpr,b as getSQLFilterForNormalization,R as getSumOfAttributesExpr,U as mergeWhereClauses,x as quantizeFeatures,T as verifyBasicFieldValidity,v as verifyFieldType,M as verifyFilterValidity,N as verifyNumericField};
2
+ import e from"../../../core/Error.js";import{pt2px as t}from"../../../core/screenUtils.js";import{timeOnlyToMilliseconds as n}from"../../../core/timeUtils.js";import o from"../../../geometry/Point.js";import i from"../../../geometry/SpatialReference.js";import{quantizePoint as r}from"../../../geometry/support/quantizationUtils.js";import{isWrappable as s,getInfo as l}from"../../../geometry/support/spatialReferenceUtils.js";import a from"../../../layers/support/FieldsIndex.js";import{isTimeOnlyField as u,isNumericField as f,numericTypes as c}from"../../../layers/support/fieldUtils.js";import{createValueFunction as p,evaluateDensityKernel as m}from"../../../renderers/support/heatmapUtils.js";import{isAnyDateField as d,getWhereClause as h}from"../../support/utils.js";import{processNullValue as y,getNormalizedValue as $}from"../../../statistics/utils.js";import{loadArcade as g}from"../../../support/loadArcade.js";let j;function w(e,t,n){return e.x<0?e.x+=t:e.x>n&&(e.x-=t),e}function x(e,t,n,i){const a=s(n)?l(n):null,u=a?Math.round((a.valid[1]-a.valid[0])/t.scale[0]):null;return e.map(e=>{const n=new o(e.geometry);return r(t,n,n),e.geometry=a?w(n,u??0,i[0]):n,e})}function I(e,n=18,o,i,r){const s=new Float64Array(i*r);n=Math.round(t(n));let l=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const u=p(o);for(const{geometry:t,attributes:f}of e){const{x:e,y:o}=t,c=Math.max(0,e-n),p=Math.max(0,o-n),d=Math.min(r,o+n),h=Math.min(i,e+n),y=+u(f);for(let t=p;t<d;t++)for(let r=c;r<h;r++){const u=t*i+r,f=m(r-e,t-o,n)*y,c=s[u]+=f;l=Math.min(l,c),a=Math.max(a,c)}}return{min:l,max:a}}async function F(e,t,o=!0){if(!t)return[];const{field:r,field2:s,field3:l,fieldDelimiter:f,sqlExpression:c,fieldInfos:p,timeZone:m}=e,w=r&&p?.find(e=>e.name.toLowerCase()===r.toLowerCase()),x=!!w&&u(w),I=!!w&&d(w),F=e.valueExpression,b=e.normalizationType,E=e.normalizationField,v=e.normalizationTotal,N=[],U=e.viewInfoParams;let M,T=null;if(F){if(!j){const{arcadeUtils:e}=await g();j=e}j.hasGeometryOperations(F)&&await j.enableGeometryOperations(),T=j.createFunction(F),M=U?j.getViewInfo({viewingMode:U.viewingMode,scale:U.scale,spatialReference:new i(U.spatialReference)}):null}const z=e.fieldInfos,O=!(t[0]&&"declaredClass"in t[0]&&"esri.Graphic"===t[0].declaredClass)&&z?{fields:z}:null;for await(const i of t){const e=i.attributes;let t;if(c){const e=await h(c,new a(z));e&&(t=e.calculateValue(i.attributes))}else if(F){const e=O?Object.assign({},i,{layer:O}):i,n=j.createExecContext(e,M,m);t=j.executeFunction(T,n)}else e&&(t=e[r],s?(t=`${y(t)}${f}${y(e[s])}`,l&&(t=`${t}${f}${y(e[l])}`)):"string"==typeof t&&o&&(I?t=t?new Date(t).getTime():null:x&&(t=t?n(t):null)));if(b&&"number"==typeof t&&isFinite(t)){const n=e&&parseFloat(e[E]);t=$(t,b,n,v)}N.push(t)}return N}function b(e){const t=e.field,n=e.normalizationType,o=e.normalizationField;let i;return"field"===n?i="(NOT "+o+" = 0)":"log"!==n&&"natural-log"!==n&&"square-root"!==n||(i=`(${t} > 0)`),i}function E(e,t,n){const o=null!=t?e+" >= "+t:"",i=null!=n?e+" <= "+n:"";let r="";return r=o&&i?U(o,i):o||i,r?"("+r+")":""}function v(t,n,o,i){let r;return n?n.name!==t.objectIdField&&i.includes(n.type)||(r=new e(o,"'field' should be one of these types: "+i.join(","))):r=new e(o,"'field' is not defined in the layer schema"),r}function N(t,n,o){let i;return n?n.name!==t.objectIdField&&f(n)||(i=new e(o,"'field' should be one of these numeric types: "+c.join(","))):i=new e(o,"'field' is not defined in the layer schema"),i}function U(e,t){let n=null!=e?e:"";return null!=t&&t&&(n=n?"("+n+") AND ("+t+")":t),n}function M(t,n){if(t&&"intersects"!==t.spatialRelationship)return new e(n,"Only 'intersects' spatialRelationship is supported for featureFilter")}function T(t,n,o){const i=z({layer:t,fields:n});if(i.length)return new e(o,"Unknown fields: "+i.join(", ")+". You can only use fields defined in the layer schema");const r=O({layer:t,fields:n});return r.length?new e(o,"Unsupported fields: "+r.join(", ")+". You can only use fields that can be fetched i.e. AdapterFieldUsageInfo.supportsStatistics must be true"):void 0}function z(e){const t=e.layer;return e.fields.filter(e=>!t.getField(e))}function O(e){const t=e.layer;return e.fields.filter(e=>{const n=t.getFieldUsageInfo(e);return!n||!n.supportsStatistics})}function R(e,t,n){const o=[],i=[],r=[],s=[],l=[];e.forEach((e,t)=>{const a=e.field?"field":"expression",u=e.field||e.valueExpression;e.field?(l.push(u),i.push(`var ${a}${t} = Number($feature["${u}"]);`)):(o.push(`function getValueForExpr${t}() {\n ${u} \n}`),i.push(`var ${a}${t} = Number(getValueForExpr${t}());`)),n||r.push(`${a}${t} = IIf(${a}${t} < 0, 0, ${a}${t});`),s.push(`${a}${t}`)});const a=o.length?null:l.reduce((e,t)=>`${e} + ${t}`);let u=null;t||n?t?n||a&&(u=`(( ${a} ) >= 0)`):a&&(u=`(( ${a} ) <> 0)`):a&&(u=`(( ${a} ) > 0)`);return{valueExpression:[o.length?o.join("\n"):"",i.join("\n"),r.join("\n"),`var total = ${s.join(" + ")};`,"return total;"].filter(Boolean).join("\n\n"),sqlExpression:a,sqlWhere:u}}export{I as calculateHeatmapStats,F as getDataValues,E as getRangeExpr,b as getSQLFilterForNormalization,R as getSumOfAttributesExpr,U as mergeWhereClauses,x as quantizeFeatures,T as verifyBasicFieldValidity,v as verifyFieldType,M as verifyFilterValidity,N as verifyNumericField};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{pickRandom as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{assertIsSome as i}from"../../../core/maybe.js";import{timeout as s,throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as n}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{toQuantizationTransform as m}from"../../../geometry/support/quantizationUtils.js";import{kebabDict as p}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as y}from"../../../layers/support/fieldUtils.js";import f from"../../../rest/support/QuantizationParameters.js";import{getArcadeForPredominantCategory as c}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as d,uniqueValues as h,histogram as w,classBreaks as g,heatmapStatistics as F}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as S}from"../../statistics/support/utils.js";import{WorkerClient as q}from"../../statistics/support/WorkerClient.js";import{getFieldsList as v,isAnyDateField as x,getFieldsFromWhereClauses as V,fieldDelimiter as _}from"../utils.js";import z from"./LayerAdapter.js";import{getHistogramAttributeDefinition as T,getAttributeBinsQuery as N,processQueryAttributeBinsResult as M}from"./support/histogramUtils.js";import{ensureFeaturesJSON as L,getSummaryStatsQuery as E,getSummaryStatisticsFromFeatureSet as C,getViewInfoParams as j,getMissingFields as b,updateQueryWithFeatureFilter as I,getUVQuery as k,getUniqueValuesFromFeatureSet as O,getBins as Q,getDomainsForFields as J,getPredominantCategoriesFromUVInfos as B}from"./support/utils.js";import{processSummaryStatisticsResult as P,createUVResult as U,resolveCBResult as A}from"../../../statistics/utils.js";import{loadArcade as $}from"../../../support/loadArcade.js";const G=5;let R=null,D=class extends z{constructor(){super(...arguments),this._hasLocalSource=!1,this.adapterName="in-memory-layer-adapter"}destroy(){this.workerClient?.destroy()}async _waitForLayerViewUpdate(e){if(!e)throw new r(`${this.adapterName}:insufficient-data`,"layerView is required to fetch the features");const t=new AbortController,i=n(()=>!e.updating,t.signal);await s(i,5e3,t).catch(e=>{throw a.getLogger(this).warn("LayerView is taking too long to update. Aborting fetch from layerView."),e})}async _fetchFeatureSetFromMemory(e,t,a){const i=this.layer;if(this._hasLocalSource&&"queryFeatures"in i)return i.queryFeatures(e);if(!t)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=await t.whenLayerView(this.layer);return await this._waitForLayerViewUpdate(s),s.queryFeatures(e,{signal:a})}async _fetchFeaturesFromMemory(e,t,a,i){const s=this.layer,o="json"===i;if(this._hasLocalSource&&"queryFeatures"in s){const e=await s.queryFeatures(t);return o?L(e.features):e.features}if(await this._waitForLayerViewUpdate(e),o&&"queryFeaturesJSON"in e&&e.queryFeaturesJSON){const{features:r}=await e.queryFeaturesJSON(t,{signal:a});return r}if(!("queryFeatures"in e))throw new r(`${this.adapterName}:not-supported`,"'queryFeatures' is not supported on the layerView");const n=await e.queryFeatures(t,{signal:a});return o?L(n.features):n.features}_fetchFeaturesForStats(e,t){return v({field:e.field,field2:e.field2,field3:e.field3,normalizationField:e.normalizationField,valueExpression:e.valueExpression,fields:e.fields}).then(r=>this.getSampleFeatures({sampleSize:-1,view:e.view,returnGeometry:e.returnGeometry,filter:e.filter,requiredFields:r,sqlWhere:e.sqlWhere,signal:e.signal},t))}async _summaryStatsFromClientQuery(e,t){const{view:r,signal:a}=e,i=E(this,e,t),s=await this._fetchFeatureSetFromMemory(i,r,a),o=C(s,x(t)||y(t));return P(o,e.outStatisticTypes)}async _getNormalizationTotalFromMemory(e,t,a){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"querySummaryStatistics"in o?await o.querySummaryStatistics(n,{field:e},{signal:a}):i?await this.workerClient.summaryStatistics({field:e,outStatisticTypes:l},i):await d({attribute:{field:e,outStatisticTypes:l},features:s??[]})).sum;if(null==u)throw new r(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _summaryStatsFromMemory(e,t){const{view:r,field:a,valueExpression:i,normalizationType:s,signal:o}=e,n={field:a,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:l,graphics:u,layerView:m,query:y,fieldInfos:f}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"querySummaryStatistics"});return i&&r&&(l||u)&&(n.fieldType=t?.type?p.toJSON(t.type):null,n.viewInfoParams=j(r),n.timeZone=r.timeZone,n.fieldInfos=f),"percent-of-total"===s&&null==e.normalizationTotal&&(n.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:l,graphics:u,layerView:m,query:y},o)),!l&&!u&&m&&"querySummaryStatistics"in m?m.querySummaryStatistics(y,n,{signal:o}):l?this.workerClient.summaryStatistics(n,l):d({attribute:n,features:u})}async _getFilteredFeatures(e,t){let r=e;const a=t?.geometry;if("intersects"===t?.spatialRelationship&&a){const t=await import("../../../geometry/operators/intersectionOperator.js");r=e.filter(({geometry:e})=>!(!e||!t.execute(e,a)))}return e.length&&"declaredClass"in e[0]&&"esri.Graphic"===e[0].declaredClass?{graphics:r}:{featuresJSON:r}}async _processStatsFromMemoryParams(e){const{features:t,filter:r}=e;if(t?.length)return this._getFilteredFeatures(t,r);const{view:a,field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,sqlExpression:u,sqlWhere:m,layerViewFunc:p,signal:y}=e;let f=e.returnGeometry;if(null==f&&l){if(!R){const{arcadeUtils:e}=await $();R=e}const e=R.hasGeometryOperations(l);e&&await R.enableGeometryOperations(),f=e}let c=null,d=null,h=null,w=null,g=null;if(a)try{const e="subtype-sublayer"===this.layer.type?this.layer.parent:this.layer;c=await a.whenLayerView(e),d=null!=p&&null!=c&&p in c&&"function"==typeof c[p]}catch{d=!1}if(d)try{await this._waitForLayerViewUpdate(c);const e=await v({field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,fields:await V([u,m],this.layer.fieldsIndex)});b(this,e,c).length?d=!1:(h=this.layer.createQuery(),h.outFields=e,h.returnGeometry=!1,h.where=S(h.where,m),I(h,r)),c.suspended&&(d=!1)}catch{d=!1}return d||(w=await this._fetchFeaturesForStats({field:i,field2:s,field3:o,fields:await V([u,m],this.layer.fieldsIndex),valueExpression:l,normalizationField:n,returnGeometry:f,filter:r,sqlWhere:m,view:a,signal:y},"json"),g=(await v({valueExpression:l})).map(e=>this.getField(e)?.toJSON()).filter(Boolean)),{layerView:c,query:h,featuresJSON:w,fieldInfos:g}}async _uvFromClientQuery(e,t){const{view:r,signal:a}=e,i=k(this,e),s=await this._fetchFeatureSetFromMemory(i,r,a),o=await O(s,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:_,view:e.view,signal:e.signal});return U(o,t,e.returnAllCodedValues,_)}async _uvFromMemory(e,t){const{view:r,field:a,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:p}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryUniqueValues"}),y={field:a,field2:e.field2,field3:e.field3,fieldDelimiter:_,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&r&&(n||l)&&(y.viewInfoParams=j(r),y.timeZone=r.timeZone,y.fieldInfos=p),!n&&!l&&u&&"queryUniqueValues"in u?u.queryUniqueValues(m,y,{signal:o}):n?this.workerClient.uniqueValues(y,n):h({attribute:y,features:l})}_histogramForField(e){let t=null;return t=null!=e.minValue&&null!=e.maxValue?Promise.resolve({min:e.minValue,max:e.maxValue}):this.summaryStatistics({...e,outStatisticTypes:{include:["min","max","count"]}}).then(e=>{if(!e.count)throw new r(`${this.adapterName}:insufficient-data`,"Either the layer has no features or none of the features have data for the field");return{min:e.min,max:e.max}}),t.then(t=>Q(this,{min:t.min,max:t.max},e.field,e.numBins??void 0,e.view,e.filter,e.signal))}async _histogramFromQueryAttributeBinsFromMemory(e){const{field:t,normalizationType:r,signal:a}=e,i=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAttributeBins"}),{featuresJSON:s,graphics:o,layerView:n,query:l}=i,u="percent-of-total"===r?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,i,a):void 0;if(!n||!("queryAttributeBins"in n)||s||o){const t=T(e,i,u);return s?this.workerClient.histogram(t,s):w({attribute:t,features:o})}const{query:m,min:p,max:y}=await N(e,this,u,l);if(!m)return{bins:[],minValue:p,maxValue:y,normalizationTotal:u};const f=await n.queryAttributeBins(m,{signal:a});return M(f,t?this.getField(t):null,{minValue:p,maxValue:y,normalizationTotal:u})}async _histogramFromMemory(e){const{field:t,signal:r}=e,a=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryHistogram"}),{featuresJSON:i,graphics:s,layerView:o,query:n}=a,l="percent-of-total"===e.normalizationType?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,a,r):void 0,u=T(e,a,l);return!i&&!s&&o&&"queryHistogram"in o?o.queryHistogram(n,u,{signal:r}):i?this.workerClient.histogram(u,i):w({attribute:u,features:s})}_classBreaksFromInterpolation(e){const{minValue:t,maxValue:r}=e,a=e.numClasses||G,i=[],s=(r-t)/a;for(let l=0;l<a;l++){const e=t+l*s;i.push({minValue:e,maxValue:e+s})}i[a-1].maxValue=r;const o={classBreaks:i,normalizationTotal:e.normalizationTotal},n=A(o,e.classificationMethod);return Promise.resolve(n)}async _classBreaksFromMemory(e){const{view:t,field:r,valueExpression:a,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryClassBreaks"}),m={field:r,valueExpression:a,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return a&&t&&(s||o)&&(m.viewInfoParams=j(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryClassBreaks"in n?n.queryClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):g({attribute:m,features:o})}async _heatmapStatsFromMemory(e){const{view:t,field:r,radius:a,signal:s}=e;i(t,"InMemoryLayerAdapter: must have a view");try{const r=await t.whenLayerView(this.layer);if("queryHeatmapStatistics"in r&&!r.updating&&!e.filter)return await r.queryHeatmapStatistics({field:e.field,radius:e.radius})}catch{o(s)}const{featuresJSON:n,graphics:l}=await this._processStatsFromMemoryParams({...e,returnGeometry:!0}),u=new f({extent:t.extent,tolerance:"2d"===t.type?t.state.resolution:t.pixelSizeAt?.(t.center)}),p={field:r,radius:a,transform:m(u),spatialReference:t.spatialReference?.toJSON(),size:t.size};return n?.length||l?.length?n?this.workerClient.heatmapStatistics(p,n):F({attribute:p,features:l}):{min:null,max:null}}getField(e=""){return this.layer.getField(e)}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!0,supportsStatistics:!0}:null}getFieldDomain(e,t){return this.layer.getFieldDomain(e,t)}createQuery(){return this.layer.createQuery()}async summaryStatistics(e){const{field:t,valueExpression:a,sqlExpression:i,features:s,view:o}=e,n=t?this.getField(t):null,l=!!a,u="3d"===o?.type;if(!a&&i&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return l||s||u?this._summaryStatsFromMemory(e,n):this._summaryStatsFromClientQuery(e,n)}async uniqueValues(e){const{valueExpression:t,sqlExpression:a,features:i,view:s}=e,o=await J(e,this),n=!!t,l="3d"===s?.type;if(!t&&a&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return n||i||l?this._uvFromMemory(e,o):this._uvFromClientQuery(e,o)}async histogram(e){const{features:t,valueExpression:a,normalizationType:i,sqlExpression:s}=e,o=t||!!a;if(!a&&s&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return o||i?this._histogramFromMemory(e):this._histogramForField(e)}async classBreaks(e){return!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)}async queryFeatureCount(e){const{whereClause:t,view:a,signal:i}=e;if(!a)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=this.layer.createQuery();s.where=S(s.where,t);const o=await a.whenLayerView(this.layer);return await n(()=>!o.updating,i),o.queryFeatureCount(s,{signal:i})}async generateRenderer(e,t){throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation")}async predominantCategories(e){const{fields:t,view:r,signal:a,filter:i}=e,s=c(t),o=await this._uvFromMemory({valueExpression:s,view:r,signal:a,filter:i});return B(o.uniqueValueInfos,t)}async heatmapStatistics(e){return this._heatmapStatsFromMemory(e)}async getSampleFeatures(e,a){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,sqlWhere:l,filter:u,signal:m}=e,p=this.layer.createQuery(),y=1;if(p.outSpatialReference=i?.spatialReference,p.returnGeometry=!!n,p.outFields=o,p.where=S(p.where,l),I(p,u),!i)throw new r(`${this.adapterName}:not-supported`,"view is required to get sample features for Layer");const f=await i.whenLayerView(this.layer);if(b(this,o,f).length)throw new r(`${this.adapterName}:not-supported`,"Required fields need to be passed in the outFields for Layer");const c=await this._fetchFeaturesFromMemory(f,p,m,a),d=null!=s&&s>0&&s<=c.length?s:c.length;return t(c,d,y)}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression="stream"===t.type||!!t.capabilities?.query?.supportsSqlExpression,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent="fullExtent"in t?t.fullExtent:t.parent?.fullExtent,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.workerClient=q.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};e([l({readOnly:!0})],D.prototype,"adapterName",void 0),e([l({constructOnly:!0})],D.prototype,"layer",void 0),D=e([u("esri.smartMapping.support.adapters.InMemoryLayerAdapter")],D);export{D as default};
2
+ import{__decorate as e}from"tslib";import{pickRandom as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{assertIsSome as i}from"../../../core/maybe.js";import{timeout as s,throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as n}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{toQuantizationTransform as m}from"../../../geometry/support/quantizationUtils.js";import{kebabDict as p}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as y}from"../../../layers/support/fieldUtils.js";import f from"../../../rest/support/QuantizationParameters.js";import{getArcadeForPredominantCategory as c}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as d,uniqueValues as h,histogram as w,classBreaks as g,heatmapStatistics as F}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as S}from"../../statistics/support/utils.js";import{WorkerClient as q}from"../../statistics/support/WorkerClient.js";import{getFieldsList as v,isAnyDateField as x,getFieldsFromWhereClauses as V,fieldDelimiter as _}from"../utils.js";import z from"./LayerAdapter.js";import{getHistogramAttributeDefinition as T,getAttributeBinsQuery as N,processQueryAttributeBinsResult as M}from"./support/histogramUtils.js";import{ensureFeaturesJSON as L,getSummaryStatsQuery as E,getSummaryStatisticsFromFeatureSet as C,getViewInfoParams as j,getMissingFields as b,updateQueryWithFeatureFilter as I,getUVQuery as k,getUniqueValuesFromFeatureSet as O,getBins as Q,getDomainsForFields as J,getPredominantCategoriesFromUVInfos as B}from"./support/utils.js";import{processSummaryStatisticsResult as P,createUVResult as U,resolveCBResult as A}from"../../../statistics/utils.js";import{loadArcade as $}from"../../../support/loadArcade.js";const G=5;let R,D=class extends z{constructor(){super(...arguments),this._hasLocalSource=!1,this.adapterName="in-memory-layer-adapter"}destroy(){this.workerClient?.destroy()}async _waitForLayerViewUpdate(e){if(!e)throw new r(`${this.adapterName}:insufficient-data`,"layerView is required to fetch the features");const t=new AbortController,i=n(()=>!e.updating,t.signal);await s(i,5e3,t).catch(e=>{throw a.getLogger(this).warn("LayerView is taking too long to update. Aborting fetch from layerView."),e})}async _fetchFeatureSetFromMemory(e,t,a){const i=this.layer;if(this._hasLocalSource&&"queryFeatures"in i)return i.queryFeatures(e);if(!t)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=await t.whenLayerView(this.layer);return await this._waitForLayerViewUpdate(s),s.queryFeatures(e,{signal:a})}async _fetchFeaturesFromMemory(e,t,a,i){const s=this.layer,o="json"===i;if(this._hasLocalSource&&"queryFeatures"in s){const e=await s.queryFeatures(t);return o?L(e.features):e.features}if(await this._waitForLayerViewUpdate(e),o&&"queryFeaturesJSON"in e&&e.queryFeaturesJSON){const{features:r}=await e.queryFeaturesJSON(t,{signal:a});return r}if(!("queryFeatures"in e))throw new r(`${this.adapterName}:not-supported`,"'queryFeatures' is not supported on the layerView");const n=await e.queryFeatures(t,{signal:a});return o?L(n.features):n.features}_fetchFeaturesForStats(e,t){return v({field:e.field,field2:e.field2,field3:e.field3,normalizationField:e.normalizationField,valueExpression:e.valueExpression,fields:e.fields}).then(r=>this.getSampleFeatures({sampleSize:-1,view:e.view,returnGeometry:e.returnGeometry,filter:e.filter,requiredFields:r,sqlWhere:e.sqlWhere,signal:e.signal},t))}async _summaryStatsFromClientQuery(e,t){const{view:r,signal:a}=e,i=E(this,e,t),s=await this._fetchFeatureSetFromMemory(i,r,a),o=C(s,x(t)||y(t));return P(o,e.outStatisticTypes)}async _getNormalizationTotalFromMemory(e,t,a){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"querySummaryStatistics"in o?await o.querySummaryStatistics(n,{field:e},{signal:a}):i?await this.workerClient.summaryStatistics({field:e,outStatisticTypes:l},i):await d({attribute:{field:e,outStatisticTypes:l},features:s??[]})).sum;if(null==u)throw new r(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _summaryStatsFromMemory(e,t){const{view:r,field:a,valueExpression:i,normalizationType:s,signal:o}=e,n={field:a,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:l,graphics:u,layerView:m,query:y,fieldInfos:f}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"querySummaryStatistics"});return i&&r&&(l||u)&&(n.fieldType=t?.type?p.toJSON(t.type):null,n.viewInfoParams=j(r),n.timeZone=r.timeZone,n.fieldInfos=f),"percent-of-total"===s&&null==e.normalizationTotal&&(n.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:l,graphics:u,layerView:m,query:y},o)),!l&&!u&&m&&"querySummaryStatistics"in m?m.querySummaryStatistics(y,n,{signal:o}):l?this.workerClient.summaryStatistics(n,l):d({attribute:n,features:u})}async _getFilteredFeatures(e,t){let r=e;const a=t?.geometry;if("intersects"===t?.spatialRelationship&&a){const t=await import("../../../geometry/operators/intersectionOperator.js");r=e.filter(({geometry:e})=>!(!e||!t.execute(e,a)))}return e.length&&"declaredClass"in e[0]&&"esri.Graphic"===e[0].declaredClass?{graphics:r}:{featuresJSON:r}}async _processStatsFromMemoryParams(e){const{features:t,filter:r}=e;if(t?.length)return this._getFilteredFeatures(t,r);const{view:a,field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,sqlExpression:u,sqlWhere:m,layerViewFunc:p,signal:y}=e;let f=e.returnGeometry;if(null==f&&l){if(!R){const{arcadeUtils:e}=await $();R=e}const e=R.hasGeometryOperations(l);e&&await R.enableGeometryOperations(),f=e}let c=null,d=null,h=null,w=null,g=null;if(a)try{const e="subtype-sublayer"===this.layer.type?this.layer.parent:this.layer;c=await a.whenLayerView(e),d=null!=p&&null!=c&&p in c&&"function"==typeof c[p]}catch{d=!1}if(d)try{await this._waitForLayerViewUpdate(c);const e=await v({field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,fields:await V([u,m],this.layer.fieldsIndex)});b(this,e,c).length?d=!1:(h=this.layer.createQuery(),h.outFields=e,h.returnGeometry=!1,h.where=S(h.where,m),I(h,r)),c.suspended&&(d=!1)}catch{d=!1}return d||(w=await this._fetchFeaturesForStats({field:i,field2:s,field3:o,fields:await V([u,m],this.layer.fieldsIndex),valueExpression:l,normalizationField:n,returnGeometry:f,filter:r,sqlWhere:m,view:a,signal:y},"json"),g=(await v({valueExpression:l})).map(e=>this.getField(e)?.toJSON()).filter(Boolean)),{layerView:c,query:h,featuresJSON:w,fieldInfos:g}}async _uvFromClientQuery(e,t){const{view:r,signal:a}=e,i=k(this,e),s=await this._fetchFeatureSetFromMemory(i,r,a),o=await O(s,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:_,view:e.view,signal:e.signal});return U(o,t,e.returnAllCodedValues,_)}async _uvFromMemory(e,t){const{view:r,field:a,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:p}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryUniqueValues"}),y={field:a,field2:e.field2,field3:e.field3,fieldDelimiter:_,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&r&&(n||l)&&(y.viewInfoParams=j(r),y.timeZone=r.timeZone,y.fieldInfos=p),!n&&!l&&u&&"queryUniqueValues"in u?u.queryUniqueValues(m,y,{signal:o}):n?this.workerClient.uniqueValues(y,n):h({attribute:y,features:l})}_histogramForField(e){let t=null;return t=null!=e.minValue&&null!=e.maxValue?Promise.resolve({min:e.minValue,max:e.maxValue}):this.summaryStatistics({...e,outStatisticTypes:{include:["min","max","count"]}}).then(e=>{if(!e.count)throw new r(`${this.adapterName}:insufficient-data`,"Either the layer has no features or none of the features have data for the field");return{min:e.min,max:e.max}}),t.then(t=>Q(this,{min:t.min,max:t.max},e.field,e.numBins??void 0,e.view,e.filter,e.signal))}async _histogramFromQueryAttributeBinsFromMemory(e){const{field:t,normalizationType:r,signal:a}=e,i=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAttributeBins"}),{featuresJSON:s,graphics:o,layerView:n,query:l}=i,u="percent-of-total"===r?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,i,a):void 0;if(!n||!("queryAttributeBins"in n)||s||o){const t=T(e,i,u);return s?this.workerClient.histogram(t,s):w({attribute:t,features:o})}const{query:m,min:p,max:y}=await N(e,this,u,l);if(!m)return{bins:[],minValue:p,maxValue:y,normalizationTotal:u};const f=await n.queryAttributeBins(m,{signal:a});return M(f,t?this.getField(t):null,{minValue:p,maxValue:y,normalizationTotal:u})}async _histogramFromMemory(e){const{field:t,signal:r}=e,a=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryHistogram"}),{featuresJSON:i,graphics:s,layerView:o,query:n}=a,l="percent-of-total"===e.normalizationType?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,a,r):void 0,u=T(e,a,l);return!i&&!s&&o&&"queryHistogram"in o?o.queryHistogram(n,u,{signal:r}):i?this.workerClient.histogram(u,i):w({attribute:u,features:s})}_classBreaksFromInterpolation(e){const{minValue:t,maxValue:r}=e,a=e.numClasses||G,i=[],s=(r-t)/a;for(let l=0;l<a;l++){const e=t+l*s;i.push({minValue:e,maxValue:e+s})}i[a-1].maxValue=r;const o={classBreaks:i,normalizationTotal:e.normalizationTotal},n=A(o,e.classificationMethod);return Promise.resolve(n)}async _classBreaksFromMemory(e){const{view:t,field:r,valueExpression:a,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryClassBreaks"}),m={field:r,valueExpression:a,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return a&&t&&(s||o)&&(m.viewInfoParams=j(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryClassBreaks"in n?n.queryClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):g({attribute:m,features:o})}async _heatmapStatsFromMemory(e){const{view:t,field:r,radius:a,signal:s}=e;i(t,"InMemoryLayerAdapter: must have a view");try{const r=await t.whenLayerView(this.layer);if("queryHeatmapStatistics"in r&&!r.updating&&!e.filter)return await r.queryHeatmapStatistics({field:e.field,radius:e.radius})}catch{o(s)}const{featuresJSON:n,graphics:l}=await this._processStatsFromMemoryParams({...e,returnGeometry:!0}),u=new f({extent:t.extent,tolerance:"2d"===t.type?t.state.resolution:t.pixelSizeAt?.(t.center)}),p={field:r,radius:a,transform:m(u),spatialReference:t.spatialReference?.toJSON(),size:t.size};return n?.length||l?.length?n?this.workerClient.heatmapStatistics(p,n):F({attribute:p,features:l}):{min:null,max:null}}getField(e=""){return this.layer.getField(e)}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!0,supportsStatistics:!0}:null}getFieldDomain(e,t){return this.layer.getFieldDomain(e,t)}createQuery(){return this.layer.createQuery()}async summaryStatistics(e){const{field:t,valueExpression:a,sqlExpression:i,features:s,view:o}=e,n=t?this.getField(t):null,l=!!a,u="3d"===o?.type;if(!a&&i&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return l||s||u?this._summaryStatsFromMemory(e,n):this._summaryStatsFromClientQuery(e,n)}async uniqueValues(e){const{valueExpression:t,sqlExpression:a,features:i,view:s}=e,o=await J(e,this),n=!!t,l="3d"===s?.type;if(!t&&a&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return n||i||l?this._uvFromMemory(e,o):this._uvFromClientQuery(e,o)}async histogram(e){const{features:t,valueExpression:a,normalizationType:i,sqlExpression:s}=e,o=t||!!a;if(!a&&s&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return o||i?this._histogramFromMemory(e):this._histogramForField(e)}async classBreaks(e){return!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)}async queryFeatureCount(e){const{whereClause:t,view:a,signal:i}=e;if(!a)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=this.layer.createQuery();s.where=S(s.where,t);const o=await a.whenLayerView(this.layer);return await n(()=>!o.updating,i),o.queryFeatureCount(s,{signal:i})}async generateRenderer(e,t){throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation")}async predominantCategories(e){const{fields:t,view:r,signal:a,filter:i}=e,s=c(t),o=await this._uvFromMemory({valueExpression:s,view:r,signal:a,filter:i});return B(o.uniqueValueInfos,t)}async heatmapStatistics(e){return this._heatmapStatsFromMemory(e)}async getSampleFeatures(e,a){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,sqlWhere:l,filter:u,signal:m}=e,p=this.layer.createQuery(),y=1;if(p.outSpatialReference=i?.spatialReference,p.returnGeometry=!!n,p.outFields=o,p.where=S(p.where,l),I(p,u),!i)throw new r(`${this.adapterName}:not-supported`,"view is required to get sample features for Layer");const f=await i.whenLayerView(this.layer);if(b(this,o,f).length)throw new r(`${this.adapterName}:not-supported`,"Required fields need to be passed in the outFields for Layer");const c=await this._fetchFeaturesFromMemory(f,p,m,a),d=null!=s&&s>0&&s<=c.length?s:c.length;return t(c,d,y)}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression="stream"===t.type||!!t.capabilities?.query?.supportsSqlExpression,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent="fullExtent"in t?t.fullExtent:t.parent?.fullExtent,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.workerClient=q.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};e([l({readOnly:!0})],D.prototype,"adapterName",void 0),e([l({constructOnly:!0})],D.prototype,"layer",void 0),D=e([u("esri.smartMapping.support.adapters.InMemoryLayerAdapter")],D);export{D as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{c as e,p as r,r as n,e as t,a as o,b as a,d as l,l as s,f as u,s as c,g as f,h as p}from"../chunks/arcade.js";export{i as arcade}from"../chunks/arcade.js";import{ArcadeDate as m}from"../arcade/ArcadeDate.js";import{toSymbolId as d}from"../arcade/arcadeEnvironment.js";import y from"../arcade/Dictionary.js";import{Feature as v}from"../arcade/Feature.js";import{j as g,e as x,k as j,m as S,l as h}from"../chunks/languageUtils.js";import{Pixel as w}from"../arcade/Pixel.js";import{Voxel as A}from"../arcade/Voxel.js";import{clone as $}from"../core/lang.js";import{DateOnly as b}from"../core/sql/DateOnly.js";import{TimeOnly as E}from"../core/sql/TimeOnly.js";import F from"../geometry/Extent.js";import P from"../geometry/Multipoint.js";import C from"../geometry/Point.js";import M from"../geometry/Polygon.js";import _ from"../geometry/Polyline.js";import{isArray as D,isString as I,isBoolean as R,isNumber as T}from"./guards.js";const k={vars:{$feature:"any",$view:"any"}};function z(e){return e.replaceAll(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function J(e){return null==e?null:D(e)||g(e)?"array":x(e)?"date":I(e)?"text":R(e)?"boolean":T(e)?"number":e instanceof y?"dictionary":j(e)?"feature":e instanceof C?"point":e instanceof M?"polygon":e instanceof _?"polyline":e instanceof P?"multipoint":e instanceof F?"extent":e instanceof b?"dateOnly":e instanceof E?"time":S(e)?"featureSet":h(e)?"featureSetCollection":null}function O(e){if(!e)return null;try{return r(e)}catch(n){}return null}function V(r,n){const t="string"==typeof r?O(r):r;if(!t)return null;try{return n=n||$(k),e(t,n)}catch(o){}return null}function Z(e,r,n){return{vars:{$feature:null==e?new v:v.createFromGraphic(e,n),$view:r?.view},spatialReference:r?.sr,timeZone:n??null}}function q(e,r,n){return v.createFromGraphicLikeObject(r,e,n,null)}function G(e,r){null!=e.vars&&(e.vars.$feature=r)}function L(e,r){let n;try{n=a(e,r)}catch(t){n=null}return n}function N(e,r){let n;try{n=e?e(r):null}catch(t){n=null}return n}function U(e,r){try{return e?e(r):Promise.resolve(null)}catch(n){return Promise.resolve(null)}}const B=["$feature","$aggregatedFeatures","$voxel"].map(e=>d(e));function H(e,r){if(!e)return[];const n="string"==typeof e?O(e):e;if(!n)return[];const t=new Map;if(Array.isArray(r)||null==r)for(const a of B)t.set(a,r);else for(const[a,i]of r)t.set(d(a),i);const o=l(n).flatMap(({varId:e,memberNamePattern:r})=>{if(!t.has(e))return[];if(r.includes("*")){const n=t.get(e);if(null==n)return[];const o=new RegExp(`^${r.split(/\*+/).map(z).join(".*")}$`,"i");return n.filter(e=>o.test(e))}return r.toLowerCase()});return[...new Set(o.sort())]}function K(e){return n(e,"$view")}function Q(e,r){return!!e&&n(e,r)}function W(e){if(!e||null==e.spatialReference&&(null==e.scale||null==e.viewingMode))return;let r,n;const{timeProperties:t,timeZone:o}=e;if(null!=t){const{currentStart:e,currentEnd:a}=t;null!=o?(r=null!=e?m.dateJSAndZoneToArcadeDate(e,o):null,n=null!=a?m.dateJSAndZoneToArcadeDate(a,o):null):(r=null!=e?m.dateJSToArcadeDate(e):null,n=null!=a?m.dateJSToArcadeDate(a):null)}return{view:e.viewingMode&&null!=e.scale?new y({__proto__:null,viewingMode:e.viewingMode,scale:e.scale,timeProperties:null!=r||null!=n?new y({__proto__:null,currentStart:r,currentEnd:n,startIncluded:!0,endIncluded:!0}):null}):null,sr:e.spatialReference}}function X({url:e,spatialReference:r,lrucache:n,interceptor:t}){const o=u();return o?o.createFeatureSetCollectionFromService(e,r,n,t):null}function Y({layer:e,spatialReference:r,outFields:n,returnGeometry:t,lrucache:o,interceptor:a}){if(null===e)return null;const i=u();return i?i.constructFeatureSet(e,r,n,t??!0,o,a):null}function ee(e){if(null===e?.map)return null;const r=u();return r?r.createFeatureSetCollectionFromMap(e.map,e.spatialReference,e.lrucache,e.interceptor):null}function re(e,r){return y.convertJsonToArcade(e,r)}function ne(e,r,n=[]){return s(e,r,n)}function te(){return o()}function oe(){return t()}function ae(e){return"type"in e&&("class-breaks"===e.type||"dictionary"===e.type||"dot-density"===e.type||"pie-chart"===e.type||"simple"===e.type||"unique-value"===e.type)}function ie(e){return"esri.layers.support.LabelClass"===e.declaredClass}function le(e){return"esri.PopupTemplate"===e.declaredClass}function se(e,r){if(!e)return!1;if("string"==typeof e)return r(e);const n=e;if(ae(n)){if("dot-density"===n.type){const e=n.attributes?.some(e=>r(e.valueExpression));if(e)return e}const e=n.visualVariables,t=!!e&&e.some(e=>{let n=r(e.valueExpression);return"size"===e.type&&(de(e.minSize)&&(n=n||r(e.minSize.valueExpression)),de(e.maxSize)&&(n=n||r(e.maxSize.valueExpression))),n});return!(!("valueExpression"in n)||!r(n.valueExpression))||t}if(ie(n)){const e=n.labelExpressionInfo?.expression;return!(!e||!r(e))||!1}return!!le(n)&&(!!n.expressionInfos&&n.expressionInfos.some(e=>r(e.expression))||Array.isArray(n.content)&&n.content.some(e=>"expression"===e.type&&r(e.expressionInfo?.expression)))}function ue(e){const r=O(e);return!!r&&f(r)}function ce(e){return se(e,ue)}function fe(e){const r=O(e);return!!r&&p(r)}function pe(e){return se(e,fe)}function me(e){return se(e,e=>{const r=O(e);return!!r&&c(r)})}function de(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}export{y as Dictionary,w as Pixel,A as Voxel,v as arcadeFeature,Y as convertFeatureLayerToFeatureSet,re as convertJsonToArcade,ee as convertMapToFeatureSetCollection,X as convertServiceUrlToWorkspace,Z as createExecContext,q as createFeature,V as createFunction,O as createSyntaxTree,K as dependsOnView,oe as enableFeatureSetOperations,te as enableGeometryOperations,L as evalSyntaxTree,U as executeAsyncFunction,N as executeFunction,H as extractFieldNames,J as getArcadeType,W as getViewInfo,ce as hasGeometryFunctions,pe as hasGeometryOperations,Q as hasVariable,ne as loadScriptDependencies,me as requiresTrack,G as updateExecContext};
2
+ import{isPopupTemplate as e}from"../popupTemplateUtils.js";import{c as r,p as n,r as t,e as o,a,b as l,d as u,l as s,f as c,s as f,g as p,h as m}from"../chunks/arcade.js";export{i as arcade}from"../chunks/arcade.js";import{ArcadeDate as d}from"../arcade/ArcadeDate.js";import{toSymbolId as y}from"../arcade/arcadeEnvironment.js";import v from"../arcade/Dictionary.js";import{Feature as g}from"../arcade/Feature.js";import{j as x,e as j,k as S,m as h,l as w}from"../chunks/languageUtils.js";import{Pixel as b}from"../arcade/Pixel.js";import{Voxel as A}from"../arcade/Voxel.js";import{clone as $}from"../core/lang.js";import{DateOnly as E}from"../core/sql/DateOnly.js";import{TimeOnly as F}from"../core/sql/TimeOnly.js";import I from"../geometry/Extent.js";import P from"../geometry/Multipoint.js";import M from"../geometry/Point.js";import _ from"../geometry/Polygon.js";import D from"../geometry/Polyline.js";import{isLabelClass as R}from"../layers/support/labelUtils.js";import{isSizeVariable as T}from"../renderers/visualVariables/support/sizeVariableUtils.js";import{isArray as k,isString as z,isBoolean as J,isNumber as C}from"./guards.js";const O={vars:{$feature:"any",$view:"any"}};function U(e){return e.replaceAll(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function V(e){return null==e?null:k(e)||x(e)?"array":j(e)?"date":z(e)?"text":J(e)?"boolean":C(e)?"number":e instanceof v?"dictionary":S(e)?"feature":e instanceof M?"point":e instanceof _?"polygon":e instanceof D?"polyline":e instanceof P?"multipoint":e instanceof I?"extent":e instanceof E?"dateOnly":e instanceof F?"time":h(e)?"featureSet":w(e)?"featureSetCollection":null}function Z(e){if(!e)return null;try{return n(e)}catch(r){}return null}function q(e,n){const t="string"==typeof e?Z(e):e;if(!t)return null;try{return n=n||$(O),r(t,n)}catch(o){}return null}function G(e,r,n){return{vars:{$feature:null==e?new g:g.createFromGraphic(e,n),$view:r?.view},spatialReference:r?.sr,timeZone:n??null}}function L(e,r,n){return g.createFromGraphicLikeObject(r,e,n,null)}function N(e,r){null!=e.vars&&(e.vars.$feature=r)}function B(e,r){let n;try{n=l(e,r)}catch(t){n=null}return n}function H(e,r){let n;try{n=e?e(r):null}catch(t){n=null}return n}function K(e,r){try{return e?e(r):Promise.resolve(null)}catch(n){return Promise.resolve(null)}}const Q=["$feature","$aggregatedFeatures","$voxel"].map(e=>y(e));function W(e,r){if(!e)return[];const n="string"==typeof e?Z(e):e;if(!n)return[];const t=new Map;if(Array.isArray(r)||null==r)for(const i of Q)t.set(i,r);else for(const[i,a]of r)t.set(y(i),a);const o=u(n).flatMap(({varId:e,memberNamePattern:r})=>{if(!t.has(e))return[];if(r.includes("*")){const n=t.get(e);if(null==n)return[];const o=new RegExp(`^${r.split(/\*+/).map(U).join(".*")}$`,"i");return n.filter(e=>o.test(e))}return r.toLowerCase()});return[...new Set(o.sort())]}function X(e){return t(e,"$view")}function Y(e,r){return!!e&&t(e,r)}function ee(e){if(!e||null==e.spatialReference&&(null==e.scale||null==e.viewingMode))return;let r,n;const{timeProperties:t,timeZone:o}=e;if(null!=t){const{currentStart:e,currentEnd:i}=t;null!=o?(r=null!=e?d.dateJSAndZoneToArcadeDate(e,o):null,n=null!=i?d.dateJSAndZoneToArcadeDate(i,o):null):(r=null!=e?d.dateJSToArcadeDate(e):null,n=null!=i?d.dateJSToArcadeDate(i):null)}return{view:e.viewingMode&&null!=e.scale?new v({__proto__:null,viewingMode:e.viewingMode,scale:e.scale,timeProperties:null!=r||null!=n?new v({__proto__:null,currentStart:r,currentEnd:n,startIncluded:!0,endIncluded:!0}):null}):null,sr:e.spatialReference}}function re({url:e,spatialReference:r,lrucache:n,interceptor:t}){const o=c();return o?o.createFeatureSetCollectionFromService(e,r,n,t):null}function ne({layer:e,spatialReference:r,outFields:n,returnGeometry:t,lrucache:o,interceptor:i}){if(null===e)return null;const a=c();return a?a.constructFeatureSet(e,r,n,t??!0,o,i):null}function te(e){if(null===e?.map)return null;const r=c();return r?r.createFeatureSetCollectionFromMap(e.map,e.spatialReference,e.lrucache,e.interceptor):null}function oe(e,r){return v.convertJsonToArcade(e,r)}function ie(e,r,n=[]){return s(e,r,n)}function ae(){return a()}function le(){return o()}function ue(e){return"type"in e&&("class-breaks"===e.type||"dictionary"===e.type||"dot-density"===e.type||"pie-chart"===e.type||"simple"===e.type||"unique-value"===e.type)}function se(r,n){if(!r)return!1;if("string"==typeof r)return n(r);const t=r;if(ue(t)){if("dot-density"===t.type){const e=t.attributes?.some(e=>n(e.valueExpression));if(e)return e}const e=t.visualVariables,r=!!e&&e.some(e=>{let r=n(e.valueExpression);return"size"===e.type&&(T(e.minSize)&&(r=r||n(e.minSize.valueExpression)),T(e.maxSize)&&(r=r||n(e.maxSize.valueExpression))),r});return!(!("valueExpression"in t)||!n(t.valueExpression))||r}if(R(t)){const e=t.labelExpressionInfo?.expression;return!(!e||!n(e))||!1}return!!e(t)&&(!!t.expressionInfos&&t.expressionInfos.some(e=>n(e.expression))||Array.isArray(t.content)&&t.content.some(e=>"expression"===e.type&&n(e.expressionInfo?.expression)))}function ce(e){const r=Z(e);return!!r&&p(r)}function fe(e){return se(e,ce)}function pe(e){if("renderer"in e&&e.renderer&&fe(e.renderer))return!0;if("labelingInfo"in e&&e.labelingInfo)for(const r of e.labelingInfo)if(fe(r))return!0;return!1}function me(e){const r=Z(e);return!!r&&m(r)}function de(e){return se(e,me)}function ye(e){return se(e,e=>{const r=Z(e);return!!r&&f(r)})}export{v as Dictionary,b as Pixel,A as Voxel,g as arcadeFeature,ne as convertFeatureLayerToFeatureSet,oe as convertJsonToArcade,te as convertMapToFeatureSetCollection,re as convertServiceUrlToWorkspace,G as createExecContext,L as createFeature,q as createFunction,Z as createSyntaxTree,X as dependsOnView,le as enableFeatureSetOperations,ae as enableGeometryOperations,B as evalSyntaxTree,K as executeAsyncFunction,H as executeFunction,W as extractFieldNames,V as getArcadeType,ee as getViewInfo,fe as hasGeometryFunctions,de as hasGeometryOperations,Y as hasVariable,pe as layerHasGeometryFunctions,ie as loadScriptDependencies,ye as requiresTrack,N as updateExecContext};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const d="20260414",a="229dd7a8d17c77bd6876b25789379ab280734ca6";export{d as buildDate,a as commitHash};
2
+ const b="20260415",c="e4e8ab06cf7d673c0c5194d4b97bf8b34a172204";export{b as buildDate,c as commitHash};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{loadGeometryOperatorsForEffect as t}from"../../../../../../../symbols/cim/CIMEffects.js";import{EffectHelper as r}from"../../../../../../../symbols/cim/effects/EffectHelper.js";import{MeshWriterVertexPack as s}from"./MeshWriterVertexPack.js";class a{constructor(e,t,r,s){this._instanceId=e,this._evaluator=t,this._enabledOptionalAttributes=r,this._viewParams=s,this._evaluator.evaluator=e=>this.vertexSpec.createComputedParams(e)}get _vertexPack(){if(!this._cachedVertexPack){const e=s.fromVertexSpec(this.vertexSpec,this._enabledOptionalAttributes);this._evaluator.hasDynamicProperties||e.pack(this._evaluator.evaluatedMeshParams,this._viewParams),this._cachedVertexPack=e}return this._cachedVertexPack}get evaluatedMeshParams(){return this._evaluator.evaluatedMeshParams}get hasEffects(){return!!this.evaluatedMeshParams.effects}get effectInfos(){return this._evaluator.inputMeshParams.effects?.effectInfos}get instanceId(){return this._instanceId}get attributeLayout(){return this._vertexPack.attributeLayout}get _preventEffectClipping(){return!1}setReferences(e){this._references=e}getBoundsInfo(){return null}getTileInfo(){return this._viewParams.tileInfo}async loadDependencies(){for(const{effect:e}of this.effectInfos||[])await t(e)}enqueueRequest(e,t,r){this._evaluator.hasDynamicProperties&&this._evaluator.enqueueRequest(e,t,r)}write(e,t,r,s,a,i){this.ensurePacked(t,r,s);const n=this.evaluatedMeshParams.effects;if(!n||0===n.length)return void this._write(e,r,void 0,a,i);const c=this.getEffectCursor(e,r,n);if(!c)return;let o;for(;o=c.next();)o.invertY(),this._write(e,r,o,a,i)}ensurePacked(e,t,r){if(!this._evaluator.hasDynamicProperties)return;const s=this._evaluator.evaluateMeshParams(e,t,r);this._vertexPack.pack(s,this._viewParams)}hasArcadeDependency(e){return this._evaluator.hasArcadeDependency(e)}_writeVertex(e,t,r,s,a){const i=this.evaluatedMeshParams;this._vertexPack.writeVertex(e,t,r,s,i,a)}getEffectCursor(t,s,a){const i=s.readGeometryForDisplay()?.clone();if(!i)return;const n=e.fromOptimizedCIM(i,s.geometryType);n.invertY();const c=t.id||"";return r.executeEffects(a,n,c,this._preventEffectClipping)}}export{a as MeshWriter};
2
+ import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{loadGeometryOperatorsForEffect as t,loadGeometryOperatorsForPlacement as r}from"../../../../../../../symbols/cim/CIMEffects.js";import{EffectHelper as s}from"../../../../../../../symbols/cim/effects/EffectHelper.js";import{MeshWriterVertexPack as a}from"./MeshWriterVertexPack.js";class i{constructor(e,t,r,s){this._instanceId=e,this._evaluator=t,this._enabledOptionalAttributes=r,this._viewParams=s,this._evaluator.evaluator=e=>this.vertexSpec.createComputedParams(e)}get _vertexPack(){if(!this._cachedVertexPack){const e=a.fromVertexSpec(this.vertexSpec,this._enabledOptionalAttributes);this._evaluator.hasDynamicProperties||e.pack(this._evaluator.evaluatedMeshParams,this._viewParams),this._cachedVertexPack=e}return this._cachedVertexPack}get evaluatedMeshParams(){return this._evaluator.evaluatedMeshParams}get hasEffects(){return!!this.evaluatedMeshParams.effects}get effectInfos(){return this._evaluator.inputMeshParams.effects?.effectInfos}get placementInfo(){return this._evaluator.inputMeshParams.placement}get instanceId(){return this._instanceId}get attributeLayout(){return this._vertexPack.attributeLayout}get _preventEffectClipping(){return!1}setReferences(e){this._references=e}getBoundsInfo(){return null}getTileInfo(){return this._viewParams.tileInfo}async loadDependencies(){for(const{effect:e}of this.effectInfos||[])await t(e);this.placementInfo&&await r(this.placementInfo.placement)}enqueueRequest(e,t,r){this._evaluator.hasDynamicProperties&&this._evaluator.enqueueRequest(e,t,r)}write(e,t,r,s,a,i){this.ensurePacked(t,r,s);const n=this.evaluatedMeshParams.effects;if(!n||0===n.length)return void this._write(e,r,void 0,a,i);const c=this.getEffectCursor(e,r,n);if(!c)return;let o;for(;o=c.next();)o.invertY(),this._write(e,r,o,a,i)}ensurePacked(e,t,r){if(!this._evaluator.hasDynamicProperties)return;const s=this._evaluator.evaluateMeshParams(e,t,r);this._vertexPack.pack(s,this._viewParams)}hasArcadeDependency(e){return this._evaluator.hasArcadeDependency(e)}_writeVertex(e,t,r,s,a){const i=this.evaluatedMeshParams;this._vertexPack.writeVertex(e,t,r,s,i,a)}getEffectCursor(t,r,a){const i=r.readGeometryForDisplay()?.clone();if(!i)return;const n=e.fromOptimizedCIM(i,r.geometryType);n.invertY();const c=t.id||"";return s.executeEffects(a,n,c,this._preventEffectClipping)}}export{i as MeshWriter};