@arcgis/core 5.2.0-next.126 → 5.2.0-next.127

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 (220) hide show
  1. package/applications/Components/basemapToggleUtils.d.ts +53 -0
  2. package/applications/Components/basemapToggleUtils.js +2 -0
  3. package/arcgisGlobal.d.ts +1 -0
  4. package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
  5. package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{e35eb93c0fb1f6de8db0.js → 00d9e41deecf5828975c.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{ab8a1140bf31f46f8ebf.js → 1262918b2161d79851c0.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d3ef23923424ad8c5048.js → 1c2723f9630e7d597843.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{9ca98fffd43e63d5ade3.js → 1c33aa349beea9a3792f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js → 2226c20c38e20713bcb5.js} +2 -2
  12. package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js.LICENSE.txt → 2226c20c38e20713bcb5.js.LICENSE.txt} +2 -2
  13. package/assets/esri/core/workers/chunks/{fdbda3d2afea25142b86.js → 26995de0c18bef8db590.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{806f96ad09e882be41af.js → 2c7fc24649d91552e68a.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{4d18451e0ea6ca54101a.js → 2ebad7e588b26e74cefe.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{a8258636096416c837a2.js → 3b7dff15a0058ea29886.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{4716693eca44e8f89f5c.js → 3bf56c33876ba56c4b21.js} +1 -1
  18. package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +1 -0
  19. package/assets/esri/core/workers/chunks/{5fe5ef5ccf480634d159.js → 50c29d10ec53f0e48e8a.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{56acda1eed3a013430e2.js → 58fb92775d668cfd295c.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 668ec0bdfb2095e90c9e.js} +1 -1
  22. package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +1 -0
  23. package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 86d7a3ae672a51b75fcc.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{30604a29df320d7a4c6b.js → 88e11b645a1361f1bdbe.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{c692e583e87af58f6d91.js → 8b0d6205ceeec1ab446f.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{57ab87e70ef85b9405f9.js → 8cb216404a6254bc695c.js} +1 -0
  27. package/assets/esri/core/workers/chunks/{b96358d475dc98034aa4.js → a15ed056e7493ddf3b4c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{25e212fe9a2ea37c9e81.js → a3a33ffa34f4d645ddfe.js} +1 -1
  29. package/assets/esri/core/workers/chunks/af0704494398f33aa315.js +1 -0
  30. package/assets/esri/core/workers/chunks/{ce1ccf9ec90b786591e5.js → b396c4b4bb144200acc7.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{97602019a1ccad22a03a.js → bbfb80a6983574007ce5.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{d5f72670634e73c0b53a.js → bcf2e5cf6b9c6d0442bb.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{17218d714cb07b607c2f.js → c35e9dee87937f483a3d.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{85739ed6af0f0a3cb302.js → c94bdfed831c775e04c0.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{2e3fd81653dc0d86456c.js → cfeba0ffb7fdc2a9af05.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{cb7cb7d57c4e7f76600f.js → dc92710a8fdfb9135e55.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{e1ae83ff3e0225708d4d.js → f479b4a4cee4bb2e046c.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{78abd6c42f39e6f6ffbb.js → f983296b6f4a62a911eb.js} +1 -1
  39. package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
  40. package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
  41. package/assets/esri/images/portal/propresentation16.png +0 -0
  42. package/assets/esri/images/portal/urbanproject16.png +0 -0
  43. package/assets/esri/images/support/loading-throb.gif +0 -0
  44. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  45. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-arabic.woff2 +0 -0
  46. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-cyrillic.woff2 +0 -0
  47. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-ext.woff2 +0 -0
  48. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-georgian.woff2 +0 -0
  49. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-greek.woff2 +0 -0
  50. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-hebrew.woff2 +0 -0
  51. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-math.woff2 +0 -0
  52. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-thai.woff2 +0 -0
  53. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-vietnamese.woff2 +0 -0
  54. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02.woff2 +0 -0
  55. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-arabic.woff2 +0 -0
  56. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-cyrillic.woff2 +0 -0
  57. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-ext.woff2 +0 -0
  58. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-georgian.woff2 +0 -0
  59. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-greek.woff2 +0 -0
  60. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-hebrew.woff2 +0 -0
  61. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-math.woff2 +0 -0
  62. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-thai.woff2 +0 -0
  63. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-vietnamese.woff2 +0 -0
  64. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7.woff2 +0 -0
  65. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-arabic.woff2 +0 -0
  66. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-cyrillic.woff2 +0 -0
  67. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-ext.woff2 +0 -0
  68. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-georgian.woff2 +0 -0
  69. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-greek.woff2 +0 -0
  70. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-hebrew.woff2 +0 -0
  71. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-math.woff2 +0 -0
  72. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-thai.woff2 +0 -0
  73. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-vietnamese.woff2 +0 -0
  74. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688.woff2 +0 -0
  75. package/assets/esri/themes/base/fonts/fonts/3ae1e25e-3aa6-4061-a016-a079159f9d65.woff2 +0 -0
  76. package/assets/esri/themes/base/fonts/fonts/41331c3c-3759-4462-8695-33c9a21b6a5b.woff2 +0 -0
  77. package/assets/esri/themes/base/fonts/fonts/94aa531e-7746-4df0-bb6e-349891f2eda5.woff2 +0 -0
  78. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-arabic.woff2 +0 -0
  79. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-cyrillic.woff2 +0 -0
  80. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-ext.woff2 +0 -0
  81. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-georgian.woff2 +0 -0
  82. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-greek.woff2 +0 -0
  83. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-hebrew.woff2 +0 -0
  84. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-math.woff2 +0 -0
  85. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-thai.woff2 +0 -0
  86. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-vietnamese.woff2 +0 -0
  87. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939.woff2 +0 -0
  88. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-cyrillic.woff2 +0 -0
  89. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-ext.woff2 +0 -0
  90. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-greek.woff2 +0 -0
  91. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-hebrew.woff2 +0 -0
  92. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-math.woff2 +0 -0
  93. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-vietnamese.woff2 +0 -0
  94. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d.woff2 +0 -0
  95. package/assets/esri/themes/base/fonts/fonts.scss +0 -0
  96. package/assets/esri/themes/base/icons/style.scss +0 -0
  97. package/assets/esri/themes/base/icons/variables.scss +0 -0
  98. package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
  99. package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
  100. package/assets/esri/themes/base/images/files/code-32.svg +0 -0
  101. package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
  102. package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
  103. package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
  104. package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
  105. package/assets/esri/themes/base/images/files/image-32.svg +0 -0
  106. package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
  107. package/assets/esri/themes/base/images/files/report-32.svg +0 -0
  108. package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
  109. package/assets/esri/themes/base/images/files/text-32.svg +0 -0
  110. package/assets/esri/themes/base/images/files/video-32.svg +0 -0
  111. package/assets/esri/themes/base/images/files/word-32.svg +0 -0
  112. package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
  113. package/assets/esri/themes/base/images/loading-throb.gif +0 -0
  114. package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
  115. package/assets/esri/themes/base/widgets/_Tooltip.scss +37 -0
  116. package/assets/esri/themes/dark/main.css +1 -1
  117. package/assets/esri/themes/light/main.css +1 -1
  118. package/assets/esri/themes/light/view.css +1 -1
  119. package/assets/esri/views/interactive/tooltip/t9n/messages.en.json +1 -1
  120. package/chunks/GlobalIllumination.glsl.js +1 -0
  121. package/config.js +1 -1
  122. package/core/Accessor.d.ts +1 -1
  123. package/core/lang.js +1 -1
  124. package/kernel.js +1 -1
  125. package/layers/ParquetLayer.d.ts +21 -13
  126. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  127. package/layers/graphics/dehydratedFeatures.js +1 -1
  128. package/package.json +3 -3
  129. package/popup/FeatureContentCollection.d.ts +15 -25
  130. package/popup/FeatureContentCollection.js +1 -1
  131. package/support/revision.js +1 -1
  132. package/symbols/cim/callouts/calloutAnalysisUtils.js +2 -0
  133. package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
  134. package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
  135. package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
  136. package/symbols/cim/callouts/effects/SimpleLineCallout.js +1 -1
  137. package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
  138. package/symbols/cim/cimAnalyzer.js +1 -1
  139. package/views/2d/engine/webgl/ClipMesh.js +1 -1
  140. package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +1 -1
  141. package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
  142. package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  146. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  147. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  148. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  149. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
  150. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  151. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  152. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
  153. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  154. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
  155. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  156. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  157. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
  158. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  159. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +1 -1
  160. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  161. package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
  162. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  163. package/views/2d/layers/LayerView2D.js +1 -1
  164. package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
  165. package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
  166. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  167. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
  168. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  169. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  170. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  171. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  172. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  173. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +5 -3
  174. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  175. package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
  176. package/views/3d/interactive/editingTools/manipulatedObjectUtils.js +1 -1
  177. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  178. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  179. package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
  180. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  181. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  182. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  184. package/views/3d/layers/support/FeatureMemory.js +2 -0
  185. package/views/3d/layers/support/FeatureTile.js +1 -1
  186. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  187. package/views/3d/layers/support/featureReference.js +1 -1
  188. package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
  189. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  190. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  191. package/views/3d/support/popupHitTest.js +1 -1
  192. package/views/3d/terrain/TerrainSurface.js +1 -1
  193. package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
  194. package/views/DOMContainer.d.ts +2 -2
  195. package/views/DOMContainer.js +1 -1
  196. package/views/PopupView.d.ts +1 -1
  197. package/views/interactive/tooltip/components/ElevationModeSelect.js +2 -0
  198. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  199. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  200. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
  201. package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
  202. package/views/support/hitTestSelectUtils.js +1 -1
  203. package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +1 -0
  204. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  205. package/widgets/BasemapToggle.js +1 -1
  206. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +9 -1
  207. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -0
  208. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  209. package/widgets/DirectionalPad.js +1 -1
  210. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  211. package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +1 -1
  212. package/widgets/Editor/workflowUtils.js +1 -1
  213. package/widgets/Popup/types.d.ts +0 -7
  214. package/widgets/Popup.d.ts +7 -7
  215. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +2 -0
  216. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  217. package/widgets/TimeSlider.js +1 -1
  218. package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +0 -1
  219. package/assets/esri/core/workers/chunks/dc52e036547612949d32.js +0 -1
  220. package/views/2d/engine/webgl/mesh/bufcut.js +0 -2
@@ -1 +1 @@
1
- {"sketch":{"area":"Area","deflection":"Deflection","direction":{"relative":"Deflection","absolute":"Direction"},"directionModeSelect":{"title":"Direction mode","absolute":"Absolute","relative":"Deflection"},"distance":"Distance","elevation":"Elevation","helpMessages2d":{"mesh":"","meshTooClose":"","meshTooFar":"","meshUnderground":"","multipoint":"Click on the map to add points. Double-click to complete.","point":"Click on the map to add a point.","polygonOneVertex":"Click on the map to continue drawing.","polygonClickOneVertex":"Click on the map to finish drawing.","polygonTwoVertices":"Double-click on the map to complete.","polygonZeroVertices":"Click on the map to start drawing.","polygonZeroVerticesHybrid":"Click or drag on the map to start drawing.","polylineOneVertex":"Double-click on the map to complete.","polylineZeroVertices":"Click on the map to start drawing.","freehandStart":"Click and drag to draw.","freehandEnd":"Release to finish.","shapeStartHybrid":"Click to place or click and drag to draw.","shapeEndHybrid":"Release to finish.","shapeStartClick":"Click to start drawing.","shapeEndClick":"Click again to finish.","curveBezierControlPoint1":"Click to place the first control point.","curveBezierControlPoint2":"Click to place the second control point.","curvePlaceEndPoint":"Click to place the curve endpoint.","curveInteriorPoint":"Click to place the arc's interior point.","noTool":"Select a tool to start drawing."},"helpMessages3d":{"mesh":"Click in the scene to place the model.","meshTooClose":"Zoom out for a better view of the model.","meshTooFar":"Zoom in for a better view of the model.","meshUnderground":"Move underground for a better view of the model.","multipoint":"","point":"Click in the scene to add a point.","polygonOneVertex":"Click in the scene to continue drawing.","polygonClickOneVertex":"Click in the scene to complete.","polygonTwoVertices":"Double-click in the scene to complete.","polygonZeroVertices":"Click in the scene to start drawing.","polygonZeroVerticesHybrid":"Click or drag in the scene to start drawing.","polylineOneVertex":"Double-click in the scene to complete.","polylineZeroVertices":"Click in the scene to start drawing.","freehandStart":"Click and drag to draw.","freehandEnd":"Release to finish.","shapeStartHybrid":"Click to place or click and drag to draw.","shapeEndHybrid":"Release to finish.","shapeStartClick":"Click to start drawing.","shapeEndClick":"Click again to finish.","curveBezierControlPoint1":"","curveBezierControlPoint2":"","curvePlaceEndPoint":"","curveInteriorPoint":"","noTool":""},"invalidValue":"Not a valid value","latitude":"Latitude","lockConstraint":"Lock constraint","longitude":"Longitude","orientation":"Orientation","radius":"Radius","rotation":"Rotation","scale":"Scale","size":"Size","totalLength":"Total length","unlockConstraint":"Unlock constraint","x":"X","y":"Y","z":"Z"}}
1
+ {"sketch":{"area":"Area","deflection":"Deflection","direction":{"relative":"Deflection","absolute":"Direction"},"directionModeSelect":{"title":"Direction mode","absolute":"Absolute","relative":"Deflection"},"distance":"Distance","elevation":"Elevation","elevationModeSelect":{"title":"Elevation mode","absolute-height":"Absolute","on-the-ground":"On the ground","relative-to-ground":"Relative to ground","relative-to-scene":"Relative to scene"},"helpMessages2d":{"mesh":"","meshTooClose":"","meshTooFar":"","meshUnderground":"","multipoint":"Click on the map to add points. Double-click to complete.","point":"Click on the map to add a point.","polygonOneVertex":"Click on the map to continue drawing.","polygonClickOneVertex":"Click on the map to finish drawing.","polygonTwoVertices":"Double-click on the map to complete.","polygonZeroVertices":"Click on the map to start drawing.","polygonZeroVerticesHybrid":"Click or drag on the map to start drawing.","polylineOneVertex":"Double-click on the map to complete.","polylineZeroVertices":"Click on the map to start drawing.","freehandStart":"Click and drag to draw.","freehandEnd":"Release to finish.","shapeStartHybrid":"Click to place or click and drag to draw.","shapeEndHybrid":"Release to finish.","shapeStartClick":"Click to start drawing.","shapeEndClick":"Click again to finish.","curveBezierControlPoint1":"Click to place the first control point.","curveBezierControlPoint2":"Click to place the second control point.","curvePlaceEndPoint":"Click to place the curve endpoint.","curveInteriorPoint":"Click to place the arc's interior point.","noTool":"Select a tool to start drawing."},"helpMessages3d":{"mesh":"Click in the scene to place the model.","meshTooClose":"Zoom out for a better view of the model.","meshTooFar":"Zoom in for a better view of the model.","meshUnderground":"Move underground for a better view of the model.","multipoint":"","point":"Click in the scene to add a point.","polygonOneVertex":"Click in the scene to continue drawing.","polygonClickOneVertex":"Click in the scene to complete.","polygonTwoVertices":"Double-click in the scene to complete.","polygonZeroVertices":"Click in the scene to start drawing.","polygonZeroVerticesHybrid":"Click or drag in the scene to start drawing.","polylineOneVertex":"Double-click in the scene to complete.","polylineZeroVertices":"Click in the scene to start drawing.","freehandStart":"Click and drag to draw.","freehandEnd":"Release to finish.","shapeStartHybrid":"Click to place or click and drag to draw.","shapeEndHybrid":"Release to finish.","shapeStartClick":"Click to start drawing.","shapeEndClick":"Click again to finish.","curveBezierControlPoint1":"","curveBezierControlPoint2":"","curvePlaceEndPoint":"","curveInteriorPoint":"","noTool":""},"invalidValue":"Not a valid value","latitude":"Latitude","lockConstraint":"Lock constraint","longitude":"Longitude","orientation":"Orientation","radius":"Radius","rotation":"Rotation","scale":"Scale","size":"Size","totalLength":"Total length","unlockConstraint":"Unlock constraint","x":"X","y":"Y","z":"Z"}}
@@ -90,6 +90,7 @@ return value * 2.0 - 1.0;
90
90
  fragWeight = vec2(0.0);
91
91
  return;
92
92
  }
93
+ fragGlobalIllumination = vec4(0.0, 0.0, 0.0, 0.0);
93
94
 
94
95
  float receiverOpacity = normalTexel.a;
95
96
  vec3 normal = normalize(normalTexel.xyz * 2.0 - 1.0);
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.126";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.127";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
@@ -4,7 +4,7 @@ export type GroupKey<T> = Exclude<T, ResourceHandle>;
4
4
 
5
5
  /**
6
6
  * Accessor is an abstract class that facilitates access to instance properties and provides a mechanism for watching property changes.
7
- * You can watch for property changes by using the [watch()](https://developers.arcgis.com/javascript/latest/references/core/core/Accessor/#watch) method.
7
+ * You can watch for property changes by using [watch()](https://developers.arcgis.com/javascript/latest/references/core/core/reactiveUtils/#watch).
8
8
  *
9
9
  * @since 4.0
10
10
  * @see [Guide - Implementing Accessor](https://developers.arcgis.com/javascript/latest/implementing-accessor/)
package/core/lang.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{equals as t}from"./arrayUtils.js";import{isInt8Array as n,isUint8Array as e,isUint8ClampedArray as r,isInt16Array as o,isUint16Array as f,isInt32Array as i,isUint32Array as c,isFloat32Array as u,isFloat64Array as s}from"./typedArrayUtil.js";function l(t,n){let e;if(n)for(e in t)t.hasOwnProperty(e)&&(void 0===t[e]?delete t[e]:t[e]instanceof Object&&l(t[e],!0));else for(e in t)t.hasOwnProperty(e)&&void 0===t[e]&&delete t[e];return t}function a(t){if(!t||"object"!=typeof t||"function"==typeof t)return t;const n=O(t);if(null!=n)return n;if(y(t))return t.clone();if(b(t))return t.map(a);if(m(t))throw new Error("Trying to clone an unclonable Accessor instance");const e={};for(const r of Object.getOwnPropertyNames(t))e[r]=a(t[r]);return e}function p(t,n){if(!t||"object"!=typeof t||"function"==typeof t||"HTMLElement"in globalThis&&t instanceof HTMLElement)return t;const e=O(t);if(null!=e)return e;if(b(t)){let e=!0;const r=t.map(t=>{const r=p(t,n);return null!=t&&null==r&&(e=!1),r});return e?r:null}if(y(t))return t.clone(n);if(t instanceof File||t instanceof Blob)return t;if(m(t))return null;const r=new(0,Object.getPrototypeOf(t).constructor);for(const o of Object.getOwnPropertyNames(t)){const n=t[o],e=p(n);if(null!=n&&null==e)return null;r[o]=e}return r}function y(t){return"function"==typeof t.clone}function b(t){return"function"==typeof t.map&&"function"==typeof t.forEach}function m(t){return"function"==typeof t.notifyChange&&"function"==typeof t.watch}function g(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;const n=Object.getPrototypeOf(t);return null===n||n===Object.prototype}function O(t){if(n(t)||e(t)||r(t)||o(t)||f(t)||i(t)||c(t)||u(t)||s(t))return t.slice();if(t instanceof Date)return new Date(t);if(t instanceof ArrayBuffer){return t.slice(0,t.byteLength)}if(t instanceof Map){const n=new Map;for(const[e,r]of t)n.set(e,a(r));return n}if(t instanceof Set){const n=new Set;for(const e of t)n.add(a(e));return n}return null}function j(t,n){return t===n||"number"==typeof t&&isNaN(t)&&"number"==typeof n&&isNaN(n)||"function"==typeof t?.getTime&&"function"==typeof n?.getTime&&t.getTime()===n.getTime()||!1}function h(n,e){return n===e||(null==n||"string"==typeof n?n===e:"number"==typeof n?n===e||"number"==typeof e&&isNaN(n)&&isNaN(e):n instanceof Date?e instanceof Date&&n.getTime()===e.getTime():Array.isArray(n)?Array.isArray(e)&&t(n,e):n instanceof Set?e instanceof Set&&N(n,e):n instanceof Map?e instanceof Map&&T(n,e):!!g(n)&&(g(e)&&w(n,e)))}function w(t,n){if(null===t||null===n)return!1;const e=Object.keys(t);if(null===n||Object.keys(n).length!==e.length)return!1;for(const r of e)if(t[r]!==n[r]||!Object.prototype.hasOwnProperty.call(n,r))return!1;return!0}function N(t,n){if(t.size!==n.size)return!1;for(const e of t)if(!n.has(e))return!1;return!0}function T(t,n){if(t.size!==n.size)return!1;for(const[e,r]of t){const t=n.get(e);if(t!==r||void 0===t&&!n.has(e))return!1}return!0}export{a as clone,j as equals,h as equalsShallow,l as fixJson,m as isAccessorLike,y as isClonable,g as isPlainObject,p as tryClone};
2
+ import{equals as t}from"./arrayUtils.js";import{isInt8Array as n,isUint8Array as e,isUint8ClampedArray as r,isInt16Array as o,isUint16Array as f,isInt32Array as i,isUint32Array as c,isFloat32Array as u,isFloat64Array as s}from"./typedArrayUtil.js";function l(t,n){let e;if(n)for(e in t)t.hasOwnProperty(e)&&(void 0===t[e]?delete t[e]:t[e]instanceof Object&&l(t[e],!0));else for(e in t)t.hasOwnProperty(e)&&void 0===t[e]&&delete t[e];return t}function a(t){if(!t||"object"!=typeof t||"function"==typeof t)return t;const n=O(t);if(null!=n)return n;if(y(t))return t.clone();if(b(t))return t.map(a);if(m(t))throw new Error("Trying to clone an unclonable Accessor instance");const e={};for(const r of Object.getOwnPropertyNames(t))e[r]=a(t[r]);return e}function p(t,n){if(!t||"object"!=typeof t||"function"==typeof t||"HTMLElement"in globalThis&&t instanceof HTMLElement)return t;const e=O(t);if(null!=e)return e;if(b(t)){let e=!0;const r=t.map(t=>{const r=p(t,n);return null!=t&&null==r&&(e=!1),r});return e?r:null}if(y(t))return t.clone(n);if(t instanceof File||t instanceof Blob)return t;if(m(t))return null;const r=new(0,Object.getPrototypeOf(t).constructor);for(const o of Object.getOwnPropertyNames(t)){const n=t[o],e=p(n);if(null!=n&&null==e)return null;r[o]=e}return r}function y(t){return"function"==typeof t.clone}function b(t){return"function"==typeof t.map&&"function"==typeof t.forEach}function m(t){return"function"==typeof t.notifyChange}function g(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;const n=Object.getPrototypeOf(t);return null===n||n===Object.prototype}function O(t){if(n(t)||e(t)||r(t)||o(t)||f(t)||i(t)||c(t)||u(t)||s(t))return t.slice();if(t instanceof Date)return new Date(t);if(t instanceof ArrayBuffer){return t.slice(0,t.byteLength)}if(t instanceof Map){const n=new Map;for(const[e,r]of t)n.set(e,a(r));return n}if(t instanceof Set){const n=new Set;for(const e of t)n.add(a(e));return n}return null}function j(t,n){return t===n||"number"==typeof t&&isNaN(t)&&"number"==typeof n&&isNaN(n)||"function"==typeof t?.getTime&&"function"==typeof n?.getTime&&t.getTime()===n.getTime()||!1}function h(n,e){return n===e||(null==n||"string"==typeof n?n===e:"number"==typeof n?n===e||"number"==typeof e&&isNaN(n)&&isNaN(e):n instanceof Date?e instanceof Date&&n.getTime()===e.getTime():Array.isArray(n)?Array.isArray(e)&&t(n,e):n instanceof Set?e instanceof Set&&N(n,e):n instanceof Map?e instanceof Map&&T(n,e):!!g(n)&&(g(e)&&w(n,e)))}function w(t,n){if(null===t||null===n)return!1;const e=Object.keys(t);if(null===n||Object.keys(n).length!==e.length)return!1;for(const r of e)if(t[r]!==n[r]||!Object.prototype.hasOwnProperty.call(n,r))return!1;return!0}function N(t,n){if(t.size!==n.size)return!1;for(const e of t)if(!n.has(e))return!1;return!0}function T(t,n){if(t.size!==n.size)return!1;for(const[e,r]of t){const t=n.get(e);if(t!==r||void 0===t&&!n.has(e))return!1}return!0}export{a as clone,j as equals,h as equalsShallow,l as fixJson,m as isAccessorLike,y as isClonable,g as isPlainObject,p as tryClone};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.126",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.127",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
@@ -242,25 +242,35 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
242
242
  * or rely on auto-detection, see the [geometryEncoding](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#geometryEncoding) property.
243
243
  *
244
244
  * ParquetLayers may be created by either:
245
- * ###### Specifying the [data](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#data) for the Parquet files.
245
+ * #### Specifying the [data](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#data) for the Parquet files.
246
246
  *
247
- * The ParquetLayer can be loaded by setting its [data](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#data) property to file-backed data.
247
+ * The ParquetLayer can be loaded by setting its [data](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#data) property to file-backed data or portal item data.
248
248
  * The following snippet shows how to add a new ParquetLayer to the map.
249
249
  *
250
250
  * ```js
251
- * // Add the Parquet files from given urls as a parquet layer.
251
+ * // Create a parquet layer from multiple Parquet files
252
252
  * const layer = new ParquetLayer({
253
253
  * data: new ParquetFilesData({
254
254
  * urls: [
255
- * "url-to-parquet-file1.parquet",
256
- * "url-to-parquet-file2.parquet"
255
+ * "https://example.com/path/to/parquetfile1.parquet",
256
+ * "https://example.com/path/to/parquetfile2.parquet"
257
257
  * ]
258
258
  * })
259
259
  * });
260
260
  * map.add(layer);
261
+ *
262
+ * // Create a parquet layer from arcgis online portal item
263
+ * const layer = new ParquetLayer({
264
+ * data: new ParquetPortalItemData({
265
+ * portalItem: {
266
+ * id: "6ab6f959c1684eb5a54db91644a89747",
267
+ * },
268
+ * }),
269
+ * });
270
+ * map.add(layer);
261
271
  * ```
262
272
  *
263
- * ###### Using the [getParquetLayerInfo()](https://developers.arcgis.com/javascript/latest/references/core/layers/support/parquetUtils/#getParquetLayerInfo)
273
+ * #### Using the [getParquetLayerInfo()](https://developers.arcgis.com/javascript/latest/references/core/layers/support/parquetUtils/#getParquetLayerInfo)
264
274
  *
265
275
  * Use the [getParquetLayerInfo()](https://developers.arcgis.com/javascript/latest/references/core/layers/support/parquetUtils/#getParquetLayerInfo) method to
266
276
  * retrieve information needed to create a parquet layer from the first Parquet file in the specified data source.
@@ -298,7 +308,6 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
298
308
  * >
299
309
  * > * The ParquetLayer is supported in a [Map component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/) or a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
300
310
  * > * The ParquetLayer only supports geographic (WGS84) and Web Mercator spatial references.
301
- * > * Time and date fields may be downgraded to numeric values.
302
311
  * > * ParquetLayer supports the [orderByFields](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#orderByFields) query parameter for datasets containing up to 500,000 features.
303
312
  *
304
313
  * @beta
@@ -312,12 +321,11 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
312
321
  /**
313
322
  * @example
314
323
  * const layer = new ParquetLayer({
315
- * data: new ParquetFilesData({
316
- * urls: [
317
- * "https://example.com/path/to/parquetfile1.parquet",
318
- * "https://example.com/path/to/parquetfile2.parquet"
319
- * ]
320
- * })
324
+ * data: new ParquetPortalItemData({
325
+ * portalItem: {
326
+ * id: "6ab6f959c1684eb5a54db91644a89747",
327
+ * },
328
+ * }),
321
329
  * });
322
330
  * mapElement.map.add(layer); // adds the layer to the map
323
331
  */
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import s from"../../../core/Collection.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{clone as a}from"../../../core/lang.js";import l from"../../../core/Logger.js";import{destroyMaybe as n,removeMaybe as o,abortMaybe as h}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,watch as m,syncAndInitial as f,sync as y}from"../../../core/reactiveUtils.js";import{sqlAnd as _}from"../../../core/sql.js";import{property as g,subclass as F}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as x}from"../../../core/support/UpdatingHandles.js";import{projectAsync as v}from"../../../geometry/projectionUtils.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as D}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as C}from"../../support/layerUtils.js";import b from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as S,virtualSnapshotTileId as E,virtualDisplayFilterHighlightTileId as T}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as V}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as H}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as I}from"../../../views/3d/support/debugFlags.js";let L=class extends(u(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void l.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get snappingComplexityExceeded(){return this._tileFetcher?.snappingComplexityExceeded??!0}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===M.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===M.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,s=i?.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&s){const t=this._approximateExtentSizeAtScale(e.minScale,s);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>M.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,s=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),r=t.levels[0];return s*((r.tileSize[0]/(r.scale/e)+r.tileSize[1]/(r.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new S(0,0,0,null,E);return new s([e])}const e=this.layerView.view.featureTiles;if(!e)return new s;const t=e.tiles;if(this.layerView.displayFilterEnabled&&null!=this.layerView.effectiveDisplayFilterClause&&"1=1"!==this.layerView.effectiveDisplayFilterClause&&this.layerView.highlightIds?.length>0){const e=new S(0,0,0,this.layerView.view.featureTiles?.tilingScheme,T);return new s([...t,e])}return t}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new x,this.serviceDataExtent=null,this.serviceDataCount=M.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add(()=>this.displayFeatureLimit,e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal))),this._updatingHandles.add(()=>this.mode,()=>this._modeChanged(),p),this._updatingHandles.add(()=>this.mode,(e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)},p),this.addResolvingPromise(Promise.resolve().then(()=>this._verifyCapabilities()).then(()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo())).then(()=>this._initializeTileFetcher()))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!C(e)?.operations.supportsQuery)throw new r("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=n(this._tileFetcher),this._tilesHandle=o(this._tilesHandle),this._lifeCycleAbortController=h(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const{layerView:t,tileDescriptors:i}=this,s=t.layer,r=new V({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=r,this._suspended?r.suspend():r.resume(),e&&this.addHandles(m(()=>e.quality,e=>r.memoryFactor=e,f));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(m(()=>this.layerView.view?.qualitySettings?.graphics3D?.[a],e=>r.lodFactor=e||1,p));const l=e=>{r.maximumNumberOfFeatures=e,r.useTileCount=this.serviceDataCount>e},o=e=>{r.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==s.type&&this._updatingHandles.add(()=>s.createQueryVersion,()=>this._dataFilterChanged()),this._updatingHandles.add(()=>this.layerView.effectiveDisplayFilter,()=>this._effectiveDisplayFilterChanged()),this._updatingHandles.add(()=>this.layerView.highlightIds,()=>this._displayFilterHighlightIdsChanged()),this._updatingHandles.add(()=>t.availableFields,(e,t)=>this._availableFieldsChanged(t,e)),this._updatingHandles.add(()=>t.requiredFields,(e,t)=>this._requiredFieldsChanged(t,e)),"customParameters"in s&&this._updatingHandles.add(()=>s.customParameters,()=>this.restart()),this.addHandles([s.on("apply-edits",e=>this._applyEdits(e)),m(()=>this.extent,e=>r.filterExtent=e,y),m(()=>this.tileDescriptors,e=>r.tileDescriptors=e,y),m(()=>this.maximumNumberOfFeatures,l,f),m(()=>this.serviceDataCount,o,f),m(()=>({featureTiles:e.featureTiles,show:I.FEATURE_TILE_FETCH_SHOW_TILES}),({show:t,featureTiles:i})=>{t&&r&&i?r.debugger??=new H(r,i.tilingScheme.toTileInfo(),e):r.debugger=n(r.debugger)},p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add(()=>this.maxTotalSnapshotVertices,()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal)))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.enableFeatureTiles());break;default:l.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_displayFilterHighlightIdsChanged(){"snapshot"!==this.mode&&null!=this._tileFetcher&&this._tileFetcher.refetchDisplayFilterHighlightTile()}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then(e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.consumePromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}}).catch(e=>{if(!d(e))throw e})}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new b({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=_(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,s=i.capabilities?.query.supportsExtent??!1,r=a(t.fullExtentInLocalViewSpatialReference),l=i.fullExtent,n=this._fullExtentIsAccurate(),o=this.serviceDataCount;if(s&&o<=M.maxFeatureCountForExtent&&(!r||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),s=await i.queryExtent(t,{timeout:M.queryExtentTimeout,signal:e});this._set("serviceDataExtent",s.extent)}else if(r)this._set("serviceDataExtent",r);else if(null!=l){const e=l.spatialReference?await v(l,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",M.noServiceDataCount);const s=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:M.queryStatisticsTimeout,signal:e}));if(!0===s.ok)this._set("serviceDataCount",s.value);else{if(d(s.error))throw s.error;this._set("serviceDataCount",M.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,s){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:r,averageSymbolComplexity:a}=e,{verticesPerFeature:l,verticesPerCoordinate:n}=a,o=l<=0,h=this._minimumNumberOfVerticesForGeometry>1;if(!o&&!h)return void(this._snapshotLimitExceeded=!1);0!==l&&null!=t&&await t;const u=Math.min(r,A),c=this.serviceDataCount,p=c!==M.noServiceDataCount;let m=p?Math.ceil((u-c*l)/(n||1)):Math.ceil(u/(n||1));if(h&&(m=Math.min(m,N)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:M.queryStatisticsTimeout,signal:s}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await D(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),s=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),r=s.then(()=>this._updateServiceDataExtent(t)).catch(e=>{d(e)||l.getLogger(this).error("#fetchServiceDataInfo()",e)}).then(()=>{r===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null});return e&&(this._fetchDataInfoPromise=r),this._fetchDataInfoAbortController=e,s.then(()=>{},()=>{})}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([g({readOnly:!0})],L.prototype,"type",void 0),e([g({constructOnly:!0})],L.prototype,"graphics",void 0),e([g({constructOnly:!0})],L.prototype,"layerView",void 0),e([g({constructOnly:!0})],L.prototype,"context",void 0),e([g({readOnly:!0})],L.prototype,"dataUpdating",null),e([g()],L.prototype,"extent",null),e([g()],L.prototype,"updating",null),e([g({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([g()],L.prototype,"updatingTotal",null),e([g()],L.prototype,"updatingRemaining",null),e([g()],L.prototype,"expectedFeatureDiff",null),e([g()],L.prototype,"memoryForUnusedFeatures",null),e([g()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([g()],L.prototype,"snappingComplexityExceeded",null),e([g({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([g()],L.prototype,"_snapshotLimitExceeded",void 0),e([g()],L.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([g({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([g()],L.prototype,"_forceTilesMode",void 0),e([g({readOnly:!0})],L.prototype,"mode",null),e([g({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0})],L.prototype,"tileDescriptors",null),e([g()],L.prototype,"_tileFetcher",void 0),e([g()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,A=1e6,q=12e3,j=1e4,N=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}class M{static{this.noServiceDataCount=1/0}static{this.maxSnapshotMinScaleFactor=5}static reset(){M.maxFeatureCountForExtent=O,M.queryStatisticsTimeout=q,M.queryExtentTimeout=j}}M.reset();export{L as FeatureTileController3D,M as FeatureTileController3DConstants};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import s from"../../../core/Error.js";import has from"../../../core/has.js";import{clone as a}from"../../../core/lang.js";import l from"../../../core/Logger.js";import{destroyMaybe as o,removeMaybe as n,abortMaybe as h}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,watch as m,syncAndInitial as f,sync as y}from"../../../core/reactiveUtils.js";import{sqlAnd as _}from"../../../core/sql.js";import{property as g,subclass as F}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as x}from"../../../core/support/UpdatingHandles.js";import{projectAsync as v}from"../../../geometry/projectionUtils.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as D}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as C}from"../../support/layerUtils.js";import b from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as S,virtualSnapshotTileId as E,virtualDisplayFilterHighlightTileId as T}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as V}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as H}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as I}from"../../../views/3d/support/debugFlags.js";let L=class extends(u(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void l.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get usedMemory(){return this._tileFetcher?.usedMemory??0}get usedMemoryPerFeature(){return this._tileFetcher?.usedMemoryPerFeature??0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get snappingComplexityExceeded(){return this._tileFetcher?.snappingComplexityExceeded??!0}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===N.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===N.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,r=i?.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>N.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new S(0,0,0,null,E);return new r([e])}const e=this.layerView.view.featureTiles;if(!e)return new r;const t=e.tiles;if(this.layerView.displayFilterEnabled&&null!=this.layerView.effectiveDisplayFilterClause&&"1=1"!==this.layerView.effectiveDisplayFilterClause&&this.layerView.highlightIds?.length>0){const e=new S(0,0,0,this.layerView.view.featureTiles?.tilingScheme,T);return new r([...t,e])}return t}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new x,this.serviceDataExtent=null,this.serviceDataCount=N.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add(()=>this.displayFeatureLimit,e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal))),this._updatingHandles.add(()=>this.mode,()=>this._modeChanged(),p),this._updatingHandles.add(()=>this.mode,(e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)},p),this.addResolvingPromise(Promise.resolve().then(()=>this._verifyCapabilities()).then(()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo())).then(()=>this._initializeTileFetcher()))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!C(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=o(this._tileFetcher),this._tilesHandle=n(this._tilesHandle),this._lifeCycleAbortController=h(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new V({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=s,this._suspended?s.suspend():s.resume(),e&&this.addHandles(m(()=>e.quality,e=>s.memoryFactor=e,f));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(m(()=>this.layerView.view?.qualitySettings?.graphics3D?.[a],e=>s.lodFactor=e||1,p));const l=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},n=e=>{s.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==r.type&&this._updatingHandles.add(()=>r.createQueryVersion,()=>this._dataFilterChanged()),this._updatingHandles.add(()=>this.layerView.effectiveDisplayFilter,()=>this._effectiveDisplayFilterChanged()),this._updatingHandles.add(()=>this.layerView.highlightIds,()=>this._displayFilterHighlightIdsChanged()),this._updatingHandles.add(()=>t.availableFields,(e,t)=>this._availableFieldsChanged(t,e)),this._updatingHandles.add(()=>t.requiredFields,(e,t)=>this._requiredFieldsChanged(t,e)),"customParameters"in r&&this._updatingHandles.add(()=>r.customParameters,()=>this.restart()),this.addHandles([r.on("apply-edits",e=>this._applyEdits(e)),m(()=>this.extent,e=>s.filterExtent=e,y),m(()=>this.tileDescriptors,e=>s.tileDescriptors=e,y),m(()=>this.maximumNumberOfFeatures,l,f),m(()=>this.serviceDataCount,n,f),m(()=>({featureTiles:e.featureTiles,show:I.FEATURE_TILE_FETCH_SHOW_TILES}),({show:t,featureTiles:i})=>{t&&s&&i?s.debugger??=new H(s,i.tilingScheme.toTileInfo(),e):s.debugger=o(s.debugger)},p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add(()=>this.maxTotalSnapshotVertices,()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal)))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.enableFeatureTiles());break;default:l.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_displayFilterHighlightIdsChanged(){"snapshot"!==this.mode&&null!=this._tileFetcher&&this._tileFetcher.refetchDisplayFilterHighlightTile()}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then(e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.consumePromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}}).catch(e=>{if(!d(e))throw e})}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new b({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=_(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=a(t.fullExtentInLocalViewSpatialReference),l=i.fullExtent,o=this._fullExtentIsAccurate(),n=this.serviceDataCount;if(r&&n<=N.maxFeatureCountForExtent&&(!s||!o)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:N.queryExtentTimeout,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=l){const e=l.spatialReference?await v(l,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",N.noServiceDataCount);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:N.queryStatisticsTimeout,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(d(r.error))throw r.error;this._set("serviceDataCount",N.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,r){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:s,averageSymbolComplexity:a}=e,{verticesPerFeature:l,verticesPerCoordinate:o}=a,n=l<=0,h=this._minimumNumberOfVerticesForGeometry>1;if(!n&&!h)return void(this._snapshotLimitExceeded=!1);0!==l&&null!=t&&await t;const u=Math.min(s,A),c=this.serviceDataCount,p=c!==N.noServiceDataCount;let m=p?Math.ceil((u-c*l)/(o||1)):Math.ceil(u/(o||1));if(h&&(m=Math.min(m,j)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:N.queryStatisticsTimeout,signal:r}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await D(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),s=r.then(()=>this._updateServiceDataExtent(t)).catch(e=>{d(e)||l.getLogger(this).error("#fetchServiceDataInfo()",e)}).then(()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null});return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then(()=>{},()=>{})}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([g({readOnly:!0})],L.prototype,"type",void 0),e([g({constructOnly:!0})],L.prototype,"graphics",void 0),e([g({constructOnly:!0})],L.prototype,"layerView",void 0),e([g({constructOnly:!0})],L.prototype,"context",void 0),e([g({readOnly:!0})],L.prototype,"dataUpdating",null),e([g()],L.prototype,"extent",null),e([g()],L.prototype,"updating",null),e([g({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([g()],L.prototype,"updatingTotal",null),e([g()],L.prototype,"updatingRemaining",null),e([g()],L.prototype,"expectedFeatureDiff",null),e([g()],L.prototype,"usedMemory",null),e([g()],L.prototype,"usedMemoryPerFeature",null),e([g()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([g()],L.prototype,"snappingComplexityExceeded",null),e([g({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([g()],L.prototype,"_snapshotLimitExceeded",void 0),e([g()],L.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([g({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([g()],L.prototype,"_forceTilesMode",void 0),e([g({readOnly:!0})],L.prototype,"mode",null),e([g({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0})],L.prototype,"tileDescriptors",null),e([g()],L.prototype,"_tileFetcher",void 0),e([g()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,A=1e6,q=12e3,M=1e4,j=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}class N{static{this.noServiceDataCount=1/0}static{this.maxSnapshotMinScaleFactor=5}static reset(){N.maxFeatureCountForExtent=O,N.queryStatisticsTimeout=q,N.queryExtentTimeout=M}}N.reset();export{L as FeatureTileController3D,N as FeatureTileController3DConstants};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{baseObjectMemory as e,estimateNumberArrayMemory as t,estimateNestedObjectMemory as s,estimateAttributesMemory as n}from"../../core/memoryEstimations.js";import{generateUID as r}from"../../core/uid.js";import i from"../../geometry/SpatialReference.js";import{empty as o,expandWithNestedArray as a}from"../../geometry/support/aaBoundingBox.js";import{empty as l,expandWithNestedArray as u}from"../../geometry/support/aaBoundingRect.js";import{unquantizePolyline as c,unquantizePolygon as p,unquantizeMultipoint as m,unquantizePoint as h}from"../../geometry/support/quantizationUtils.js";import{featureGeometryTypeKebabDictionary as f}from"../../geometry/support/typeUtils.js";import y from"../support/Field.js";import{getApproximateMaxDensificationSegments as g}from"../../views/2d/layers/graphics/densificationConstants.js";export{equals}from"./dehydratedFeatureComparison.js";class d{constructor(e,t,s){this.uid=e,this.geometry=t,this.attributes=s,this.visible=!0,this.objectId=null,this.centroid=null}}function b(e){return null!=e.geometry}class x{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}function j(e,t){const s=f.fromJSON(e.geometryType),n=i.fromJSON(e.spatialReference),r=e.transform,o=e.objectIdFieldName,a=t?.maxStringAttributeLength,l=t?.maxStringAttributeFields;let u;const g=e.features.map(t=>{const i=N(t,s,n,e.objectIdFieldName),f=i.geometry;if(w(i.attributes,l,a,e=>{u??=[];const t=R(i,o);null!=t&&u.push({objectId:t,attribute:e})}),null!=f&&r)switch(f.type){case"point":i.geometry=h(r,f,f);break;case"multipoint":i.geometry=m(r,f,f);break;case"polygon":i.geometry=p(r,f,f);break;case"polyline":i.geometry=c(r,f,f);break;case"extent":case"mesh":i.geometry=f}return i});return{geometryType:s,features:g,spatialReference:n,fields:e.fields?.map(e=>y.fromJSON(e))??[],objectIdFieldName:e.objectIdFieldName,globalIdFieldName:e.globalIdFieldName,geohashFieldName:e.geohashFieldName,geometryProperties:e.geometryProperties,hasZ:e.hasZ,hasM:e.hasM,exceededTransferLimit:e.exceededTransferLimit,transform:null,missingAttributes:u}}function N(e,t,s,n){return{uid:r(),objectId:n&&e.attributes?e.attributes[n]:null,attributes:e.attributes,geometry:Z(e.geometry,t,s),visible:!0}}function Z(e,t,s){if(null==e)return null;switch(t){case"point":{const t=e;return{x:t.x,y:t.y,z:t.z,m:t.m,hasZ:null!=t.z,hasM:null!=t.m,type:"point",spatialReference:s}}case"polyline":{const t=e;return{paths:t.paths,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polyline",spatialReference:s}}case"polygon":{const t=e;return{rings:t.rings,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polygon",spatialReference:s}}case"multipoint":{const t=e;return{points:t.points,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"multipoint",spatialReference:s}}}}function F(n){if(null==n)return 0;switch(n.type){case"point":return e+10+8+24;case"polyline":case"polygon":{let t=0;const r=2+(n.hasZ?1:0)+(n.hasM?1:0),i="polyline"===n.type?n.paths:n.rings,o="polyline"===n.type?n.curvePaths:n.curveRings;if(o?.length){const e=3*g()*128;t=8*e*r+128*e+32*(i.length+1)}else t=s(i);return e+64+t+34}case"multipoint":{const t=s(n.points);return e+t+64+34+32}case"extent":return e+10+64+34;case"mesh":{const s=n.vertexAttributes;return e+t(s.position,s.normal,s.uv,s.tangent)}default:return e}}function I(e){let t=32;return t+=n(e.attributes),t+=3,t+=8+F(e.geometry),t}function k(e){if(null==e)return 0;switch(e.type){case"point":return 1;case"polyline":{let t=0;for(const s of e.paths)t+=s.length;return t}case"polygon":{let t=0;for(const s of e.rings)t+=s.length;return t}case"multipoint":return e.points.length;case"extent":return 2;case"mesh":{const t=e.vertexAttributes&&e.vertexAttributes.position;return t?t.length/3:0}default:return}}function M(e){if(null==e)return!1;switch(e.type){case"extent":case"point":return!0;case"polyline":for(const t of e.paths)if(t.length>0)return!0;return!1;case"polygon":for(const t of e.rings)if(t.length>0)return!0;return!1;case"multipoint":return e.points.length>0;case"mesh":return!e.loaded||e.vertexAttributes.position.length>0}}function v(e,t){switch(o(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[3]=e.x,t[1]=t[4]=e.y,e.hasZ&&(t[2]=t[5]=e.z);break;case"polyline":for(let s=0;s<e.paths.length;s++)a(t,e.paths[s],!!e.hasZ);break;case"polygon":for(let s=0;s<e.rings.length;s++)a(t,e.rings[s],!!e.hasZ);break;case"multipoint":a(t,e.points,!!e.hasZ);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[3]=e.xmax,t[4]=e.ymax,null!=e.zmin&&(t[2]=e.zmin),null!=e.zmax&&(t[5]=e.zmax)}return t}function z(e,t){switch(l(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[2]=e.x,t[1]=t[3]=e.y;break;case"polyline":for(let s=0;s<e.paths.length;s++)u(t,e.paths[s]);break;case"polygon":for(let s=0;s<e.rings.length;s++)u(t,e.rings[s]);break;case"multipoint":u(t,e.points);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax}}function R(e,t){return null!=e.objectId?e.objectId:e.attributes&&t?e.attributes[t]:null}function w(e,t,s,n){if(t?.size&&null!=s&&e)for(const r in e){if(!t.has(r))continue;const i=e[r];"string"==typeof i&&i.length>s&&(n(r),e[r]="")}}export{d as DehydratedFeatureClass,x as DehydratedFeatureSetClass,v as computeAABB,z as computeAABR,F as estimateGeometryMemory,I as estimateSize,j as fromFeatureSetJSON,Z as fromJSONGeometry,R as getObjectId,b as hasGeometry,M as hasVertices,k as numVertices,w as removeLargeStringAttributes};
2
+ import{baseObjectMemory as e,estimateNumberArrayMemory as t,estimateNestedObjectMemory as s,estimateAttributesMemory as n}from"../../core/memoryEstimations.js";import{generateUID as r}from"../../core/uid.js";import i from"../../geometry/SpatialReference.js";import{empty as o,expandWithNestedArray as a}from"../../geometry/support/aaBoundingBox.js";import{empty as l,expandWithNestedArray as u}from"../../geometry/support/aaBoundingRect.js";import{unquantizePolyline as c,unquantizePolygon as p,unquantizeMultipoint as m,unquantizePoint as h}from"../../geometry/support/quantizationUtils.js";import{featureGeometryTypeKebabDictionary as f}from"../../geometry/support/typeUtils.js";import y from"../support/Field.js";import{getApproximateMaxDensificationSegments as g}from"../../views/2d/layers/graphics/densificationConstants.js";export{equals}from"./dehydratedFeatureComparison.js";class d{constructor(e,t,s){this.uid=e,this.geometry=t,this.attributes=s,this.visible=!0,this.objectId=null,this.centroid=null}}function b(e){return null!=e.geometry}class x{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}function j(e,t){const s=f.fromJSON(e.geometryType),n=i.fromJSON(e.spatialReference),r=e.transform,o=e.objectIdFieldName,a=t?.maxStringAttributeLength,l=t?.maxStringAttributeFields;let u;const g=e.features.map(t=>{const i=N(t,s,n,e.objectIdFieldName),f=i.geometry;if(A(i.attributes,l,a,e=>{u??=[];const t=w(i,o);null!=t&&u.push({objectId:t,attribute:e})}),null!=f&&r)switch(f.type){case"point":i.geometry=h(r,f,f);break;case"multipoint":i.geometry=m(r,f,f);break;case"polygon":i.geometry=p(r,f,f);break;case"polyline":i.geometry=c(r,f,f);break;case"extent":case"mesh":i.geometry=f}return i});return{geometryType:s,features:g,spatialReference:n,fields:e.fields?.map(e=>y.fromJSON(e))??[],objectIdFieldName:e.objectIdFieldName,globalIdFieldName:e.globalIdFieldName,geohashFieldName:e.geohashFieldName,geometryProperties:e.geometryProperties,hasZ:e.hasZ,hasM:e.hasM,exceededTransferLimit:e.exceededTransferLimit,transform:null,missingAttributes:u}}function N(e,t,s,n){return{uid:r(),objectId:n&&e.attributes?e.attributes[n]:null,attributes:e.attributes,geometry:Z(e.geometry,t,s),visible:!0}}function Z(e,t,s){if(null==e)return null;switch(t){case"point":{const t=e;return{x:t.x,y:t.y,z:t.z,m:t.m,hasZ:null!=t.z,hasM:null!=t.m,type:"point",spatialReference:s}}case"polyline":{const t=e;return{paths:t.paths,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polyline",spatialReference:s}}case"polygon":{const t=e;return{rings:t.rings,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polygon",spatialReference:s}}case"multipoint":{const t=e;return{points:t.points,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"multipoint",spatialReference:s}}}}function F(n){if(null==n)return 0;switch(n.type){case"point":return e+10+8+24;case"polyline":case"polygon":{let t=0;const r=2+(n.hasZ?1:0)+(n.hasM?1:0),i="polyline"===n.type?n.paths:n.rings,o="polyline"===n.type?n.curvePaths:n.curveRings;if(o?.length){const e=3*g()*128;t=8*e*r+128*e+32*(i.length+1)}else t=s(i);return e+64+t+34}case"multipoint":{const t=s(n.points);return e+t+64+34+32}case"extent":return e+10+64+34;case"mesh":{const s=n.vertexAttributes;return e+t(s.position,s.normal,s.uv,s.tangent)}default:return e}}const I=43;function k(e){return I+n(e.attributes)+F(e.geometry)}function M(e){if(null==e)return 0;switch(e.type){case"point":return 1;case"polyline":{let t=0;for(const s of e.paths)t+=s.length;return t}case"polygon":{let t=0;for(const s of e.rings)t+=s.length;return t}case"multipoint":return e.points.length;case"extent":return 2;case"mesh":{const t=e.vertexAttributes&&e.vertexAttributes.position;return t?t.length/3:0}default:return}}function v(e){if(null==e)return!1;switch(e.type){case"extent":case"point":return!0;case"polyline":for(const t of e.paths)if(t.length>0)return!0;return!1;case"polygon":for(const t of e.rings)if(t.length>0)return!0;return!1;case"multipoint":return e.points.length>0;case"mesh":return!e.loaded||e.vertexAttributes.position.length>0}}function z(e,t){switch(o(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[3]=e.x,t[1]=t[4]=e.y,e.hasZ&&(t[2]=t[5]=e.z);break;case"polyline":for(let s=0;s<e.paths.length;s++)a(t,e.paths[s],!!e.hasZ);break;case"polygon":for(let s=0;s<e.rings.length;s++)a(t,e.rings[s],!!e.hasZ);break;case"multipoint":a(t,e.points,!!e.hasZ);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[3]=e.xmax,t[4]=e.ymax,null!=e.zmin&&(t[2]=e.zmin),null!=e.zmax&&(t[5]=e.zmax)}return t}function R(e,t){switch(l(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[2]=e.x,t[1]=t[3]=e.y;break;case"polyline":for(let s=0;s<e.paths.length;s++)u(t,e.paths[s]);break;case"polygon":for(let s=0;s<e.rings.length;s++)u(t,e.rings[s]);break;case"multipoint":u(t,e.points);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax}}function w(e,t){return null!=e.objectId?e.objectId:e.attributes&&t?e.attributes[t]:null}function A(e,t,s,n){if(t?.size&&null!=s&&e)for(const r in e){if(!t.has(r))continue;const i=e[r];"string"==typeof i&&i.length>s&&(n(r),e[r]="")}}export{d as DehydratedFeatureClass,x as DehydratedFeatureSetClass,I as baseDehydratedGraphicMemory,z as computeAABB,R as computeAABR,F as estimateGeometryMemory,k as estimateSize,j as fromFeatureSetJSON,Z as fromJSONGeometry,w as getObjectId,b as hasGeometry,v as hasVertices,M as numVertices,A as removeLargeStringAttributes};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.126",
3
+ "version": "5.2.0-next.127",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -20,8 +20,8 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
22
  "@amcharts/amcharts5": "~5.20.8",
23
- "@arcgis/toolkit": "5.2.0-next.126",
24
- "@esri/arcgis-html-sanitizer": "~4.1.0",
23
+ "@arcgis/toolkit": "5.2.0-next.127",
24
+ "@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
25
25
  "@esri/calcite-components": "^5.2.0-next.80",
26
26
  "@vaadin/grid": "~25.3.0",
27
27
  "@zip.js/zip.js": "~2.18.2",
@@ -20,7 +20,7 @@ import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
20
20
  import type { FeatureAbilitiesProperties } from "./support/FeatureAbilities.js";
21
21
  import type { PointProperties } from "../geometry/Point.js";
22
22
 
23
- export interface FeatureContentCollectionProperties extends GoToProperties, Partial<Pick<FeatureContentCollection, "activeFeature" | "aggregatedFeaturesEnabled" | "content" | "defaultPopupTemplateEnabled" | "diagnostics" | "featurePage" | "features" | "featuresPerPage" | "featureStream" | "heading" | "highlightEnabled" | "includeDefaultActions" | "initialDisplayMode" | "map" | "open" | "promises" | "selectedFeatureIndex" | "updateLocationEnabled" | "view" | "zoomFactor">> {
23
+ export interface FeatureContentCollectionProperties extends GoToProperties, Partial<Pick<FeatureContentCollection, "activeFeature" | "aggregatedFeaturesEnabled" | "content" | "defaultPopupTemplateEnabled" | "featurePage" | "features" | "featuresPerPage" | "featureStream" | "heading" | "highlightEnabled" | "includeDefaultActions" | "initialDisplayMode" | "map" | "open" | "selectedFeatureIndex" | "updateLocationEnabled" | "view" | "zoomFactor">> {
24
24
  /**
25
25
  * [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) objects.
26
26
  * Each action may be executed by clicking the icon or image symbolizing them.
@@ -179,7 +179,7 @@ export default class FeatureContentCollection extends FeatureContentCollectionSu
179
179
  *
180
180
  * @since 5.2
181
181
  */
182
- accessor diagnostics: FetchPopupFeaturesDiagnostics | null | undefined;
182
+ get diagnostics(): FetchPopupFeaturesDiagnostics | null | undefined;
183
183
  /**
184
184
  * The heading currently displayed for the selected feature item.
185
185
  *
@@ -325,28 +325,6 @@ export default class FeatureContentCollection extends FeatureContentCollectionSu
325
325
  * @see [waitingForResult](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#waitingForResult)
326
326
  */
327
327
  accessor open: boolean;
328
- /**
329
- * The number of pending promises remaining to be resolved.
330
- *
331
- * @internal
332
- * @see [promises property](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#promises)
333
- */
334
- get pendingPromisesCount(): number;
335
- /**
336
- * The number of selected [promises](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#promises) available.
337
- *
338
- * @internal
339
- */
340
- get promiseCount(): number;
341
- /**
342
- * An array of pending Promises that have not yet been fulfilled. If there are
343
- * no pending Promises, the value is `null`. When the pending Promises are
344
- * resolved they are removed from this array and the features they return
345
- * are pushed into the [features](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#features) array.
346
- *
347
- * @internal
348
- */
349
- accessor promises: Promise<Graphic[]>[];
350
328
  /**
351
329
  * The selected feature accessed. The [content](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#content) is
352
330
  * determined based on the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) assigned to
@@ -379,7 +357,7 @@ export default class FeatureContentCollection extends FeatureContentCollectionSu
379
357
  *
380
358
  * @since 5.2
381
359
  */
382
- get streamingFeatures(): false;
360
+ get streamingFeatures(): boolean;
383
361
  /**
384
362
  * Dates and times will be displayed in this time zone. By default this time zone is
385
363
  * inherited from the associated [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#timeZone) if the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#view) property is set. When a view is not associated, then the property will fallback to the `system` time zone.
@@ -447,6 +425,18 @@ export default class FeatureContentCollection extends FeatureContentCollectionSu
447
425
  * @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#selectedFeatureIndex)
448
426
  */
449
427
  next(): void;
428
+ /**
429
+ * Opens the collection with a location and a feature stream. While waiting, the collection remains at its current location and becomes active when the first feature is available.
430
+ * If the location is `null` or `undefined`, the first feature's geometry determines the location. If no features become available, the collection closes without changing its location.
431
+ *
432
+ * @param options - The feature source and location used to open the collection.
433
+ * @internal
434
+ */
435
+ openFeatureStream(options: {
436
+ featureStream: AsyncGenerator<Graphic>;
437
+ diagnostics?: FetchPopupFeaturesDiagnostics;
438
+ location: Point | null | undefined;
439
+ }): void;
450
440
  /**
451
441
  * Selects the feature at the previous index in relation to the selected feature.
452
442
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import{deprecatedProperty as i}from"../core/deprecate.js";import r from"../core/Error.js";import{EventedAccessor as s}from"../core/Evented.js";import a from"../core/Logger.js";import{abortMaybe as o}from"../core/maybe.js";import{debounce as n,logOnError as l,isAbortError as u}from"../core/promiseUtils.js";import h from"../core/ReactiveSet.js";import{watch as c,when as p,sync as d}from"../core/reactiveUtils.js";import{addMany as g}from"../core/SetUtils.js";import{property as m,subclass as f}from"../core/accessorSupport/decorators.js";import y from"../geometry/Point.js";import{project as _}from"../geometry/projectionUtils.js";import F from"../geometry/SpatialReference.js";import{geographicToWebMercator as v}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as w}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as b}from"../layers/LayerConstants.js";import{ActionsCollection as I,zoomToAggregatedFeatures as C,browseAggregatedFeatures as P,zoomToFeature as S}from"./actions.js";import{getSelectedTarget as A}from"./actionUtils.js";import L from"./FeatureContent.js";import x from"./support/FeatureAbilities.js";import{getDisplayedSymbol as j}from"../symbols/support/symbolUtils.js";import{system as E}from"../time/constants.js";import{highlightsSupported as R}from"../views/support/layerViewUtils.js";import{GoTo as O}from"../widgets/support/GoTo.js";const U=()=>[S.clone()],T=()=>[C.clone(),P.clone()];let M=null;function H(e,t){switch(e){case"building-scene":case"map-image":case"tile":case"imagery":return!0;case"imagery-tile":return"2d"===t;default:return!1}}let V=class extends(O(s)){constructor(e){super(e),this._pendingPromises=new h,this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._defaultFeatureAbilities=new x,this._featureStreamVersion=0,this._activeFeatureStream=null,this.actions=new I,this.activeFeature=null,this.aggregatedFeaturesEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.diagnostics=null,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.heading=null,this.highlightEnabled=!0,this.includeDefaultActions=!0,this.open=!1,this.streamingFeatures=!1,this.updateLocationEnabled=!1,this.view=null,this.zoomFactor=4,this._debouncedLocationUpdate=n(async()=>{this._cancelLocationUpdate();const e=new AbortController,{signal:t}=e;this._locationUpdateController=e,await this._locationUpdate({signal:t}).catch(()=>{}).finally(()=>{this._locationUpdateController===e&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([c(()=>this.view?.scale,()=>{this.open&&l(this._debouncedLocationUpdate(),a.getLogger(this))}),c(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),c(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),c(()=>this.location,e=>this._locationChange(e)),c(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),c(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),c(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),c(()=>this.featureItems,()=>this._featureItemsChange()),c(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),p(()=>!this.waitingForResult,()=>this._waitingForResultChange(),d),p(()=>!this.open,()=>this.aggregatedFeaturesEnabled=!1)])}destroy(){this._cancelLocationUpdate(),this._cancelCenterAtLocation(),this._cancelFeatureStream(),this._pendingPromises.clear(),this.aggregatedFeaturesEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){const e=this._get("allActions")||new I;e.removeAll();const{actions:i,defaultActions:r,defaultPopupTemplateEnabled:s,includeDefaultActions:a,selectedFeature:o}=this,n=a?r.concat(i):i,l=o&&("function"==typeof o.getEffectivePopupTemplate&&o.getEffectivePopupTemplate(s)||o.popupTemplate),u=l?.actions,h=l?.overwriteActions?u:u?.concat(n)??n;return h?.filter(t).forEach(t=>e.add(t)),e}set content(e){this.promises=[],this.diagnostics=null,this.featureStream=null,this._set("content",e)}get defaultActions(){const e=this._get("defaultActions")||new I;return e.removeAll(),e.addMany(this.selectedFeature?.isAggregate?T():U()),e}get effectiveHeading(){return this.selectedFeatureItem?.heading??this.heading}get featureCount(){return this.features.length}set features(e){if(this._get("features")===e)return;const t=e||[];this._set("features",t),this._syncSelectedFeatureIndex(t)}get featureStream(){return this._get("featureStream")||null}set featureStream(e){if(this._get("featureStream")===e)return;if(this.diagnostics=null,this._set("featureStream",e),this._cancelFeatureStream(),!e)return;this.promises=[];const t=this._featureStreamVersion;this._activeFeatureStream=e,this._setStreamingFeatures(!0),this._consumeFeatureStream(e,t).catch(()=>{})}get initialDisplayMode(){return this._initialDisplayMode??(this.view?.focusRegionEnabled?"list":"feature")}set initialDisplayMode(e){this._initialDisplayMode=e,this._syncSelectedFeatureIndex(this.features)}set location(e){const t=e?.spatialReference?.isWGS84&&this.spatialReference?.isWebMercator?v(e):e;this._set("location",t)}get map(){return this.view?.map??null}set map(e){this._override("map",e)}get pendingPromisesCount(){return this._pendingPromises.size}get promiseCount(){return this.promises.length}get promises(){const e=this._get("promises")||[];return e.length>0&&i(a.getLogger(this),"promises",{replacement:"featureStream",warnOnce:!0}),e}set promises(e){Array.isArray(e)&&e.length>0&&i(a.getLogger(this),"promises",{replacement:"featureStream",warnOnce:!0}),this._get("promises")!==e&&(this._cancelFeatureStream(),this._pendingPromises.clear(),this.features=[],Array.isArray(e)&&e.length?(this._set("promises",e),e=e.slice(),g(this._pendingPromises,e),e.reduce((e,t)=>e.finally(()=>t.then(e=>{this._pendingPromises.has(t)&&this._updateFeatures(e)}).finally(()=>this._pendingPromises.delete(t)).catch(()=>{})),Promise.resolve())):this._set("promises",[]))}get selectedFeature(){return-1===this.selectedFeatureIndex?null:this.features[this.selectedFeatureIndex]??null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set("selectedFeatureIndex",e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){return this.view?this.view.ready?"ready":"disabled":this.map?"ready":"disabled"}get timeZone(){return this.view?.timeZone??E}set timeZone(e){this._overrideIfSome("timeZone",e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return(this.streamingFeatures||this.pendingPromisesCount>0)&&0===this.featureCount}zoomTo(e){return this.callGoTo(e)}clear(){this._cancelFeatureStream(),this.set({diagnostics:null,featureStream:null,promises:[],features:[],content:null,heading:null,location:null,activeFeature:null})}async fetchFeatures(e,t){const{view:i}=this;if(!i||!e)throw new r("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screen point/screen area and view.",{screenPoint:e,view:i});const s={},a=i.fetchPopupFeatures(e,{diagnostics:s,pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal});this.featureStream=a,this.diagnostics=s}next(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount)}previous(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount)}_syncSelectedFeatureIndex(e){const{pendingPromisesCount:t,promiseCount:i,selectedFeatureIndex:r}=this,s=i>0&&e.length>0,a=null!=this._activeFeatureStream&&e.length>0,o=s||a;"list"!==this.initialDisplayMode?o&&-1===r?this.selectedFeatureIndex=0:o&&-1!==r||(this.selectedFeatureIndex=e.length?0:-1):(!o||s&&t===i)&&(this.selectedFeatureIndex=-1)}_centerAtLocation(){const{view:e}=this,t=A(this);this._cancelCenterAtLocation();const i=new AbortController,{signal:s}=i;return this._centerAtLocationController=i,t&&e?this.callGoTo({target:{target:t,scale:e.scale},options:{signal:s}}).catch(e=>{u(e)||a.getLogger(this).error(e)}):Promise.reject(new r("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e}))}_getRoundRobinIndex(e,t){return(e+t)%t}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:i,view:r}=this;r&&!this._locationUpdateController&&i&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){-1!==this.selectedFeatureIndex&&(this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null)}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){const{features:e,featureCount:t,featurePage:i,featuresPerPage:r,featureItems:s}=this;if(null==i)return;const a=((i-1)*r+t)%t,o=Math.min(a+r,s.length);for(let n=a;n<o;n++){const t=s[n];t&&(t.graphic??=e[n])}}async _selectedFeatureChange(e){const{location:t,updateLocationEnabled:i,view:r}=this;if(this.aggregatedFeaturesEnabled=!1,!e||!r)return;const s=w(e)?.type;if("map-image"!==s&&"imagery"!==s&&"imagery-tile"!==s||(e.symbol=await j(e)),(i||!t)&&e.geometry){if("point"===e.geometry.type)return void(this.location=e.geometry);const{labelPointExecute:t}=await(import("../geometry/operators/labelPointOperator.js"));return void(this.location=t(e.geometry))}if(i&&!e.geometry){await this._centerAtLocation();const e=r.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&(this.promises.length>0||this.featureStream)&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",[])}_updateFeatureItems(){const e=this.selectedFeature,t=this.features,i=this.featureItems,r=this.view,s=this.spatialReference,a=this.map,o=this.timeZone,n=this.location,l=this.featureItemAbilities??this._defaultFeatureAbilities;if(!t?.length)return void this._destroyFeatureItems();const u=[],h=new Map,c=new Set;i.forEach(e=>{const t=e?.graphic;e&&t&&h.set(t,e)}),t.forEach((t,p)=>{if(!t)return;const d=i[p];if(d&&!c.has(d)&&(null==d.graphic||d.graphic===t))return d.abilities=l,u[p]=d,void c.add(d);const g=h.get(t);if(g&&!c.has(g))return g.abilities=l,u[p]=g,void c.add(g);const m=new L({abilities:l,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:s,graphic:t===e?t:null,location:n,map:a,view:r,timeZone:o});u[p]=m,c.add(m)}),i.forEach(e=>{!e||c.has(e)||e.destroyed||e.destroy()}),this._set("featureItems",u)}_cancelCenterAtLocation(){this._centerAtLocationController=o(this._centerAtLocationController)}_cancelFeatureStream(){this._featureStreamVersion++,this._setStreamingFeatures(!1);const e=this._activeFeatureStream;this._activeFeatureStream=null,this._get("featureStream")===e&&this._set("featureStream",null),e?.return&&e.return(void 0).catch(()=>{})}async _locationUpdate(e){const{spatialReference:t}=this,i=this.selectedFeature,r=i?.geometry?.type,s=this.location;if(r&&"mesh"!==r&&t&&s&&i){if("point"===r){const{labelPointExecute:t}=await(import("../geometry/operators/labelPointOperator.js"));if(e?.signal?.aborted||this.selectedFeature!==i||!i.geometry)return;return void(this.location=t(i.geometry))}try{let r=i.geometry;const a=this._getHighlightLayer(i),o=i.getObjectId();if(!a||!this.view)return;if(null!=o){const i=this.view?.allLayerViews.find(e=>e.layer.uid===a.uid);if(!i||!("queryFeatures"in i))return;const s=i.createQuery();s.outSpatialReference=t,s.objectIds=[o],s.returnGeometry=!0;const{features:n}=await i.queryFeatures(s,e);if(e?.signal?.aborted)return;r=n[0]?.geometry}if(!r||"mesh"===r.type)return;r=_(r,t),M??=await Promise.all([import("../geometry/operators/intersectsOperator.js"),import("../geometry/operators/proximityOperator.js")]);const[{intersectsExecute:n},{proximityGetNearestCoordinate:l}]=M;if(!n(r,s)){const e=l(r,s).coordinate??s;this.selectedFeature===i&&(this.location=e)}}catch(o){u(o)||a.getLogger(this).error(o)}}}_cancelLocationUpdate(){this._locationUpdateController=o(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){const t=w(e),{layer:i}=e;return t&&"layer"in t&&t.layer?t.layer:"map-notes"===t?.type||"subtype-group"===t?.type?t:i??t}_getHighlightLayerView(e,t){return"subtype-sublayer"===t.type&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,i){if(H(t.type,i))return e;const r=e.getObjectId();if(null!=r)return r;const s="imagery"===t.type?void 0:"objectIdField"in t?t.objectIdField||b:null,a=e.attributes;return a&&s&&a[s]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);const i=this[t];if(!i)return;const{highlightEnabled:r,view:s,open:a}=this;if(!s||!r||!a)return;const o=this._getHighlightLayer(i);if(!o)return;const n=this._getHighlightLayerView(s,o);if(!n)return;this._highlightPromises[e]=n;const l=await n;if(!(l&&R(l)&&this._highlightPromises[e]===n&&this[t]&&this.highlightEnabled))return;const u=l.highlight(this._getHighlightTarget(i,o,s.type));this.addHandles(u,e)}async _highlightActiveFeature(){return this._highlightFeature("highlight-active-feature","activeFeature")}async _highlightSelectedFeature(){return this._highlightFeature("highlight-selected-feature","selectedFeature")}async _consumeFeatureStream(e,t){try{for await(const i of e){if(t!==this._featureStreamVersion)return;this._updateFeatures([i])}}finally{this._activeFeatureStream===e&&(this._activeFeatureStream=null,this._setStreamingFeatures(!1),this._waitingForResultChange())}}_setStreamingFeatures(e){this._set("streamingFeatures",e)}_updateFeatures(e){const{features:t}=this,i=new Set(t),r=e.filter(e=>!i.has(e));r?.length&&(this.features=t.concat(r))}};e([m()],V.prototype,"_initialDisplayMode",void 0),e([m({type:I})],V.prototype,"actions",void 0),e([m({readOnly:!0})],V.prototype,"active",null),e([m()],V.prototype,"activeFeature",void 0),e([m({readOnly:!0})],V.prototype,"allActions",null),e([m()],V.prototype,"aggregatedFeaturesEnabled",void 0),e([m({value:null})],V.prototype,"content",null),e([m({type:I,readOnly:!0})],V.prototype,"defaultActions",null),e([m({type:Boolean})],V.prototype,"defaultPopupTemplateEnabled",void 0),e([m()],V.prototype,"diagnostics",void 0),e([m({readOnly:!0})],V.prototype,"effectiveHeading",null),e([m({readOnly:!0})],V.prototype,"featureCount",null),e([m()],V.prototype,"featurePage",void 0),e([m({value:[]})],V.prototype,"features",null),e([m()],V.prototype,"featureStream",null),e([m()],V.prototype,"featuresPerPage",void 0),e([m()],V.prototype,"featureMenuOpen",void 0),e([m({type:x})],V.prototype,"featureItemAbilities",void 0),e([m({readOnly:!0})],V.prototype,"featureItems",void 0),e([m()],V.prototype,"heading",void 0),e([m()],V.prototype,"highlightEnabled",void 0),e([m()],V.prototype,"includeDefaultActions",void 0),e([m()],V.prototype,"initialDisplayMode",null),e([m({type:y})],V.prototype,"location",null),e([m()],V.prototype,"map",null),e([m()],V.prototype,"open",void 0),e([m({readOnly:!0})],V.prototype,"streamingFeatures",void 0),e([m({readOnly:!0})],V.prototype,"pendingPromisesCount",null),e([m({readOnly:!0})],V.prototype,"promiseCount",null),e([m()],V.prototype,"promises",null),e([m({value:null,readOnly:!0})],V.prototype,"selectedFeature",null),e([m({value:-1})],V.prototype,"selectedFeatureIndex",null),e([m({readOnly:!0})],V.prototype,"selectedFeatureItem",null),e([m({type:F})],V.prototype,"spatialReference",null),e([m({readOnly:!0})],V.prototype,"state",null),e([m()],V.prototype,"timeZone",null),e([m()],V.prototype,"updateLocationEnabled",void 0),e([m()],V.prototype,"view",void 0),e([m({readOnly:!0})],V.prototype,"waitingForContents",null),e([m({readOnly:!0})],V.prototype,"waitingForResult",null),e([m()],V.prototype,"zoomFactor",void 0),V=e([f("esri.popup.FeatureContentCollection")],V);const D=V;export{D as default};
2
+ import{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import i from"../core/Error.js";import{EventedAccessor as a}from"../core/Evented.js";import r from"../core/Logger.js";import{abortMaybe as s}from"../core/maybe.js";import{debounce as o,logOnError as n,isAbortError as l}from"../core/promiseUtils.js";import{watch as u,when as h,sync as c}from"../core/reactiveUtils.js";import{property as p,subclass as d}from"../core/accessorSupport/decorators.js";import g from"../geometry/Point.js";import{project as m}from"../geometry/projectionUtils.js";import f from"../geometry/SpatialReference.js";import{geographicToWebMercator as y}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as _}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as F}from"../layers/LayerConstants.js";import{ActionsCollection as v,zoomToAggregatedFeatures as w,browseAggregatedFeatures as b,zoomToFeature as I}from"./actions.js";import{getSelectedTarget as C}from"./actionUtils.js";import A from"./FeatureContent.js";import S from"./support/FeatureAbilities.js";import{getDisplayedSymbol as P}from"../symbols/support/symbolUtils.js";import{system as x}from"../time/constants.js";import{highlightsSupported as L}from"../views/support/layerViewUtils.js";import{GoTo as E}from"../widgets/support/GoTo.js";const j=()=>[I.clone()],R=()=>[w.clone(),b.clone()];let O=null;function U(e,t){switch(e){case"building-scene":case"map-image":case"tile":case"imagery":return!0;case"imagery-tile":return"2d"===t;default:return!1}}let T=class extends(E(a)){constructor(e){super(e),this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._defaultFeatureAbilities=new S,this._activeFeatureStream=null,this.actions=new v,this.activeFeature=null,this.aggregatedFeaturesEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.diagnostics=null,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.heading=null,this.highlightEnabled=!0,this.includeDefaultActions=!0,this.open=!1,this.updateLocationEnabled=!1,this.view=null,this.zoomFactor=4,this._debouncedLocationUpdate=o(async()=>{this._cancelLocationUpdate();const e=new AbortController,{signal:t}=e;this._locationUpdateController=e,await this._locationUpdate({signal:t}).catch(()=>{}).finally(()=>{this._locationUpdateController===e&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([u(()=>this.view?.scale,()=>{this.open&&n(this._debouncedLocationUpdate(),r.getLogger(this))}),u(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),u(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),u(()=>this.location,e=>this._locationChange(e)),u(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),u(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),u(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),u(()=>this.featureItems,()=>this._featureItemsChange()),u(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),h(()=>!this.waitingForResult,()=>this._waitingForResultChange(),c),h(()=>!this.open,()=>this.aggregatedFeaturesEnabled=!1)])}destroy(){this._cancelLocationUpdate(),this._cancelCenterAtLocation(),this._cancelFeatureStream(),this.aggregatedFeaturesEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){const e=this._get("allActions")||new v;e.removeAll();const{actions:i,defaultActions:a,defaultPopupTemplateEnabled:r,includeDefaultActions:s,selectedFeature:o}=this,n=s?a.concat(i):i,l=o&&("function"==typeof o.getEffectivePopupTemplate&&o.getEffectivePopupTemplate(r)||o.popupTemplate),u=l?.actions,h=l?.overwriteActions?u:u?.concat(n)??n;return h?.filter(t).forEach(t=>e.add(t)),e}set content(e){this.featureStream=null,this._set("diagnostics",null),this.features=[],this._set("content",e)}get defaultActions(){const e=this._get("defaultActions")||new v;return e.removeAll(),e.addMany(this.selectedFeature?.isAggregate?R():j()),e}get effectiveHeading(){return this.selectedFeatureItem?.heading??this.heading}get featureCount(){return this.features.length}set features(e){if(this._get("features")===e)return;const t=e||[];this._set("features",t),this._syncSelectedFeatureIndex(t)}get featureStream(){return this._get("featureStream")||null}set featureStream(e){this._setFeatureStream(e)}_setFeatureStream(e,t,i){this._set("diagnostics",i??null),this._get("featureStream")!==e&&(this._set("featureStream",e),this._cancelFeatureStream(),e&&(this.features=[],this._activeFeatureStream=e,this._consumeFeatureStream(e,t).catch(()=>{})))}get initialDisplayMode(){return this._initialDisplayMode??(this.view?.focusRegionEnabled?"list":"feature")}set initialDisplayMode(e){this._initialDisplayMode=e,this._syncSelectedFeatureIndex(this.features)}set location(e){const t=e?.spatialReference?.isWGS84&&this.spatialReference?.isWebMercator?y(e):e;this._set("location",t)}get map(){return this.view?.map??null}set map(e){this._override("map",e)}get streamingFeatures(){return null!=this._activeFeatureStream}get selectedFeature(){return-1===this.selectedFeatureIndex?null:this.features[this.selectedFeatureIndex]??null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set("selectedFeatureIndex",e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){return this.view?this.view.ready?"ready":"disabled":this.map?"ready":"disabled"}get timeZone(){return this.view?.timeZone??x}set timeZone(e){this._overrideIfSome("timeZone",e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return this.streamingFeatures&&0===this.featureCount}zoomTo(e){return this.callGoTo(e)}clear(){this._cancelFeatureStream(),this._set("diagnostics",null),this.set({featureStream:null,features:[],content:null,heading:null,location:null,activeFeature:null})}openFeatureStream(e){this._setFeatureStream(e.featureStream,e.location??null,e.diagnostics),this.open=!0}async fetchFeatures(e,t){const{view:a}=this;if(!a||!e)throw new i("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screen point/screen area and view.",{screenPoint:e,view:a});const r={},s=a.fetchPopupFeatures(e,{diagnostics:r,pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal});this._setFeatureStream(s,void 0,r)}next(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount)}previous(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount)}_syncSelectedFeatureIndex(e){const{selectedFeatureIndex:t}=this,i=null!=this._activeFeatureStream&&e.length>0;"list"!==this.initialDisplayMode?i&&-1===t?this.selectedFeatureIndex=0:i&&-1!==t||(this.selectedFeatureIndex=e.length?0:-1):i||(this.selectedFeatureIndex=-1)}_centerAtLocation(){const{view:e}=this,t=C(this);this._cancelCenterAtLocation();const a=new AbortController,{signal:s}=a;return this._centerAtLocationController=a,t&&e?this.callGoTo({target:{target:t,scale:e.scale},options:{signal:s}}).catch(e=>{l(e)||r.getLogger(this).error(e)}):Promise.reject(new i("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e}))}_getRoundRobinIndex(e,t){return(e+t)%t}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:i,view:a}=this;a&&!this._locationUpdateController&&i&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){-1!==this.selectedFeatureIndex&&(this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null)}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){const{features:e,featureCount:t,featurePage:i,featuresPerPage:a,featureItems:r}=this;if(null==i)return;const s=((i-1)*a+t)%t,o=Math.min(s+a,r.length);for(let n=s;n<o;n++){const t=r[n];t&&(t.graphic??=e[n])}}async _selectedFeatureChange(e){const{location:t,updateLocationEnabled:i,view:a}=this;if(this.aggregatedFeaturesEnabled=!1,!e||!a)return;const r=_(e)?.type;if("map-image"!==r&&"imagery"!==r&&"imagery-tile"!==r||(e.symbol=await P(e)),(i||!t)&&e.geometry){if("point"===e.geometry.type)return void(this.location=e.geometry);const{labelPointExecute:t}=await(import("../geometry/operators/labelPointOperator.js"));return void(this.location=t(e.geometry))}if(i&&!e.geometry){await this._centerAtLocation();const e=a.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.featureStream&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",[])}_updateFeatureItems(){const e=this.selectedFeature,t=this.features,i=this.featureItems,a=this.view,r=this.spatialReference,s=this.map,o=this.timeZone,n=this.location,l=this.featureItemAbilities??this._defaultFeatureAbilities;if(!t?.length)return void this._destroyFeatureItems();const u=[],h=new Map,c=new Set;i.forEach(e=>{const t=e?.graphic;e&&t&&h.set(t,e)}),t.forEach((t,p)=>{if(!t)return;const d=i[p];if(d&&!c.has(d)&&(null==d.graphic||d.graphic===t))return d.abilities=l,u[p]=d,void c.add(d);const g=h.get(t);if(g&&!c.has(g))return g.abilities=l,u[p]=g,void c.add(g);const m=new A({abilities:l,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:r,graphic:t===e?t:null,location:n,map:s,view:a,timeZone:o});u[p]=m,c.add(m)}),i.forEach(e=>{!e||c.has(e)||e.destroyed||e.destroy()}),this._set("featureItems",u)}_cancelCenterAtLocation(){this._centerAtLocationController=s(this._centerAtLocationController)}_cancelFeatureStream(){const e=this._activeFeatureStream;this._activeFeatureStream=null,this._get("featureStream")===e&&this._set("featureStream",null),e?.return&&e.return(void 0).catch(()=>{})}async _locationUpdate(e){const{spatialReference:t}=this,i=this.selectedFeature,a=i?.geometry?.type,s=this.location;if(a&&"mesh"!==a&&t&&s&&i){if("point"===a){const{labelPointExecute:t}=await(import("../geometry/operators/labelPointOperator.js"));if(e?.signal?.aborted||this.selectedFeature!==i||!i.geometry)return;return void(this.location=t(i.geometry))}try{let a=i.geometry;const r=this._getHighlightLayer(i),o=i.getObjectId();if(!r||!this.view)return;if(null!=o){const i=this.view?.allLayerViews.find(e=>e.layer.uid===r.uid);if(!i||!("queryFeatures"in i))return;const s=i.createQuery();s.outSpatialReference=t,s.objectIds=[o],s.returnGeometry=!0;const{features:n}=await i.queryFeatures(s,e);if(e?.signal?.aborted)return;a=n[0]?.geometry}if(!a||"mesh"===a.type)return;a=m(a,t),O??=await Promise.all([import("../geometry/operators/intersectsOperator.js"),import("../geometry/operators/proximityOperator.js")]);const[{intersectsExecute:n},{proximityGetNearestCoordinate:l}]=O;if(!n(a,s)){const e=l(a,s).coordinate??s;this.selectedFeature===i&&(this.location=e)}}catch(o){l(o)||r.getLogger(this).error(o)}}}_cancelLocationUpdate(){this._locationUpdateController=s(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){const t=_(e),{layer:i}=e;return t&&"layer"in t&&t.layer?t.layer:"map-notes"===t?.type||"subtype-group"===t?.type?t:i??t}_getHighlightLayerView(e,t){return"subtype-sublayer"===t.type&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,i){if(U(t.type,i))return e;const a=e.getObjectId();if(null!=a)return a;const r="imagery"===t.type?void 0:"objectIdField"in t?t.objectIdField||F:null,s=e.attributes;return s&&r&&s[r]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);const i=this[t];if(!i)return;const{highlightEnabled:a,view:r,open:s}=this;if(!r||!a||!s)return;const o=this._getHighlightLayer(i);if(!o)return;const n=this._getHighlightLayerView(r,o);if(!n)return;this._highlightPromises[e]=n;const l=await n;if(!(l&&L(l)&&this._highlightPromises[e]===n&&this[t]&&this.highlightEnabled))return;const u=l.highlight(this._getHighlightTarget(i,o,r.type));this.addHandles(u,e)}async _highlightActiveFeature(){return this._highlightFeature("highlight-active-feature","activeFeature")}async _highlightSelectedFeature(){return this._highlightFeature("highlight-selected-feature","selectedFeature")}async _consumeFeatureStream(e,t){try{for await(const i of e){if(e!==this._activeFeatureStream)return;void 0!==t&&(this.location=t,t=void 0),this._addFeature(i)}}finally{this._activeFeatureStream===e&&(this._activeFeatureStream=null,this._waitingForResultChange())}}_addFeature(e){const{features:t}=this;t.includes(e)||(this.features=t.concat(e))}};e([p()],T.prototype,"_initialDisplayMode",void 0),e([p()],T.prototype,"_activeFeatureStream",void 0),e([p({type:v})],T.prototype,"actions",void 0),e([p({readOnly:!0})],T.prototype,"active",null),e([p()],T.prototype,"activeFeature",void 0),e([p({readOnly:!0})],T.prototype,"allActions",null),e([p()],T.prototype,"aggregatedFeaturesEnabled",void 0),e([p({value:null})],T.prototype,"content",null),e([p({type:v,readOnly:!0})],T.prototype,"defaultActions",null),e([p({type:Boolean})],T.prototype,"defaultPopupTemplateEnabled",void 0),e([p({readOnly:!0})],T.prototype,"diagnostics",void 0),e([p({readOnly:!0})],T.prototype,"effectiveHeading",null),e([p({readOnly:!0})],T.prototype,"featureCount",null),e([p()],T.prototype,"featurePage",void 0),e([p({value:[]})],T.prototype,"features",null),e([p()],T.prototype,"featureStream",null),e([p()],T.prototype,"featuresPerPage",void 0),e([p()],T.prototype,"featureMenuOpen",void 0),e([p({type:S})],T.prototype,"featureItemAbilities",void 0),e([p({readOnly:!0})],T.prototype,"featureItems",void 0),e([p()],T.prototype,"heading",void 0),e([p()],T.prototype,"highlightEnabled",void 0),e([p()],T.prototype,"includeDefaultActions",void 0),e([p()],T.prototype,"initialDisplayMode",null),e([p({type:g})],T.prototype,"location",null),e([p()],T.prototype,"map",null),e([p()],T.prototype,"open",void 0),e([p({readOnly:!0})],T.prototype,"streamingFeatures",null),e([p({value:null,readOnly:!0})],T.prototype,"selectedFeature",null),e([p({value:-1})],T.prototype,"selectedFeatureIndex",null),e([p({readOnly:!0})],T.prototype,"selectedFeatureItem",null),e([p({type:f})],T.prototype,"spatialReference",null),e([p({readOnly:!0})],T.prototype,"state",null),e([p()],T.prototype,"timeZone",null),e([p()],T.prototype,"updateLocationEnabled",void 0),e([p()],T.prototype,"view",void 0),e([p({readOnly:!0})],T.prototype,"waitingForContents",null),e([p({readOnly:!0})],T.prototype,"waitingForResult",null),e([p()],T.prototype,"zoomFactor",void 0),T=e([d("esri.popup.FeatureContentCollection")],T);const M=T;export{M as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const e="20260929",c="7012c974759d1222c40beaeef038078e481a19db";export{e as buildDate,c as revision};
2
+ const b="20260930",d="1383d1ccbd5b488f5bf190d0b659a09964d5b1e9";export{b as buildDate,d as revision};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{create as t}from"../../../geometry/support/aaBoundingRect.js";import{getRingsOrPathsBounds as e}from"../../../geometry/support/boundsUtils.js";import{isCurvedGeometry as n}from"../../../geometry/support/curves/curveUtils.js";import{getExtent as r}from"../SDFHelper.js";import{getNumericValue as o}from"../utils.js";function i(t){return"CIMSimpleLineCallout"===t.type||"CIMBackgroundCallout"===t.type||"CIMBalloonCallout"===t.type||"CIMPointSymbolCallout"===t.type||"CIMCompositeCallout"===t.type}function u(t,e){const n=o(t.angle,0);return 0===n?e:[...e,{offsetX:0,offsetY:0,rotation:n,size:0,frameHeight:0,rotateClockWise:!1,absoluteAnchorPoint:!1,scaleSymbolsProportionally:!1}]}function a(t){const e=t.symbolLayers?.filter(t=>"CIMVectorMarker"===t.type&&!1!==t.enable);if(!e?.length)return{contentWidthRatio:1,contentHeightRatio:1,contentRequiresRadialFit:!1};let r=1,o=1,i=!1;for(const u of e){const e=u.markerGraphics,a=u.frame;if(!a||1!==e?.length)return{contentWidthRatio:1,contentHeightRatio:1,contentRequiresRadialFit:!1};const l=e[0].geometry;if("vertexAttributes"in l&&"components"in l)throw new Error("InternalError: point symbol callout marker geometry cannot be a mesh");const f=n(l),m=c(l)??s(l),p=a.xmax-a.xmin,h=a.ymax-a.ymin;if(!m||p<=0||h<=0)return{contentWidthRatio:1,contentHeightRatio:1,contentRequiresRadialFit:!1};const g=((t.angle??0)+(u.rotation??0))*Math.PI/180,y=Math.abs(Math.cos(g)),R=Math.abs(Math.sin(g)),d=m[2]-m[0],C=m[3]-m[1],M=d*y+C*R,b=d*R+C*y,P=p*y+h*R,I=p*R+h*y;r=Math.min(r,M/P),o=Math.min(o,b/I),i||=f}return{contentWidthRatio:r,contentHeightRatio:o,contentRequiresRadialFit:i}}function c(t){const e=t.curveRings??t.rings;if(2!==e?.length)return null;const n=l([e[0]]),r=l([e[1]]);return n&&r?f(n,r)?r:f(r,n)?n:null:null}function s(t){const e=t.curveRings??t.curvePaths;return e?l(e):r(t)}function l(n){const r=e(t(),n);return r?[r[0],r[1],r[2],r[3]]:null}function f(t,e){return t[0]<e[0]&&t[1]<e[1]&&t[2]>e[2]&&t[3]>e[3]}function m(t,e){return"marker"===e?a(t):null}function p(t){switch(t){case"RoundedRectangle":return 1;case"Oval":return 2;case"Rectangle":return 0;default:return"number"==typeof t?t:0}}function h(t){switch(t){case"MidPoint":return 1;case"ThreePoint":return 2;case"FourPoint":return 3;case"Underline":return 4;case"CircularCW":return 5;case"CircularCCW":return 6;case"Base":return 0;default:return null==t||"number"==typeof t?t:0}}function g(t){if("number"==typeof t)return t;switch(t){case"PropUniform":return 1;case"PropNonuniform":return 2;case"DifUniform":return 3;case"DifNonuniform":return 4;default:return 0}}export{a as getPointSymbolCalloutContentRatios,m as getPointSymbolCalloutFitProperties,u as getPointSymbolCalloutTransforms,i as isSupportedCallout,p as normalizeBalloonCalloutStyle,h as normalizeLeaderLineStyle,g as normalizePointSymbolCalloutScale};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{scaleMargins as t,extractCalloutData as e,inflateBounds as o,contains as r,distance as n,autoSnap as a,createLeaderPath as l,createRectangle as s,createAccentBar as c}from"./calloutUtils.js";class i{constructor(){this.type="CIMBackgroundCallout"}static{this.instance=null}static local(){return null===i.instance&&(i.instance=new i),i.instance}execute(t,e,o){if("CIMBackgroundCallout"!==e?.type)throw new Error("Invalid effect type for BackgroundCalloutEffect");return new u(t,e,o)}}class u{constructor(e,o,r){const{geomUnitsPerPoint:n}=r;if(!n)throw new Error("geomUnitsPerPoint is required in EffectExecutionContext for BackgroundCalloutEffect");const a=n*(r.scaleFactor??1);this._inputGeometries=e,this._part=o.part,this._leaderTolerance=(o.leaderTolerance??0)*a,this._leaderOffset=(o.leaderOffset??0)*a,this._gap=(o.gap??0)*a,this._lineStyle=o.lineStyle,this._margins=t(o.margin,a),this._relativeCalloutAnchor=r.relativeCalloutAnchor,this._absoluteCalloutAnchor=r.absoluteCalloutAnchor,this._calloutBodyBounds=r.calloutBodyBounds}next(){let t;for(;t=this._inputGeometries.next();){const i=e(t,this._relativeCalloutAnchor,this._calloutBodyBounds,this._absoluteCalloutAnchor);if(!i)continue;const u=o(i.bounds,this._margins);switch(this._part){case"accent-bar":return c(u,i.anchor,this._gap,t.yFactor);case"background":return s(u,t.yFactor);default:return r(u,i.anchor)||n(a(u,i.anchor),i.anchor)<this._leaderTolerance?null:l(u,i.anchor,this._lineStyle,this._leaderOffset,t.yFactor)}}return null}}export{i as default};
2
+ import{scaleMargins as t,extractCalloutData as e,inflateBounds as r,contains as n,distance as o,autoSnap as a,createLeaderPath as l,createRectangle as c,createAccentBar as s}from"./calloutUtils.js";class i{constructor(){this.type="CIMBackgroundCallout"}static{this.instance=null}static local(){return null===i.instance&&(i.instance=new i),i.instance}execute(t,e,r){if("CIMBackgroundCallout"!==e?.type)throw new Error("Invalid effect type for BackgroundCalloutEffect");return new u(t,e,r)}}class u{constructor(e,r,n){const{geomUnitsPerPoint:o}=n;if(!o)throw new Error("geomUnitsPerPoint is required in EffectExecutionContext for BackgroundCalloutEffect");const a=o*(n.scaleFactor??1);this._inputGeometries=e,this._part=r.part,this._leaderTolerance=(r.leaderTolerance??0)*a,this._leaderOffset=(r.leaderOffset??0)*a,this._gap=(r.gap??0)*a,this._lineStyle=r.lineStyle,this._margins=t(r.margin,a),this._calloutContext=n.callout}next(){let t;for(;t=this._inputGeometries.next();){const i=e(t,this._calloutContext);if(!i)continue;const u=r(i.bounds,this._margins);switch(this._part){case"accent-bar":return s(u,i.layoutAnchor,this._gap,t.yFactor);case"background":return c(u,t.yFactor);default:return n(u,i.layoutAnchor)||o(a(u,i.layoutAnchor),i.layoutAnchor)<this._leaderTolerance?null:l(u,i.layoutAnchor,this._lineStyle,this._leaderOffset,t.yFactor,i.anchor)}}return null}}export{i as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{scaleMargins as t,extractCalloutData as l,createBalloonGeometry as o,inflateBounds as e}from"./calloutUtils.js";class n{constructor(){this.type="CIMBalloonCallout"}static{this.instance=null}static local(){return null===n.instance&&(n.instance=new n),n.instance}execute(t,l,o){if("CIMBalloonCallout"!==l?.type)throw new Error("Invalid effect type for BalloonCalloutEffect");return new r(t,l,o)}}class r{constructor(l,o,e){const{geomUnitsPerPoint:n}=e;if(!n)throw new Error("geomUnitsPerPoint is required in EffectExecutionContext for BalloonCalloutEffect");const r=n*(e.scaleFactor??1);this._inputGeometries=l,this._balloonStyle=o.balloonStyle,this._dartWidth=null!=o.dartWidth?o.dartWidth*r:null,this._leaderTolerance=(o.leaderTolerance??0)*r,this._margins=t(o.margin,r),this._relativeCalloutAnchor=e.relativeCalloutAnchor,this._absoluteCalloutAnchor=e.absoluteCalloutAnchor,this._calloutBodyBounds=e.calloutBodyBounds}next(){let t;for(;t=this._inputGeometries.next();){const n=l(t,this._relativeCalloutAnchor,this._calloutBodyBounds,this._absoluteCalloutAnchor);if(n)return o(e(n.bounds,this._margins),n.anchor,this._balloonStyle,this._leaderTolerance,t.yFactor,this._dartWidth)}return null}}export{n as default};
2
+ import{scaleMargins as t,extractCalloutData as e,createBalloonGeometry as l,inflateBounds as o}from"./calloutUtils.js";class n{constructor(){this.type="CIMBalloonCallout"}static{this.instance=null}static local(){return null===n.instance&&(n.instance=new n),n.instance}execute(t,e,l){if("CIMBalloonCallout"!==e?.type)throw new Error("Invalid effect type for BalloonCalloutEffect");return new r(t,e,l)}}class r{constructor(e,l,o){const{geomUnitsPerPoint:n}=o;if(!n)throw new Error("geomUnitsPerPoint is required in EffectExecutionContext for BalloonCalloutEffect");const r=n*(o.scaleFactor??1);this._inputGeometries=e,this._balloonStyle=l.balloonStyle,this._dartWidth=null!=l.dartWidth?l.dartWidth*r:null,this._leaderTolerance=(l.leaderTolerance??0)*r,this._margins=t(l.margin,r),this._calloutContext=o.callout}next(){let t;for(;t=this._inputGeometries.next();){const n=e(t,this._calloutContext);if(n)return l(o(n.bounds,this._margins),n.anchor,this._balloonStyle,this._leaderTolerance,t.yFactor,this._dartWidth,n.layoutAnchor)}return null}}export{n as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{extractCalloutData as t,createPointGeometry as e,center as o,contains as l,distance as n,autoSnap as r,createLeaderPath as s}from"./calloutUtils.js";class a{constructor(){this.type="CIMPointSymbolCallout"}static{this.instance=null}static local(){return null===a.instance&&(a.instance=new a),a.instance}execute(t,e,o){if("CIMPointSymbolCallout"!==e?.type)throw new Error("Invalid effect type for PointSymbolCalloutEffect");return new i(t,e,o)}}class i{constructor(t,e,o){const{geomUnitsPerPoint:l}=o;if(!l)throw new Error("geomUnitsPerPoint is required in EffectExecutionContext for PointSymbolCalloutEffect");const n=l*(o.scaleFactor??1);this._inputGeometries=t,this._part=e.part,this._leaderTolerance=(e.leaderTolerance??0)*n,this._leaderOffset=(e.leaderOffset??0)*n,this._lineStyle=e.lineStyle,this._relativeCalloutAnchor=o.relativeCalloutAnchor,this._absoluteCalloutAnchor=o.absoluteCalloutAnchor,this._calloutBodyBounds=o.calloutBodyBounds}next(){let a;for(;a=this._inputGeometries.next();){const i=t(a,this._relativeCalloutAnchor,this._calloutBodyBounds,this._absoluteCalloutAnchor);if(i)return"marker"===this._part?e(o(i.bounds),a.yFactor):l(i.bounds,i.anchor)||n(r(i.bounds,i.anchor),i.anchor)<this._leaderTolerance?null:s(i.bounds,i.anchor,this._lineStyle,this._leaderOffset,a.yFactor)}return null}}export{a as default};
2
+ import{extractCalloutData as t,createPointGeometry as e,center as o,contains as n,distance as l,autoSnap as r,createLeaderPath as i}from"./calloutUtils.js";class s{constructor(){this.type="CIMPointSymbolCallout"}static{this.instance=null}static local(){return null===s.instance&&(s.instance=new s),s.instance}execute(t,e,o){if("CIMPointSymbolCallout"!==e?.type)throw new Error("Invalid effect type for PointSymbolCalloutEffect");return new a(t,e,o)}}class a{constructor(t,e,o){const{geomUnitsPerPoint:n}=o;if(!n)throw new Error("geomUnitsPerPoint is required in EffectExecutionContext for PointSymbolCalloutEffect");const l=n*(o.scaleFactor??1);this._inputGeometries=t,this._part=e.part,this._leaderTolerance=(e.leaderTolerance??0)*l,this._leaderOffset=(e.leaderOffset??0)*l,this._lineStyle=e.lineStyle,this._calloutContext=o.callout}next(){let s;for(;s=this._inputGeometries.next();){const a=t(s,this._calloutContext);if(a)return"marker"===this._part?e(o(a.bounds),s.yFactor):n(a.bounds,a.layoutAnchor)||l(r(a.bounds,a.layoutAnchor),a.layoutAnchor)<this._leaderTolerance?null:i(a.bounds,a.layoutAnchor,this._lineStyle,this._leaderOffset,s.yFactor,a.anchor)}return null}}export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{GeometryCursor as e}from"../../../../geometry/GeometryCursor.js";import{extractCalloutData as t,autoSnap as n}from"./calloutUtils.js";class r{constructor(){this.type="CIMSimpleLineCallout"}static{this.instance=null}static local(){return null===r.instance&&(r.instance=new r),r.instance}execute(e,t,n){if("CIMSimpleLineCallout"!==t?.type)throw new Error("Invalid effect type for SimpleLineCalloutEffect");return new o(e,t,n)}}class o{constructor(e,t,n){this._inputGeometries=e,this._autoSnap=t.autoSnap??!0;const r=n.geomUnitsPerPoint*(n.scaleFactor??1);this._leaderTolerance=(t.leaderTolerance??0)*r,this._relativeCalloutAnchor=n.relativeCalloutAnchor,this._absoluteCalloutAnchor=n.absoluteCalloutAnchor,this._calloutBodyBounds=n.calloutBodyBounds}next(){let e;for(;e=this._inputGeometries.next();){const t=this._createLeaderGeometry(e);if(t)return t}return null}_createLeaderGeometry(e){const r=t(e,this._relativeCalloutAnchor,this._calloutBodyBounds,this._absoluteCalloutAnchor);if(r){const t=this._autoSnap?n(r.bounds,r.anchor):l(r.bounds);return a(r.bounds,r.anchor)||!this._passesLeaderTolerance(t,r.anchor)?null:i(t,r.anchor,e.yFactor)}return"esriGeometryPolyline"===e.geometryType&&this._passesPolylineTolerance(e)?e.clone():null}_passesLeaderTolerance(e,t){return this._leaderTolerance<=0||s(e,t)>=this._leaderTolerance}_passesPolylineTolerance(e){if(this._leaderTolerance<=0)return!0;const t=e.clone();let n=0;for(;t.nextPath();)n+=t.pathLength();return n>=this._leaderTolerance}}function l(e){return{x:e.xmin,y:e.ymin}}function a(e,t){return t.x>=e.xmin&&t.x<=e.xmax&&t.y>=e.ymin&&t.y<=e.ymax}function s(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function i(t,n,r){const o=e.createEmptyOptimizedCIM("esriGeometryPolyline",!1,!1,r);return o.startPath(),o.pushXY(t.x,r*t.y),o.pushXY(n.x,r*n.y),o.reset(),o}export{r as default};
2
+ import{GeometryCursor as e}from"../../../../geometry/GeometryCursor.js";import{extractCalloutData as t,autoSnap as n}from"./calloutUtils.js";class r{constructor(){this.type="CIMSimpleLineCallout"}static{this.instance=null}static local(){return null===r.instance&&(r.instance=new r),r.instance}execute(e,t,n){if("CIMSimpleLineCallout"!==t?.type)throw new Error("Invalid effect type for SimpleLineCalloutEffect");return new o(e,t,n)}}class o{constructor(e,t,n){this._inputGeometries=e,this._autoSnap=t.autoSnap??!0;const r=n.geomUnitsPerPoint*(n.scaleFactor??1);this._leaderTolerance=(t.leaderTolerance??0)*r,this._calloutContext=n.callout}next(){let e;for(;e=this._inputGeometries.next();){const t=this._createLeaderGeometry(e);if(t)return t}return null}_createLeaderGeometry(e){const r=t(e,this._calloutContext);if(r){const t=this._autoSnap?n(r.bounds,r.layoutAnchor):a(r.bounds);return l(r.bounds,r.layoutAnchor)||!this._passesLeaderTolerance(t,r.layoutAnchor)?null:i(t,r.anchor,e.yFactor)}return"esriGeometryPolyline"===e.geometryType&&this._passesPolylineTolerance(e)?e.clone():null}_passesLeaderTolerance(e,t){return this._leaderTolerance<=0||s(e,t)>=this._leaderTolerance}_passesPolylineTolerance(e){if(this._leaderTolerance<=0)return!0;const t=e.clone();let n=0;for(;t.nextPath();)n+=t.pathLength();return n>=this._leaderTolerance}}function a(e){return{x:e.xmin,y:e.ymin}}function l(e,t){return t.x>=e.xmin&&t.x<=e.xmax&&t.y>=e.ymin&&t.y<=e.ymax}function s(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function i(t,n,r){const o=e.createEmptyOptimizedCIM("esriGeometryPolyline",!1,!1,r);return o.startPath(),o.pushXY(t.x,r*t.y),o.pushXY(n.x,r*n.y),o.reset(),o}export{r as default};