@arcgis/core 4.32.0-next.20241218 → 4.32.0-next.20241220

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 (277) hide show
  1. package/Basemap.js +1 -1
  2. package/arcade.js +1 -1
  3. package/assets/components/assets/text-area/t9n/messages.en.json +1 -1
  4. package/assets/components/assets/text-area/t9n/messages.json +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/{6ceafd4420d21110d820.js → 015285436ca965f94e17.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{57aa1fcef6587305b347.js → 0191142d5f55cc8cf37a.js} +93 -93
  8. package/assets/esri/core/workers/chunks/{7a0ddaf2c279a2d24c86.js → 0837a630e12a21fc2e50.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0b3e1e903120da297641.js +1 -0
  10. package/assets/esri/core/workers/chunks/0f1a7aeec18db5323365.js +1 -0
  11. package/assets/esri/core/workers/chunks/{cca47dab8c1b8ae49fab.js → 11052103efe3d53a784e.js} +1 -1
  12. package/assets/esri/core/workers/chunks/19d72185d50ba1ebff50.js +1 -0
  13. package/assets/esri/core/workers/chunks/{b99de19b6930ba6dad98.js → 1d8609ba413e8a172719.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{d05fab1af651b7e92442.js → 23fe65988dbc9e5d7842.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2427a01678f3d9fbf30b.js +1 -0
  16. package/assets/esri/core/workers/chunks/2c084c0c324e3af56424.js +1 -0
  17. package/assets/esri/core/workers/chunks/3a90163b76b0bc7f21d2.js +1 -0
  18. package/assets/esri/core/workers/chunks/48266c87363e7dcaefb3.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d3790bd1a644eae1005b.js → 48f6eb3b63fec1d3312d.js} +4 -5
  20. package/assets/esri/core/workers/chunks/5a0eb9dfe668cf290462.js +1 -0
  21. package/assets/esri/core/workers/chunks/668679baf519ada9ae28.js +1 -0
  22. package/assets/esri/core/workers/chunks/69efc716991a407c3d23.js +1 -0
  23. package/assets/esri/core/workers/chunks/7156d2ae914e1add0109.js +1 -0
  24. package/assets/esri/core/workers/chunks/737f381f2cfeddb96d15.js +1 -0
  25. package/assets/esri/core/workers/chunks/{b77d294ad7064734d015.js → 741d5dadfab2a7689054.js} +1 -1
  26. package/assets/esri/core/workers/chunks/756c2f7c8659deab6c96.js.LICENSE.txt +1 -1
  27. package/assets/esri/core/workers/chunks/{1cee35ea0a80737730d5.js → 770d233254419b741616.js} +1 -1
  28. package/assets/esri/core/workers/chunks/8249351daa45ca82ca0c.js +1 -0
  29. package/assets/esri/core/workers/chunks/9372d08ba8bf3342c48f.js +1 -0
  30. package/assets/esri/core/workers/chunks/{fb43c44a7d6b61f31e75.js → 94432e04de01ee7adc0e.js} +1 -1
  31. package/assets/esri/core/workers/chunks/95af4dee29eb196b8ada.js +1 -0
  32. package/assets/esri/core/workers/chunks/{80ac74da0b0e45e74beb.js → 9a498f2c007f4d78d4dd.js} +1 -1
  33. package/assets/esri/core/workers/chunks/9cc9bac6e02ab241e852.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d347dd19a37ba2f19970.js → 9fc49968dea8e2b64f3e.js} +1 -1
  35. package/assets/esri/core/workers/chunks/a776f71b4c7b8728a973.js +1 -0
  36. package/assets/esri/core/workers/chunks/a77aa86896bbb0e088df.js +1 -0
  37. package/assets/esri/core/workers/chunks/{7c9e4d479d740723304b.js → b1e4813f0c73fc2a483c.js} +2 -2
  38. package/assets/esri/core/workers/chunks/{7c9e4d479d740723304b.js.LICENSE.txt → b1e4813f0c73fc2a483c.js.LICENSE.txt} +1 -1
  39. package/assets/esri/core/workers/chunks/bd37c9cc720587665fd3.js +1 -0
  40. package/assets/esri/core/workers/chunks/bf0a0ca7fdac98f06a89.js.LICENSE.txt +1 -1
  41. package/assets/esri/core/workers/chunks/{eddab4dc706e75c6637f.js → bff74200a0df0950cf08.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{8f2ffb6944c9028d3bea.js → c08cb75c3eef6c45f604.js} +1 -1
  43. package/assets/esri/core/workers/chunks/cb3af81e1fe6405c4885.js +1 -0
  44. package/assets/esri/core/workers/chunks/cc427e8f1b17744b6ea4.js +1 -0
  45. package/assets/esri/core/workers/chunks/cfe4b8101ea96d6996d3.js +2 -0
  46. package/assets/esri/core/workers/chunks/{f3f5c5138de8428bd30f.js.LICENSE.txt → cfe4b8101ea96d6996d3.js.LICENSE.txt} +1 -1
  47. package/assets/esri/core/workers/chunks/d7b76bc7bff34abc2253.js +1 -0
  48. package/assets/esri/core/workers/chunks/dce55e7f76adecc055c3.js +1 -0
  49. package/assets/esri/core/workers/chunks/dd34df14eb4940e2497b.js +1 -0
  50. package/assets/esri/core/workers/chunks/dfd9432ba01881d0a4d9.js +2 -0
  51. package/assets/esri/core/workers/chunks/{ed2ebe42d6483470939a.js.LICENSE.txt → dfd9432ba01881d0a4d9.js.LICENSE.txt} +1 -1
  52. package/assets/esri/core/workers/chunks/e1913990f30d285b3b15.js +2 -0
  53. package/assets/esri/core/workers/chunks/{aff820b27ca9585e297e.js.LICENSE.txt → e1913990f30d285b3b15.js.LICENSE.txt} +1 -1
  54. package/assets/esri/core/workers/chunks/{e6490fe7c87c1d649ea6.js → e5d55a35dace70239902.js} +1 -1
  55. package/assets/esri/core/workers/chunks/ebf9caf2dc8af89afec2.js +2 -0
  56. package/assets/esri/core/workers/chunks/{2eb36a16de1a823513cd.js.LICENSE.txt → ebf9caf2dc8af89afec2.js.LICENSE.txt} +1 -1
  57. package/assets/esri/core/workers/chunks/f25c04cf1a4bc1d2636a.js +1 -0
  58. package/assets/esri/core/workers/chunks/f2cdb7be3fd65f65c30b.js +1 -0
  59. package/assets/esri/themes/base/widgets/_FeatureTable.scss +3 -3
  60. package/assets/esri/themes/dark/main.css +1 -1
  61. package/assets/esri/themes/light/main.css +1 -1
  62. package/assets/esri/themes/light/view.css +1 -1
  63. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  64. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  65. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  66. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  67. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  68. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  69. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  70. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  71. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  72. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  73. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  74. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  75. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  76. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  77. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  78. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  79. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  80. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  81. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  82. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  83. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  84. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  85. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  86. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  87. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  88. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  89. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  90. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  91. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  92. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  93. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  94. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  95. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  96. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  97. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  98. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  99. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  100. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  101. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  102. package/chunks/HUDMaterial.glsl.js +41 -42
  103. package/chunks/OITBlend.glsl.js +3 -3
  104. package/chunks/OperatorProject.js +1 -1
  105. package/chunks/QuadraticBezier.js +1 -1
  106. package/chunks/chartUtilsAm5.js +1 -1
  107. package/core/number.js +1 -1
  108. package/geometry/operators/affineTransformOperator.js +1 -1
  109. package/geometry/operators/alphaShapeOperator.js +1 -1
  110. package/geometry/operators/areaOperator.js +1 -1
  111. package/geometry/operators/autoCompleteOperator.js +1 -1
  112. package/geometry/operators/boundaryOperator.js +1 -1
  113. package/geometry/operators/bufferOperator.js +1 -1
  114. package/geometry/operators/centroidOperator.js +1 -1
  115. package/geometry/operators/clipOperator.js +1 -1
  116. package/geometry/operators/containsOperator.js +1 -1
  117. package/geometry/operators/convexHullOperator.js +1 -1
  118. package/geometry/operators/crossesOperator.js +1 -1
  119. package/geometry/operators/cutOperator.js +1 -1
  120. package/geometry/operators/densifyOperator.js +1 -1
  121. package/geometry/operators/differenceOperator.js +1 -1
  122. package/geometry/operators/disjointOperator.js +1 -1
  123. package/geometry/operators/distanceOperator.js +1 -1
  124. package/geometry/operators/equalsOperator.js +1 -1
  125. package/geometry/operators/extendOperator.js +1 -1
  126. package/geometry/operators/generalizeOperator.js +1 -1
  127. package/geometry/operators/geodesicBufferOperator.js +1 -1
  128. package/geometry/operators/geodesicProximityOperator.js +1 -1
  129. package/geometry/operators/geodeticAreaOperator.js +1 -1
  130. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  131. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  132. package/geometry/operators/geodeticLengthOperator.js +1 -1
  133. package/geometry/operators/graphicBufferOperator.js +1 -1
  134. package/geometry/operators/gx/operatorOffset.js +1 -1
  135. package/geometry/operators/integrateOperator.js +1 -1
  136. package/geometry/operators/intersectionOperator.js +1 -1
  137. package/geometry/operators/intersectsOperator.js +1 -1
  138. package/geometry/operators/isNearOperator.js +1 -1
  139. package/geometry/operators/labelPointOperator.js +1 -1
  140. package/geometry/operators/lengthOperator.js +1 -1
  141. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  142. package/geometry/operators/locateBetweenOperator.js +1 -1
  143. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  144. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  145. package/geometry/operators/offsetOperator.js +1 -1
  146. package/geometry/operators/overlapsOperator.js +1 -1
  147. package/geometry/operators/polygonOverlayOperator.js +1 -1
  148. package/geometry/operators/polygonSlicerOperator.js +1 -1
  149. package/geometry/operators/projectOperator.js +1 -1
  150. package/geometry/operators/proximityOperator.js +1 -1
  151. package/geometry/operators/relateOperator.js +1 -1
  152. package/geometry/operators/reshapeOperator.js +1 -1
  153. package/geometry/operators/simplifyOperator.js +1 -1
  154. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  155. package/geometry/operators/support/jsonConverter.js +1 -1
  156. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  157. package/geometry/operators/touchesOperator.js +1 -1
  158. package/geometry/operators/unionOperator.js +1 -1
  159. package/geometry/operators/withinOperator.js +1 -1
  160. package/interfaces.d.ts +1020 -735
  161. package/intl/messages.js +1 -1
  162. package/layers/graphics/OptimizedFeature.js +1 -1
  163. package/layers/graphics/sources/geojson/geojson.js +1 -1
  164. package/layers/support/Sublayer.js +1 -1
  165. package/layers/support/domainUtils.js +1 -1
  166. package/layers/support/fieldUtils.js +1 -1
  167. package/package.json +2 -2
  168. package/renderers/support/RendererLegendOptions.js +1 -1
  169. package/rest/featureService/utils.js +1 -1
  170. package/rest/query/operations/pbfOptimizedFeatureSet.js +1 -1
  171. package/rest/support/AddressToLocationsParameters.js +1 -1
  172. package/rest/support/LocationToAddressParameters.js +1 -1
  173. package/smartMapping/popup/classBreaks.js +1 -1
  174. package/smartMapping/popup/clusters.js +1 -1
  175. package/smartMapping/popup/dotDensity.js +1 -1
  176. package/smartMapping/popup/heatmap.js +1 -1
  177. package/smartMapping/popup/predominance.js +1 -1
  178. package/smartMapping/popup/relationship.js +1 -1
  179. package/smartMapping/popup/simple.js +1 -1
  180. package/smartMapping/popup/support/utils.js +1 -1
  181. package/smartMapping/popup/templates.js +1 -1
  182. package/smartMapping/popup/uniqueValues.js +1 -1
  183. package/smartMapping/raster/renderers/flow.js +1 -1
  184. package/smartMapping/renderers/pieChart.js +1 -1
  185. package/smartMapping/symbology/support/utils.js +1 -1
  186. package/support/BasemapStyle.js +1 -1
  187. package/support/revision.js +1 -1
  188. package/versionManagement/versionAdapters/utils.js +1 -1
  189. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  190. package/views/2d/input/MapViewInputManager.js +1 -1
  191. package/views/2d/input/handlers/KeyRotate.js +1 -1
  192. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  193. package/views/2d/layers/features/FeatureContainer.js +1 -1
  194. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  195. package/views/2d/layers/features/Processor.js +1 -1
  196. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  197. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  198. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  199. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  200. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  201. package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
  202. package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
  203. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +5 -0
  204. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  205. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  206. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  207. package/views/2d/layers/support/DebouncedFeatureOverride.js +5 -0
  208. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  209. package/views/3d/input/SceneInputManager.js +1 -1
  210. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  211. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  212. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  213. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  214. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  215. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  216. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  217. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  218. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  219. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  220. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +2 -2
  221. package/views/3d/webgl.js +1 -1
  222. package/views/SelectionManager.js +1 -1
  223. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  224. package/views/layers/FeatureLayerView.js +1 -1
  225. package/widgets/Directions/DirectionsViewModel.js +1 -1
  226. package/widgets/FeatureTable/FieldColumn.js +1 -1
  227. package/widgets/Features/FeaturesViewModel.js +1 -1
  228. package/widgets/Features.js +1 -1
  229. package/widgets/LayerList/LayerListItem.js +1 -1
  230. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  231. package/widgets/OrientedImageryViewer/adapters/sketch/DigitizationAdapter.js +1 -1
  232. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  233. package/widgets/OrientedImageryViewer/digitizationUtils.js +1 -1
  234. package/widgets/OrientedImageryViewer.js +1 -1
  235. package/widgets/Popup.js +1 -1
  236. package/widgets/ShadowCast.js +1 -1
  237. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  238. package/widgets/support/forms/formUtils.js +1 -1
  239. package/widgets/support/widget.js +1 -1
  240. package/widgets/support/widgetUtils.js +1 -1
  241. package/applications/Components/CollectionFlattener.d.ts +0 -4
  242. package/applications/Components/CollectionFlattener.js +0 -5
  243. package/assets/esri/core/workers/chunks/062da071fd27022f6cb1.js +0 -1
  244. package/assets/esri/core/workers/chunks/0f0cc8150326ca7bcd6f.js +0 -1
  245. package/assets/esri/core/workers/chunks/1808a2b023fa04c6ee6c.js +0 -1
  246. package/assets/esri/core/workers/chunks/1d31b07805af85a4ba7b.js +0 -1
  247. package/assets/esri/core/workers/chunks/1fb142a533e4ee492a50.js +0 -1
  248. package/assets/esri/core/workers/chunks/28f3e139a4e3b70d84a4.js +0 -1
  249. package/assets/esri/core/workers/chunks/2daf5f46e4b137d33f12.js +0 -1
  250. package/assets/esri/core/workers/chunks/2eb36a16de1a823513cd.js +0 -2
  251. package/assets/esri/core/workers/chunks/382c3da5ce9b3231f57c.js +0 -1
  252. package/assets/esri/core/workers/chunks/433798a25dd688cef327.js +0 -1
  253. package/assets/esri/core/workers/chunks/56a04f5976b926de448e.js +0 -1
  254. package/assets/esri/core/workers/chunks/5786b190ad3e2d933245.js +0 -1
  255. package/assets/esri/core/workers/chunks/6bd6c280c741f8917cc8.js +0 -1
  256. package/assets/esri/core/workers/chunks/70153bb44fd5b7cfecb8.js +0 -1
  257. package/assets/esri/core/workers/chunks/78981dee7b5403c32517.js +0 -1
  258. package/assets/esri/core/workers/chunks/7bb52be0a02fb2a2631c.js +0 -1
  259. package/assets/esri/core/workers/chunks/80f1f967646f7a7d37ec.js +0 -1
  260. package/assets/esri/core/workers/chunks/820bb7ea30ad30ce8f42.js +0 -1
  261. package/assets/esri/core/workers/chunks/8f2f2d497b875e2b4139.js +0 -1
  262. package/assets/esri/core/workers/chunks/95ea191f6a307b73b545.js +0 -1
  263. package/assets/esri/core/workers/chunks/9fab71f1041c40d976af.js +0 -1
  264. package/assets/esri/core/workers/chunks/a0a37c238863ffc1b768.js +0 -1
  265. package/assets/esri/core/workers/chunks/aa31073c7fe3b0e4e499.js +0 -1
  266. package/assets/esri/core/workers/chunks/af5d74311cec22601f73.js +0 -1
  267. package/assets/esri/core/workers/chunks/aff820b27ca9585e297e.js +0 -2
  268. package/assets/esri/core/workers/chunks/bf2d1a700fff4ae0db33.js +0 -1
  269. package/assets/esri/core/workers/chunks/da6c0c894e7e281169fa.js +0 -1
  270. package/assets/esri/core/workers/chunks/ed2ebe42d6483470939a.js +0 -2
  271. package/assets/esri/core/workers/chunks/f3f5c5138de8428bd30f.js +0 -2
  272. package/assets/esri/core/workers/chunks/f429d95eb986f3d215f3.js +0 -1
  273. package/assets/esri/core/workers/chunks/fce1158755f959730602.js +0 -1
  274. package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +0 -5
  275. package/views/3d/input/handlers/SingleKey.js +0 -5
  276. package/views/3d/input/handlers/SingleKeyResetHeading.js +0 -5
  277. package/views/3d/input/handlers/SingleKeyResetTilt.js +0 -5
package/intl/messages.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import t from"../core/Error.js";import{makeHandle as e}from"../core/handleUtils.js";import{createResolver as n}from"../core/promiseUtils.js";import{beforeLocaleChange as s,getLocale as r}from"./locale.js";const o=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,i={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function a(t){return t in i}const c=[],d=new Map;function l(t){for(const e of d.keys())_(t.pattern,e)&&d.delete(e)}function u(t){return c.includes(t)||(l(t),c.unshift(t)),e((()=>{const e=c.indexOf(t);e>-1&&(c.splice(e,1),l(t))}))}async function h(t){const e=r();d.has(t)||d.set(t,m(t,e));const n=d.get(t);return n&&await p.add(n),n}function f(t){if(!o.test(t))return null;const e=o.exec(t);if(null===e)return null;const[,n,s]=e,r=n+(s?"-"+s.toUpperCase():"");return a(r)?r:a(n)?n:null}async function m(e,n){const s=[];for(const t of c)if(_(t.pattern,e))try{return await t.fetchMessageBundle(e,n)}catch(r){s.push(r)}if(s.length)throw new t("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:s});throw new t("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}function _(t,e){return"string"==typeof t?e.startsWith(t):t.test(e)}s((()=>{d.clear()}));const p=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(t){return this._increase(),t.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=n())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}},g={cache:d,loaders:c};export{h as fetchMessageBundle,i as messageBundlesLocaleMap,f as normalizeMessageBundleLocale,u as registerMessageBundleLoader,g as test};
5
+ import t from"../core/Error.js";import{makeHandle as n}from"../core/handleUtils.js";import{createResolver as e}from"../core/promiseUtils.js";import{beforeLocaleChange as r,getLocale as s}from"./locale.js";const o=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,i={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:"no",nl:!0,no:!0,pl:!0,pt:"pt-BR","pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,zh:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function a(t){return t in i}function c(t){if(a(t)){const n=i[t];return!0===n?t:n}return null}const d=[],l=new Map;function u(t){for(const n of l.keys())_(t.pattern,n)&&l.delete(n)}function h(t){return d.includes(t)||(u(t),d.unshift(t)),n((()=>{const n=d.indexOf(t);n>-1&&(d.splice(n,1),u(t))}))}async function f(t){const n=s();l.has(t)||l.set(t,m(t,n));const e=l.get(t);return e&&await g.add(e),e}function p(t){if(!o.test(t))return null;const n=o.exec(t);if(null===n)return null;const[,e,r]=n;return c(e+(r?"-"+r.toUpperCase():""))??c(e)}async function m(n,e){const r=[];for(const t of d)if(_(t.pattern,n))try{return await t.fetchMessageBundle(n,e)}catch(s){r.push(s)}if(r.length)throw new t("intl:message-bundle-error",`Errors occurred while loading "${n}"`,{errors:r});throw new t("intl:no-message-bundle-loader",`No loader found for message bundle "${n}"`)}function _(t,n){return"string"==typeof t?n.startsWith(t):t.test(n)}r((()=>{l.clear()}));const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(t){return this._increase(),t.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=e())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}},w={cache:l,loaders:d};export{f as fetchMessageBundle,i as messageBundlesLocaleMap,p as normalizeMessageBundleLocale,h as registerMessageBundleLoader,w as test};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{estimateAttributesMemory as t}from"../../core/memoryEstimations.js";import{getCentroidOptimizedGeometry as e}from"./centroid.js";import r from"./OptimizedGeometry.js";class s{constructor(t=null,e={},r,s){this.geometry=t,this.attributes=e,this.centroid=r,this.objectId=s,this.displayId=0}static fromJSON(t,e){const i=t.geometry?r.fromJSON(t.geometry):null,o=t.centroid?r.fromJSON(t.centroid):null,n=t.attributes[e];return new s(i,t.attributes,o,n)}weakClone(){const t=new s(this.geometry,this.attributes,this.centroid,this.objectId);return t.displayId=this.displayId,t}clone(){const t=this.geometry?.clone(),e=new s(t,{...this.attributes},this.centroid?.clone(),this.objectId);return e.displayId=this.displayId,e}ensureCentroid(t){return this.centroid??=e(new r,this.geometry,t.hasZ,t.hasM),this.centroid}get usedMemory(){return 128+t(this.attributes)+(this.geometry?.usedMemory??0)}}function i(t){return!!t.geometry?.coords?.length}class o extends s{}export{s as OptimizedFeature,o as OptimizedFeatureWithGeometry,i as hasGeometry};
5
+ import{estimateAttributesMemory as t}from"../../core/memoryEstimations.js";import{getCentroidOptimizedGeometry as e}from"./centroid.js";import r from"./OptimizedGeometry.js";class s{constructor(t=null,e={},r,s,o=0){this.geometry=t,this.attributes=e,this.centroid=r,this.objectId=s,this.displayId=o}static fromJSON(t){const e=t.geometry?r.fromJSON(t.geometry):null,o=t.centroid?r.fromJSON(t.centroid):null,i=t.objectId;return new s(e,t.attributes,o,i)}weakClone(){const t=new s(this.geometry,this.attributes,this.centroid,this.objectId);return t.displayId=this.displayId,t}clone(){const t=this.geometry?.clone(),e=new s(t,{...this.attributes},this.centroid?.clone(),this.objectId);return e.displayId=this.displayId,e}ensureCentroid(t){return this.centroid??=e(new r,this.geometry,t.hasZ,t.hasM),this.centroid}get usedMemory(){return 128+t(this.attributes)+(this.geometry?.usedMemory??0)}}function o(t){return!!t.geometry?.coords?.length}class i extends s{}export{s as OptimizedFeature,i as OptimizedFeatureWithGeometry,o as hasGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{isISO8601Date as e}from"../../../../core/date.js";import t from"../../../../core/Error.js";import{isWGS84 as n}from"../../../../geometry/support/spatialReferenceUtils.js";import{OptimizedFeature as o}from"../../OptimizedFeature.js";import r from"../../OptimizedGeometry.js";import{normalizeFieldName as i,isNumericField as s}from"../../../support/fieldUtils.js";const c={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function u(e){return c[e]}function*l(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*f(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function*p(e,t={}){const{geometryType:n,objectIdField:i}=t;for(const s of e){const{geometry:e,properties:c,id:l}=s;if(e&&u(e.type)!==n)continue;const f=c||{};let p;i&&(p=f[i],null==l||p||(f[i]=p=l));const a=new o(e?h(new r,e,t):null,f,null,p??void 0);yield a}}function a(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){return!g(e)}function d(e){return g(e)}function g(e){let t=0;for(let n=0;n<e.length;n++){const o=e[n],r=e[(n+1)%e.length];t+=o[0]*r[1]-r[0]*o[1]}return t<=0}function m(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function h(e,t,n){switch(t.type){case"LineString":return w(e,t,n);case"MultiLineString":return P(e,t,n);case"MultiPoint":return j(e,t,n);case"MultiPolygon":return b(e,t,n);case"Point":return S(e,t,n);case"Polygon":return F(e,t,n)}}function w(e,t,n){return M(e,t.coordinates,n),e}function P(e,t,n){for(const o of t.coordinates)M(e,o,n);return e}function j(e,t,n){return M(e,t.coordinates,n),e}function b(e,t,n){for(const o of t.coordinates){G(e,o[0],n);for(let t=1;t<o.length;t++)k(e,o[t],n)}return e}function S(e,t,n){return O(e,t.coordinates,n),e}function F(e,t,n){const o=t.coordinates;G(e,o[0],n);for(let r=1;r<o.length;r++)k(e,o[r],n);return e}function G(e,t,n){const o=m(t);y(o)?T(e,o,n):M(e,o,n)}function k(e,t,n){const o=m(t);d(o)?T(e,o,n):M(e,o,n)}function M(e,t,n){for(const o of t)O(e,o,n);e.lengths.push(t.length)}function T(e,t,n){for(let o=t.length-1;o>=0;o--)O(e,t[o],n);e.lengths.push(t.length)}function O(e,t,n){const[o,r,i]=t;e.coords.push(o,r),n.hasZ&&e.coords.push(i||0)}function L(t){switch(typeof t){case"string":return e(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function E(e,o=4326){if(!e)throw new t("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new t("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:r}=e;if(!r)return;const i="string"==typeof r?r:"name"===r.type?r.properties.name:"EPSG"===r.type?r.properties.code:null,s=n({wkid:o})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${o})$`,"i");if(!i||!s.test(i))throw new t("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:r})}function I(e,t={}){const n=[],o=new Set,r=new Set;let c,p=!1,y=null,d=!1,{geometryType:g=null}=t;for(const s of l(e)){const{geometry:e,properties:t,id:l}=s;if(!e||(g||(g=u(e.type)),u(e.type)===g)){if(!p){p=a(f(e))}if(d||(d=null!=l,d&&(c=typeof l,t&&(y=Object.keys(t).filter((e=>t[e]===l))))),t&&y&&d&&null!=l&&(y.length>1?y=y.filter((e=>t[e]===l)):1===y.length&&(y=t[y[0]]===l?y:[])),t)for(const e in t){if(o.has(e))continue;const s=L(t[e]);if("unknown"===s){r.add(e);continue}r.delete(e),o.add(e);const c=i(e);c&&n.push({name:c,alias:e,type:s})}}}const m=i(1===y?.length&&y[0]||null)??void 0;if(m)for(const i of n)if(i.name===m&&s(i)){i.type="esriFieldTypeOID";break}return{fields:n,geometryType:g,hasZ:p,objectIdFieldName:m,objectIdFieldType:c,unknownFields:Array.from(r)}}function N(e,t){return Array.from(p(l(e),t))}export{N as createOptimizedFeatures,u as getGeometryType,I as inferLayerProperties,E as validateGeoJSON};
5
+ import{isISO8601Date as e}from"../../../../core/date.js";import t from"../../../../core/Error.js";import{isWGS84 as n}from"../../../../geometry/support/spatialReferenceUtils.js";import{OptimizedFeature as o}from"../../OptimizedFeature.js";import r from"../../OptimizedGeometry.js";import{normalizeFieldName as i,isNumericField as s}from"../../../support/fieldUtils.js";const c={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function u(e){return c[e]}function*l(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*f(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function*p(e,t={}){const{geometryType:n,objectIdField:i}=t;for(const s of e){const{geometry:e,properties:c,id:l}=s;if(e&&u(e.type)!==n)continue;const f=c||{};let p;i&&(p=f[i],null==l||p||(f[i]=p=l));const a=new o(e?h(new r,e,t):null,f,null,p);yield a}}function a(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){return!g(e)}function d(e){return g(e)}function g(e){let t=0;for(let n=0;n<e.length;n++){const o=e[n],r=e[(n+1)%e.length];t+=o[0]*r[1]-r[0]*o[1]}return t<=0}function m(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function h(e,t,n){switch(t.type){case"LineString":return w(e,t,n);case"MultiLineString":return P(e,t,n);case"MultiPoint":return j(e,t,n);case"MultiPolygon":return b(e,t,n);case"Point":return S(e,t,n);case"Polygon":return F(e,t,n)}}function w(e,t,n){return M(e,t.coordinates,n),e}function P(e,t,n){for(const o of t.coordinates)M(e,o,n);return e}function j(e,t,n){return M(e,t.coordinates,n),e}function b(e,t,n){for(const o of t.coordinates){G(e,o[0],n);for(let t=1;t<o.length;t++)k(e,o[t],n)}return e}function S(e,t,n){return O(e,t.coordinates,n),e}function F(e,t,n){const o=t.coordinates;G(e,o[0],n);for(let r=1;r<o.length;r++)k(e,o[r],n);return e}function G(e,t,n){const o=m(t);y(o)?T(e,o,n):M(e,o,n)}function k(e,t,n){const o=m(t);d(o)?T(e,o,n):M(e,o,n)}function M(e,t,n){for(const o of t)O(e,o,n);e.lengths.push(t.length)}function T(e,t,n){for(let o=t.length-1;o>=0;o--)O(e,t[o],n);e.lengths.push(t.length)}function O(e,t,n){const[o,r,i]=t;e.coords.push(o,r),n.hasZ&&e.coords.push(i||0)}function L(t){switch(typeof t){case"string":return e(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function E(e,o=4326){if(!e)throw new t("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new t("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:r}=e;if(!r)return;const i="string"==typeof r?r:"name"===r.type?r.properties.name:"EPSG"===r.type?r.properties.code:null,s=n({wkid:o})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${o})$`,"i");if(!i||!s.test(i))throw new t("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:r})}function I(e,t={}){const n=[],o=new Set,r=new Set;let c,p=!1,y=null,d=!1,{geometryType:g=null}=t;for(const s of l(e)){const{geometry:e,properties:t,id:l}=s;if(!e||(g||(g=u(e.type)),u(e.type)===g)){if(!p){p=a(f(e))}if(d||(d=null!=l,d&&(c=typeof l,t&&(y=Object.keys(t).filter((e=>t[e]===l))))),t&&y&&d&&null!=l&&(y.length>1?y=y.filter((e=>t[e]===l)):1===y.length&&(y=t[y[0]]===l?y:[])),t)for(const e in t){if(o.has(e))continue;const s=L(t[e]);if("unknown"===s){r.add(e);continue}r.delete(e),o.add(e);const c=i(e);c&&n.push({name:c,alias:e,type:s})}}}const m=i(1===y?.length&&y[0]||null)??void 0;if(m)for(const i of n)if(i.name===m&&s(i)){i.type="esriFieldTypeOID";break}return{fields:n,geometryType:g,hasZ:p,objectIdFieldName:m,objectIdFieldType:c,unknownFields:Array.from(r)}}function N(e,t){return Array.from(p(l(e),t))}export{N as createOptimizedFeatures,u as getGeometryType,I as inferLayerProperties,E as validateGeoJSON};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import r from"../../PopupTemplate.js";import"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import"../../renderers/Renderer.js";import"../../renderers/SimpleRenderer.js";import"../../renderers/UniqueValueRenderer.js";import"../../renderers/support/jsonUtils.js";import{rendererTypes as t,webSceneRendererTypes as i}from"../../renderers/support/types.js";import o from"../../request.js";import{isSymbol3D as s}from"../../symbols.js";import a from"../../core/Collection.js";import l from"../../core/Error.js";import has from"../../core/has.js";import n from"../../core/Identifiable.js";import{clone as p}from"../../core/lang.js";import y from"../../core/Loadable.js";import u from"../../core/Logger.js";import{MultiOriginJSONMixin as d}from"../../core/MultiOriginJSONSupport.js";import{sqlAnd as c}from"../../core/sql.js";import{objectToQuery as f}from"../../core/urlUtils.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import{cast as m}from"../../core/accessorSupport/decorators/cast.js";import{reader as b}from"../../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../../core/accessorSupport/decorators/subclass.js";import{writer as S}from"../../core/accessorSupport/decorators/writer.js";import{ensureInteger as I,ensureType as w,Integer as v,ensureClass as j}from"../../core/accessorSupport/ensureType.js";import{OriginId as L,nameToId as F}from"../../core/accessorSupport/PropertyOrigin.js";import{getProperties as D}from"../../core/accessorSupport/utils.js";import x from"../graphics/sources/support/QueryTask.js";import{readOrderByInfos as O}from"../mixins/OrderedLayer.js";import{getFeatureType as E}from"./featureLayerUtils.js";import P from"./FeatureType.js";import q from"./Field.js";import T from"./FieldsIndex.js";import{fixRendererFields as R}from"./fieldUtils.js";import _ from"./LabelClass.js";import{validateLabelingInfo as A}from"./labelingInfo.js";import C from"./LayerFloorInfo.js";import M from"./OrderByInfo.js";import V from"./Relationship.js";import{getFeatureLayerCapabilities as k}from"./serviceCapabilitiesUtils.js";import{DataLayerSource as N}from"./source/DataLayerSource.js";import{MapLayerSource as U}from"./source/MapLayerSource.js";import{parseUrl as B}from"../../rest/utils.js";import Q from"../../rest/support/AttachmentQuery.js";import J from"../../rest/support/Query.js";import{createPopupTemplate as $}from"../../support/popupUtils.js";import K from"../../geometry/Extent.js";import G from"../../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as H}from"../../geometry/support/typeUtils.js";var z;function W(e){return"esriSMS"===e?.type}function X(e,r,t){const i=this.originIdOf(r)>=F(t.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!t&&("map-image"===t.layer?.type&&(t.writeSublayerStructure||i))}}function Y(e,r,t){return{enabled:!!t&&("tile"===t.layer?.type&&(t.origin&&this.originIdOf(r)>=F(t.origin)||this._isOverridden(r)))}}function Z(e,r,t){return{ignoreOrigin:!0,enabled:t&&t.writeSublayerStructure||!1}}function ee(e,r,t){return{ignoreOrigin:!0,enabled:!!t&&(t.writeSublayerStructure||this.originIdOf(r)>=F(t.origin))}}let re=0;const te=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ie=z=class extends(d(n.IdentifiableMixin(y))){constructor(e){super(e),this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:r,url:t}=this;if(!r&&!t)throw new l("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=r?await r.fetchSublayerInfo(this,e):(await o(t,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service",layer:r,url:B(t)}))})()),this}readCapabilities(e,r){r=r.layerDefinition||r;const{operations:{supportsQuery:t,supportsQueryAttachments:i},query:{supportsFormatPBF:o,supportsOrderBy:s,supportsPagination:a},data:{supportsAttachment:l},queryRelated:n}=k(r,this.url);return{exportMap:{supportsModification:!!r.canModifyLayer},operations:{supportsQuery:t,supportsQueryAttachments:i},data:{supportsAttachment:l},query:{supportsFormatPBF:o,supportsOrderBy:s,supportsPagination:a},queryRelated:n}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:r}=this;return{minScale:e,maxScale:r}}readMaxScaleRange(e,r){return{minScale:(r=r.layerDefinition||r).minScale??0,maxScale:r.maxScale??0}}get fieldsIndex(){return new T(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,r){if((r=r.layerDefinition||r).globalIdField)return r.globalIdField;if(r.fields)for(const t of r.fields)if("esriFieldTypeGlobalID"===t.type)return t.name}get id(){const e=this._get("id");return e??re++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,r){return"Table"===r.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,r,t,i){e&&e.length&&(r.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach((r=>r.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,r){return r.minScale||r.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,r){return r.maxScale||r.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,r){if((r=r.layerDefinition||r).objectIdField)return r.objectIdField;const t=r.fields?.find((e=>"esriFieldTypeOID"===e.type));return t?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,r){const{layerDefinition:t}=r;return 1-.01*(t?.transparency??t?.drawingInfo?.transparency??0)}writeOpacity(e,r,t,i){r.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,r){this.parent&&this.parent!==this.layer?r.parentLayerId=I(this.parent.id):r.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:r,layer:t,url:i}=this,{spatialReference:o}=t,s="gdbVersion"in t?t.gdbVersion:void 0,a=has("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new x({fieldsIndex:r,gdbVersion:s,pbfSupported:a,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:o,url:i})}set renderer(e){if(R(e,this.fieldsIndex),e)for(const r of e.symbols)if(s(r)){u.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new U({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return w(a.ofType(z),e)}writeSublayers(e,r,t){this.sublayers?.length&&(r[t]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTitle(e,r){return r.layerDefinition?.name??r.name}readTypeIdField(e,r){let t=(r=r.layerDefinition||r).typeIdField;if(t&&r.fields){t=t.toLowerCase();const e=r.fields.find((e=>e.name.toLowerCase()===t));e&&(t=e.name)}return t}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,r=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===r?.type)return`${e.path}/${r.mapLayerId}`;const t={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${f(t)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,r,t,i){r[t]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=D(this),r=new z;return D(r).store=e.clone(te),this.commitProperty("url"),r._lastParsedUrl=this._lastParsedUrl,r}createPopupTemplate(e){return $(this,e)}createQuery(){return new J({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await import("../FeatureLayer.js")).default,{layer:r,url:t}=this;let i;if(t&&this.originIdOf("url")>L.SERVICE)i=new e({url:t});else{if(!r?.parsedUrl)throw new l("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const t=r.parsedUrl;i=new e({url:t.path}),t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source)}}return null!=r?.refreshInterval&&(i.refreshInterval=r.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=p(this.floorInfo)),this.originIdOf("labelingInfo")>L.SERVICE&&(i.labelingInfo=p(this.labelingInfo)),this.originIdOf("labelsVisible")>L.DEFAULTS&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>L.DEFAULTS&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>L.DEFAULTS&&(i.visible=this.visible),this.originIdOf("minScale")>L.DEFAULTS&&(i.minScale=this.minScale),this.originIdOf("maxScale")>L.DEFAULTS&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>L.DEFAULTS&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>L.DEFAULTS&&(i.popupTemplate=p(this.popupTemplate)),this.originIdOf("renderer")>L.SERVICE&&(i.renderer=p(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>L.DEFAULTS&&(i.title=this.title),"map-image"===r?.type&&r.originIdOf("customParameters")>L.DEFAULTS&&(i.customParameters=r.customParameters),"tile"===r?.type&&r.originIdOf("customParameters")>L.DEFAULTS&&(i.customParameters=r.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return E(this.types,this.typeIdField,e)}getFieldDomain(e,r){const t=r?.feature,i=this.getFeatureType(t);if(i){const r=i.domains&&i.domains[e];if(r&&"inherited"!==r.type)return r}return this._getLayerDomain(e)}async queryAttachments(e,r){await this.load(),e=Q.from(e);const t=this.capabilities;if(!t?.data?.supportsAttachment)throw new l("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:o,globalIds:s,num:a,size:n,start:p,where:y}=e;if(!t?.operations?.supportsQueryAttachments){if(i?.length>0||s?.length>0||n?.length>0||a||p||y)throw new l("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e)}if(!(o?.length||s?.length||y))throw new l("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatureCount(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new l("queryFeatureCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryFeatures(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new l("queryFeatures:not-supported","this layer has no url.");const t=await this.queryTask.execute(e,{...r,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(t?.features)for(const i of t.features)i.sourceLayer=this;return t}async queryObjectIds(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new l("queryObjectIds:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeatures(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new l("queryRelatedFeatures:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeaturesCount(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new l("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new l("queryRelatedFeaturesCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}toExportImageJSON(e){const r={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},t=c(e,this.definitionExpression);null!=t&&(r.definitionExpression=t);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,r)=>(e[r]=this.originIdOf(r),e)),{}),o=Object.keys(i).some((e=>i[e]>L.SERVICE));if(o){const e=r.drawingInfo={};if(i.renderer>L.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>L.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>L.SERVICE)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some((e=>!e.labelPlacement))&&u.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let r=this.labelingInfo;null!=this.geometryType&&(r=A(this.labelingInfo,H.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=r.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer})))}else e.showLabels=!1;i.opacity>L.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>L.SERVICE&&(r.orderBy=this.orderBy?.map((e=>e.toJSON()))??null),r}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,r){if(e){const t=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of t)W(e.symbol)&&r(e.symbol);"symbol"in e&&W(e.symbol)&&r(e.symbol),"defaultSymbol"in e&&W(e.defaultSymbol)&&r(e.defaultSymbol)}}_setAndNotifyLayer(e,r){const t=this.layer,i=this._get(e);let o,s;switch(e){case"definitionExpression":case"floorInfo":o="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":o="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":o="supportsDynamicLayers",s="supportsModification";break;case"orderBy":o="supportsSublayerOrderBy",s="supportsModification"}const a=D(this).getDefaultOrigin();if("service"!==a){if(o&&!1===this.layer?.capabilities?.exportMap?.[o])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${o}'`);if(s&&!1===this.capabilities?.exportMap[s])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${s}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,r),"service"!==a&&i!==r&&t&&t.emit&&t.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,r){r&&(r.forEach((e=>{e.parent=null,e.layer=null})),this.removeAllHandles()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(u.getLogger(this).error(new l("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,r){const{layer:t,declaredClass:i}=this;u.getLogger(i).error(new l("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${t?.id}'`,{reason:r,sublayer:this,layer:t}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}};ie.test={isMapImageLayerOverridePolicy:e=>e===Z||e===X,isTileImageLayerOverridePolicy:e=>e===Y},e([h({readOnly:!0})],ie.prototype,"capabilities",void 0),e([b("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ie.prototype,"readCapabilities",null),e([h()],ie.prototype,"defaultPopupTemplate",null),e([h({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:X}}})],ie.prototype,"definitionExpression",null),e([h({readOnly:!0})],ie.prototype,"effectiveScaleRange",null),e([b("service","maxScaleRange",["minScale","maxScale"])],ie.prototype,"readMaxScaleRange",null),e([h({type:[q],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ie.prototype,"fields",void 0),e([h({readOnly:!0})],ie.prototype,"fieldsIndex",null),e([h({type:C,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:X},origins:{"web-scene":{read:!1,write:!1}}}})],ie.prototype,"floorInfo",null),e([h({type:K,json:{read:{source:"layerDefinition.extent"}}})],ie.prototype,"fullExtent",void 0),e([h({type:H.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:H.read}}}}})],ie.prototype,"geometryType",void 0),e([h({type:String})],ie.prototype,"globalIdField",void 0),e([b("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ie.prototype,"readGlobalIdFieldFromService",null),e([h({type:v,json:{write:{ignoreOrigin:!0}}})],ie.prototype,"id",null),e([h({readOnly:!0})],ie.prototype,"isTable",void 0),e([b("service","isTable",["type"])],ie.prototype,"readIsTable",null),e([h({value:null,type:[_],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:Z}}})],ie.prototype,"labelingInfo",null),e([S("labelingInfo")],ie.prototype,"writeLabelingInfo",null),e([h({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:Z}}})],ie.prototype,"labelsVisible",null),e([h({value:null})],ie.prototype,"layer",null),e([h({type:String,json:{write:{overridePolicy:Y}}})],ie.prototype,"layerItemId",void 0),e([h({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:ee}}})],ie.prototype,"legendEnabled",void 0),e([h({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ie.prototype,"listMode",null),e([h({type:Number,value:0,json:{write:{overridePolicy:Z}}})],ie.prototype,"minScale",null),e([b("minScale",["minScale","layerDefinition.minScale"])],ie.prototype,"readMinScale",null),e([h({type:Number,value:0,json:{write:{overridePolicy:Z}}})],ie.prototype,"maxScale",null),e([b("maxScale",["maxScale","layerDefinition.maxScale"])],ie.prototype,"readMaxScale",null),e([h()],ie.prototype,"objectIdField",void 0),e([b("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ie.prototype,"readObjectIdFieldFromService",null),e([h({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:Z}}})],ie.prototype,"opacity",null),e([b("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ie.prototype,"readOpacity",null),e([S("opacity")],ie.prototype,"writeOpacity",null),e([h({value:null,type:[M],json:{name:"layerDefinition.orderBy",read:{reader:O}}})],ie.prototype,"orderBy",null),e([h({json:{type:v,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:Z}}})],ie.prototype,"parent",void 0),e([S("parent")],ie.prototype,"writeParent",null),e([h({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy:ee,writer(e,r,t){r[t]=!e}}}})],ie.prototype,"popupEnabled",void 0),e([h({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:ee}}})],ie.prototype,"popupTemplate",void 0),e([h({readOnly:!0})],ie.prototype,"queryTask",null),e([h({type:[V],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ie.prototype,"relationships",void 0),e([h({types:t,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:Z},origins:{"web-scene":{types:i,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:Z}}}}})],ie.prototype,"renderer",null),e([h({types:{key:"type",base:null,typeMap:{"data-layer":N,"map-layer":U}},cast(e){if(e){if("mapLayerId"in e)return j(U,e);if("dataSource"in e)return j(N,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:Z}}})],ie.prototype,"source",null),e([h()],ie.prototype,"sourceJSON",void 0),e([h({type:G,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ie.prototype,"spatialReference",void 0),e([h({value:null,json:{type:[v],write:{target:"subLayerIds",allowNull:!0,overridePolicy:Z}}})],ie.prototype,"sublayers",null),e([m("sublayers")],ie.prototype,"castSublayers",null),e([S("sublayers")],ie.prototype,"writeSublayers",null),e([h({type:String,json:{name:"name",write:{overridePolicy:ee}}})],ie.prototype,"title",void 0),e([b("service","title",["name","layerDefinition.name"])],ie.prototype,"readTitle",null),e([h({type:String})],ie.prototype,"typeIdField",void 0),e([h({json:{read:!1},readOnly:!0,value:"sublayer"})],ie.prototype,"type",void 0),e([b("typeIdField",["layerDefinition.typeIdField"])],ie.prototype,"readTypeIdField",null),e([h({type:[P],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ie.prototype,"types",void 0),e([h({type:String,json:{name:"layerUrl",write:{overridePolicy:Y}}})],ie.prototype,"url",null),e([h({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:Z}}})],ie.prototype,"visible",null),e([S("visible")],ie.prototype,"writeVisible",null),ie=z=e([g("esri.layers.support.Sublayer")],ie);const oe=ie;export{oe as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import r from"../../PopupTemplate.js";import"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import"../../renderers/Renderer.js";import"../../renderers/SimpleRenderer.js";import"../../renderers/UniqueValueRenderer.js";import"../../renderers/support/jsonUtils.js";import{rendererTypes as t,webSceneRendererTypes as i}from"../../renderers/support/types.js";import o from"../../request.js";import{isSymbol3D as s}from"../../symbols.js";import a from"../../core/Collection.js";import l from"../../core/Error.js";import has from"../../core/has.js";import n from"../../core/Identifiable.js";import{clone as p}from"../../core/lang.js";import u from"../../core/Loadable.js";import y from"../../core/Logger.js";import{MultiOriginJSONMixin as d}from"../../core/MultiOriginJSONSupport.js";import{sqlAnd as c}from"../../core/sql.js";import{objectToQuery as f}from"../../core/urlUtils.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import{cast as m}from"../../core/accessorSupport/decorators/cast.js";import{reader as b}from"../../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../../core/accessorSupport/decorators/subclass.js";import{writer as S}from"../../core/accessorSupport/decorators/writer.js";import{ensureInteger as I,ensureType as w,Integer as v,ensureClass as j}from"../../core/accessorSupport/ensureType.js";import{OriginId as L,nameToId as F}from"../../core/accessorSupport/PropertyOrigin.js";import{getProperties as D}from"../../core/accessorSupport/utils.js";import x from"../graphics/sources/support/QueryTask.js";import{readOrderByInfos as O}from"../mixins/OrderedLayer.js";import{getFeatureType as E}from"./featureLayerUtils.js";import P from"./FeatureType.js";import q from"./Field.js";import T from"./FieldsIndex.js";import{fixRendererFields as R}from"./fieldUtils.js";import _ from"./LabelClass.js";import{validateLabelingInfo as A}from"./labelingInfo.js";import C from"./LayerFloorInfo.js";import V from"./OrderByInfo.js";import M from"./Relationship.js";import{getFeatureLayerCapabilities as k}from"./serviceCapabilitiesUtils.js";import{DataLayerSource as N}from"./source/DataLayerSource.js";import{MapLayerSource as U}from"./source/MapLayerSource.js";import{parseUrl as B}from"../../rest/utils.js";import Q from"../../rest/support/AttachmentQuery.js";import J from"../../rest/support/Query.js";import{createPopupTemplate as $}from"../../support/popupUtils.js";import K from"../../geometry/Extent.js";import G from"../../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as H}from"../../geometry/support/typeUtils.js";var z;function W(e){return"esriSMS"===e?.type}function X(e,r,t){const i=this.originIdOf(r)>=F(t.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!t&&("map-image"===t.layer?.type&&(t.writeSublayerStructure||i))}}function Y(e,r,t){return{enabled:!!t&&("tile"===t.layer?.type&&(t.origin&&this.originIdOf(r)>=F(t.origin)||this._isOverridden(r)))}}function Z(e,r,t){return{ignoreOrigin:!0,enabled:t&&t.writeSublayerStructure||!1}}function ee(e,r,t){return{ignoreOrigin:!0,enabled:!!t?.writeSublayerStructure&&this.originIdOf(r)>L.SERVICE}}function re(e,r,t){return{ignoreOrigin:!0,enabled:!!t&&(t.writeSublayerStructure||this.originIdOf(r)>=F(t.origin))}}let te=0;const ie=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let oe=z=class extends(d(n.IdentifiableMixin(u))){constructor(e){super(e),this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:r,url:t}=this;if(!r&&!t)throw new l("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=r?await r.fetchSublayerInfo(this,e):(await o(t,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service",layer:r,url:B(t)}))})()),this}readCapabilities(e,r){r=r.layerDefinition||r;const{operations:{supportsQuery:t,supportsQueryAttachments:i},query:{supportsFormatPBF:o,supportsOrderBy:s,supportsPagination:a},data:{supportsAttachment:l},queryRelated:n}=k(r,this.url);return{exportMap:{supportsModification:!!r.canModifyLayer},operations:{supportsQuery:t,supportsQueryAttachments:i},data:{supportsAttachment:l},query:{supportsFormatPBF:o,supportsOrderBy:s,supportsPagination:a},queryRelated:n}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:r}=this;return{minScale:e,maxScale:r}}readMaxScaleRange(e,r){return{minScale:(r=r.layerDefinition||r).minScale??0,maxScale:r.maxScale??0}}get fieldsIndex(){return new T(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,r){if((r=r.layerDefinition||r).globalIdField)return r.globalIdField;if(r.fields)for(const t of r.fields)if("esriFieldTypeGlobalID"===t.type)return t.name}get id(){const e=this._get("id");return e??te++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,r){return"Table"===r.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,r,t,i){e&&e.length&&(r.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach((r=>r.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,r){return r.minScale||r.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,r){return r.maxScale||r.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,r){if((r=r.layerDefinition||r).objectIdField)return r.objectIdField;const t=r.fields?.find((e=>"esriFieldTypeOID"===e.type));return t?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,r){const{layerDefinition:t}=r;return 1-.01*(t?.transparency??t?.drawingInfo?.transparency??0)}writeOpacity(e,r,t,i){r.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,r){this.parent&&this.parent!==this.layer?r.parentLayerId=I(this.parent.id):r.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:r,layer:t,url:i}=this,{spatialReference:o}=t,s="gdbVersion"in t?t.gdbVersion:void 0,a=has("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new x({fieldsIndex:r,gdbVersion:s,pbfSupported:a,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:o,url:i})}set renderer(e){if(R(e,this.fieldsIndex),e)for(const r of e.symbols)if(s(r)){y.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new U({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return w(a.ofType(z),e)}writeSublayers(e,r,t){this.sublayers?.length&&(r[t]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTitle(e,r){return r.layerDefinition?.name??r.name}readTypeIdField(e,r){let t=(r=r.layerDefinition||r).typeIdField;if(t&&r.fields){t=t.toLowerCase();const e=r.fields.find((e=>e.name.toLowerCase()===t));e&&(t=e.name)}return t}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,r=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===r?.type)return`${e.path}/${r.mapLayerId}`;const t={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${f(t)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,r,t,i){r[t]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=D(this),r=new z;return D(r).store=e.clone(ie),this.commitProperty("url"),r._lastParsedUrl=this._lastParsedUrl,r}createPopupTemplate(e){return $(this,e)}createQuery(){return new J({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await import("../FeatureLayer.js")).default,{layer:r,url:t}=this;let i;if(t&&this.originIdOf("url")>L.SERVICE)i=new e({url:t});else{if(!r?.parsedUrl)throw new l("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const t=r.parsedUrl;i=new e({url:t.path}),t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source)}}return null!=r?.refreshInterval&&(i.refreshInterval=r.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=p(this.floorInfo)),this.originIdOf("labelingInfo")>L.SERVICE&&(i.labelingInfo=p(this.labelingInfo)),this.originIdOf("labelsVisible")>L.DEFAULTS&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>L.DEFAULTS&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>L.DEFAULTS&&(i.visible=this.visible),this.originIdOf("minScale")>L.DEFAULTS&&(i.minScale=this.minScale),this.originIdOf("maxScale")>L.DEFAULTS&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>L.DEFAULTS&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>L.DEFAULTS&&(i.popupTemplate=p(this.popupTemplate)),this.originIdOf("renderer")>L.SERVICE&&(i.renderer=p(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>L.DEFAULTS&&(i.title=this.title),"map-image"===r?.type&&r.originIdOf("customParameters")>L.DEFAULTS&&(i.customParameters=r.customParameters),"tile"===r?.type&&r.originIdOf("customParameters")>L.DEFAULTS&&(i.customParameters=r.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return E(this.types,this.typeIdField,e)}getFieldDomain(e,r){const t=r?.feature,i=this.getFeatureType(t);if(i){const r=i.domains&&i.domains[e];if(r&&"inherited"!==r.type)return r}return this._getLayerDomain(e)}async queryAttachments(e,r){await this.load(),e=Q.from(e);const t=this.capabilities;if(!t?.data?.supportsAttachment)throw new l("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:o,globalIds:s,num:a,size:n,start:p,where:u}=e;if(!t?.operations?.supportsQueryAttachments){if(i?.length>0||s?.length>0||n?.length>0||a||p||u)throw new l("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e)}if(!(o?.length||s?.length||u))throw new l("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatureCount(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new l("queryFeatureCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryFeatures(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new l("queryFeatures:not-supported","this layer has no url.");const t=await this.queryTask.execute(e,{...r,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(t?.features)for(const i of t.features)i.sourceLayer=this;return t}async queryObjectIds(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new l("queryObjectIds:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeatures(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new l("queryRelatedFeatures:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeaturesCount(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new l("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new l("queryRelatedFeaturesCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}toExportImageJSON(e){const r={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},t=c(e,this.definitionExpression);null!=t&&(r.definitionExpression=t);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,r)=>(e[r]=this.originIdOf(r),e)),{}),o=Object.keys(i).some((e=>i[e]>L.SERVICE));if(o){const e=r.drawingInfo={};if(i.renderer>L.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>L.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>L.SERVICE)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some((e=>!e.labelPlacement))&&y.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let r=this.labelingInfo;null!=this.geometryType&&(r=A(this.labelingInfo,H.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=r.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer})))}else e.showLabels=!1;i.opacity>L.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>L.SERVICE&&(r.orderBy=this.orderBy?.map((e=>e.toJSON()))??null),r}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,r){if(e){const t=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of t)W(e.symbol)&&r(e.symbol);"symbol"in e&&W(e.symbol)&&r(e.symbol),"defaultSymbol"in e&&W(e.defaultSymbol)&&r(e.defaultSymbol)}}_setAndNotifyLayer(e,r){const t=this.layer,i=this._get(e);let o,s;switch(e){case"definitionExpression":case"floorInfo":o="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":o="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":o="supportsDynamicLayers",s="supportsModification";break;case"orderBy":o="supportsSublayerOrderBy",s="supportsModification"}const a=D(this).getDefaultOrigin();if("service"!==a){if(o&&!1===this.layer?.capabilities?.exportMap?.[o])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${o}'`);if(s&&!1===this.capabilities?.exportMap[s])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${s}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,r),"service"!==a&&i!==r&&t&&t.emit&&t.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,r){r&&(r.forEach((e=>{e.parent=null,e.layer=null})),this.removeAllHandles()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(y.getLogger(this).error(new l("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,r){const{layer:t,declaredClass:i}=this;y.getLogger(i).error(new l("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${t?.id}'`,{reason:r,sublayer:this,layer:t}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}};oe.test={isMapImageLayerOverridePolicy:e=>e===ee||e===Z||e===X,isTileImageLayerOverridePolicy:e=>e===Y},e([h({readOnly:!0})],oe.prototype,"capabilities",void 0),e([b("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],oe.prototype,"readCapabilities",null),e([h()],oe.prototype,"defaultPopupTemplate",null),e([h({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:X}}})],oe.prototype,"definitionExpression",null),e([h({readOnly:!0})],oe.prototype,"effectiveScaleRange",null),e([b("service","maxScaleRange",["minScale","maxScale"])],oe.prototype,"readMaxScaleRange",null),e([h({type:[q],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],oe.prototype,"fields",void 0),e([h({readOnly:!0})],oe.prototype,"fieldsIndex",null),e([h({type:C,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:X},origins:{"web-scene":{read:!1,write:!1}}}})],oe.prototype,"floorInfo",null),e([h({type:K,json:{read:{source:"layerDefinition.extent"}}})],oe.prototype,"fullExtent",void 0),e([h({type:H.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:H.read}}}}})],oe.prototype,"geometryType",void 0),e([h({type:String})],oe.prototype,"globalIdField",void 0),e([b("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],oe.prototype,"readGlobalIdFieldFromService",null),e([h({type:v,json:{write:{ignoreOrigin:!0}}})],oe.prototype,"id",null),e([h({readOnly:!0})],oe.prototype,"isTable",void 0),e([b("service","isTable",["type"])],oe.prototype,"readIsTable",null),e([h({value:null,type:[_],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:ee}}})],oe.prototype,"labelingInfo",null),e([S("labelingInfo")],oe.prototype,"writeLabelingInfo",null),e([h({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:Z}}})],oe.prototype,"labelsVisible",null),e([h({value:null})],oe.prototype,"layer",null),e([h({type:String,json:{write:{overridePolicy:Y}}})],oe.prototype,"layerItemId",void 0),e([h({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:re}}})],oe.prototype,"legendEnabled",void 0),e([h({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],oe.prototype,"listMode",null),e([h({type:Number,value:0,json:{write:{overridePolicy:Z}}})],oe.prototype,"minScale",null),e([b("minScale",["minScale","layerDefinition.minScale"])],oe.prototype,"readMinScale",null),e([h({type:Number,value:0,json:{write:{overridePolicy:Z}}})],oe.prototype,"maxScale",null),e([b("maxScale",["maxScale","layerDefinition.maxScale"])],oe.prototype,"readMaxScale",null),e([h()],oe.prototype,"objectIdField",void 0),e([b("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],oe.prototype,"readObjectIdFieldFromService",null),e([h({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:Z}}})],oe.prototype,"opacity",null),e([b("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],oe.prototype,"readOpacity",null),e([S("opacity")],oe.prototype,"writeOpacity",null),e([h({value:null,type:[V],json:{name:"layerDefinition.orderBy",read:{reader:O}}})],oe.prototype,"orderBy",null),e([h({json:{type:v,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:Z}}})],oe.prototype,"parent",void 0),e([S("parent")],oe.prototype,"writeParent",null),e([h({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy:re,writer(e,r,t){r[t]=!e}}}})],oe.prototype,"popupEnabled",void 0),e([h({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:re}}})],oe.prototype,"popupTemplate",void 0),e([h({readOnly:!0})],oe.prototype,"queryTask",null),e([h({type:[M],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],oe.prototype,"relationships",void 0),e([h({types:t,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ee},origins:{"web-scene":{types:i,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ee}}}}})],oe.prototype,"renderer",null),e([h({types:{key:"type",base:null,typeMap:{"data-layer":N,"map-layer":U}},cast(e){if(e){if("mapLayerId"in e)return j(U,e);if("dataSource"in e)return j(N,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:Z}}})],oe.prototype,"source",null),e([h()],oe.prototype,"sourceJSON",void 0),e([h({type:G,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],oe.prototype,"spatialReference",void 0),e([h({value:null,json:{type:[v],write:{target:"subLayerIds",allowNull:!0,overridePolicy:Z}}})],oe.prototype,"sublayers",null),e([m("sublayers")],oe.prototype,"castSublayers",null),e([S("sublayers")],oe.prototype,"writeSublayers",null),e([h({type:String,json:{name:"name",write:{overridePolicy:re}}})],oe.prototype,"title",void 0),e([b("service","title",["name","layerDefinition.name"])],oe.prototype,"readTitle",null),e([h({type:String})],oe.prototype,"typeIdField",void 0),e([h({json:{read:!1},readOnly:!0,value:"sublayer"})],oe.prototype,"type",void 0),e([b("typeIdField",["layerDefinition.typeIdField"])],oe.prototype,"readTypeIdField",null),e([h({type:[P],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],oe.prototype,"types",void 0),e([h({type:String,json:{name:"layerUrl",write:{overridePolicy:Y}}})],oe.prototype,"url",null),e([h({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:Z}}})],oe.prototype,"visible",null),e([S("visible")],oe.prototype,"writeVisible",null),oe=z=e([g("esri.layers.support.Sublayer")],oe);const se=oe;export{se as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{dateOnlyToDateTime as e,timeOnlyToDateTime as n,timestampOffsetToDateTime as i}from"../../support/dateUtils.js";var l;!function(e){e.VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",e.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value"}(l||(l={}));const t=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]);function r(e){return null!=e&&t.has(e.type)}function a(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function u(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function o(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function s(e,n,i){const t=i??e?.domain;if(!t)return null;switch(t.type){case"range":{const{min:t,max:r}=m(e,i);if(null!=t&&+n<t||null!=r&&+n>r)return l.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==t.codedValues||t.codedValues.every((e=>null==e||e.code!==n)))return l.INVALID_CODED_VALUE}return null}function m(e,n){const i=n??e?.domain;if(!i||"range"!==i.type)return;const l="range"in i?i.range[0]:i.minValue,t="range"in i?i.range[1]:i.maxValue,s=r(e);return a(e)||o(e)||u(e)?{...d(e,t,l),isInteger:s}:{min:null!=l&&"number"==typeof l?l:null,max:null!=t&&"number"==typeof t?t:null,rawMin:l,rawMax:t,isInteger:s}}function d(l,t,r){return a(l)?{min:e(r)?.toMillis(),max:e(t)?.toMillis(),rawMin:r,rawMax:t}:o(l)?{min:n(r)?.toMillis(),max:n(t)?.toMillis(),rawMin:r,rawMax:t}:u(l)?{min:i(r)?.toMillis(),max:i(t)?.toMillis(),rawMin:r,rawMax:t}:{max:null,min:null}}export{l as DomainValidationError,d as dateTimeFieldValuesToNumericRange,m as getDomainRange,s as validateDomainValue};
5
+ import{dateOnlyToDateTime as e,timeOnlyToDateTime as n,timestampOffsetToDateTime as i}from"../../support/dateUtils.js";var l;!function(e){e.VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",e.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value"}(l||(l={}));const t=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]);function r(e){return null!=e&&t.has(e.type)}function a(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function u(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function o(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function s(e,n,i){const t=i??e?.domain;if(!t)return null;switch(t.type){case"range":{const{min:i,max:r}=m(e,t);if(null!=i&&+n<i||null!=r&&+n>r)return l.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==t.codedValues||t.codedValues.every((e=>null==e||e.code!==n)))return l.INVALID_CODED_VALUE}return null}function m(e,n){const i=n??e?.domain;if(!i||"range"!==i.type)return;const l="range"in i?i.range[0]:i.minValue,t="range"in i?i.range[1]:i.maxValue,s=r(e);return a(e)||o(e)||u(e)?{...d(e,t,l),isInteger:s}:{min:null!=l&&"number"==typeof l?l:null,max:null!=t&&"number"==typeof t?t:null,rawMin:l,rawMax:t,isInteger:s}}function d(l,t,r){return a(l)?{min:e(r)?.toMillis(),max:e(t)?.toMillis(),rawMin:r,rawMax:t}:o(l)?{min:n(r)?.toMillis(),max:n(t)?.toMillis(),rawMin:r,rawMax:t}:u(l)?{min:i(r)?.toMillis(),max:i(t)?.toMillis(),rawMin:r,rawMax:t}:{max:null,min:null}}export{l as DomainValidationError,d as dateTimeFieldValuesToNumericRange,m as getDomainRange,s as validateDomainValue};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{validateDomainValue as l,getDomainRange as o,DomainValidationError as s}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as a}from"../../support/arcadeExpressionUtils.js";import{loadArcade as u}from"../../support/arcadeOnDemand.js";import{isStringOrNull as f,isString as c}from"../../support/guards.js";const d=/^([0-9_])/,m=/[^a-z0-9_\u0080-\uffff]+/gi;function p(e){if(null==e)return null;return e.trim().replaceAll(m,"_").replace(d,"F$1")||null}const y=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],g=["field","normalizationField"];function F(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(I(y,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)I(g,e,n)}function I(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function b(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const w=new Set;function x(e,n){return e&&n?(w.clear(),T(w,e,n),Array.from(w).sort()):[]}function T(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)h(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function h(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function E(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function _(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=x(e,n);return t.length/e.fields.length>=i?["*"]:t}async function A(e,n,i){if(!i)return;let t;const r=a(i);if(r)t=[r];else{const{arcadeUtils:e}=await u();t=e.extractFieldNames(i,n?.fields?.map((e=>e.name)))}for(const l of t)h(e,n,l)}async function S(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});T(n,i,l.fieldNames)}}function N({displayField:e,fields:n}){return e||(n?.length?$(n,"name-or-title")||$(n,"unique-identifier")||$(n,"type-or-category")||v(n):null)}function v(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function $(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function L(e){if(!e)return[];const n=new Set;return await D(n,e),Array.from(n).sort()}async function D(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function M(e,n,i){i.onStatisticExpression?A(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function O(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(V(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>M(e,n.fieldsIndex,i)))),await Promise.all(t)}async function V(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>A(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(A(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function j(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&T(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&T(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await S(e,n.fieldsIndex,i.where))}async function U(e,n,i){n&&i&&await Promise.all(i.map((i=>R(e,n,i))))}async function R(e,n,i){n&&i&&(i.valueExpression?await A(e,n.fieldsIndex,i.valueExpression):i.field&&h(e,n.fieldsIndex,i.field))}async function C(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?x(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function G(e){return e?x(e.fieldsIndex,B(e)):[]}function k(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?x(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}const X=new Set(["oid","global-id","guid"]),z=new Set(["oid","global-id"]),P=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function q(e){const n=new Set;Y(e).forEach((e=>n.add(e))),k(e).forEach((e=>n.add(e.toLowerCase())));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(i.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}function B(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function Y(e){return B(e).map((e=>e.toLowerCase()))}function J(e,n){return e.editable&&!X.has(e.type)&&!Y(n).includes(e.name?.toLowerCase()??"")}function W(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||q(n).includes(i)||z.has(e.type)||P.some((e=>e.test(i))))}async function H(e){if(!e)return[];const n=new Set;return await K(n,e),Array.from(n).sort()}async function K(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map((n=>Q(e,t,n))))}async function Q(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await A(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{h(e,n,i.slice(1,-1))}))}await S(e,n,r)}function Z(e){const n=e.defaultValue;return void 0!==n&&le(e,n)?n:e.nullable?null:void 0}function ee(e){const n="string"==typeof e?{type:e}:e;return ge(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ne(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function ie(e){return null===e||ne(e)}function te(e){return null===e||Number.isInteger(e)}function re(){return!0}function le(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?te:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?ie:ne;break;case"string":case"esriFieldTypeString":i=e.nullable?f:c;break;default:i=re}return 1===arguments.length?i:i(n)}const oe=["integer","small-integer","big-integer"],se=["single","double"],ae=[...oe,...se],ue=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"],fe=["esriFieldTypeSingle","esriFieldTypeDouble"],ce=new Set([...oe,...ue]),de=new Set([...se,...fe]),me=t(ce,de);function pe(e){return null!=e&&ce.has(e.type)}function ye(e){return null!=e&&me.has(e.type)}function ge(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Fe(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function Ie(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function be(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function we(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function Te(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function he(e,n){return null===Se(e,n)}var Ee,_e;function Ae(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:ye(e)&&!Ne(e.type,Number(n))?Ee.OUT_OF_RANGE:le(e,n)?e.domain?l(e,n):null:_e.INVALID_TYPE}function Ne(e,n){const i="string"==typeof e?$e(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function ve(e,n){const i=o(e,n);return i||(ye(e)?$e(e.type):void 0)}function $e(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return De;case"esriFieldTypeInteger":case"integer":return Me;case"esriFieldTypeBigInteger":case"big-integer":return Oe;case"esriFieldTypeSingle":case"single":return Ve;case"esriFieldTypeDouble":case"double":return je}}function Le(e){if(!ne(e))return null;if(Number.isInteger(e)){if(e>=De.min&&e<=De.max)return"esriFieldTypeSmallInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeInteger";if(e>=Oe.min&&e<=Oe.max)return"esriFieldTypeBigInteger"}return e>=Ve.min&&e<=Ve.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Ee||(Ee={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(_e||(_e={}));const De={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Me={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Oe={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},Ve={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},je={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Ue(e,n,i){switch(e){case s.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case s.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case _e.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Ee.OUT_OF_RANGE:{const{min:e,max:t}=$e(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function Re(e,n){return!Ce(e,n,null)}function Ce(e,n,i){if(!n?.attributes||!e){if(null!=i)for(const n of e??[])i.add(n);return!0}const t=new Set(Object.keys(n.attributes));let r=!1;for(const l of e)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ge(e,n){const i=new Set;for(const t of n)await A(i,e.fieldsIndex,t);return Array.from(i).sort()}function ke(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}async function Xe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function ze(e){const n=e?.match(/{[^}]+}/g);return n?n.map((e=>e.slice(1,-1).split(":")[0].trim())):[]}export{Ee as NumericRangeValidationError,_e as TypeValidationError,Oe as bigIntegerRange,A as collectArcadeFieldNames,D as collectElevationFields,O as collectFeatureReductionFields,h as collectField,T as collectFields,j as collectFilterFields,K as collectLabelingFields,U as collectOrderByInfos,V as collectPopupTemplateFields,je as doubleRange,ze as extractSubstitutionTemplatesFromString,Re as featureHasFields,x as fixFields,F as fixRendererFields,b as fixTimeInfoFields,fe as floatJSONTypes,se as floatTypes,N as getDisplayFieldName,B as getEditTrackingFields,L as getElevationFields,Ge as getExpressionFields,G as getFeatureEditFields,k as getFeatureGeometryFields,ee as getFieldDefaultLength,Z as getFieldDefaultValue,ve as getFieldRange,H as getLabelingFields,q as getLowerCaseDefaultHiddenFields,Y as getLowerCaseEditTrackingFields,Le as getNumericTypeForValue,Xe as getRendererFields,C as getTimeFields,ue as integerJSONTypes,Me as integerRange,oe as integerTypes,Fe as isDateField,Ie as isDateOnlyField,J as isFieldEditable,W as isFieldVisibleByDefault,Te as isGlobalIDField,pe as isIntegerField,Ne as isNumberInRange,ye as isNumericField,xe as isObjectIDField,ke as isRasterPixelValueField,ge as isStringField,we as isTimeOnlyField,be as isTimestampOffsetField,he as isValidFieldValue,le as isValueMatchingFieldType,p as normalizeFieldName,ae as numericTypes,_ as packFields,Ce as populateMissingFields,y as rendererFields,Ae as sanitizeNullFieldValue,Ve as singleRange,De as smallIntegerRange,E as unpackFieldNames,Se as validateFieldValue,Ue as validationErrorToString,g as visualVariableFields};
5
+ import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{getDomainRange as l,DomainValidationError as o}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as s}from"../../support/arcadeExpressionUtils.js";import{loadArcade as a}from"../../support/arcadeOnDemand.js";import{isStringOrNull as u,isString as f}from"../../support/guards.js";const c=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function p(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(c,"F$1")||null}const m=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],y=["field","normalizationField"];function g(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(F(m,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)F(y,e,n)}function F(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function I(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const b=new Set;function w(e,n){return e&&n?(b.clear(),x(b,e,n),Array.from(b).sort()):[]}function x(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)T(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function T(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function h(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function E(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=w(e,n);return t.length/e.fields.length>=i?["*"]:t}async function _(e,n,i){if(!i)return;let t;const r=s(i);if(r)t=[r];else{const{arcadeUtils:e}=await a();t=e.extractFieldNames(i,n?.fields?.map((e=>e.name)))}for(const l of t)T(e,n,l)}async function A(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});x(n,i,l.fieldNames)}}function S({displayField:e,fields:n}){return e||(n?.length?v(n,"name-or-title")||v(n,"unique-identifier")||v(n,"type-or-category")||N(n):null)}function N(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function v(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function $(e){if(!e)return[];const n=new Set;return await L(n,e),Array.from(n).sort()}async function L(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function D(e,n,i){i.onStatisticExpression?_(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function M(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(O(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>D(e,n.fieldsIndex,i)))),await Promise.all(t)}async function O(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>_(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(_(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function V(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&x(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&x(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await A(e,n.fieldsIndex,i.where))}async function j(e,n,i){n&&i&&await Promise.all(i.map((i=>U(e,n,i))))}async function U(e,n,i){n&&i&&(i.valueExpression?await _(e,n.fieldsIndex,i.valueExpression):i.field&&T(e,n.fieldsIndex,i.field))}async function R(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?w(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?w(e.fieldsIndex,q(e)):[]}function G(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?w(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}const k=new Set(["oid","global-id","guid"]),X=new Set(["oid","global-id"]),z=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function P(e){const n=new Set;B(e).forEach((e=>n.add(e))),G(e).forEach((e=>n.add(e.toLowerCase())));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(i.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}function q(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function B(e){return q(e).map((e=>e.toLowerCase()))}function Y(e,n){return e.editable&&!k.has(e.type)&&!B(n).includes(e.name?.toLowerCase()??"")}function J(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||P(n).includes(i)||X.has(e.type)||z.some((e=>e.test(i))))}async function W(e){if(!e)return[];const n=new Set;return await H(n,e),Array.from(n).sort()}async function H(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map((n=>K(e,t,n))))}async function K(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await _(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{T(e,n,i.slice(1,-1))}))}await A(e,n,r)}function Q(e){const n=e.defaultValue;return void 0!==n&&re(e,n)?n:e.nullable?null:void 0}function Z(e){const n="string"==typeof e?{type:e}:e;return ye(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ee(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function ne(e){return null===e||ee(e)}function ie(e){return null===e||Number.isInteger(e)}function te(){return!0}function re(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?ie:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?ne:ee;break;case"string":case"esriFieldTypeString":i=e.nullable?u:f;break;default:i=te}return 1===arguments.length?i:i(n)}const le=["integer","small-integer","big-integer"],oe=["single","double"],se=[...le,...oe],ae=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"],ue=["esriFieldTypeSingle","esriFieldTypeDouble"],fe=new Set([...le,...ae]),ce=new Set([...oe,...ue]),de=t(fe,ce);function pe(e){return null!=e&&fe.has(e.type)}function me(e){return null!=e&&de.has(e.type)}function ye(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function ge(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function Fe(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function Ie(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function be(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function we(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function xe(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function Te(e,n){return null===Ae(e,n)}var he,Ee;function _e(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Ae(e,n){return null==e||e.nullable&&null===n?null:re(e,n)?me(e)&&!Se(e.type,Number(n))?he.OUT_OF_RANGE:null:Ee.INVALID_TYPE}function Se(e,n){const i="string"==typeof e?ve(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function Ne(e,n){const i=l(e,n);return i||(me(e)?ve(e.type):void 0)}function ve(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Le;case"esriFieldTypeInteger":case"integer":return De;case"esriFieldTypeBigInteger":case"big-integer":return Me;case"esriFieldTypeSingle":case"single":return Oe;case"esriFieldTypeDouble":case"double":return Ve}}function $e(e){if(!ee(e))return null;if(Number.isInteger(e)){if(e>=Le.min&&e<=Le.max)return"esriFieldTypeSmallInteger";if(e>=De.min&&e<=De.max)return"esriFieldTypeInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeBigInteger"}return e>=Oe.min&&e<=Oe.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(he||(he={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(Ee||(Ee={}));const Le={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},De={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Me={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},Oe={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},Ve={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function je(e,n,i){switch(e){case o.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case o.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case Ee.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case he.OUT_OF_RANGE:{const{min:e,max:t}=ve(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function Ue(e,n){return!Re(e,n,null)}function Re(e,n,i){if(!n?.attributes||!e){if(null!=i)for(const n of e??[])i.add(n);return!0}const t=new Set(Object.keys(n.attributes));let r=!1;for(const l of e)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ce(e,n){const i=new Set;for(const t of n)await _(i,e.fieldsIndex,t);return Array.from(i).sort()}function Ge(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}async function ke(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function Xe(e){const n=e?.match(/{[^}]+}/g);return n?n.map((e=>e.slice(1,-1).split(":")[0].trim())):[]}export{he as NumericRangeValidationError,Ee as TypeValidationError,Me as bigIntegerRange,_ as collectArcadeFieldNames,L as collectElevationFields,M as collectFeatureReductionFields,T as collectField,x as collectFields,V as collectFilterFields,H as collectLabelingFields,j as collectOrderByInfos,O as collectPopupTemplateFields,Ve as doubleRange,Xe as extractSubstitutionTemplatesFromString,Ue as featureHasFields,w as fixFields,g as fixRendererFields,I as fixTimeInfoFields,ue as floatJSONTypes,oe as floatTypes,S as getDisplayFieldName,q as getEditTrackingFields,$ as getElevationFields,Ce as getExpressionFields,C as getFeatureEditFields,G as getFeatureGeometryFields,Z as getFieldDefaultLength,Q as getFieldDefaultValue,Ne as getFieldRange,W as getLabelingFields,P as getLowerCaseDefaultHiddenFields,B as getLowerCaseEditTrackingFields,$e as getNumericTypeForValue,ke as getRendererFields,R as getTimeFields,ae as integerJSONTypes,De as integerRange,le as integerTypes,ge as isDateField,Fe as isDateOnlyField,Y as isFieldEditable,J as isFieldVisibleByDefault,xe as isGlobalIDField,pe as isIntegerField,Se as isNumberInRange,me as isNumericField,we as isObjectIDField,Ge as isRasterPixelValueField,ye as isStringField,be as isTimeOnlyField,Ie as isTimestampOffsetField,Te as isValidFieldValue,re as isValueMatchingFieldType,p as normalizeFieldName,se as numericTypes,E as packFields,Re as populateMissingFields,m as rendererFields,_e as sanitizeNullFieldValue,Oe as singleRange,Le as smallIntegerRange,h as unpackFieldNames,Ae as validateFieldValue,je as validationErrorToString,y as visualVariableFields};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.32.0-next.20241218",
3
+ "version": "4.32.0-next.20241220",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@esri/arcgis-html-sanitizer": "~4.1.0",
29
- "@esri/calcite-components": "~3.0.0-next.75",
29
+ "@esri/calcite-components": "~3.0.0-next.78",
30
30
  "@vaadin/grid": "~24.6.0",
31
31
  "@zip.js/zip.js": "~2.7.54",
32
32
  "luxon": "~3.5.0",
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../core/Clonable.js";import{strict as e}from"../../core/jsonMap.js";import s from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{enumeration as p}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";const i=e()({ascendingValues:"ascending-values",descendingValues:"descending-values"});let n=class extends(r.ClonableMixin(s)){constructor(o){super(o),this.title=null,this.order=null}};o([t({type:String,json:{write:!0}})],n.prototype,"title",void 0),o([p(i)],n.prototype,"order",void 0),n=o([c("esri.renderers.support.RendererLegendOptions")],n);const a=n;export{a as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/Clonable.js";import{strict as e}from"../../core/jsonMap.js";import s from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import{ensureClass as p}from"../../core/accessorSupport/ensureType.js";import"../../core/RandomLCG.js";import"../../core/has.js";import{enumeration as c}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";var i;const a=e()({ascendingValues:"ascending-values",descendingValues:"descending-values"});let m=i=class extends(o.ClonableMixin(s)){static from(r){return p(i,r)}constructor(r){super(r),this.title=null,this.order=null}};r([t({type:String,json:{write:!0}})],m.prototype,"title",void 0),r([c(a)],m.prototype,"order",void 0),m=i=r([n("esri.renderers.support.RendererLegendOptions")],m);const u=m;export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{parse as e}from"../../layers/support/arcgisLayerUrl.js";import r from"./FeatureService.js";const t=(s,o)=>{for(const u of s)if("feature"===u.type||"subtype-group"===u.type){if(!u.url)continue;const t=e(u.url).url.path,s=o.get(t);if(s)s.layers.push(u);else{const e=new r({url:t}),s=[u];o.set(t,{featureService:e,layers:s})}}else"group"===u.type&&t(u.layers,o)};function s(e){const r=new Map;return t(e,r),r}export{s as createFeatureServices};
5
+ import{parse as e}from"../../layers/support/arcgisLayerUrl.js";import r from"./FeatureService.js";const t=(p,o)=>{for(const s of p)if("feature"===s.type||"subtype-group"===s.type){if(!s.url)continue;const t=e(s.url).url.path,p=o.get(t);if(p)p.layers.push(s);else{const e=new r({url:t}),p=[s];o.set(t,{featureService:e,layers:p})}}else"group"===s.type&&t(s.layers.filter((e=>"feature"===e.type||"subtype-group"===e.type||"group"===e.type)),o)};function p(e){const r=new Map;return t(e,r),r}export{p as createFeatureServices};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{getMetersPerVerticalUnitForSR as e}from"../../../core/unitUtils.js";import{equals as t}from"../../../geometry/support/spatialReferenceUtils.js";import{hasGeometry as r,OptimizedFeature as o}from"../../../layers/graphics/OptimizedFeature.js";import i from"../../../layers/graphics/OptimizedFeatureSet.js";import s from"../../../layers/graphics/OptimizedGeometry.js";const n=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class a{constructor(e){this._options=e,this.geometryTypes=n,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new i}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(o){if(!o?.features||!o.hasZ||!this._options.sourceSpatialReference||!o.spatialReference||t(o.spatialReference,this._options.sourceSpatialReference)||o.spatialReference.vcsWkid)return;const i=e(this._options.sourceSpatialReference)/e(o.spatialReference);if(1!==i)for(const e of o.features){if(!r(e))continue;const t=e.geometry.coords;for(let e=2;e<t.length;e+=3)t[e]*=i}}addFeature(e,t){e.features.push(t)}createFeature(){return new o}createSpatialReference(){return{wkid:0}}createGeometry(){return new s}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new s}}export{a as OptimizedFeatureSetParserContext,n as optimizedGeometryTypes};
5
+ import{getMetersPerVerticalUnitForSR as e}from"../../../core/unitUtils.js";import{equals as t}from"../../../geometry/support/spatialReferenceUtils.js";import{hasGeometry as r,OptimizedFeature as o}from"../../../layers/graphics/OptimizedFeature.js";import i from"../../../layers/graphics/OptimizedFeatureSet.js";import s from"../../../layers/graphics/OptimizedGeometry.js";const n=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class a{constructor(e){this._options=e,this.geometryTypes=n,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new i}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(o){if(!o?.features||!o.hasZ||!this._options.sourceSpatialReference||!o.spatialReference||t(o.spatialReference,this._options.sourceSpatialReference)||o.spatialReference.vcsWkid)return;const i=e(this._options.sourceSpatialReference)/e(o.spatialReference);if(1!==i)for(const e of o.features){if(!r(e))continue;const t=e.geometry.coords;for(let e=2;e<t.length;e+=3)t[e]*=i}}addFeature(e,t){e.features.push(t)}createFeature(){return new o(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new s}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new s}}export{a as OptimizedFeatureSetParserContext,n as optimizedGeometryTypes};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{ensureType as r}from"../../core/accessorSupport/ensureType.js";import"../../core/RandomLCG.js";import"../../core/has.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{apiKey as s}from"./commonProperties.js";import p from"../../geometry/Point.js";import n from"../../geometry/SpatialReference.js";import a from"../../geometry/Extent.js";let l=class extends t{constructor(o){super(o),this.address=null,this.apiKey=null,this.categories=null,this.countryCode=null,this.forStorage=null,this.location=null,this.locationType=null,this.magicKey=null,this.maxLocations=null,this.outFields=null,this.outSpatialReference=null,this.searchExtent=null}};o([e({type:Object,json:{write:!0}})],l.prototype,"address",void 0),o([e(s)],l.prototype,"apiKey",void 0),o([e({type:[String],json:{read:{source:"category",reader:o=>o?o.split(","):null},write:{target:"category",writer:(o,t)=>{t.category=o?o.join(","):null}}}})],l.prototype,"categories",void 0),o([e({type:String,json:{write:!0}})],l.prototype,"countryCode",void 0),o([e({type:Boolean,json:{write:!0}})],l.prototype,"forStorage",void 0),o([e({type:p,json:{write:{writer:(o,t)=>{t.location=o?o.clone().normalize():null}}}})],l.prototype,"location",void 0),o([e({type:String,json:{write:!0}})],l.prototype,"locationType",void 0),o([e({type:String,json:{write:!0}})],l.prototype,"magicKey",void 0),o([e({type:Number,json:{write:!0}})],l.prototype,"maxLocations",void 0),o([e({type:[String],json:{write:{writer:(o,t)=>{t.outFields=o?o.join(","):null}}}})],l.prototype,"outFields",void 0),o([e({type:n,json:{read:{source:"outSR"},write:{target:"outSR"}}})],l.prototype,"outSpatialReference",void 0),o([e({type:a,json:{write:{writer:(o,t)=>{const e=o?o.shiftCentralMeridian():null;t.searchExtent=e}}}})],l.prototype,"searchExtent",void 0),l=o([i("esri.rest.support.AddressToLocationsParameters")],l),l.from=r(l);const c=l;export{c as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{ensureType as r}from"../../core/accessorSupport/ensureType.js";import"../../core/RandomLCG.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{apiKey as i}from"./commonProperties.js";import p from"../../geometry/Point.js";import n from"../../geometry/SpatialReference.js";import a from"../../geometry/Extent.js";let l=class extends t{constructor(o){super(o),this.address=null,this.apiKey=null,this.categories=null,this.countryCode=null,this.forStorage=null,this.location=null,this.locationType=null,this.magicKey=null,this.maxLocations=null,this.outFields=null,this.outSpatialReference=null,this.searchExtent=null}};o([e({type:Object,json:{write:!0}})],l.prototype,"address",void 0),o([e(i)],l.prototype,"apiKey",void 0),o([e({type:[String],json:{read:{source:"category",reader:o=>o?o.split(","):null},write:{target:"category",writer:(o,t)=>{t.category=o?o.join(","):null}}}})],l.prototype,"categories",void 0),o([e({type:String,json:{write:!0}})],l.prototype,"countryCode",void 0),o([e({type:Boolean,json:{write:!0}})],l.prototype,"forStorage",void 0),o([e({type:p,json:{write:{writer:(o,t)=>{t.location=o?o.clone().normalize():null}}}})],l.prototype,"location",void 0),o([e({type:["rooftop","street"],json:{write:!0}})],l.prototype,"locationType",void 0),o([e({type:String,json:{write:!0}})],l.prototype,"magicKey",void 0),o([e({type:Number,json:{write:!0}})],l.prototype,"maxLocations",void 0),o([e({type:[String],json:{write:{writer:(o,t)=>{t.outFields=o?o.join(","):null}}}})],l.prototype,"outFields",void 0),o([e({type:n,json:{read:{source:"outSR"},write:{target:"outSR"}}})],l.prototype,"outSpatialReference",void 0),o([e({type:a,json:{write:{writer:(o,t)=>{const e=o?o.shiftCentralMeridian():null;t.searchExtent=e}}}})],l.prototype,"searchExtent",void 0),l=o([s("esri.rest.support.AddressToLocationsParameters")],l),l.from=r(l);const c=l;export{c as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import"../../geometry.js";import r from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import{ensureType as e}from"../../core/accessorSupport/ensureType.js";import"../../core/RandomLCG.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{apiKey as p}from"./commonProperties.js";import i from"../../geometry/Point.js";import c from"../../geometry/SpatialReference.js";let a=class extends r{constructor(o){super(o),this.apiKey=null,this.location=null,this.locationType=null,this.outSpatialReference=null}};o([t(p)],a.prototype,"apiKey",void 0),o([t({type:i,json:{write:{writer:(o,r)=>{const t=o?o.clone().normalize():null,e=void 0!==t;r.location=e?t:null}}}})],a.prototype,"location",void 0),o([t({type:String,json:{write:!0}})],a.prototype,"locationType",void 0),o([t({type:c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],a.prototype,"outSpatialReference",void 0),a=o([s("esri.rest.support.LocationToAddressParameters")],a),a.from=e(a);const n=a;export{n as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import"../../geometry.js";import r from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import{ensureType as e}from"../../core/accessorSupport/ensureType.js";import"../../core/RandomLCG.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{apiKey as p}from"./commonProperties.js";import i from"../../geometry/Point.js";import c from"../../geometry/SpatialReference.js";let a=class extends r{constructor(o){super(o),this.apiKey=null,this.location=null,this.locationType=null,this.outSpatialReference=null}};o([t(p)],a.prototype,"apiKey",void 0),o([t({type:i,json:{write:{writer:(o,r)=>{const t=o?o.clone().normalize():null,e=void 0!==t;r.location=e?t:null}}}})],a.prototype,"location",void 0),o([t({type:["street","rooftop"],json:{write:!0}})],a.prototype,"locationType",void 0),o([t({type:c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],a.prototype,"outSpatialReference",void 0),a=o([s("esri.rest.support.LocationToAddressParameters")],a),a.from=e(a);const n=a;export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as s}from"../../intl/messages.js";import{hasNormalizedField as a,getFieldAndExpressionInfos as n,getContentFromFieldInfos as t}from"./support/utils.js";async function o(e){const{layer:s,renderer:a}=e;await s.load();const n=a||s.renderer;if("class-breaks"!==n?.type)throw new r("class-breaks-popup:invalid-parameters","renderer.type must be 'class-breaks'");return{layer:s,renderer:n}}async function i(r,s,a="divide"){const{fieldInfos:o,expressionInfos:i}=await n({renderer:r,layer:s,normFieldExpressionTemplate:a});return new e({content:await t(s,{fieldInfos:o,expressionInfos:i}),fieldInfos:o,expressionInfos:i})}async function p(e){const[{renderer:r,layer:n},t]=await Promise.all([o(e),s("esri/smartMapping/t9n/smartMapping")]),p={name:"class-breaks",title:t.classBreaks,value:await i(r,n)},l=[];return a(r)&&l.push({name:"class-breaks-percent",title:t.classBreaksNormFieldAsPercent,value:await i(r,n,"percentage")}),{primaryTemplate:p,secondaryTemplates:l}}export{p as getTemplates};
5
+ import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as s}from"../../intl/messages.js";import{hasNormalizedField as a,getFieldAndExpressionInfos as n,getContentFromFieldInfos as t}from"./support/utils.js";async function o(e){const{layer:s,renderer:a}=e;await s.load();const n=a??("renderer"in s?s.renderer:void 0);if("class-breaks"!==n?.type)throw new r("class-breaks-popup:invalid-parameters","renderer.type must be 'class-breaks'");return{layer:s,renderer:n}}async function i(r,s,a="divide"){const{fieldInfos:o,expressionInfos:i}=await n({renderer:r,layer:s,normFieldExpressionTemplate:a});return new e({content:await t(s,{fieldInfos:o,expressionInfos:i}),fieldInfos:o,expressionInfos:i})}async function p(e){const[{renderer:r,layer:n},t]=await Promise.all([o(e),s("esri/smartMapping/t9n/smartMapping")]),p={name:"class-breaks",title:t.classBreaks,value:await i(r,n)},l=[];return a(r)&&l.push({name:"class-breaks-percent",title:t.classBreaksNormFieldAsPercent,value:await i(r,n,"percentage")}),{primaryTemplate:p,secondaryTemplates:l}}export{p as getTemplates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as t}from"../../intl/messages.js";import{getContentAndInfos as s,getContentAndInfosForPieChart as n}from"./support/clusterUtils.js";import{isClusterCompatibleRenderer as l}from"../../views/2d/layers/support/clusterUtils.js";async function o(e){const{layer:t,renderer:s}=e;await t.load();const n=s||t.renderer;if(!l(n))throw new r("clusters-popup:invalid-parameters","'renderer' is not valid");return{layer:t,renderer:n}}async function i(r){const[{renderer:l,layer:i},a]=await Promise.all([o(r),t("esri/smartMapping/t9n/smartMapping")]),p=await s(i,l,a);if(null==p)return null;const u={name:"clusters",title:a.clusters.templateTitle,value:new e({fieldInfos:p.fieldInfos,expressionInfos:p.expressionInfos,content:p.content,title:a.clusters.clusterPopupTitle})},c=[],f=i.featureReduction,m=f&&"renderer"in f?f.renderer:null;if("pie-chart"===m?.type){const r=await n(i,m,a);null!=r&&c.push({name:"clusters-pie-chart",title:"clusters-pie-chart",value:new e({fieldInfos:r.fieldInfos,expressionInfos:r.expressionInfos,content:r.content,title:a.clusters.clusterPopupTitle})})}return{primaryTemplate:u,secondaryTemplates:c}}export{i as getTemplates};
5
+ import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as t}from"../../intl/messages.js";import{getContentAndInfos as s,getContentAndInfosForPieChart as n}from"./support/clusterUtils.js";import{isClusterCompatibleRenderer as i}from"../../views/2d/layers/support/clusterUtils.js";async function o(e){const{layer:t,renderer:s}=e;await t.load();const n=s??("renderer"in t?t.renderer:void 0);if(!i(n))throw new r("clusters-popup:invalid-parameters","'renderer' is not valid");return{layer:t,renderer:n}}async function l(r){const[{renderer:i,layer:l},a]=await Promise.all([o(r),t("esri/smartMapping/t9n/smartMapping")]),p=await s(l,i,a);if(null==p)return null;const u={name:"clusters",title:a.clusters.templateTitle,value:new e({fieldInfos:p.fieldInfos,expressionInfos:p.expressionInfos,content:p.content,title:a.clusters.clusterPopupTitle})},c=[],f=l.featureReduction,m=f&&"renderer"in f?f.renderer:null;if("pie-chart"===m?.type){const r=await n(l,m,a);null!=r&&c.push({name:"clusters-pie-chart",title:"clusters-pie-chart",value:new e({fieldInfos:r.fieldInfos,expressionInfos:r.expressionInfos,content:r.content,title:a.clusters.clusterPopupTitle})})}return{primaryTemplate:u,secondaryTemplates:c}}export{l as getTemplates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../PopupTemplate.js";import t from"../../core/Error.js";import{fetchMessageBundle as n}from"../../intl/messages.js";import i from"../../popup/ExpressionInfo.js";import o from"../../popup/FieldInfo.js";import{getFieldAndExpressionInfos as s,getContentFromFieldInfos as r,expressionFieldPrefix as a}from"./support/utils.js";import{getArcadeForOrderedFields as d,getArcadeForPredominantCategoryAlias as f}from"../statistics/support/predominanceUtils.js";async function l(e){const{layer:n,renderer:i}=e;await n.load();const o=i||n.renderer;if("dot-density"!==o?.type)throw new t("dot-density-popup:invalid-parameters","renderer.type must be 'dot-density'");return{layer:n,renderer:o}}async function p(t,n){const{fieldInfos:i,expressionInfos:o}=await s({renderer:t,layer:n});return new e({content:await r(n,{fieldInfos:i,expressionInfos:o}),expressionInfos:o,fieldInfos:i})}async function m(t,n,r){const{fieldInfos:f,expressionInfos:l}=await s({renderer:t,layer:n}),p=f.filter((e=>!e.fieldName?.includes(a))),m={fieldInfo:new o({fieldName:"expression/dot-density-categories-list"}),expressionInfo:new i({name:"dot-density-categories-list",title:r.listOfCategories,expression:d(p,l)})},c=new e({expressionInfos:[m.expressionInfo],fieldInfos:[m.fieldInfo],title:r.competingFields,content:`{${m.fieldInfo.fieldName}}`});return{name:"dot-density-categories-list",title:r.orderedListOfValues,value:c}}async function c(t,n,r){const{fieldInfos:d,expressionInfos:l}=await s({renderer:t,layer:n}),p=d.filter((e=>!e.fieldName?.includes(a))),m={fieldInfo:new o({fieldName:"expression/dot-density-category"}),expressionInfo:new i({name:"dot-density-category",title:r.predominantCategory,expression:f(p,l)})},c=new e({expressionInfos:[m.expressionInfo,...l],fieldInfos:[m.fieldInfo,...d],content:[{type:"text",text:`<div><b><font size="3">{${m.fieldInfo.fieldName}}</font></b></div>`},{type:"media",mediaInfos:{type:"pie-chart",title:r.competingFields,value:{fields:d.map((e=>e.fieldName))}}}]});return{name:"dot-density-category-chart",title:r.predominantCategoryWithChart,value:c}}async function y(e){const[{renderer:t,layer:i},o]=await Promise.all([l(e),n("esri/smartMapping/t9n/smartMapping")]);return{primaryTemplate:{name:"dot-density",title:o.dotDensity,value:await p(t,i)},secondaryTemplates:[await m(t,i,o),await c(t,i,o)]}}export{y as getTemplates};
5
+ import e from"../../PopupTemplate.js";import n from"../../core/Error.js";import{fetchMessageBundle as t}from"../../intl/messages.js";import i from"../../popup/ExpressionInfo.js";import o from"../../popup/FieldInfo.js";import{getFieldAndExpressionInfos as s,getContentFromFieldInfos as r,expressionFieldPrefix as a}from"./support/utils.js";import{getArcadeForOrderedFields as d,getArcadeForPredominantCategoryAlias as f}from"../statistics/support/predominanceUtils.js";async function l(e){const{layer:t,renderer:i}=e;await t.load();const o=i??("renderer"in t?t.renderer:void 0);if("dot-density"!==o?.type)throw new n("dot-density-popup:invalid-parameters","renderer.type must be 'dot-density'");return{layer:t,renderer:o}}async function p(n,t){const{fieldInfos:i,expressionInfos:o}=await s({renderer:n,layer:t});return new e({content:await r(t,{fieldInfos:i,expressionInfos:o}),expressionInfos:o,fieldInfos:i})}async function m(n,t,r){const{fieldInfos:f,expressionInfos:l}=await s({renderer:n,layer:t}),p=f.filter((e=>!e.fieldName?.includes(a))),m={fieldInfo:new o({fieldName:"expression/dot-density-categories-list"}),expressionInfo:new i({name:"dot-density-categories-list",title:r.listOfCategories,expression:d(p,l)})},c=new e({expressionInfos:[m.expressionInfo],fieldInfos:[m.fieldInfo],title:r.competingFields,content:`{${m.fieldInfo.fieldName}}`});return{name:"dot-density-categories-list",title:r.orderedListOfValues,value:c}}async function c(n,t,r){const{fieldInfos:d,expressionInfos:l}=await s({renderer:n,layer:t}),p=d.filter((e=>!e.fieldName?.includes(a))),m={fieldInfo:new o({fieldName:"expression/dot-density-category"}),expressionInfo:new i({name:"dot-density-category",title:r.predominantCategory,expression:f(p,l)})},c=new e({expressionInfos:[m.expressionInfo,...l],fieldInfos:[m.fieldInfo,...d],content:[{type:"text",text:`<div><b><font size="3">{${m.fieldInfo.fieldName}}</font></b></div>`},{type:"media",mediaInfos:{type:"pie-chart",title:r.competingFields,value:{fields:d.map((e=>e.fieldName))}}}]});return{name:"dot-density-category-chart",title:r.predominantCategoryWithChart,value:c}}async function y(e){const[{renderer:n,layer:i},o]=await Promise.all([l(e),t("esri/smartMapping/t9n/smartMapping")]);return{primaryTemplate:{name:"dot-density",title:o.dotDensity,value:await p(n,i)},secondaryTemplates:[await m(n,i,o),await c(n,i,o)]}}export{y as getTemplates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as a}from"../../intl/messages.js";import{getFieldAndExpressionInfos as t,getContentFromFieldInfos as n}from"./support/utils.js";async function o(e){const{layer:a,renderer:t}=e;await a.load();const n=t||a.renderer;if("heatmap"!==n?.type)throw new r("heatmap-popup:invalid-parameters","renderer.type must be 'heatmap'");return{layer:a,renderer:n}}async function p(r){const[{renderer:p,layer:i},s]=await Promise.all([o(r),a("esri/smartMapping/t9n/smartMapping")]);if(!p.field)return null;const{fieldInfos:m}=await t({renderer:p,layer:i}),l=new e({content:await n(i,{fieldInfos:m}),fieldInfos:m});return{primaryTemplate:{name:"heatmap",title:s.heatmap,value:l},secondaryTemplates:[]}}export{p as getTemplates};
5
+ import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as a}from"../../intl/messages.js";import{getFieldAndExpressionInfos as t,getContentFromFieldInfos as n}from"./support/utils.js";async function o(e){const{layer:a,renderer:t}=e;await a.load();const n=t??("renderer"in a?a.renderer:void 0);if("heatmap"!==n?.type)throw new r("heatmap-popup:invalid-parameters","renderer.type must be 'heatmap'");return{layer:a,renderer:n}}async function i(r){const[{renderer:i,layer:p},s]=await Promise.all([o(r),a("esri/smartMapping/t9n/smartMapping")]);if(!i.field)return null;const{fieldInfos:m}=await t({renderer:i,layer:p}),l=new e({content:await n(p,{fieldInfos:m}),fieldInfos:m});return{primaryTemplate:{name:"heatmap",title:s.heatmap,value:l},secondaryTemplates:[]}}export{i as getTemplates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../PopupTemplate.js";import n from"../../core/Error.js";import{fetchMessageBundle as o}from"../../intl/messages.js";import{substitute as i}from"../../intl/substitute.js";import t from"../../popup/ExpressionInfo.js";import r from"../../popup/FieldInfo.js";import s from"../../popup/support/FieldInfoFormat.js";import{getFieldInfo as f}from"./support/utils.js";import{getArcadeForPredominantCategoryAlias as a,fieldNamesFromFieldInfos as p,getArcadeForPredominantCategoryValue as l,getArcadeForPredominanceMargin as d,getArcadeForStrengthOfPredominance as m,getArcadeForOrderedFields as I,getArcadeForSumOfFields as u}from"../statistics/support/predominanceUtils.js";function c(e,n){return e.legendOptions?.title??n.competingFields}function x(e,n){return{fieldInfo:new r({fieldName:"expression/predominant-category"}),expressionInfo:new t({name:"predominant-category",title:n.predominantCategory,expression:a(e)})}}function g(e,n){const o=p(e);return{fieldInfo:new r({fieldName:"expression/predominant-value",format:new s({digitSeparator:!0,places:1})}),expressionInfo:new t({name:"predominant-value",title:n.predominantCategoryValue,expression:l(o),returnType:"number"})}}function y(e,n){const o=p(e);return{fieldInfo:new r({fieldName:"expression/predominant-margin",format:new s({digitSeparator:!0,places:0})}),expressionInfo:new t({name:"predominant-margin",title:n.marginOfVictory,expression:d(o),returnType:"number"})}}function b(e,n){const o=p(e);return{fieldInfo:new r({fieldName:"expression/predominant-strength",format:new s({digitSeparator:!0,places:0})}),expressionInfo:new t({name:"predominant-strength",title:n.strengthOfPredominance,expression:m(o),returnType:"number"})}}function w(e,n){return{fieldInfo:new r({fieldName:"expression/predominant-categories-list"}),expressionInfo:new t({name:"predominant-categories-list",title:n.listOfCategories,expression:I(e)})}}function N(e,n){const o=p(e);return{fieldInfo:new r({fieldName:"expression/predominant-total",format:new s({digitSeparator:!0,places:0})}),expressionInfo:new t({name:"predominant-total",title:n.sumOfCategories,expression:u(o),returnType:"number"})}}function C(n,o){const t=x(n.fieldInfos,o),r=new e({expressionInfos:[t.expressionInfo],fieldInfos:[t.fieldInfo],content:i(o.predominantCategoryContent,{expression:`<b>{${t.fieldInfo.fieldName}}</b>`})});return{name:"predominant-category",title:o.predominantCategory,value:r}}function h(n,o){const{fieldInfos:t}=n,r=x(t,o),s=g(t,o),f=new e({expressionInfos:[s.expressionInfo,r.expressionInfo],fieldInfos:[s.fieldInfo,r.fieldInfo],content:i(o.predominantCategoryValueContent,{expression1:`<b>{${r.fieldInfo.fieldName}}</b>`,expression2:`<b>{${s.fieldInfo.fieldName}}</b>`})});return{name:"predominant-category-value",title:o.predominantCategoryValue,value:f}}function $(n,o){const{fieldInfos:t}=n,r=x(t,o),s=g(t,o),f=y(t,o),a=new e({expressionInfos:[s.expressionInfo,r.expressionInfo,f.expressionInfo],fieldInfos:[s.fieldInfo,r.fieldInfo,f.fieldInfo],title:i(o.mostCommon,{expression:"{expression/predominant-category}"}),content:i(o.predominantCategoryValueMarginContent,{expression1:`<b>{${r.fieldInfo.fieldName}}</b>`,expression2:`<b>{${s.fieldInfo.fieldName}}</b>`,expression3:`<b>{${f.fieldInfo.fieldName}}</b>`})});return{name:"predominant-category-value-margin",title:o.marginOfVictory,value:a}}function v(n,o){const{fieldInfos:t}=n,r=x(t,o),s=g(t,o),f=b(t,o),a=new e({expressionInfos:[s.expressionInfo,r.expressionInfo,f.expressionInfo],fieldInfos:[s.fieldInfo,r.fieldInfo,f.fieldInfo],content:i(o.predominantCategoryStrengthContent,{expression1:`{${s.fieldInfo.fieldName}}`,expression2:`<b>{${r.fieldInfo.fieldName}}</b>`,expression3:`<b>{${f.fieldInfo.fieldName}}%</b>`})});return{name:"predominant-category-strength",title:o.strengthOfPredominance,value:a}}function j(n,o){const{renderer:t,fieldInfos:r}=n,s=x(r,o),f=g(r,o),a=b(r,o),p=w(r,o),l=new e({expressionInfos:[s.expressionInfo,f.expressionInfo,a.expressionInfo,p.expressionInfo],fieldInfos:[s.fieldInfo,f.fieldInfo,a.fieldInfo,p.fieldInfo],title:c(t,o),content:[{type:"text",text:i(o.predominantCategoryStrengthContent,{expression1:`{${f.fieldInfo.fieldName}}`,expression2:`<b>{${s.fieldInfo.fieldName}}</b>`,expression3:`<b>{${a.fieldInfo.fieldName}}%</b>`})},{type:"text",text:`{${p.fieldInfo.fieldName}}`}]});return{name:"predominant-categories-list",title:o.orderedListOfValues,value:l}}function S(n,o){const{fieldInfos:t}=n,r=x(t,o),s=g(t,o),f=b(t,o),a=N(t,o),p=new e({expressionInfos:[s.expressionInfo,r.expressionInfo,a.expressionInfo,f.expressionInfo],fieldInfos:[s.fieldInfo,r.fieldInfo,a.fieldInfo,f.fieldInfo],content:i(o.predominantCategoryTotalStrengthContent,{expression1:`{${s.fieldInfo.fieldName}}`,expression2:`<b>{${r.fieldInfo.fieldName}}</b>`,expression3:`<b>{${f.fieldInfo.fieldName}}%</b>`,expression4:`{${a.fieldInfo.fieldName}}`})});return{name:"predominant-category-total-strength",title:o.predominantCategoryWithTotalAndStrength,value:p}}function T(n,o){const{renderer:t,fieldInfos:r}=n,s=x(r,o),f=g(r,o),a=b(r,o),p=new e({expressionInfos:[f.expressionInfo,s.expressionInfo,a.expressionInfo],fieldInfos:[f.fieldInfo,s.fieldInfo,a.fieldInfo],title:c(t,o),content:[{type:"text",text:i(o.predominantCategoryStrengthContent,{expression1:`{${f.fieldInfo.fieldName}}`,expression2:`<b>{${s.fieldInfo.fieldName}}</b>`,expression3:`<b>{${a.fieldInfo.fieldName}}%</b>`})},{type:"media",mediaInfos:{type:"pie-chart",value:{fields:r.map((e=>e.fieldName))}}}]});return{name:"predominant-category-chart",title:o.predominantCategoryWithChart,value:p}}function O(e,o){const i=e.authoringInfo,t="predominance"===i?.type?i.fields:[];if(!t?.length)throw new n("predominance-popup:insufficient-info","unable to find input fields in authoringInfo");return t.map((e=>f(o,e)))}async function V(e){const{layer:o,renderer:i}=e;await o.load();const t=i||o.renderer;if("unique-value"!==t?.type)throw new n("predominance-popup:invalid-parameters","renderer.type must be 'unique-value'");return{renderer:t,fieldInfos:O(t,o)}}async function M(e){const[n,i]=await Promise.all([V(e),o("esri/smartMapping/t9n/smartMapping")]);return[C(n,i),h(n,i),$(n,i),S(n,i),j(n,i),v(n,i),T(n,i)]}async function P(e){const[n,i]=await Promise.all([V(e),o("esri/smartMapping/t9n/smartMapping")]),t=j(n,i),r=await M(e);return{primaryTemplate:t,secondaryTemplates:r.filter((e=>e.name!==t.name))}}export{M as getAllTemplates,P as getTemplates};
5
+ import e from"../../PopupTemplate.js";import n from"../../core/Error.js";import{fetchMessageBundle as o}from"../../intl/messages.js";import{substitute as i}from"../../intl/substitute.js";import t from"../../popup/ExpressionInfo.js";import r from"../../popup/FieldInfo.js";import s from"../../popup/support/FieldInfoFormat.js";import{getFieldInfo as f}from"./support/utils.js";import{getArcadeForPredominantCategoryAlias as a,fieldNamesFromFieldInfos as p,getArcadeForPredominantCategoryValue as l,getArcadeForPredominanceMargin as d,getArcadeForStrengthOfPredominance as m,getArcadeForOrderedFields as I,getArcadeForSumOfFields as u}from"../statistics/support/predominanceUtils.js";function c(e,n){return e.legendOptions?.title??n.competingFields}function x(e,n){return{fieldInfo:new r({fieldName:"expression/predominant-category"}),expressionInfo:new t({name:"predominant-category",title:n.predominantCategory,expression:a(e)})}}function g(e,n){const o=p(e);return{fieldInfo:new r({fieldName:"expression/predominant-value",format:new s({digitSeparator:!0,places:1})}),expressionInfo:new t({name:"predominant-value",title:n.predominantCategoryValue,expression:l(o),returnType:"number"})}}function y(e,n){const o=p(e);return{fieldInfo:new r({fieldName:"expression/predominant-margin",format:new s({digitSeparator:!0,places:0})}),expressionInfo:new t({name:"predominant-margin",title:n.marginOfVictory,expression:d(o),returnType:"number"})}}function b(e,n){const o=p(e);return{fieldInfo:new r({fieldName:"expression/predominant-strength",format:new s({digitSeparator:!0,places:0})}),expressionInfo:new t({name:"predominant-strength",title:n.strengthOfPredominance,expression:m(o),returnType:"number"})}}function w(e,n){return{fieldInfo:new r({fieldName:"expression/predominant-categories-list"}),expressionInfo:new t({name:"predominant-categories-list",title:n.listOfCategories,expression:I(e)})}}function N(e,n){const o=p(e);return{fieldInfo:new r({fieldName:"expression/predominant-total",format:new s({digitSeparator:!0,places:0})}),expressionInfo:new t({name:"predominant-total",title:n.sumOfCategories,expression:u(o),returnType:"number"})}}function C(n,o){const t=x(n.fieldInfos,o),r=new e({expressionInfos:[t.expressionInfo],fieldInfos:[t.fieldInfo],content:i(o.predominantCategoryContent,{expression:`<b>{${t.fieldInfo.fieldName}}</b>`})});return{name:"predominant-category",title:o.predominantCategory,value:r}}function h(n,o){const{fieldInfos:t}=n,r=x(t,o),s=g(t,o),f=new e({expressionInfos:[s.expressionInfo,r.expressionInfo],fieldInfos:[s.fieldInfo,r.fieldInfo],content:i(o.predominantCategoryValueContent,{expression1:`<b>{${r.fieldInfo.fieldName}}</b>`,expression2:`<b>{${s.fieldInfo.fieldName}}</b>`})});return{name:"predominant-category-value",title:o.predominantCategoryValue,value:f}}function $(n,o){const{fieldInfos:t}=n,r=x(t,o),s=g(t,o),f=y(t,o),a=new e({expressionInfos:[s.expressionInfo,r.expressionInfo,f.expressionInfo],fieldInfos:[s.fieldInfo,r.fieldInfo,f.fieldInfo],title:i(o.mostCommon,{expression:"{expression/predominant-category}"}),content:i(o.predominantCategoryValueMarginContent,{expression1:`<b>{${r.fieldInfo.fieldName}}</b>`,expression2:`<b>{${s.fieldInfo.fieldName}}</b>`,expression3:`<b>{${f.fieldInfo.fieldName}}</b>`})});return{name:"predominant-category-value-margin",title:o.marginOfVictory,value:a}}function v(n,o){const{fieldInfos:t}=n,r=x(t,o),s=g(t,o),f=b(t,o),a=new e({expressionInfos:[s.expressionInfo,r.expressionInfo,f.expressionInfo],fieldInfos:[s.fieldInfo,r.fieldInfo,f.fieldInfo],content:i(o.predominantCategoryStrengthContent,{expression1:`{${s.fieldInfo.fieldName}}`,expression2:`<b>{${r.fieldInfo.fieldName}}</b>`,expression3:`<b>{${f.fieldInfo.fieldName}}%</b>`})});return{name:"predominant-category-strength",title:o.strengthOfPredominance,value:a}}function j(n,o){const{renderer:t,fieldInfos:r}=n,s=x(r,o),f=g(r,o),a=b(r,o),p=w(r,o),l=new e({expressionInfos:[s.expressionInfo,f.expressionInfo,a.expressionInfo,p.expressionInfo],fieldInfos:[s.fieldInfo,f.fieldInfo,a.fieldInfo,p.fieldInfo],title:c(t,o),content:[{type:"text",text:i(o.predominantCategoryStrengthContent,{expression1:`{${f.fieldInfo.fieldName}}`,expression2:`<b>{${s.fieldInfo.fieldName}}</b>`,expression3:`<b>{${a.fieldInfo.fieldName}}%</b>`})},{type:"text",text:`{${p.fieldInfo.fieldName}}`}]});return{name:"predominant-categories-list",title:o.orderedListOfValues,value:l}}function S(n,o){const{fieldInfos:t}=n,r=x(t,o),s=g(t,o),f=b(t,o),a=N(t,o),p=new e({expressionInfos:[s.expressionInfo,r.expressionInfo,a.expressionInfo,f.expressionInfo],fieldInfos:[s.fieldInfo,r.fieldInfo,a.fieldInfo,f.fieldInfo],content:i(o.predominantCategoryTotalStrengthContent,{expression1:`{${s.fieldInfo.fieldName}}`,expression2:`<b>{${r.fieldInfo.fieldName}}</b>`,expression3:`<b>{${f.fieldInfo.fieldName}}%</b>`,expression4:`{${a.fieldInfo.fieldName}}`})});return{name:"predominant-category-total-strength",title:o.predominantCategoryWithTotalAndStrength,value:p}}function T(n,o){const{renderer:t,fieldInfos:r}=n,s=x(r,o),f=g(r,o),a=b(r,o),p=new e({expressionInfos:[f.expressionInfo,s.expressionInfo,a.expressionInfo],fieldInfos:[f.fieldInfo,s.fieldInfo,a.fieldInfo],title:c(t,o),content:[{type:"text",text:i(o.predominantCategoryStrengthContent,{expression1:`{${f.fieldInfo.fieldName}}`,expression2:`<b>{${s.fieldInfo.fieldName}}</b>`,expression3:`<b>{${a.fieldInfo.fieldName}}%</b>`})},{type:"media",mediaInfos:{type:"pie-chart",value:{fields:r.map((e=>e.fieldName))}}}]});return{name:"predominant-category-chart",title:o.predominantCategoryWithChart,value:p}}function O(e,o){const i=e.authoringInfo,t="predominance"===i?.type?i.fields:[];if(!t?.length)throw new n("predominance-popup:insufficient-info","unable to find input fields in authoringInfo");return t.map((e=>f(o,e)))}async function V(e){const{layer:o,renderer:i}=e;await o.load();const t=i??("renderer"in o?o.renderer:void 0);if("unique-value"!==t?.type)throw new n("predominance-popup:invalid-parameters","renderer.type must be 'unique-value'");return{renderer:t,fieldInfos:O(t,o)}}async function M(e){const[n,i]=await Promise.all([V(e),o("esri/smartMapping/t9n/smartMapping")]);return[C(n,i),h(n,i),$(n,i),S(n,i),j(n,i),v(n,i),T(n,i)]}async function P(e){const[n,i]=await Promise.all([V(e),o("esri/smartMapping/t9n/smartMapping")]),t=j(n,i),r=await M(e);return{primaryTemplate:t,secondaryTemplates:r.filter((e=>e.name!==t.name))}}export{M as getAllTemplates,P as getTemplates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as i}from"../../intl/messages.js";import{getFieldAndExpressionInfos as n,getContentFromFieldInfos as t}from"./support/utils.js";async function o(e){const{layer:i,renderer:n}=e;await i.load();const t=n||i.renderer;if("unique-value"!==t?.type)throw new r("relationship-popup:invalid-parameters","renderer.type must be 'unique-value'");const o=t.authoringInfo;if(!o||"relationship"!==o.type)throw new r("relationship-popup:invalid-parameters","renderer.authoringInfo.type must be 'relationship'");if(!o.field1?.field||!o.field2?.field)throw new r("relationship-popup:invalid-parameters","'field1' and/or 'field2' properties are missing in renderer.authoringInfo");return{layer:i,renderer:t}}async function a(r,i,o="divide"){const{fieldInfos:a,expressionInfos:s}=await n({renderer:r,layer:i,normFieldExpressionTemplate:o});return new e({content:await t(i,{fieldInfos:a,expressionInfos:s}),fieldInfos:a,expressionInfos:s})}function s(e){const r=e.authoringInfo;return!(!r?.field1?.normalizationField&&!r?.field2?.normalizationField)}async function p(e){const[{renderer:r,layer:n},t]=await Promise.all([o(e),i("esri/smartMapping/t9n/smartMapping")]),p={name:"relationship",title:t.relationshipPopupTitle,value:await a(r,n)},l=[];return s(r)&&l.push({name:"relationship-percent",title:t.relationshipNormFieldAsPercent,value:await a(r,n,"percentage")}),{primaryTemplate:p,secondaryTemplates:l}}export{p as getTemplates};
5
+ import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as i}from"../../intl/messages.js";import{getFieldAndExpressionInfos as n,getContentFromFieldInfos as t}from"./support/utils.js";async function o(e){const{layer:i,renderer:n}=e;await i.load();const t=n??("renderer"in i?i.renderer:void 0);if("unique-value"!==t?.type)throw new r("relationship-popup:invalid-parameters","renderer.type must be 'unique-value'");const o=t.authoringInfo;if(!o||"relationship"!==o.type)throw new r("relationship-popup:invalid-parameters","renderer.authoringInfo.type must be 'relationship'");if(!o.field1?.field||!o.field2?.field)throw new r("relationship-popup:invalid-parameters","'field1' and/or 'field2' properties are missing in renderer.authoringInfo");return{layer:i,renderer:t}}async function a(r,i,o="divide"){const{fieldInfos:a,expressionInfos:s}=await n({renderer:r,layer:i,normFieldExpressionTemplate:o});return new e({content:await t(i,{fieldInfos:a,expressionInfos:s}),fieldInfos:a,expressionInfos:s})}function s(e){const r=e.authoringInfo;return!(!r?.field1?.normalizationField&&!r?.field2?.normalizationField)}async function p(e){const[{renderer:r,layer:n},t]=await Promise.all([o(e),i("esri/smartMapping/t9n/smartMapping")]),p={name:"relationship",title:t.relationshipPopupTitle,value:await a(r,n)},l=[];return s(r)&&l.push({name:"relationship-percent",title:t.relationshipNormFieldAsPercent,value:await a(r,n,"percentage")}),{primaryTemplate:p,secondaryTemplates:l}}export{p as getTemplates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as s}from"../../intl/messages.js";import{getPrimaryVisualVariables as t,hasNormalizedField as n,getFieldAndExpressionInfos as i,getContentFromFieldInfos as p}from"./support/utils.js";import{createPopupTemplate as a}from"../../support/popupUtils.js";async function o(e){const{layer:s,renderer:t}=e;await s.load();const n=t||s.renderer;if("simple"!==n?.type)throw new r("simple-popup:invalid-parameters","renderer.type must be 'simple'");return{layer:s,renderer:n}}async function l(r,s,t="divide"){const{fieldInfos:n,expressionInfos:a}=await i({renderer:r,layer:s,normFieldExpressionTemplate:t});return new e({content:await p(s,{fieldInfos:n,expressionInfos:a}),expressionInfos:a,fieldInfos:n})}async function m(e){const[{renderer:r,layer:i},p]=await Promise.all([o(e),s("esri/smartMapping/t9n/smartMapping")]),m=[];if(!t(r).length){const e=a(i);return e?{primaryTemplate:{name:"simple",title:p.simple,value:e},secondaryTemplates:m}:null}const c={name:"simple",title:p.simple,value:await l(r,i)};return n(r)&&m.push({name:"simple-percent",title:p.simpleNormFieldAsPercent,value:await l(r,i,"percentage")}),{primaryTemplate:c,secondaryTemplates:m}}export{m as getTemplates};
5
+ import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as n}from"../../intl/messages.js";import{getPrimaryVisualVariables as s,hasNormalizedField as t,getFieldAndExpressionInfos as i,getContentFromFieldInfos as p}from"./support/utils.js";import{createPopupTemplate as a}from"../../support/popupUtils.js";async function o(e){const{layer:n,renderer:s}=e;await n.load();const t=s??("renderer"in n?n.renderer:void 0);if("simple"!==t?.type)throw new r("simple-popup:invalid-parameters","renderer.type must be 'simple'");return{layer:n,renderer:t}}async function l(r,n,s="divide"){const{fieldInfos:t,expressionInfos:a}=await i({renderer:r,layer:n,normFieldExpressionTemplate:s});return new e({content:await p(n,{fieldInfos:t,expressionInfos:a}),expressionInfos:a,fieldInfos:t})}async function m(e){const[{renderer:r,layer:i},p]=await Promise.all([o(e),n("esri/smartMapping/t9n/smartMapping")]),m=[];if(!s(r).length){const e=a(i);return e?{primaryTemplate:{name:"simple",title:p.simple,value:e},secondaryTemplates:m}:null}const c={name:"simple",title:p.simple,value:await l(r,i)};return t(r)&&m.push({name:"simple-percent",title:p.simpleNormFieldAsPercent,value:await l(r,i,"percentage")}),{primaryTemplate:c,secondaryTemplates:m}}export{m as getTemplates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{unique as e}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{fetchMessageBundle as t}from"../../../intl/messages.js";import{substitute as n}from"../../../intl/substitute.js";import{numericTypes as i}from"../../../layers/support/fieldUtils.js";import"../../../popup/content/AttachmentsContent.js";import"../../../popup/content/Content.js";import"../../../popup/content/CustomContent.js";import"../../../popup/content/ExpressionContent.js";import o from"../../../popup/content/FieldsContent.js";import"../../../popup/content/MediaContent.js";import"../../../popup/content/RelationshipContent.js";import s from"../../../popup/content/TextContent.js";import"../../../popup/content/UtilityNetworkAssociationsContent.js";import r from"../../../popup/ExpressionInfo.js";import p from"../../../popup/FieldInfo.js";import a from"../../../popup/support/FieldInfoFormat.js";import{getAttributes as l}from"../../../renderers/support/utils.js";import{viewScaleRE as u}from"../../../renderers/visualVariables/support/visualVariableUtils.js";import{getFeatureReductionFields as m}from"../../support/adapters/support/utils.js";let f=0;function d(e=0){}const c="expression/";function b(e){return"hasVisualVariables"in e&&e.hasVisualVariables()?e.visualVariables.filter((e=>!u.test(e.valueExpression)&&(!("target"in e)||"outline"!==e.target))):[]}function x(e,t){if(!t)return null;const n=m(e);return n?.find((e=>e.name.toLowerCase()===t.toLowerCase()))}function j(e,t,n){let o=null;if(n){const t=e.featureReduction;t&&"popupTemplate"in t&&t.popupTemplate&&(o=t.popupTemplate.fieldInfos)}else"popupTemplate"in e&&e.popupTemplate&&(o=e.popupTemplate.fieldInfos);const s=n?x(e,t):e.getField(t);let r=null;if(o&&o.some((e=>!(!e||e.fieldName?.toLowerCase()!==s?.name.toLowerCase())&&(r=e.clone(),!0))),!r){const e=i.includes(s.type),t="integer"===s.type||"small-integer"===s.type;r=new p({fieldName:s.name,isEditable:s.editable,visible:!0,format:e?new a({places:t?0:2,digitSeparator:!0}):void 0})}return r.label||(r.label=s.alias),r}function F(e){const{expression:t,title:n,returnType:i}=e;return new r({name:"expr"+f++,expression:t,title:n,returnType:i})}function g(e){const t="number"===e.returnType?new a({places:2,digitSeparator:!0}):void 0;return new p({fieldName:`${c}${e.name}`,visible:!0,format:t})}async function y(i){const o=await t("esri/smartMapping/t9n/smartMapping"),{renderer:s,layer:r,normFieldExpressionTemplate:p,isFeatureReduction:a}=i,u=[],m=[],f=l(s,b);for(const e of f)if("field"===e.type)u.push(j(r,e.field,a));else if("normalized-field"===e.type){const t=a?x(r,e.field):r.getField(e.field),i=a?x(r,e.normalizationField):r.getField(e.normalizationField),s=F({type:"expression",expression:`\n $feature["${t.name}"];\n $feature["${i.name}"];\n ${"percentage"===p?`($feature["${t.name}"] / $feature["${i.name}"]) * 100;`:`$feature["${t.name}"] / $feature["${i.name}"];`}\n `,title:n("percentage"===p?o.normFieldLabelAsPercent:o.normFieldLabel,{expression1:t.alias,expression2:i.alias}),returnType:"number"});u.push(g(s),j(r,e.field,a),j(r,e.normalizationField,a)),m.push(s)}else if("expression"===e.type){const t=F(e);u.push(g(t)),m.push(t)}return{fieldInfos:e(u,((e,t)=>e.fieldName===t.fieldName)),expressionInfos:e(m,((e,t)=>e.expression===t.expression))}}async function $(e,i,r){const{fieldInfos:p,expressionInfos:a}=i,l=await t("esri/smartMapping/t9n/smartMapping");if(p.length>2)return[new o({fieldInfos:p})];const u=[];for(const t of p){const i=t.fieldName||"";let o=t.label;if(!o){const t=r?x(e,i):e.getField(i);if(t)o=t.alias||i;else if(a){const e=i.split(c)[1],t=a[a.findIndex((t=>t.name===e))];t&&(o=t.title||t.name)}}u.push(new s({text:n(l.fieldInfo,{fieldLabel:o,fieldValue:`{${i}}`})}))}return u}function h(e){return!(!("normalizationField"in e)||!e.normalizationField)||"hasVisualVariables"in e&&e.hasVisualVariables()&&e.visualVariables.some((e=>!(!("normalizationField"in e)||!e.normalizationField)))}export{c as expressionFieldPrefix,$ as getContentFromFieldInfos,F as getExpressionInfo,y as getFieldAndExpressionInfos,j as getFieldInfo,g as getFieldInfoFromExpressionInfo,b as getPrimaryVisualVariables,h as hasNormalizedField,d as resetSuffixForTests};
5
+ import{unique as e}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{fetchMessageBundle as t}from"../../../intl/messages.js";import{substitute as n}from"../../../intl/substitute.js";import{numericTypes as i}from"../../../layers/support/fieldUtils.js";import"../../../popup/content/AttachmentsContent.js";import"../../../popup/content/Content.js";import"../../../popup/content/CustomContent.js";import"../../../popup/content/ExpressionContent.js";import o from"../../../popup/content/FieldsContent.js";import"../../../popup/content/MediaContent.js";import"../../../popup/content/RelationshipContent.js";import s from"../../../popup/content/TextContent.js";import"../../../popup/content/UtilityNetworkAssociationsContent.js";import r from"../../../popup/ExpressionInfo.js";import p from"../../../popup/FieldInfo.js";import a from"../../../popup/support/FieldInfoFormat.js";import{getAttributes as l}from"../../../renderers/support/utils.js";import{viewScaleRE as u}from"../../../renderers/visualVariables/support/visualVariableUtils.js";import{getFeatureReductionFields as m}from"../../support/adapters/support/utils.js";let f=0;function d(e=0){}const c="expression/";function b(e){return"hasVisualVariables"in e&&e.hasVisualVariables()?e.visualVariables.filter((e=>!u.test(e.valueExpression)&&(!("target"in e)||"outline"!==e.target))):[]}function x(e,t){if(!t)return null;const n=m(e);return n?.find((e=>e.name.toLowerCase()===t.toLowerCase()))}function j(e,t,n){let o=null;if(n&&"featureReduction"in e){const t=e.featureReduction;t&&"popupTemplate"in t&&t.popupTemplate&&(o=t.popupTemplate.fieldInfos)}else"popupTemplate"in e&&e.popupTemplate&&(o=e.popupTemplate.fieldInfos);const s=n?x(e,t):e.getField(t);let r=null;if(o&&o.some((e=>!(!e||e.fieldName?.toLowerCase()!==s?.name.toLowerCase())&&(r=e.clone(),!0))),!r){const e=i.includes(s.type),t="integer"===s.type||"small-integer"===s.type;r=new p({fieldName:s.name,isEditable:s.editable,visible:!0,format:e?new a({places:t?0:2,digitSeparator:!0}):void 0})}return r.label||(r.label=s.alias),r}function F(e){const{expression:t,title:n,returnType:i}=e;return new r({name:"expr"+f++,expression:t,title:n,returnType:i})}function g(e){const t="number"===e.returnType?new a({places:2,digitSeparator:!0}):void 0;return new p({fieldName:`${c}${e.name}`,visible:!0,format:t})}async function y(i){const o=await t("esri/smartMapping/t9n/smartMapping"),{renderer:s,layer:r,normFieldExpressionTemplate:p,isFeatureReduction:a}=i,u=[],m=[],f=l(s,b);for(const e of f)if("field"===e.type)u.push(j(r,e.field,a));else if("normalized-field"===e.type){const t=a?x(r,e.field):r.getField(e.field),i=a?x(r,e.normalizationField):r.getField(e.normalizationField),s=F({type:"expression",expression:`\n $feature["${t.name}"];\n $feature["${i.name}"];\n ${"percentage"===p?`($feature["${t.name}"] / $feature["${i.name}"]) * 100;`:`$feature["${t.name}"] / $feature["${i.name}"];`}\n `,title:n("percentage"===p?o.normFieldLabelAsPercent:o.normFieldLabel,{expression1:t.alias,expression2:i.alias}),returnType:"number"});u.push(g(s),j(r,e.field,a),j(r,e.normalizationField,a)),m.push(s)}else if("expression"===e.type){const t=F(e);u.push(g(t)),m.push(t)}return{fieldInfos:e(u,((e,t)=>e.fieldName===t.fieldName)),expressionInfos:e(m,((e,t)=>e.expression===t.expression))}}async function $(e,i,r){const{fieldInfos:p,expressionInfos:a}=i,l=await t("esri/smartMapping/t9n/smartMapping");if(p.length>2)return[new o({fieldInfos:p})];const u=[];for(const t of p){const i=t.fieldName||"";let o=t.label;if(!o){const t=r?x(e,i):e.getField(i);if(t)o=t.alias||i;else if(a){const e=i.split(c)[1],t=a[a.findIndex((t=>t.name===e))];t&&(o=t.title||t.name)}}u.push(new s({text:n(l.fieldInfo,{fieldLabel:o,fieldValue:`{${i}}`})}))}return u}function h(e){return!(!("normalizationField"in e)||!e.normalizationField)||"hasVisualVariables"in e&&e.hasVisualVariables()&&e.visualVariables.some((e=>!(!("normalizationField"in e)||!e.normalizationField)))}export{c as expressionFieldPrefix,$ as getContentFromFieldInfos,F as getExpressionInfo,y as getFieldAndExpressionInfos,j as getFieldInfo,g as getFieldInfoFromExpressionInfo,b as getPrimaryVisualVariables,h as hasNormalizedField,d as resetSuffixForTests};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{getTemplates as r}from"./classBreaks.js";import{getTemplates as t}from"./dotDensity.js";import{getTemplates as a}from"./heatmap.js";import{getTemplates as n}from"./predominance.js";import{getTemplates as s}from"./relationship.js";import{getTemplates as o}from"./simple.js";import{getTemplates as i}from"./uniqueValues.js";function p(r){const{layer:t}=r,a=r.renderer||t.renderer;if(!a)throw new e("getTemplates:invalid-parameters","'renderer' or 'layer.renderer' must be provided");return{layer:t,renderer:a}}async function l(e){const{renderer:l,layer:m}=p(e);if(!l)return null;if("simple"===l.type)return o({renderer:l,layer:m});if("class-breaks"===l.type)return r({renderer:l,layer:m});if("dot-density"===l.type)return t({renderer:l,layer:m});if("heatmap"===l.type)return a({renderer:l,layer:m});if("unique-value"===l.type){const e=l.authoringInfo?.type;return"predominance"===e?n({renderer:l,layer:m}):"relationship"===e?s({renderer:l,layer:m}):i({renderer:l,layer:m})}return null}export{l as getTemplates};
5
+ import e from"../../core/Error.js";import{getTemplates as r}from"./classBreaks.js";import{getTemplates as t}from"./dotDensity.js";import{getTemplates as n}from"./heatmap.js";import{getTemplates as a}from"./predominance.js";import{getTemplates as s}from"./relationship.js";import{getTemplates as o}from"./simple.js";import{getTemplates as i}from"./uniqueValues.js";function p(r){const{layer:t}=r,n=r.renderer??("renderer"in t?t.renderer:void 0);if(!n)throw new e("getTemplates:invalid-parameters","'renderer' or 'layer.renderer' must be provided");return{layer:t,renderer:n}}async function l(e){const{renderer:l,layer:m}=p(e);if(!l)return null;if("simple"===l.type)return o({renderer:l,layer:m});if("class-breaks"===l.type)return r({renderer:l,layer:m});if("dot-density"===l.type)return t({renderer:l,layer:m});if("heatmap"===l.type)return n({renderer:l,layer:m});if("unique-value"===l.type){const e=l.authoringInfo?.type;return"predominance"===e?a({renderer:l,layer:m}):"relationship"===e?s({renderer:l,layer:m}):i({renderer:l,layer:m})}return null}export{l as getTemplates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as n}from"../../intl/messages.js";import{hasNormalizedField as a,getFieldAndExpressionInfos as s,getContentFromFieldInfos as t}from"./support/utils.js";async function i(e){const{layer:n,renderer:a}=e;await n.load();const s=a||n.renderer;if("unique-value"!==s?.type)throw new r("unique-values-popup:invalid-parameters","renderer.type must be 'unique-value'");return{layer:n,renderer:s}}async function o(r,n,a="divide"){const{fieldInfos:i,expressionInfos:o}=await s({renderer:r,layer:n,normFieldExpressionTemplate:a});return new e({content:await t(n,{fieldInfos:i,expressionInfos:o}),fieldInfos:i,expressionInfos:o})}async function u(e){const[{renderer:r,layer:s},t]=await Promise.all([i(e),n("esri/smartMapping/t9n/smartMapping")]),u={name:"unique-values",title:t.uniqueValues,value:await o(r,s)},p=[];return a(r)&&p.push({name:"unique-values-percent",title:t.uniqueValuesNormFieldAsPercent,value:await o(r,s,"percentage")}),{primaryTemplate:u,secondaryTemplates:p}}export{u as getTemplates};
5
+ import e from"../../PopupTemplate.js";import r from"../../core/Error.js";import{fetchMessageBundle as n}from"../../intl/messages.js";import{hasNormalizedField as a,getFieldAndExpressionInfos as i,getContentFromFieldInfos as s}from"./support/utils.js";async function t(e){const{layer:n,renderer:a}=e;await n.load();const i=a??("renderer"in n?n.renderer:void 0);if("unique-value"!==i?.type)throw new r("unique-values-popup:invalid-parameters","renderer.type must be 'unique-value'");return{layer:n,renderer:i}}async function o(r,n,a="divide"){const{fieldInfos:t,expressionInfos:o}=await i({renderer:r,layer:n,normFieldExpressionTemplate:a});return new e({content:await s(n,{fieldInfos:t,expressionInfos:o}),fieldInfos:t,expressionInfos:o})}async function u(e){const[{renderer:r,layer:i},s]=await Promise.all([t(e),n("esri/smartMapping/t9n/smartMapping")]),u={name:"unique-values",title:s.uniqueValues,value:await o(r,i)},p=[];return a(r)&&p.push({name:"unique-values-percent",title:s.uniqueValuesNormFieldAsPercent,value:await o(r,i,"percentage")}),{primaryTemplate:u,secondaryTemplates:p}}export{u as getTemplates};