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

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 (439) 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/041c372e98a6fba90b36.js +1 -0
  8. package/assets/esri/core/workers/chunks/{a5a46d0a0831497cf1b4.js → 0783890816bac45277b9.js} +1 -1
  9. package/assets/esri/core/workers/chunks/07aac6245a0d1adbb2d4.js +1 -0
  10. package/assets/esri/core/workers/chunks/0839da55707f7c4cf780.js +1 -0
  11. package/assets/esri/core/workers/chunks/0ae360bf253adee46737.js +1 -0
  12. package/assets/esri/core/workers/chunks/0c00e5e4bd18467bcecd.js +1 -0
  13. package/assets/esri/core/workers/chunks/0dad0bca8d58b2c63d22.js +1 -0
  14. package/assets/esri/core/workers/chunks/0ef93722524620023f69.js +1 -0
  15. package/assets/esri/core/workers/chunks/127cd8fee3717a473fc5.js +1 -0
  16. package/assets/esri/core/workers/chunks/1286f41f245ef22b3a26.js +1 -0
  17. package/assets/esri/core/workers/chunks/12e575a6d2b008b8fc2b.js +1 -0
  18. package/assets/esri/core/workers/chunks/{c92352b0e39576ca317a.js → 13e60f19f436b8d683ae.js} +1 -1
  19. package/assets/esri/core/workers/chunks/161d60fdac2013c15543.js +1 -0
  20. package/assets/esri/core/workers/chunks/1661684357912726a72a.js +1 -0
  21. package/assets/esri/core/workers/chunks/168de44a789d1cecc1f8.js +1 -0
  22. package/assets/esri/core/workers/chunks/1961b59756933e0a82f2.js +1 -0
  23. package/assets/esri/core/workers/chunks/1d9d7915cf7449e5d468.js +1 -0
  24. package/assets/esri/core/workers/chunks/1f85646936200a399c15.js +1 -0
  25. package/assets/esri/core/workers/chunks/{deb8a0b306d7b9c86b97.js → 2171aaa147aa4d9fc5b5.js} +1 -1
  26. package/assets/esri/core/workers/chunks/235cb82952a18ff8d206.js +1 -0
  27. package/assets/esri/core/workers/chunks/260d4571722cb1ff1366.js +1 -0
  28. package/assets/esri/core/workers/chunks/{3e972ae291df1844017d.js → 266ba61b72a278d93a26.js} +1 -1
  29. package/assets/esri/core/workers/chunks/27b80c386cebadcaca3c.js +1 -0
  30. package/assets/esri/core/workers/chunks/29d3890a5a43d934067a.js +1 -0
  31. package/assets/esri/core/workers/chunks/{7e6ccf9f3e756186e93e.js → 29e76256e3e867e80520.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{333a0038d782d8a34d58.js → 2abf124e2956e4f76688.js} +1 -1
  33. package/assets/esri/core/workers/chunks/2f17438d215bea3ce70f.js +1 -0
  34. package/assets/esri/core/workers/chunks/{f6d5dd2eef0d9918096e.js → 30e710ec4d22c43d4e7e.js} +1 -1
  35. package/assets/esri/core/workers/chunks/30f04dc001eaf838d64c.js +1 -0
  36. package/assets/esri/core/workers/chunks/356cb86606b8c674f947.js +1 -0
  37. package/assets/esri/core/workers/chunks/398e0dd2bc7e1ab84831.js +1 -0
  38. package/assets/esri/core/workers/chunks/3b1052aa30af3f6186cc.js +1 -0
  39. package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +1 -0
  40. package/assets/esri/core/workers/chunks/3e87e3ad857d72f6ecbb.js +1 -0
  41. package/assets/esri/core/workers/chunks/{7cb6d8f7eaf762279632.js → 3ea5a18b264628dc37f0.js} +1 -1
  42. package/assets/esri/core/workers/chunks/41809c16544ec25120fa.js +1 -0
  43. package/assets/esri/core/workers/chunks/41913575dd45c65d645e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{628f56c09838eb9c573b.js → 422824e407b550170c8c.js} +1 -1
  45. package/assets/esri/core/workers/chunks/42e483fde18f12da32a6.js +1 -0
  46. package/assets/esri/core/workers/chunks/43ab44d37bc0ea97ef98.js +1 -0
  47. package/assets/esri/core/workers/chunks/46e622857ba92a72a317.js +1 -0
  48. package/assets/esri/core/workers/chunks/47f2113357b2aa4f4f37.js +1 -0
  49. package/assets/esri/core/workers/chunks/488ed9584b527ec47be3.js +1 -0
  50. package/assets/esri/core/workers/chunks/4ad32580e0c0699fde1f.js +1 -0
  51. package/assets/esri/core/workers/chunks/4d0f793dee4ad919221b.js +1 -0
  52. package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +1 -0
  53. package/assets/esri/core/workers/chunks/{916a8f3eed1fafdc7242.js → 54d07eadf113f0e4e506.js} +1 -1
  54. package/assets/esri/core/workers/chunks/54ed37ec9682ea739deb.js +1 -0
  55. package/assets/esri/core/workers/chunks/{9187d1caca1fd2d713e0.js → 55369c5bd65bcaf78da1.js} +1 -1
  56. package/assets/esri/core/workers/chunks/56fd3da911c2c4511e5d.js +1 -0
  57. package/assets/esri/core/workers/chunks/59592bb25f226865e88a.js +1 -0
  58. package/assets/esri/core/workers/chunks/{e77d958cb62536b8eebc.js → 5a4d7ba6dc1d4b41d80d.js} +1 -1
  59. package/assets/esri/core/workers/chunks/5c663d5f98bdfa29151b.js +1 -0
  60. package/assets/esri/core/workers/chunks/5d55b4449bcb24cd72b6.js +1 -0
  61. package/assets/esri/core/workers/chunks/5d8fe41a3c06ddb4094b.js +1 -0
  62. package/assets/esri/core/workers/chunks/{fe68c28d3c61f116ff23.js → 5ef37f37e405b3bb5450.js} +1 -1
  63. package/assets/esri/core/workers/chunks/608d707fd9d9f9088473.js +1 -0
  64. package/assets/esri/core/workers/chunks/{ae0a572cbbdd9815ee2e.js → 62b3e933f548ce354b99.js} +1 -1
  65. package/assets/esri/core/workers/chunks/656d6963e8f837fbf28f.js +1 -0
  66. package/assets/esri/core/workers/chunks/{a5afcd633b32e6ee31a7.js → 6a0352d20596ca3f4b64.js} +1 -1
  67. package/assets/esri/core/workers/chunks/6c7ff968bd4fc816442d.js +1 -0
  68. package/assets/esri/core/workers/chunks/6e526c06825ecc6c99c0.js +1 -0
  69. package/assets/esri/core/workers/chunks/6ea8b0d68881d16a2432.js +1 -0
  70. package/assets/esri/core/workers/chunks/7027d93dc5a4595d70c6.js +1 -0
  71. package/assets/esri/core/workers/chunks/70b35b2446558d5280e3.js +1 -0
  72. package/assets/esri/core/workers/chunks/7349cb45a93e6916f115.js +1 -0
  73. package/assets/esri/core/workers/chunks/751609831b283903ba48.js +1 -0
  74. package/assets/esri/core/workers/chunks/76edaeaf8fe344bb77a8.js +1 -0
  75. package/assets/esri/core/workers/chunks/76fe5b821d6b54db5721.js +1 -0
  76. package/assets/esri/core/workers/chunks/7951d93f5f15aa76f49c.js +1 -0
  77. package/assets/esri/core/workers/chunks/80ace1c7203c5059525d.js +1 -0
  78. package/assets/esri/core/workers/chunks/81d30c9062ad0120a863.js +1 -0
  79. package/assets/esri/core/workers/chunks/84772b023d04e415f17f.js +1 -0
  80. package/assets/esri/core/workers/chunks/{123e920e4460124ec3bb.js → 88b480a1d1fb01778798.js} +9 -30
  81. package/assets/esri/core/workers/chunks/88c5f7c712c6b89b5109.js +1 -0
  82. package/assets/esri/core/workers/chunks/88e469b82d2594f23649.js +1 -0
  83. package/assets/esri/core/workers/chunks/8a14e3db28c403b046cf.js +1 -0
  84. package/assets/esri/core/workers/chunks/8a664451845a47048859.js +1 -0
  85. package/assets/esri/core/workers/chunks/8a8242e7cc7e6a9e7876.js +1 -0
  86. package/assets/esri/core/workers/chunks/{4d51261d6131c07402cd.js → 8acee3fba488f202f82f.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{31071a43e2c03984d619.js → 8d75f6f27c1c17c33992.js} +1 -1
  88. package/assets/esri/core/workers/chunks/9444ed8ea117861ae89b.js +1 -0
  89. package/assets/esri/core/workers/chunks/95d82c619dcbec2e1050.js +1 -0
  90. package/assets/esri/core/workers/chunks/96bba4d93a32ad34a1c8.js +1 -0
  91. package/assets/esri/core/workers/chunks/9a38fd68b02b617c45d3.js +1 -0
  92. package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +1 -0
  93. package/assets/esri/core/workers/chunks/9eb4ae556950e1d0124d.js +2 -0
  94. package/assets/esri/core/workers/chunks/9f4b97204def91567e3c.js +1 -0
  95. package/assets/esri/core/workers/chunks/a37c28e3c4a2be9fd1d5.js +1 -0
  96. package/assets/esri/core/workers/chunks/{c06d021180418f2014de.js → a78bc340a794fd332667.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{1edd39c7c4acdc591d10.js → a809b811121099a87a98.js} +1 -1
  98. package/assets/esri/core/workers/chunks/a8d7f59927bdad564141.js +1 -0
  99. package/assets/esri/core/workers/chunks/{f89976ec97938bf86996.js → abc06d10c7ac8ba5b0e4.js} +1 -1
  100. package/assets/esri/core/workers/chunks/abdf146b35e179b5b245.js +1 -0
  101. package/assets/esri/core/workers/chunks/abe22ae8ee0dcc9efbb7.js +1 -0
  102. package/assets/esri/core/workers/chunks/{fef5dc19736f12dfa99a.js → af5db0372d526e592fcc.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{3b7cda16e656db450f11.js → afc0baf86ece710ef867.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{6ac5ec3ecbca8860338b.js → b54b7cc6b23a70fed700.js} +1 -1
  105. package/assets/esri/core/workers/chunks/b6cadb8a579241adcb86.js +1 -0
  106. package/assets/esri/core/workers/chunks/b702279c48f3009f6dd8.js +1 -0
  107. package/assets/esri/core/workers/chunks/b9848bdbaf3d9ac93d54.js +1 -0
  108. package/assets/esri/core/workers/chunks/be1d6a571f76933dfbb0.js +1 -0
  109. package/assets/esri/core/workers/chunks/{eb3cdc4ff45243fc3cc5.js → bef27a25fbc4a6e19ec0.js} +1 -1
  110. package/assets/esri/core/workers/chunks/bfcdc5c315131aae34d8.js +1 -0
  111. package/assets/esri/core/workers/chunks/c0f624a2ca0d07ef8f8c.js +1 -0
  112. package/assets/esri/core/workers/chunks/c3381b9a36299210ee47.js +1 -0
  113. package/assets/esri/core/workers/chunks/{c2882a9e67124b7c18be.js → c503c79ba5761f7abbeb.js} +1 -1
  114. package/assets/esri/core/workers/chunks/{a65d576e90179a2b5400.js → c5507480344176fad241.js} +1 -1
  115. package/assets/esri/core/workers/chunks/c70df6ed190f9ebcf6aa.js +1 -0
  116. package/assets/esri/core/workers/chunks/cb5e4b9b4a59c2622eb5.js +1 -0
  117. package/assets/esri/core/workers/chunks/cd7159600ce132e32d04.js +1 -0
  118. package/assets/esri/core/workers/chunks/cfe246adb5e6cb6f0cfc.js +1 -0
  119. package/assets/esri/core/workers/chunks/d17fcfc502f0e0fa6523.js +596 -0
  120. package/assets/esri/core/workers/chunks/d201a5dff18a5bb467ab.js +1 -0
  121. package/assets/esri/core/workers/chunks/d65b1234867f7d773d50.js +2 -0
  122. package/assets/esri/core/workers/chunks/{4d8670f6fa8952b7bab6.js → d950d5c2844206502ff0.js} +1 -1
  123. package/assets/esri/core/workers/chunks/db3c484bfa607dec6050.js +1 -0
  124. package/assets/esri/core/workers/chunks/db588bf3256e95c977b7.js +1 -0
  125. package/assets/esri/core/workers/chunks/{967758a05170545cd371.js → dcc719e15b2e0cce1f3b.js} +1 -1
  126. package/assets/esri/core/workers/chunks/{6bb090f3e5c18604cb39.js → dd5b362bded458afa2d6.js} +1 -1
  127. package/assets/esri/core/workers/chunks/dfdd474fddcd1d6091ce.js +1 -0
  128. package/assets/esri/core/workers/chunks/{aa1a3a849aba84cf585b.js → e1bc9ad767e08dc18bbc.js} +1 -1
  129. package/assets/esri/core/workers/chunks/e235ea4293d5d463acfb.js +1 -0
  130. package/assets/esri/core/workers/chunks/e25a684eb9f025bdcc01.js +1 -0
  131. package/assets/esri/core/workers/chunks/e272411e2c9378aa8496.js +1312 -0
  132. package/assets/esri/core/workers/chunks/e43486113aaf72ac4dc1.js +1 -0
  133. package/assets/esri/core/workers/chunks/ea4c3393c5757e309a71.js +1 -0
  134. package/assets/esri/core/workers/chunks/ed216ddeb7f59f510bd0.js +1 -0
  135. package/assets/esri/core/workers/chunks/ef8886dff54063928bcb.js +1 -0
  136. package/assets/esri/core/workers/chunks/{231f502cd15f30d12be2.js → f1673e723b336204ad77.js} +1 -1
  137. package/assets/esri/core/workers/chunks/{d69110ec4078c583a05e.js → f207b3be0714cc50030a.js} +1 -1
  138. package/assets/esri/core/workers/chunks/f5223ffb3be548c9b0a1.js +1 -0
  139. package/assets/esri/core/workers/chunks/f53805c7a84203305b2c.js +1 -0
  140. package/assets/esri/core/workers/chunks/f5c57ff48ca505ed701d.js +1 -0
  141. package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +1 -0
  142. package/chunks/CheckerBoard.glsl.js +3 -5
  143. package/chunks/ColorMaterial.glsl.js +4 -6
  144. package/chunks/ComponentShader.glsl.js +42 -44
  145. package/chunks/DefaultMaterial.glsl.js +21 -23
  146. package/chunks/EdgeShader.glsl.js +9 -11
  147. package/chunks/GaussianSplat.glsl.js +8 -8
  148. package/chunks/GlobalIllumination.glsl.js +186 -116
  149. package/chunks/GlobalIlluminationBlur.glsl.js +81 -61
  150. package/chunks/GlobalIlluminationUpscale.glsl.js +66 -0
  151. package/chunks/ImageMaterial.glsl.js +5 -7
  152. package/chunks/LineCallout.glsl.js +9 -12
  153. package/chunks/LineMarker.glsl.js +24 -26
  154. package/chunks/Path.glsl.js +15 -17
  155. package/chunks/Pattern.glsl.js +25 -27
  156. package/chunks/RealisticTree.glsl.js +11 -13
  157. package/chunks/RibbonLine.glsl.js +42 -45
  158. package/chunks/ShadedColorMaterial.glsl.js +8 -9
  159. package/chunks/Water.glsl.js +18 -20
  160. package/config.js +1 -1
  161. package/form/elements/FieldElement.d.ts +3 -2
  162. package/form/elements/inputs/Input.d.ts +1 -1
  163. package/form/elements/inputs/MultipleChoiceInput.d.ts +65 -0
  164. package/form/elements/inputs/MultipleChoiceInput.js +2 -0
  165. package/form/elements/inputs/inputUtils.js +1 -1
  166. package/form/elements/inputs/multipleChoice/Choice.d.ts +30 -0
  167. package/form/elements/inputs/multipleChoice/Choice.js +2 -0
  168. package/form/elements/inputs/multipleChoice/OtherChoice.d.ts +28 -0
  169. package/form/elements/inputs/multipleChoice/OtherChoice.js +2 -0
  170. package/form/elements/inputs.d.ts +11 -2
  171. package/form/elements/inputs.js +1 -1
  172. package/form/support/formUtils.js +1 -1
  173. package/interfaces.d.ts +28 -0
  174. package/kernel.js +1 -1
  175. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  176. package/layers/VoxelWasmPerSceneView.js +1 -1
  177. package/layers/graphics/FlatFeature.js +1 -1
  178. package/layers/graphics/FlatFeatureSet.js +1 -1
  179. package/layers/graphics/OptimizedFeature.js +1 -1
  180. package/layers/graphics/data/AttributesBuilder.js +1 -1
  181. package/layers/graphics/data/QueryEngineResult.js +1 -1
  182. package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +1 -1
  183. package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
  184. package/layers/graphics/featureConversionUtils.js +1 -1
  185. package/layers/support/LabelClass.js +1 -1
  186. package/layers/support/featureLayerUtils.js +1 -1
  187. package/layers/support/labelUtils.js +1 -1
  188. package/layers/video/videoUtils.js +1 -1
  189. package/package.json +2 -2
  190. package/popupTemplateUtils.js +2 -0
  191. package/renderers/visualVariables/SizeVariable.js +1 -1
  192. package/renderers/visualVariables/support/sizeVariableUtils.js +1 -1
  193. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  194. package/rest/support/OutDistance.js +2 -0
  195. package/rest/support/Query.js +1 -1
  196. package/smartMapping/statistics/support/utils.js +1 -1
  197. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  198. package/support/arcadeUtils.js +1 -1
  199. package/support/revision.js +1 -1
  200. package/third-party-notices.txt +7 -29
  201. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  202. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  203. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  204. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  205. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  206. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  207. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  208. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  209. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  210. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  211. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  212. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  213. package/views/3d/environment/EnvironmentManager.js +1 -1
  214. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  215. package/views/3d/layers/I3SMeshView3D.js +1 -1
  216. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  217. package/views/3d/layers/IntegratedMeshNormals.js +1 -1
  218. package/views/3d/layers/StreamLayerView3D.js +1 -1
  219. package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
  220. package/views/3d/state/ViewStateManager.js +1 -1
  221. package/views/3d/support/orientedBoundingBox.js +1 -1
  222. package/views/3d/terrain/OverlayRenderer.js +1 -1
  223. package/views/3d/terrain/TerrainRenderer.js +1 -1
  224. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  225. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
  226. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  227. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  228. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  229. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +20 -32
  230. package/views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js +21 -0
  231. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadGlobalIllumination.glsl.js +11 -7
  232. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +5 -3
  233. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  234. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  235. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  236. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +2 -0
  237. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  238. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +2 -0
  239. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +1 -1
  240. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +1 -1
  241. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +2 -0
  242. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscaleTechnique.js +2 -0
  243. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  244. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  245. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  246. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  247. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  248. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  249. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  250. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  251. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  252. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  253. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
  254. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  255. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  256. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  257. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  258. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  259. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  260. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  261. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  262. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  263. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  264. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  265. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  266. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  267. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  268. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  269. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  270. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  271. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  272. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  273. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  274. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  275. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  276. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  277. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  278. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  279. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  280. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  281. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  282. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  283. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  284. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  285. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  286. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  287. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  288. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  289. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  290. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  291. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  292. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  293. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  294. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  295. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  296. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
  297. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
  298. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  299. package/views/VideoView.js +1 -1
  300. package/views/interactive/sketch/SketchOptions.d.ts +3 -1
  301. package/views/interactive/sketch/SketchTooltipOptions.d.ts +6 -0
  302. package/views/layers/FeatureLikeLayerView.js +1 -1
  303. package/views/support/Scheduler.js +1 -1
  304. package/views/video/VideoOperationalDataView.js +1 -1
  305. package/views/webgl/ShaderBuilder.js +1 -1
  306. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  307. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  308. package/widgets/BatchAttributeForm/inputs/SingleFeatureInputAdapter.js +2 -0
  309. package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +28 -4
  310. package/widgets/BatchAttributeForm/inputs/TextElementInput.js +1 -1
  311. package/widgets/BatchAttributeForm/templates/AttachmentElementTemplate.js +2 -0
  312. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  313. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  314. package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
  315. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +19 -3
  316. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  317. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  318. package/widgets/FeatureTable/VisibleElements.d.ts +15 -1
  319. package/widgets/FeatureTable/VisibleElements.js +1 -1
  320. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  321. package/widgets/FeatureTable.d.ts +15 -1
  322. package/widgets/FeatureTable.js +1 -1
  323. package/widgets/Search/SearchViewModel.js +1 -1
  324. package/widgets/Search/support/layerSearchUtils.js +1 -1
  325. package/widgets/support/widgetUtils.js +1 -1
  326. package/assets/esri/core/workers/chunks/09ecb36e44096e577af8.js +0 -1
  327. package/assets/esri/core/workers/chunks/0ca06ea649bbdb93ff49.js +0 -1
  328. package/assets/esri/core/workers/chunks/10308c9f3f0d709d96bc.js +0 -1
  329. package/assets/esri/core/workers/chunks/141edf5ed890105a079b.js +0 -1
  330. package/assets/esri/core/workers/chunks/160b9a76b75875507c86.js +0 -1
  331. package/assets/esri/core/workers/chunks/16dfdee05704df249e95.js +0 -1
  332. package/assets/esri/core/workers/chunks/17ef955dc48e329aa184.js +0 -1
  333. package/assets/esri/core/workers/chunks/18001536ed345955121a.js +0 -1
  334. package/assets/esri/core/workers/chunks/20e715e3aeb1c3265901.js +0 -1
  335. package/assets/esri/core/workers/chunks/238f51d0b36f998017b8.js +0 -1
  336. package/assets/esri/core/workers/chunks/2cee6d751c5e73fe09d4.js +0 -1
  337. package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +0 -1
  338. package/assets/esri/core/workers/chunks/3158a3487d3e8a61b680.js +0 -1
  339. package/assets/esri/core/workers/chunks/3b1446286a9b87f34761.js +0 -1
  340. package/assets/esri/core/workers/chunks/3f7fd58ee7d71989fc83.js +0 -1
  341. package/assets/esri/core/workers/chunks/41396724040180d2537f.js +0 -1
  342. package/assets/esri/core/workers/chunks/416e031bafc0189544fa.js +0 -1
  343. package/assets/esri/core/workers/chunks/55ee78923987ed17ea8c.js +0 -1
  344. package/assets/esri/core/workers/chunks/56c7d7c7217557375fb6.js +0 -1
  345. package/assets/esri/core/workers/chunks/58b3c888c8bfedbe6443.js +0 -1
  346. package/assets/esri/core/workers/chunks/5a1d975b3e9e6b7eff67.js +0 -1
  347. package/assets/esri/core/workers/chunks/5f6942ac94acd7842926.js +0 -1
  348. package/assets/esri/core/workers/chunks/6118706b9a038e9a06b8.js +0 -1
  349. package/assets/esri/core/workers/chunks/6d15229b3fa84a7acf4d.js +0 -599
  350. package/assets/esri/core/workers/chunks/7314c0131403cac84ad7.js +0 -1
  351. package/assets/esri/core/workers/chunks/73545bb13c70f6a347a4.js +0 -1
  352. package/assets/esri/core/workers/chunks/73a045061e69a22b6869.js +0 -1
  353. package/assets/esri/core/workers/chunks/75669912cddcb5db52c8.js +0 -1
  354. package/assets/esri/core/workers/chunks/7ca32806e47be15109a4.js +0 -1
  355. package/assets/esri/core/workers/chunks/7d6ed65bbcd279448191.js +0 -1
  356. package/assets/esri/core/workers/chunks/81f149e45c79b9b086fb.js +0 -1
  357. package/assets/esri/core/workers/chunks/84fa25f66a6949290221.js +0 -1
  358. package/assets/esri/core/workers/chunks/852aabbf671d2ca9cd33.js +0 -1
  359. package/assets/esri/core/workers/chunks/854fe80272b59fafc2e9.js +0 -1
  360. package/assets/esri/core/workers/chunks/85edbb072a2ce6c1bb30.js +0 -2
  361. package/assets/esri/core/workers/chunks/861817be5e050e9522ab.js +0 -1
  362. package/assets/esri/core/workers/chunks/89345a682dea60ef1643.js +0 -1
  363. package/assets/esri/core/workers/chunks/8985402c328b90af5724.js +0 -1
  364. package/assets/esri/core/workers/chunks/89fdf9ad10ca8fbb08a5.js +0 -1
  365. package/assets/esri/core/workers/chunks/8b094330323d9b16fb5d.js +0 -1
  366. package/assets/esri/core/workers/chunks/90aed8c4b266832f84ca.js +0 -1
  367. package/assets/esri/core/workers/chunks/943cf0653a2b7de16a4f.js +0 -1
  368. package/assets/esri/core/workers/chunks/9776c2db337222ceceef.js +0 -1
  369. package/assets/esri/core/workers/chunks/990853e9df38fdfc58b5.js +0 -1
  370. package/assets/esri/core/workers/chunks/9a21ba0c45a96b94c05e.js +0 -1
  371. package/assets/esri/core/workers/chunks/9a235c92f21df2c17aa8.js +0 -1
  372. package/assets/esri/core/workers/chunks/9b56162ac67c992193ce.js +0 -1
  373. package/assets/esri/core/workers/chunks/9f1f5fb648302c43ad12.js +0 -1
  374. package/assets/esri/core/workers/chunks/a1e6187c239fdc7553ed.js +0 -1
  375. package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +0 -1
  376. package/assets/esri/core/workers/chunks/a760be8fa6c6ea6b745c.js +0 -1
  377. package/assets/esri/core/workers/chunks/a8782286ce3c0d6c20e6.js +0 -1
  378. package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +0 -1
  379. package/assets/esri/core/workers/chunks/a994a3c912a33b2f4100.js +0 -1
  380. package/assets/esri/core/workers/chunks/aa7aaeae31ddb259e55e.js +0 -1
  381. package/assets/esri/core/workers/chunks/abcc5fb71be2bd94878c.js +0 -1
  382. package/assets/esri/core/workers/chunks/aecb05df4ad1454f5435.js +0 -1
  383. package/assets/esri/core/workers/chunks/aecb105db7cec2c9c4c5.js +0 -1
  384. package/assets/esri/core/workers/chunks/b19f33e026a2a43b17c4.js +0 -1
  385. package/assets/esri/core/workers/chunks/b3950d5f1f3352521504.js +0 -1
  386. package/assets/esri/core/workers/chunks/b3f0600729227b458a75.js +0 -1
  387. package/assets/esri/core/workers/chunks/b5922991d2f450e6a9d9.js +0 -1
  388. package/assets/esri/core/workers/chunks/b8643976a7f984552d94.js +0 -1
  389. package/assets/esri/core/workers/chunks/b8a11d32a4847513619b.js +0 -1
  390. package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +0 -1
  391. package/assets/esri/core/workers/chunks/ba4259aa050169c1d523.js +0 -1
  392. package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +0 -1
  393. package/assets/esri/core/workers/chunks/bcefdf9753d9d2f6f1be.js +0 -1
  394. package/assets/esri/core/workers/chunks/c178e2cfc34603661b1d.js +0 -1
  395. package/assets/esri/core/workers/chunks/c3e80c0e29ac6a7a6f80.js +0 -1
  396. package/assets/esri/core/workers/chunks/c79827f879d1d58d3f1b.js +0 -1
  397. package/assets/esri/core/workers/chunks/c92b40a532e708e506cc.js +0 -1
  398. package/assets/esri/core/workers/chunks/cb903ccbce87172a0757.js +0 -1
  399. package/assets/esri/core/workers/chunks/cda2e445eb2ac269abdf.js +0 -1
  400. package/assets/esri/core/workers/chunks/ce44e172e2847fd8df14.js +0 -1
  401. package/assets/esri/core/workers/chunks/cff7e921649aef715c78.js +0 -1
  402. package/assets/esri/core/workers/chunks/d0c3ab70f390cd579fed.js +0 -1
  403. package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +0 -1
  404. package/assets/esri/core/workers/chunks/d4a9eb4470cc6a1f67fc.js +0 -2
  405. package/assets/esri/core/workers/chunks/d8c0d18f0132872decd3.js +0 -1
  406. package/assets/esri/core/workers/chunks/db0061a6d5bf454cc509.js +0 -1
  407. package/assets/esri/core/workers/chunks/dca595fdd5e1a571e441.js +0 -1
  408. package/assets/esri/core/workers/chunks/dcfafcf4386f2940d000.js +0 -1
  409. package/assets/esri/core/workers/chunks/df8143b72ef94806c992.js +0 -1
  410. package/assets/esri/core/workers/chunks/e2b034c391c603f7f825.js +0 -1
  411. package/assets/esri/core/workers/chunks/e3a73d9acebccd3ba49b.js +0 -1
  412. package/assets/esri/core/workers/chunks/e67bdd8bf38ebe89a344.js +0 -1
  413. package/assets/esri/core/workers/chunks/e797d45eba0884dc7e6f.js +0 -1
  414. package/assets/esri/core/workers/chunks/e81a3da05fcff97b4752.js +0 -1
  415. package/assets/esri/core/workers/chunks/e957d52cb9643961a843.js +0 -1127
  416. package/assets/esri/core/workers/chunks/e9dd60d0220036545ebb.js +0 -1
  417. package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +0 -1
  418. package/assets/esri/core/workers/chunks/eb9982bc866976fef960.js +0 -1
  419. package/assets/esri/core/workers/chunks/ec4669a0edeca94710e0.js +0 -1
  420. package/assets/esri/core/workers/chunks/ef013a77950c1902de11.js +0 -1
  421. package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +0 -1
  422. package/assets/esri/core/workers/chunks/f09446b9ff937a84d6d3.js +0 -1
  423. package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +0 -1
  424. package/assets/esri/core/workers/chunks/f653970d983f17fb764b.js +0 -1
  425. package/assets/esri/core/workers/chunks/f9edc685099f51363f41.js +0 -1
  426. package/assets/esri/core/workers/chunks/fa687ba2d66fcc2501da.js +0 -1
  427. package/assets/esri/core/workers/chunks/fb9a889ec9fd23739a14.js +0 -1
  428. package/assets/esri/core/workers/chunks/fe1b67ab7748a3aef231.js +0 -1
  429. package/chunks/HUDCompositing.glsl.js +0 -2
  430. package/views/3d/webgl-engine/core/shaderLibrary/shading/EncodingColor.glsl.js +0 -7
  431. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +0 -5
  432. package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +0 -8
  433. package/views/3d/webgl-engine/effects/fboFormatUtils.js +0 -2
  434. package/views/3d/webgl-engine/shaders/GlobalIllumination.glsl.js +0 -2
  435. package/views/3d/webgl-engine/shaders/GlobalIlluminationBlur.glsl.js +0 -2
  436. package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +0 -2
  437. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +0 -2
  438. /package/assets/esri/core/workers/chunks/{85edbb072a2ce6c1bb30.js.LICENSE.txt → 9eb4ae556950e1d0124d.js.LICENSE.txt} +0 -0
  439. /package/assets/esri/core/workers/chunks/{d4a9eb4470cc6a1f67fc.js.LICENSE.txt → d65b1234867f7d773d50.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../AggregateGraphic.js";import r from"../../../Graphic.js";import i from"../../../TrackGraphic.js";import{isSome as s}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{makeHandle as n,handlesGroup as l}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import u from"../../../core/Logger.js";import{destroyMaybe as h}from"../../../core/maybe.js";import{notDeepEqual as c}from"../../../core/object.js";import{createAbortError as p,ignoreAbortErrors as d,throwIfNotAbortError as y,isAbortError as g}from"../../../core/promiseUtils.js";import{watch as f,initial as m,sync as w}from"../../../core/reactiveUtils.js";import{sqlAnd as v}from"../../../core/sql.js";import{getMetersPerUnitForSR as _}from"../../../core/units.js";import{property as b,subclass as S}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as A}from"../../../core/support/UpdatingHandles.js";import F from"../../../geometry/Extent.js";import x from"../../../geometry/support/rotate.js";import{isCurvedGeometry as j}from"../../../geometry/support/curves/curveUtils.js";import{densifyCurvedGeometry as U}from"../../../geometry/support/curves/densifyCurvedGeometry.js";import E from"../../../layers/effects/FeatureEffectView.js";import{convertFromFeature as I}from"../../../layers/graphics/featureConversionUtils.js";import k from"../../../layers/support/FeatureFilter.js";import{checkServiceCurrentUserSupport as C}from"../../../layers/support/featureLayerUtils.js";import{packFields as R}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as q}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as O}from"../../../layers/support/timeSupport.js";import V from"../../../rest/support/AggregateFeatureSet.js";import Q from"../../../rest/support/AttributeBinsFeatureSet.js";import L from"../../../rest/support/AttributeBinsQuery.js";import M from"../../../rest/support/FeatureSet.js";import T from"../../../rest/support/Query.js";import{LayerView2D as P}from"./LayerView2D.js";import{FeatureContainer as H}from"./features/FeatureContainer.js";import{createFeaturePipelineWorkerProxy as W}from"./features/FeaturePipelineWorkerProxy.js";import{FeatureSourceEventLog as D}from"./features/FeatureSourceEventLog.js";import{CatalogFootprintLayerAdapter as G}from"./features/layerAdapters/CatalogFootprintLayerAdapter.js";import{FeatureLayerAdapter as N}from"./features/layerAdapters/FeatureLayerAdapter.js";import{createFeatureIdInfo as J}from"./features/layerAdapters/featureServiceUtils.js";import{InMemoryLayerAdapter as $}from"./features/layerAdapters/InMemoryLayerAdapter.js";import{KnowledgeGraphSublayerAdapter as B}from"./features/layerAdapters/KnowledgeGraphSublayerAdapter.js";import{OGCFeatureLayerAdapter as z}from"./features/layerAdapters/OGCFeatureLayerAdapter.js";import{OrientedImageryLayerAdapter as Z}from"./features/layerAdapters/OrientedImageryLayerAdapter.js";import{ParquetLayerAdapter as K}from"./features/layerAdapters/ParquetLayerAdapter.js";import{StreamLayerAdapter as X}from"./features/layerAdapters/StreamLayerAdapter.js";import{SubtypeGroupLayerAdapter as Y}from"./features/layerAdapters/SubtypeGroupLayerAdapter.js";import{createComplexSymbolInstances as ee}from"./features/schema/processor/symbols/ComplexSymbolSchema.js";import{DebouncedFeatureOverride as te}from"./support/DebouncedFeatureOverride.js";import{FeatureCommandQueue as re}from"./support/FeatureCommandQueue.js";import{handleNoEngineError as ie}from"./support/handleNoEngineError.js";import{toJSONGeometryType as se}from"./support/util.js";import{FeatureTileSubscriptionManager as ae}from"../tiling/FeatureTileSubscriptionManager.js";import{RefreshableLayerView as oe}from"../../layers/RefreshableLayerView.js";import{getHighlightName as ne}from"../../support/highlightOptionsUtils.js";function le(e,t){const r=new Set;return e&&e.forEach(e=>r.add(e)),t&&t.forEach(e=>r.add(e)),r.has("*")?["*"]:Array.from(r)}const ue=4294967294;function he(e,t){return l(e.map(e=>f(()=>{const t=e();return t&&"object"==typeof t?"getTime"in t&&"function"==typeof t.getTime?t.getTime():JSON.stringify(t):t},t,w)))}function ce(e){if(!e.geometry)return e;if(!j(e.geometry))return e;const t=.001/_(e.geometry.spatialReference),r=100;return{geometry:U(e.geometry,{maxSegmentsPerCurve:12e3,maxSegmentLength:r*t,maxDeviation:0}),attributes:e.attributes}}const pe=l=>{const w=oe(P(l));let _=class extends w{constructor(){super(...arguments),this._commandsQueue=new re({process:e=>{switch(e.type){case"override-batch":return this._doOverride(e);case"update":return this._doUpdate();case"highlight":return this._updateHighlights()}}}),this._visibilityOverrides=new Set,this._lastAvailableFields=[],this._lastTargetState=null,this.eventLog=new D,this._sourceRefreshVersion=1,this._displayRefreshVersion=1,this._pipelineUpdating=!1,this._editUpdatingHandles=new A,this._fields=null,this._sourceUpdating=!1,this.featureEffectView=new E,this._lastUpdate=0,this._lastRequiredLevel=0}destroy(){this._editUpdatingHandles.destroy(),this._workerProxy?.destroy(),this._workerAttached.reject(p()),this._commandsQueue.destroy()}initialize(){this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this.addResolvingPromise(this._initProxy()),this.featureEffectView.featureEffect=this.featureEffect,this.featureEffectView.endTransition()}async _initProxy(){const e=this.layer;if("isTable"in e&&e.isTable)throw new o("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e});if(("feature"===e.type||"subtype-group"===e.type)&&!1===q(e)?.operations.supportsQuery)throw new o("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e});this._workerProxy&&this._workerProxy.destroy();const t=this._createClientOptions();this._workerProxy=await W(t)}async _attachProxy(){const e=x(this.view.extent,this.view.rotation,this.view.center),t=this.view.featuresTilingScheme.getClosestInfoForScale(this.view.scale).level;t!==this._lastRequiredLevel&&(this._lastRequiredLevel=t);const r={tileInfoJSON:this.view?.featuresTilingScheme?.tileInfo?.toJSON(),initialViewExtent:e.toJSON(),requiredLevel:t,requiredScale:this.view.scale};try{await this._workerProxy.pipeline.onAttach(r),this._workerAttached.resolve()}catch(i){this._workerAttached.reject(p()),y(i)}}async _detachProxy(){return this._workerProxy.pipeline.onDetach()}async getWorker(){return await this._workerAttached.promise,this._workerProxy}get dataUpdating(){return this._sourceUpdating||this._editUpdatingHandles.updating}get hasAllFeatures(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryAllFeatures}get hasAllFeaturesInView(){const e=this.effectiveDisplayFilter?.where||null,t=!this.eventLog.willQueryAllFeatures&&null!=e&&"1=1"!==e;return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&!t}get hasFullGeometries(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryFullResolutionGeometry}get labelingCollisionInfos(){const e=this.layerAdapter.getLabelingDeconflictionInfo(this.view),t=this.layer.geometryType,r=!this.suspended;return e.map(({vvEvaluators:e,deconflictionEnabled:i,labelingInfo:s})=>({labelingInfo:s,container:this.featureContainer,vvEvaluators:e,deconflictionEnabled:i,geometryType:t,visible:r}))}get layerAdapter(){switch(this.layer.type){case"feature":return"memory"===this.layer.source.type?new $(this.layer):new N(this.layer);case"geojson":case"csv":case"wfs":return new $(this.layer);case"parquet":return new K(this.layer);case"subtype-group":return new Y(this.layer);case"ogc-feature":return new z(this.layer);case"stream":return new X(this.layer);case"oriented-imagery":return new Z(this.layer);case"knowledge-graph-sublayer":return new B(this.layer);case"catalog-footprint":return new G(this.layer);default:this.layer}return null}get timeExtent(){return O(this.layerAdapter.timeOptions,this.view?.timeExtent,this._get("timeExtent"))}get usedMemory(){return this.container.usedMemory+this.eventLog.pipelineStatistics.usedMemory}getDisplayStatistics(e,t){return this.featureContainer?.getDisplayStatistics(e,t)}highlight(e,t){let i;e instanceof r?i=[e.getObjectId()]:"number"==typeof e||"string"==typeof e?i=[e]:a.isCollection(e)&&e.length>0?i=e.map(e=>e?.getObjectId()).toArray():Array.isArray(e)&&e.length>0&&(i="number"==typeof e[0]||"string"==typeof e[0]?e:e.map(e=>e?.getObjectId()));const o=i?.filter(s);if(!o?.length)return n();const l=ne(t);return this._addHighlights(o,l),n(()=>!this.destroyed&&this._removeHighlights(o,l))}async hitTest(e,s){const a=await this.featureContainer.hitTest(s);if(0===a.length)return null;const o=await this.getWorker(),{features:n,aggregates:l,tracks:u}=await o.pipeline.getDisplayFeatures(a),h=this.featureContainer.getSortKeys(a),c=({displayId:e},{displayId:t})=>h.has(e)&&h.has(t)?h.get(e)-h.get(t):e-t;n.sort(c).reverse(),l.sort(c).reverse();const p=has("parquetlayer-hittest-max-feature-count")??1;return"parquet"===this.layer.type&&n.length>p&&(n.length=p),[...l.map(r=>this._createAggregateGraphicHit(e,t.fromJSON(r))),...u.map(t=>this._createTrackGraphicHit(e,i.fromJSON(t))),...n.map(t=>this._createFeatureGraphicHit(e,r.fromJSON(t)))]}async queryAggregateSummaryStatistics(e,t,r){const i={...t,scale:this.view.scale},s=(await this.getWorker()).aggregates.executeQueryForSummaryStatistics(this._cleanUpAggregateQuery(e),i,r);return ie(s,{})}async queryUniqueValues(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForUniqueValues(this._cleanUpQuery(e),s,r);return ie(a,{uniqueValueInfos:[]})}async queryAggregateUniqueValues(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForUniqueValues(this._cleanUpAggregateQuery(e),s,r);return ie(a,{uniqueValueInfos:[]})}async queryAggregateClassBreaks(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForClassBreaks(this._cleanUpAggregateQuery(e),s,r);return ie(a,{classBreakInfos:[]})}async queryHistogram(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForHistogram(this._cleanUpQuery(e),s,r);return ie(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateCount(e,t){const r=(await this.getWorker()).aggregates.executeQueryForCount(this._cleanUpAggregateQuery(e),t);return ie(r,0)}async queryAggregateHistogram(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForHistogram(this._cleanUpAggregateQuery(e),s,r);return ie(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateIds(e,t){const r=(await this.getWorker()).aggregates.executeQueryForIds(this._cleanUpAggregateQuery(e),t);return ie(r,[])}async queryAggregateJSON(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t);return ie(r,{features:[]})}async queryAttributeBins(e,t){const r=(await this.getWorker()).features.executeAttributeBinsQuery(this._cleanUpAttributeBinsQuery(e),t),i=await ie(r,{features:[]});return Q.fromJSON(i)}async queryAggregates(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t),i=await ie(r,{features:[]}),s=V.fromJSON(i);return s.features.forEach(e=>this.layerAdapter.setAggregateGraphicOrigin?.(e)),s}async queryClassBreaks(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForClassBreaks(this._cleanUpQuery(e),s,r);return ie(a,{classBreakInfos:[]})}async queryExtent(e,t){const r=(await this.getWorker()).features.executeQueryForExtent(this._cleanUpQuery(e),t),i=await ie(r,{count:0,extent:null});return{count:i.count,extent:F.fromJSON(i.extent)}}async queryFeatureCount(e,t){const r=(await this.getWorker()).features.executeQueryForCount(this._cleanUpQuery(e),t);return ie(r,0)}queryFeatures(e,t){return this.queryFeaturesJSON(e,t).then(e=>{const t=M.fromJSON(e);return t.features.forEach(e=>this._setOriginForFeature(e)),t})}async queryFeaturesJSON(e,t){const r=(await this.getWorker()).features.executeQuery(this._cleanUpQuery(e),t);return ie(r,{features:[]})}async queryHeatmapStatistics(e){return(await this.getWorker()).pipeline.queryHeatmapStatistics(e)}async queryObjectIds(e,t){const r=(await this.getWorker()).features.executeQueryForIds(this._cleanUpQuery(e),t);return ie(r,[])}async queryStatistics(){const e=await this.getWorker();return ie(e.pipeline.queryStatistics(),{featureCount:0,ringCount:0,vertexCount:0})}async querySummaryStatistics(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForSummaryStatistics(this._cleanUpQuery(e),s,r);return ie(a,{})}async queryVisibleFeatures(e,t){const r=(await this.getWorker()).pipeline.queryVisibleFeatures(this._cleanUpQuery(e),t),i=await ie(r,{features:[]}),s=M.fromJSON(i);return s.features.forEach(e=>this._setOriginForFeature(e)),s}async getSampleFeatures(e){return(await this.getWorker()).pipeline.getSampleFeatures(e)}setVisibility(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}update(e){const t=performance.now();if(t-this._lastUpdate<200)return;if(this._lastUpdate=t,!this.subscriptionManager)return;this.view.animation&&!this._lastTargetState&&(this._lastTargetState=e.state.clone()),!this.view.animation&&this._lastTargetState&&(this._lastTargetState=null);const r=this.subscriptionManager.update(e.targetState,this._lastTargetState),i=new Set(this.subscriptionManager.coverage?.target.keys());for(const s of this.featureContainer.tiles||[])s.isCoverage=i.has(s.id);this.featureContainer.setVisibleTiles(r)}attach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.attach"),d(this._updatingHandles.addPromise(this._workerAttached.promise)),d(this._attachProxy()),this.featureContainer=new H(this),this.container.addChild(this.featureContainer),this.view.timeline.record(`${this.layer.title} (FeatureLayer) Attach`),this.subscriptionManager=new ae({tileInfoView:this.view.featuresTilingScheme,updateSubscriptions:e=>{this.featureContainer.updateSubscriptions(e),d(this._updatingHandles.addPromise(this.getWorker().then(t=>t.pipeline.updateSubscriptions(e))))},isDone:e=>this.featureContainer.isDone(e)}),this.requestUpdate(),this.addAttachHandles([he([()=>this._displayRefreshVersion,()=>"displayFilterInfo"in this.layer&&this.layer.displayFilterInfo,()=>this.timeExtent,()=>this.clips,()=>this.filter,()=>this.effectiveDisplayFilterClause,()=>this.featureEffect,()=>this._sourceRefreshVersion,()=>this.view.timeZone,()=>this.view.timeExtent,...this.layerAdapter.getUpdateHashProperties(this.view)],()=>this._update()),f(()=>this.updateSuspended,e=>{e||(this.subscriptionManager.resume(),this.view.labelManager.requestUpdate())}),f(()=>this.visible,e=>{this.view.labelManager.symbolFader.restartDeclutter(),this.view.labelManager.requestUpdate()}),f(()=>this.view.scale,async e=>{const t=this.view.featuresTilingScheme.getClosestInfoForScale(e).level;if(t!==this._lastRequiredLevel){this._lastRequiredLevel=t;(await this.getWorker()).pipeline.updateRequiredLevel(t,e)}},m),f(()=>this.view.stationary,async e=>{if(e){const e=await this.getWorker(),t=x(this.view.extent,this.view.rotation,this.view.center);e.pipeline.updateStationaryExtent(t.toJSON(),this.featureContainer.requiresRefresh)}})]),this._update(),"stream"!==this.layer.type&&"parquet"!==this.layer.type&&"catalog-footprint"!==this.layer.type&&this.addAttachHandles(this.layer.on("edits",e=>this._editUpdatingHandles.addPromise(this._edit(e))))}detach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.detach"),this._detachProxy(),this._fields=null,this.view.labelManager.removeContainer(this.featureContainer),this.featureContainer.destroy(),this.featureContainer=null,this._commandsQueue.clear(),this.container.removeAllChildren(),this.subscriptionManager=h(this.subscriptionManager),this._workerProxy.pipeline.onDetach(),this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this._lastAvailableFields=[],this._lastSchema=null}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}addOverrides(e){return this._commandsQueue.push({type:"override",options:{...e,release:[]}})}removeOverrides(e){for(const r of e)if(null==r)throw new o("featurelayerview:bad-override","Tried to remove an override for an invalid objectId",{objectId:r});const t={added:[],updated:[],removed:[],release:e,isWeak:!1,historicMoment:null};return this._commandsQueue.push({type:"override",options:t})}onProxyClientEvent(e){}isUpdating(){const e="renderer"in this.layer&&null!=this.layer.renderer,t=this._commandsQueue.updateTracking.updating,r=null!=this._updatingRequiredPromise,i=this.featureContainer.updatingHandles.updating,s=this.updateRequested||e&&(t||r)||i||this._pipelineUpdating||this.dataUpdating;if(has("esri-2d-log-updating")){console.log(`Updating FLV2D (${this.layer.id}): ${s}\n -> updateRequested ${this.updateRequested}\n -> hasRenderer ${e}\n -> updatingRequiredFields ${r}\n -> hasPendingCommand ${t}\n -> dataUpdating ${this.dataUpdating}\n -> processing ${this._pipelineUpdating}\n -> updatingContainer ${i}\n`);for(const e of this.featureContainer.subscriptions())console.log(` -> Tile[${e.id}] Done: ${e.done}`)}return s}_createClientOptions(){const e=this;return{openMemoryPorts:async()=>{if(this.layerAdapter?.openMessagePorts){const e=await this.layerAdapter.openMessagePorts();return{result:e,transferList:e}}throw new Error("InternalError: Layer adapter does not support opening message ports")},get container(){return e.featureContainer},setUpdating:e=>{this._set("_pipelineUpdating",e.pipeline),this._set("_sourceUpdating",e.source)},emitEvent:e=>{this.onProxyClientEvent(e)},get eventLog(){return e.eventLog},fetch:async t=>{if(has("esri-2d-stabilize-glyphs")){const r=[];for(const i of t)r.push(await e.view.stage.painter.textureManager.rasterizeItem(i));return r}return Promise.all(t.map(t=>e.view.stage.painter.textureManager.rasterizeItem(t)))},fetchDictionary:e=>Promise.all(e.map(e=>this._fetchDictionaryRequest(e)))}}async _fetchDictionaryRequest(e){try{if("subtype-group"===this.layer.type)throw new Error("InternalError: SubtypeGroupLayer does not support dictionary renderer");const t=this.layer.renderer;if(!t||"dictionary"!==t.type)throw new Error("InternalError: Expected layer to have a DictionaryRenderer");const r=this._lastSchema.processor.mesh.factory.symbology;if("dictionary"!==r.type)throw new Error("InternalError: Expected schema to be of type 'dictionary'");const i={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:r.scaleExpression};this._fields||(this._fields=this.layer.fields.map(e=>e.toJSON()));const s=r.visualVariableUniforms,a=se(this.layer.geometryType),o=await t.getSymbolForControlString(e.controlString,a,!1);if(!o||!o.data)return{type:"dictionary-response",meshes:[]};return{type:"dictionary-response",meshes:await ee({...o.data,hasTextStringTemplates:!0},{uniforms:s,path:"renderer",schemaOptions:i})}}catch(t){return{type:"dictionary-response",meshes:[]}}}_cleanUpQuery(e){const t=T.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),"returnZ"in this.layer&&(t.returnZ??=this.layer.returnZ),"returnM"in this.layer&&(t.returnM??=this.layer.returnM),t.toJSON()}_cleanUpAttributeBinsQuery(e){const t=L.from(e);return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAggregateQuery(e){const t=T.from(e)||this.createAggregateQuery();t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference);const r=t.objectIds??[];for(const i of t.aggregateIds??[])r.push(i);return t.objectIds=r,t.aggregateIds=[],t.toJSON()}async _update(){return this._commandsQueue.push({type:"update"})}_edit(e){return this._commandsQueue.push({type:"edit",event:e})}async doRefresh(e){this.attached&&(this.updateSuspended&&e||(e?this.incrementSourceRefreshVersion():this.incrementDisplayRefreshVersion()))}incrementSourceRefreshVersion(){this._sourceRefreshVersion=(this._sourceRefreshVersion+1)%ue+1}incrementDisplayRefreshVersion(){this._displayRefreshVersion=(this._displayRefreshVersion+1)%ue+1}async _resolveIdenifiers(e){const t=[],r=[];for(const a of e)null==a.objectId||-1===a.objectId?null==a.globalId?u.getLogger(this).warn("mapview-apply-edits","A feature identifier must contain either a GlobalId or ObjectId. Ignoring",{identifier:a}):r.push(a.globalId):t.push(a.objectId);const i="globalIdField"in this.layer&&this.layer.globalIdField,s=i&&this.availableFields.includes(i);if(r.length&&!s)return u.getLogger(this).error(new o("mapview-apply-edits",`Editing the specified service requires the layer's globalIdField, ${i} to be included the layer's outFields for updates to be reflected on the map`)),t;if(r.length){const e=await this._workerProxy.pipeline.getObjectIdsFromGlobalIds(r);for(const r of e)t.push(r)}return t}_resolveOverrides(e){const t=!1,r=!1,i=se(this.layer.geometryType),s=J(this.layer),a=[];for(const n of e.added){const e=I(ce(n),i,t,r,s);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.updated){const e=I(ce(n),i,t,r,s);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.removed)if(null==n)throw new o("featurelayerview:bad-override","Tried to remove an invalid objectId",{objectId:n});return{type:"override",updates:a,removed:e.removed,release:e.release,isWeak:e.isWeak??!1,historicMoment:e.historicMoment??null}}async _resolveEdit(e){const t=this.layer,r=e.historicMoment?.getTime()??null,i="layerId"in t&&e.editedFeatures?.find(e=>e.layerId===t.layerId);if(i&&this._canEditByFeature(i)){const{adds:e,deletes:t,updates:s}=i.editedFeatures,a=this.layer.objectIdField,o=s.map(e=>e.current),n=t.map(e=>"attributes"in e?{objectId:a?e.attributes[a]:null}:e),l=await this._resolveIdenifiers(n);return this._resolveOverrides({added:e,updated:o,removed:l,historicMoment:r,isWeak:!0,release:[]})}const[s,a,o]=await Promise.all([this._resolveIdenifiers(e.addedFeatures),this._resolveIdenifiers(e.updatedFeatures),this._resolveIdenifiers(e.deletedFeatures)]);return{type:"override-by-id",updates:[...s,...a],removed:o,historicMoment:r,isWeak:!0}}_canEditByFeature(e){const{adds:t,updates:r}=e.editedFeatures;return t.every(e=>this.view.spatialReference.equals(e.geometry?.spatialReference))&&r.every(e=>this.view.spatialReference.equals(e.current.geometry?.spatialReference))}async _doUpdate(){"featureReduction"in this.layer&&this.layer.featureReduction&&this.layer.featureReduction!==this._lastFeatureReduction&&(this.layer.featureReduction=this.layer.featureReduction?.clone(),this._lastFeatureReduction=this.layer.featureReduction);try{if(await Promise.allSettled([this._handleChange(),C(this.layer)]),this.destroyed||!this.layerAdapter?.hasRequiredSupport||!this.subscriptionManager)return;const e=this.featureContainer.instanceStore;this.featureContainer.attributeView.lockTextureUploads();const t=this._lastSchema?.processor.mesh.factory.symbology?.type;let r=!0;"subtype-group"!==this.layer.type&&"dictionary"===this.layer.renderer?.type&&"dictionary"===t&&(r=!1),e.updateStart(r);const i=this.featureEffect,s={store:e,cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,scaleExpression:void 0},a=await this._createViewSchemaConfig(),o={source:await this.layerAdapter.createSourceSchema(a,this._sourceRefreshVersion),processor:await this.layerAdapter.createProcessorSchema(s,a,this._displayRefreshVersion)},n=o.processor.mesh.factory.labels;n&&this.view.labelManager.setLabelSchemaStyles(n,this.featureContainer);const l=c(this._lastSchema?.source.strategy,o.source.strategy)||c(this._lastSchema?.processor,o.processor);if(!l)return this.featureContainer.requestRender(),this.featureContainer.attributeView.unlockTextureUploads(),e.updateEnd(r),void(this.featureEffectView.featureEffect=i);this._lastSchema=o,this._fields=null;const u=Math.round(performance.now());has("esri-2d-update-debug")&&console.debug(`Id[${this.layer.uid}] Version[${u}] FeatureLayerView2D._doUpdate`,{changes:l});const h=await this.getWorker();await h.pipeline.updateSchema(o,u),e.updateEnd(r),this.featureEffectView.featureEffect=i,this.featureEffectView.endTransition(),this.featureContainer.restartAllAnimations(),this.featureContainer.attributeView.unlockTextureUploads(),this.featureContainer.trySwapRenderState(),this.featureContainer.requestRender();const p=o.processor.mesh.strategy,d="cluster"===p.type||"binning"===p.type,y="heatmap"===o.processor.mesh.factory.symbology.type,g=d||y?"target-defer":"eager";this.subscriptionManager.setVisibilityStrategy(g),has("esri-2d-update-debug")&&console.debug(`Version[${u}] FeatureLayerView2D.updateEnd`),this.requestUpdate()}catch(e){}}async _doOverride(e){const t=await this.getWorker();try{let r=new te;for(const i of e.messages)switch(i.type){case"edit":r.tryAdd(await this._resolveEdit(i.event))||(await t.pipeline.onOverride(r.toMessage()),r=new te,r.tryAdd(await this._resolveEdit(i.event)));break;case"override":r.tryAdd(this._resolveOverrides(i.options))||(await t.pipeline.onOverride(r.toMessage()),r=new te,r.tryAdd(this._resolveOverrides(i.options)));break}await t.pipeline.onOverride(r.toMessage())}catch(r){g(r),0}}_getEffectiveAvailableFields(e){const t=le(this._lastAvailableFields,e);return this._lastAvailableFields=t,R(this.layer.fieldsIndex,t)}async _createViewSchemaConfig(){const e=this.requiresCurrentUser?await this.signedInUser:null,t=[j(this.view,this.layerAdapter,this.timeExtent,this._visibilityOverrides,this.filter,this.effectiveDisplayFilterClause),this.featureEffect?.filter?.toJSON()??null];return{availableFields:this._getEffectiveAvailableFields(this.availableFields),displayFilterEnabled:this.displayFilterEnabled,filters:t,scale:this.view.scale,timeZone:this.view.timeZone,timeExtent:this.view.timeExtent,currentUser:e,spatialReference:this.view.spatialReference,extent:this.view.extent}}_processHighlight(){this._commandsQueue.push({type:"highlight"})}async _updateHighlights(){const e=this._getHighlights(),t=await this.getWorker();if(this.destroyed)return;const r=t.pipeline.updateHighlight({highlights:e}).catch(e=>{g(e)||u.getLogger(this).error(e)});this._updatingHandles.consumePromise(r)}_setOriginForFeature(e){e.layer=e.sourceLayer=this.layer,this.layerAdapter.setGraphicOrigin(e)}_createFeatureGraphicHit(e,t){return this._setOriginForFeature(t),this._createGraphicHit(e,t)}_createTrackGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setTrackGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createAggregateGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setAggregateGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createGraphicHit(e,t){return null!=t.geometry&&(t.geometry.spatialReference=this.view.spatialReference),{type:"graphic",graphic:t,layer:this.layer,mapPoint:e}}};function j(e,t,r,i,s,a){s&&(s=s.clone());const o=null!=s?s.timeExtent:null,n=null!=r&&null!=o?r.intersection(o):r||o;n&&(s??=new k,s.timeExtent=n),s=t.addFilters?.(s,e)??s,a&&(s??=new k,s.where=v(s.where,a));let l=s?.toJSON()??null;return i.size&&(l??=(new k).toJSON(),l.hiddenIds=Array.from(i)),l}return e([b()],_.prototype,"_commandsQueue",void 0),e([b()],_.prototype,"_sourceRefreshVersion",void 0),e([b()],_.prototype,"_displayRefreshVersion",void 0),e([b({readOnly:!0})],_.prototype,"_pipelineUpdating",void 0),e([b()],_.prototype,"_sourceUpdating",void 0),e([b({readOnly:!0})],_.prototype,"dataUpdating",null),e([b({readOnly:!0})],_.prototype,"hasAllFeatures",null),e([b({readOnly:!0})],_.prototype,"hasAllFeaturesInView",null),e([b({readOnly:!0})],_.prototype,"hasFullGeometries",null),e([b()],_.prototype,"featureEffectView",void 0),e([b()],_.prototype,"labelingCollisionInfos",null),e([b()],_.prototype,"layerAdapter",null),e([b({readOnly:!0})],_.prototype,"timeExtent",null),_=e([S("esri.views.2d.layers.FeatureLikeLayerView2D")],_),_};export{pe as FeatureLikeLayerView2D};
2
+ import{__decorate as e}from"tslib";import t from"../../../AggregateGraphic.js";import r from"../../../Graphic.js";import i from"../../../TrackGraphic.js";import{isSome as s}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{makeHandle as n,handlesGroup as l}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import u from"../../../core/Logger.js";import{destroyMaybe as h}from"../../../core/maybe.js";import{notDeepEqual as c}from"../../../core/object.js";import{createAbortError as p,ignoreAbortErrors as d,throwIfNotAbortError as y,isAbortError as g}from"../../../core/promiseUtils.js";import{watch as f,initial as m,sync as w}from"../../../core/reactiveUtils.js";import{sqlAnd as v}from"../../../core/sql.js";import{getMetersPerUnitForSR as _}from"../../../core/units.js";import{property as b,subclass as S}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as A}from"../../../core/support/UpdatingHandles.js";import F from"../../../geometry/Extent.js";import x from"../../../geometry/support/rotate.js";import{isCurvedGeometry as j}from"../../../geometry/support/curves/curveUtils.js";import{densifyCurvedGeometry as U}from"../../../geometry/support/curves/densifyCurvedGeometry.js";import E from"../../../layers/effects/FeatureEffectView.js";import{convertFromFeature as I}from"../../../layers/graphics/featureConversionUtils.js";import k from"../../../layers/support/FeatureFilter.js";import{checkServiceCurrentUserSupport as C}from"../../../layers/support/featureLayerUtils.js";import{packFields as R}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as q}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as O}from"../../../layers/support/timeSupport.js";import V from"../../../rest/support/AggregateFeatureSet.js";import Q from"../../../rest/support/AttributeBinsFeatureSet.js";import L from"../../../rest/support/AttributeBinsQuery.js";import M from"../../../rest/support/FeatureSet.js";import T from"../../../rest/support/Query.js";import{LayerView2D as P}from"./LayerView2D.js";import{FeatureContainer as H}from"./features/FeatureContainer.js";import{createFeaturePipelineWorkerProxy as W}from"./features/FeaturePipelineWorkerProxy.js";import{FeatureSourceEventLog as D}from"./features/FeatureSourceEventLog.js";import{CatalogFootprintLayerAdapter as G}from"./features/layerAdapters/CatalogFootprintLayerAdapter.js";import{FeatureLayerAdapter as N}from"./features/layerAdapters/FeatureLayerAdapter.js";import{createFeatureIdInfo as J}from"./features/layerAdapters/featureServiceUtils.js";import{InMemoryLayerAdapter as $}from"./features/layerAdapters/InMemoryLayerAdapter.js";import{KnowledgeGraphSublayerAdapter as B}from"./features/layerAdapters/KnowledgeGraphSublayerAdapter.js";import{OGCFeatureLayerAdapter as z}from"./features/layerAdapters/OGCFeatureLayerAdapter.js";import{OrientedImageryLayerAdapter as Z}from"./features/layerAdapters/OrientedImageryLayerAdapter.js";import{ParquetLayerAdapter as K}from"./features/layerAdapters/ParquetLayerAdapter.js";import{StreamLayerAdapter as X}from"./features/layerAdapters/StreamLayerAdapter.js";import{SubtypeGroupLayerAdapter as Y}from"./features/layerAdapters/SubtypeGroupLayerAdapter.js";import{createComplexSymbolInstances as ee}from"./features/schema/processor/symbols/ComplexSymbolSchema.js";import{DebouncedFeatureOverride as te}from"./support/DebouncedFeatureOverride.js";import{FeatureCommandQueue as re}from"./support/FeatureCommandQueue.js";import{handleNoEngineError as ie}from"./support/handleNoEngineError.js";import{toJSONGeometryType as se}from"./support/util.js";import{FeatureTileSubscriptionManager as ae}from"../tiling/FeatureTileSubscriptionManager.js";import{RefreshableLayerView as oe}from"../../layers/RefreshableLayerView.js";import{getHighlightName as ne}from"../../support/highlightOptionsUtils.js";function le(e,t){const r=new Set;return e&&e.forEach(e=>r.add(e)),t&&t.forEach(e=>r.add(e)),r.has("*")?["*"]:Array.from(r)}const ue=4294967294;function he(e,t){return l(e.map(e=>f(()=>{const t=e();return t&&"object"==typeof t?"getTime"in t&&"function"==typeof t.getTime?t.getTime():JSON.stringify(t):t},t,w)))}function ce(e){if(!e.geometry)return e;if(!j(e.geometry))return e;const t=.001/_(e.geometry.spatialReference),r=100;return{geometry:U(e.geometry,{maxSegmentsPerCurve:12e3,maxSegmentLength:r*t,maxDeviation:0}),attributes:e.attributes}}const pe=l=>{const w=oe(P(l));let _=class extends w{constructor(){super(...arguments),this._commandsQueue=new re({process:e=>{switch(e.type){case"override-batch":return this._doOverride(e);case"update":return this._doUpdate();case"highlight":return this._updateHighlights()}}}),this._visibilityOverrides=new Set,this._lastAvailableFields=[],this._lastTargetState=null,this.eventLog=new D,this._sourceRefreshVersion=1,this._displayRefreshVersion=1,this._pipelineUpdating=!1,this._editUpdatingHandles=new A,this._fields=null,this._sourceUpdating=!1,this.featureEffectView=new E,this._lastUpdate=0,this._lastRequiredLevel=0}destroy(){this._editUpdatingHandles.destroy(),this._workerProxy?.destroy(),this._workerAttached.reject(p()),this._commandsQueue.destroy()}initialize(){this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this.addResolvingPromise(this._initProxy()),this.featureEffectView.featureEffect=this.featureEffect,this.featureEffectView.endTransition()}async _initProxy(){const e=this.layer;if("isTable"in e&&e.isTable)throw new o("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e});if(("feature"===e.type||"subtype-group"===e.type)&&!1===q(e)?.operations.supportsQuery)throw new o("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e});this._workerProxy&&this._workerProxy.destroy();const t=this._createClientOptions();this._workerProxy=await W(t)}async _attachProxy(){const e=x(this.view.extent,this.view.rotation,this.view.center),t=this.view.featuresTilingScheme.getClosestInfoForScale(this.view.scale).level;t!==this._lastRequiredLevel&&(this._lastRequiredLevel=t);const r={tileInfoJSON:this.view?.featuresTilingScheme?.tileInfo?.toJSON(),initialViewExtent:e.toJSON(),requiredLevel:t,requiredScale:this.view.scale};try{await this._workerProxy.pipeline.onAttach(r),this._workerAttached.resolve()}catch(i){this._workerAttached.reject(p()),y(i)}}async _detachProxy(){return this._workerProxy.pipeline.onDetach()}async getWorker(){return await this._workerAttached.promise,this._workerProxy}get dataUpdating(){return this._sourceUpdating||this._editUpdatingHandles.updating}get hasAllFeatures(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryAllFeatures}get hasAllFeaturesInView(){const e=this.effectiveDisplayFilter?.where||null,t=!this.eventLog.willQueryAllFeatures&&null!=e&&"1=1"!==e;return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&!t}get hasFullGeometries(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryFullResolutionGeometry}get labelingCollisionInfos(){const e=this.layerAdapter.getLabelingDeconflictionInfo(this.view),t=this.layer.geometryType,r=!this.suspended;return e.map(({vvEvaluators:e,deconflictionEnabled:i,labelingInfo:s})=>({labelingInfo:s,container:this.featureContainer,vvEvaluators:e,deconflictionEnabled:i,geometryType:t,visible:r}))}get layerAdapter(){switch(this.layer.type){case"feature":return"memory"===this.layer.source.type?new $(this.layer):new N(this.layer);case"geojson":case"csv":case"wfs":return new $(this.layer);case"parquet":return new K(this.layer);case"subtype-group":return new Y(this.layer);case"ogc-feature":return new z(this.layer);case"stream":return new X(this.layer);case"oriented-imagery":return new Z(this.layer);case"knowledge-graph-sublayer":return new B(this.layer);case"catalog-footprint":return new G(this.layer);default:this.layer}return null}get timeExtent(){return O(this.layerAdapter.timeOptions,this.view?.timeExtent,this._get("timeExtent"))}get usedMemory(){return this.container.usedMemory+this.eventLog.pipelineStatistics.usedMemory}getDisplayStatistics(e,t){return this.featureContainer?.getDisplayStatistics(e,t)}highlight(e,t){let i;e instanceof r?i=[e.getObjectId()]:"number"==typeof e||"string"==typeof e?i=[e]:a.isCollection(e)&&e.length>0?i=e.map(e=>e?.getObjectId()).toArray():Array.isArray(e)&&e.length>0&&(i="number"==typeof e[0]||"string"==typeof e[0]?e:e.map(e=>e?.getObjectId()));const o=i?.filter(s);if(!o?.length)return n();const l=ne(t);return this._addHighlights(o,l),n(()=>!this.destroyed&&this._removeHighlights(o,l))}async hitTest(e,s){const a=await this.featureContainer.hitTest(s);if(0===a.length)return null;const o=await this.getWorker(),{features:n,aggregates:l,tracks:u}=await o.pipeline.getDisplayFeatures(a),h=this.featureContainer.getSortKeys(a),c=({displayId:e},{displayId:t})=>h.has(e)&&h.has(t)?h.get(e)-h.get(t):e-t;n.sort(c).reverse(),l.sort(c).reverse();const p=has("parquetlayer-hittest-max-feature-count")??1;return"parquet"===this.layer.type&&n.length>p&&(n.length=p),[...l.map(r=>this._createAggregateGraphicHit(e,t.fromJSON(r))),...u.map(t=>this._createTrackGraphicHit(e,i.fromJSON(t))),...n.map(t=>this._createFeatureGraphicHit(e,r.fromJSON(t)))]}async queryAggregateSummaryStatistics(e,t,r){const i={...t,scale:this.view.scale},s=(await this.getWorker()).aggregates.executeQueryForSummaryStatistics(this._cleanUpAggregateQuery(e),i,r);return ie(s,{})}async queryUniqueValues(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForUniqueValues(this._cleanUpQuery(e),s,r);return ie(a,{uniqueValueInfos:[]})}async queryAggregateUniqueValues(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForUniqueValues(this._cleanUpAggregateQuery(e),s,r);return ie(a,{uniqueValueInfos:[]})}async queryAggregateClassBreaks(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForClassBreaks(this._cleanUpAggregateQuery(e),s,r);return ie(a,{classBreakInfos:[]})}async queryHistogram(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForHistogram(this._cleanUpQuery(e),s,r);return ie(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateCount(e,t){const r=(await this.getWorker()).aggregates.executeQueryForCount(this._cleanUpAggregateQuery(e),t);return ie(r,0)}async queryAggregateHistogram(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForHistogram(this._cleanUpAggregateQuery(e),s,r);return ie(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateIds(e,t){const r=(await this.getWorker()).aggregates.executeQueryForIds(this._cleanUpAggregateQuery(e),t);return ie(r,[])}async queryAggregateJSON(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t);return ie(r,{features:[]})}async queryAttributeBins(e,t){const r=(await this.getWorker()).features.executeAttributeBinsQuery(this._cleanUpAttributeBinsQuery(e),t),i=await ie(r,{features:[]});return Q.fromJSON(i)}async queryAggregates(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t),i=await ie(r,{features:[]}),s=V.fromJSON(i);return s.features.forEach(e=>this.layerAdapter.setAggregateGraphicOrigin?.(e)),s}async queryClassBreaks(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForClassBreaks(this._cleanUpQuery(e),s,r);return ie(a,{classBreakInfos:[]})}async queryExtent(e,t){const r=(await this.getWorker()).features.executeQueryForExtent(this._cleanUpQuery(e),t),i=await ie(r,{count:0,extent:null});return{count:i.count,extent:F.fromJSON(i.extent)}}async queryFeatureCount(e,t){const r=(await this.getWorker()).features.executeQueryForCount(this._cleanUpQuery(e),t);return ie(r,0)}queryFeatures(e,t){return this.queryFeaturesJSON(e,t).then(e=>{const t=M.fromJSON(e);return t.features.forEach(e=>this._setOriginForFeature(e)),t})}async queryFeaturesJSON(e,t){const r=(await this.getWorker()).features.executeQuery(this._cleanUpQuery(e),t);return ie(r,{features:[]})}async queryHeatmapStatistics(e){return(await this.getWorker()).pipeline.queryHeatmapStatistics(e)}async queryObjectIds(e,t){const r=(await this.getWorker()).features.executeQueryForIds(this._cleanUpQuery(e),t);return ie(r,[])}async queryStatistics(){const e=await this.getWorker();return ie(e.pipeline.queryStatistics(),{featureCount:0,ringCount:0,vertexCount:0})}async querySummaryStatistics(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForSummaryStatistics(this._cleanUpQuery(e),s,r);return ie(a,{})}async queryVisibleFeatures(e,t){const r=(await this.getWorker()).pipeline.queryVisibleFeatures(this._cleanUpQuery(e),t),i=await ie(r,{features:[]}),s=M.fromJSON(i);return s.features.forEach(e=>this._setOriginForFeature(e)),s}async getSampleFeatures(e){return(await this.getWorker()).pipeline.getSampleFeatures(e)}setVisibility(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}update(e){const t=performance.now();if(t-this._lastUpdate<200)return;if(this._lastUpdate=t,!this.subscriptionManager)return;this.view.animation&&!this._lastTargetState&&(this._lastTargetState=e.state.clone()),!this.view.animation&&this._lastTargetState&&(this._lastTargetState=null);const r=this.subscriptionManager.update(e.targetState,this._lastTargetState),i=new Set(this.subscriptionManager.coverage?.target.keys());for(const s of this.featureContainer.tiles||[])s.isCoverage=i.has(s.id);this.featureContainer.setVisibleTiles(r)}attach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.attach"),d(this._updatingHandles.addPromise(this._workerAttached.promise)),d(this._attachProxy()),this.featureContainer=new H(this),this.container.addChild(this.featureContainer),this.view.timeline.record(`${this.layer.title} (FeatureLayer) Attach`),this.subscriptionManager=new ae({tileInfoView:this.view.featuresTilingScheme,updateSubscriptions:e=>{this.featureContainer.updateSubscriptions(e),d(this._updatingHandles.addPromise(this.getWorker().then(t=>t.pipeline.updateSubscriptions(e))))},isDone:e=>this.featureContainer.isDone(e)}),this.requestUpdate(),this.addAttachHandles([he([()=>this._displayRefreshVersion,()=>"displayFilterInfo"in this.layer&&this.layer.displayFilterInfo,()=>this.timeExtent,()=>this.clips,()=>this.filter,()=>this.effectiveDisplayFilterClause,()=>this.featureEffect,()=>this._sourceRefreshVersion,()=>this.view.timeZone,()=>this.view.timeExtent,...this.layerAdapter.getUpdateHashProperties(this.view)],()=>this._update()),f(()=>this.updateSuspended,e=>{e||(this.subscriptionManager.resume(),this.view.labelManager.requestUpdate())}),f(()=>this.visible,e=>{this.view.labelManager.symbolFader.restartDeclutter(),this.view.labelManager.requestUpdate()}),f(()=>this.view.scale,async e=>{const t=this.view.featuresTilingScheme.getClosestInfoForScale(e).level;if(t!==this._lastRequiredLevel){this._lastRequiredLevel=t;(await this.getWorker()).pipeline.updateRequiredLevel(t,e)}},m),f(()=>this.view.stationary,async e=>{if(e){const e=await this.getWorker(),t=x(this.view.extent,this.view.rotation,this.view.center);e.pipeline.updateStationaryExtent(t.toJSON(),this.featureContainer.requiresRefresh)}})]),this._update(),"stream"!==this.layer.type&&"parquet"!==this.layer.type&&"catalog-footprint"!==this.layer.type&&this.addAttachHandles(this.layer.on("edits",e=>this._editUpdatingHandles.addPromise(this._edit(e))))}detach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.detach"),this._detachProxy(),this._fields=null,this.view.labelManager.removeContainer(this.featureContainer),this.featureContainer.destroy(),this.featureContainer=null,this._commandsQueue.clear(),this.container.removeAllChildren(),this.subscriptionManager=h(this.subscriptionManager),this._workerProxy.pipeline.onDetach(),this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this._lastAvailableFields=[],this._lastSchema=null}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}addOverrides(e){return this._commandsQueue.push({type:"override",options:{...e,release:[]}})}removeOverrides(e){for(const r of e)if(null==r)throw new o("featurelayerview:bad-override","Tried to remove an override for an invalid objectId",{objectId:r});const t={added:[],updated:[],removed:[],release:e,isWeak:!1,historicMoment:null};return this._commandsQueue.push({type:"override",options:t})}onProxyClientEvent(e){}isUpdating(){const e="renderer"in this.layer&&null!=this.layer.renderer,t=this._commandsQueue.updateTracking.updating,r=null!=this._updatingRequiredPromise,i=this.featureContainer.updatingHandles.updating,s=this.updateRequested||e&&(t||r)||i||this._pipelineUpdating||this.dataUpdating;if(has("esri-2d-log-updating")){console.log(`Updating FLV2D (${this.layer.id}): ${s}\n -> updateRequested ${this.updateRequested}\n -> hasRenderer ${e}\n -> updatingRequiredFields ${r}\n -> hasPendingCommand ${t}\n -> dataUpdating ${this.dataUpdating}\n -> processing ${this._pipelineUpdating}\n -> updatingContainer ${i}\n`);for(const e of this.featureContainer.subscriptions())console.log(` -> Tile[${e.id}] Done: ${e.done}`)}return s}_createClientOptions(){const e=this;return{openMemoryPorts:async()=>{if(this.layerAdapter?.openMessagePorts){const e=await this.layerAdapter.openMessagePorts();return{result:e,transferList:e}}throw new Error("InternalError: Layer adapter does not support opening message ports")},get container(){return e.featureContainer},setUpdating:e=>{this._set("_pipelineUpdating",e.pipeline),this._set("_sourceUpdating",e.source)},emitEvent:e=>{this.onProxyClientEvent(e)},get eventLog(){return e.eventLog},fetch:async t=>{if(has("esri-2d-stabilize-glyphs")){const r=[];for(const i of t)r.push(await e.view.stage.painter.textureManager.rasterizeItem(i));return r}return Promise.all(t.map(t=>e.view.stage.painter.textureManager.rasterizeItem(t)))},fetchDictionary:e=>Promise.all(e.map(e=>this._fetchDictionaryRequest(e)))}}async _fetchDictionaryRequest(e){try{if("subtype-group"===this.layer.type)throw new Error("InternalError: SubtypeGroupLayer does not support dictionary renderer");const t=this.layer.renderer;if(!t||"dictionary"!==t.type)throw new Error("InternalError: Expected layer to have a DictionaryRenderer");const r=this._lastSchema.processor.mesh.factory.symbology;if("dictionary"!==r.type)throw new Error("InternalError: Expected schema to be of type 'dictionary'");const i={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:r.scaleExpression};this._fields||(this._fields=this.layer.fields.map(e=>e.toJSON()));const s=r.visualVariableUniforms,a=se(this.layer.geometryType),o=await t.getSymbolForControlString(e.controlString,a,!1);if(!o||!o.data)return{type:"dictionary-response",meshes:[]};return{type:"dictionary-response",meshes:await ee({...o.data,hasTextStringTemplates:!0},{uniforms:s,path:"renderer",schemaOptions:i})}}catch(t){return{type:"dictionary-response",meshes:[]}}}_cleanUpQuery(e){const t=T.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),"returnZ"in this.layer&&(t.returnZ??=this.layer.returnZ),"returnM"in this.layer&&(t.returnM??=this.layer.returnM),t.toJSON()}_cleanUpAttributeBinsQuery(e){const t=L.from(e);return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAggregateQuery(e){const t=T.from(e)||this.createAggregateQuery();t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference);const r=t.objectIds??[];for(const i of t.aggregateIds??[])r.push(i);return t.objectIds=r,t.aggregateIds=[],t.toJSON()}async _update(){return this._commandsQueue.push({type:"update"})}_edit(e){return this._commandsQueue.push({type:"edit",event:e})}async doRefresh(e){this.attached&&(this.updateSuspended&&e||(e?this.incrementSourceRefreshVersion():this.incrementDisplayRefreshVersion()))}incrementSourceRefreshVersion(){this._sourceRefreshVersion=(this._sourceRefreshVersion+1)%ue+1}incrementDisplayRefreshVersion(){this._displayRefreshVersion=(this._displayRefreshVersion+1)%ue+1}async _resolveIdenifiers(e){const t=[],r=[];for(const a of e)null==a.objectId||-1===a.objectId?null==a.globalId?u.getLogger(this).warn("mapview-apply-edits","A feature identifier must contain either a GlobalId or ObjectId. Ignoring",{identifier:a}):r.push(a.globalId):t.push(a.objectId);const i="globalIdField"in this.layer&&this.layer.globalIdField,s=i&&this.availableFields.includes(i);if(r.length&&!s)return u.getLogger(this).error(new o("mapview-apply-edits",`Editing the specified service requires the layer's globalIdField, ${i} to be included the layer's outFields for updates to be reflected on the map`)),t;if(r.length){const e=await this._workerProxy.pipeline.getObjectIdsFromGlobalIds(r);for(const r of e)t.push(r)}return t}_resolveOverrides(e){const t=!1,r=!1,i=se(this.layer.geometryType),s=J(this.layer),a=[];for(const n of e.added){const e=I(ce(n),i,t,r,s);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.updated){const e=I(ce(n),i,t,r,s);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.removed)if(null==n)throw new o("featurelayerview:bad-override","Tried to remove an invalid objectId",{objectId:n});return{type:"override",updates:a,removed:e.removed,release:e.release,isWeak:e.isWeak??!1,historicMoment:e.historicMoment??null}}async _resolveEdit(e){const t=this.layer,r=e.historicMoment?.getTime()??null,i="layerId"in t&&e.editedFeatures?.find(e=>e.layerId===t.layerId);if(i&&this._canEditByFeature(i)){const{adds:e,deletes:t,updates:s}=i.editedFeatures,a=this.layer.objectIdField,o=s.map(e=>e.current),n=t.map(e=>"attributes"in e?{objectId:a?e.attributes[a]:null}:e),l=await this._resolveIdenifiers(n);return this._resolveOverrides({added:e,updated:o,removed:l,historicMoment:r,isWeak:!0,release:[]})}const[s,a,o]=await Promise.all([this._resolveIdenifiers(e.addedFeatures),this._resolveIdenifiers(e.updatedFeatures),this._resolveIdenifiers(e.deletedFeatures)]);return{type:"override-by-id",updates:[...s,...a],removed:o,historicMoment:r,isWeak:!0}}_canEditByFeature(e){const{adds:t,updates:r}=e.editedFeatures;return t.every(e=>this.view.spatialReference.equals(e.geometry?.spatialReference))&&r.every(e=>this.view.spatialReference.equals(e.current.geometry?.spatialReference))}async _doUpdate(){"featureReduction"in this.layer&&this.layer.featureReduction&&this.layer.featureReduction!==this._lastFeatureReduction&&(this.layer.featureReduction=this.layer.featureReduction?.clone(),this._lastFeatureReduction=this.layer.featureReduction);try{if(await Promise.allSettled([this._handleChange(),C(this.layer)]),this.destroyed||!this.layerAdapter?.hasRequiredSupport||!this.subscriptionManager)return;const e=this.featureContainer.instanceStore;this.featureContainer.attributeView.lockTextureUploads();const t=this._lastSchema?.processor.mesh.factory.symbology?.type;let r=!0;"subtype-group"!==this.layer.type&&"dictionary"===this.layer.renderer?.type&&"dictionary"===t&&(r=!1),e.updateStart(r);const i=this.featureEffect,s={store:e,cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,scaleExpression:void 0},a=await this._createViewSchemaConfig(),o={source:await this.layerAdapter.createSourceSchema(a,this._sourceRefreshVersion),processor:await this.layerAdapter.createProcessorSchema(s,a,this._displayRefreshVersion)},n=o.processor.mesh.factory.labels;n&&this.view.labelManager.setLabelSchemaStyles(n,this.featureContainer);const l=c(this._lastSchema?.source.strategy,o.source.strategy)||c(this._lastSchema?.processor,o.processor);if(!l)return this.featureContainer.requestRender(),this.featureContainer.attributeView.unlockTextureUploads(),e.updateEnd(r),void(this.featureEffectView.featureEffect=i);this._lastSchema=o,this._fields=null;const u=Math.round(performance.now());has("esri-2d-update-debug")&&console.debug(`Id[${this.layer.uid}] Version[${u}] FeatureLayerView2D._doUpdate`,{changes:l});const h=await this.getWorker();await h.pipeline.updateSchema(o,u),e.updateEnd(r),this.featureEffectView.featureEffect=i,this.featureEffectView.endTransition(),this.featureContainer.restartAllAnimations(),this.featureContainer.attributeView.unlockTextureUploads(),this.featureContainer.trySwapRenderState(),this.featureContainer.requestRender();const p=o.processor.mesh.strategy,d="cluster"===p.type||"binning"===p.type,y="heatmap"===o.processor.mesh.factory.symbology.type,g=d||y?"target-defer":"eager";this.subscriptionManager.setVisibilityStrategy(g),has("esri-2d-update-debug")&&console.debug(`Version[${u}] FeatureLayerView2D.updateEnd`),this.requestUpdate()}catch(e){}}async _doOverride(e){const t=await this.getWorker();try{let r=new te;for(const i of e.messages)switch(i.type){case"edit":r.tryAdd(await this._resolveEdit(i.event))||(await t.pipeline.onOverride(r.toMessage()),r=new te,r.tryAdd(await this._resolveEdit(i.event)));break;case"override":r.tryAdd(this._resolveOverrides(i.options))||(await t.pipeline.onOverride(r.toMessage()),r=new te,r.tryAdd(this._resolveOverrides(i.options)));break}await t.pipeline.onOverride(r.toMessage())}catch(r){g(r),0}}_getEffectiveAvailableFields(e){const t=le(this._lastAvailableFields,e);return this._lastAvailableFields=t,R(this.layer.fieldsIndex,t)}async _createViewSchemaConfig(){const e=this.requiresCurrentUser?await this.signedInUser:null,t=[j(this.view,this.layerAdapter,this.timeExtent,this._visibilityOverrides,this.filter,this.effectiveDisplayFilterClause),this.featureEffect?.filter?.toJSON()??null];return{availableFields:this._getEffectiveAvailableFields(this.availableFields),displayFilterEnabled:this.displayFilterEnabled,filters:t,scale:this.view.scale,timeZone:this.view.timeZone,timeExtent:this.view.timeExtent,currentUser:e,spatialReference:this.view.spatialReference,extent:this.view.extent,returnZ:this.hasZ,returnM:this.hasM}}_processHighlight(){this._commandsQueue.push({type:"highlight"})}async _updateHighlights(){const e=this._getHighlights(),t=await this.getWorker();if(this.destroyed)return;const r=t.pipeline.updateHighlight({highlights:e}).catch(e=>{g(e)||u.getLogger(this).error(e)});this._updatingHandles.consumePromise(r)}_setOriginForFeature(e){e.layer=e.sourceLayer=this.layer,this.layerAdapter.setGraphicOrigin(e)}_createFeatureGraphicHit(e,t){return this._setOriginForFeature(t),this._createGraphicHit(e,t)}_createTrackGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setTrackGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createAggregateGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setAggregateGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createGraphicHit(e,t){return null!=t.geometry&&(t.geometry.spatialReference=this.view.spatialReference),{type:"graphic",graphic:t,layer:this.layer,mapPoint:e}}};function j(e,t,r,i,s,a){s&&(s=s.clone());const o=null!=s?s.timeExtent:null,n=null!=r&&null!=o?r.intersection(o):r||o;n&&(s??=new k,s.timeExtent=n),s=t.addFilters?.(s,e)??s,a&&(s??=new k,s.where=v(s.where,a));let l=s?.toJSON()??null;return i.size&&(l??=(new k).toJSON(),l.hiddenIds=Array.from(i)),l}return e([b()],_.prototype,"_commandsQueue",void 0),e([b()],_.prototype,"_sourceRefreshVersion",void 0),e([b()],_.prototype,"_displayRefreshVersion",void 0),e([b({readOnly:!0})],_.prototype,"_pipelineUpdating",void 0),e([b()],_.prototype,"_sourceUpdating",void 0),e([b({readOnly:!0})],_.prototype,"dataUpdating",null),e([b({readOnly:!0})],_.prototype,"hasAllFeatures",null),e([b({readOnly:!0})],_.prototype,"hasAllFeaturesInView",null),e([b({readOnly:!0})],_.prototype,"hasFullGeometries",null),e([b()],_.prototype,"featureEffectView",void 0),e([b()],_.prototype,"labelingCollisionInfos",null),e([b()],_.prototype,"layerAdapter",null),e([b({readOnly:!0})],_.prototype,"timeExtent",null),_=e([S("esri.views.2d.layers.FeatureLikeLayerView2D")],_),_};export{pe as FeatureLikeLayerView2D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as i,createLabelVVEvaluator as s}from"./labelingUtils.js";import{ExceedsLimitCache as a}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as o}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as n}from"../support/rendererUtils.js";class u{constructor(e){this.layer=e,this._cache=new a}getLabelingDeconflictionInfo(e){const r=this.layer,t=i(r);return[{vvEvaluators:{0:s(r.renderer)},deconflictionEnabled:t}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return o(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:this.layer.returnZ,returnM:this.layer.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,postQueryFilter:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const{fields:i,geometryType:s,orderBy:a,objectIdField:o,renderer:n,labelingInfo:u,labelsVisible:d}=this.layer,p={featureReduction:null,labelingInfoSource:this.layer.id,fields:i.map(e=>e.toJSON()),geometryType:s,labelingInfo:u,labelsVisible:d,objectIdField:o,orderBy:a??"default",renderer:n?.clone()};return l(e,r,p,t)}get hasRequiredSupport(){return n(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}_createServiceInfo(i){const s=this.layer,{capabilities:a,editingInfo:o,objectIdField:l,globalIdField:n,datesInUnknownTimezone:u,dateFieldsTimeZone:d,orderBy:p,parsedUrl:c,hasZ:y,hasM:m}=s,h=s.fieldsIndex.toJSON(),f=t(s),g=s.timeInfo?.toJSON(),b=s.spatialReference.toJSON(),F=e(c);let I=l;if(p?.length){const e=!p[0].valueExpression&&p[0].field;e&&(I=e)}const S=r(F.path),R=i.spatialReference.toJSON();return{type:"feature-service",source:F,isSourceHosted:S,orderByFields:I,outSpatialReference:R,metadata:{timeReferenceUnknownClient:u,dateFieldsTimeZone:d,globalIdField:n,fieldsIndex:h,geometryType:f,hasZ:y??!1,hasM:m??!1,featureIdInfo:{type:"object-id",fieldName:l},timeInfo:g,spatialReference:b,outSpatialReference:R,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:a.query.maxRecordCount,tileMaxRecordCount:a.query.tileMaxRecordCount,supportsCompactGeometry:a.query.supportsCompactGeometry,supportsDefaultSpatialReference:a.query.supportsDefaultSpatialReference,supportsFormatPBF:a.query.supportsFormatPBF,supportsMaxRecordCountFactor:a.query.supportsMaxRecordCountFactor,supportsQuantization:a.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:a.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:a.query.supportsDegeneratedQuantizedGeometry,lastEditDate:o?.lastEditDate?.getTime()}}}}export{u as CatalogFootprintLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as i,createLabelVVEvaluator as s}from"./labelingUtils.js";import{ExceedsLimitCache as a}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as o}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as n}from"../support/rendererUtils.js";class u{constructor(e){this.layer=e,this._cache=new a}getLabelingDeconflictionInfo(e){const r=this.layer,t=i(r);return[{vvEvaluators:{0:s(r.renderer)},deconflictionEnabled:t}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return o(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,postQueryFilter:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const{fields:i,geometryType:s,orderBy:a,objectIdField:o,renderer:n,labelingInfo:u,labelsVisible:d}=this.layer,p={featureReduction:null,labelingInfoSource:this.layer.id,fields:i.map(e=>e.toJSON()),geometryType:s,labelingInfo:u,labelsVisible:d,objectIdField:o,orderBy:a??"default",renderer:n?.clone()};return l(e,r,p,t)}get hasRequiredSupport(){return n(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}_createServiceInfo(i){const s=this.layer,{capabilities:a,editingInfo:o,objectIdField:l,globalIdField:n,datesInUnknownTimezone:u,dateFieldsTimeZone:d,orderBy:p,parsedUrl:c,hasZ:y,hasM:m}=s,f=s.fieldsIndex.toJSON(),h=t(s),g=s.timeInfo?.toJSON(),b=s.spatialReference.toJSON(),F=e(c);let I=l;if(p?.length){const e=!p[0].valueExpression&&p[0].field;e&&(I=e)}const S=r(F.path),R=i.spatialReference.toJSON();return{type:"feature-service",source:F,isSourceHosted:S,orderByFields:I,outSpatialReference:R,metadata:{timeReferenceUnknownClient:u,dateFieldsTimeZone:d,globalIdField:n,fieldsIndex:f,geometryType:h,hasZ:y??!1,hasM:m??!1,featureIdInfo:{type:"object-id",fieldName:l},timeInfo:g,spatialReference:b,outSpatialReference:R,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:a.query.maxRecordCount,tileMaxRecordCount:a.query.tileMaxRecordCount,supportsCompactGeometry:a.query.supportsCompactGeometry,supportsDefaultSpatialReference:a.query.supportsDefaultSpatialReference,supportsFormatPBF:a.query.supportsFormatPBF,supportsMaxRecordCountFactor:a.query.supportsMaxRecordCountFactor,supportsQuantization:a.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:a.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:a.query.supportsDegeneratedQuantizedGeometry,lastEditDate:o?.lastEditDate?.getTime()}}}}export{u as CatalogFootprintLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{sqlAnd as r}from"../../../../../core/sql.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{canConvertSqlRelativeTime as i,sqlRelativeTimeToAbsolute as s}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as a}from"../../../../../networks/support/networkFieldUtils.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{createFeatureIdInfo as l}from"./featureServiceUtils.js";import{addFloorFilter as n,hasFloorFilter as y}from"./floorFilterUtils.js";import{getServiceGeometryType as d}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as p,getLayerDeconflictionEnabled as u,createLabelVVEvaluator as c}from"./labelingUtils.js";import{ExceedsLimitCache as m}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as h,createFeatureSourceSchema as f}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as g}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as b}from"../support/rendererUtils.js";class F{constructor(e){this.layer=e,this._cache=new m}getLabelingDeconflictionInfo(e){const r=this.layer,t=p(r,e)??u(r),i=o(r,e),s=[...r.labelingInfo||[],...i?.labelingInfo||[]];return[{vvEvaluators:{0:c(r.renderer)},deconflictionEnabled:t,labelingInfo:s}]}async createSourceSchema(e,t){const a=this._createServiceInfo(e),o=null!=this.layer.editingInfo?.lastEditDate,l=this.layer.refreshInterval>0,n=!o&&l,y=h(a.isSourceHosted,n,this.layer.capabilities,a.metadata.geometryType,e.extent,this.layer.fullExtent),d=null!=this.layer.subtypeCode?`${this.layer.subtypeField} = ${this.layer.subtypeCode}`:null,p=r(this.layer.definitionExpression,d),u=i(p)?await s(this.layer.fieldsIndex,p,this.layer.capabilities.query.relativeTimeBinWindow):p,c=p!==u?{where:p}:null,{returnZ:m,returnM:g,gdbVersion:b,apiKey:F,historicMoment:I,timeExtent:S,customParameters:O,displayFilterInfo:x}=this.layer;return f(a,y,{definitionExpression:u,postQueryFilter:c,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:x,customParameters:O,gdbVersion:b,historicMoment:I,timeExtent:S,apiKey:F,sourceRefreshVersion:t,availableFields:e.availableFields,cache:this._cache,returnZ:m,returnM:g})}createProcessorSchema(e,r,t){const{fields:i,renderer:s,geometryType:a,labelingInfo:l,labelsVisible:n,orderBy:y,objectIdField:d,trackInfo:p,symbolLayerDrawing:u}=this.layer,c={fields:i.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:o(this.layer,r),geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:d,orderBy:y??"default",trackInfo:p,symbolLayerDrawing:u};return g(e,r,c,t)}get hasRequiredSupport(){return b(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return n(this.layer,e,r)}getUpdateHashProperties(e){return this.layer.destroyed?[]:[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>o(this.layer,e),()=>y(this.layer,e)?e.floors:null,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.subtypeCode,()=>this.layer.trackInfo,()=>this.layer.symbolLayerDrawing?.drawOrder,()=>this.layer.symbolLayerDrawing?.enabled,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&a(e,this.layer)]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:s,editingInfo:a,typeIdField:o,globalIdField:n,datesInUnknownTimezone:y,dateFieldsTimeZone:p,orderBy:u,subtypeField:c}=i,m=i.fieldsIndex.toJSON(),h=d(i),{hasZ:f,hasM:g}=i,b=i.timeInfo?.toJSON(),F=i.spatialReference.toJSON(),I=i.types?.map(e=>e.toJSON()),S=e(this.layer.parsedUrl);this.layer.dynamicDataSource&&(S.query={layer:JSON.stringify({source:this.layer.dynamicDataSource})});let O=this.layer.objectIdField;if(u?.length){const e=!u[0].valueExpression&&u[0].field;e&&(O=e)}const x=t(S.path),R=r.spatialReference.toJSON();return{type:"feature-service",source:S,isSourceHosted:x,orderByFields:O,outSpatialReference:R,metadata:{typeIdField:o??void 0,types:I,timeReferenceUnknownClient:y,dateFieldsTimeZone:p,subtypeField:c,globalIdField:n,fieldsIndex:m,geometryType:h,hasZ:f,hasM:g,featureIdInfo:l(i),timeInfo:b,spatialReference:F,outSpatialReference:R,subtypes:this.layer.subtypes?.map(e=>e.toJSON())},queryMetadata:{maxRecordCount:s.query.maxRecordCount,tileMaxRecordCount:s.query.tileMaxRecordCount,supportsCompactGeometry:s.query.supportsCompactGeometry,supportsDefaultSpatialReference:s.query.supportsDefaultSpatialReference,supportsFormatPBF:s.query.supportsFormatPBF,supportsMaxRecordCountFactor:s.query.supportsMaxRecordCountFactor,supportsQuantization:s.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:s.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:s.query.supportsDegeneratedQuantizedGeometry,lastEditDate:a?.lastEditDate?.getTime()}}}}export{F as FeatureLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{sqlAnd as r}from"../../../../../core/sql.js";import{isHostedAgolService as t}from"../../../../../layers/support/arcgisLayerUrl.js";import{canConvertSqlRelativeTime as i,sqlRelativeTimeToAbsolute as s}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as a}from"../../../../../networks/support/networkFieldUtils.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{createFeatureIdInfo as l}from"./featureServiceUtils.js";import{addFloorFilter as n,hasFloorFilter as y}from"./floorFilterUtils.js";import{getServiceGeometryType as d}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as p,getLayerDeconflictionEnabled as u,createLabelVVEvaluator as c}from"./labelingUtils.js";import{ExceedsLimitCache as m}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as h,createFeatureSourceSchema as f}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as g}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as b}from"../support/rendererUtils.js";class F{constructor(e){this.layer=e,this._cache=new m}getLabelingDeconflictionInfo(e){const r=this.layer,t=p(r,e)??u(r),i=o(r,e),s=[...r.labelingInfo||[],...i?.labelingInfo||[]];return[{vvEvaluators:{0:c(r.renderer)},deconflictionEnabled:t,labelingInfo:s}]}async createSourceSchema(e,t){const a=this._createServiceInfo(e),o=null!=this.layer.editingInfo?.lastEditDate,l=this.layer.refreshInterval>0,n=!o&&l,y=h(a.isSourceHosted,n,this.layer.capabilities,a.metadata.geometryType,e.extent,this.layer.fullExtent),d=null!=this.layer.subtypeCode?`${this.layer.subtypeField} = ${this.layer.subtypeCode}`:null,p=r(this.layer.definitionExpression,d),u=i(p)?await s(this.layer.fieldsIndex,p,this.layer.capabilities.query.relativeTimeBinWindow):p,c=p!==u?{where:p}:null,{gdbVersion:m,apiKey:g,historicMoment:b,timeExtent:F,customParameters:I,displayFilterInfo:S}=this.layer;return f(a,y,{definitionExpression:u,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:c,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:S,customParameters:I,gdbVersion:m,historicMoment:b,timeExtent:F,apiKey:g,sourceRefreshVersion:t,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const{fields:i,renderer:s,geometryType:a,labelingInfo:l,labelsVisible:n,orderBy:y,objectIdField:d,trackInfo:p,symbolLayerDrawing:u}=this.layer,c={fields:i.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:o(this.layer,r),geometryType:a,labelingInfo:l,labelsVisible:n,objectIdField:d,orderBy:y??"default",trackInfo:p,symbolLayerDrawing:u};return g(e,r,c,t)}get hasRequiredSupport(){return b(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return n(this.layer,e,r)}getUpdateHashProperties(e){return this.layer.destroyed?[]:[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>o(this.layer,e),()=>y(this.layer,e)?e.floors:null,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.subtypeCode,()=>this.layer.trackInfo,()=>this.layer.symbolLayerDrawing?.drawOrder,()=>this.layer.symbolLayerDrawing?.enabled,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&a(e,this.layer)]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:s,editingInfo:a,typeIdField:o,globalIdField:n,datesInUnknownTimezone:y,dateFieldsTimeZone:p,orderBy:u,subtypeField:c}=i,m=i.fieldsIndex.toJSON(),h=d(i),{hasZ:f,hasM:g}=i,b=i.timeInfo?.toJSON(),F=i.spatialReference.toJSON(),I=i.types?.map(e=>e.toJSON()),S=e(this.layer.parsedUrl);this.layer.dynamicDataSource&&(S.query={layer:JSON.stringify({source:this.layer.dynamicDataSource})});let O=this.layer.objectIdField;if(u?.length){const e=!u[0].valueExpression&&u[0].field;e&&(O=e)}const x=t(S.path),R=r.spatialReference.toJSON();return{type:"feature-service",source:S,isSourceHosted:x,orderByFields:O,outSpatialReference:R,metadata:{typeIdField:o??void 0,types:I,timeReferenceUnknownClient:y,dateFieldsTimeZone:p,subtypeField:c,globalIdField:n,fieldsIndex:m,geometryType:h,hasZ:f,hasM:g,featureIdInfo:l(i),timeInfo:b,spatialReference:F,outSpatialReference:R,subtypes:this.layer.subtypes?.map(e=>e.toJSON())},queryMetadata:{maxRecordCount:s.query.maxRecordCount,tileMaxRecordCount:s.query.tileMaxRecordCount,supportsCompactGeometry:s.query.supportsCompactGeometry,supportsDefaultSpatialReference:s.query.supportsDefaultSpatialReference,supportsFormatPBF:s.query.supportsFormatPBF,supportsMaxRecordCountFactor:s.query.supportsMaxRecordCountFactor,supportsQuantization:s.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:s.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:s.query.supportsDegeneratedQuantizedGeometry,lastEditDate:a?.lastEditDate?.getTime()}}}}export{F as FeatureLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../../core/Error.js";import{hasTimeOptions as r}from"../../../../../layers/support/timeSupport.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as n,getLayerDeconflictionEnabled as a,createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as s}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as u}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as p}from"../support/rendererUtils.js";function c(r){if(!("openPorts"in r))throw new e("featurelayer:source-not-supported","source is not supported")}class d{constructor(e){this.layer=e,this._cache=new s}openMessagePorts(){return c(this.layer.source),this.layer.source.openPorts()}getLabelingDeconflictionInfo(e){const r=this.layer,i=n(r,e)??a(r),s=t(r,e),l=[...r.labelingInfo||[],...s?.labelingInfo||[]];return[{vvEvaluators:{0:o(r.renderer)},deconflictionEnabled:i,labelingInfo:l}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return l(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:"returnZ"in this.layer&&this.layer.returnZ,returnM:"returnM"in this.layer&&this.layer.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:"timeExtent"in this.layer?this.layer.timeExtent:null,apiKey:null,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:n,renderer:a,geometryType:o,labelingInfo:s,labelsVisible:l,orderBy:p,objectIdField:c}=this.layer,d="trackInfo"in this.layer?this.layer.trackInfo:null,y={fields:n.map(e=>e.toJSON()),renderer:a?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:o,labelingInfo:s,labelsVisible:l,objectIdField:c,orderBy:p??"default",trackInfo:d};return u(e,r,y,i)}get hasRequiredSupport(){return p(this.layer.renderer)}get timeOptions(){return r(this.layer)?this.layer:null}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.displayFilterInfo,()=>this.layer.orderBy,()=>"outFields"in this.layer?this.layer.outFields:null,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>"trackInfo"in this.layer?this.layer.trackInfo:null]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){"trackGraphicOrigin"in this.layer&&(e.origin=this.layer.trackGraphicOrigin)}_createServiceInfo(e){const r=this.layer,{capabilities:t,objectIdField:n}=r,a=r.fieldsIndex.toJSON(),o=i(r),s="timeInfo"in r?r.timeInfo?.toJSON():null,l=r.spatialReference.toJSON();c(r.source);const u=n,p=e.spatialReference.toJSON();return{type:"memory",orderByFields:u,outSpatialReference:p,metadata:{fieldsIndex:a,geometryType:o,hasZ:"hasZ"in r&&r.hasZ,hasM:"hasM"in r&&r.hasM,featureIdInfo:{type:"object-id",fieldName:r.objectIdField},timeInfo:s,spatialReference:l,outSpatialReference:p,subtypes:null,subtypeField:null,globalIdField:null,typeIdField:null,types:null,timeReferenceUnknownClient:"datesInUnknownTimezone"in r?r.datesInUnknownTimezone:null,dateFieldsTimeZone:"dateFieldsTimeZone"in r?r.dateFieldsTimeZone:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{d as InMemoryLayerAdapter};
2
+ import e from"../../../../../core/Error.js";import{hasTimeOptions as r}from"../../../../../layers/support/timeSupport.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as n,getLayerDeconflictionEnabled as o,createLabelVVEvaluator as a}from"./labelingUtils.js";import{ExceedsLimitCache as s}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as u}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as p}from"../support/rendererUtils.js";function c(r){if(!("openPorts"in r))throw new e("featurelayer:source-not-supported","source is not supported")}class d{constructor(e){this.layer=e,this._cache=new s}openMessagePorts(){return c(this.layer.source),this.layer.source.openPorts()}getLabelingDeconflictionInfo(e){const r=this.layer,i=n(r,e)??o(r),s=t(r,e),l=[...r.labelingInfo||[],...s?.labelingInfo||[]];return[{vvEvaluators:{0:a(r.renderer)},deconflictionEnabled:i,labelingInfo:l}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return l(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:"timeExtent"in this.layer?this.layer.timeExtent:null,apiKey:null,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:n,renderer:o,geometryType:a,labelingInfo:s,labelsVisible:l,orderBy:p,objectIdField:c}=this.layer,d="trackInfo"in this.layer?this.layer.trackInfo:null,y={fields:n.map(e=>e.toJSON()),renderer:o?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:a,labelingInfo:s,labelsVisible:l,objectIdField:c,orderBy:p??"default",trackInfo:d};return u(e,r,y,i)}get hasRequiredSupport(){return p(this.layer.renderer)}get timeOptions(){return r(this.layer)?this.layer:null}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.displayFilterInfo,()=>this.layer.orderBy,()=>"outFields"in this.layer?this.layer.outFields:null,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>"trackInfo"in this.layer?this.layer.trackInfo:null]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){"trackGraphicOrigin"in this.layer&&(e.origin=this.layer.trackGraphicOrigin)}_createServiceInfo(e){const r=this.layer,{capabilities:t,objectIdField:n}=r,o=r.fieldsIndex.toJSON(),a=i(r),s="timeInfo"in r?r.timeInfo?.toJSON():null,l=r.spatialReference.toJSON();c(r.source);const u=n,p=e.spatialReference.toJSON();return{type:"memory",orderByFields:u,outSpatialReference:p,metadata:{fieldsIndex:o,geometryType:a,hasZ:"hasZ"in r&&r.hasZ,hasM:"hasM"in r&&r.hasM,featureIdInfo:{type:"object-id",fieldName:r.objectIdField},timeInfo:s,spatialReference:l,outSpatialReference:p,subtypes:null,subtypeField:null,globalIdField:null,typeIdField:null,types:null,timeReferenceUnknownClient:"datesInUnknownTimezone"in r?r.datesInUnknownTimezone:null,dateFieldsTimeZone:"dateFieldsTimeZone"in r?r.dateFieldsTimeZone:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{d as InMemoryLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{sqlAnd as e}from"../../../../../core/sql.js";import{systemIsSpatialFieldName as r}from"../../../../../layers/knowledgeGraph/constants.js";import t from"../../../../../layers/support/FeatureFilter.js";import{getEffectiveFeatureReduction as i}from"./featureReductionUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as s,getLayerDeconflictionEnabled as o,createLabelVVEvaluator as l}from"./labelingUtils.js";import{ExceedsLimitCache as n}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as p}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as c}from"../support/rendererUtils.js";class d{constructor(e){this.layer=e,this._cache=new n}getLabelingDeconflictionInfo(e){const r=this.layer,t=s(r,e)??o(r);return[{vvEvaluators:{0:l(r.renderer)},deconflictionEnabled:t}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return u(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:null,returnM:null,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:null,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:null,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,t){const{fields:a,renderer:s,geometryType:o,labelingInfo:l,labelsVisible:n,objectIdField:u}=this.layer,c={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:i(this.layer,r),geometryType:o,labelingInfo:l,labelsVisible:n,objectIdField:u,orderBy:"default"};return p(e,r,c,t)}get hasRequiredSupport(){return c(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>i(this.layer,e),()=>y(this.layer)]}hasFilters(e){return y(this.layer)}addFilters(i,a){if(y(this.layer)){const a=e(i?.where,`${r}=1`);if(!a)return i;i??=new t,i.where=a}return i}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}openMessagePorts(){return this.layer.source.openPorts()}_createServiceInfo(e){const r=this.layer,{capabilities:t,objectIdField:i}=r,s=r.fieldsIndex.toJSON(),o=a(r),l=r.spatialReference.toJSON(),n=i,u=e.spatialReference.toJSON();return{type:"memory",orderByFields:n,outSpatialReference:u,metadata:{fieldsIndex:s,geometryType:o,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:r.objectIdField},spatialReference:l,outSpatialReference:u,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:r.timeInfo?.toJSON(),timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}function y(e){return"link-chart"===e.parentCompositeLayer.type&&"hidden"===e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode}export{d as KnowledgeGraphSublayerAdapter};
2
+ import{sqlAnd as e}from"../../../../../core/sql.js";import{systemIsSpatialFieldName as r}from"../../../../../layers/knowledgeGraph/constants.js";import t from"../../../../../layers/support/FeatureFilter.js";import{getEffectiveFeatureReduction as i}from"./featureReductionUtils.js";import{getServiceGeometryType as a}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as s,getLayerDeconflictionEnabled as o,createLabelVVEvaluator as n}from"./labelingUtils.js";import{ExceedsLimitCache as l}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as p}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as c}from"../support/rendererUtils.js";class d{constructor(e){this.layer=e,this._cache=new l}getLabelingDeconflictionInfo(e){const r=this.layer,t=s(r,e)??o(r);return[{vvEvaluators:{0:n(r.renderer)},deconflictionEnabled:t}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return u(t,null,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:null,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:null,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,t){const{fields:a,renderer:s,geometryType:o,labelingInfo:n,labelsVisible:l,objectIdField:u}=this.layer,c={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:i(this.layer,r),geometryType:o,labelingInfo:n,labelsVisible:l,objectIdField:u,orderBy:"default"};return p(e,r,c,t)}get hasRequiredSupport(){return c(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>i(this.layer,e),()=>y(this.layer)]}hasFilters(e){return y(this.layer)}addFilters(i,a){if(y(this.layer)){const a=e(i?.where,`${r}=1`);if(!a)return i;i??=new t,i.where=a}return i}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}openMessagePorts(){return this.layer.source.openPorts()}_createServiceInfo(e){const r=this.layer,{capabilities:t,objectIdField:i}=r,s=r.fieldsIndex.toJSON(),o=a(r),n=r.spatialReference.toJSON(),l=i,u=e.spatialReference.toJSON();return{type:"memory",orderByFields:l,outSpatialReference:u,metadata:{fieldsIndex:s,geometryType:o,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:r.objectIdField},spatialReference:n,outSpatialReference:u,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:r.timeInfo?.toJSON(),timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}function y(e){return"link-chart"===e.parentCompositeLayer.type&&"hidden"===e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode}export{d as KnowledgeGraphSublayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as i,getLayerDeconflictionEnabled as a,createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as s}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as n}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e,this._cache=new s}getLabelingDeconflictionInfo(e){const r=this.layer,t=i(r,e)??a(r);return[{vvEvaluators:{0:o(r.renderer)},deconflictionEnabled:t,labelingInfo:r.labelingInfo}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return l(t,null,{definitionExpression:null,returnZ:null,returnM:!1,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:null,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,i){const{fields:a,renderer:o,geometryType:s,labelingInfo:l,labelsVisible:u,orderBy:c,objectIdField:p}=this.layer,d={fields:a.map(e=>e.toJSON()),renderer:o?.clone(),labelingInfoSource:this.layer.id,featureReduction:r(this.layer,t),geometryType:s,labelingInfo:l,labelsVisible:u,objectIdField:p,orderBy:c??"default"};return n(e,t,d,i)}get hasRequiredSupport(){return u(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>r(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:a}=i,o=i.fieldsIndex.toJSON(),s=t(i),l=i.timeInfo?.toJSON(),n=i.spatialReference.toJSON(),u=i.source.getSource(),c=this.layer.objectIdField,p=e(a);p.query.maxRecordCount=u.maxRecordCount;const d=r.spatialReference.toJSON();return{type:"ogc",source:u,orderByFields:c,outSpatialReference:d,metadata:{fieldsIndex:o,geometryType:s,hasZ:this.layer.hasZ??!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:l,spatialReference:n,outSpatialReference:d,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:p.query.maxRecordCount,tileMaxRecordCount:p.query.tileMaxRecordCount,supportsCompactGeometry:p.query.supportsCompactGeometry,supportsDefaultSpatialReference:p.query.supportsDefaultSpatialReference,supportsFormatPBF:p.query.supportsFormatPBF,supportsMaxRecordCountFactor:p.query.supportsMaxRecordCountFactor,supportsQuantization:p.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:p.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:p.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{c as OGCFeatureLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{getEffectiveFeatureReduction as r}from"./featureReductionUtils.js";import{getServiceGeometryType as t}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as i,getLayerDeconflictionEnabled as a,createLabelVVEvaluator as o}from"./labelingUtils.js";import{ExceedsLimitCache as s}from"../schema/ExceedsLimitCache.js";import{createFeatureSourceSchema as l}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as n}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as u}from"../support/rendererUtils.js";class c{constructor(e){this.layer=e,this._cache=new s}getLabelingDeconflictionInfo(e){const r=this.layer,t=i(r,e)??a(r);return[{vvEvaluators:{0:o(r.renderer)},deconflictionEnabled:t,labelingInfo:r.labelingInfo}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e);return l(t,null,{definitionExpression:null,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:null,customParameters:this.layer.customParameters,gdbVersion:null,historicMoment:null,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,t,i){const{fields:a,renderer:o,geometryType:s,labelingInfo:l,labelsVisible:u,orderBy:c,objectIdField:p}=this.layer,d={fields:a.map(e=>e.toJSON()),renderer:o?.clone(),labelingInfoSource:this.layer.id,featureReduction:r(this.layer,t),geometryType:s,labelingInfo:l,labelsVisible:u,objectIdField:p,orderBy:c??"default"};return n(e,t,d,i)}get hasRequiredSupport(){return u(this.layer.renderer)}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>r(this.layer,e),()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.renderer]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(r){const i=this.layer,{capabilities:a}=i,o=i.fieldsIndex.toJSON(),s=t(i),l=i.timeInfo?.toJSON(),n=i.spatialReference.toJSON(),u=i.source.getSource(),c=this.layer.objectIdField,p=e(a);p.query.maxRecordCount=u.maxRecordCount;const d=r.spatialReference.toJSON();return{type:"ogc",source:u,orderByFields:c,outSpatialReference:d,metadata:{fieldsIndex:o,geometryType:s,hasZ:this.layer.hasZ??!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:l,spatialReference:n,outSpatialReference:d,globalIdField:null,subtypeField:null,subtypes:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:p.query.maxRecordCount,tileMaxRecordCount:p.query.tileMaxRecordCount,supportsCompactGeometry:p.query.supportsCompactGeometry,supportsDefaultSpatialReference:p.query.supportsDefaultSpatialReference,supportsFormatPBF:p.query.supportsFormatPBF,supportsMaxRecordCountFactor:p.query.supportsMaxRecordCountFactor,supportsQuantization:p.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:p.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:p.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{c as OGCFeatureLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{addFloorFilter as i,hasFloorFilter as a}from"./floorFilterUtils.js";import{getServiceGeometryType as s}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as o,getLayerDeconflictionEnabled as l,createLabelVVEvaluator as n}from"./labelingUtils.js";import{ExceedsLimitCache as d}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as p,createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as c}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as y}from"../support/rendererUtils.js";class h{constructor(e){this.layer=e,this._cache=new d}getLabelingDeconflictionInfo(e){const r=this.layer,t=o(r,e)??l(r);return[{vvEvaluators:{0:n(r.renderer)},deconflictionEnabled:t}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=null!=this.layer.editingInfo?.lastEditDate,a=this.layer.refreshInterval>0,s=!i&&a,o=p(t.isSourceHosted,s,this.layer.capabilities,t.metadata.geometryType,e.extent,this.layer.fullExtent);return u(t,o,{definitionExpression:this.layer.definitionExpression,queryScaleRanges:[],returnZ:this.layer.returnZ,returnM:this.layer.returnM,displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:this.layer.gdbVersion,historicMoment:this.layer.historicMoment,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:a,renderer:s,geometryType:o,labelingInfo:l,labelsVisible:n,orderBy:d,objectIdField:p}=this.layer,u={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:o,labelingInfo:l,labelsVisible:n,objectIdField:p,orderBy:d??"default"};return c(e,r,u,i)}get hasRequiredSupport(){return y(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return i(this.layer,e,r)}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.orderBy,()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>a(this.layer,e)?e.floors:null]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(t){const i=this.layer,{capabilities:a,globalIdField:o,orderBy:l}=i,n=i.fieldsIndex.toJSON(),d=s(i),p=i.timeInfo?.toJSON(),u=i.spatialReference.toJSON(),c=e(this.layer.parsedUrl);let y=this.layer.objectIdField;if(l?.length){const e=!l[0].valueExpression&&l[0].field;e&&(y=e)}const h=r(c.path),m=t.spatialReference.toJSON();return{type:"feature-service",source:c,isSourceHosted:h,orderByFields:y,outSpatialReference:m,metadata:{globalIdField:o,fieldsIndex:n,geometryType:d,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:p,spatialReference:u,outSpatialReference:m,timeReferenceUnknownClient:i.datesInUnknownTimezone,dateFieldsTimeZone:i.dateFieldsTimeZone,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:a.query.maxRecordCount,tileMaxRecordCount:a.query.tileMaxRecordCount,supportsCompactGeometry:a.query.supportsCompactGeometry,supportsDefaultSpatialReference:a.query.supportsDefaultSpatialReference,supportsFormatPBF:a.query.supportsFormatPBF,supportsMaxRecordCountFactor:a.query.supportsMaxRecordCountFactor,supportsQuantization:a.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:a.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:a.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{h as OrientedImageryLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{addFloorFilter as i,hasFloorFilter as a}from"./floorFilterUtils.js";import{getServiceGeometryType as s}from"./geometryUtils.js";import{getFeatureReductionDeconflictionEnabled as o,getLayerDeconflictionEnabled as l,createLabelVVEvaluator as n}from"./labelingUtils.js";import{ExceedsLimitCache as d}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as p,createFeatureSourceSchema as u}from"../schema/SourceSchema.js";import{createSimpleProcessorSchema as c}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as y}from"../support/rendererUtils.js";class h{constructor(e){this.layer=e,this._cache=new d}getLabelingDeconflictionInfo(e){const r=this.layer,t=o(r,e)??l(r);return[{vvEvaluators:{0:n(r.renderer)},deconflictionEnabled:t}]}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=null!=this.layer.editingInfo?.lastEditDate,a=this.layer.refreshInterval>0,s=!i&&a,o=p(t.isSourceHosted,s,this.layer.capabilities,t.metadata.geometryType,e.extent,this.layer.fullExtent);return u(t,o,{definitionExpression:this.layer.definitionExpression,returnZ:e.returnZ,returnM:e.returnM,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:this.layer.displayFilterInfo,customParameters:this.layer.customParameters,gdbVersion:this.layer.gdbVersion,historicMoment:this.layer.historicMoment,timeExtent:this.layer.timeExtent,apiKey:this.layer.apiKey,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache,postQueryFilter:null})}createProcessorSchema(e,r,i){const{fields:a,renderer:s,geometryType:o,labelingInfo:l,labelsVisible:n,orderBy:d,objectIdField:p}=this.layer,u={fields:a.map(e=>e.toJSON()),renderer:s?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:o,labelingInfo:l,labelsVisible:n,objectIdField:p,orderBy:d??"default"};return c(e,r,u,i)}get hasRequiredSupport(){return y(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,r){return i(this.layer,e,r)}getUpdateHashProperties(e){return[()=>this.layer.outFields,()=>this.layer.orderBy,()=>this.layer.definitionExpression,()=>this.layer.renderer,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>a(this.layer,e)?e.floors:null]}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(t){const i=this.layer,{capabilities:a,globalIdField:o,orderBy:l}=i,n=i.fieldsIndex.toJSON(),d=s(i),p=i.timeInfo?.toJSON(),u=i.spatialReference.toJSON(),c=e(this.layer.parsedUrl);let y=this.layer.objectIdField;if(l?.length){const e=!l[0].valueExpression&&l[0].field;e&&(y=e)}const h=r(c.path),m=t.spatialReference.toJSON();return{type:"feature-service",source:c,isSourceHosted:h,orderByFields:y,outSpatialReference:m,metadata:{globalIdField:o,fieldsIndex:n,geometryType:d,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:{type:"object-id",fieldName:i.objectIdField},timeInfo:p,spatialReference:u,outSpatialReference:m,timeReferenceUnknownClient:i.datesInUnknownTimezone,dateFieldsTimeZone:i.dateFieldsTimeZone,subtypeField:null,subtypes:null,typeIdField:null,types:null},queryMetadata:{maxRecordCount:a.query.maxRecordCount,tileMaxRecordCount:a.query.tileMaxRecordCount,supportsCompactGeometry:a.query.supportsCompactGeometry,supportsDefaultSpatialReference:a.query.supportsDefaultSpatialReference,supportsFormatPBF:a.query.supportsFormatPBF,supportsMaxRecordCountFactor:a.query.supportsMaxRecordCountFactor,supportsQuantization:a.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:a.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:a.query.supportsDegeneratedQuantizedGeometry,lastEditDate:null}}}}export{h as OrientedImageryLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as r}from"../../../../../core/mathUtils.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as i}from"../../../../../layers/support/arcgisLayerUrl.js";import s from"../../../../../layers/support/FeatureFilter.js";import{canConvertSqlRelativeTime as a,sqlRelativeTimeToAbsolute as l}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as o}from"../../../../../networks/support/networkFieldUtils.js";import{createFeatureIdInfo as n}from"./featureServiceUtils.js";import{addFloorFilter as u,hasFloorFilter as y}from"./floorFilterUtils.js";import{getServiceGeometryType as p}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as c}from"./labelingUtils.js";import{ExceedsLimitCache as d}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as m,createFeatureSourceSchema as h}from"../schema/SourceSchema.js";import{createSubtypeProcessorSchema as f}from"../schema/processor/SubtypeProcessorSchema.js";class b{constructor(e){this.layer=e,this._cache=new d}getLabelingDeconflictionInfo(e){const r=this.layer;return[{vvEvaluators:{},deconflictionEnabled:r.sublayers.some(e=>c(e)),labelingInfo:r.sublayers.toArray().filter(e=>!!e.labelingInfo).flatMap(e=>e.labelingInfo)}]}async createSourceSchema(e,r){const{definitionExpression:t,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,displayFilterInfo:y}=this.layer,p=this._createServiceInfo(e),c=null!=this.layer.editingInfo?.lastEditDate,d=this.layer.refreshInterval>0,f=!c&&d,b=m(p.isSourceHosted,f,this.layer.capabilities,p.metadata.geometryType,e.extent,this.layer.fullExtent),g=a(t)?await l(this.layer.fieldsIndex,t,this.layer.capabilities.query.relativeTimeBinWindow):t,S=t!==g?{where:t}:null;return h(p,b,{definitionExpression:g,returnZ:this.layer.returnZ,returnM:this.layer.returnM,postQueryFilter:S,queryScaleRanges:this.layer.sublayers.items.map(e=>({subtypeCode:e.subtypeCode,minScale:e.minScale,maxScale:e.maxScale})),displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:y,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const i={labelingInfoSource:this.layer.id,subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers,(e,r)=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfoSource:this.layer.id+`-${r}`,labelingInfo:e.labelingInfo,labelsVisible:e.labelsVisible,renderer:e.renderer,subtypeCode:e.subtypeCode,orderBy:null}))};return f(e,r,i,t)}addFilters(e,r){e=u(this.layer,e,r);const i=this.layer.sublayers.filter(e=>!g(e,r)).map(e=>e.subtypeCode);if(!i.length)return e;e??=new s;const a=`NOT ${this.layer.subtypeField} IN (${i.join(",")})`;return e.where=t(e.where,a),e}get hasRequiredSupport(){return!0}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>y(this.layer,e)?e.floors:null,()=>this.layer.outFields,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&o(e,this.layer),()=>this.layer.sublayers.map(({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a})=>({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a}))]}setGraphicOrigin(e){const r=this.layer.findSublayerForFeature(e);e.layer=e.sourceLayer=r,e.origin=r?.graphicOrigin}_createServiceInfo(r){const{capabilities:t,datesInUnknownTimezone:s,dateFieldsTimeZone:a,editingInfo:l,globalIdField:o,objectIdField:u,subtypeField:y}=this.layer,c=this.layer.fieldsIndex.toJSON(),d=p(this.layer),m=this.layer.timeInfo?.toJSON(),h=this.layer.spatialReference.toJSON(),f=e(this.layer.parsedUrl),b=u,g=i(f.path),S=r.spatialReference.toJSON();return{type:"feature-service",source:f,isSourceHosted:g,orderByFields:b,outSpatialReference:S,metadata:{timeReferenceUnknownClient:s,dateFieldsTimeZone:a,subtypeField:y,globalIdField:o,fieldsIndex:c,geometryType:d,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:n(this.layer),timeInfo:m,spatialReference:h,outSpatialReference:S,subtypes:this.layer.subtypes?.map(e=>e.toJSON()),typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:l?.lastEditDate?.getTime()}}}}function g(e,t){return e.visible&&(0===e.minScale||r(t.scale,e.minScale)||t.scale<e.minScale)&&(0===e.maxScale||r(t.scale,e.maxScale)||t.scale>e.maxScale)}export{b as SubtypeGroupLayerAdapter};
2
+ import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as r}from"../../../../../core/mathUtils.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as i}from"../../../../../layers/support/arcgisLayerUrl.js";import s from"../../../../../layers/support/FeatureFilter.js";import{canConvertSqlRelativeTime as a,sqlRelativeTimeToAbsolute as l}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as o}from"../../../../../networks/support/networkFieldUtils.js";import{createFeatureIdInfo as n}from"./featureServiceUtils.js";import{addFloorFilter as u,hasFloorFilter as y}from"./floorFilterUtils.js";import{getServiceGeometryType as p}from"./geometryUtils.js";import{getLayerDeconflictionEnabled as c}from"./labelingUtils.js";import{ExceedsLimitCache as d}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as m,createFeatureSourceSchema as h}from"../schema/SourceSchema.js";import{createSubtypeProcessorSchema as f}from"../schema/processor/SubtypeProcessorSchema.js";class b{constructor(e){this.layer=e,this._cache=new d}getLabelingDeconflictionInfo(e){const r=this.layer;return[{vvEvaluators:{},deconflictionEnabled:r.sublayers.some(e=>c(e)),labelingInfo:r.sublayers.toArray().filter(e=>!!e.labelingInfo).flatMap(e=>e.labelingInfo)}]}async createSourceSchema(e,r){const{definitionExpression:t,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,displayFilterInfo:y}=this.layer,p=this._createServiceInfo(e),c=null!=this.layer.editingInfo?.lastEditDate,d=this.layer.refreshInterval>0,f=!c&&d,b=m(p.isSourceHosted,f,this.layer.capabilities,p.metadata.geometryType,e.extent,this.layer.fullExtent),g=a(t)?await l(this.layer.fieldsIndex,t,this.layer.capabilities.query.relativeTimeBinWindow):t,S=t!==g?{where:t}:null;return h(p,b,{definitionExpression:g,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:S,queryScaleRanges:this.layer.sublayers.items.map(e=>({subtypeCode:e.subtypeCode,minScale:e.minScale,maxScale:e.maxScale})),displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:y,customParameters:i,gdbVersion:s,historicMoment:o,timeExtent:n,apiKey:u,sourceRefreshVersion:r,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,r,t){const i={labelingInfoSource:this.layer.id,subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers,(e,r)=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfoSource:this.layer.id+`-${r}`,labelingInfo:e.labelingInfo,labelsVisible:e.labelsVisible,renderer:e.renderer,subtypeCode:e.subtypeCode,orderBy:null}))};return f(e,r,i,t)}addFilters(e,r){e=u(this.layer,e,r);const i=this.layer.sublayers.filter(e=>!g(e,r)).map(e=>e.subtypeCode);if(!i.length)return e;e??=new s;const a=`NOT ${this.layer.subtypeField} IN (${i.join(",")})`;return e.where=t(e.where,a),e}get hasRequiredSupport(){return!0}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>y(this.layer,e)?e.floors:null,()=>this.layer.outFields,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&o(e,this.layer),()=>this.layer.sublayers.map(({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a})=>({renderer:e,labelsVisible:r,labelingInfo:t,visible:i,minScale:s,maxScale:a}))]}setGraphicOrigin(e){const r=this.layer.findSublayerForFeature(e);e.layer=e.sourceLayer=r,e.origin=r?.graphicOrigin}_createServiceInfo(r){const{capabilities:t,datesInUnknownTimezone:s,dateFieldsTimeZone:a,editingInfo:l,globalIdField:o,objectIdField:u,subtypeField:y}=this.layer,c=this.layer.fieldsIndex.toJSON(),d=p(this.layer),m=this.layer.timeInfo?.toJSON(),h=this.layer.spatialReference.toJSON(),f=e(this.layer.parsedUrl),b=u,g=i(f.path),S=r.spatialReference.toJSON();return{type:"feature-service",source:f,isSourceHosted:g,orderByFields:b,outSpatialReference:S,metadata:{timeReferenceUnknownClient:s,dateFieldsTimeZone:a,subtypeField:y,globalIdField:o,fieldsIndex:c,geometryType:d,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:n(this.layer),timeInfo:m,spatialReference:h,outSpatialReference:S,subtypes:this.layer.subtypes?.map(e=>e.toJSON()),typeIdField:null,types:null},queryMetadata:{maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,supportsCompactGeometry:t.query.supportsCompactGeometry,supportsDefaultSpatialReference:t.query.supportsDefaultSpatialReference,supportsFormatPBF:t.query.supportsFormatPBF,supportsMaxRecordCountFactor:t.query.supportsMaxRecordCountFactor,supportsQuantization:t.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:t.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:t.query.supportsDegeneratedQuantizedGeometry,lastEditDate:l?.lastEditDate?.getTime()}}}}function g(e,t){return e.visible&&(0===e.minScale||r(t.scale,e.minScale)||t.scale<e.minScale)&&(0===e.maxScale||r(t.scale,e.maxScale)||t.scale>e.maxScale)}export{b as SubtypeGroupLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{ArcadeDate as e}from"../../../../../arcade/ArcadeDate.js";import has from"../../../../../core/has.js";import{estimateNumberArrayMemory as t}from"../../../../../core/memoryEstimations.js";import{DateOnly as r}from"../../../../../core/sql/DateOnly.js";import{TimeOnly as s}from"../../../../../core/sql/TimeOnly.js";import{GeometryCursor as i}from"../../../../../geometry/GeometryCursor.js";import{fromRectValues as o}from"../../../../../geometry/support/aaBoundingBox.js";import{fromJSON as a}from"../../../../../geometry/support/jsonUtils.js";import{getLabelPoint as n}from"../../../../../geometry/support/labelPoint.js";import{quantizeX as d,quantizeY as u}from"../../../../../geometry/support/quantizationUtils.js";import{getCentroidOptimizedGeometry as h}from"../../../../../layers/graphics/centroid.js";import{convertToGeometry as c,generalizeOptimizedGeometry as l,quantizeForDisplay as m,unquantizeOptimizedGeometryInPlace as y}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as f}from"../../../../../layers/graphics/OptimizedFeature.js";import p from"../../../../../layers/graphics/OptimizedGeometry.js";import{system as g,unknown as _}from"../../../../../time/constants.js";import{FeatureSetCache as b}from"./FeatureSetCache.js";const x=has("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],D=x[0],T=x[1],F=x[2],I=x[3],A=has("featurelayer-simplify-payload-size-factors")??[1,2,4],S=A[0],B=A[1],j=A[2],G=has("featurelayer-simplify-mobile-factor")??2,C=has("esri-mobile"),v=4294967295;function M(e,t,r){if(!(e.length>t))for(;e.length<=t;)e.push(r)}class O{constructor(e){this.metadata=e,this.type="FeatureSetReader",this._overrides=null,this._postQueryFilteredIds=new Set,this._joined=[],this._objectIdToIndex=null,this._boundsBuffer=[],this._caches=new Map,this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}destroy(){}[Symbol.dispose](){this.destroy()}getAreaSimplificationThreshold(e,t){let r=1;const s=C?G:1;t>4e6?r=j*s:t>1e6?r=B*s:t>5e5?r=S*s:t>1e5&&(r=s);let i=0;return e>4e3?i=I*r:e>2e3?i=F*r:e>100?i=T:e>15&&(i=D),i}getBounds(e){M(this._boundsBuffer,4*this.getIndex()+4,0);const t=this.getBoundsXMin();if(t===v||!isFinite(t))return!1;if(0===this.getBoundsXMin()){const t=this.readGeometryWorldSpace();if(t?.isPoint&&0===t.coords[0]&&0===t.coords[1])return o(e,0,0,0,0),!0;if(!t)return this.setBoundsXMin(v),!1;let r=1/0,s=1/0,i=-1/0,a=-1/0;return t.forEachVertex((e,t)=>{r=Math.min(r,e),s=Math.min(s,t),i=Math.max(i,e),a=Math.max(a,t)}),this.setBoundsXMin(r),this.setBoundsYMin(s),this.setBoundsXMax(i),this.setBoundsYMax(a),o(e,r,s,i,a),!0}const r=this.getBoundsXMin(),s=this.getBoundsYMin(),i=this.getBoundsXMax(),a=this.getBoundsYMax();return o(e,r,s,i,a),!0}getBoundsXMin(){return this._boundsBuffer[4*this.getIndex()]}setBoundsXMin(e){this._boundsBuffer[4*this.getIndex()]=e}getBoundsYMin(){return this._boundsBuffer[4*this.getIndex()+1]}setBoundsYMin(e){this._boundsBuffer[4*this.getIndex()+1]=e}getBoundsXMax(){return this._boundsBuffer[4*this.getIndex()+2]}setBoundsXMax(e){this._boundsBuffer[4*this.getIndex()+2]=e}getBoundsYMax(){return this._boundsBuffer[4*this.getIndex()+3]}setBoundsYMax(e){this._boundsBuffer[4*this.getIndex()+3]=e}readAttributeAsTimestamp(e){const t=this.readAttribute(e);return"string"==typeof t?new Date(t).getTime():"number"==typeof t||null==t?t:null}readAttribute(e,t=!1){const r=this._readAttribute(e,t);if(void 0!==r)return r;for(const s of this._joined){s.setIndex(this.getIndex());const r=s._readAttribute(e,t);if(void 0!==r)return r}}readAttributes(){const e=this._readAttributes();for(const t of this._joined){t.setIndex(this.getIndex());const r=t._readAttributes();for(const t of Object.keys(r))e[t]=r[t]}return e}joinAttributes(e){this._joined.push(e)}registerOverrides(e){this._overrides=e}withoutOverrides(){const e=this.copy();return e._overrides=null,e}readOptimizedFeatureWorldSpace(){const e=this.readGeometryWorldSpace(),t=this.readAttributes(),r=this.readCentroidWorldSpace();return new f(e,t,r,this.getObjectId(),this.getDisplayId())}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyFeatureWorldSpace(){const e=this.readCentroidWorldSpace();return{attributes:this.readAttributes(),geometry:this._readLegacyGeometryWorldSpace(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return c(e,this.geometryType,!1,!1)}readXForDisplay(){return this._readX()}readYForDisplay(){return this._readY()}readXWorldSpace(){const e=this._readX(),t=this.getInTransform();return null==t?e:e*t.scale[0]+t.translate[0]}readYWorldSpace(){const e=this._readY(),t=this.getInTransform();return null==t?e:t.translate[1]-e*t.scale[1]}readGeometryForDisplay(){const e=this._readGeometryDeltaDecoded(!0);if(!e){const e=this._createDeltaQuantizedGeometryFromServerCentroid();return e?e.deltaDecode():null}return e}readGeometryForDisplayTransformed(e){let t=this.readGeometryForDisplay();if(t&&"esriGeometryPolyline"===this.metadata.geometryType&&(t=l(t,this.metadata.geometryType,e.scale[0])),t&&(t=m(t,e,this.metadata.geometryType)),!t){const t=this.readCentroidForDisplay();if(!t)return null;const r=d(e,t.coords[0]),s=u(e,t.coords[1]);return this._createDeltaQuantizedExtrudedGeometry(r,s).deltaDecode()}return t}readGeometryWorldSpace(){let e=this._readGeometry();if(e||(e=this._createDeltaQuantizedGeometryFromServerCentroid()),!e)return null;const t=e.clone(),r=this.getInTransform();return null!=r&&y(t,r),t}readCentroidForDisplay(){const e=this.readGeometryForDisplay();return e?this._computeDisplayCentroid(e):this._readServerCentroid()}readCentroidWorldSpace(){const e=this.readGeometryForDisplay(),t=e?this._computeDisplayCentroid(e):this._readServerCentroid();if(!t)return null;const r=t.clone(),s=this.getInTransform();return null!=s&&y(r,s),r}setCache(e){let t=this._caches.get(e);null==t&&(t=new b(this.getSize()),this._caches.set(e,t)),this._activeCache=t}setCachedValue(e){this._activeCache.set(this.getIndex(),e)}hasCachedValue(){return this._activeCache.has(this.getIndex())}getCachedValue(){return this._activeCache.get(this.getIndex())}get underlyingMemory(){let e=0;e+=t(this._boundsBuffer);for(const t of this._caches.values())e+=t.usedMemory;return e}_readGeometryDeltaDecoded(e){const t=this._readGeometry(e);return"esriGeometryPoint"!==this.geometryType&&t&&this.getInTransform()?t.deltaDecode():t}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this.fields.has(e)||this._joined.some(t=>t.hasField(e))}geometry(){const e=this.readGeometryWorldSpace(),t=c(e,this.geometryType,this.hasZ,this.hasM),r=a(t);if(r){if(!this.metadata.outSpatialReference)throw new Error("InternalError: Expected spatial reference to be defined");r.spatialReference=this.metadata.outSpatialReference}return r}autocastArcadeDate(t,r){return r&&r instanceof Date?this.isUnknownDateTimeField(t)?e.unknownDateJSToArcadeDate(r):e.dateJSAndZoneToArcadeDate(r,this.contextTimeZone??g):r}isUnknownDateTimeField(e){return this.metadata.fieldsIndex.getTimeZone(e)===_}field(t){let i=this.fields.get(t);if(i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(this.readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(this.readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(this.readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,this.readAttribute(t,!0));default:return this.readAttribute(t,!1)}for(const o of this._joined)if(o.setIndex(this.getIndex()),i=o.fields.get(t),i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(o._readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(o._readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(o._readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,o._readAttribute(t,!0));default:return this.readAttribute(t,!1)}throw new Error(`Field ${t} does not exist`)}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map(e=>e.name)}isEmpty(){return this.fields.fields.length<=0&&null==this.geometry()}castToText(e=!1){if(!e)return JSON.stringify(this.readLegacyFeatureForDisplay());const t=this.readLegacyFeatureForDisplay();if(!t)return JSON.stringify(null);const r={geometry:t.geometry,attributes:{...t.attributes}};for(const s in r.attributes){const e=r.attributes[s];e instanceof Date&&(r.attributes[s]=e.getTime())}return JSON.stringify(r)}gdbVersion(){return null}fullSchema(){return this.metadata.arcadeSchema}castAsJson(e=null){return{attributes:this._readAttributes(),geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}applyPostQueryFilter(e){if(this._postQueryFilteredIds.clear(),!e)return;const t=this.getCursor();for(;t.next();){e.check(t,{currentUser:null})||this._postQueryFilteredIds.add(t.getObjectId())}}_getExists(){if(this._overrides){const e=this.getObjectId();return!this._overrides.hasOverride(e)}return!this._postQueryFilteredIds.has(this.getObjectId())}_computeDisplayCentroid(e){if(null==this.getInTransform())return h(e);const t=i.fromOptimized(e,this.geometryType);t.yFactor*=-1;const r=n(t);return r?isNaN(r[0])||isNaN(r[1])?h(e):(r[1]*=-1,new p([],r)):null}copyInto(e){e._joined=this._joined,e._overrides=this._overrides,e._objectIdToIndex=this._objectIdToIndex,e._boundsBuffer=this._boundsBuffer,e._activeCache=this._activeCache,e._caches=this._caches,e._contextTimeZone=this._contextTimeZone,e._postQueryFilteredIds=this._postQueryFilteredIds}_readLegacyGeometryWorldSpace(){const e=this.readGeometryWorldSpace();return c(e,this.geometryType,!1,!1)}_createDeltaQuantizedGeometryFromServerCentroid(){const e=this._readServerCentroid();if(!e)return null;const[t,r]=e.coords;return this._createDeltaQuantizedExtrudedGeometry(t,r)}_createDeltaQuantizedExtrudedGeometry(e,t){return"esriGeometryPolyline"===this.geometryType?this._createDeltaQuantizedExtrudedLine(e,t):this._createDeltaQuantizedExtrudedQuad(e,t)}_createDeltaQuantizedExtrudedQuad(e,t){return new p([5],[e-1,t,1,-1,1,1,-1,1,-1,-1])}_createDeltaQuantizedExtrudedLine(e,t){return new p([2],[e-1,t+1,1,-1])}}export{O as FeatureSetReader};
2
+ import{ArcadeDate as e}from"../../../../../arcade/ArcadeDate.js";import has from"../../../../../core/has.js";import{estimateNumberArrayMemory as t}from"../../../../../core/memoryEstimations.js";import{DateOnly as r}from"../../../../../core/sql/DateOnly.js";import{TimeOnly as s}from"../../../../../core/sql/TimeOnly.js";import{GeometryCursor as i}from"../../../../../geometry/GeometryCursor.js";import{fromRectValues as o}from"../../../../../geometry/support/aaBoundingBox.js";import{fromJSON as a}from"../../../../../geometry/support/jsonUtils.js";import{getLabelPoint as n}from"../../../../../geometry/support/labelPoint.js";import{quantizeX as d,quantizeY as u}from"../../../../../geometry/support/quantizationUtils.js";import{getCentroidOptimizedGeometry as c}from"../../../../../layers/graphics/centroid.js";import{convertToGeometry as h,generalizeOptimizedGeometry as l,quantizeForDisplay as m,unquantizeOptimizedGeometryInPlace as y}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as f}from"../../../../../layers/graphics/OptimizedFeature.js";import p from"../../../../../layers/graphics/OptimizedGeometry.js";import{system as g,unknown as _}from"../../../../../time/constants.js";import{FeatureSetCache as b}from"./FeatureSetCache.js";const x=has("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],D=x[0],T=x[1],F=x[2],I=x[3],A=has("featurelayer-simplify-payload-size-factors")??[1,2,4],S=A[0],B=A[1],j=A[2],G=has("featurelayer-simplify-mobile-factor")??2,C=has("esri-mobile"),v=4294967295;function M(e,t,r){if(!(e.length>t))for(;e.length<=t;)e.push(r)}class O{constructor(e){this.metadata=e,this.type="FeatureSetReader",this._overrides=null,this._postQueryFilteredIds=new Set,this._joined=[],this._objectIdToIndex=null,this._boundsBuffer=[],this._caches=new Map,this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}destroy(){}[Symbol.dispose](){this.destroy()}getAreaSimplificationThreshold(e,t){let r=1;const s=C?G:1;t>4e6?r=j*s:t>1e6?r=B*s:t>5e5?r=S*s:t>1e5&&(r=s);let i=0;return e>4e3?i=I*r:e>2e3?i=F*r:e>100?i=T:e>15&&(i=D),i}getBounds(e){M(this._boundsBuffer,4*this.getIndex()+4,0);const t=this.getBoundsXMin();if(t===v||!isFinite(t))return!1;if(0===this.getBoundsXMin()){const t=this.readGeometryWorldSpace();if(t?.isPoint&&0===t.coords[0]&&0===t.coords[1])return o(e,0,0,0,0),!0;if(!t)return this.setBoundsXMin(v),!1;let r=1/0,s=1/0,i=-1/0,a=-1/0;return t.forEachVertex((e,t)=>{r=Math.min(r,e),s=Math.min(s,t),i=Math.max(i,e),a=Math.max(a,t)}),this.setBoundsXMin(r),this.setBoundsYMin(s),this.setBoundsXMax(i),this.setBoundsYMax(a),o(e,r,s,i,a),!0}const r=this.getBoundsXMin(),s=this.getBoundsYMin(),i=this.getBoundsXMax(),a=this.getBoundsYMax();return o(e,r,s,i,a),!0}getBoundsXMin(){return this._boundsBuffer[4*this.getIndex()]}setBoundsXMin(e){this._boundsBuffer[4*this.getIndex()]=e}getBoundsYMin(){return this._boundsBuffer[4*this.getIndex()+1]}setBoundsYMin(e){this._boundsBuffer[4*this.getIndex()+1]=e}getBoundsXMax(){return this._boundsBuffer[4*this.getIndex()+2]}setBoundsXMax(e){this._boundsBuffer[4*this.getIndex()+2]=e}getBoundsYMax(){return this._boundsBuffer[4*this.getIndex()+3]}setBoundsYMax(e){this._boundsBuffer[4*this.getIndex()+3]=e}readAttributeAsTimestamp(e){const t=this.readAttribute(e);return"string"==typeof t?new Date(t).getTime():"number"==typeof t||null==t?t:null}readAttribute(e,t=!1){const r=this._readAttribute(e,t);if(void 0!==r)return r;for(const s of this._joined){s.setIndex(this.getIndex());const r=s._readAttribute(e,t);if(void 0!==r)return r}}readAttributes(){const e=this._readAttributes();for(const t of this._joined){t.setIndex(this.getIndex());const r=t._readAttributes();for(const t of Object.keys(r))e[t]=r[t]}return e}joinAttributes(e){this._joined.push(e)}registerOverrides(e){this._overrides=e}withoutOverrides(){const e=this.copy();return e._overrides=null,e}readOptimizedFeatureWorldSpace(){const e=this.readGeometryWorldSpace(),t=this.readAttributes(),r=this.readCentroidWorldSpace();return new f(e,t,r,this.getObjectId(),this.getDisplayId())}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyFeatureWorldSpace(){const e=this.readCentroidWorldSpace();return{attributes:this.readAttributes(),geometry:this._readLegacyGeometryWorldSpace(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return h(e,this.geometryType,!1,!1)}readXForDisplay(){return this._readX()}readYForDisplay(){return this._readY()}readXWorldSpace(){const e=this._readX(),t=this.getInTransform();return null==t?e:e*t.scale[0]+t.translate[0]}readYWorldSpace(){const e=this._readY(),t=this.getInTransform();return null==t?e:t.translate[1]-e*t.scale[1]}readGeometryForDisplay(){const e=this._readGeometryDeltaDecoded(!0);if(!e){const e=this._createDeltaQuantizedGeometryFromServerCentroid();return e?e.deltaDecode():null}return e}readGeometryForDisplayTransformed(e){let t=this.readGeometryForDisplay();if(t&&"esriGeometryPolyline"===this.metadata.geometryType&&(t=l(t,this.metadata.geometryType,e.scale[0])),t&&(t=m(t,e,this.metadata.geometryType)),!t){const t=this.readCentroidForDisplay();if(!t)return null;const r=d(e,t.coords[0]),s=u(e,t.coords[1]);return this._createDeltaQuantizedExtrudedGeometry(r,s).deltaDecode()}return t}readGeometryWorldSpace(){let e=this._readGeometry();if(e||(e=this._createDeltaQuantizedGeometryFromServerCentroid()),!e)return null;const t=e.clone(),r=this.getInTransform();return null!=r&&y(t,r),t}readCentroidForDisplay(){const e=this.readGeometryForDisplay();return e?this._computeDisplayCentroid(e):this._readServerCentroid()}readCentroidWorldSpace(){const e=this.readGeometryForDisplay(),t=e?this._computeDisplayCentroid(e):this._readServerCentroid();if(!t)return null;const r=t.clone(),s=this.getInTransform();return null!=s&&y(r,s),r}setCache(e){let t=this._caches.get(e);null==t&&(t=new b(this.getSize()),this._caches.set(e,t)),this._activeCache=t}setCachedValue(e){this._activeCache.set(this.getIndex(),e)}hasCachedValue(){return this._activeCache.has(this.getIndex())}getCachedValue(){return this._activeCache.get(this.getIndex())}get underlyingMemory(){let e=0;e+=t(this._boundsBuffer);for(const t of this._caches.values())e+=t.usedMemory;return e}_readGeometryDeltaDecoded(e){const t=this._readGeometry(e);if("esriGeometryPoint"===this.geometryType||!t)return t;const r=this.getInTransform();if(!t||!r)return t;const s=r.scale[2]??1,i=r.translate[2]??0,o=r.scale[3]??1,a=r.translate[3]??0,{hasZ:n,hasM:d,stride:u,size:c,coords:h}=t,l=n&&(1!==s||0!==i),m=d&&(1!==o||0!==a);if(l||m){const e=2,t=n?3:2;for(let r=0,n=u*c;r<n;r+=u)l&&(h[r+e]=s*h[r+e]+i),m&&(h[r+t]=o*h[r+t]+a)}return t.deltaDecode()}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this.fields.has(e)||this._joined.some(t=>t.hasField(e))}geometry(){const e=this.readGeometryWorldSpace(),t=h(e,this.geometryType,this.hasZ,this.hasM),r=a(t);if(r){if(!this.metadata.outSpatialReference)throw new Error("InternalError: Expected spatial reference to be defined");r.spatialReference=this.metadata.outSpatialReference}return r}autocastArcadeDate(t,r){return r&&r instanceof Date?this.isUnknownDateTimeField(t)?e.unknownDateJSToArcadeDate(r):e.dateJSAndZoneToArcadeDate(r,this.contextTimeZone??g):r}isUnknownDateTimeField(e){return this.metadata.fieldsIndex.getTimeZone(e)===_}field(t){let i=this.fields.get(t);if(i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(this.readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(this.readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(this.readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,this.readAttribute(t,!0));default:return this.readAttribute(t,!1)}for(const o of this._joined)if(o.setIndex(this.getIndex()),i=o.fields.get(t),i)switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(o._readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(o._readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(o._readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,o._readAttribute(t,!0));default:return this.readAttribute(t,!1)}throw new Error(`Field ${t} does not exist`)}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map(e=>e.name)}isEmpty(){return this.fields.fields.length<=0&&null==this.geometry()}castToText(e=!1){if(!e)return JSON.stringify(this.readLegacyFeatureForDisplay());const t=this.readLegacyFeatureForDisplay();if(!t)return JSON.stringify(null);const r={geometry:t.geometry,attributes:{...t.attributes}};for(const s in r.attributes){const e=r.attributes[s];e instanceof Date&&(r.attributes[s]=e.getTime())}return JSON.stringify(r)}gdbVersion(){return null}fullSchema(){return this.metadata.arcadeSchema}castAsJson(e=null){return{attributes:this._readAttributes(),geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}applyPostQueryFilter(e){if(this._postQueryFilteredIds.clear(),!e)return;const t=this.getCursor();for(;t.next();){e.check(t,{currentUser:null})||this._postQueryFilteredIds.add(t.getObjectId())}}_getExists(){if(this._overrides){const e=this.getObjectId();return!this._overrides.hasOverride(e)}return!this._postQueryFilteredIds.has(this.getObjectId())}_computeDisplayCentroid(e){if(null==this.getInTransform())return c(e);const t=i.fromOptimized(e,this.geometryType);t.yFactor*=-1;const r=n(t);return r?isNaN(r[0])||isNaN(r[1])?c(e):(r[1]*=-1,new p([],r)):null}copyInto(e){e._joined=this._joined,e._overrides=this._overrides,e._objectIdToIndex=this._objectIdToIndex,e._boundsBuffer=this._boundsBuffer,e._activeCache=this._activeCache,e._caches=this._caches,e._contextTimeZone=this._contextTimeZone,e._postQueryFilteredIds=this._postQueryFilteredIds}_readLegacyGeometryWorldSpace(){const e=this.readGeometryWorldSpace();return h(e,this.geometryType,!1,!1)}_createDeltaQuantizedGeometryFromServerCentroid(){const e=this._readServerCentroid();if(!e)return null;const[t,r]=e.coords;return this._createDeltaQuantizedExtrudedGeometry(t,r)}_createDeltaQuantizedExtrudedGeometry(e,t){return"esriGeometryPolyline"===this.geometryType?this._createDeltaQuantizedExtrudedLine(e,t):this._createDeltaQuantizedExtrudedQuad(e,t)}_createDeltaQuantizedExtrudedQuad(e,t){return new p([5],[e-1,t,1,-1,1,1,-1,1,-1,-1])}_createDeltaQuantizedExtrudedLine(e,t){return new p([2],[e-1,t+1,1,-1])}}export{O as FeatureSetReader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import{assertIsSome as t}from"../../../../../core/maybe.js";import{baseObjectMemory as r}from"../../../../../core/memoryEstimations.js";import s from"../../../../../core/pbf.js";import a from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetCache as n}from"./FeatureSetCache.js";import{FeatureSetReader as i}from"./FeatureSetReader.js";import{parseHeader as h}from"./FeatureSetReaderPBFHeader.js";const o=268435455,d=128,u=128e3,c={small:{delta:new Int32Array(d),decoded:new Int32Array(d)},small64:{delta:new Float64Array(0),decoded:new Float64Array(0)},large:{delta:new Int32Array(u),decoded:new Int32Array(u)},large64:{delta:new Float64Array(0),decoded:new Float64Array(0)}};function l(e,t){return t?e<=c.small64.delta.length?c.small64:(e<=c.large64.delta.length||(c.large64.delta=new Float64Array(Math.round(1.25*e)),c.large64.decoded=new Float64Array(Math.round(1.25*e))),c.large64):e<=c.small.delta.length?c.small:(e<=c.large.delta.length||(c.large.delta=new Int32Array(Math.round(1.25*e)),c.large.decoded=new Int32Array(Math.round(1.25*e))),c.large)}function _(t){try{const e=new s(new Uint8Array(t),new DataView(t));for(;e.next();){if(2===e.tag())return g(e.getMessage());e.skip()}}catch(r){throw new e("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:r})}return null}function g(e){for(;e.next();){if(1===e.tag())return e.getMessage();e.skip()}return null}function f(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}function y(e,t,r,s,a){if(!e)return!1;return 0===t*a-s*r&&t*s+r*a>0}class m extends i{static fromBuffer(e,t,r=!1){const s=t.geometryType,a=_(e),n=h(a,"esriGeometryPoint"===s,t.featureIdInfo);return new m(a,n,t,r)}constructor(e,t,r,s){super(r),this._use64Bit=s,this._hasNext=!1,this._isPoints=!1,this._featureIndex=-1,this._featureOffset=0,this._cache={area:0,unquantGeometry:void 0,geometry:void 0},this._parseCaches=new Array,this._geometryType=r.geometryType,this._reader=e,this._header=t,this._hasNext=t.hasFeatures,this._isPoints="esriGeometryPoint"===r.geometryType}get _size(){return this._header.featureCount}get fields(){return this._header.fields}get geometryType(){return this._geometryType}get hasZ(){return this._header.hasZ}get hasM(){return this._header.hasM}get hasFeatures(){return this._header.hasFeatures}get hasNext(){return this._hasNext}get exceededTransferLimit(){return this._header.exceededTransferLimit}getSize(){return this._size}getInTransform(){return this._header.transform}getCursor(){return this.copy()}getIndex(){return this._featureIndex}setIndex(e){this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._featureIndex=e}getAttributeHash(){let e="";for(const t of this._header.fields.fields)e+=this._readAttributeAtIndex(t.index)+".";return e}getObjectId(){if(1===this._header.idFieldIndices.length)return this._readAttributeAtIndex(this._header.idFieldIndices[0]);const e=this._header.idFieldIndices.map(e=>this._readAttributeAtIndex(e));return JSON.stringify(e)}getDisplayId(){return this._header.displayIds[this._featureIndex]}setDisplayId(e){this._header.displayIds[this._featureIndex]=e}readGeometryArea(){return this._cache.area||this._readGeometry(!0),this._cache.area}copy(){const e=this._reader.clone(),t=new m(e,this._header,this.metadata,this._use64Bit);return this.copyInto(t),t}next(){for(this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0;++this._featureIndex<this._size&&!this._getExists(););return this._featureIndex<this._size}get usedMemory(){return r+(this._cache.geometry?.usedMemory??0)}get underlyingMemory(){return super.underlyingMemory+this._reader.usedMemory+this._header.usedMemory}_readX(){return this._header.centroid[this._featureIndex*this._header.stride]}_readY(){return this._header.centroid[this._featureIndex*this._header.stride+1]}_readServerCentroid(){const e=new a([],[],this.hasZ,this.hasM),{coords:t,stride:r}=e;for(let s=this._featureIndex*r,a=s+r;s<a;++s)t.push(this._header.centroid[s]);return t[0]===o?null:e}_readGeometry(e=!1){if(void 0===this._cache.geometry){let r=null;if(this._isPoints)r=this._readServerCentroid();else{const s=this._header.offsets.geometry[this._featureIndex],a=this._reader;if(0===s)return null;a.move(s);try{r=e?this._parseGeometryForDisplay(a):this._parseGeometry(a)}catch(t){return null}}return 0===r?.coords.length&&(r=null),this._cache.geometry=r,r}return this._cache.geometry}_readAttribute(e,t){const r=this._header.fields.get(e);if(null==r)return;const s=this._readAttributeAtIndex(r.index),a=this._header.fields.isDateField(r.name);return t?null==s?s:a?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._header.fields.fields)e[t.name]=this._readAttributeAtIndex(t.index);return e}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._featureOffset=this._featureOffset,e._hasNext=this._hasNext,e._parseCaches=this._parseCaches}_readAttributeAtIndex(e){let t=this._parseCaches[e];if(t||(t=new n(this.getSize()),this._parseCaches[e]=t),t.has(this._featureIndex))return t.get(this._featureIndex);const r=this._header.offsets.attributes[this._featureIndex*this._header.fieldCount+e],s=this._reader;s.move(r);const a=f(s);return t.set(this._featureIndex,a),a}_readGeometryDeltaDecoded(e=!1){if(void 0===this._cache.unquantGeometry){const t=this._readGeometry(e);if(!t)return this._cache.unquantGeometry=void 0,null;if(!this.getInTransform())return this._cache.unquantGeometry=t,t;const r=l(t.coords.length,this._use64Bit).decoded,s=t.clone(r),{lengths:a,coords:n,stride:i}=s;let h=0;for(const e of a){let t=n[h],r=n[h+1];h+=i;for(let s=1;s<e;++s)t=n[h]+=t,r=n[h+1]+=r,h+=i}return this._cache.unquantGeometry=s,s}return this._cache.unquantGeometry}_parseGeometry(e){const t=e.asUnsafe(),r=t.getPackedEnd(),s=[],n=[];for(;t.pos()<r&&t.next();)switch(t.tag()){case 2:{const e=t.getPackedEnd();for(;t.pos()<e;)n.push(t.getUInt32());break}case 3:{const e=t.getPackedEnd();for(;t.pos()<e;)s.push(t.getSInt64());break}default:t.skip()}return new a(n,s,this.hasZ,this.hasM)}_parseGeometryForDisplay(e){const r=e.asUnsafe(),s=r.getLength(),n=r.pos()+s,i=[],h=[];let o=0,d=0,u=null,c=0;const _="esriGeometryPolygon"===this.geometryType,g="esriGeometryPolyline"===this.geometryType,f=_?3:g?2:1,m=_||g;for(;r.pos()<n&&r.next();)switch(r.tag()){case 2:{const e=r.getUInt32(),t=r.pos()+e;for(;r.pos()<t;){const e=r.getUInt32();i.push(e),o+=e}u=l(2*o,this._use64Bit).delta;break}case 3:{r.getUInt32();const e=2+(this.hasZ?1:0)+(this.hasM?1:0);t(u);for(const t of i){if(d+e*t>u.length){for(let e=0;e<t;e++)r.getSInt64(),r.getSInt64(),this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64();continue}let s=r.getSInt64(),a=r.getSInt64();this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64(),u[d++]=s,u[d++]=a;let n=1;for(let e=1;e<t;e++){const e=r.getSInt64(),t=r.getSInt64();this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64();const i=s+e,h=a+t;c+=-.5*(i-s)*(h+a),s=i,a=h,0===e&&0===t||y(m,u[d-2],u[d-1],e,t)?(u[d-2]+=e,u[d-1]+=t):(u[d++]=e,u[d++]=t,n+=1)}n>=f?h.push(n):d-=n*e}break}default:r.skip()}return this._cache.area=c,h.length?new a(h,u,this.hasZ,this.hasM):null!=u?this._createDeltaQuantizedExtrudedGeometry(u[0],u[1]):null}}export{m as FeatureSetReaderPBF};
2
+ import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import{assertIsSome as t}from"../../../../../core/maybe.js";import{baseObjectMemory as r}from"../../../../../core/memoryEstimations.js";import s from"../../../../../core/pbf.js";import a from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetCache as n}from"./FeatureSetCache.js";import{FeatureSetReader as i}from"./FeatureSetReader.js";import{parseHeader as h}from"./FeatureSetReaderPBFHeader.js";const o=268435455,d=128,u=128e3,c={small:{delta:new Int32Array(d),decoded:new Int32Array(d)},small64:{delta:new Float64Array(0),decoded:new Float64Array(0)},large:{delta:new Int32Array(u),decoded:new Int32Array(u)},large64:{delta:new Float64Array(0),decoded:new Float64Array(0)}};function l(e,t){return t?e<=c.small64.delta.length?c.small64:(e<=c.large64.delta.length||(c.large64.delta=new Float64Array(Math.round(1.25*e)),c.large64.decoded=new Float64Array(Math.round(1.25*e))),c.large64):e<=c.small.delta.length?c.small:(e<=c.large.delta.length||(c.large.delta=new Int32Array(Math.round(1.25*e)),c.large.decoded=new Int32Array(Math.round(1.25*e))),c.large)}function _(t){try{const e=new s(new Uint8Array(t),new DataView(t));for(;e.next();){if(2===e.tag())return f(e.getMessage());e.skip()}}catch(r){throw new e("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:r})}return null}function f(e){for(;e.next();){if(1===e.tag())return e.getMessage();e.skip()}return null}function g(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}function y(e,t,r,s,a){if(!e)return!1;return 0===t*a-s*r&&t*s+r*a>0}class m extends i{static fromBuffer(e,t,r=!1){const s=t.geometryType,a=_(e),n=h(a,"esriGeometryPoint"===s,t.featureIdInfo);return new m(a,n,t,r)}constructor(e,t,r,s){super(r),this._use64Bit=s,this._hasNext=!1,this._isPoints=!1,this._featureIndex=-1,this._featureOffset=0,this._cache={area:0,unquantGeometry:void 0,geometry:void 0},this._parseCaches=new Array,this._geometryType=r.geometryType,this._reader=e,this._header=t,this._hasNext=t.hasFeatures,this._isPoints="esriGeometryPoint"===r.geometryType}get _size(){return this._header.featureCount}get fields(){return this._header.fields}get geometryType(){return this._geometryType}get hasZ(){return this._header.hasZ}get hasM(){return this._header.hasM}get hasFeatures(){return this._header.hasFeatures}get hasNext(){return this._hasNext}get exceededTransferLimit(){return this._header.exceededTransferLimit}getSize(){return this._size}getInTransform(){return this._header.transform}getCursor(){return this.copy()}getIndex(){return this._featureIndex}setIndex(e){this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._featureIndex=e}getAttributeHash(){let e="";for(const t of this._header.fields.fields)e+=this._readAttributeAtIndex(t.index)+".";return e}getObjectId(){if(1===this._header.idFieldIndices.length)return this._readAttributeAtIndex(this._header.idFieldIndices[0]);const e=this._header.idFieldIndices.map(e=>this._readAttributeAtIndex(e));return JSON.stringify(e)}getDisplayId(){return this._header.displayIds[this._featureIndex]}setDisplayId(e){this._header.displayIds[this._featureIndex]=e}readGeometryArea(){return this._cache.area||this._readGeometry(!0),this._cache.area}copy(){const e=this._reader.clone(),t=new m(e,this._header,this.metadata,this._use64Bit);return this.copyInto(t),t}next(){for(this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0;++this._featureIndex<this._size&&!this._getExists(););return this._featureIndex<this._size}get usedMemory(){return r+(this._cache.geometry?.usedMemory??0)}get underlyingMemory(){return super.underlyingMemory+this._reader.usedMemory+this._header.usedMemory}_readX(){return this._header.centroid[this._featureIndex*this._header.stride]}_readY(){return this._header.centroid[this._featureIndex*this._header.stride+1]}_readServerCentroid(){const e=new a([],[],this.hasZ,this.hasM),{coords:t,stride:r}=e;for(let s=this._featureIndex*r,a=s+r;s<a;++s)t.push(this._header.centroid[s]);return t[0]===o?null:e}_readGeometry(e=!1){if((this.hasZ||this.hasM)&&(e=!1),void 0===this._cache.geometry){let r=null;if(this._isPoints)r=this._readServerCentroid();else{const s=this._header.offsets.geometry[this._featureIndex],a=this._reader;if(0===s)return null;a.move(s);try{r=e?this._parseGeometryForDisplay(a):this._parseGeometry(a)}catch(t){return null}}return 0===r?.coords.length&&(r=null),this._cache.geometry=r,r}return this._cache.geometry}_readAttribute(e,t){const r=this._header.fields.get(e);if(null==r)return;const s=this._readAttributeAtIndex(r.index),a=this._header.fields.isDateField(r.name);return t?null==s?s:a?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._header.fields.fields)e[t.name]=this._readAttributeAtIndex(t.index);return e}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._featureOffset=this._featureOffset,e._hasNext=this._hasNext,e._parseCaches=this._parseCaches}_readAttributeAtIndex(e){let t=this._parseCaches[e];if(t||(t=new n(this.getSize()),this._parseCaches[e]=t),t.has(this._featureIndex))return t.get(this._featureIndex);const r=this._header.offsets.attributes[this._featureIndex*this._header.fieldCount+e],s=this._reader;s.move(r);const a=g(s);return t.set(this._featureIndex,a),a}_readGeometryDeltaDecoded(e){if(void 0===this._cache.unquantGeometry){const t=this._readGeometry(e);if(!t)return this._cache.unquantGeometry=void 0,null;const r=this.getInTransform();if(!r)return this._cache.unquantGeometry=t,t;const s=r.scale[2]??1,a=r.translate[2]??1,n=r.scale[3]??1,i=r.translate[3]??1,h=l(t.coords.length,this._use64Bit).decoded,o=t.clone(h);this._cache.unquantGeometry=o;const{lengths:d,coords:u,hasZ:c,hasM:_}=o,f=c&&(1!==s||0!==a),g=_&&(1!==n||0!==i);let y=0;for(const e of d){let t=u[y++],r=u[y++];if(f){const e=u[y];u[y++]=s*e+a}if(g){const e=u[y];u[y++]=n*e+i}for(let h=1;h<e;++h){if(t=u[y++]+=t,r=u[y++]+=r,f){const e=u[y];u[y++]=s*e+a}if(g){const e=u[y];u[y++]=n*e+i}}}return o}return this._cache.unquantGeometry}_parseGeometry(e){const t=e.asUnsafe(),r=t.getPackedEnd(),s=[],n=[];for(;t.pos()<r&&t.next();)switch(t.tag()){case 2:{const e=t.getPackedEnd();for(;t.pos()<e;)n.push(t.getUInt32());break}case 3:{const e=t.getPackedEnd();for(;t.pos()<e;)s.push(t.getSInt64());break}default:t.skip()}return new a(n,s,this.hasZ,this.hasM)}_parseGeometryForDisplay(e){const r=e.asUnsafe(),s=r.getLength(),n=r.pos()+s,i=[],h=[];let o=0,d=0,u=null,c=0;const _="esriGeometryPolygon"===this.geometryType,f="esriGeometryPolyline"===this.geometryType,g=_?3:f?2:1,m=_||f;for(;r.pos()<n&&r.next();)switch(r.tag()){case 2:{const e=r.getUInt32(),t=r.pos()+e;for(;r.pos()<t;){const e=r.getUInt32();i.push(e),o+=e}u=l(2*o,this._use64Bit).delta;break}case 3:{r.getUInt32();const e=2+(this.hasZ?1:0)+(this.hasM?1:0);t(u);for(const t of i){if(d+e*t>u.length){for(let e=0;e<t;e++)r.getSInt64(),r.getSInt64(),this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64();continue}let s=r.getSInt64(),a=r.getSInt64();this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64(),u[d++]=s,u[d++]=a;let n=1;for(let e=1;e<t;e++){const e=r.getSInt64(),t=r.getSInt64();this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64();const i=s+e,h=a+t;c+=-.5*(i-s)*(h+a),s=i,a=h,0===e&&0===t||y(m,u[d-2],u[d-1],e,t)?(u[d-2]+=e,u[d-1]+=t):(u[d++]=e,u[d++]=t,n+=1)}n>=g?h.push(n):d-=n*e}break}default:r.skip()}return this._cache.area=c,h.length?new a(h,u):null!=u?this._createDeltaQuantizedExtrudedGeometry(u[0],u[1]):null}}export{m as FeatureSetReaderPBF};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import"../../../core/has.js";import{watch as i,sync as n,syncAndInitial as r,when as s}from"../../../core/reactiveUtils.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import{length as h,equals as l,copy as c,scale as g,lerp as p}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as d,create as m,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isEarth as v,getReferenceEllipsoid as _}from"../../../geometry/ellipsoidUtils.js";import{isLoadedOrLoadFor as f}from"../../../geometry/projectionUtils.js";import w from"../../../geometry/SpatialReference.js";import{projectPointToVector as P}from"../../../geometry/projection/projectPointToVector.js";import{getGCSForPlanet as y}from"../../../geometry/support/planetGCSUtils.js";import{heightLimit as b}from"./weather.js";import{positionToTimezoneInfo as T}from"../support/earthUtils.js";import{ColorAndIntensity as L,computeColorAndIntensity as j,computeVirtualLightDirection as G,computeShadowsEnabled as U}from"../support/sunUtils.js";import{MainLight as H,AmbientLight as C,FillLight as E}from"../webgl-engine/lighting/Lightsources.js";let R=class extends t{constructor(e){super(e),this.view=null,this._tmpLightParameters=new L,this._defaultLightParameters=new L,this._tmpDate=new Date,this._tmpTz={hours:0,minutes:0,seconds:0},this._viewHandlesKey="viewHandles",this._trackingEnabled=!1,this._mainLight=new H,this._ambientLight=new C,this._moonLight=new E,this._disableWeather=!1,this._resetReferencePosition()}destroy(){this.disconnectView()}get updating(){return!this._canProjectCameraPosition}get weatherEnabled(){return null!=this.view&&null!=this.view.stage&&null!=this.view.stage.renderer.weatherFader&&this.view.environment.atmosphereEnabled&&!this._disableWeather&&1===this.view.state?.viewingMode&&v(this.view.spatialReference)}get _weatherAvailable(){return null!=this.view&&this.weatherEnabled&&h(this.view.state.camera.eye)-_(this.view.spatialReference).radius<=b}get referencePositionGeographic(){return this._referencePositionGeographic}get _canProjectCameraPosition(){const e=this.view?.stateManager?.camera?.position?.spatialReference??w.WGS84,t=y(e);return f(e,t)}connectView(e){this.view=e;const t=()=>this._updateRenderParameters(),o=()=>this._cameraHandler();this.addHandles([i(()=>e.environment.lighting,e=>this._updateLightingHandler(e),n),i(()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null,e=>this._lightingDateHandler(e),n),i(()=>e.environment.lighting.directShadowsEnabled,t,n),i(()=>e.spatialReference,()=>this._resetReferencePosition(!0),n),i(()=>[e.environment.weather.type,this.weatherEnabled],()=>this._updateLighting(null,1),n),i(()=>e.environment,e=>e.setComputeWeatherAvailable(()=>this._weatherAvailable),r),i(()=>e.viewingMode,()=>this._resetReferencePosition(!0),r),i(()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled,e=>this._updateCameraTracking(e),r),i(()=>e.state.camera,o,r),s(()=>this._canProjectCameraPosition,()=>this._resetReferencePosition(!0),n)],this._viewHandlesKey),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this.removeHandles(this._viewHandlesKey),this._resetReferencePosition()}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{if(!this.view)return;const e=this.view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){if(!this.view)return;const t=this.view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated&&(this._preupdateTracking(e),null!=this._referencePositionGeographic)){const e=T(this._referencePositionGeographic,this._tmpTz);null!=e&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){this.view&&!this._trackingEnabled&&"virtual"!==this.view.environment.lighting.type&&this.view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this.view;if(!t||!t.ready)return;const i=t.stateManager.camera;if(!i)return;const n=i.position,r=n.spatialReference??w.WGS84,s=y(r);if(!P(n,M,s,z)){if(null==this._referencePositionGeographic)return;return this._referencePositionGeographic=null,void this._updateLighting()}this._referencePositionGeographic?l(this._referencePositionGeographic,M)||(c(this._referencePositionGeographic,M),this.notifyChange("referencePositionGeographic")):this._referencePositionGeographic=d(M),this._autoUpdateTimezone(this._referencePositionGeographic,e)||this._updateLighting(e)}_updateLighting(e,t=0){const i=this.view;if(!i)return;const{lighting:n}=i.environment,r="virtual"===n.type,s=this._referencePositionGeographic,o=null!=s?this._tmpLightParameters:this._defaultLightParameters;if(s){e??=r?null:n.date;const t=this._weatherAvailable?i.environment.weather.type:"disabled";j(e,s,i.state.viewingMode,t,i.state.camera,o)}else r&&G(i.state.camera,i.state.viewingMode,o.direct.directionToLightSource);const a=this._mainLight,h=o.direct;g(a.intensity,h.color,h.intensity*Math.PI),c(a.direction,h.directionToLightSource),a.specularStrength=o.specularStrength,a.environmentStrength=o.environmentStrength;const l=this._ambientLight;g(l.intensity,o.ambient.color,o.ambient.intensity);const d=this._moonLight;p(d.intensity,S,k,o.globalFactor);const m=(1-.5*o.globalFactor)*(1-.4*o.noonFactor*(1-o.globalFactor));g(d.intensity,d.intensity,m),c(d.direction,h.directionToLightSource),i.stage?.renderer.updateLighting([a,l,d],o.noonFactor,o.globalFactor,this._weatherAvailable?t:0),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if(!this.view||"virtual"===this.view.environment.lighting.type||!this.view.environment.lighting.cameraTrackingEnabled||null==e)return!1;const i=this._tmpDate;i.setTime((t||this.view.environment.lighting.date).getTime());const n=T(e,this._tmpTz);if(null==n)return!1;let r=this.view.environment.lighting.positionTimezoneInfo;if(r.autoUpdated){if(r.hours===n.hours&&r.minutes===n.minutes&&r.seconds===n.seconds)return!1}else r=n;const s=i.getUTCHours()-(n.hours-r.hours),o=i.getUTCMinutes()-(n.minutes-r.minutes),a=i.getUTCSeconds()-(n.seconds-r.seconds);return i.setUTCHours(s),i.setUTCMinutes(o),i.setUTCSeconds(a),!t&&this.view.environment.lighting.autoUpdate(i,n)}_updateRenderParameters(){const e=this.view?.stage;if(!this.view||!e)return;const t=null==this._referencePositionGeographic||U(this._referencePositionGeographic[2],this.view.state.viewingMode);e.renderer.setParameters({shadowMap:this.view.environment.lighting.directShadowsEnabled&&t})}_resetReferencePosition(e=!1){this._referencePositionGeographic=null,e&&this._cameraHandler()}get test(){}};e([o()],R.prototype,"view",void 0),e([o({type:Boolean,readOnly:!0})],R.prototype,"updating",null),e([o()],R.prototype,"_disableWeather",void 0),e([o()],R.prototype,"weatherEnabled",null),e([o()],R.prototype,"_weatherAvailable",null),e([o()],R.prototype,"referencePositionGeographic",null),e([o()],R.prototype,"_referencePositionGeographic",void 0),e([o()],R.prototype,"_canProjectCameraPosition",null),R=e([a("esri.views.3d.environment.EnvironmentManager")],R);const S=u(.22,.22,.33),k=u(.22,.22,.22),M=m(),z={zConversionDisabled:!0};export{R as EnvironmentManager};
2
+ import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import"../../../core/has.js";import{watch as i,sync as n,syncAndInitial as r,when as s}from"../../../core/reactiveUtils.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import{length as h,equals as l,copy as c,scale as g,lerp as p}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as d,create as m,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isEarth as v,getReferenceEllipsoid as _}from"../../../geometry/ellipsoidUtils.js";import{isLoadedOrLoadFor as f}from"../../../geometry/projectionUtils.js";import w from"../../../geometry/SpatialReference.js";import{projectPointToVector as P}from"../../../geometry/projection/projectPointToVector.js";import{getGCSForPlanet as y}from"../../../geometry/support/planetGCSUtils.js";import{heightLimit as b}from"./weather.js";import{positionToTimezoneInfo as T}from"../support/earthUtils.js";import{ColorAndIntensity as L,computeColorAndIntensity as j,computeVirtualLightDirection as G,computeShadowsEnabled as U}from"../support/sunUtils.js";import{MainLight as H,AmbientLight as C,FillLight as E}from"../webgl-engine/lighting/Lightsources.js";let R=class extends t{constructor(e){super(e),this.view=null,this._tmpLightParameters=new L,this._defaultLightParameters=new L,this._tmpDate=new Date,this._tmpTz={hours:0,minutes:0,seconds:0},this._viewHandlesKey="viewHandles",this._trackingEnabled=!1,this._mainLight=new H,this._ambientLight=new C,this._moonLight=new E,this._disableWeather=!1,this._resetReferencePosition()}destroy(){this.disconnectView()}get updating(){return!this._canProjectCameraPosition}get weatherEnabled(){return null!=this.view&&null!=this.view.stage&&null!=this.view.stage.renderer&&null!=this.view.stage.renderer.weatherFader&&this.view.environment.atmosphereEnabled&&!this._disableWeather&&1===this.view.state?.viewingMode&&v(this.view.spatialReference)}get _weatherAvailable(){return null!=this.view&&this.weatherEnabled&&h(this.view.state.camera.eye)-_(this.view.spatialReference).radius<=b}get referencePositionGeographic(){return this._referencePositionGeographic}get _canProjectCameraPosition(){const e=this.view?.stateManager?.camera?.position?.spatialReference??w.WGS84,t=y(e);return f(e,t)}connectView(e){this.view=e;const t=()=>this._updateRenderParameters(),o=()=>this._cameraHandler();this.addHandles([i(()=>e.environment.lighting,e=>this._updateLightingHandler(e),n),i(()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null,e=>this._lightingDateHandler(e),n),i(()=>e.environment.lighting.directShadowsEnabled,t,n),i(()=>e.spatialReference,()=>this._resetReferencePosition(!0),n),i(()=>[e.environment.weather.type,this.weatherEnabled],()=>this._updateLighting(null,1),n),i(()=>e.environment,e=>e.setComputeWeatherAvailable(()=>this._weatherAvailable),r),i(()=>e.viewingMode,()=>this._resetReferencePosition(!0),r),i(()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled,e=>this._updateCameraTracking(e),r),i(()=>e.state.camera,o,r),s(()=>this._canProjectCameraPosition,()=>this._resetReferencePosition(!0),n)],this._viewHandlesKey),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this.removeHandles(this._viewHandlesKey),this._resetReferencePosition()}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{if(!this.view)return;const e=this.view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){if(!this.view)return;const t=this.view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated&&(this._preupdateTracking(e),null!=this._referencePositionGeographic)){const e=T(this._referencePositionGeographic,this._tmpTz);null!=e&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){this.view&&!this._trackingEnabled&&"virtual"!==this.view.environment.lighting.type&&this.view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this.view;if(!t||!t.ready)return;const i=t.stateManager.camera;if(!i)return;const n=i.position,r=n.spatialReference??w.WGS84,s=y(r);if(!P(n,M,s,z)){if(null==this._referencePositionGeographic)return;return this._referencePositionGeographic=null,void this._updateLighting()}this._referencePositionGeographic?l(this._referencePositionGeographic,M)||(c(this._referencePositionGeographic,M),this.notifyChange("referencePositionGeographic")):this._referencePositionGeographic=d(M),this._autoUpdateTimezone(this._referencePositionGeographic,e)||this._updateLighting(e)}_updateLighting(e,t=0){const i=this.view;if(!i)return;const{lighting:n}=i.environment,r="virtual"===n.type,s=this._referencePositionGeographic,o=null!=s?this._tmpLightParameters:this._defaultLightParameters;if(s){e??=r?null:n.date;const t=this._weatherAvailable?i.environment.weather.type:"disabled";j(e,s,i.state.viewingMode,t,i.state.camera,o)}else r&&G(i.state.camera,i.state.viewingMode,o.direct.directionToLightSource);const a=this._mainLight,h=o.direct;g(a.intensity,h.color,h.intensity*Math.PI),c(a.direction,h.directionToLightSource),a.specularStrength=o.specularStrength,a.environmentStrength=o.environmentStrength;const l=this._ambientLight;g(l.intensity,o.ambient.color,o.ambient.intensity);const d=this._moonLight;p(d.intensity,S,k,o.globalFactor);const m=(1-.5*o.globalFactor)*(1-.4*o.noonFactor*(1-o.globalFactor));g(d.intensity,d.intensity,m),c(d.direction,h.directionToLightSource),i.stage?.renderer.updateLighting([a,l,d],o.noonFactor,o.globalFactor,this._weatherAvailable?t:0),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if(!this.view||"virtual"===this.view.environment.lighting.type||!this.view.environment.lighting.cameraTrackingEnabled||null==e)return!1;const i=this._tmpDate;i.setTime((t||this.view.environment.lighting.date).getTime());const n=T(e,this._tmpTz);if(null==n)return!1;let r=this.view.environment.lighting.positionTimezoneInfo;if(r.autoUpdated){if(r.hours===n.hours&&r.minutes===n.minutes&&r.seconds===n.seconds)return!1}else r=n;const s=i.getUTCHours()-(n.hours-r.hours),o=i.getUTCMinutes()-(n.minutes-r.minutes),a=i.getUTCSeconds()-(n.seconds-r.seconds);return i.setUTCHours(s),i.setUTCMinutes(o),i.setUTCSeconds(a),!t&&this.view.environment.lighting.autoUpdate(i,n)}_updateRenderParameters(){const e=this.view?.stage;if(!this.view||!e)return;const t=null==this._referencePositionGeographic||U(this._referencePositionGeographic[2],this.view.state.viewingMode);e.renderer.setParameters({shadowMap:this.view.environment.lighting.directShadowsEnabled&&t})}_resetReferencePosition(e=!1){this._referencePositionGeographic=null,e&&this._cameraHandler()}get test(){}};e([o()],R.prototype,"view",void 0),e([o({type:Boolean,readOnly:!0})],R.prototype,"updating",null),e([o()],R.prototype,"_disableWeather",void 0),e([o()],R.prototype,"weatherEnabled",null),e([o()],R.prototype,"_weatherAvailable",null),e([o()],R.prototype,"referencePositionGeographic",null),e([o()],R.prototype,"_referencePositionGeographic",void 0),e([o()],R.prototype,"_canProjectCameraPosition",null),R=e([a("esri.views.3d.environment.EnvironmentManager")],R);const S=u(.22,.22,.33),k=u(.22,.22,.22),M=m(),z={zConversionDisabled:!0};export{R as EnvironmentManager};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import r from"../../../core/Error.js";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a,subclass as u}from"../../../core/accessorSupport/decorators.js";import{getObjectId as o}from"../../../layers/graphics/dehydratedFeatures.js";import{packFields as n}from"../../../layers/support/fieldUtils.js";import{FeatureLikeLayerViewBase3D as p}from"./FeatureLikeLayerViewBase3D.js";import{FeatureGraphics3DGraphicsPipeline as l}from"./graphics/FeatureGraphics3DGraphicsPipeline.js";import{updatingProgress as d}from"../support/updatingProperties.js";const c=c=>{const m=p(c);let h=class extends m{initialize(){this.addHandles(i(()=>this._updatingRequiredPromise,e=>this._updatingHandles.addPromise(e),s))}destroy(){this._updatingHandles.removeAll(),this._fetcherContext=t(this._fetcherContext)}get maximumNumberOfFeatures(){return this.graphicsPipeline.maximumNumberOfFeatures}set maximumNumberOfFeatures(e){this.graphicsPipeline.maximumNumberOfFeatures=e}get maximumNumberOfFeaturesExceeded(){return null!=this.graphicsPipeline&&!this.suspended&&this.graphicsPipeline.maximumNumberOfFeaturesExceeded}get updatingProgressValue(){return this.graphicsPipeline?.updatingProgressValue??0}get updatePolicy(){return this.graphicsPipeline?.updatePolicy??0}get snappingComplexityExceeded(){return this.graphicsPipeline?.snappingComplexityExceeded??!0}get hasZ(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsZ)&&("returnZ"in e&&null!=e.returnZ?e.returnZ:r.supportsZ)}get hasM(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsM)&&("returnM"in e&&null!=e.returnM&&e.returnM)}get availableFieldsForQuery(){return n(this.layer.fieldsIndex,this.availableFields)}setVisibility(e,r){this.graphicsPipeline?.setVisibility(e,r)}queryFeatures(e,r){const t=()=>super.queryFeatures(e,r);return"mesh"===this.layer.geometryType?this._queryFeaturesMesh(this._ensureQuery(e),t):t()}async createGraphicsPipeline(){return new l({layerView:this})}async doRefresh(e){return await this.graphicsPipeline.doRefresh(e)}_popupFeatureHasRequiredFields(e,r){if(!super._popupFeatureHasRequiredFields(e,r))return!1;const t=o(e,this.layer.objectIdField);if(null==t)return!0;const i=this.graphicsPipeline.getMissingAttributesForFeature(t);if(null==i)return!0;for(const s of r)if(i.has(s))return!1;return!0}get usedMemory(){return this.graphicsPipeline?.usedMemory??0}get unloadedMemory(){return this.graphicsPipeline?.unloadedMemory??0}get ignoresMemoryFactor(){return this.graphicsPipeline?.ignoresMemoryFactor??!1}async _queryFeaturesMesh(e,r){this._validateQueryFeaturesMesh(e);const t=await r(),i=this.graphicsPipeline;if(e?.outStatistics||null==i)return t;const s=this.layer.objectIdField,a=[];for(const u of t.features)if(u.geometry){const e=i.getHydratedGeometry(u.attributes[s]);e&&(u.geometry=e,a.push(u))}else a.push(u);return t.features=a,t}_validateQueryFeaturesMesh(e){if(!e)return;const t=e=>{throw new r("feature-layer-view:unsupported-query",`Queries on Mesh feature collection layers do not support '${e}'`)},i=["quantizationParameters","geometryPrecision","maxAllowableOffset"];for(const r of i)null!=e[r]&&t(r);"returnM"in e&&e.returnM&&t("returnM"),"returnCentroid"in e&&e.returnCentroid&&t("returnCentroid"),null==e.outSpatialReference||e.outSpatialReference.equals(this.view.spatialReference)||t("outSpatialReference")}get test(){}};return e([a()],h.prototype,"layer",void 0),e([a()],h.prototype,"graphicsPipeline",void 0),e([a()],h.prototype,"maximumNumberOfFeatures",null),e([a()],h.prototype,"maximumNumberOfFeaturesExceeded",null),e([a(d)],h.prototype,"updatingProgress",void 0),e([a({readOnly:!0})],h.prototype,"updatingProgressValue",null),e([a({readOnly:!0})],h.prototype,"updatePolicy",null),e([a()],h.prototype,"snappingComplexityExceeded",null),e([a({readOnly:!0})],h.prototype,"hasZ",null),e([a({readOnly:!0})],h.prototype,"hasM",null),e([a()],h.prototype,"availableFieldsForQuery",null),h=e([u("esri.views.3d.layers.FeatureLikeLayerView3D")],h),h};export{c as FeatureLikeLayerView3D};
2
+ import{__decorate as e}from"tslib";import r from"../../../core/Error.js";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a,subclass as u}from"../../../core/accessorSupport/decorators.js";import{getObjectId as o}from"../../../layers/graphics/dehydratedFeatures.js";import{packFields as n}from"../../../layers/support/fieldUtils.js";import{FeatureLikeLayerViewBase3D as p}from"./FeatureLikeLayerViewBase3D.js";import{FeatureGraphics3DGraphicsPipeline as l}from"./graphics/FeatureGraphics3DGraphicsPipeline.js";import{updatingProgress as d}from"../support/updatingProperties.js";const m=m=>{const c=p(m);let h=class extends c{initialize(){this._defaultReturnZ=!0,this.addHandles(i(()=>this._updatingRequiredPromise,e=>this._updatingHandles.addPromise(e),s))}destroy(){this._updatingHandles.removeAll(),this._fetcherContext=t(this._fetcherContext)}get maximumNumberOfFeatures(){return this.graphicsPipeline.maximumNumberOfFeatures}set maximumNumberOfFeatures(e){this.graphicsPipeline.maximumNumberOfFeatures=e}get maximumNumberOfFeaturesExceeded(){return null!=this.graphicsPipeline&&!this.suspended&&this.graphicsPipeline.maximumNumberOfFeaturesExceeded}get updatingProgressValue(){return this.graphicsPipeline?.updatingProgressValue??0}get updatePolicy(){return this.graphicsPipeline?.updatePolicy??0}get snappingComplexityExceeded(){return this.graphicsPipeline?.snappingComplexityExceeded??!0}get availableFieldsForQuery(){return n(this.layer.fieldsIndex,this.availableFields)}setVisibility(e,r){this.graphicsPipeline?.setVisibility(e,r)}queryFeatures(e,r){const t=()=>super.queryFeatures(e,r);return"mesh"===this.layer.geometryType?this._queryFeaturesMesh(this._ensureQuery(e),t):t()}async createGraphicsPipeline(){return new l({layerView:this})}async doRefresh(e){return await this.graphicsPipeline.doRefresh(e)}_popupFeatureHasRequiredFields(e,r){if(!super._popupFeatureHasRequiredFields(e,r))return!1;const t=o(e,this.layer.objectIdField);if(null==t)return!0;const i=this.graphicsPipeline.getMissingAttributesForFeature(t);if(null==i)return!0;for(const s of r)if(i.has(s))return!1;return!0}get usedMemory(){return this.graphicsPipeline?.usedMemory??0}get unloadedMemory(){return this.graphicsPipeline?.unloadedMemory??0}get ignoresMemoryFactor(){return this.graphicsPipeline?.ignoresMemoryFactor??!1}async _queryFeaturesMesh(e,r){this._validateQueryFeaturesMesh(e);const t=await r(),i=this.graphicsPipeline;if(e?.outStatistics||null==i)return t;const s=this.layer.objectIdField,a=[];for(const u of t.features)if(u.geometry){const e=i.getHydratedGeometry(u.attributes[s]);e&&(u.geometry=e,a.push(u))}else a.push(u);return t.features=a,t}_validateQueryFeaturesMesh(e){if(!e)return;const t=e=>{throw new r("feature-layer-view:unsupported-query",`Queries on Mesh feature collection layers do not support '${e}'`)},i=["quantizationParameters","geometryPrecision","maxAllowableOffset"];for(const r of i)null!=e[r]&&t(r);"returnM"in e&&e.returnM&&t("returnM"),"returnCentroid"in e&&e.returnCentroid&&t("returnCentroid"),null==e.outSpatialReference||e.outSpatialReference.equals(this.view.spatialReference)||t("outSpatialReference")}get test(){}};return e([a()],h.prototype,"layer",void 0),e([a()],h.prototype,"graphicsPipeline",void 0),e([a()],h.prototype,"maximumNumberOfFeatures",null),e([a()],h.prototype,"maximumNumberOfFeaturesExceeded",null),e([a(d)],h.prototype,"updatingProgress",void 0),e([a({readOnly:!0})],h.prototype,"updatingProgressValue",null),e([a({readOnly:!0})],h.prototype,"updatePolicy",null),e([a()],h.prototype,"snappingComplexityExceeded",null),e([a()],h.prototype,"availableFieldsForQuery",null),h=e([u("esri.views.3d.layers.FeatureLikeLayerView3D")],h),h};export{m as FeatureLikeLayerView3D};