@arcgis/core 5.0.0-next.65 → 5.0.0-next.67

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 (315) hide show
  1. package/Ground.d.ts +4 -4
  2. package/Map.d.ts +1 -1
  3. package/WebDocument2D.d.ts +2 -3
  4. package/WebScene.d.ts +2 -3
  5. package/applications/Components/QuantityFormatter.d.ts +14 -1
  6. package/applications/Components/SelectionOperation.d.ts +45 -9
  7. package/applications/Components/SketchTooltipControls.d.ts +31 -6
  8. package/applications/Components/actionUtils.d.ts +1 -0
  9. package/applications/Components/analysisUtils.d.ts +98 -26
  10. package/applications/Components/arcadeEditorUtils.d.ts +3 -0
  11. package/applications/Components/arcadeFeatureUtils.d.ts +34 -6
  12. package/applications/Components/baUtils.d.ts +8 -8
  13. package/applications/Components/basemapUtils.d.ts +2 -0
  14. package/applications/Components/drawUtils.d.ts +6 -1
  15. package/applications/Components/featureUtils.d.ts +9 -0
  16. package/applications/Components/fontUtils.d.ts +2 -0
  17. package/applications/Components/formatUtils.d.ts +2 -0
  18. package/applications/Components/getDefaultUnits.d.ts +2 -0
  19. package/applications/Components/imageryUtils.d.ts +135 -27
  20. package/applications/Components/layerOriginUtils.d.ts +5 -0
  21. package/applications/Components/layersEffectsJsonUtils.d.ts +2 -0
  22. package/applications/Components/previewSymbol2D.d.ts +2 -0
  23. package/applications/Components/reactiveUtils.d.ts +13 -9
  24. package/applications/Components/sanitizerUtils.d.ts +2 -0
  25. package/applications/Components/stringUtils.d.ts +5 -0
  26. package/applications/Components/styleUtils.d.ts +2 -0
  27. package/applications/Components/svgUtils.d.ts +4 -0
  28. package/applications/Components/testUtils.d.ts +3 -0
  29. package/applications/Components/viewUtils.d.ts +2 -0
  30. package/applications/Components/webStyleSymbolUtils.d.ts +2 -0
  31. package/applications/Excalibur/videoViewUtils.d.ts +19 -3
  32. package/applications/ExperienceBuilder/sketchUtils.d.ts +10 -1
  33. package/applications/KnowledgeStudio/dataModelVisualization.d.ts +2 -0
  34. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +33 -4
  35. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +73 -10
  36. package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +12 -1
  37. package/applications/KnowledgeStudio/reshape.d.ts +144 -28
  38. package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +17 -3
  39. package/applications/MapViewer/layerUtils.d.ts +2 -0
  40. package/applications/MapViewer/mediaUtils.d.ts +42 -8
  41. package/applications/MapViewer/templateUtils.d.ts +78 -16
  42. package/applications/PortalApp/layerUtils.d.ts +2 -0
  43. package/applications/SceneViewer/colorUtils.d.ts +2 -0
  44. package/applications/SceneViewer/devEnvironmentUtils.d.ts +3 -0
  45. package/applications/SceneViewer/layerUtils.d.ts +5 -3
  46. package/applications/SceneViewer/sceneViewerUtils.d.ts +52 -5
  47. package/applications/SceneViewer/symbolUtils.d.ts +2 -0
  48. package/applications/Urban/LineImagePattern3D.d.ts +8 -2
  49. package/applications/Urban/imagePatternUtils.d.ts +10 -2
  50. package/applications/Urban/meshUtils.d.ts +2 -0
  51. package/applications/WebEditor/sketchUtils.d.ts +24 -4
  52. package/assets/components/assets/icon/fileEsl16.json +1 -0
  53. package/assets/components/assets/icon/fileEsl24.json +1 -0
  54. package/assets/components/assets/icon/fileEsl32.json +1 -0
  55. package/assets/esri/core/workers/RemoteClient.js +1 -1
  56. package/assets/esri/core/workers/chunks/04958494022f82dca473.js +1 -0
  57. package/assets/esri/core/workers/chunks/{22dd5cecc7e2d4d0baf8.js → 055fdc5134d54174444d.js} +2 -2
  58. package/assets/esri/core/workers/chunks/0629087bd5bb8048493e.js +1 -0
  59. package/assets/esri/core/workers/chunks/{ee186ddbb1eb5144a790.js → 08359ae020238a565955.js} +1 -1
  60. package/assets/esri/core/workers/chunks/0b7bbdc0d71ee6721751.js +2 -0
  61. package/assets/esri/core/workers/chunks/{5909a0e763fddc3542e7.js.LICENSE.txt → 0b7bbdc0d71ee6721751.js.LICENSE.txt} +1 -1
  62. package/assets/esri/core/workers/chunks/0cd3acfbf9ee991bdab4.js +1 -0
  63. package/assets/esri/core/workers/chunks/0f8149fdcf0adeca268e.js +1 -0
  64. package/assets/esri/core/workers/chunks/{aa7a1705266eec353cb6.js → 0fc22ad791d3ec0a9c5e.js} +1 -1
  65. package/assets/esri/core/workers/chunks/119822a646834c1cebc0.js +1 -0
  66. package/assets/esri/core/workers/chunks/1a6d2f525dd30d08cf9b.js +1 -0
  67. package/assets/esri/core/workers/chunks/204d738c8b651314ae64.js +1 -0
  68. package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js → 25f3ee666f545a7a7993.js} +2 -2
  69. package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js.LICENSE.txt → 25f3ee666f545a7a7993.js.LICENSE.txt} +1 -1
  70. package/assets/esri/core/workers/chunks/36ecf951c0c7dad84b69.js +1 -0
  71. package/assets/esri/core/workers/chunks/37002a46f03a9fc5f644.js.LICENSE.txt +1 -1
  72. package/assets/esri/core/workers/chunks/43e2c1d72cd9c8beed2f.js.LICENSE.txt +1 -1
  73. package/assets/esri/core/workers/chunks/45a9cd722e98dd1548ae.js +1 -0
  74. package/assets/esri/core/workers/chunks/4773a358832f87963766.js +1 -0
  75. package/assets/esri/core/workers/chunks/492515860198f38dd698.js +1 -0
  76. package/assets/esri/core/workers/chunks/4f6f181ee83b4d484518.js +1 -0
  77. package/assets/esri/core/workers/chunks/59a45533e96cedf1c480.js +1 -0
  78. package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js → 5b9f2aa3ba1bf12c3240.js} +2 -2
  79. package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js.LICENSE.txt → 5b9f2aa3ba1bf12c3240.js.LICENSE.txt} +1 -1
  80. package/assets/esri/core/workers/chunks/679cd6424e0e2d7f372b.js +1 -0
  81. package/assets/esri/core/workers/chunks/6be530ab81291745485b.js.LICENSE.txt +1 -1
  82. package/assets/esri/core/workers/chunks/73c416ae0ec5a1815591.js.LICENSE.txt +1 -1
  83. package/assets/esri/core/workers/chunks/{23b623637126f8411a30.js → 7aec07f2482934259d12.js} +1 -1
  84. package/assets/esri/core/workers/chunks/7bed14d9bcd7fc5e2eec.js +1 -0
  85. package/assets/esri/core/workers/chunks/{741d170187e58e81584d.js → 7d744554d14057d9b2b1.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{e85da52d9cc7d9396872.js → 942fad4ec96295672ce8.js} +1 -1
  87. package/assets/esri/core/workers/chunks/9ccabf8142fb5de4d3e2.js.LICENSE.txt +1 -1
  88. package/assets/esri/core/workers/chunks/aeb524eded012217a865.js +1 -0
  89. package/assets/esri/core/workers/chunks/{ac6f002cfad42e60de8f.js → b48033645091c91e0d88.js} +1 -1
  90. package/assets/esri/core/workers/chunks/b7960ab9a9da7f88184c.js +1 -0
  91. package/assets/esri/core/workers/chunks/b8988771bfa4e785ebd6.js +1 -0
  92. package/assets/esri/core/workers/chunks/{ac83c2999a3d2ffb4356.js → c7838ac0db8570a2d2c1.js} +1 -1
  93. package/assets/esri/core/workers/chunks/c91ef3814e7f024043cf.js +1 -0
  94. package/assets/esri/core/workers/chunks/{310f3268582e61cd86da.js → d21480925a8bc9c7de96.js} +1 -1
  95. package/assets/esri/core/workers/chunks/d75adfd4acb3c92accc9.js +1 -0
  96. package/assets/esri/core/workers/chunks/d9ca754f51b9812bb179.js +1 -0
  97. package/assets/esri/core/workers/chunks/d9ef0b3341e2744d8f2f.js +1 -0
  98. package/assets/esri/core/workers/chunks/e4ba850e8344ac2c5fc0.js +1 -0
  99. package/assets/esri/core/workers/chunks/e5aac523c37d906eece6.js +1 -0
  100. package/assets/esri/core/workers/chunks/{f351007cdcd0938d3b6c.js → eeb24a4ab4993f1f4e8e.js} +1 -1
  101. package/assets/esri/core/workers/chunks/f25bebd2b6eb0d0f6626.js.LICENSE.txt +1 -1
  102. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  103. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  104. package/assets/esri/libs/text/pkg/bundle_bg.wasm +0 -0
  105. package/chunks/bundle2.js +5 -0
  106. package/config.js +1 -1
  107. package/copyright.txt +70 -1
  108. package/core/BidiText.js +1 -1
  109. package/geometry/support/FloatArray.js +1 -1
  110. package/geometry/support/Indices.js +1 -1
  111. package/interfaces.d.ts +24 -24
  112. package/kernel.js +1 -1
  113. package/layers/BingMapsLayer.d.ts +2 -3
  114. package/layers/BuildingSceneLayer.d.ts +2 -4
  115. package/layers/CatalogLayer.d.ts +2 -4
  116. package/layers/DimensionLayer.d.ts +2 -3
  117. package/layers/ElevationLayer.d.ts +2 -4
  118. package/layers/FeatureLayer.d.ts +2 -4
  119. package/layers/GaussianSplatLayer.d.ts +1 -3
  120. package/layers/GeoJSONLayer.d.ts +2 -3
  121. package/layers/GeoRSSLayer.d.ts +2 -3
  122. package/layers/GroupLayer.d.ts +2 -3
  123. package/layers/ImageryLayer.d.ts +2 -5
  124. package/layers/ImageryTileLayer.d.ts +3 -7
  125. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -4
  126. package/layers/IntegratedMeshLayer.d.ts +2 -4
  127. package/layers/KMLLayer.d.ts +2 -3
  128. package/layers/KnowledgeGraphLayer.d.ts +2 -4
  129. package/layers/LineOfSightLayer.d.ts +2 -3
  130. package/layers/LinkChartLayer.d.ts +2 -3
  131. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  132. package/layers/MapImageLayer.d.ts +2 -4
  133. package/layers/MapNotesLayer.d.ts +2 -3
  134. package/layers/MediaLayer.d.ts +3 -4
  135. package/layers/OGCFeatureLayer.d.ts +2 -3
  136. package/layers/ParquetLayer.d.ts +2 -3
  137. package/layers/PointCloudLayer.d.ts +2 -4
  138. package/layers/RouteLayer.d.ts +2 -3
  139. package/layers/SceneLayer.d.ts +2 -4
  140. package/layers/StreamLayer.d.ts +2 -4
  141. package/layers/SubtypeGroupLayer.d.ts +2 -4
  142. package/layers/TileLayer.d.ts +2 -4
  143. package/layers/UnknownLayer.d.ts +2 -3
  144. package/layers/UnsupportedLayer.d.ts +2 -3
  145. package/layers/VectorTileLayer.d.ts +2 -4
  146. package/layers/VideoLayer.d.ts +8 -9
  147. package/layers/ViewshedLayer.d.ts +2 -3
  148. package/layers/VoxelLayer.d.ts +2 -4
  149. package/layers/WCSLayer.d.ts +2 -4
  150. package/layers/WFSLayer.d.ts +2 -3
  151. package/layers/WMSLayer.d.ts +5 -6
  152. package/layers/WMTSLayer.d.ts +4 -5
  153. package/layers/WebTileLayer.d.ts +2 -3
  154. package/layers/buildingSublayers/BuildingSublayer.d.ts +3 -3
  155. package/layers/buildingSublayers/BuildingSublayer.js +1 -1
  156. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -3
  157. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -3
  158. package/layers/graphics/data/QueryEngineResult.js +1 -1
  159. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +4 -6
  160. package/layers/{support/media.d.ts → media/types.d.ts} +9 -9
  161. package/layers/mixins/ArcGISImageService.d.ts +1 -1
  162. package/layers/mixins/ImageryTileMixin.d.ts +1 -1
  163. package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
  164. package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
  165. package/layers/raster/functions/types.d.ts +1 -1
  166. package/layers/{support/RasterTypes.d.ts → raster/types.d.ts} +2 -2
  167. package/layers/support/ElevationQuery.d.ts +2 -2
  168. package/layers/support/FeatureType.d.ts +2 -2
  169. package/layers/support/Field.d.ts +2 -3
  170. package/layers/support/FieldConfiguration.d.ts +1 -1
  171. package/layers/support/ImageElement.d.ts +3 -3
  172. package/layers/support/LocalMediaElementSource.d.ts +1 -1
  173. package/layers/support/MediaElementBase.d.ts +4 -7
  174. package/layers/support/PixelBlock.d.ts +1 -1
  175. package/layers/support/RasterFunction.d.ts +1 -1
  176. package/layers/support/RasterInfo.d.ts +1 -1
  177. package/layers/support/Sublayer.d.ts +2 -3
  178. package/layers/support/Subtype.d.ts +2 -2
  179. package/layers/support/SubtypeSublayer.d.ts +2 -3
  180. package/layers/support/VideoElement.d.ts +2 -2
  181. package/layers/support/WMSSublayer.d.ts +6 -6
  182. package/layers/support/WMSSublayer.js +1 -1
  183. package/layers/support/domains.js +1 -1
  184. package/layers/support/rasterFunctionUtils.d.ts +1 -1
  185. package/layers/support/tiles3DUtils.js +1 -1
  186. package/layers/support/types.d.ts +33 -1
  187. package/layers/types.d.ts +17 -2
  188. package/layers/wmts/types.d.ts +2 -0
  189. package/libs/text/loadTextModule.js +5 -0
  190. package/linkChart/LinkChartProperties.d.ts +4 -6
  191. package/linkChart/LinkChartProperties.js +1 -1
  192. package/networks/Network.d.ts +2 -4
  193. package/networks/support/NamedTraceConfiguration.d.ts +3 -3
  194. package/networks/support/NamedTraceConfiguration.js +1 -1
  195. package/package.json +2 -2
  196. package/popup/FieldInfo.d.ts +1 -1
  197. package/request/process.js +1 -1
  198. package/rest/geometryService/types.d.ts +59 -0
  199. package/rest/geometryService.d.ts +3 -5
  200. package/rest/query/operations/query.js +1 -1
  201. package/rest/query/support/AttachmentInfo.d.ts +2 -2
  202. package/rest/support/AlgorithmicColorRamp.d.ts +2 -2
  203. package/rest/support/BinParametersBase.d.ts +2 -2
  204. package/rest/support/BinParametersBase.js +1 -1
  205. package/rest/support/DateBinTimeInterval.d.ts +1 -1
  206. package/rest/support/GeneralizeParameters.d.ts +1 -1
  207. package/rest/support/ImageSampleParameters.d.ts +1 -1
  208. package/rest/support/PrintTemplate.d.ts +4 -6
  209. package/rest/support/types.d.ts +17 -1
  210. package/smartMapping/support/adapters/support/utils.js +1 -1
  211. package/support/revision.js +1 -1
  212. package/symbols/WebStyleSymbol.d.ts +0 -24
  213. package/symbols/WebStyleSymbol.js +1 -1
  214. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  215. package/views/2d/engine/webgl/GlyphSDFCreator.js +5 -0
  216. package/views/2d/engine/webgl/GlyphSource.js +1 -1
  217. package/views/2d/engine/webgl/TextureManager.js +1 -1
  218. package/views/2d/engine/webgl/definitions.js +1 -1
  219. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  220. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  221. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  222. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  223. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  224. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  225. package/views/2d/layers/BaseLayerView2D.d.ts +3 -6
  226. package/views/2d/layers/BaseLayerViewGL2D.d.ts +3 -6
  227. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  228. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  229. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  230. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  231. package/views/3d/layers/I3SMeshView3D.js +1 -1
  232. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  233. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  234. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  235. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  236. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  237. package/views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js +1 -1
  238. package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
  239. package/views/VideoView.d.ts +2 -3
  240. package/views/View2D.d.ts +2 -3
  241. package/views/layers/MediaLayerViewMixin.d.ts +1 -1
  242. package/views/types.d.ts +1 -1
  243. package/webdoc/applicationProperties/SearchLayerField.d.ts +1 -1
  244. package/webdoc/applicationProperties/SearchTableField.d.ts +1 -1
  245. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
  246. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  247. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  248. package/widgets/Editor/components/workflowAdapters/pendingFeatureList/{CreateFeaturesWorkflowPendingFeatureListAdapter.ts.js → CreateFeaturesWorkflowPendingFeatureListAdapter.js} +1 -1
  249. package/widgets/Editor/types.d.ts +1 -1
  250. package/widgets/Feature.d.ts +3 -5
  251. package/widgets/FeatureForm/FieldInput.d.ts +2 -2
  252. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +1 -1
  253. package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
  254. package/widgets/FeatureTemplates/types.d.ts +1 -1
  255. package/widgets/Features.d.ts +3 -5
  256. package/widgets/Print/CustomTemplate.d.ts +3 -4
  257. package/widgets/Print/TemplateOptions.d.ts +3 -4
  258. package/widgets/Print/types.d.ts +3 -4
  259. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +1 -1
  260. package/assets/esri/core/workers/chunks/0099f4729c94c779ba35.js +0 -1
  261. package/assets/esri/core/workers/chunks/1ab98591d2f2bc604505.js +0 -1
  262. package/assets/esri/core/workers/chunks/1b838638e66e82d76cf3.js +0 -1
  263. package/assets/esri/core/workers/chunks/2a6231db5ee6cbfd59a5.js +0 -1
  264. package/assets/esri/core/workers/chunks/45b898367b6224dda46f.js +0 -1
  265. package/assets/esri/core/workers/chunks/4785cd108e2dec6e1697.js +0 -1
  266. package/assets/esri/core/workers/chunks/4d6d962d25aa836f53ee.js +0 -1
  267. package/assets/esri/core/workers/chunks/5909a0e763fddc3542e7.js +0 -2
  268. package/assets/esri/core/workers/chunks/5cee6c3ff23fb93f857a.js +0 -1
  269. package/assets/esri/core/workers/chunks/6035daa65fc3ebf86515.js +0 -1
  270. package/assets/esri/core/workers/chunks/7033fa18b7dd7bd3e49c.js +0 -1
  271. package/assets/esri/core/workers/chunks/7306b5b66e738a281d83.js +0 -1
  272. package/assets/esri/core/workers/chunks/7694abe44d55dae8872d.js +0 -1
  273. package/assets/esri/core/workers/chunks/964de713042f52d71e42.js +0 -1
  274. package/assets/esri/core/workers/chunks/ad92427bf597a6e0a299.js +0 -1
  275. package/assets/esri/core/workers/chunks/b285de471ca90f38ec25.js +0 -1
  276. package/assets/esri/core/workers/chunks/b8f83a272fc41765031d.js +0 -1
  277. package/assets/esri/core/workers/chunks/bcf612eabe7577540953.js +0 -1
  278. package/assets/esri/core/workers/chunks/c02b09f16241db233103.js +0 -1
  279. package/assets/esri/core/workers/chunks/c3007b916ba933137709.js +0 -1
  280. package/assets/esri/core/workers/chunks/cc5c1887e6d7079e5fe3.js +0 -1
  281. package/assets/esri/core/workers/chunks/ce8f075c814a8378c00c.js +0 -1
  282. package/assets/esri/core/workers/chunks/cfe1506a443fc84a0b91.js +0 -1
  283. package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.js +0 -1
  284. package/assets/esri/core/workers/chunks/e69255e38ff200dda14b.js +0 -1
  285. package/core/MultiOriginJSONSupport.d.ts +0 -13
  286. package/core/NumericIdentifiable.d.ts +0 -6
  287. package/core/ReadOnlyMultiOriginJSONSupport.d.ts +0 -6
  288. package/core/WriteableMultiOriginJSONMixin.d.ts +0 -6
  289. package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.d.ts +0 -6
  290. package/layers/mixins/ArcGISService.d.ts +0 -6
  291. package/layers/mixins/RasterJobHandlerMixin.d.ts +0 -6
  292. package/layers/support/RasterFunctionProperties.d.ts +0 -2
  293. package/layers/support/domains.d.ts +0 -5
  294. package/layers/support/editableLayers.d.ts +0 -11
  295. package/layers/support/exifUtils.d.ts +0 -21
  296. package/layers/support/fieldFormatUtils.d.ts +0 -4
  297. package/layers/support/fieldType.d.ts +0 -2
  298. package/layers/support/layerUtils.d.ts +0 -4
  299. package/layers/support/wmtsUtils.d.ts +0 -2
  300. package/layers/video/videoUtils.d.ts +0 -5
  301. package/rest/geometryService/cut.d.ts +0 -7
  302. package/rest/geometryService/fromGeoCoordinateString.d.ts +0 -28
  303. package/rest/geometryService/toGeoCoordinateString.d.ts +0 -25
  304. package/rest/operations/generalize.d.ts +0 -3
  305. package/rest/support/DateBinUtils.d.ts +0 -2
  306. package/rest/support/colorRamps.d.ts +0 -6
  307. package/rest/support/fileFormat.d.ts +0 -4
  308. package/rest/support/layoutTemplate.d.ts +0 -2
  309. package/rest/support/reportTemplate.d.ts +0 -2
  310. package/views/2d/layers/LayerView2D.d.ts +0 -6
  311. package/views/Viewport2DBaseMixin.d.ts +0 -6
  312. package/views/layers/RefreshableLayerView.d.ts +0 -6
  313. package/widgets/Feature/support/FeatureContentMixin.d.ts +0 -6
  314. /package/layers/video/{IVideoController.d.ts → types.d.ts} +0 -0
  315. /package/layers/{support/wmsUtils.d.ts → wms/types.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import type FieldInfoFormat from "./support/FieldInfoFormat.js";
2
2
  import type { ClonableMixin, ClonableMixinProperties } from "../core/Clonable.js";
3
3
  import type { JSONSupport, JSONSupportMixinProperties } from "../core/JSONSupport.js";
4
- import type { FieldFormatUnion } from "../layers/support/fieldFormatUtils.js";
4
+ import type { FieldFormatUnion } from "../layers/support/types.js";
5
5
  import type { NumberFieldFormatProperties } from "../layers/support/NumberFieldFormat.js";
6
6
  import type { DateTimeFieldFormatProperties } from "../layers/support/DateTimeFieldFormat.js";
7
7
  import type { FieldInfoFormatProperties } from "./support/FieldInfoFormat.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../config.js";import{id as t}from"../kernel.js";import r from"../core/Error.js";import has from"../core/has.js";import{clone as s}from"../core/lang.js";import{createAbortError as o,isAbortError as a,isAborted as n}from"../core/promiseUtils.js";import{isTrustedServer as i,getOrigin as l,isBlobProtocol as u,isDataProtocol as c,toHTTPS as d,objectToQuery as m,getProxyRule as p,getProxyUrl as f,addQueryParameters as h,hasSameOrigin as y,addProxyRule as g,getAppUrl as w}from"../core/urlUtils.js";import{isSecureProxyService as b}from"../portal/support/urlUtils.js";import{requestConfig as T}from"./config.js";import{registerNoCorsDomains as k,isNoCorsRequestRequired as q,sendNoCorsRequest as S}from"./cors.js";import{getImageType as O,ImageWithType as C}from"./ImageWithType.js";import{loadImage as x}from"./loadImage.js";import{setPreferredHost as j,getPreferredUrl as v}from"./preferredHosts.js";import{getApiKey as L}from"../support/apiKeyUtils.js";const E="FormData"in globalThis,U=new Set([499,498,403,401]),A=new Set(["COM_0056","COM_0057","SB_0008"]),P=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function H(r){let s,o;await I(r);try{do{[s,o]=await D(r)}while(!await _(r,s,o))}catch(u){const e=z("request:server",u,r.parameters,s);throw e.details.ssl=r.useSSL,r.interceptor?.error?.(e),e}const a=r.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!r.hasToken&&!r.credentialToken&&o.user?.username&&!i(a)){const t=l(a,!0);t&&e.request.trustedServers.push(t)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&k(o.authorizedCrossOriginNoCorsDomains)}else{"json"===(r.parameters.requestOptions.responseType||"json")&&j(a,o)}const n=r.credential;if(n&&t){const e=t.findServerInfo(n.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,n.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:o,getAllHeaders:s?()=>Array.from(s.headers):J,getHeader:s?e=>s.headers.get(e):J,httpStatus:s?.status??200,requestOptions:r.parameters.requestOptions,ssl:r.useSSL,url:r.parameters.url}}async function I(r){const s=r.parameters.url,o=r.parameters.requestOptions,a=r.controller.signal,i=o.body;let l=null,u=null;if(E&&"HTMLFormElement"in globalThis&&(i instanceof FormData?l=i:i instanceof HTMLFormElement&&(l=new FormData(i))),"string"==typeof i&&(u=i),r.fetchOptions={cache:o.cacheBust?"no-cache":"default",credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??e.request.priority,redirect:"follow",signal:a},(l||u)&&(r.fetchOptions.body=l||u),(T.isForeignWorker||"anonymous"===o.authMode)&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query?.token||l?.get("token")),!r.hasToken){const e=L(s);e&&(o.query??={},o.query.token=e,r.hasToken=!0)}if(r.useIdentity&&!r.hasToken&&!r.credential&&!r.credentialToken&&!B(s)&&!n(a)){let e;"immediate"===o.authMode?(await N(),e=await t.getCredential(s,{signal:a})):"no-prompt"===o.authMode?(await N(),e=await t.getCredential(s,{prompt:!1,signal:a}).catch(()=>{})):t&&(e=t.findCredential(s)),e&&(r.credential=e,r.credentialToken=e.token,r.useSSL=!!e.ssl)}}async function D(r){let s=r.parameters.url,a=v(s);const n=r.parameters.requestOptions,k=r.fetchOptions??{},x=u(s)||c(s),j=n.responseType??"json",L="image"===j&&n.imageWithType,U=x?0:null!=n.timeout?n.timeout:e.request.timeout;let A=!1;if(!x){r.useSSL&&(s=d(s));let o={...n.query};r.credentialToken&&(o.token=r.credentialToken);let l=m(o);has("esri-url-encodes-apostrophe")&&(l=l.replaceAll("'","%27"));const u=a.length+1+l.length;let c;A="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||u>e.request.maxUrlLength;const g=n.useProxy||!!p(s);if(g){const t=f(s);c=t.path,!A&&c.length+1+u>e.request.maxUrlLength&&(A=!0),t.query&&(o={...t.query,...o})}if("HEAD"===k.method&&(A||g)){if(A){if(u>e.request.maxUrlLength)throw z("request:invalid-parameters",new Error("URL exceeds maximum length"),r.parameters);throw z("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),r.parameters)}if(g)throw z("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),r.parameters)}if(A?(k.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?s=h(s,o):(k.body=m(o),k.headers||(k.headers={}),k.headers["Content-Type"]="application/x-www-form-urlencoded")):s=h(s,o),g&&(r.useProxy=!0,s=`${c}?${s}`),o.token&&E&&k.body instanceof FormData&&!b(s)&&k.body.set("token",o.token),n.hasOwnProperty("withCredentials"))r.withCredentials=n.withCredentials;else if(!y(s,w()))if(i(s))r.withCredentials=!0;else if(t){const e=t.findServerInfo(s);e?.webTierAuth&&(r.withCredentials=!0)}r.withCredentials&&(k.credentials="include",q(s)&&await S(A?h(s,o):s)),a=v(s)}let P,H,I=0,N=!1;U>0&&(I=setTimeout(()=>{N=!0,r.controller.abort()},U));try{if("native-request-init"===n.responseType)H=k,H.url=a,n.signal?H.signal=n.signal:delete H.signal;else if("image"!==n.responseType||"default"!==k.cache||k.keepalive||"GET"!==k.method||A||$(n.headers)||!x&&!r.useProxy&&e.request.proxyUrl&&!R(s)){if(await(T.beforeFetch?.(s,k)),P=await fetch(a,k),await(T.afterFetch?.(P)),r.useProxy||F(s),"native"===n.responseType)H=P;else if("HEAD"!==k.method)if(P.ok){switch(j){case"array-buffer":H=await P.arrayBuffer();break;case"blob":H=await P.blob();break;case"image":H=await(L?P.arrayBuffer():P.blob());break;default:H=await P.text()}if(I&&(clearTimeout(I),I=0),"json"===j||"xml"===j||"document"===j)if(H)switch(j){case"json":H=JSON.parse(H);break;case"xml":H=W(H,"application/xml");break;case"document":H=W(H,"text/html")}else H=null;if(H){if("array-buffer"===j||"blob"===j){const e=P.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&H["blob"===j?"size":"byteLength"]<=750)try{const e=await new Response(H).json();e.error&&(H=e)}catch{}}if(L&&H instanceof ArrayBuffer){const e=O(H);if("unknown"===e)return n.responseType="image",await D(r);H=await P.blob(),H=await M(URL.createObjectURL(H),r,!0),H=new C(H,e)}"image"===j&&H instanceof Blob&&(H=await M(URL.createObjectURL(H),r,!0))}}else{H=await P.text();try{H=JSON.parse(H)}catch{}}}else H=await M(a,r)}catch(B){if("AbortError"===B.name){if(N)throw X();throw o("Request canceled")}if(!(!P&&B instanceof TypeError&&e.request.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||r.useProxy||R(s))throw B;r.redoRequest=!0,g({proxyUrl:e.request.proxyUrl,urlPrefix:l(s)??""})}finally{I&&clearTimeout(I)}return[P,H]}function M(t,r,s=!1){const o=r.controller.signal,a=new Image;return r.withCredentials?a.crossOrigin="use-credentials":a.crossOrigin="anonymous",a.alt="",a.fetchPriority=e.request.priority,a.src=t,x(a,t,s,o)}function F(e){const t=l(e);t&&!T.corsServers.includes(t)&&T.corsServers.push(t)}function R(e){const t=l(e);return!t||t.endsWith(".arcgis.com")||T.corsServers.includes(t)||i(t)}async function N(){t||await import("../identity/IdentityManager.js")}function B(e){return P.some(t=>t.test(e))}function $(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function W(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function _(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.parameters.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let a,n;if(s&&(s.error&&"object"==typeof s.error?a=s.error:"error"===s.status&&Array.isArray(s.messages)&&(a={...s},a[G]=s,a.details=s.messages)),!a&&!r.ok)throw a=new Error(`Unable to load ${r.url} status: ${r.status}`),a[G]=s,a;let i,l=null;a&&(n=Number(a.code),l=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const u=o.authMode;if(403===n&&(4===l||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===n)&&void 0!==n&&U.has(n)&&!B(e.parameters.url)&&(403!==n||(!i||!A.has(i))&&(null==l||2===l&&e.credentialToken))){await N();try{const r=await t.getCredential(e.parameters.url,{error:z("request:server",a,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;a=c}}if(a)throw a;return!0}function z(e,t,n,i){let l;const u={url:n.url,requestOptions:n.requestOptions,getAllHeaders:J,getHeader:J,ssl:!1};if(t instanceof r)return t.details?(t.details=s(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=u,t;if(t){const e=i&&(()=>Array.from(i.headers)),r=i&&(e=>i.headers.get(e)),s=i?.status,o=t.message;o&&(l=o),e&&r&&(u.getAllHeaders=e,u.getHeader=r),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||s||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?(u.messages=[t.details],l??=t.details):(u.messages=t.details,l??=u.messages?.[0]),u.raw=G in t?t[G]:t}return l??="Error",a(t)?o():new r(e,l,u)}const G=Symbol(),J=()=>null,K="Timeout exceeded";function X(){return new Error(K)}function Q(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===K}export{z as createRequestError,Q as isTimeoutError,H as processRequest};
5
+ import e from"../config.js";import{id as t}from"../kernel.js";import r from"../core/Error.js";import has from"../core/has.js";import{clone as s}from"../core/lang.js";import{createAbortError as o,isAbortError as a,isAborted as n}from"../core/promiseUtils.js";import{isTrustedServer as i,getOrigin as l,isBlobProtocol as u,isDataProtocol as c,toHTTPS as d,objectToQuery as m,getProxyRule as p,getProxyUrl as f,addQueryParameters as h,hasSameOrigin as y,addProxyRule as g,getAppUrl as w}from"../core/urlUtils.js";import{isSecureProxyService as b}from"../portal/support/urlUtils.js";import{requestConfig as T}from"./config.js";import{registerNoCorsDomains as k,isNoCorsRequestRequired as q,sendNoCorsRequest as S}from"./cors.js";import{getImageType as O,ImageWithType as C}from"./ImageWithType.js";import{loadImage as x}from"./loadImage.js";import{setPreferredHost as j,getPreferredUrl as v}from"./preferredHosts.js";import{getApiKey as L}from"../support/apiKeyUtils.js";const E="FormData"in globalThis,U=new Set([499,498,403,401]),A=new Set(["COM_0056","COM_0057","SB_0008"]),P=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function H(r){let s,o;await I(r);try{do{[s,o]=await D(r)}while(!await _(r,s,o))}catch(u){const e=z("request:server",u,r.parameters,s);throw e.details.ssl=r.useSSL,r.interceptor?.error?.(e),e}const a=r.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!r.hasToken&&!r.credentialToken&&o.user?.username&&!i(a)){const t=l(a,!0);t&&e.request.trustedServers.push(t)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&k(o.authorizedCrossOriginNoCorsDomains)}else{"json"===(r.parameters.requestOptions.responseType||"json")&&j(a,o)}const n=r.credential;if(n&&t){const e=t.findServerInfo(n.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,n.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:o,getAllHeaders:s?()=>Array.from(s.headers):J,getHeader:s?e=>s.headers.get(e):J,httpStatus:s?.status??200,requestOptions:r.parameters.requestOptions,ssl:r.useSSL,url:r.parameters.url}}async function I(r){const s=r.parameters.url,o=r.parameters.requestOptions,a=r.controller.signal,i=o.body;let l=null,u=null;if(E&&"HTMLFormElement"in globalThis&&(i instanceof FormData?l=i:i instanceof HTMLFormElement&&(l=new FormData(i))),"string"==typeof i&&(u=i),r.fetchOptions={cache:o.cacheBust?"no-cache":"default",credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??e.request.priority,redirect:"follow",signal:a},(l||u)&&(r.fetchOptions.body=l||u),(T.isForeignWorker||"anonymous"===o.authMode)&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query?.token||l?.get("token")),!r.hasToken){const e=L(s);e&&(o.query??={},o.query.token=e,r.hasToken=!0)}if(r.useIdentity&&!r.hasToken&&!r.credential&&!r.credentialToken&&!B(s)&&!n(a)){let e;"immediate"===o.authMode?(await N(),e=await t.getCredential(s,{signal:a})):"no-prompt"===o.authMode?(await N(),e=await t.getCredential(s,{prompt:!1,signal:a}).catch(()=>{})):t&&(e=t.findCredential(s)),e&&(r.credential=e,r.credentialToken=e.token,r.useSSL=!!e.ssl)}}async function D(r){let s=r.parameters.url,a=v(s);const n=r.parameters.requestOptions,k=r.fetchOptions??{},x=u(s)||c(s),j=n.responseType??"json",L="image"===j&&n.imageWithType,U=x?0:null!=n.timeout?n.timeout:e.request.timeout;let A=!1;if(!x){r.useSSL&&(s=d(s));let o={...n.query};r.credentialToken&&(o.token=r.credentialToken);let l=m(o);has("esri-url-encodes-apostrophe")&&(l=l.replaceAll("'","%27"));const u=a.length+1+l.length;let c;A="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||u>e.request.maxUrlLength;const g=n.useProxy||!!p(s);if(g){const t=f(s);c=t.path,!A&&c.length+1+u>e.request.maxUrlLength&&(A=!0),t.query&&(o={...t.query,...o})}if("HEAD"===k.method&&(A||g)){if(A){if(u>e.request.maxUrlLength)throw z("request:invalid-parameters",new Error("URL exceeds maximum length"),r.parameters);throw z("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),r.parameters)}if(g)throw z("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),r.parameters)}if(A?(k.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?s=h(s,o):(k.body=m(o),k.headers||(k.headers={}),k.headers["Content-Type"]="application/x-www-form-urlencoded")):s=h(s,o),g&&(r.useProxy=!0,s=`${c}?${s}`),o.token&&E&&k.body instanceof FormData&&!b(s)&&k.body.set("token",o.token),n.hasOwnProperty("withCredentials"))r.withCredentials=n.withCredentials;else if(!y(s,w()))if(i(s))r.withCredentials=!0;else if(t){const e=t.findServerInfo(s);e?.webTierAuth&&(r.withCredentials=!0)}r.withCredentials&&(k.credentials="include",q(s)&&await S(A?h(s,o):s)),a=v(s)}let P,H,I=0,N=!1;U>0&&(I=setTimeout(()=>{N=!0,r.controller.abort()},U));try{if("native-request-init"===n.responseType)H=k,H.url=a,n.signal?H.signal=n.signal:delete H.signal;else if("image"!==n.responseType||"default"!==k.cache||k.keepalive||"GET"!==k.method||A||$(n.headers)||!x&&!r.useProxy&&e.request.proxyUrl&&!R(s)){if(await(T.beforeFetch?.(s,k)),P=await fetch(a,k),await(T.afterFetch?.(P)),r.useProxy||F(s),"native"===n.responseType)H=P;else if("HEAD"!==k.method)if(P.ok){switch(j){case"array-buffer":H=await P.arrayBuffer();break;case"blob":H=await P.blob();break;case"image":H=await(L?P.arrayBuffer():P.blob());break;default:H=await P.text()}if(I&&(clearTimeout(I),I=0),"json"===j||"xml"===j||"document"===j)if(H)switch(j){case"json":H=JSON.parse(H);break;case"xml":H=W(H,"application/xml");break;case"document":H=W(H,"text/html")}else H=null;if(H){if(("array-buffer"===j||"blob"===j)&&H["blob"===j?"size":"byteLength"]<=750)try{const e=await new Response(H).json();e.error&&(H=e)}catch{}if(L&&H instanceof ArrayBuffer){const e=O(H);if("unknown"===e)return n.responseType="image",await D(r);H=await P.blob(),H=await M(URL.createObjectURL(H),r,!0),H=new C(H,e)}"image"===j&&H instanceof Blob&&(H=await M(URL.createObjectURL(H),r,!0))}}else{H=await P.text();try{H=JSON.parse(H)}catch{}}}else H=await M(a,r)}catch(B){if("AbortError"===B.name){if(N)throw X();throw o("Request canceled")}if(!(!P&&B instanceof TypeError&&e.request.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||r.useProxy||R(s))throw B;r.redoRequest=!0,g({proxyUrl:e.request.proxyUrl,urlPrefix:l(s)??""})}finally{I&&clearTimeout(I)}return[P,H]}function M(t,r,s=!1){const o=r.controller.signal,a=new Image;return r.withCredentials?a.crossOrigin="use-credentials":a.crossOrigin="anonymous",a.alt="",a.fetchPriority=e.request.priority,a.src=t,x(a,t,s,o)}function F(e){const t=l(e);t&&!T.corsServers.includes(t)&&T.corsServers.push(t)}function R(e){const t=l(e);return!t||t.endsWith(".arcgis.com")||T.corsServers.includes(t)||i(t)}async function N(){t||await import("../identity/IdentityManager.js")}function B(e){return P.some(t=>t.test(e))}function $(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function W(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function _(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.parameters.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let a,n;if(s&&(s.error&&"object"==typeof s.error?a=s.error:"error"===s.status&&Array.isArray(s.messages)&&(a={...s},a[G]=s,a.details=s.messages)),!a&&!r.ok)throw a=new Error(`Unable to load ${r.url} status: ${r.status}`),a[G]=s,a;let i,l=null;a&&(n=Number(a.code),l=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const u=o.authMode;if(403===n&&(4===l||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===n)&&void 0!==n&&U.has(n)&&!B(e.parameters.url)&&(403!==n||(!i||!A.has(i))&&(null==l||2===l&&e.credentialToken))){await N();try{const r=await t.getCredential(e.parameters.url,{error:z("request:server",a,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;a=c}}if(a)throw a;return!0}function z(e,t,n,i){let l;const u={url:n.url,requestOptions:n.requestOptions,getAllHeaders:J,getHeader:J,ssl:!1};if(t instanceof r)return t.details?(t.details=s(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=u,t;if(t){const e=i&&(()=>Array.from(i.headers)),r=i&&(e=>i.headers.get(e)),s=i?.status,o=t.message;o&&(l=o),e&&r&&(u.getAllHeaders=e,u.getHeader=r),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||s||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?(u.messages=[t.details],l??=t.details):(u.messages=t.details,l??=u.messages?.[0]),u.raw=G in t?t[G]:t}return l??="Error",a(t)?o():new r(e,l,u)}const G=Symbol(),J=()=>null,K="Timeout exceeded";function X(){return new Error(K)}function Q(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===K}export{z as createRequestError,Q as isTimeoutError,H as processRequest};
@@ -0,0 +1,59 @@
1
+ import type Polygon from "../../geometry/Polygon.js";
2
+ import type Polyline from "../../geometry/Polyline.js";
3
+ import type SpatialReference from "../../geometry/SpatialReference.js";
4
+
5
+ export interface CutResult<T extends Polygon | Polyline> {
6
+ cutIndexes: number[];
7
+ geometries: T[];
8
+ }
9
+
10
+ export type ConversionType = "mgrs" | "usng" | "utm" | "geo-ref" | "gars" | "dms" | "ddm" | "dd";
11
+
12
+ export interface FromGeoCoordinateStringParameters {
13
+ /**
14
+ * Conversion options for mgrs and utm conversion types. See
15
+ * the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/to-geocoordinatestring.htm)
16
+ * for valid conversion modes and their descriptions.
17
+ */
18
+ conversionMode?: string;
19
+ /**
20
+ * The conversion type of the input strings.
21
+ *
22
+ * @default mrgs
23
+ */
24
+ conversionType?: ConversionType;
25
+ /**
26
+ * The spatial reference (or WKID of the spatial reference)
27
+ * of the XY-coordinates to be converted.
28
+ */
29
+ sr?: SpatialReference | string | number;
30
+ /**
31
+ * An array of formatted strings as specified by `conversionType`.
32
+ * Example: `["01N AA 66021 00000" , "11S NT 00000 62155" , "31U BT 94071 65288"]`
33
+ */
34
+ strings: string[];
35
+ }
36
+
37
+ export interface ToGeoCoordinateStringParameters extends Omit<FromGeoCoordinateStringParameters, "strings"> {
38
+ /**
39
+ * If `true`, then spaces are added between components of the string. The
40
+ * `addSpaces` parameter applies only to conversion types `mgrs`, `usng` and `utm`. The default value for `mgrs` is `false`
41
+ * , while the default value for both `usng` and `utm` is `true`.
42
+ */
43
+ addSpaces?: boolean;
44
+ /** An array of XY-coordinates (in JSON format) to be converted. */
45
+ coordinates: number[][];
46
+ /**
47
+ * The number of digits to output for each of the numerical portions in the string.
48
+ * The default value depends of `conversionType`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for default values.
49
+ */
50
+ numOfDigits?: number;
51
+ /**
52
+ * If `true`, then numeric portions of the string are rounded to the nearest whole magnitude
53
+ * as specified by `numOfDigits`. Otherwise, numeric portions of the string are truncated. The rounding parameter applies
54
+ * only to conversion types `mgrs`, `usng` and `geo-ref`.
55
+ *
56
+ * @default true
57
+ */
58
+ rounding?: boolean;
59
+ }
@@ -27,9 +27,7 @@ import type RelationParameters from "./support/RelationParameters.js";
27
27
  import type TrimExtendParameters from "./support/TrimExtendParameters.js";
28
28
  import type { GeometryWithoutMeshUnion, GeometryUnion } from "../geometry/types.js";
29
29
  import type { RequestOptions } from "../request/types.js";
30
- import type { CutResult } from "./geometryService/cut.js";
31
- import type { GeomServiceFromGeoCoordinateStringParameters } from "./geometryService/fromGeoCoordinateString.js";
32
- import type { GeomServiceToGeoCoordinateStringParameters } from "./geometryService/toGeoCoordinateString.js";
30
+ import type { CutResult, FromGeoCoordinateStringParameters, ToGeoCoordinateStringParameters } from "./geometryService/types.js";
33
31
 
34
32
  /**
35
33
  * Computes the area and length for the input [polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html).
@@ -253,7 +251,7 @@ export function distance(url: string, parameters: DistanceParameters, requestOpt
253
251
  * console.log(error);
254
252
  * });
255
253
  */
256
- export function fromGeoCoordinateString(url: string, parameters: GeomServiceFromGeoCoordinateStringParameters, requestOptions?: RequestOptions): Promise<number[][]>;
254
+ export function fromGeoCoordinateString(url: string, parameters: FromGeoCoordinateStringParameters, requestOptions?: RequestOptions): Promise<number[][]>;
257
255
 
258
256
  /**
259
257
  * Generalizes the input geometries using the Douglas-Peucker algorithm.
@@ -487,7 +485,7 @@ export function simplify<T extends GeometryUnion>(url: string, geometries: T[],
487
485
  * // response.strings[2] = "31U BT 94071081 65288255"
488
486
  * });
489
487
  */
490
- export function toGeoCoordinateString(url: string, parameters: GeomServiceToGeoCoordinateStringParameters, requestOptions?: RequestOptions): Promise<string[]>;
488
+ export function toGeoCoordinateString(url: string, parameters: ToGeoCoordinateStringParameters, requestOptions?: RequestOptions): Promise<string[]>;
491
489
 
492
490
  /**
493
491
  * Trims or extends the input polylines using the user specified guide polyline. When trimming features,
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../request.js";import{urlToObject as n,join as r}from"../../../core/urlUtils.js";import{normalizeCentralMeridian as e}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as o}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as s}from"./pbfQueryUtils.js";import{queryLikeToQueryStringParameters as u}from"./queryUtils.js";import{applyFeatureSetZUnitScaling as i}from"./queryZScale.js";const c="Layer does not support extent calculation.";function a(t,n,r){return u(t,n,r)}async function y(t,n,r,e,o){const s=n.timeExtent?.isEmpty?{features:[]}:await d(t,n,"json",e,void 0,o);return i(n,r,s),s}async function l(t,n,r,e,o){if(n.timeExtent?.isEmpty)return r.createFeatureResult();const u=await f(t,n,e,o);return s(u,r)}function f(t,n,r,e){return d(t,n,"pbf",r,void 0,e)}function m(t,n,r,e){return n.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):d(t,n,"json",r,{returnIdsOnly:!0},e)}async function p(t,n,r,e){return n.timeExtent?.isEmpty?0:(await d(t,n,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},e)).count}async function O(t,n,r){if(n.timeExtent?.isEmpty)return{count:0,extent:null};const e=await d(t,n,"json",r,{returnExtentOnly:!0,returnCountOnly:!0});if(e.hasOwnProperty("extent"))return e;const o="string"==typeof t?t:t.path;if(/\/imageserver\/?$/i.test(o)&&e.hasOwnProperty("count")){const o=await d(t,n,"json",r,{returnExtentOnly:!0});return{count:e.count,extent:o.extent}}if(e.features)throw new Error(c);if(e.hasOwnProperty("count"))throw new Error(c);return e}function j(t,n){if(!t.returnIdsOnly||!n.uniqueIdFields)return t;const r={...t,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function d(n,r,e,o={},s={},u={}){const i=await w(n,r,e,o,s,u),c="json"===e?"json":"array-buffer";return t(i.url,{responseType:c,...i.options}).then(({data:t})=>t)}async function w(t,s,u,i,c={},y={}){const l="string"==typeof t?n(t):t,f=s.geometry?[s.geometry]:[],m=await e(f,null,{signal:i.signal}),p=m?.[0];if(null!=p){const t=s.clone();t.geometry=p.clone(),s=t}const O=o({...l.query,f:u,...j(c,y),...a(s,c,y)});return i={...i,query:{...O,...i.query}},new E(r(l.path,x(s,c)?"query3d":"query"),i)}class E{constructor(t,n){this.url=t,this.options=n}}function x(t,n){return null!=t.formatOf3DObjects&&!(n.returnCountOnly||n.returnExtentOnly||n.returnIdsOnly)}export{E as RunQueryParameters,y as executeQuery,p as executeQueryForCount,O as executeQueryForExtent,m as executeQueryForIds,l as executeQueryPBF,f as executeQueryPBFBuffer,a as queryToQueryStringParameters,d as runQuery};
5
+ import t from"../../../request.js";import{urlToObject as n,join as r}from"../../../core/urlUtils.js";import{normalizeCentralMeridian as e}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as o}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as s}from"./pbfQueryUtils.js";import{queryLikeToQueryStringParameters as u}from"./queryUtils.js";import{applyFeatureSetZUnitScaling as i}from"./queryZScale.js";const c="Layer does not support extent calculation.";function a(t,n,r){return u(t,n,r)}async function y(t,n,r,e,o){const s=n.timeExtent?.isEmpty?{features:[]}:await d(t,n,"json",e,void 0,o);return i(n,r,s),s}async function l(t,n,r,e,o){if(n.timeExtent?.isEmpty)return r.createFeatureResult();const u=await f(t,n,e,o);return s(u,r)}function f(t,n,r,e){return d(t,n,"pbf",r,void 0,e)}function m(t,n,r,e){return n.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):d(t,n,"json",r,{returnIdsOnly:!0},e)}async function p(t,n,r,e){return n.timeExtent?.isEmpty?0:(await d(t,n,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},e)).count}async function O(t,n,r){if(n.timeExtent?.isEmpty)return{count:0,extent:null};const e=await d(t,n,"json",r,{returnExtentOnly:!0,returnCountOnly:!0});if(e.hasOwnProperty("extent"))return e;const o="string"==typeof t?t:t.path;if(/\/imageserver\/?$/i.test(o)&&e.hasOwnProperty("count")){const o=await d(t,n,"json",r,{returnExtentOnly:!0});return{count:e.count,extent:o.extent}}if(e.features)throw new Error(c);if(e.hasOwnProperty("count"))throw new Error(c);return e}function j(t,n){if(!t.returnIdsOnly||!n.uniqueIdFields)return t;const r={...t,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function d(n,r,e,o={},s={},u={}){const i=await w(n,r,e,o,s,u),c="json"===e?"json":"array-buffer";return t(i.url,{responseType:c,...i.options}).then(({data:t})=>t)}async function w(t,s,u,i,c={},y={}){const l="string"==typeof t?n(t):t,f=s.geometry?[s.geometry]:[],m=await e(f,null,{signal:i.signal}),p=m?.[0];if(null!=p){const t=s.clone();t.geometry=p.clone(),s=t}const O=o({...l.query,f:u,...j(c,y),...a(s,c,y)});return i={...i,query:{...O,...i.query}},new E(r(l.path,x(s,c)?"query3d":"query"),i)}class E{constructor(t,n){this.url=t,this.options=n}}function x(t,n){return null!=t.formatOf3DObjects&&!(n.returnCountOnly||n.returnExtentOnly||n.returnIdsOnly)}export{E as RunQueryParameters,y as executeQuery,p as executeQueryForCount,O as executeQueryForExtent,m as executeQueryForIds,l as executeQueryPBF,f as executeQueryPBFBuffer,w as getQueryParameters,a as queryToQueryStringParameters,d as runQuery};
@@ -1,5 +1,5 @@
1
1
  import type { JSONSupport, JSONSupportMixinProperties } from "../../../core/JSONSupport.js";
2
- import type { ExifInfo } from "../../../layers/support/exifUtils.js";
2
+ import type { ExifInfo } from "../../../layers/support/types.js";
3
3
  import type { ObjectId } from "../../../views/types.js";
4
4
 
5
5
  export interface AttachmentInfoProperties extends JSONSupportMixinProperties, Partial<Pick<AttachmentInfo, "contentType" | "exifInfo" | "globalId" | "id" | "keywords" | "name" | "parentGlobalId" | "parentObjectId" | "size" | "url">> {}
@@ -40,7 +40,7 @@ export default class AttachmentInfo extends JSONSupport {
40
40
  * for more information on supported attachment types.
41
41
  */
42
42
  accessor contentType: string;
43
- /** An array of [ExifInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-exifUtils.html#ExifInfo) for the attachment. */
43
+ /** An array of {@link layers/support/exifUtils!ExifInfo} for the attachment. */
44
44
  accessor exifInfo: ExifInfo[] | null | undefined;
45
45
  /** The global identifier for the attachment. */
46
46
  accessor globalId: string;
@@ -1,7 +1,7 @@
1
1
  import type Color from "../../Color.js";
2
2
  import type ColorRamp from "./ColorRamp.js";
3
3
  import type { ColorRampProperties } from "./ColorRamp.js";
4
- import type { AlgorithmType } from "./colorRamps.js";
4
+ import type { ColorRampAlgorithmType } from "./types.js";
5
5
  import type { ColorLike } from "../../Color.js";
6
6
 
7
7
  export interface AlgorithmicColorRampProperties extends ColorRampProperties, Partial<Pick<AlgorithmicColorRamp, "algorithm">> {
@@ -38,7 +38,7 @@ export default class AlgorithmicColorRamp extends ColorRamp {
38
38
  * lab-lch | The hue, saturation, value (hsv) algorithm is a linear traverse of colors between pairs: Color 1 H to Color 2 H, Color 1 S to Color 2 S, and Color 1 V to Color 2 V.
39
39
  * hsv | The lab-lch algorithm is very similar to the cie-lab but does not seek the shortest path between colors.
40
40
  */
41
- algorithm?: AlgorithmType | null;
41
+ algorithm?: ColorRampAlgorithmType | null;
42
42
  /** The first color in the color ramp. */
43
43
  get fromColor(): Color;
44
44
  set fromColor(value: ColorLike);
@@ -57,7 +57,7 @@ export interface BinParametersBaseProperties extends JSONSupportMixinProperties,
57
57
  stackBy?: AttributeBinsGroupingProperties | null;
58
58
  }
59
59
 
60
- export type BinParameterFiledType = "small-integer" | "integer" | "single" | "double" | "long" | "date" | "date-only" | "time-only" | "timestamp-offset";
60
+ export type BinParameterFieldType = "small-integer" | "integer" | "single" | "double" | "long" | "date" | "date-only" | "time-only" | "timestamp-offset";
61
61
 
62
62
  /**
63
63
  * Mixin for binning parameters.
@@ -109,7 +109,7 @@ export default abstract class BinParametersBase extends BinParametersBaseSupercl
109
109
  * })
110
110
  * });
111
111
  */
112
- expressionValueType?: BinParameterFiledType | null;
112
+ expressionValueType?: BinParameterFieldType | null;
113
113
  /**
114
114
  * The field name used to calculate the bins. The [expression](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-BinParametersBase.html#expression) property cannot be set when this property is set.
115
115
  *
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONMap as r}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import n from"./AttributeBinsGrouping.js";import{enumeration as p}from"../../core/accessorSupport/decorators/enumeration.js";const l=new r({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),y=new r({naturalLog:"natural-log",squareRoot:"square-root"});let a=class extends(t(o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};e([s({type:String,json:{name:"onExpression.value",write:!0}})],a.prototype,"expression",void 0),e([p(l,{name:"onExpression.valueType"})],a.prototype,"expressionValueType",void 0),e([s({type:String,json:{name:"onField",write:!0}})],a.prototype,"field",void 0),e([s({type:String,json:{write:!0}})],a.prototype,"firstDayOfWeek",void 0),e([s({type:String,json:{write:!0}})],a.prototype,"hideUpperBound",void 0),e([s({type:n,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],a.prototype,"splitBy",void 0),e([s({type:n,json:{write:{target:{stackBy:{type:n},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>n.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],a.prototype,"stackBy",void 0),e([p(y)],a.prototype,"transformation",void 0),a=e([i("esri.rest.support.BinParametersBase")],a);export{a as default};
5
+ import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONMap as o}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import l from"./AttributeBinsGrouping.js";import{enumeration as p}from"../../core/accessorSupport/decorators/enumeration.js";const n=new o({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),y=new o({naturalLog:"natural-log",squareRoot:"square-root"});let a=class extends(t(r)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};e([s({type:String,json:{name:"onExpression.value",write:!0}})],a.prototype,"expression",void 0),e([p(n,{name:"onExpression.valueType"})],a.prototype,"expressionValueType",void 0),e([s({type:String,json:{name:"onField",write:!0}})],a.prototype,"field",void 0),e([s({type:Number,json:{write:!0}})],a.prototype,"firstDayOfWeek",void 0),e([s({type:Boolean,json:{write:!0}})],a.prototype,"hideUpperBound",void 0),e([s({type:l,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],a.prototype,"splitBy",void 0),e([s({type:l,json:{write:{target:{stackBy:{type:l},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>l.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],a.prototype,"stackBy",void 0),e([p(y)],a.prototype,"transformation",void 0),a=e([i("esri.rest.support.BinParametersBase")],a);export{a as default};
@@ -1,6 +1,6 @@
1
1
  import type { ClonableMixin, ClonableMixinProperties } from "../../core/Clonable.js";
2
2
  import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
3
- import type { DateBinTimeUnit } from "./DateBinUtils.js";
3
+ import type { DateBinTimeUnit } from "./types.js";
4
4
 
5
5
  export interface DateBinTimeIntervalProperties extends JSONSupportMixinProperties, ClonableMixinProperties, Partial<Pick<DateBinTimeInterval, "unit" | "value">> {}
6
6
 
@@ -1,6 +1,6 @@
1
1
  import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
2
2
  import type { GeometryUnion } from "../../geometry/types.js";
3
- import type { DeviationUnit } from "../operations/generalize.js";
3
+ import type { DeviationUnit } from "./types.js";
4
4
 
5
5
  export interface GeneralizeParametersProperties extends JSONSupportMixinProperties, Partial<Pick<GeneralizeParameters, "deviationUnit" | "geometries" | "maxDeviation">> {}
6
6
 
@@ -6,7 +6,7 @@ import type Polyline from "../../geometry/Polyline.js";
6
6
  import type MosaicRule from "../../layers/support/MosaicRule.js";
7
7
  import type TimeExtent from "../../time/TimeExtent.js";
8
8
  import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
9
- import type { RasterInterpolation } from "../../layers/support/RasterTypes.js";
9
+ import type { RasterInterpolation } from "../../layers/raster/types.js";
10
10
  import type { PolygonProperties } from "../../geometry/Polygon.js";
11
11
  import type { ExtentProperties } from "../../geometry/Extent.js";
12
12
  import type { PolylineProperties } from "../../geometry/Polyline.js";
@@ -1,9 +1,7 @@
1
1
  import type Accessor from "../../core/Accessor.js";
2
2
  import type PortalItem from "../../portal/PortalItem.js";
3
3
  import type LegendLayer from "./LegendLayer.js";
4
- import type { FileFormat } from "./fileFormat.js";
5
- import type { LayoutTemplate } from "./layoutTemplate.js";
6
- import type { ReportTemplate } from "./reportTemplate.js";
4
+ import type { PrintFileFormat, PrintLayoutTemplate, PrintReportTemplate } from "./types.js";
7
5
  import type { PortalItemProperties } from "../../portal/PortalItem.js";
8
6
 
9
7
  export interface PrintTemplateProperties extends Partial<Pick<PrintTemplate, "attributionVisible" | "exportOptions" | "forceFeatureAttributes" | "format" | "includeCharts" | "includeTables" | "layout" | "layoutOptions" | "outScale" | "report" | "reportOptions" | "scalePreserved" | "showLabels">> {
@@ -161,7 +159,7 @@ export default class PrintTemplate extends Accessor {
161
159
  *
162
160
  * @default "png32"
163
161
  */
164
- accessor format: FileFormat;
162
+ accessor format: PrintFileFormat;
165
163
  /**
166
164
  * When `true`, charts will be included in the printout request.
167
165
  * Charts are stored inside an operational layer definition.
@@ -240,7 +238,7 @@ export default class PrintTemplate extends Accessor {
240
238
  *
241
239
  * @default "map-only"
242
240
  */
243
- accessor layout: LayoutTemplate | null | undefined;
241
+ accessor layout: PrintLayoutTemplate | null | undefined;
244
242
  /**
245
243
  * A custom layout hosted as a [portal item](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html). To use this property, the print service
246
244
  * must be hosted on an ArcGIS Server that is federated with the same portal as the portal item.
@@ -352,7 +350,7 @@ export default class PrintTemplate extends Accessor {
352
350
  * reportOptions: {}
353
351
  * });
354
352
  */
355
- accessor report: ReportTemplate | null | undefined;
353
+ accessor report: PrintReportTemplate | null | undefined;
356
354
  /**
357
355
  * A custom report template hosted as a [portal item](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html) for report printing.
358
356
  * Also requires a value to be set for [reportOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PrintTemplate.html#reportOptions) to print.
@@ -1,7 +1,9 @@
1
+ import type AlgorithmicColorRamp from "./AlgorithmicColorRamp.js";
1
2
  import type DataLayer from "./DataLayer.js";
2
3
  import type DirectionLine from "./DirectionLine.js";
3
4
  import type DirectionPoint from "./DirectionPoint.js";
4
5
  import type FeatureSet from "./FeatureSet.js";
6
+ import type MultipartColorRamp from "./MultipartColorRamp.js";
5
7
  import type NetworkFeatureSet from "./NetworkFeatureSet.js";
6
8
  import type NetworkUrl from "./NetworkUrl.js";
7
9
  import type PointBarrier from "./PointBarrier.js";
@@ -83,4 +85,18 @@ export type NetworkAttributeUnit = NetworkAttributeAccerationUnit | TimeUnit | L
83
85
 
84
86
  export type JobStatus = "job-cancelled" | "job-cancelling" | "job-deleted" | "job-deleting" | "job-timed-out" | "job-executing" | "job-failed" | "job-new" | "job-submitted" | "job-succeeded" | "job-waiting";
85
87
 
86
- export type NetworkDate = Date | "now";
88
+ export type NetworkDate = Date | "now";
89
+
90
+ export type PrintReportTemplate = "attribute-list-letter-ansi-a-landscape" | "attribute-list-letter-ansi-a-portrait" | "attribute-list-with-group-letter-ansi-a-landscape" | "attribute-list-with-group-letter-ansi-a-portrait" | "page-per-feature-letter-ansi-a-landscape" | "page-per-feature-letter-ansi-a-portrait";
91
+
92
+ export type PrintLayoutTemplate = "map-only" | "a3-landscape" | "a3-portrait" | "a4-landscape" | "a4-portrait" | "letter-ansi-a-landscape" | "letter-ansi-a-portrait" | "tabloid-ansi-b-landscape" | "tabloid-ansi-b-portrait";
93
+
94
+ export type PrintFileFormat = "aix" | "eps" | "gif" | "jpg" | "pdf" | "png32" | "png8" | "svg" | "svgz" | "tiff";
95
+
96
+ export type ColorRampAlgorithmType = "cie-lab" | "lab-lch" | "hsv";
97
+
98
+ export type ColorRampUnion = AlgorithmicColorRamp | MultipartColorRamp;
99
+
100
+ export type DateBinTimeUnit = "years" | "quarters" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds";
101
+
102
+ export type DeviationUnit = Exclude<LengthUnit, "us-feet"> | "decimal-degrees";
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t}from"../../../../core/arrayUtils.js";import{throwIfAborted as e}from"../../../../core/promiseUtils.js";import n from"../../../../layers/support/CodedValue.js";import"../../../../core/has.js";import i from"../../../../layers/support/CodedValueDomain.js";import"../../../../layers/support/Domain.js";import"../../../../layers/support/InheritedDomain.js";import"../../../../layers/support/RangeDomain.js";import l from"../../../../layers/support/Field.js";import{isStringField as o,isTimeOnlyField as r}from"../../../../layers/support/fieldUtils.js";import a from"../../../../rest/support/PivotQuery.js";import s from"../../../../rest/support/StatisticDefinition.js";import u from"../../../../rest/support/UnPivotDefinition.js";import{noDominantCategoryField as c}from"../../../statistics/support/predominanceUtils.js";import{getRangeExpr as m,getSQLFilterForNormalization as f,mergeWhereClauses as d}from"../../../statistics/support/utils.js";import{isIntegerField as p,isAnyDateField as y,getDateDiffSQL as v,castIntegerFieldToFloat as x}from"../../utils.js";import{isNullCountSupported as g,statisticTypes as h,getEqualIntervalBins as w,processNullValue as F}from"../../../../statistics/utils.js";const E=/_value$/i,S=Math.LOG10E,T={SECOND:1e3,MINUTE:6e4,HOUR:36e5},V=10;function $(t){return t.map(t=>t.toJSON())}function z(t,e){const n=[],i=t.layer,l="featureReduction"in i?i.featureReduction:null,o="binning"===l?.type,r=null!=l&&"fields"in l?l.fields?.map(t=>t.name?.toLowerCase()).filter(Boolean):[];if(!o||!e)return n;for(const a of e)r.includes(a.toLowerCase())||n.push(a);return n}function j(t,e,n){const i=[];if(e)for(const l of e){const e=t.getField(l);e&&n&&"availableFields"in n&&!n.availableFields?.includes(e.name)&&i.push(e.name)}return i}function q(t,e){const n=t&&t.features;if(0===n?.length)return{avg:null,count:0,max:null,median:null,min:null,nullcount:0,stddev:null,sum:null,variance:null};const i=n?.[0]?.attributes,l={};for(const o in i)l[o.replace(E,"").toLowerCase()]=i[o];return null!=l.totalcount&&l.totalcount>=l.count&&(l.nullcount=l.totalcount-l.count),delete l.totalcount,l.min===l.max&&null!=l.min&&null==l.stddev&&(l.stddev=l.variance=0),e&&(["min","max","avg","stddev","sum","variance"].forEach(t=>{null!=l[t]&&(l[t]=Math.ceil(l[t]))}),l.min===l.max&&null!=l.min&&(l.avg=l.min,l.stddev=l.variance=0)),l}function C(t){const e=[],n=t.classBreaks,i=n[0].minValue,l=n[n.length-1].maxValue;n.forEach(t=>{e.push([t.minValue,t.maxValue])});const o={field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,normalizationTotal:t.normalizationTotal,layer:t.layer};return{min:i,max:l,intervals:e,sqlExpr:b(o),excludeZerosExpr:t.where,normTotal:t.normalizationTotal}}function b(t){const{field:e,normalizationType:n,normalizationField:i,normalizationTotal:l,layer:o}=t,r=p(o,e);let a=e;return"percent-of-total"===n?a=`((${r?x(e):e} / ${l}) * 100)`:"log"===n?a=`(log(${e}) * ${S})`:"field"===n?a=`(${r?x(e):e} / ${i})`:"natural-log"===n?a=`(log(${r?x(e):e}))`:"square-root"===n&&(a=`(power(${r?x(e):e}, 0.5))`),a}function O(t,e){let n;if(e=e.toLowerCase(),t)for(const i in t)if(i.toLowerCase()!==e){n=t[i];break}return n}function L(t,e){let n;if(e=e.toLowerCase(),t)for(const i in t)if(i.toLowerCase()===e){n=t[i];break}return n}function R(t,e,n,i,l){const o={},r="countOFExpr";t&&t.features&&t.features.forEach(t=>{const e=t.attributes,n=O(e,r),i=L(e,r);null!=n&&null!=i&&0!==n&&(o[n]=i)});const a=[];return w(e,n,i).forEach((t,e)=>{const n=(e+1).toString();a.push({minValue:t[0],maxValue:t[1],count:o.hasOwnProperty(n)?o[n]:0})}),{bins:a,minValue:e,maxValue:n,normalizationTotal:l}}async function D(t,n){const i=t&&t.features,{field:l,field2:o,field3:r,fieldDelimiter:a,layer:s,view:u,signal:c,labels:m}=n,f=`countOF${!(!l||!o)?"Expr":l||"Expr"}`,d={};let p=!1;for(const e of i){const t=e.attributes,n=L(t,f);let i=l?L(t,l):O(t,f),s=o?L(t,o):null,u=r?L(t,r):null;null===i&&0===n&&(p=!0),(null==i||"string"==typeof i&&""===i.trim())&&(i=null),o&&(null==s||"string"==typeof s&&""===s.trim())&&(s=null),r&&(null==u||"string"==typeof u&&""===u.trim())&&(u=null);let c=i;o&&(c=`${F(c)}${a}${F(s)}`,r&&(c=`${c}${a}${F(u)}`)),null==d[c]?d[c]={count:n,data:c}:d[c].count=d[c].count+n}if(l&&p){const t=l+" is NULL";try{const e=await s.queryFeatureCount({whereClause:t,view:u,signal:c});return d.null.count=d.null.count+e,N(d,m)}catch{return e(c),N(d,m)}}return N(d,m)}function N(t,e){if(e)for(const n in t)t[n].label=e[n];return{count:t}}async function U(t,e,l){const o=t?l.getField(t):null,r=o?l.getFieldDomain(o.name):null;if(r)return r;const{uniqueValueInfos:a}=await l.uniqueValues({field:t,sqlWhere:e.sqlWhere,features:e.features,useFeaturesInView:e.useFeaturesInView,view:e.view,signal:e.signal}),s=a.map(t=>new n({code:t.value}));return new i({codedValues:s})}async function I(t,e){if(!t.returnAllCodedValues)return[];const{field:n,field2:i,field3:l}=t;if(n&&!i){const t=n?e.getField(n):null,i=t?e.getFieldDomain(t.name):null;return i?[i]:[]}const o=[];return n&&(o.push(U(n,t,e)),i&&(o.push(U(i,t,e)),l&&o.push(U(l,t,e)))),Promise.all(o)}function Q(t,e){return v(t,new Date(0),e,"milliseconds").sqlExpression}function M(t,e){return`EXTRACT(${e} FROM ${t}) * ${T[e]}`}function P(t){if(!t)return null;return x(["HOUR","MINUTE","SECOND"].map(e=>`(${M(t,e)})`).join(" + "))}function _(t){return{viewingMode:"2d"===t.type?"map":t.viewingMode,scale:t.scale,spatialReference:t.spatialReference?.toJSON()}}function B(t,e){const n=new Set(t.map(t=>t.value)),i=e.filter(t=>!n.has(t));for(const l of i)t.push({value:l,count:0});t.sort((t,n)=>e.indexOf(t.value)-e.indexOf(n.value));for(const l of t)l.value===c&&(l.value=null);return{predominantCategoryInfos:t}}function W(e){const n="featureReduction"in e?e.featureReduction:null;return((null!=n&&"fields"in n?n.fields:null)??[]).map(t=>{const n=k(t,e.fieldsIndex);return n?new l({type:n,name:t.name,alias:t.alias}):null}).filter(t)}function k(t,e){switch(t.statisticType){case"avg":case"avg_angle":return"double";case"count":return"integer";case"min":case"max":case"sum":return t.onStatisticField?e.get(t.onStatisticField)?.type??null:t.onStatisticExpression?"string"===t.onStatisticExpression.returnType?null:"double":null;case"mode":return t.onStatisticField?e.get(t.onStatisticField)?.type??null:t.onStatisticExpression?"string"===t.onStatisticExpression.returnType?"string":"double":null;default:return null}}function A(t,e){return y(e)?Q(t,e?.name):r(e)?P(e?.name):null}function H(t,e,n){let i=null;for(const l of n){const n=l?t.getField(l):null,o=Z(t,{...e,field:l,outStatisticTypes:{include:["min","max","sum","count"]}},n,!0,!0);i?i.outStatistics=i.outStatistics.concat(o.outStatistics):i=o}return i.where=t.createQuery()?.where,i}function J(t,e,n,i){return e.map(e=>{const l=new s;let o=null,r=null,a=`${e}_value${i?`_${i}`:""}`;if("variance"===e)o="var",r=n;else if("nullcount"===e){const e=t.objectIdField;o="count",r=e&&t.getField(e)?e:"1",a="totalcount_value"}else"median"===e?(o="percentile-continuous",r=n,l.statisticParameters={value:.5}):(o=e,r=n);return l.statisticType=o,l.onStatisticField=r,l.outStatisticFieldName=a,l})}function Z(t,e,n,i=!0,l=!1){const{field:r,normalizationType:a,normalizationField:s,normalizationTotal:u,minValue:c,maxValue:p,filter:y}=e,v=t.supportsSQLExpression?A(t,n)||e.sqlExpression:null,x=b({field:r,normalizationType:a,normalizationField:s,normalizationTotal:u,layer:t}),w=v||x,F=w?m(w,c,p):null,E=f({field:r,normalizationField:s,normalizationType:a}),S=d(e.sqlWhere,E),T=d(S,F),V=g({normalizationField:s,normalizationType:a,sqlExpression:v,supportsSQLExpression:t.supportsSQLExpression,minValue:c,maxValue:p}),$=o(t.getField(r??void 0)),{include:z,exclude:j}=e.outStatisticTypes||{},q=h.filter(t=>(!z||z.includes(t))&&(!j||!j.includes(t))&&("nullcount"===t?V:!$||"count"===t)&&("median"!==t||i)),C=t.createQuery();return C.where=d(C.where,T),C.sqlFormat=v?"standard":null,C.outStatistics=J(t,q,w,l?r:void 0),X(C,y),C}function G(t,e,n=!0){const{fields:i,filter:l}=e,{include:o,exclude:r}=e.outStatisticTypes||{},s=h.filter(t=>(!o||o.includes(t))&&(!r||!r.includes(t))&&("median"!==t||n)),c=new a;c.where=d(t.createQuery()?.where,e.sqlWhere)??void 0;const m="new_value";return c.outPivots=[new u({sourceFields:i,valueFieldName:m})],c.outStatistics=J(t,s,m),X(c,l),c}function X(t,e){e&&(t.geometry=e.geometry,t.spatialRelationship=e.spatialRelationship,t.timeExtent=t.timeExtent?.intersection(e.timeExtent)??e.timeExtent,t.distance=e.distance,t.units=e.units)}function K(t,e){const{field:n,field2:i,field3:l,sqlExpression:o}=e,r=!(!n||!i),a=t.createQuery();return a.where=d(a.where,e.sqlWhere),a.sqlFormat=o?"standard":null,a.outStatistics=[Y(r?null:n,r?"1":o)].filter(Boolean),a.groupByFieldsForStatistics=[n||o,i,l].filter(Boolean),X(a,e.filter),a}function Y(t,e){const n="countOF"+(t||"Expr"),i=new s;return i.statisticType="count",i.onStatisticField=e?"1":t,i.outStatisticFieldName=n,i}function tt(t,e,n,i=V,l,o,r){const{min:a,max:s,normTotal:u,excludeZerosExpr:c}=e,m=e.intervals||w(a,s,i),f=e.sqlExpr||n;return et(t,m,f,c,l,o,r).then(t=>({bins:t.map((t,e)=>({minValue:m[e][0],maxValue:m[e][1],count:"fulfilled"===t.status?t.value:0})),minValue:a,maxValue:s,normalizationTotal:u}))}function et(t,e,n,i,l,o,r){const a=[],s=e.length;for(let u=0;u<s;u++){const t=d(i,d(n+" >= "+e[u][0],null!==e[u][1]?n+(u===s-1?" <= ":" < ")+e[u][1]:""));a.push(t)}return Promise.allSettled(a.map(e=>t.queryFeatureCount({whereClause:e,view:l,filter:o,signal:r})))}export{V as defaultNumBins,$ as ensureFeaturesJSON,C as generateBinParams,k as getAggregateFieldType,tt as getBins,I as getDomainsForFields,W as getFeatureReductionFields,b as getFieldExpr,R as getHistogramFromFeatureSet,j as getMissingFields,z as getMissingFieldsForBinning,B as getPredominantCategoriesFromUVInfos,A as getSQLExpressionForDateOrTimeField,q as getSummaryStatisticsFromFeatureSet,G as getSummaryStatsPivotQuery,Z as getSummaryStatsQuery,H as getSummaryStatsQueryForFields,K as getUVQuery,D as getUniqueValuesFromFeatureSet,_ as getViewInfoParams,P as msForTimeOnlyFieldSQL,Q as msSinceUnixEpochSQL,X as updateQueryWithFeatureFilter};
5
+ import{isSome as t}from"../../../../core/arrayUtils.js";import{throwIfAborted as e}from"../../../../core/promiseUtils.js";import n from"../../../../layers/support/CodedValue.js";import i from"../../../../layers/support/CodedValueDomain.js";import l from"../../../../layers/support/Field.js";import{isStringField as o,isTimeOnlyField as r}from"../../../../layers/support/fieldUtils.js";import a from"../../../../rest/support/PivotQuery.js";import u from"../../../../rest/support/StatisticDefinition.js";import s from"../../../../rest/support/UnPivotDefinition.js";import{noDominantCategoryField as c}from"../../../statistics/support/predominanceUtils.js";import{getRangeExpr as f,getSQLFilterForNormalization as m,mergeWhereClauses as d}from"../../../statistics/support/utils.js";import{isIntegerField as p,isAnyDateField as y,getDateDiffSQL as v,castIntegerFieldToFloat as x}from"../../utils.js";import{isNullCountSupported as g,statisticTypes as w,getEqualIntervalBins as h,processNullValue as F}from"../../../../statistics/utils.js";const E=/_value$/i,S=Math.LOG10E,T={SECOND:1e3,MINUTE:6e4,HOUR:36e5},V=10;function $(t){return t.map(t=>t.toJSON())}function z(t,e){const n=[],i=t.layer,l="featureReduction"in i?i.featureReduction:null,o="binning"===l?.type,r=null!=l&&"fields"in l?l.fields?.map(t=>t.name?.toLowerCase()).filter(Boolean):[];if(!o||!e)return n;for(const a of e)r.includes(a.toLowerCase())||n.push(a);return n}function q(t,e,n){const i=[];if(e)for(const l of e){const e=t.getField(l);e&&n&&"availableFields"in n&&!n.availableFields?.includes(e.name)&&i.push(e.name)}return i}function C(t,e){const n=t&&t.features;if(0===n?.length)return{avg:null,count:0,max:null,median:null,min:null,nullcount:0,stddev:null,sum:null,variance:null};const i=n?.[0]?.attributes,l={};for(const o in i)l[o.replace(E,"").toLowerCase()]=i[o];return null!=l.totalcount&&l.totalcount>=l.count&&(l.nullcount=l.totalcount-l.count),delete l.totalcount,l.min===l.max&&null!=l.min&&null==l.stddev&&(l.stddev=l.variance=0),e&&(["min","max","avg","stddev","sum","variance"].forEach(t=>{null!=l[t]&&(l[t]=Math.ceil(l[t]))}),l.min===l.max&&null!=l.min&&(l.avg=l.min,l.stddev=l.variance=0)),l}function b(t){const e=[],n=t.classBreaks,i=n[0].minValue,l=n[n.length-1].maxValue;n.forEach(t=>{e.push([t.minValue,t.maxValue])});const o={field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,normalizationTotal:t.normalizationTotal,layer:t.layer};return{min:i,max:l,intervals:e,sqlExpr:j(o),excludeZerosExpr:t.where,normTotal:t.normalizationTotal}}function j(t){const{field:e,normalizationType:n,normalizationField:i,normalizationTotal:l,layer:o}=t,r=p(o,e);let a=e;return"percent-of-total"===n?a=`((${r?x(e):e} / ${l}) * 100)`:"log"===n?a=`(log(${e}) * ${S})`:"field"===n?a=`(${r?x(e):e} / ${i})`:"natural-log"===n?a=`(log(${r?x(e):e}))`:"square-root"===n&&(a=`(power(${r?x(e):e}, 0.5))`),a}function O(t,e){let n;if(e=e.toLowerCase(),t)for(const i in t)if(i.toLowerCase()!==e){n=t[i];break}return n}function L(t,e){let n;if(e=e.toLowerCase(),t)for(const i in t)if(i.toLowerCase()===e){n=t[i];break}return n}function R(t,e,n,i,l){const o={},r="countOFExpr";t&&t.features&&t.features.forEach(t=>{const e=t.attributes,n=O(e,r),i=L(e,r);null!=n&&null!=i&&0!==n&&(o[n]=i)});const a=[];return h(e,n,i).forEach((t,e)=>{const n=(e+1).toString();a.push({minValue:t[0],maxValue:t[1],count:o.hasOwnProperty(n)?o[n]:0})}),{bins:a,minValue:e,maxValue:n,normalizationTotal:l}}async function N(t,n){const i=t&&t.features,{field:l,field2:o,field3:r,fieldDelimiter:a,layer:u,view:s,signal:c,labels:f}=n,m=`countOF${!(!l||!o)?"Expr":l||"Expr"}`,d={};let p=!1;for(const e of i){const t=e.attributes,n=L(t,m);let i=l?L(t,l):O(t,m),u=o?L(t,o):null,s=r?L(t,r):null;null===i&&0===n&&(p=!0),(null==i||"string"==typeof i&&""===i.trim())&&(i=null),o&&(null==u||"string"==typeof u&&""===u.trim())&&(u=null),r&&(null==s||"string"==typeof s&&""===s.trim())&&(s=null);let c=i;o&&(c=`${F(c)}${a}${F(u)}`,r&&(c=`${c}${a}${F(s)}`)),null==d[c]?d[c]={count:n,data:c}:d[c].count=d[c].count+n}if(l&&p){const t=l+" is NULL";try{const e=await u.queryFeatureCount({whereClause:t,view:s,signal:c});return d.null.count=d.null.count+e,U(d,f)}catch{return e(c),U(d,f)}}return U(d,f)}function U(t,e){if(e)for(const n in t)t[n].label=e[n];return{count:t}}async function D(t,e,l){const o=t?l.getField(t):null,r=o?l.getFieldDomain(o.name):null;if(r)return r;const{uniqueValueInfos:a}=await l.uniqueValues({field:t,sqlWhere:e.sqlWhere,features:e.features,useFeaturesInView:e.useFeaturesInView,view:e.view,signal:e.signal}),u=a.map(t=>new n({code:t.value}));return new i({codedValues:u})}async function I(t,e){if(!t.returnAllCodedValues)return[];const{field:n,field2:i,field3:l}=t;if(n&&!i){const t=n?e.getField(n):null,i=t?e.getFieldDomain(t.name):null;return i?[i]:[]}const o=[];return n&&(o.push(D(n,t,e)),i&&(o.push(D(i,t,e)),l&&o.push(D(l,t,e)))),Promise.all(o)}function Q(t,e){return v(t,new Date(0),e,"milliseconds").sqlExpression}function M(t,e){return`EXTRACT(${e} FROM ${t}) * ${T[e]}`}function P(t){if(!t)return null;return x(["HOUR","MINUTE","SECOND"].map(e=>`(${M(t,e)})`).join(" + "))}function _(t){return{viewingMode:"2d"===t.type?"map":t.viewingMode,scale:t.scale,spatialReference:t.spatialReference?.toJSON()}}function B(t,e){const n=new Set(t.map(t=>t.value)),i=e.filter(t=>!n.has(t));for(const l of i)t.push({value:l,count:0});t.sort((t,n)=>e.indexOf(t.value)-e.indexOf(n.value));for(const l of t)l.value===c&&(l.value=null);return{predominantCategoryInfos:t}}function W(e){const n="featureReduction"in e?e.featureReduction:null;return((null!=n&&"fields"in n?n.fields:null)??[]).map(t=>{const n=k(t,e.fieldsIndex);return n?new l({type:n,name:t.name,alias:t.alias}):null}).filter(t)}function k(t,e){switch(t.statisticType){case"avg":case"avg_angle":return"double";case"count":return"integer";case"min":case"max":case"sum":return t.onStatisticField?e.get(t.onStatisticField)?.type??null:t.onStatisticExpression?"string"===t.onStatisticExpression.returnType?null:"double":null;case"mode":return t.onStatisticField?e.get(t.onStatisticField)?.type??null:t.onStatisticExpression?"string"===t.onStatisticExpression.returnType?"string":"double":null;default:return null}}function A(t,e){return y(e)?Q(t,e?.name):r(e)?P(e?.name):null}function H(t,e,n){let i=null;for(const l of n){const n=l?t.getField(l):null,o=Z(t,{...e,field:l,outStatisticTypes:{include:["min","max","sum","count"]}},n,!0,!0);i?i.outStatistics=i.outStatistics.concat(o.outStatistics):i=o}return i.where=t.createQuery()?.where,i}function J(t,e,n,i){return e.map(e=>{const l=new u;let o=null,r=null,a=`${e}_value${i?`_${i}`:""}`;if("variance"===e)o="var",r=n;else if("nullcount"===e){const e=t.objectIdField;o="count",r=e&&t.getField(e)?e:"1",a="totalcount_value"}else"median"===e?(o="percentile-continuous",r=n,l.statisticParameters={value:.5}):(o=e,r=n);return l.statisticType=o,l.onStatisticField=r,l.outStatisticFieldName=a,l})}function Z(t,e,n,i=!0,l=!1){const{field:r,normalizationType:a,normalizationField:u,normalizationTotal:s,minValue:c,maxValue:p,filter:y}=e,v=t.supportsSQLExpression?A(t,n)||e.sqlExpression:null,x=j({field:r,normalizationType:a,normalizationField:u,normalizationTotal:s,layer:t}),h=v||x,F=h?f(h,c,p):null,E=m({field:r,normalizationField:u,normalizationType:a}),S=d(e.sqlWhere,E),T=d(S,F),V=g({normalizationField:u,normalizationType:a,sqlExpression:v,supportsSQLExpression:t.supportsSQLExpression,minValue:c,maxValue:p}),$=o(t.getField(r??void 0)),{include:z,exclude:q}=e.outStatisticTypes||{},C=w.filter(t=>(!z||z.includes(t))&&(!q||!q.includes(t))&&("nullcount"===t?V:!$||"count"===t)&&("median"!==t||i)),b=t.createQuery();return b.where=d(b.where,T),b.sqlFormat=v?"standard":null,b.outStatistics=J(t,C,h,l?r:void 0),X(b,y),b}function G(t,e,n=!0){const{fields:i,filter:l}=e,{include:o,exclude:r}=e.outStatisticTypes||{},u=w.filter(t=>(!o||o.includes(t))&&(!r||!r.includes(t))&&("median"!==t||n)),c=new a;c.where=d(t.createQuery()?.where,e.sqlWhere)??void 0;const f="new_value";return c.outPivots=[new s({sourceFields:i,valueFieldName:f})],c.outStatistics=J(t,u,f),X(c,l),c}function X(t,e){e&&(t.geometry=e.geometry,t.spatialRelationship=e.spatialRelationship,t.timeExtent=t.timeExtent?.intersection(e.timeExtent)??e.timeExtent,t.distance=e.distance,t.units=e.units)}function K(t,e){const{field:n,field2:i,field3:l,sqlExpression:o}=e,r=!(!n||!i),a=t.createQuery();return a.where=d(a.where,e.sqlWhere),a.sqlFormat=o?"standard":null,a.outStatistics=[Y(r?null:n,r?"1":o)].filter(Boolean),a.groupByFieldsForStatistics=[n||o,i,l].filter(Boolean),X(a,e.filter),a}function Y(t,e){const n="countOF"+(t||"Expr"),i=new u;return i.statisticType="count",i.onStatisticField=e?"1":t,i.outStatisticFieldName=n,i}function tt(t,e,n,i=V,l,o,r){const{min:a,max:u,normTotal:s,excludeZerosExpr:c}=e,f=e.intervals||h(a,u,i),m=e.sqlExpr||n;return et(t,f,m,c,l,o,r).then(t=>({bins:t.map((t,e)=>({minValue:f[e][0],maxValue:f[e][1],count:"fulfilled"===t.status?t.value:0})),minValue:a,maxValue:u,normalizationTotal:s}))}function et(t,e,n,i,l,o,r){const a=[],u=e.length;for(let s=0;s<u;s++){const t=d(i,d(n+" >= "+e[s][0],null!==e[s][1]?n+(s===u-1?" <= ":" < ")+e[s][1]:""));a.push(t)}return Promise.allSettled(a.map(e=>t.queryFeatureCount({whereClause:e,view:l,filter:o,signal:r})))}export{V as defaultNumBins,$ as ensureFeaturesJSON,b as generateBinParams,k as getAggregateFieldType,tt as getBins,I as getDomainsForFields,W as getFeatureReductionFields,j as getFieldExpr,R as getHistogramFromFeatureSet,q as getMissingFields,z as getMissingFieldsForBinning,B as getPredominantCategoriesFromUVInfos,A as getSQLExpressionForDateOrTimeField,C as getSummaryStatisticsFromFeatureSet,G as getSummaryStatsPivotQuery,Z as getSummaryStatsQuery,H as getSummaryStatsQueryForFields,K as getUVQuery,N as getUniqueValuesFromFeatureSet,_ as getViewInfoParams,P as msForTimeOnlyFieldSQL,Q as msSinceUnixEpochSQL,X as updateQueryWithFeatureFilter};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- const d="20251214",e="b8dadf73e6e000d534c43ef796f3e83fbd156da2";export{d as buildDate,e as commitHash};
5
+ const d="20251216",e="48385fb8d2d1adb9f9ec2db030481daee90c3457";export{d as buildDate,e as commitHash};
@@ -1,5 +1,4 @@
1
1
  import type Portal from "../portal/Portal.js";
2
- import type CIMSymbol from "./CIMSymbol.js";
3
2
  import type Symbol from "./Symbol.js";
4
3
  import type { AbortOptions } from "../core/promiseUtils.js";
5
4
  import type { SymbolProperties } from "./Symbol.js";
@@ -126,29 +125,6 @@ export default class WebStyleSymbol extends Symbol {
126
125
  * let symLyr = graphic.symbol.clone();
127
126
  */
128
127
  clone(): WebStyleSymbol;
129
- /**
130
- * Returns the [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html) instance the WebStyleSymbol refers to.
131
- *
132
- * @deprecated
133
- * since version 4.33. Use [fetchSymbol()](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html#fetchSymbol) instead. Pass `{ acceptedFormats: ["cim"] }`
134
- * as options to [fetchSymbol()](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html#fetchSymbol) to retrieve only CIM symbols.
135
- * @param options - An object with the following properties.
136
- * @returns When resolved, returns a [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html) instance.
137
- * @since 4.16
138
- * @example
139
- * // Given a SimpleRenderer with a WebStyleSymbol,
140
- * // fetch the corresponding CIMSymbol,
141
- * // then replace the renderer symbol with the returned CIMSymbol
142
- * renderer.symbol.fetchCIMSymbol().then(function (cimSymbol) {
143
- * renderer.symbol = cimSymbol;
144
- * });
145
- *
146
- * // note: the above is deprecated functionality. Use the following instead:
147
- * renderer.symbol.fetchSymbol({ acceptedFormats: ["cim"] }).then(function (cimSymbol) {
148
- * renderer.symbol = cimSymbol;
149
- * });
150
- */
151
- fetchCIMSymbol(options?: WebStyleSymbolFetchSymbolOptions | null | undefined): Promise<CIMSymbol>;
152
128
  /**
153
129
  * Resolves and returns the symbol instance the WebStyleSymbol refers to.
154
130
  *
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{deprecatedFunction as e}from"../core/deprecate.js";import o from"../core/Error.js";import r from"../core/Logger.js";import{throwIfAborted as l}from"../core/promiseUtils.js";import{property as s,subclass as i}from"../core/accessorSupport/decorators.js";import m from"../portal/Portal.js";import{w as y,r as a}from"../chunks/persistableUrlUtils.js";import p from"./Symbol.js";import{Thumbnail as n}from"./support/Thumbnail.js";import{enumeration as c}from"../core/accessorSupport/decorators/enumeration.js";var h;let b=h=class extends p{constructor(t){super(t),this.color=null,this.styleName=null,this.portal=null,this.styleUrl=null,this.thumbnail=null,this.name=null,this.type="web-style"}get _fetchCacheKey(){const t=null!=this.portal?this.portal:m.getDefault(),e=t.user?t.user.username:null;return`${this.styleName}:${this.styleUrl}:${this.name}:${e}:${t.url}`}read(t,e){this.portal=e?.portal,super.read(t,e)}clone(){return new h({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}fetchSymbol(t){return this._fetchSymbol(t)}async fetchCIMSymbol(t){e(r.getLogger(this),"WebStyleSymbol.fetchCIMSymbol is deprecated in favour of WebStyleSymbol.fetchSymbol which now supports both web and cim symbology",{version:"4.33",replacement:"WebStyleSymbol.fetchSymbol",see:"https://arcg.is/0CXPTr#fetchSymbol",warnOnce:!0});const l=await this._fetchSymbol({...t,acceptedFormats:["cim"]});if("cim"!==l?.type)throw new o("webstylesymbol:fetchCIMSymbol","Resolved web style symbol is not of type 'cim'");return l}async _fetchSymbol(t){const e=null!=t?t.cache:null,o=e?this._fetchCacheKey:null;if(null!=e){const t=o&&e.get(o);if(t)return t.clone()}const{resolveWebStyleSymbol:s}=await import("./support/webStyleSymbolUtils.js");l(t);const i=s(this,{portal:this.portal},t);i.catch(t=>{r.getLogger(this).error("#fetchSymbol()","Failed to create symbol from style",t)});const m=await i;return null!=e&&e.set(o,m.clone()),m}};t([s({json:{write:!1}})],b.prototype,"color",void 0),t([s({type:String,json:{write:!0}})],b.prototype,"styleName",void 0),t([s({type:m,json:{write:!1}})],b.prototype,"portal",void 0),t([s({type:String,json:{read:a,write:y}})],b.prototype,"styleUrl",void 0),t([s({type:n,json:{read:!1}})],b.prototype,"thumbnail",void 0),t([s({type:String,json:{write:!0}})],b.prototype,"name",void 0),t([c({styleSymbolReference:"web-style"},{readOnly:!0})],b.prototype,"type",void 0),t([s()],b.prototype,"_fetchCacheKey",null),b=h=t([i("esri.symbols.WebStyleSymbol")],b);export{b as default};
5
+ import{__decorate as t}from"tslib";import e from"../core/Logger.js";import{throwIfAborted as o}from"../core/promiseUtils.js";import{property as r,subclass as l}from"../core/accessorSupport/decorators.js";import s from"../portal/Portal.js";import{w as i,r as p}from"../chunks/persistableUrlUtils.js";import a from"./Symbol.js";import{Thumbnail as n}from"./support/Thumbnail.js";import{enumeration as y}from"../core/accessorSupport/decorators/enumeration.js";var m;let c=m=class extends a{constructor(t){super(t),this.color=null,this.styleName=null,this.portal=null,this.styleUrl=null,this.thumbnail=null,this.name=null,this.type="web-style"}get _fetchCacheKey(){const t=null!=this.portal?this.portal:s.getDefault(),e=t.user?t.user.username:null;return`${this.styleName}:${this.styleUrl}:${this.name}:${e}:${t.url}`}read(t,e){this.portal=e?.portal,super.read(t,e)}clone(){return new m({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}fetchSymbol(t){return this._fetchSymbol(t)}async _fetchSymbol(t){const r=null!=t?t.cache:null,l=r?this._fetchCacheKey:null;if(null!=r){const t=l&&r.get(l);if(t)return t.clone()}const{resolveWebStyleSymbol:s}=await import("./support/webStyleSymbolUtils.js");o(t);const i=s(this,{portal:this.portal},t);i.catch(t=>{e.getLogger(this).error("#fetchSymbol()","Failed to create symbol from style",t)});const p=await i;return null!=r&&r.set(l,p.clone()),p}};t([r({json:{write:!1}})],c.prototype,"color",void 0),t([r({type:String,json:{write:!0}})],c.prototype,"styleName",void 0),t([r({type:s,json:{write:!1}})],c.prototype,"portal",void 0),t([r({type:String,json:{read:p,write:i}})],c.prototype,"styleUrl",void 0),t([r({type:n,json:{read:!1}})],c.prototype,"thumbnail",void 0),t([r({type:String,json:{write:!0}})],c.prototype,"name",void 0),t([y({styleSymbolReference:"web-style"},{readOnly:!0})],c.prototype,"type",void 0),t([r()],c.prototype,"_fetchCacheKey",null),c=m=t([l("esri.symbols.WebStyleSymbol")],c);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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../core/has.js";import{throwIfNotAbortError as t}from"../../../../core/promiseUtils.js";import e from"./Rect.js";import i from"./RectangleBinPack.js";import h from"../../../webgl/Texture.js";import{TextureDescriptor as s}from"../../../webgl/TextureDescriptor.js";const r=256,a=t=>Math.floor(t/256);function n(t){const e=new Set;for(const i of t)e.add(a(i));return e}function c(e,i,h){return e.has(i)||e.set(i,h().then(()=>{e.delete(i)}).catch(h=>{e.delete(i),t(h)})),e.get(i)}const o=t=>({rect:new e(0,0,0,0),page:0,metrics:{left:0,width:0,height:0,advance:0,top:0},code:t,sdf:!0});class l{constructor(t,e,h){this.width=0,this.height=0,this._dirties=[],this._glyphData=[],this._currentPage=0,this._glyphCache={},this._textures=[],this._rangePromises=new Map,this._preloadCache={},this.width=t,this.height=e,this._glyphSource=h,this._binPack=new i(t,e),this._glyphData.push(new Uint8Array(t*e)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs()}dispose(){this._binPack=null;for(const t of this._textures)t&&t.dispose();this._textures.length=0,this._glyphData.length=0}_initDecorationGlyphs(){const t=[117,149,181,207,207,181,149,117],e=[],i=[];for(let r=0;r<t.length;r++){const h=t[r];for(let t=0;t<11;t++){const s=r>=3&&r<5&&t>=3&&t<8?255:0;e.push(h),i.push(s)}}const h={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(e)},s={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(i)};this._recordGlyph(h),this._recordGlyph(s)}getTexture(t,e){if(!this._textures[e]){const i=new s(this.width,this.height);i.pixelFormat=6406,i.wrapMode=33071,this._textures[e]=new h(t,i,new Uint8Array(this.width*this.height))}return this._dirties[e]&&(this._textures[e].setData(this._glyphData[e]),this._dirties[e]=!1),this._textures[e]}async getGlyphItems(t,e,i){const h=this._getGlyphCache(t);return await this._fetchRanges(t,e,i),e.map(e=>this._getMosaicItem(h,t,e))}bind(t,e,i,h){const s=this.getTexture(t,i);s.setSamplingMode(e),t.bindTexture(s,h)}preloadASCIIGlyphCache(t){const e=this._preloadCache[t];if(null!=e)return e;const i=this._glyphSource.preloadASCIIRange(t).then(()=>{const e=this._getGlyphCache(t);for(let i=0;i<256;i++)this._getMosaicItem(e,t,i)});return this._preloadCache[t]=i,i}_getGlyphCache(t){return this._glyphCache[t]||(this._glyphCache[t]={}),this._glyphCache[t]}_invalidate(){this._dirties[this._currentPage]=!0}async _fetchRanges(t,e,i){const h=n(e),s=[];h.forEach(e=>{s.push(this._fetchRange(t,e,i))}),await Promise.all(s)}async _fetchRange(t,e,i){if(e>r)return;const h=t+e;return c(this._rangePromises,h,()=>this._glyphSource.getRange(t,e,i))}_getMosaicItem(t,e,i){if(!t[i]){const h=this._glyphSource.getGlyph(e,i);if(!h?.metrics)return o(i);const s=this._recordGlyph(h),r=this._currentPage,a=h.metrics;t[i]={rect:s,page:r,metrics:a,code:i,sdf:!0},this._invalidate()}return t[i]}_recordGlyph(t){const h=t.metrics;let s;if(0===h.width)s=new e(0,0,0,0);else{const e=3,r=h.width+2*e,a=h.height+2*e;s=this._binPack.allocate(r,a),s.isEmpty&&(this._dirties[this._currentPage]||(this._glyphData[this._currentPage]=null),this._currentPage=this._glyphData.length,this._glyphData.push(new Uint8Array(this.width*this.height)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs(),this._binPack=new i(this.width,this.height),s=this._binPack.allocate(r,a));const n=this._glyphData[this._currentPage],c=t.bitmap;let o,l;if(c)for(let t=0;t<a;t++){o=r*t,l=this.width*(s.y+t)+s.x;for(let t=0;t<r;t++)n[l+t]=c[o+t]}has("esri-glyph-debug")&&this._showDebugPage(n)}return s}_showDebugPage(t){const e=document.createElement("canvas"),i=e.getContext("2d"),h=new ImageData(this.width,this.height),s=h.data;e.width=this.width,e.height=this.height,e.style.border="1px solid black";for(let r=0;r<t.length;++r)s[4*r]=t[r],s[4*r+1]=0,s[4*r+2]=0,s[4*r+3]=255;i.putImageData(h,0,0),document.body.appendChild(e)}}export{l as default};
5
+ import t from"../../../../request.js";import{bidiText as e}from"../../../../core/BidiText.js";import has from"../../../../core/has.js";import{throwIfNotAbortError as i}from"../../../../core/promiseUtils.js";import{loadTextModule as s}from"../../../../libs/text/loadTextModule.js";import{sdfRadiusComplex as h,sdfBufferGlyphSDFCreator as r,sdfSizeComplex as a,sdfBufferServer as o}from"./definitions.js";import{GlyphSDFCreator as n}from"./GlyphSDFCreator.js";import c from"./Rect.js";import l from"./RectangleBinPack.js";import{charCodes as p}from"./Utils.js";import g from"../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../webgl/TextureDescriptor.js";const d=256,f=.25,u=t=>Math.floor(t/256);function y(t){const e=new Set;for(const i of t)e.add(u(i));return e}function m(t,e,s){return t.has(e)||t.set(e,s().then(()=>{t.delete(e)}).catch(s=>{t.delete(e),i(s)})),t.get(e)}const w=t=>({rect:new c(0,0,0,0),page:0,metrics:{left:0,width:0,height:0,advance:0,top:0},code:t,sdf:!0});class x{constructor(t,e,i){this.width=0,this.height=0,this._dirties=[],this._glyphData=[],this._currentPage=0,this._glyphCache={},this._glyphCacheById={},this._textures=[],this._rangePromises=new Map,this._facePromises=new Map,this._preloadCache={},this._glyphSDFCreator=new n({sdfSizePx:a,sdfBufferPx:r,radius:h,cutoff:f}),this._faces=new Map,this.width=t,this.height=e,this._glyphSource=i,this._binPack=new l(t,e),this._glyphData.push(new Uint8Array(t*e)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs()}dispose(){this._binPack=null;for(const t of this._textures)t&&t.dispose();this._textures.length=0,this._glyphData.length=0}_initDecorationGlyphs(){const t=[117,149,181,207,207,181,149,117],e=[],i=[];for(let r=0;r<t.length;r++){const s=t[r];for(let t=0;t<11;t++){const h=r>=3&&r<5&&t>=3&&t<8?255:0;e.push(s),i.push(h)}}const s={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(e)},h={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(i)};this._recordGlyph(s,o),this._recordGlyph(h,o)}getTexture(t,e){if(!this._textures[e]){const i=new _(this.width,this.height);i.pixelFormat=6406,i.wrapMode=33071,this._textures[e]=new g(t,i,new Uint8Array(this.width*this.height))}return this._dirties[e]&&(this._textures[e].setData(this._glyphData[e]),this._dirties[e]=!1),this._textures[e]}async getGlyphItems(t,i,s,h){let r,a,o=!1;if(i){const i=this._getGlyphCacheById(s),h=await this.getFace(s),n=this._glyphSDFCreator.sdfSizePx,[c,l,p]=e(t,!1);o=l;const g=new Uint32Array(Array.from(c).map((t,e)=>p.levels[p.targetToSource[e]]));r={baseline:h.baseline()/n,midline:h.midline()/n},a=h.shape(c,g,n).map(t=>this._getMosaicItemComplex(i,t,h))}else{const[i,r,n]=e(t);o=r;const c=this._getGlyphCache(s),l=p(i);await this._fetchRanges(s,l,h),a=l.map(t=>this._getMosaicItem(c,s,t))}return{isRightToLeft:o,glyphs:a,faceInfo:r}}async getFace(e){if(this._faces.has(e))return this._faces.get(e);const i=this._glyphSource.woffURL(e);return await m(this._facePromises,e,async()=>{const h=await t(i,{responseType:"array-buffer"}),r=(await s()).Face.parseWoff2(new Uint8Array(h.data));this._faces.set(e,r)}),this._faces.get(e)}_getMosaicItem(t,e,i){if(!t[i]){const s=this._glyphSource.getGlyph(e,i);if(!s?.metrics)return w(i);const h=this._recordGlyph(s,o),r=this._currentPage,a=s.metrics;t[i]={rect:h,page:r,metrics:a,code:i,sdf:!0},this._invalidate()}return t[i]}_getMosaicItemComplex(t,e,i){if(!t[e.glyphId]){const s=this._glyphSDFCreator.draw(i,e.glyphId),h={width:s?.width??0,height:s?.height??0,left:s?.left??0,top:s?.top??0,advance:e.xAdvance};let a=new c(0,0,0,0);if(s){const t={bitmap:s.buffer,metrics:h};a=this._recordGlyph(t,r)}const o=e.isNewline?10:e.isWhitespace?32:NaN;t[e.glyphId]={rect:a,page:this._currentPage,metrics:h,sdf:!0,code:o}}return t[e.glyphId]}bind(t,e,i,s){const h=this.getTexture(t,i);h.setSamplingMode(e),t.bindTexture(h,s)}preloadASCIIGlyphCache(t){const e=this._preloadCache[t];if(null!=e)return e;const i=this._glyphSource.preloadASCIIRange(t).then(()=>{const e=this._getGlyphCache(t);for(let i=0;i<256;i++)this._getMosaicItem(e,t,i)});return this._preloadCache[t]=i,i}_getGlyphCache(t){return this._glyphCache[t]||(this._glyphCache[t]={}),this._glyphCache[t]}_getGlyphCacheById(t){return this._glyphCacheById[t]||(this._glyphCacheById[t]={}),this._glyphCacheById[t]}_invalidate(){this._dirties[this._currentPage]=!0}async _fetchRanges(t,e,i){const s=y(e),h=[];s.forEach(e=>{h.push(this._fetchRange(t,e,i))}),await Promise.all(h)}async _fetchRange(t,e,i){if(e>d)return;const s=t+e;return m(this._rangePromises,s,()=>this._glyphSource.getRange(t,e,i))}_allocNewPage(){this._dirties[this._currentPage]||(this._glyphData[this._currentPage]=null),this._currentPage=this._glyphData.length,this._glyphData.push(new Uint8Array(this.width*this.height)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs(),this._binPack=new l(this.width,this.height)}_recordGlyph(t,e){const i=t.metrics;let s;if(0===i.width)s=new c(0,0,0,0);else{const h=i.width+2*e,r=i.height+2*e;s=this._binPack.allocate(h,r),s.isEmpty&&(this._allocNewPage(),s=this._binPack.allocate(h,r));const a=this._glyphData[this._currentPage],o=t.bitmap;let n,c;if(o)for(let t=0;t<r;t++){n=h*t,c=this.width*(s.y+t)+s.x;for(let t=0;t<h;t++)a[c+t]=o[n+t]}has("esri-glyph-debug")&&this._showDebugPage(a)}return s}_showDebugPage(t){const e=document.createElement("canvas"),i=e.getContext("2d"),s=new ImageData(this.width,this.height),h=s.data;e.width=this.width,e.height=this.height,e.style.border="1px solid black";for(let r=0;r<t.length;++r)h[4*r]=t[r],h[4*r+1]=0,h[4*r+2]=0,h[4*r+3]=255;i.putImageData(s,0,0),document.body.appendChild(e)}}export{x as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ const t=1e20;class e{constructor(t){this.sdfSizePx=t.sdfSizePx,this.sdfBufferPx=t.sdfBufferPx,this.radius=t.radius,this.cutoff=t.cutoff;const e=t.sdfSizePx+8*t.sdfBufferPx;this.canvasSize=e;const s=this._createCanvas(e);this.context=s.getContext("2d",{willReadFrequently:!0}),this.context.imageSmoothingEnabled=!1,this.context.fillStyle="black",this.context.strokeStyle="black",this.gridOuter=new Float64Array(e*e),this.gridInner=new Float64Array(e*e),this.gridValues=new Float64Array(e),this.parabolaBoundaries=new Float64Array(e+1),this.parabolaIndices=new Uint16Array(e)}draw(e,s){const{context:i,gridInner:r,gridOuter:a,sdfSizePx:n,sdfBufferPx:o,canvasSize:l,cutoff:c,radius:h}=this;this.context.fillStyle="black",this.context.strokeStyle="black",this.context.clearRect(0,0,l,l);const f=e.paintCurves(s,i,n,o);if(!f)return null;const d=Math.ceil(f.width),u=Math.ceil(f.height),x=f.top,g=f.left;f.free();const w=d+2*o,y=u+2*o,S=new Uint8ClampedArray(Math.max(w*y,0)),b={buffer:S,width:d,height:u,top:x,left:g};if(0===d||0===u)return b;const p=i.getImageData(o,o,d,u);a.fill(t,0,S.length),r.fill(0,0,S.length);for(let P=0;P<u;P++)for(let e=0;e<d;e++){const s=p.data[4*(P*d+e)+3]/255;if(0===s)continue;const i=(P+o)*w+e+o;if(1===s)a[i]=0,r[i]=t;else{const t=.5-s;a[i]=t>0?t*t:0,r[i]=t<0?t*t:0}}this._edt(a,0,0,w,y,w),this._edt(r,0,0,w,y,w);for(let t=0;t<S.length;t++){const e=Math.sqrt(a[t])-Math.sqrt(r[t]);S[t]=Math.round(255-255*(e/h+c))}return b}_createCanvas(t){const e=document.createElement("canvas");return e.width=e.height=t,e}_edt(t,e,s,i,r,a){for(let n=e;n<e+i;n++)this._edt1d(t,s*a+n,a,r);for(let n=s;n<s+r;n++)this._edt1d(t,n*a+e,1,i)}_edt1d(e,s,i,r){const a=this.parabolaIndices,n=this.parabolaBoundaries,o=this.gridValues;a[0]=0,n[0]=-t,n[1]=t,o[0]=e[s];for(let l=1,c=0,h=0;l<r;l++){o[l]=e[s+l*i];const r=l*l;do{const t=a[c];h=(o[l]-o[t]+r-t*t)/(l-t)/2}while(h<=n[c]&&--c>-1);c++,a[c]=l,n[c]=h,n[c+1]=t}for(let t=0,l=0;t<r;t++){for(;n[l+1]<t;)l++;const r=a[l],c=t-r;e[s+t*i]=o[r]+c*c}}}export{e as GlyphSDFCreator};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../request.js";import t from"../../../../core/pbf.js";class a{constructor(e){for(this._metrics=[],this._bitmaps=[];e.next();)switch(e.tag()){case 1:{const t=e.getMessage();for(;t.next();)switch(t.tag()){case 3:{const e=t.getMessage();let a,s,r,n,i,c,g;for(;e.next();)switch(e.tag()){case 1:a=e.getUInt32();break;case 2:s=e.getBytes();break;case 3:r=e.getUInt32();break;case 4:n=e.getUInt32();break;case 5:i=e.getSInt32();break;case 6:c=e.getSInt32();break;case 7:g=e.getUInt32();break;default:e.skip()}e.release(),a&&(this._metrics[a]={width:r,height:n,left:i,top:c,advance:g},this._bitmaps[a]=s);break}default:t.skip()}t.release();break}default:e.skip()}}getMetrics(e){return this._metrics[e]}getBitmap(e){return this._bitmaps[e]}}class s{constructor(){this._ranges=[]}getRange(e){return this._ranges[e]}addRange(e,t){this._ranges[e]=t}}class r{constructor(e){this._glyphInfo={},this._baseURL=e}getRange(s,r,n){const i=this._getFontStack(s);if(i.getRange(r))return Promise.resolve();const c=256*r,g=c+255,o=this._baseURL.replace("{fontstack}",s).replace("{range}",c+"-"+g);return e(o,{responseType:"array-buffer",...n}).then(e=>{i.addRange(r,new a(new t(new Uint8Array(e.data),new DataView(e.data))))})}async preloadASCIIRange(s){const r=this._getFontStack(s),n=0,i=255,c=this._baseURL.replace("{fontstack}",s).replace("{range}",n+"-"+i),g=await e(c,{responseType:"array-buffer"}),o=new a(new t(new Uint8Array(g.data),new DataView(g.data)));for(let e=n;e<=i;e++)r.getRange(e)||r.addRange(e,o)}getGlyph(e,t){const a=this._getFontStack(e);if(!a)return;const s=Math.floor(t/256),r=a.getRange(s);return r?{metrics:r.getMetrics(t),bitmap:r.getBitmap(t)}:void 0}_getFontStack(e){let t=this._glyphInfo[e];return t||(t=this._glyphInfo[e]=new s),t}}export{r as default};
5
+ import t from"../../../../config.js";import e from"../../../../request.js";import a from"../../../../core/pbf.js";class s{constructor(t){for(this._metrics=[],this._bitmaps=[];t.next();)switch(t.tag()){case 1:{const e=t.getMessage();for(;e.next();)switch(e.tag()){case 3:{const t=e.getMessage();let a,s,r,n,c,i,o;for(;t.next();)switch(t.tag()){case 1:a=t.getUInt32();break;case 2:s=t.getBytes();break;case 3:r=t.getUInt32();break;case 4:n=t.getUInt32();break;case 5:c=t.getSInt32();break;case 6:i=t.getSInt32();break;case 7:o=t.getUInt32();break;default:t.skip()}t.release(),a&&(this._metrics[a]={width:r,height:n,left:c,top:i,advance:o},this._bitmaps[a]=s);break}default:e.skip()}e.release();break}default:t.skip()}}getMetrics(t){return this._metrics[t]}getBitmap(t){return this._bitmaps[t]}}class r{constructor(){this._ranges=[]}getRange(t){return this._ranges[t]}addRange(t,e){this._ranges[t]=e}}class n{constructor(e){this._glyphInfo={},this._baseURL=e,this._woff2URL=`${t.fontsUrl}/woff2/{fontstack}.woff2`}async getRange(t,r,n){const c=this._getFontStack(t);if(c.getRange(r))return;const i=256*r,o=i+255,g=this._baseURL.replace("{fontstack}",t).replace("{range}",i+"-"+o);return e(g,{responseType:"array-buffer",...n}).then(t=>{c.addRange(r,new s(new a(new Uint8Array(t.data),new DataView(t.data))))})}async preloadASCIIRange(t){const r=this._getFontStack(t),n=0,c=255,i=this._baseURL.replace("{fontstack}",t).replace("{range}",n+"-"+c),o=await e(i,{responseType:"array-buffer"}),g=new s(new a(new Uint8Array(o.data),new DataView(o.data)));for(let e=n;e<=c;e++)r.getRange(e)||r.addRange(e,g)}getGlyph(t,e){const a=this._getFontStack(t);if(!a)return;const s=Math.floor(e/256),r=a.getRange(s);return r?{metrics:r.getMetrics(e),bitmap:r.getBitmap(e)}:void 0}woffURL(t){return this._woff2URL.replace("{fontstack}",t)}_getFontStack(t){let e=this._glyphInfo[t];return e||(e=this._glyphInfo[t]=new r),e}}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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../config.js";import t from"../../../../request.js";import{bidiText as i}from"../../../../core/BidiText.js";import r from"../../../../core/Error.js";import{getFullyQualifiedFontName as s}from"../../../../core/fontUtils.js";import has from"../../../../core/has.js";import a from"../../../../core/Logger.js";import{throwIfAborted as n,isAbortError as o}from"../../../../core/promiseUtils.js";import{QueueProcessor as c}from"../../../../core/QueueProcessor.js";import{pt2px as h}from"../../../../core/screenUtils.js";import{numericHash as l}from"../../../../core/string.js";import u from"../../../../symbols/cim/CIMResourceManager.js";import{CIMSymbolHelper as p}from"../../../../symbols/cim/CIMSymbolHelper.js";import m from"../../../../symbols/cim/Rasterizer.js";import{normalizeDashTemplate as d}from"../../../../symbols/cim/utils.js";import{svgSdfTextureInnerSize as g,textureBindingSpriteAtlas as f,textureBindingGlyphAtlas as y}from"./definitions.js";import _ from"./GlyphMosaic.js";import M from"./GlyphSource.js";import I from"./Rect.js";import w from"./SDFConverter.js";import S from"./SpriteMosaic.js";import{discardUrlIfHasUrlHash as z}from"./urlUtils.js";import{charCodes as T,getCIMMarkerPlacementHash as C,isSVGImage as R}from"./Utils.js";import{AnimatableTextureResource as x}from"./animatedFormats/AnimatableTextureResource.js";import{AnimationStore as P}from"./animations/store/AnimationStore.js";const b="arial-unicode-ms-regular",$=()=>a.getLogger("esri.views.MapView"),j=(e,t,i)=>$().error(new r(e,t,i)),v=(e,t="")=>$().warnOnce(e,t);class k{static fromMosaic(e,t){return new k(e,t.page,t.sdf,t.samplingMode)}constructor(e,t,i,r){this.mosaicType=e,this.page=t,this.sdf=i,this.samplingMode=r}}class F{constructor(i){this._requestRender=i,this._resourceManager=new u,this._invalidFonts=new Set,this._sdfConverter=new w(g),this._bindingInfos=new Array,this._hashToBindingIndex=new Map,this._ongoingRasterizations=new Map,this._imageRequestQueue=new c({concurrency:10,process:async(e,i)=>{n(i);try{return await t(e,{responseType:"image",signal:i})}catch(s){if(!o(s))throw new r("mapview-invalid-resource",`Could not fetch requested resource at ${e}`,s);throw s}}}),this.animationStore=new P,this._spriteMosaic=new S(2048,2048,500),this._glyphSource=new M(`${e.fontsUrl}/{fontstack}/{range}.pbf`),this._glyphMosaic=new _(1024,1024,this._glyphSource),this._rasterizer=new m(this.resourceManager)}dispose(){this._spriteMosaic.dispose(),this._glyphMosaic.dispose(),this._rasterizer.dispose(),this._sdfConverter.dispose(),this._spriteMosaic=null,this._glyphMosaic=null,this._sdfConverter=null,this._hashToBindingIndex.clear(),this._hashToBindingIndex=null,this._bindingInfos=null,this._ongoingRasterizations.clear(),this._ongoingRasterizations=null,this._imageRequestQueue.clear(),this._imageRequestQueue=null,this._resourceManager.destroy(),this.animationStore.destroy()}get sprites(){return this._spriteMosaic}get glyphs(){return this._glyphMosaic}get resourceManager(){return this._resourceManager}async rasterizeItem(e,t){if(null==e)return j("mapview-null-resource","Unable to rasterize null resource"),null;if("animation-info"===e.type){const{resource:t}=e,i=this.animationStore.add(t),{location:r}=i;return{rect:new I(r.column,r.row,t.length,1),page:r.page,type:"sprite",width:t.length,height:1,rasterizationScale:1,sdfPaddingRatio:.5,samplingMode:"Linear",sdfDecodeCoeff:1,simplePattern:!1}}if("cim-rasterization-info"!==e.type)return j("mapview-unexpected-resource","Unable to rasterize resource"),null;const{resource:i}=e;if("text"===i.type){const e=await this._rasterizeText(i,t);for(const t of e.glyphs)this._setTextureBinding(1,t);return e}const r=await this._rasterizeSprite(i,t);return r&&this._setTextureBinding(0,r),r}getMosaicInfo(e,t,i=!1){const r=this._getTextureBindingInfo(e,t,i);return r?{size:r.size,texture:{texture:r.texture,unit:"sprite"===r.type?f:y}}:(j("mapview-invalid-resource",`Unable to find resource for ${t}`),{size:[0,0],texture:{texture:null,unit:0}})}_getTextureBindingInfo(e,t,i){const{context:r}=e,s=this._bindingInfos[t-1],a=s.page,n="Nearest"===s.samplingMode?9728:i?9987:9729;switch(s.mosaicType){case 0:{const t=[this.sprites.getWidth(a),this.sprites.getHeight(a)],i=this._spriteMosaic.getTexture(e,a);return i.setSamplingMode(n),{type:"sprite",texture:i,size:t}}case 1:{const e=[this.glyphs.width,this.glyphs.height],t=this._glyphMosaic.getTexture(r,a);return this._glyphMosaic.bind(r,n,a,y),t.setSamplingMode(n),{type:"glyph",texture:t,size:e}}default:return j("mapview-texture-manager",`Cannot handle unknown type ${s.mosaicType}`),null}}_hashMosaic(e,t){return 1|e<<1|(t.sdf?1:0)<<2|("Nearest"===t.samplingMode?1:0)<<3|t.page<<4}_setTextureBinding(e,t){const i=this._hashMosaic(e,t);if(!this._hashToBindingIndex.has(i)){const r=k.fromMosaic(e,t),s=this._bindingInfos.length+1;this._hashToBindingIndex.set(i,s),this._bindingInfos.push(r)}t.textureBinding=this._hashToBindingIndex.get(i)}async _rasterizeText(e,t){const{font:r,textString:a}=e,n=s(r),o=this._invalidFonts.has(n),[c,h]=i(a),l=T(c);try{const e=o?b:n;has("esri-2d-stabilize-glyphs")&&await this._glyphMosaic.preloadASCIIGlyphCache(e);return{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems(e,l,t),isRightToLeft:h}}catch(u){v(`Font ${n} is not available on the web, using "Arial Unicode MS Regular"`),this._invalidFonts.add(n);return{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems(b,l,t),isRightToLeft:h}}}_hashSpriteResource(e){switch(e.type){case"path":return`path:${e.path}.${e.asFill?1:0}`;case"CIMPictureMarker":return`${e.type}:${e.url}:${e.size}:${C(e.markerPlacement)}`;case"CIMPictureFill":return`${e.type}:${e.url}:${e.height}`;case"CIMPictureStroke":return`${e.type}:${e.url}:${e.width}`;case"dash":return`dash:${e.capStyle}.${d(e.dashTemplate).join("")}`;case"sdf":return`sdf:${JSON.stringify(e.geometry)}.${e.sdfTextureSize}.${e.asFill?1:0}`;case"fill-style":return`fill_style:${e.style}`;case"animated":return JSON.stringify(z(e));case"CIMGradientFill":case"CIMGradientStroke":return`gradient:${JSON.stringify(e.colorRamp)}.${e.gradientType}.${e.interval}`;case"CIMHatchFill":case"CIMVectorMarker":return JSON.stringify(e)}}async _rasterizeSprite(e,t){if(!e)return null;const i=l(this._hashSpriteResource(e));if(this._spriteMosaic.has(i))return this._spriteMosaic.getSpriteItem(i);if("url"in e&&e.url||"CIMPictureFill"===e.type||"CIMPictureStroke"===e.type||"CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type){const t=[];p.fetchResources({type:"CIMPointSymbol",symbolLayers:[e]},this._resourceManager,t),t.length>0&&await Promise.all(t)}switch(e.type){case"CIMPictureMarker":return"CIMMarkerPlacementInsidePolygon"===e.markerPlacement?.type?this._rasterizeJSONResource(i,e):this._handleAsyncResource(i,e,t);case"animated":case"CIMPictureFill":case"CIMPictureStroke":case"path":return this._handleAsyncResource(i,e,t);case"CIMGradientFill":case"CIMGradientStroke":case"CIMHatchFill":case"CIMVectorMarker":case"dash":case"fill-style":case"sdf":return this._rasterizeJSONResource(i,e)}}_rasterizeJSONResource(e,t){const i=this._rasterizer.rasterizeJSONResource(t);if(i){const{size:r,image:s,sdf:a,simplePattern:n,rasterizationScale:o,samplingMode:c,sdfPaddingRatio:h,sdfDecodeCoeff:l}=i;return this._addItemToMosaic(e,r,{type:"static",data:s},A(t),a,n,o,c,h,l)}return null}async _handleAsyncResource(e,t,i){if(this._ongoingRasterizations.has(e))return this._ongoingRasterizations.get(e);let r;return r="path"===t.type?this._handleSVG(t,e,i):this._handleImage(t,e,i),this._ongoingRasterizations.set(e,r),r.finally(()=>this._ongoingRasterizations.delete(e)),r}async _handleSVG(e,t,i){const r=[g,g],{asFill:s}=e,a=await this._sdfConverter.draw(e.path,s,i);return this._addItemToMosaic(t,r,{type:"static",data:new Uint32Array(a.buffer)},!1,!0,!0)}_handleGIFOrPNG(e,t,i){const r=e.url,s=this.resourceManager.getResource(r);if(null==s)return null;const{width:a,height:n}=s;if(s instanceof HTMLImageElement){if("animated"===e.type)return j("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;const i="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:r,sdf:o,image:c}=this._rasterizer.rasterizeImageResource(a,n,s,i);return this._addItemToMosaic(t,r,{type:"static",data:c},A(e),o,!1)}let o,c,h;"animated"===e.type?(o=!1,c={type:"CIMAnimatedSymbolProperties",playAnimation:e.playAnimation,reverseAnimation:e.reverseAnimation,randomizeStartTime:e.randomizeStartTime,randomizeStartSeed:e.randomizeStartSeed,startTimeOffset:e.startTimeOffset,duration:e.duration,repeatType:e.repeatType,repeatDelay:e.repeatDelay},h=e.startGroup||0):(o=A(e),c={type:"CIMAnimatedSymbolProperties"},h=0);const l=new x(s,this._requestRender,c,h);return this._addItemToMosaic(t,[l.width,l.height],{type:"animated",data:l},o,!1,!1)}async _handleImage(e,t,i){const s=e.url;if(B(s)||N(s))return this._handleGIFOrPNG(e,t,i);if("animated"===e.type)return j("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;try{let r;const a=this.resourceManager.getResource(s);if(null!=a&&a instanceof HTMLImageElement)r=a;else{const{data:e}=await this._imageRequestQueue.push(s,{...i});r=e}if(R(s))if("width"in e&&"height"in e)r.width=h(e.width),r.height=h(e.height);else if("cim"in e){const t=e;r.width=h(t.width??t.scaleX*t.size),r.height=h(t.size)}if(!r.width||!r.height)return null;const n=r.width,o=r.height,c="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:l,sdf:u,image:p}=this._rasterizer.rasterizeImageResource(n,o,r,c);return this._addItemToMosaic(t,l,{type:"static",data:p},A(e),u,!1)}catch(j){if(!o(j))throw new r("mapview-invalid-resource",`Could not fetch requested resource at ${s}. ${j.message}`);throw j}}_addItemToMosaic(e,t,i,r,s,a,n,o,c,h){return this._spriteMosaic.addSpriteItem(e,t,i,r,s,a,n,o,c,h)}}function A(e){switch(e.type){case"CIMVectorMarker":case"CIMPictureMarker":return U(e);default:return!0}}const G=e=>null!=e&&e.startsWith("data:image/gif"),B=e=>e&&(e.includes(".gif")||G(e)),O=e=>null!=e&&e.startsWith("data:image/png"),N=e=>e&&(e.includes(".png")||O(e)),U=e=>e&&"markerPlacement"in e&&e.markerPlacement&&"CIMMarkerPlacementInsidePolygon"===e.markerPlacement.type;export{F as default};
5
+ import e from"../../../../config.js";import t from"../../../../request.js";import i from"../../../../core/Error.js";import{getFullyQualifiedFontName as s}from"../../../../core/fontUtils.js";import has from"../../../../core/has.js";import r from"../../../../core/Logger.js";import{throwIfAborted as a,isAbortError as n}from"../../../../core/promiseUtils.js";import{QueueProcessor as o}from"../../../../core/QueueProcessor.js";import{pt2px as c}from"../../../../core/screenUtils.js";import{numericHash as h}from"../../../../core/string.js";import l from"../../../../symbols/cim/CIMResourceManager.js";import{CIMSymbolHelper as u}from"../../../../symbols/cim/CIMSymbolHelper.js";import p from"../../../../symbols/cim/Rasterizer.js";import{normalizeDashTemplate as d}from"../../../../symbols/cim/utils.js";import{svgSdfTextureInnerSize as m,textureBindingSpriteAtlas as g,textureBindingGlyphAtlas as f,sdfBufferGlyphSDFCreator as y,sdfBufferServer as _,sdfRadiusComplex as M,sdfRadiusSimple as I,sdfSizeComplex as w,sdfSizeSimple as S}from"./definitions.js";import z from"./GlyphMosaic.js";import T from"./GlyphSource.js";import R from"./Rect.js";import C from"./SDFConverter.js";import x from"./SpriteMosaic.js";import{discardUrlIfHasUrlHash as P}from"./urlUtils.js";import{getCIMMarkerPlacementHash as b,isSVGImage as $}from"./Utils.js";import{AnimatableTextureResource as v}from"./animatedFormats/AnimatableTextureResource.js";import{AnimationStore as j}from"./animations/store/AnimationStore.js";const k="arial-unicode-ms-regular",F=/[\u0695\u0698\u06a9\u06af\u06b5\u06be\u06c6\u06cc\u06ce\u06d5\u06ca]|\p{Script=Thai}|\p{Script=Lao}|\p{Script=Tamil}|\p{Script=Khmer}/u,A=()=>r.getLogger("esri.views.MapView"),G=(e,t,s)=>A().error(new i(e,t,s)),O=(e,t="")=>A().warnOnce(e,t);class B{static fromMosaic(e,t){return new B(e,t.page,t.sdf,t.samplingMode)}constructor(e,t,i,s){this.mosaicType=e,this.page=t,this.sdf=i,this.samplingMode=s}}class N{constructor(s){this._requestRender=s,this._resourceManager=new l,this._invalidFonts=new Set,this._sdfConverter=new C(m),this._bindingInfos=new Array,this._hashToBindingIndex=new Map,this._ongoingRasterizations=new Map,this._imageRequestQueue=new o({concurrency:10,process:async(e,s)=>{a(s);try{return await t(e,{responseType:"image",signal:s})}catch(r){if(!n(r))throw new i("mapview-invalid-resource",`Could not fetch requested resource at ${e}`,r);throw r}}}),this.animationStore=new j,this._spriteMosaic=new x(2048,2048,500),this._glyphSource=new T(`${e.fontsUrl}/{fontstack}/{range}.pbf`),this._glyphMosaic=new z(1024,1024,this._glyphSource),this._rasterizer=new p(this.resourceManager)}dispose(){this._spriteMosaic.dispose(),this._glyphMosaic.dispose(),this._rasterizer.dispose(),this._sdfConverter.dispose(),this._spriteMosaic=null,this._glyphMosaic=null,this._sdfConverter=null,this._hashToBindingIndex.clear(),this._hashToBindingIndex=null,this._bindingInfos=null,this._ongoingRasterizations.clear(),this._ongoingRasterizations=null,this._imageRequestQueue.clear(),this._imageRequestQueue=null,this._resourceManager.destroy(),this.animationStore.destroy()}get sprites(){return this._spriteMosaic}get glyphs(){return this._glyphMosaic}get resourceManager(){return this._resourceManager}async rasterizeItem(e,t){if(null==e)return G("mapview-null-resource","Unable to rasterize null resource"),null;if("animation-info"===e.type){const{resource:t}=e,i=this.animationStore.add(t),{location:s}=i;return{rect:new R(s.column,s.row,t.length,1),page:s.page,type:"sprite",width:t.length,height:1,rasterizationScale:1,sdfPaddingRatio:.5,samplingMode:"Linear",sdfDecodeCoeff:1,simplePattern:!1}}if("cim-rasterization-info"!==e.type)return G("mapview-unexpected-resource","Unable to rasterize resource"),null;const{resource:i}=e;if("text"===i.type){const e=await this._rasterizeText(i,t);for(const t of e.glyphs)this._setTextureBinding(1,t);return e}const s=await this._rasterizeSprite(i,t);return s&&this._setTextureBinding(0,s),s}getMosaicInfo(e,t,i=!1){const s=this._getTextureBindingInfo(e,t,i);return s?{size:s.size,texture:{texture:s.texture,unit:"sprite"===s.type?g:f}}:(G("mapview-invalid-resource",`Unable to find resource for ${t}`),{size:[0,0],texture:{texture:null,unit:0}})}_getTextureBindingInfo(e,t,i){const{context:s}=e,r=this._bindingInfos[t-1],a=r.page,n="Nearest"===r.samplingMode?9728:i?9987:9729;switch(r.mosaicType){case 0:{const t=[this.sprites.getWidth(a),this.sprites.getHeight(a)],i=this._spriteMosaic.getTexture(e,a);return i.setSamplingMode(n),{type:"sprite",texture:i,size:t}}case 1:{const e=[this.glyphs.width,this.glyphs.height],t=this._glyphMosaic.getTexture(s,a);return this._glyphMosaic.bind(s,n,a,f),t.setSamplingMode(n),{type:"glyph",texture:t,size:e}}default:return G("mapview-texture-manager",`Cannot handle unknown type ${r.mosaicType}`),null}}_hashMosaic(e,t){return 1|e<<1|(t.sdf?1:0)<<2|("Nearest"===t.samplingMode?1:0)<<3|t.page<<4}_setTextureBinding(e,t){const i=this._hashMosaic(e,t);if(!this._hashToBindingIndex.has(i)){const s=B.fromMosaic(e,t),r=this._bindingInfos.length+1;this._hashToBindingIndex.set(i,r),this._bindingInfos.push(s)}t.textureBinding=this._hashToBindingIndex.get(i)}async _rasterizeText(e,t){const{font:i,textString:r}=e,a=s(i),n=this._invalidFonts.has(a),o=!!has("esri-2d-complex-shaping")&&F.test(r),c=o?w:S,h=o?M:I,l=o?y:_;try{const e=n?k:a;has("esri-2d-stabilize-glyphs")&&await this._glyphMosaic.preloadASCIIGlyphCache(e);const{isRightToLeft:i,glyphs:s,faceInfo:u}=await this._glyphMosaic.getGlyphItems(r,o,e,t);return{type:"glyphs",glyphs:s,faceInfo:u,isRightToLeft:i,sdfSize:c,sdfRadius:h,sdfPadding:l}}catch(u){O(`Font ${a} is not available on the web, using "Arial Unicode MS Regular"`),this._invalidFonts.add(a);const{isRightToLeft:e,glyphs:i,faceInfo:s}=await this._glyphMosaic.getGlyphItems(r,o,k,t);return{type:"glyphs",glyphs:i,faceInfo:s,isRightToLeft:e,sdfSize:c,sdfRadius:h,sdfPadding:l}}}_hashSpriteResource(e){switch(e.type){case"path":return`path:${e.path}.${e.asFill?1:0}`;case"CIMPictureMarker":return`${e.type}:${e.url}:${e.size}:${b(e.markerPlacement)}`;case"CIMPictureFill":return`${e.type}:${e.url}:${e.height}`;case"CIMPictureStroke":return`${e.type}:${e.url}:${e.width}`;case"dash":return`dash:${e.capStyle}.${d(e.dashTemplate).join("")}`;case"sdf":return`sdf:${JSON.stringify(e.geometry)}.${e.sdfTextureSize}.${e.asFill?1:0}`;case"fill-style":return`fill_style:${e.style}`;case"animated":return JSON.stringify(P(e));case"CIMGradientFill":case"CIMGradientStroke":return`gradient:${JSON.stringify(e.colorRamp)}.${e.gradientType}.${e.interval}`;case"CIMHatchFill":case"CIMVectorMarker":return JSON.stringify(e)}}async _rasterizeSprite(e,t){if(!e)return null;const i=h(this._hashSpriteResource(e));if(this._spriteMosaic.has(i))return this._spriteMosaic.getSpriteItem(i);if("url"in e&&e.url||"CIMPictureFill"===e.type||"CIMPictureStroke"===e.type||"CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type){const t=[];u.fetchResources({type:"CIMPointSymbol",symbolLayers:[e]},this._resourceManager,t),t.length>0&&await Promise.all(t)}switch(e.type){case"CIMPictureMarker":return"CIMMarkerPlacementInsidePolygon"===e.markerPlacement?.type?this._rasterizeJSONResource(i,e):this._handleAsyncResource(i,e,t);case"animated":case"CIMPictureFill":case"CIMPictureStroke":case"path":return this._handleAsyncResource(i,e,t);case"CIMGradientFill":case"CIMGradientStroke":case"CIMHatchFill":case"CIMVectorMarker":case"dash":case"fill-style":case"sdf":return this._rasterizeJSONResource(i,e)}}_rasterizeJSONResource(e,t){const i=this._rasterizer.rasterizeJSONResource(t);if(i){const{size:s,image:r,sdf:a,simplePattern:n,rasterizationScale:o,samplingMode:c,sdfPaddingRatio:h,sdfDecodeCoeff:l}=i;return this._addItemToMosaic(e,s,{type:"static",data:r},L(t),a,n,o,c,h,l)}return null}async _handleAsyncResource(e,t,i){if(this._ongoingRasterizations.has(e))return this._ongoingRasterizations.get(e);let s;return s="path"===t.type?this._handleSVG(t,e,i):this._handleImage(t,e,i),this._ongoingRasterizations.set(e,s),s.finally(()=>this._ongoingRasterizations.delete(e)),s}async _handleSVG(e,t,i){const s=[m,m],{asFill:r}=e,a=await this._sdfConverter.draw(e.path,r,i);return this._addItemToMosaic(t,s,{type:"static",data:new Uint32Array(a.buffer)},!1,!0,!0)}_handleGIFOrPNG(e,t,i){const s=e.url,r=this.resourceManager.getResource(s);if(null==r)return null;const{width:a,height:n}=r;if(r instanceof HTMLImageElement){if("animated"===e.type)return G("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;const i="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:s,sdf:o,image:c}=this._rasterizer.rasterizeImageResource(a,n,r,i);return this._addItemToMosaic(t,s,{type:"static",data:c},L(e),o,!1)}let o,c,h;"animated"===e.type?(o=!1,c={type:"CIMAnimatedSymbolProperties",playAnimation:e.playAnimation,reverseAnimation:e.reverseAnimation,randomizeStartTime:e.randomizeStartTime,randomizeStartSeed:e.randomizeStartSeed,startTimeOffset:e.startTimeOffset,duration:e.duration,repeatType:e.repeatType,repeatDelay:e.repeatDelay},h=e.startGroup||0):(o=L(e),c={type:"CIMAnimatedSymbolProperties"},h=0);const l=new v(r,this._requestRender,c,h);return this._addItemToMosaic(t,[l.width,l.height],{type:"animated",data:l},o,!1,!1)}async _handleImage(e,t,s){const r=e.url;if(q(r)||V(r))return this._handleGIFOrPNG(e,t,s);if("animated"===e.type)return G("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;try{let i;const a=this.resourceManager.getResource(r);if(null!=a&&a instanceof HTMLImageElement)i=a;else{const{data:e}=await this._imageRequestQueue.push(r,{...s});i=e}if($(r))if("width"in e&&"height"in e)i.width=c(e.width),i.height=c(e.height);else if("cim"in e){const t=e;i.width=c(t.width??t.scaleX*t.size),i.height=c(t.size)}if(!i.width||!i.height)return null;const n=i.width,o=i.height,h="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:l,sdf:u,image:p}=this._rasterizer.rasterizeImageResource(n,o,i,h);return this._addItemToMosaic(t,l,{type:"static",data:p},L(e),u,!1)}catch(G){if(!n(G))throw new i("mapview-invalid-resource",`Could not fetch requested resource at ${r}. ${G.message}`);throw G}}_addItemToMosaic(e,t,i,s,r,a,n,o,c,h){return this._spriteMosaic.addSpriteItem(e,t,i,s,r,a,n,o,c,h)}}function L(e){switch(e.type){case"CIMVectorMarker":case"CIMPictureMarker":return H(e);default:return!0}}const U=e=>null!=e&&e.startsWith("data:image/gif"),q=e=>e&&(e.includes(".gif")||U(e)),J=e=>null!=e&&e.startsWith("data:image/png"),V=e=>e&&(e.includes(".png")||J(e)),H=e=>e&&"markerPlacement"in e&&e.markerPlacement&&"CIMMarkerPlacementInsidePolygon"===e.markerPlacement.type;export{N as default};