@arcgis/core 4.33.0-next.20250228 → 4.33.0-next.20250302

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 (292) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/066844a51cd22cbef0e6.js +1 -0
  3. package/assets/esri/core/workers/chunks/0ce1bfcdcccb679569f8.js +1 -0
  4. package/assets/esri/core/workers/chunks/0e164b19e4ea3aa73843.js +1 -0
  5. package/assets/esri/core/workers/chunks/12d798775a96a45aada2.js +1 -0
  6. package/assets/esri/core/workers/chunks/{f298cda10a9ffe35ea49.js → 1377ddd582518e5fa051.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{95a5ed95f0060b43f38f.js → 15fe629cd4da1bb2169f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/1a5f96b1b892ecceb36a.js +1 -0
  9. package/assets/esri/core/workers/chunks/{b4002b4fd99748fdf5da.js → 1e631e34ee495eb0e76e.js} +1 -1
  10. package/assets/esri/core/workers/chunks/22618753349eb9d8b3df.js +1 -0
  11. package/assets/esri/core/workers/chunks/25a686f00479ac12a1ca.js +1 -0
  12. package/assets/esri/core/workers/chunks/25ef080163f3f795911a.js +1 -0
  13. package/assets/esri/core/workers/chunks/{afdbdc1569b56489c14d.js → 29fe3e9a0ecab74bb729.js} +1 -1
  14. package/assets/esri/core/workers/chunks/2c091edee3601f345f5f.js +1 -0
  15. package/assets/esri/core/workers/chunks/2f23fc27d005ffa18f47.js +1 -0
  16. package/assets/esri/core/workers/chunks/2f818b9a6b1f2b61410d.js +978 -0
  17. package/assets/esri/core/workers/chunks/3010a22d00f45fce5939.js +1 -0
  18. package/assets/esri/core/workers/chunks/{05869484d7de75f86916.js → 33005043f7084048296d.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{835fa4484c58d9b31c78.js → 3315de71eb8791189c05.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{f7a055be225f3498baaf.js → 354117429b3a0a0794c9.js} +1 -1
  21. package/assets/esri/core/workers/chunks/361a3253877acd3b4f07.js +1 -0
  22. package/assets/esri/core/workers/chunks/{53bc621e2cbc519b2535.js → 36b406131cd864567033.js} +1 -1
  23. package/assets/esri/core/workers/chunks/385dd6466fd967ce3ae9.js +1 -0
  24. package/assets/esri/core/workers/chunks/394b9723d108cff7136e.js +1 -0
  25. package/assets/esri/core/workers/chunks/4395b7263a299a8020d4.js +1 -0
  26. package/assets/esri/core/workers/chunks/47c04980098dc0c228d7.js +1 -0
  27. package/assets/esri/core/workers/chunks/{d6ee6ebdaf582f39c14b.js → 4c8164955f8d844c09ee.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{e4d7f1e685f69b3bf54d.js → 4c9160e3d596fe75392d.js} +1 -1
  29. package/assets/esri/core/workers/chunks/534f3d7e4300b662191a.js +1 -0
  30. package/assets/esri/core/workers/chunks/55c7c51e56d72f507c22.js +1 -0
  31. package/assets/esri/core/workers/chunks/5802406d0a239a27a9a3.js +1 -0
  32. package/assets/esri/core/workers/chunks/6ce738960ee47904968f.js +314 -0
  33. package/assets/esri/core/workers/chunks/{b12f2eaa15f6753fa1a8.js → 6ff981ec0c725efe5525.js} +1 -1
  34. package/assets/esri/core/workers/chunks/7ca33e03a2fd217b9443.js +1 -0
  35. package/assets/esri/core/workers/chunks/7d93ff4f18fd21c7b9f2.js +1 -0
  36. package/assets/esri/core/workers/chunks/{983d787730bf8b74fe13.js → 7ec2f531217718e76469.js} +1 -1
  37. package/assets/esri/core/workers/chunks/8196ff250c0de00104f7.js +1 -0
  38. package/assets/esri/core/workers/chunks/{ae25c6108918d37e61bf.js → 8278d9263e9b7e3bf2d1.js} +1 -1
  39. package/assets/esri/core/workers/chunks/852c32b5e717c54e3ae0.js +1 -0
  40. package/assets/esri/core/workers/chunks/856b03020b2dd047291d.js +1 -0
  41. package/assets/esri/core/workers/chunks/85a9025c2990a8bbd61b.js +1 -0
  42. package/assets/esri/core/workers/chunks/8b057b5a606ac3669a78.js +1 -0
  43. package/assets/esri/core/workers/chunks/8bf623f560b1ed440004.js +1 -0
  44. package/assets/esri/core/workers/chunks/8d421e0a01e2c3f6980c.js +1 -0
  45. package/assets/esri/core/workers/chunks/{f27828ba83846d686072.js → 97078a7871e243c19b6b.js} +1 -1
  46. package/assets/esri/core/workers/chunks/a68b48fd1a529f69705e.js +1 -0
  47. package/assets/esri/core/workers/chunks/{272662e4e28341419b4f.js → a73a262ddc959a59819f.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{4253438dd3045566892d.js → aba4353892c47de98eb3.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{14cb593dfb50c724b9eb.js → ac6b582ca180210e596c.js} +1 -1
  50. package/assets/esri/core/workers/chunks/af27a3f646a4404d3b8d.js +1 -0
  51. package/assets/esri/core/workers/chunks/{fc07d47d44c04f123650.js → b1e275607d9754079f60.js} +1 -1
  52. package/assets/esri/core/workers/chunks/b3c126e8a0a722c03efc.js +1 -0
  53. package/assets/esri/core/workers/chunks/b464b7800a2ddd92b9a7.js +1 -0
  54. package/assets/esri/core/workers/chunks/b52a3a48d2d3ff22542d.js +1 -0
  55. package/assets/esri/core/workers/chunks/be883ebdbaf11647b718.js +1 -0
  56. package/assets/esri/core/workers/chunks/bf9b45604249520b596a.js +1 -0
  57. package/assets/esri/core/workers/chunks/c0400c25c53fd90fc90e.js +1 -0
  58. package/assets/esri/core/workers/chunks/c2939e0c45a6d074cac0.js +1 -0
  59. package/assets/esri/core/workers/chunks/{fccf505dbd98e59e721a.js → c3dc8d1958ddc71e1129.js} +1 -1
  60. package/assets/esri/core/workers/chunks/c68c68e918c72932b247.js +1 -0
  61. package/assets/esri/core/workers/chunks/c8cd9a3175f516624842.js +1 -0
  62. package/assets/esri/core/workers/chunks/cc1aedb2b3aa3854b0de.js +1 -0
  63. package/assets/esri/core/workers/chunks/d374d2a1487faee3672d.js +1 -0
  64. package/assets/esri/core/workers/chunks/d630e64463687090db92.js +1 -0
  65. package/assets/esri/core/workers/chunks/dbdca19978fbee8dc106.js +1 -0
  66. package/assets/esri/core/workers/chunks/ddfb5a2055a36576ba0d.js +1 -0
  67. package/assets/esri/core/workers/chunks/e1a90f63d2e6c761953b.js +1 -0
  68. package/assets/esri/core/workers/chunks/{5b5d89b94e020b4bfcc1.js → e3b0bb6850d5252d5f24.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{4235bb1334c95f3c828d.js → e45404a982e173459990.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{b7a3d9c5d18e59da378f.js → eab1e3c101158675abba.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{8a3290ee6e6587fa39a6.js → ed4afafbcb31491c2049.js} +1 -1
  72. package/assets/esri/core/workers/chunks/ef46613c3aa363dc1cfc.js +1 -0
  73. package/assets/esri/core/workers/chunks/{6c5877e4ad108a6d074e.js → f0351930cbb3d8643119.js} +1 -1
  74. package/assets/esri/core/workers/chunks/f31986ea5cadfade8344.js +1 -0
  75. package/assets/esri/core/workers/chunks/f350aefc5e348ebad1da.js +1 -0
  76. package/assets/esri/core/workers/chunks/{a2e52b40eeeda4282c07.js → f70dd16f14279bb7e60d.js} +1 -1
  77. package/assets/esri/core/workers/chunks/f995a74bd9b58c069c07.js +1 -0
  78. package/assets/esri/core/workers/chunks/{7437b7423c8b7fb4f0dd.js → fe3ed029b07bb1e4aef3.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{e6e6247ea5ce0c2b125f.js → fe8ee1938d196a70d809.js} +1 -1
  80. package/assets/esri/themes/base/widgets/_LabeledSwitch.scss +0 -2
  81. package/assets/esri/themes/dark/main.css +1 -1
  82. package/assets/esri/themes/light/main.css +1 -1
  83. package/assets/esri/themes/light/view.css +1 -1
  84. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  85. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  86. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  87. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  88. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  89. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  90. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  91. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  92. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  93. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  94. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  95. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  96. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  97. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  121. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  122. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  123. package/chunks/Envelope.js +1 -1
  124. package/chunks/{GeodeticDistanceCalculator-D4iQ-_NX.js → GeodeticDistanceCalculator-CcF1gMZX.js} +1 -1
  125. package/chunks/LineSeries.js +1 -1
  126. package/chunks/OperatorGeodeticArea.js +1 -1
  127. package/chunks/OperatorGeodeticDistance.js +1 -1
  128. package/chunks/OperatorProximityGeodesic.js +1 -1
  129. package/chunks/Point2D.js +1 -1
  130. package/chunks/ProjectionTransformation.js +1 -1
  131. package/chunks/QuadraticBezier.js +1 -1
  132. package/chunks/Theme.js +1 -1
  133. package/chunks/chartUtilsAm5.js +1 -1
  134. package/chunks/distanceOperator.js +1 -1
  135. package/core/timeUtils.js +1 -1
  136. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  137. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  138. package/editing/sharedTemplates/support/sharedTemplateErrors.js +1 -1
  139. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  140. package/editing/templateUtils.js +1 -1
  141. package/geometry/operators/extendOperator.js +1 -1
  142. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  143. package/geometry/operators/gx/operatorBuffer.js +1 -1
  144. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  145. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  146. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  147. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  148. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  149. package/geometry/operators/isNearOperator.js +1 -1
  150. package/geometry/operators/support/jsonConverter.js +1 -1
  151. package/geometry/support/PolylineBuilder.js +5 -0
  152. package/geometry/support/TileClipper.js +1 -1
  153. package/interfaces.d.ts +9 -9
  154. package/intl/date.js +1 -1
  155. package/layers/graphics/sources/WFSSource.js +1 -1
  156. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  157. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  158. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  159. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  160. package/layers/mixins/ImageryTileMixin.js +1 -1
  161. package/layers/ogc/ogcFeatureUtils.js +1 -1
  162. package/layers/support/FieldsIndex.js +1 -1
  163. package/layers/support/rasterFunctions/RemapFunction.js +1 -1
  164. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  165. package/networks/support/UtilityNetworkLookupHelper.js +5 -0
  166. package/package.json +2 -2
  167. package/smartMapping/support/utils.js +1 -1
  168. package/support/guards.js +1 -1
  169. package/support/revision.js +1 -1
  170. package/symbols/cim/CIMOperators.js +1 -1
  171. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  172. package/symbols/cim/defaultCIMValues.js +1 -1
  173. package/symbols/cim/effects/EffectEnclosingPolygon.js +5 -0
  174. package/symbols/cim/effects/EffectRadial.js +5 -0
  175. package/symbols/cim/effects/EffectTaperedPolygon.js +5 -0
  176. package/symbols/cim/utils.js +1 -1
  177. package/time/TimeExtent.js +1 -1
  178. package/time/constants.js +5 -0
  179. package/time/timeZoneUtils.js +1 -1
  180. package/views/2d/engine/webgl/TextureManager.js +1 -1
  181. package/views/2d/engine/webgl/Utils.js +1 -1
  182. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  183. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  184. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  185. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  186. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  187. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
  188. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  189. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  190. package/views/2d/engine/webgl/textureUtils.js +5 -0
  191. package/views/2d/engine/webgl/urlUtils.js +5 -0
  192. package/views/2d/layers/MediaLayerView2D.js +1 -1
  193. package/views/2d/layers/TileLayerView2D.js +1 -1
  194. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  195. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  196. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  197. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  198. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  199. package/views/3d/terrain/TileRenderer.js +1 -1
  200. package/views/3d/webgl-engine/lib/TextureCompressionWorkerHandle.js +1 -1
  201. package/views/VideoView.js +1 -1
  202. package/views/View.js +1 -1
  203. package/views/support/TextureCompressionHelper.js +1 -1
  204. package/views/webgl/Texture.js +1 -1
  205. package/webmap/InitialViewProperties.js +1 -1
  206. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  207. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  208. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  209. package/widgets/Bookmarks.js +1 -1
  210. package/widgets/Directions/DirectionsViewModel.js +1 -1
  211. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  212. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  213. package/widgets/Feature/FeatureViewModel.js +1 -1
  214. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/AssociationDetails.js +1 -1
  215. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  216. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  217. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  218. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  219. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  220. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  221. package/widgets/FeatureTable/FieldColumn.js +1 -1
  222. package/widgets/Features/FeaturesViewModel.js +1 -1
  223. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  224. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  225. package/widgets/OrientedImageryViewer/dataCaptureUtils.js +1 -1
  226. package/widgets/OrientedImageryViewer/symbols.js +1 -1
  227. package/widgets/OrientedImageryViewer.js +1 -1
  228. package/widgets/TimeSlider.js +1 -1
  229. package/widgets/TimeZoneLabel.js +1 -1
  230. package/widgets/support/LabeledSwitch.js +1 -1
  231. package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +5 -0
  232. package/widgets/support/UtilityNetworkAssociations/utils/formatPercentAlong.js +5 -0
  233. package/widgets/support/UtilityNetworkAssociations/utils/getAssociationTitle.js +5 -0
  234. package/widgets/support/UtilityNetworkAssociations/utils/getFeatureTitle.js +5 -0
  235. package/widgets/support/UtilityNetworkAssociations/utils/isConnectivity.js +5 -0
  236. package/widgets/support/UtilityNetworkAssociations/utils/isConnectivityMidspan.js +5 -0
  237. package/widgets/support/UtilityNetworkAssociations/utils/isFromElement.js +5 -0
  238. package/widgets/support/dateUtils.js +1 -1
  239. package/assets/esri/core/workers/chunks/0509af0f6c732a847531.js +0 -1
  240. package/assets/esri/core/workers/chunks/1461ca910c3dba1d808b.js +0 -1
  241. package/assets/esri/core/workers/chunks/19f45bb389daf866dbc5.js +0 -1
  242. package/assets/esri/core/workers/chunks/1c4cafb879f21a42f7db.js +0 -978
  243. package/assets/esri/core/workers/chunks/2626f4201deb7bdd4866.js +0 -1
  244. package/assets/esri/core/workers/chunks/2e1126a35976b2d48197.js +0 -1
  245. package/assets/esri/core/workers/chunks/2eadc555038a38afdc9c.js +0 -1
  246. package/assets/esri/core/workers/chunks/36f0446d9d47685b7ce0.js +0 -1
  247. package/assets/esri/core/workers/chunks/3cf3aa74541f0cfff94f.js +0 -1
  248. package/assets/esri/core/workers/chunks/3d46327469ed5170e83e.js +0 -1
  249. package/assets/esri/core/workers/chunks/440afa7d26e721af578a.js +0 -1
  250. package/assets/esri/core/workers/chunks/460e5f78574cc0d157af.js +0 -1
  251. package/assets/esri/core/workers/chunks/4de09a997691305415b1.js +0 -1
  252. package/assets/esri/core/workers/chunks/5066fc5257296d95fe60.js +0 -1
  253. package/assets/esri/core/workers/chunks/53315ca098d76d34cf00.js +0 -1
  254. package/assets/esri/core/workers/chunks/539190038ac552e5374c.js +0 -1
  255. package/assets/esri/core/workers/chunks/55162949a2b2c8e1c95c.js +0 -1
  256. package/assets/esri/core/workers/chunks/58853056c16f2b525a9e.js +0 -1
  257. package/assets/esri/core/workers/chunks/5af9737d0530ca17b771.js +0 -1
  258. package/assets/esri/core/workers/chunks/5c0dfc75a9b654e6fa25.js +0 -1
  259. package/assets/esri/core/workers/chunks/6245c51d1525767ce2fe.js +0 -1
  260. package/assets/esri/core/workers/chunks/6728185fdf53b4921bf8.js +0 -1
  261. package/assets/esri/core/workers/chunks/68cb0c3462c90f2d1538.js +0 -1
  262. package/assets/esri/core/workers/chunks/6affa0f3d5bb74c7a1db.js +0 -1
  263. package/assets/esri/core/workers/chunks/6e108fb9884139dd3b52.js +0 -314
  264. package/assets/esri/core/workers/chunks/6f9bfa6ed34ef6efcc6f.js +0 -1
  265. package/assets/esri/core/workers/chunks/70943dc884d9ba8045a2.js +0 -1
  266. package/assets/esri/core/workers/chunks/7fe799c1e60e23a976e9.js +0 -1
  267. package/assets/esri/core/workers/chunks/80395a1d8ae91ff3961b.js +0 -1
  268. package/assets/esri/core/workers/chunks/87b78e491c800c96b503.js +0 -1
  269. package/assets/esri/core/workers/chunks/8abd2235aa702d8b239f.js +0 -1
  270. package/assets/esri/core/workers/chunks/8bf29e5e4c93d85a6abf.js +0 -1
  271. package/assets/esri/core/workers/chunks/99838ad20c10aa5aa471.js +0 -1
  272. package/assets/esri/core/workers/chunks/9fb568d25ed4f4660963.js +0 -1
  273. package/assets/esri/core/workers/chunks/9ff9cf156d024ade068b.js +0 -1
  274. package/assets/esri/core/workers/chunks/a288c2474ef193f9fbd3.js +0 -1
  275. package/assets/esri/core/workers/chunks/a2d0f7d82630dd8efb9b.js +0 -1
  276. package/assets/esri/core/workers/chunks/a66c3866888bd7e415e8.js +0 -1
  277. package/assets/esri/core/workers/chunks/b3bbe6f569ab6a3777b5.js +0 -1
  278. package/assets/esri/core/workers/chunks/ba33405a524c6bb88656.js +0 -1
  279. package/assets/esri/core/workers/chunks/bb1fb9990f8bf5f7a05f.js +0 -1
  280. package/assets/esri/core/workers/chunks/c22664f9f2b4ba7fe3d4.js +0 -1
  281. package/assets/esri/core/workers/chunks/c83245257deb230f79c0.js +0 -1
  282. package/assets/esri/core/workers/chunks/d2f8eed0b5b7cbdcd182.js +0 -1
  283. package/assets/esri/core/workers/chunks/d56426def776aae6fac6.js +0 -1
  284. package/assets/esri/core/workers/chunks/e12882be1b6820b8e9e8.js +0 -1
  285. package/assets/esri/core/workers/chunks/e648f1c96edf44c781eb.js +0 -1
  286. package/assets/esri/core/workers/chunks/ef6e9dbfc9a5bd38a7b6.js +0 -1
  287. package/assets/esri/core/workers/chunks/f2723d0c9c8d8ff4ec70.js +0 -1
  288. package/assets/esri/core/workers/chunks/f45ef721d21388846101.js +0 -1
  289. package/assets/esri/core/workers/chunks/fdab6921d007929ab288.js +0 -1
  290. package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +0 -5
  291. /package/chunks/{Bufferer-B-V7yYm-.js → Bufferer-CicaNej1.js} +0 -0
  292. /package/chunks/{Distance2DCalculator-Coa0qAFt.js → Distance2DCalculator-C1KHhZwD.js} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{defaultCIMColor as e,defaultCIMValues as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const i=" /-,\n";function l(e){let t=e.length;for(;t--;)if(!i.includes(e.charAt(t)))return!1;return!0}function a(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,l(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const i=t[e.slice(n,o)];i&&r.push([null,i,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,l(t)])}return r}function c(e,t,r,n){let o="",i=null;for(const l of t){const[t,n,a]=l;if(t)a?i=t:(i&&(o+=i,i=null),o+=t);else{let t=n;null!=r&&(t=J(n,r));const l=e.attributes[t];l&&(i&&(o+=i,i=null),o+=l)}}return s(o,n)}function s(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function u(e,t,r,n,o,i,l=!0){const a=t/o,c=r/i,s=Math.ceil(a/2),u=Math.ceil(c/2);for(let f=0;f<i;f++)for(let r=0;r<o;r++){const y=4*(r+(l?i-f-1:f)*o);let M=0,m=0,C=0,I=0,p=0,h=0,b=0;const d=(f+.5)*c;for(let n=Math.floor(f*c);n<(f+1)*c;n++){const o=Math.abs(d-(n+.5))/u,i=(r+.5)*a,l=o*o;for(let c=Math.floor(r*a);c<(r+1)*a;c++){let r=Math.abs(i-(c+.5))/s;const o=Math.sqrt(l+r*r);o>=-1&&o<=1&&(M=2*o*o*o-3*o*o+1,M>0&&(r=4*(c+n*t),b+=M*e[r+3],C+=M,e[r+3]<255&&(M=M*e[r+3]/250),I+=M*e[r],p+=M*e[r+1],h+=M*e[r+2],m+=M))}}n[y]=I/m,n[y+1]=p/m,n[y+2]=h/m,n[y+3]=b/C}}function f(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function y(e){return e.data?.symbol??null}function M(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function m(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function C(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function I(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const p=(e,t=0)=>null==e||isNaN(e)?t:e,h=(e,t)=>null!=e?e:t,b=(e,t)=>e??t,d=e=>e.tintColor?f(e.tintColor):[255,255,255,1],k=e=>{if(!e)return!1;for(const t of e)switch(t.type){case"CIMGeometricEffectBuffer":case"CIMGeometricEffectOffset":case"CIMGeometricEffectDonut":return!0}return!1};function S(){return import("../../geometry/geometryEngineJSON.js")}function g(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function P(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function w(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function L(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function T(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=T(t);if(null!=e)return e}break;case"CIMTextSymbol":return T(e.symbol);case"CIMSolidFill":return e.color}return null}function A(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=A(e);if(null!=t)return t}break}case"CIMTextSymbol":return A(e.symbol);case"CIMSolidStroke":return e.color}}function x(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=x(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return x(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function N(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":case"Justify":return"center"}}function F(e){switch(e){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function v(e){return(e?Object.keys(e):[]).map((t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"})))}const G=e=>e.includes("data:image/svg+xml");function V(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function z(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function E(e,t,r,n,o,i,l=!0){const{infos:a}=i;let c=1,s=0,u=0,f=0,y=1;for(const{absoluteAnchorPoint:C,offsetX:I,offsetY:p,rotation:h,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:S}of a){y=C?1:c;u=Y(I,p,s,y,u),f=X(I,p,s,y,f),d&&(S||l)&&(c*=b/d),s=$(h,k,s)}const M=Y(n,o,s,y,u),m=X(n,o,s,y,f);return{size:e*c,rotation:$(t,r,s),offsetX:M,offsetY:m}}function O(e){if(null==e)return!1;if(Array.isArray(e))return e.every((e=>O(e)));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function D(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...e[n]];const o=t[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function j(e){return e.split(" ").map((e=>Number(e)))}function q(e){return"string"==typeof e?j(e):e}function B(e){return e?.dashTemplate&&(e.dashTemplate=q(e.dashTemplate)),e}function R(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return R(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return R(e.symbol)}}return"Normal"}function H(e){if(e)switch(e.type){case"CIMTextSymbol":return e.height;case"CIMPointSymbol":{let r=0;if(e.symbolLayers)for(const n of e.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const e=n.size??t.CIMVectorMarker.size;e>r&&(r=e);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(e.symbolLayers)for(const n of e.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&I(n.markerPlacement)){const e=n.size??t.CIMVectorMarker.size;e>r&&(r=e)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function J(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function U(e){return e.map((e=>({...e,propertyName:z(e.propertyName)})))}function W(e){const t={};for(const r in e){const n=e[r];t[z(r)]=n}return t}function X(e,t,r,n,o){const i=r*Math.PI/180;if(i){const r=Math.cos(i);return(Math.sin(i)*e+r*t)*n+o}return t*n+o}function Y(e,t,r,n,o){const i=r*Math.PI/180;if(i){return(Math.cos(i)*e-Math.sin(i)*t)*n+o}return e*n+o}function $(e,t,r){return t?r-e:r+e}function K(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let i=t[z(r)];if(null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180)),null==i&&(i=D(t.type,r.toLowerCase()),null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]]:o&&(i*=Math.PI/180))),null!=t.primitiveName){const l=e[t.primitiveName];if(null!=l){const e=l[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(i=e,null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180))):(i={valueExpressionInfo:e,defaultValue:i},null!=i&&(n?i={type:"Process",op:"ArcadeColor",value:i}:o&&(i={type:"Process",op:"Divide",left:i,right:180/Math.PI}))))}}if(null==i)throw new Error(`Failed to derive a value or an expression for "${r}".`);return i}function Q(e,t){return Math.max(Math.min((e??t)/100,1),0)}export{s as adjustTextCase,a as analyzeTextParts,E as applyParentTransform,c as assignTextValuesFromFeature,v as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,L as fromCIMFontDecoration,w as fromCIMFontStyle,N as fromCIMHorizontalAlignment,F as fromCIMVerticalAlignment,D as getDefaultCIMValue,b as getEnum,J as getFieldName,T as getFillColor,g as getFontStyle,P as getFontWeight,p as getNumericValue,K as getProcessParam,Q as getRelativeGradientSize,H as getSize,A as getStrokeColor,x as getStrokeWidth,R as getTextCasing,d as getTintColor,h as getValue,S as importGeometryEngine,C as isCIMFill,M as isCIMMarker,I as isCIMMarkerStrokePlacement,m as isCIMStroke,r as isFeatureValueFn,k as isGeometryEngineRequired,G as isSVGImage,O as isValidCIMValue,V as mapCIMSymbolToGeometryType,f as normalizeAlpha,B as normalizeDashEffectTemplate,q as normalizeDashTemplate,U as normalizePrimitiveOverrideProps,j as parseDashTemplate,u as resampleHermite,y as toCIMSymbolJSON,W as toLowerCaseProps,z as uncapitalize};
5
+ import{defaultCIMColor as e,defaultCIMValues as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const l=" /-,\n";function i(e){let t=e.length;for(;t--;)if(!l.includes(e.charAt(t)))return!1;return!0}function a(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,i(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const l=t[e.slice(n,o)];l&&r.push([null,l,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,i(t)])}return r}function c(e,t,r,n){let o="",l=null;for(const i of t){const[t,n,a]=i;if(t)a?l=t:(l&&(o+=l,l=null),o+=t);else{let t=n;null!=r&&(t=J(n,r));const i=e.attributes[t];i&&(l&&(o+=l,l=null),o+=i)}}return s(o,n)}function s(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function u(e,t,r,n,o,l,i=!0){const a=t/o,c=r/l,s=Math.ceil(a/2),u=Math.ceil(c/2);for(let f=0;f<l;f++)for(let r=0;r<o;r++){const y=4*(r+(i?l-f-1:f)*o);let M=0,m=0,C=0,I=0,p=0,h=0,b=0;const d=(f+.5)*c;for(let n=Math.floor(f*c);n<(f+1)*c;n++){const o=Math.abs(d-(n+.5))/u,l=(r+.5)*a,i=o*o;for(let c=Math.floor(r*a);c<(r+1)*a;c++){let r=Math.abs(l-(c+.5))/s;const o=Math.sqrt(i+r*r);o>=-1&&o<=1&&(M=2*o*o*o-3*o*o+1,M>0&&(r=4*(c+n*t),b+=M*e[r+3],C+=M,e[r+3]<255&&(M=M*e[r+3]/250),I+=M*e[r],p+=M*e[r+1],h+=M*e[r+2],m+=M))}}n[y]=I/m,n[y+1]=p/m,n[y+2]=h/m,n[y+3]=b/C}}function f(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function y(e){return e.data?.symbol??null}function M(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function m(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function C(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function I(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const p=(e,t=0)=>null==e||isNaN(e)?t:e,h=(e,t)=>null!=e?e:t,b=(e,t)=>e??t,d=e=>e.tintColor?f(e.tintColor):[255,255,255,1],k=e=>{if(!e)return!1;for(const t of e)switch(t.type){case"CIMGeometricEffectBuffer":case"CIMGeometricEffectDonut":case"CIMGeometricEffectOffset":case"CIMGeometricEffectTaperedPolygon":case"CIMGeometricEffectEnclosingPolygon":return!0}return!1};function g(){return import("../../geometry/geometryEngineJSON.js")}function P(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function S(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function w(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function L(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function T(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=T(t);if(null!=e)return e}break;case"CIMTextSymbol":return T(e.symbol);case"CIMSolidFill":return e.color}return null}function A(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=A(e);if(null!=t)return t}break}case"CIMTextSymbol":return A(e.symbol);case"CIMSolidStroke":return e.color}}function G(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=G(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return G(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function x(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":case"Justify":return"center"}}function N(e){switch(e){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function E(e){return(e?Object.keys(e):[]).map((t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"})))}const F=e=>e.includes("data:image/svg+xml");function v(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":return null!=e.symbolLayers&&e.symbolLayers.some((e=>e.effects?.some((e=>"CIMGeometricEffectRadial"===e.type))))?"esriGeometryPolyline":"esriGeometryPoint";case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function V(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function z(e,t,r,n,o,l,i=!0){const{infos:a}=l;let c=1,s=0,u=0,f=0,y=1;for(const{absoluteAnchorPoint:C,offsetX:I,offsetY:p,rotation:h,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:g}of a){y=C?1:c;u=Y(I,p,s,y,u),f=X(I,p,s,y,f),d&&(g||i)&&(c*=b/d),s=$(h,k,s)}const M=Y(n,o,s,y,u),m=X(n,o,s,y,f);return{size:e*c,rotation:$(t,r,s),offsetX:M,offsetY:m}}function O(e){if(null==e)return!1;if(Array.isArray(e))return e.every((e=>O(e)));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function D(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...e[n]];const o=t[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function R(e){return e.split(" ").map((e=>Number(e)))}function j(e){return"string"==typeof e?R(e):e}function q(e){return e?.dashTemplate&&(e.dashTemplate=j(e.dashTemplate)),e}function B(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return B(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return B(e.symbol)}}return"Normal"}function H(e){if(e)switch(e.type){case"CIMTextSymbol":return e.height;case"CIMPointSymbol":{let r=0;if(e.symbolLayers)for(const n of e.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const e=n.size??t.CIMVectorMarker.size;e>r&&(r=e);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(e.symbolLayers)for(const n of e.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&I(n.markerPlacement)){const e=n.size??t.CIMVectorMarker.size;e>r&&(r=e)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function J(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function U(e){return e.map((e=>({...e,propertyName:V(e.propertyName)})))}function W(e){const t={};for(const r in e){const n=e[r];t[V(r)]=n}return t}function X(e,t,r,n,o){const l=r*Math.PI/180;if(l){const r=Math.cos(l);return(Math.sin(l)*e+r*t)*n+o}return t*n+o}function Y(e,t,r,n,o){const l=r*Math.PI/180;if(l){return(Math.cos(l)*e-Math.sin(l)*t)*n+o}return e*n+o}function $(e,t,r){return t?r-e:r+e}function K(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let l=t[V(r)];if(null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180)),null==l&&(l=D(t.type,r.toLowerCase()),null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]]:o&&(l*=Math.PI/180))),null!=t.primitiveName){const i=e[t.primitiveName];if(null!=i){const e=i[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(l=e,null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180))):(l={valueExpressionInfo:e,defaultValue:l},null!=l&&(n?l={type:"Process",op:"ArcadeColor",value:l}:o&&(l={type:"Process",op:"Divide",left:l,right:180/Math.PI}))))}}if(null==l)throw new Error(`Failed to derive a value or an expression for "${r}".`);return l}function Q(e,t){return Math.max(Math.min((e??t)/100,1),0)}export{s as adjustTextCase,a as analyzeTextParts,z as applyParentTransform,c as assignTextValuesFromFeature,E as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,L as fromCIMFontDecoration,w as fromCIMFontStyle,x as fromCIMHorizontalAlignment,N as fromCIMVerticalAlignment,D as getDefaultCIMValue,b as getEnum,J as getFieldName,T as getFillColor,P as getFontStyle,S as getFontWeight,p as getNumericValue,K as getProcessParam,Q as getRelativeGradientSize,H as getSize,A as getStrokeColor,G as getStrokeWidth,B as getTextCasing,d as getTintColor,h as getValue,g as importGeometryEngine,C as isCIMFill,M as isCIMMarker,I as isCIMMarkerStrokePlacement,m as isCIMStroke,r as isFeatureValueFn,k as isGeometryEngineRequired,F as isSVGImage,O as isValidCIMValue,v as mapCIMSymbolToGeometryType,f as normalizeAlpha,q as normalizeDashEffectTemplate,j as normalizeDashTemplate,U as normalizePrimitiveOverrideProps,R as parseDashTemplate,u as resampleHermite,y as toCIMSymbolJSON,W as toLowerCaseProps,V as uncapitalize};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import e from"../core/JSONSupport.js";import{truncateDate as r,offsetDate as s}from"../core/timeUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as i}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as o}from"../core/accessorSupport/decorators/writer.js";import{system as a}from"./timeZoneUtils.js";var u;let m=class extends e{static{u=this}static get allTime(){return d}static get empty(){return c}static fromArray(t){return new u({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(u.allTime)}get isEmpty(){return this.equals(u.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new u({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===s&&r===n}expandTo(t,e=a){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=r(n,t,e));let i=this.end;if(i){const n=r(i,t,e);i=i.getTime()===n.getTime()?n:s(n,1,t,e)}return new u({start:n,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return u.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=t.start?.getTime()??-1/0,n=t.end?.getTime()??1/0;let i,l;return s>=e&&s<=r?i=s:e>=s&&e<=n&&(i=e),r>=s&&r<=n?l=r:n>=e&&n<=r&&(l=n),null==i||null==l||isNaN(i)||isNaN(l)?u.empty:new u({start:i===-1/0?null:new Date(i),end:l===1/0?null:new Date(l)})}offset(t,e,r=a){if(this.isEmpty||this.isAllTime)return this.clone();const n=new u,{start:i,end:l}=this;return null!=i&&(n.start=s(i,t,e,r)),null!=l&&(n.end=s(l,t,e,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new u({start:e,end:r})}};t([n({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"end",void 0),t([i("end")],m.prototype,"readEnd",null),t([o("end")],m.prototype,"writeEnd",null),t([n({readOnly:!0,json:{read:!1}})],m.prototype,"isAllTime",null),t([n({readOnly:!0,json:{read:!1}})],m.prototype,"isEmpty",null),t([n({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"start",void 0),t([i("start")],m.prototype,"readStart",null),t([o("start")],m.prototype,"writeStart",null),m=u=t([l("esri.time.TimeExtent")],m);const p=m,d=new m,c=new m({start:void 0,end:void 0});export{p as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import e from"../core/JSONSupport.js";import{truncateDate as r,offsetDate as s}from"../core/timeUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as i}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as o}from"../core/accessorSupport/decorators/writer.js";import{system as a}from"./constants.js";var u;let m=class extends e{static{u=this}static get allTime(){return d}static get empty(){return c}static fromArray(t){return new u({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(u.allTime)}get isEmpty(){return this.equals(u.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new u({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===s&&r===n}expandTo(t,e=a){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=r(n,t,e));let i=this.end;if(i){const n=r(i,t,e);i=i.getTime()===n.getTime()?n:s(n,1,t,e)}return new u({start:n,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return u.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=t.start?.getTime()??-1/0,n=t.end?.getTime()??1/0;let i,l;return s>=e&&s<=r?i=s:e>=s&&e<=n&&(i=e),r>=s&&r<=n?l=r:n>=e&&n<=r&&(l=n),null==i||null==l||isNaN(i)||isNaN(l)?u.empty:new u({start:i===-1/0?null:new Date(i),end:l===1/0?null:new Date(l)})}offset(t,e,r=a){if(this.isEmpty||this.isAllTime)return this.clone();const n=new u,{start:i,end:l}=this;return null!=i&&(n.start=s(i,t,e,r)),null!=l&&(n.end=s(l,t,e,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new u({start:e,end:r})}};t([n({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"end",void 0),t([i("end")],m.prototype,"readEnd",null),t([o("end")],m.prototype,"writeEnd",null),t([n({readOnly:!0,json:{read:!1}})],m.prototype,"isAllTime",null),t([n({readOnly:!0,json:{read:!1}})],m.prototype,"isEmpty",null),t([n({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"start",void 0),t([i("start")],m.prototype,"readStart",null),t([o("start")],m.prototype,"writeStart",null),m=u=t([l("esri.time.TimeExtent")],m);const p=m,d=new m,c=new m({start:void 0,end:void 0});export{p as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ const e="system",t="unknown",n="UTC",o=Intl.DateTimeFormat().resolvedOptions().timeZone;export{e as system,o as systemTimeZone,t as unknown,n as utc};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{legacyTimeZoneMap as t}from"./legacyTimeZoneMap.js";import{DateTime as e,FixedOffsetZone as n}from"luxon";const o="system",r="unknown",i="UTC",s=Intl.DateTimeFormat().resolvedOptions().timeZone,m="shortOffset";function u(t){return"timeZoneIANA"in t}function a(t){return t.startsWith("UTC")}function f(t,e=!1){return{json:{read:{source:t,reader:(e,n)=>n[t]?c(n[t]):null},write:!!e&&{allowNull:!0,writer(e,n){n[t]=e?l(e):null}}}}}function c(t,e=o){return t?u(t)?t.timeZoneIANA:Z(t,e):e}function l(t){return{timeZoneIANA:t}}function Z(e,n=o){if(!e||!t.has(e.timeZone))return n;const r=t.get(e.timeZone);return a(e.timeZone)||e.respectsDaylightSaving?r:h(r)}function h(t){const o=e.local().setZone(t),r=Math.min(o.set({month:1,day:1}).offset,o.set({month:5}).offset);if(0===r)return"Etc/UTC";return`Etc/GMT${n.instance(-r).formatOffset(0,"narrow")}`}function p(t,e,n,o,s){if(e&&"date"===s)return{timeZone:i,timeZoneName:void 0};const u=o.timeStyle||o.hour,a=n===r;return{timeZone:a?"timestamp-offset"===s?void 0:t??i:n,timeZoneName:a&&u?m:void 0}}function w(t){const e=new Set(["etc/utc","etc/gmt","gmt"]),n=new Set(Intl.supportedValuesOf("timeZone").map((t=>t.toLowerCase())));return t===o||t===r||e.has(t.toLowerCase())||n.has(t.toLowerCase())}export{Z as convertLegacyTimeZone,c as fromTimeReference,p as getTimeZoneFormattingOptions,w as isTimeZoneValid,m as shortTimeZoneName,o as system,s as systemTimeZone,f as timeZoneProperty,l as toTimeReference,r as unknown,i as utc};
5
+ import{system as t,utc as e,unknown as n}from"./constants.js";import{legacyTimeZoneMap as o}from"./legacyTimeZoneMap.js";import{DateTime as r,FixedOffsetZone as i}from"luxon";const s="shortOffset";function m(t){return"timeZoneIANA"in t}function u(t){return t.startsWith("UTC")}function a(t,e=!1){return{json:{read:{source:t,reader:(e,n)=>n[t]?f(n[t]):null},write:!!e&&{allowNull:!0,writer(e,n){n[t]=e?c(e):null}}}}}function f(e,n=t){return e?m(e)?e.timeZoneIANA:l(e,n):n}function c(t){return{timeZoneIANA:t}}function l(e,n=t){if(!e||!o.has(e.timeZone))return n;const r=o.get(e.timeZone);return u(e.timeZone)||e.respectsDaylightSaving?r:Z(r)}function Z(t){const e=r.local().setZone(t),n=Math.min(e.set({month:1,day:1}).offset,e.set({month:5}).offset);if(0===n)return"Etc/UTC";return`Etc/GMT${i.instance(-n).formatOffset(0,"narrow")}`}function h(t,o,r,i,m){if(o&&"date"===m)return{timeZone:e,timeZoneName:void 0};const u=i.timeStyle||i.hour,a=r===n;return{timeZone:a?"timestamp-offset"===m?void 0:t??e:r,timeZoneName:a&&u?s:void 0}}function p(e){const o=new Set(["etc/utc","etc/gmt","gmt"]),r=new Set(Intl.supportedValuesOf("timeZone").map((t=>t.toLowerCase())));return e===t||e===n||o.has(e.toLowerCase())||r.has(e.toLowerCase())}export{l as convertLegacyTimeZone,f as fromTimeReference,h as getTimeZoneFormattingOptions,p as isTimeZoneValid,s as shortTimeZoneName,a as timeZoneProperty,c as toTimeReference};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/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 s from"../../../../core/Error.js";import{getFullyQualifiedFontName as r}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{MosaicType as M}from"./enums.js";import _ from"./GlyphMosaic.js";import I from"./GlyphSource.js";import w from"./Rect.js";import S from"./SDFConverter.js";import z from"./SpriteMosaic.js";import{charCodes as R,discardUrlIfHasUrlHash as T,getCIMMarkerPlacementHash as C,isSVGImage as P}from"./Utils.js";import{AnimatableTextureResource as x}from"./animatedFormats/AnimatableTextureResource.js";import{AnimationStore as b}from"./animations/store/AnimationStore.js";import{TextureSamplingMode as j}from"../../../webgl/enums.js";const $="arial-unicode-ms-regular",v=()=>a.getLogger("esri.views.MapView"),k=(e,t,i)=>v().error(new s(e,t,i)),A=(e,t="")=>v().warnOnce(e,t);class F{static fromMosaic(e,t){return new F(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 G{constructor(i){this._requestRender=i,this._resourceManager=new u,this._invalidFontsMap=new Map,this._sdfConverter=new S(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(r){if(!o(r))throw new s("mapview-invalid-resource",`Could not fetch requested resource at ${e}`,r);throw r}}}),this.animationStore=new b,this._spriteMosaic=new z(2048,2048,500),this._glyphSource=new I(`${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 k("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 w(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 k("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(M.GLYPH,t);return e}const s=await this._rasterizeSprite(i,t);return s&&this._setTextureBinding(M.SPRITE,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?f:y}}:(k("mapview-invalid-resource",`Unable to find resource for ${t}`),{size:[0,0],texture:{texture:null,unit:0}})}_getTextureBindingInfo(e,t,i){const s=this._bindingInfos[t-1],r=s.page,a="Nearest"===s.samplingMode?j.NEAREST:i?j.LINEAR_MIPMAP_LINEAR:j.LINEAR;switch(s.mosaicType){case M.SPRITE:{const t=[this.sprites.getWidth(r),this.sprites.getHeight(r)],i=this._spriteMosaic.getTexture(e,r);return i.setSamplingMode(a),{type:"sprite",texture:i,size:t}}case M.GLYPH:{const t=[this.glyphs.width,this.glyphs.height],i=this._glyphMosaic.getTexture(e,r);return this._glyphMosaic.bind(e,a,r,y),i.setSamplingMode(a),{type:"glyph",texture:i,size:t}}default:return k("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 s=F.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:s,textString:a}=e,n=r(s),o=this._invalidFontsMap.has(n),[c,h]=i(a),l=R(c);try{const e=o?$: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){A(`Font ${n} is not available on the web, using "Arial Unicode MS Regular"`),this._invalidFontsMap.set(n,!0);return{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems($,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.geom)}.${e.asFill?1:0}`;case"fill-style":return`fill_style:${e.style}`;case"animated":return JSON.stringify(T(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: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},N(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=[g,g],{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)}async _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 k("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},N(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=N(e),c={type:"CIMAnimatedSymbolProperties"},h=0);const l=new x(r,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 r=e.url;if(L(r)||E(r))return this._handleGIFOrPNG(e,t,i);if("animated"===e.type)return k("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;try{let s;const a=this.resourceManager.getResource(r);if(null!=a&&a instanceof HTMLImageElement)s=a;else{const{data:e}=await this._imageRequestQueue.push(r,{...i});s=e}if(P(r))if("width"in e&&"height"in e)s.width=h(e.width),s.height=h(e.height);else if("cim"in e){const t=e;s.width=h(t.width??t.scaleX*t.size),s.height=h(t.size)}if(!s.width||!s.height)return null;const n=s.width,o=s.height,c="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:l,sdf:u,image:p}=this._rasterizer.rasterizeImageResource(n,o,s,c);return this._addItemToMosaic(t,l,{type:"static",data:p},N(e),u,!1)}catch(k){if(!o(k))throw new s("mapview-invalid-resource",`Could not fetch requested resource at ${r}. ${k.message}`);throw k}}_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 N(e){switch(e.type){case"CIMVectorMarker":case"CIMPictureMarker":return U(e);default:return!0}}const B=e=>null!=e&&e.startsWith("data:image/gif"),L=e=>e&&(e.includes(".gif")||B(e)),O=e=>null!=e&&e.startsWith("data:image/png"),E=e=>e&&(e.includes(".png")||O(e)),U=e=>e&&"markerPlacement"in e&&e.markerPlacement&&"CIMMarkerPlacementInsidePolygon"===e.markerPlacement.type;export{G as default};
5
+ import e from"../../../../config.js";import t from"../../../../request.js";import{bidiText as i}from"../../../../core/BidiText.js";import s from"../../../../core/Error.js";import{getFullyQualifiedFontName as r}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{MosaicType as M}from"./enums.js";import _ from"./GlyphMosaic.js";import I from"./GlyphSource.js";import w from"./Rect.js";import S from"./SDFConverter.js";import z from"./SpriteMosaic.js";import{discardUrlIfHasUrlHash as R}from"./urlUtils.js";import{charCodes as T,getCIMMarkerPlacementHash as C,isSVGImage as P}from"./Utils.js";import{AnimatableTextureResource as x}from"./animatedFormats/AnimatableTextureResource.js";import{AnimationStore as b}from"./animations/store/AnimationStore.js";import{TextureSamplingMode as j}from"../../../webgl/enums.js";const $="arial-unicode-ms-regular",v=()=>a.getLogger("esri.views.MapView"),k=(e,t,i)=>v().error(new s(e,t,i)),A=(e,t="")=>v().warnOnce(e,t);class F{static fromMosaic(e,t){return new F(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 G{constructor(i){this._requestRender=i,this._resourceManager=new u,this._invalidFontsMap=new Map,this._sdfConverter=new S(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(r){if(!o(r))throw new s("mapview-invalid-resource",`Could not fetch requested resource at ${e}`,r);throw r}}}),this.animationStore=new b,this._spriteMosaic=new z(2048,2048,500),this._glyphSource=new I(`${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 k("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 w(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 k("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(M.GLYPH,t);return e}const s=await this._rasterizeSprite(i,t);return s&&this._setTextureBinding(M.SPRITE,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?f:y}}:(k("mapview-invalid-resource",`Unable to find resource for ${t}`),{size:[0,0],texture:{texture:null,unit:0}})}_getTextureBindingInfo(e,t,i){const s=this._bindingInfos[t-1],r=s.page,a="Nearest"===s.samplingMode?j.NEAREST:i?j.LINEAR_MIPMAP_LINEAR:j.LINEAR;switch(s.mosaicType){case M.SPRITE:{const t=[this.sprites.getWidth(r),this.sprites.getHeight(r)],i=this._spriteMosaic.getTexture(e,r);return i.setSamplingMode(a),{type:"sprite",texture:i,size:t}}case M.GLYPH:{const t=[this.glyphs.width,this.glyphs.height],i=this._glyphMosaic.getTexture(e,r);return this._glyphMosaic.bind(e,a,r,y),i.setSamplingMode(a),{type:"glyph",texture:i,size:t}}default:return k("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 s=F.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:s,textString:a}=e,n=r(s),o=this._invalidFontsMap.has(n),[c,h]=i(a),l=T(c);try{const e=o?$: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){A(`Font ${n} is not available on the web, using "Arial Unicode MS Regular"`),this._invalidFontsMap.set(n,!0);return{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems($,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.geom)}.${e.asFill?1:0}`;case"fill-style":return`fill_style:${e.style}`;case"animated":return JSON.stringify(R(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: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},N(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=[g,g],{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)}async _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 k("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},N(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=N(e),c={type:"CIMAnimatedSymbolProperties"},h=0);const l=new x(r,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 r=e.url;if(L(r)||U(r))return this._handleGIFOrPNG(e,t,i);if("animated"===e.type)return k("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;try{let s;const a=this.resourceManager.getResource(r);if(null!=a&&a instanceof HTMLImageElement)s=a;else{const{data:e}=await this._imageRequestQueue.push(r,{...i});s=e}if(P(r))if("width"in e&&"height"in e)s.width=h(e.width),s.height=h(e.height);else if("cim"in e){const t=e;s.width=h(t.width??t.scaleX*t.size),s.height=h(t.size)}if(!s.width||!s.height)return null;const n=s.width,o=s.height,c="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:l,sdf:u,image:p}=this._rasterizer.rasterizeImageResource(n,o,s,c);return this._addItemToMosaic(t,l,{type:"static",data:p},N(e),u,!1)}catch(k){if(!o(k))throw new s("mapview-invalid-resource",`Could not fetch requested resource at ${r}. ${k.message}`);throw k}}_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 N(e){switch(e.type){case"CIMVectorMarker":case"CIMPictureMarker":return E(e);default:return!0}}const B=e=>null!=e&&e.startsWith("data:image/gif"),L=e=>e&&(e.includes(".gif")||B(e)),O=e=>null!=e&&e.startsWith("data:image/png"),U=e=>e&&(e.includes(".png")||O(e)),E=e=>e&&"markerPlacement"in e&&e.markerPlacement&&"CIMMarkerPlacementInsidePolygon"===e.markerPlacement.type;export{G as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Error.js";import t from"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../webgl/checkWebGLError.js";import{PixelType as r}from"../../../webgl/enums.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/GLObjectType.js";import{getDataTypeBytes as n}from"../../../webgl/getDataTypeBytes.js";import{Texture as a}from"../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../webgl/TextureDescriptor.js";import{VertexElementDescriptor as o}from"../../../webgl/VertexElementDescriptor.js";const s=()=>t.getLogger("esri.views.2d.engine.webgl.Utils");function l(t){switch(t){case r.UNSIGNED_BYTE:return 1;case r.UNSIGNED_SHORT_4_4_4_4:return 2;case r.FLOAT:return 4;default:return void s().error(new e("webgl-utils",`Unable to handle type ${t}`))}}function p(t){switch(t){case r.UNSIGNED_BYTE:return Uint8Array;case r.UNSIGNED_SHORT_4_4_4_4:return Uint16Array;case r.FLOAT:return Float32Array;default:return void s().error(new e("webgl-utils",`Unable to handle type ${t}`))}}function c(e){const t=new Map;for(const r in e){const a=e[r];let i=0;t.set(r,a.map((e=>{const t=new o(e.name,e.count,e.type,i,0,e.normalized||!1);return i+=e.count*n(e.type),t}))),t.get(r).forEach((e=>e.stride=i))}return t}const m=e=>{const t=new Map;for(const r in e)for(const n of e[r])t.set(n.name,n.location);return t},u=e=>{const t={};return e.forEach(((e,r)=>t[r]=e?.length?e[0].stride:0)),t},d=new Map,f=(e,t)=>{if(!d.has(e)){const r=c(t),n={strides:u(r),bufferLayouts:r,attributes:m(t)};d.set(e,n)}return d.get(e)},g=e=>e.includes("data:image/svg+xml");function $(e){const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return t}const M=e=>!!e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4));function h(e,t,r){const n=new i(t.width,t.height);return n.dataType=t.dataType,t.depth&&(n.depth=t.depth),t.flipped&&(n.flipped=t.flipped),t.hasMipmap&&(n.hasMipmap=t.hasMipmap),n.internalFormat=t.internalFormat,t.isImmutable&&(n.isImmutable=t.isImmutable),t.isOpaque&&(n.isOpaque=t.isOpaque),t.maxAnisotropy&&(n.maxAnisotropy=t.maxAnisotropy),n.pixelFormat=t.pixelFormat,t.preMultiplyAlpha&&(n.preMultiplyAlpha=t.preMultiplyAlpha),t.samplingMode&&(n.samplingMode=t.samplingMode),t.target&&(n.target=t.target),n.uniform=t.uniform,t.unpackAlignment&&(n.unpackAlignment=t.unpackAlignment),t.wrapMode&&(n.wrapMode=t.wrapMode),new a(e,n,r)}function w(e){return"url"in e&&"urlHash"in e?{...e,url:""}:e}function y(e){if(null==e)return"";const{type:t}=e;switch(t){case"CIMMarkerPlacementAlongLineRandomSize":return`${t}-${e.seed}-${e.randomization}`;case"CIMMarkerPlacementAlongLineVariableSize":return`${t}-${e.maxRandomOffset}-${e.numberOfSizes}-${e.seed}-${e.variationMethod}`;case"CIMMarkerPlacementAtExtremities":return`${t}-${e.extremityPlacement}-${e.offsetAlongLine}`;case"CIMMarkerPlacementAtRatioPositions":return`${t}-${e.beginPosition}-${e.endPosition}-${e.flipFirst}-${JSON.stringify(e.positionArray)}`;case"CIMMarkerPlacementAtMeasuredUnits":return`${t}-${e.interval}-${e.skipMarkerRate}-${e.placeAtExtremities}`;case"CIMMarkerPlacementInsidePolygon":return`${t}-${e.stepX}-${e.stepY}-${e.randomness}-${e.gridType}-${e.seed}-${e.shiftOddRows}`;case"CIMMarkerPlacementOnLine":return`${t}-${e.relativeTo}-${e.startPointOffset}`;case"CIMMarkerPlacementOnVertices":return`${t}-${e.placeOnControlPoints}-${e.placeOnEndPoints}-${e.placeOnRegularVertices}`;case"CIMMarkerPlacementPolygonCenter":return`${t}-${e.method}`;default:return`${t}`}}export{$ as charCodes,c as createAttributeLayout,f as createProgramDescriptor,h as createTexture,w as discardUrlIfHasUrlHash,y as getCIMMarkerPlacementHash,p as getPixelArrayCtor,l as getPixelBytes,g as isSVGImage,M as isValidSVG};
5
+ import e from"../../../../core/Error.js";import t from"../../../../core/Logger.js";import{PixelType as r}from"../../../webgl/enums.js";import{getDataTypeBytes as n}from"../../../webgl/getDataTypeBytes.js";import{VertexElementDescriptor as s}from"../../../webgl/VertexElementDescriptor.js";const a=()=>t.getLogger("esri.views.2d.engine.webgl.Utils");function o(t){switch(t){case r.UNSIGNED_BYTE:return 1;case r.UNSIGNED_SHORT_4_4_4_4:return 2;case r.FLOAT:return 4;default:return void a().error(new e("webgl-utils",`Unable to handle type ${t}`))}}function i(t){switch(t){case r.UNSIGNED_BYTE:return Uint8Array;case r.UNSIGNED_SHORT_4_4_4_4:return Uint16Array;case r.FLOAT:return Float32Array;default:return void a().error(new e("webgl-utils",`Unable to handle type ${t}`))}}function c(e){const t=new Map;for(const r in e){const a=e[r];let o=0;t.set(r,a.map((e=>{const t=new s(e.name,e.count,e.type,o,0,e.normalized||!1);return o+=e.count*n(e.type),t}))),t.get(r).forEach((e=>e.stride=o))}return t}const l=e=>{const t=new Map;for(const r in e)for(const n of e[r])t.set(n.name,n.location);return t},u=e=>{const t={};return e.forEach(((e,r)=>t[r]=e?.length?e[0].stride:0)),t},m=new Map,$=(e,t)=>{if(!m.has(e)){const r=c(t),n={strides:u(r),bufferLayouts:r,attributes:l(t)};m.set(e,n)}return m.get(e)},f=e=>e.includes("data:image/svg+xml");function d(e){const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return t}const g=e=>!!e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4));function p(e){if(null==e)return"";const{type:t}=e;switch(t){case"CIMMarkerPlacementAlongLineRandomSize":return`${t}-${e.seed}-${e.randomization}`;case"CIMMarkerPlacementAlongLineVariableSize":return`${t}-${e.maxRandomOffset}-${e.numberOfSizes}-${e.seed}-${e.variationMethod}`;case"CIMMarkerPlacementAtExtremities":return`${t}-${e.extremityPlacement}-${e.offsetAlongLine}`;case"CIMMarkerPlacementAtRatioPositions":return`${t}-${e.beginPosition}-${e.endPosition}-${e.flipFirst}-${JSON.stringify(e.positionArray)}`;case"CIMMarkerPlacementAtMeasuredUnits":return`${t}-${e.interval}-${e.skipMarkerRate}-${e.placeAtExtremities}`;case"CIMMarkerPlacementInsidePolygon":return`${t}-${e.stepX}-${e.stepY}-${e.randomness}-${e.gridType}-${e.seed}-${e.shiftOddRows}`;case"CIMMarkerPlacementOnLine":return`${t}-${e.relativeTo}-${e.startPointOffset}`;case"CIMMarkerPlacementOnVertices":return`${t}-${e.placeOnControlPoints}-${e.placeOnEndPoints}-${e.placeOnRegularVertices}`;case"CIMMarkerPlacementPolygonCenter":return`${t}-${e.method}`;default:return`${t}`}}export{d as charCodes,c as createAttributeLayout,$ as createProgramDescriptor,p as getCIMMarkerPlacementHash,i as getPixelArrayCtor,o as getPixelBytes,f as isSVGImage,g as isValidSVG};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{numericHash as e}from"../../../../../../core/string.js";import{discardUrlIfHasUrlHash as t}from"../../Utils.js";import{AResourceProxy as r}from"../../shaderGraph/techniques/mesh/AResourceProxy.js";class s extends r{constructor(e){super(),this._fetcher=e,this._controller=new AbortController,this._pendingIds=new Set,this._pendingRequests=[],this._resourceIdToResource=new Map}destroy(){this._controller.abort()}get _abortOptions(){return{signal:this._controller.signal}}enqueueRequest(r){const s=t(r.resource),o=e(JSON.stringify(s));return this._pendingIds.has(o)||(this._pendingIds.add(o),this._pendingRequests.push({...r,resourceId:o})),o}async fetchEnqueuedResources(){const e=this._pendingRequests;if(this._pendingIds.clear(),this._pendingRequests=[],0===e.length)return;const t=await this._fetcher.fetch(e,this._abortOptions);for(let r=0;r<t.length;r++){const s=e[r].resourceId;this._resourceIdToResource.set(s,t[r])}}async fetchResourceImmediate(e){const t=await this._fetcher.fetch([e],this._abortOptions);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch resources");return t[0]}async fetchDictionaryResourceImmediate(e){const t=await this._fetcher.fetchDictionary([e],this._abortOptions);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch dictionary resources");return t[0]}getResource(e){return this._resourceIdToResource.get(e)}}export{s as ResourceProxy};
5
+ import{numericHash as e}from"../../../../../../core/string.js";import{discardUrlIfHasUrlHash as t}from"../../urlUtils.js";import{AResourceProxy as r}from"../../shaderGraph/techniques/mesh/AResourceProxy.js";class s extends r{constructor(e){super(),this._fetcher=e,this._controller=new AbortController,this._pendingIds=new Set,this._pendingRequests=[],this._resourceIdToResource=new Map}destroy(){this._controller.abort()}get _abortOptions(){return{signal:this._controller.signal}}enqueueRequest(r){const s=t(r.resource),o=e(JSON.stringify(s));return this._pendingIds.has(o)||(this._pendingIds.add(o),this._pendingRequests.push({...r,resourceId:o})),o}async fetchEnqueuedResources(){const e=this._pendingRequests;if(this._pendingIds.clear(),this._pendingRequests=[],0===e.length)return;const t=await this._fetcher.fetch(e,this._abortOptions);for(let r=0;r<t.length;r++){const s=e[r].resourceId;this._resourceIdToResource.set(s,t[r])}}async fetchResourceImmediate(e){const t=await this._fetcher.fetch([e],this._abortOptions);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch resources");return t[0]}async fetchDictionaryResourceImmediate(e){const t=await this._fetcher.fetchDictionary([e],this._abortOptions);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch dictionary resources");return t[0]}getResource(e){return this._resourceIdToResource.get(e)}}export{s as ResourceProxy};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as t}from"../../../../../../../geometry/GeometryCursor.js";import{packComplexFillBitset as r,getPatternSize as s,complexFillVertexSpec as i}from"./ComplexFillMeshWriter.js";import{packBitset as o}from"./meshWriterUtils.js";import{outlineFillVertexSpec_Outline as a,OutlineFillMeshWriter as n,OutlineFillOutlineMeshWriter as u}from"./OutlineFillMeshWriter.js";import{packPrecision as c,signedToUnsignedByte as p}from"../shaders/ComplexOutlineFillShader.js";import{bitsetTypeFillOutline as l}from"../shaders/constants.js";import{DataType as m}from"../../../../../../webgl/enums.js";const d=i,h=a,f={createComputedParams:e=>e,optionalAttributes:d.optionalAttributes,attributes:{...d.attributes,bitset:{type:m.UNSIGNED_BYTE,count:1,pack:e=>r(e)},aux1:{count:1,type:m.HALF_FLOAT,pack:e=>s(e).width},aux2:{count:1,type:m.HALF_FLOAT,pack:e=>s(e).height},aux3:{count:2,type:m.HALF_FLOAT,pack:({offsetX:t,offsetY:r})=>[e(t),e(r)]},aux4:{count:2,type:m.UNSIGNED_BYTE,pack:({scaleX:e,scaleY:t})=>[e*c,t*c]}}},y={createComputedParams:e=>e,optionalAttributes:d.optionalAttributes,attributes:{...d.attributes,color:h.attributes.color,bitset:{type:m.UNSIGNED_BYTE,count:1,pack:e=>o([[l,!0]])},aux1:{count:1,type:m.HALF_FLOAT,pack:t=>e(.5*t.width)},aux2:{count:1,type:m.HALF_FLOAT,pack:t=>e(.5*t.referenceWidth)},aux3:{count:2,type:m.HALF_FLOAT,packTessellation:({extrusionOffsetX:e,extrusionOffsetY:t})=>[e,t]},aux4:{count:2,type:m.UNSIGNED_BYTE,packTessellation:({normalX:e,normalY:t})=>[e*c+p,t*c+p]}}};class x extends u{constructor(){super(...arguments),this.vertexSpec=y}}class _ extends n{constructor(){super(...arguments),this.vertexSpec=f}_createOutlineWriter(e,t,r,s){return new x(e,t,r,s)}_write(e,r,s){const i=s?.asOptimized()??r.readGeometryForDisplay(),o=this._clip(i);if(!o)return;const a=this.evaluatedMeshParams.sprite?.textureBinding;e.recordStart(this.instanceId,this.attributeLayout,a),this._writeGeometry(e,r,o),this._lineMeshWriter.writeLineVertices(e,t.fromOptimizedCIM(o,"esriGeometryPolyline"),r),e.recordEnd()}ensurePacked(e,t,r){super.ensurePacked(e,t,r),this._lineMeshWriter.ensurePacked(e,t,r)}enqueueRequest(e,t,r){super.enqueueRequest(e,t,r),this._lineMeshWriter.enqueueRequest(e,t,r)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}}export{_ as ComplexOutlineFillMeshWriter};
5
+ import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as t}from"../../../../../../../geometry/GeometryCursor.js";import{packComplexFillBitset as r,getPatternSize as s,complexFillVertexSpec as i}from"./ComplexFillMeshWriter.js";import{packBitset as o}from"./meshWriterUtils.js";import{outlineFillVertexSpec_Outline as a,OutlineFillMeshWriter as n,OutlineFillOutlineMeshWriter as u}from"./OutlineFillMeshWriter.js";import{packPrecision as c,signedToUnsignedByte as p,bitsetTypeFillOutline as l}from"../shaders/constants.js";import{DataType as m}from"../../../../../../webgl/enums.js";const d=i,h=a,y={createComputedParams:e=>e,optionalAttributes:d.optionalAttributes,attributes:{...d.attributes,bitset:{type:m.UNSIGNED_BYTE,count:1,pack:e=>r(e)},aux1:{count:1,type:m.HALF_FLOAT,pack:e=>s(e).width},aux2:{count:1,type:m.HALF_FLOAT,pack:e=>s(e).height},aux3:{count:2,type:m.HALF_FLOAT,pack:({offsetX:t,offsetY:r})=>[e(t),e(r)]},aux4:{count:2,type:m.UNSIGNED_BYTE,pack:({scaleX:e,scaleY:t})=>[e*c,t*c]}}},f={createComputedParams:e=>e,optionalAttributes:d.optionalAttributes,attributes:{...d.attributes,color:h.attributes.color,bitset:{type:m.UNSIGNED_BYTE,count:1,pack:e=>o([[l,!0]])},aux1:{count:1,type:m.HALF_FLOAT,pack:t=>e(.5*t.width)},aux2:{count:1,type:m.HALF_FLOAT,pack:t=>e(.5*t.referenceWidth)},aux3:{count:2,type:m.HALF_FLOAT,packTessellation:({extrusionOffsetX:e,extrusionOffsetY:t})=>[e,t]},aux4:{count:2,type:m.UNSIGNED_BYTE,packTessellation:({normalX:e,normalY:t})=>[e*c+p,t*c+p]}}};class _ extends u{constructor(){super(...arguments),this.vertexSpec=f}}class x extends n{constructor(){super(...arguments),this.vertexSpec=y}_createOutlineWriter(e,t,r,s){return new _(e,t,r,s)}_write(e,r,s){const i=s?.asOptimized()??r.readGeometryForDisplay(),o=this._clip(i);if(!o)return;const a=this.evaluatedMeshParams.sprite?.textureBinding;e.recordStart(this.instanceId,this.attributeLayout,a),this._writeGeometry(e,r,o),this._lineMeshWriter.writeLineVertices(e,t.fromOptimizedCIM(o,"esriGeometryPolyline"),r),e.recordEnd()}ensurePacked(e,t,r){super.ensurePacked(e,t,r),this._lineMeshWriter.ensurePacked(e,t,r)}enqueueRequest(e,t,r){super.enqueueRequest(e,t,r),this._lineMeshWriter.enqueueRequest(e,t,r)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}}export{x as ComplexOutlineFillMeshWriter};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{CIMEffectHelper as t}from"../../../../../../../symbols/cim/effects/CIMEffectHelper.js";import{loadGeometryEngine as r,getGeometryEngine as a}from"./loadGeometryEngine.js";import{MeshWriterVertexPack as s}from"./MeshWriterVertexPack.js";function i(e){if(!e)return!1;for(const t of e)switch(t.effect.type){case"CIMGeometricEffectBuffer":case"CIMGeometricEffectOffset":case"CIMGeometricEffectDonut":return!0}return!1}class c{constructor(e,t,r,a){this._instanceId=e,this._evaluator=t,this._enabledOptionalAttributes=r,this._viewParams=a,this._evaluator.evaluator=e=>this.vertexSpec.createComputedParams(e)}get _vertexPack(){if(!this._cachedVertexPack){const e=s.fromVertexSpec(this.vertexSpec,this._enabledOptionalAttributes);this._evaluator.hasDynamicProperties||e.pack(this._evaluator.evaluatedMeshParams,this._viewParams),this._cachedVertexPack=e}return this._cachedVertexPack}get evaluatedMeshParams(){return this._evaluator.evaluatedMeshParams}get hasEffects(){return!!this.evaluatedMeshParams.effects}get instanceId(){return this._instanceId}get attributeLayout(){return this._vertexPack.attributeLayout}get _preventEffectClipping(){return!1}setReferences(e){this._references=e}getBoundsInfo(){return null}getTileInfo(){return this._viewParams.tileInfo}async loadDependencies(){i(this._evaluator.inputMeshParams.effects?.effectInfos)&&await r()}enqueueRequest(e,t,r){this._evaluator.hasDynamicProperties&&this._evaluator.enqueueRequest(e,t,r)}write(r,s,i,c,n){this.ensurePacked(s,i,c);const o=this.evaluatedMeshParams.effects;if(!o||0===o.length)return void this._write(r,i,void 0,n);const u=i.readGeometryForDisplay()?.clone();if(!u)return;const h=e.fromOptimizedCIM(u,i.geometryType),f=a();h.invertY();const l=r.id||"",m=t.executeEffects(o,h,l,f,this._preventEffectClipping);let v;for(;v=m.next();)v.invertY(),this._write(r,i,v,n)}ensurePacked(e,t,r){if(!this._evaluator.hasDynamicProperties)return;const a=this._evaluator.evaluateMeshParams(e,t,r);this._vertexPack.pack(a,this._viewParams)}hasArcadeDependency(e){return this._evaluator.hasArcadeDependency(e)}_writeVertex(e,t,r,a,s){const i=this.evaluatedMeshParams;this._vertexPack.writeVertex(e,t,r,a,i,s)}}export{c as MeshWriter};
5
+ import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{CIMEffectHelper as t}from"../../../../../../../symbols/cim/effects/CIMEffectHelper.js";import{loadGeometryEngine as r,getGeometryEngine as a}from"./loadGeometryEngine.js";import{MeshWriterVertexPack as s}from"./MeshWriterVertexPack.js";function i(e){if(!e)return!1;for(const t of e)switch(t.effect.type){case"CIMGeometricEffectBuffer":case"CIMGeometricEffectDonut":case"CIMGeometricEffectOffset":case"CIMGeometricEffectTaperedPolygon":case"CIMGeometricEffectEnclosingPolygon":return!0}return!1}class c{constructor(e,t,r,a){this._instanceId=e,this._evaluator=t,this._enabledOptionalAttributes=r,this._viewParams=a,this._evaluator.evaluator=e=>this.vertexSpec.createComputedParams(e)}get _vertexPack(){if(!this._cachedVertexPack){const e=s.fromVertexSpec(this.vertexSpec,this._enabledOptionalAttributes);this._evaluator.hasDynamicProperties||e.pack(this._evaluator.evaluatedMeshParams,this._viewParams),this._cachedVertexPack=e}return this._cachedVertexPack}get evaluatedMeshParams(){return this._evaluator.evaluatedMeshParams}get hasEffects(){return!!this.evaluatedMeshParams.effects}get instanceId(){return this._instanceId}get attributeLayout(){return this._vertexPack.attributeLayout}get _preventEffectClipping(){return!1}setReferences(e){this._references=e}getBoundsInfo(){return null}getTileInfo(){return this._viewParams.tileInfo}async loadDependencies(){i(this._evaluator.inputMeshParams.effects?.effectInfos)&&await r()}enqueueRequest(e,t,r){this._evaluator.hasDynamicProperties&&this._evaluator.enqueueRequest(e,t,r)}write(r,s,i,c,n){this.ensurePacked(s,i,c);const o=this.evaluatedMeshParams.effects;if(!o||0===o.length)return void this._write(r,i,void 0,n);const u=i.readGeometryForDisplay()?.clone();if(!u)return;const f=e.fromOptimizedCIM(u,i.geometryType),h=a();f.invertY();const l=r.id||"",m=t.executeEffects(o,f,l,h,this._preventEffectClipping);let v;for(;v=m.next();)v.invertY(),this._write(r,i,v,n)}ensurePacked(e,t,r){if(!this._evaluator.hasDynamicProperties)return;const a=this._evaluator.evaluateMeshParams(e,t,r);this._vertexPack.pack(a,this._viewParams)}hasArcadeDependency(e){return this._evaluator.hasArcadeDependency(e)}_writeVertex(e,t,r,a,s){const i=this.evaluatedMeshParams;this._vertexPack.writeVertex(e,t,r,a,i,s)}}export{c as MeshWriter};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,input as i}from"../../GraphShaderModule.js";import{greaterThan as s,Float as l,ifElse as p,Vec4 as a,Vec2 as n}from"../../graph/glsl.js";import{FeatureVertexInput as m,BaseHittestVertexInput as u}from"./AFeatureShader.js";import{getComplexFillVertexData as h,getComplexFillFragmentColor as f}from"./ComplexFillShader.js";import{hittestFill as d,failHittest as c}from"./hittestUtils.js";import{getLineFragmentColor as x}from"./LineShader.js";import{LocalTileOffset as y}from"./LocalTileOffset.js";import{MosaicInfo as v}from"./MosaicInfo.js";import{AOutlineFillShader as j,getOutlineFillVertexData as g}from"./OutlineFillShader.js";import{PatternOutlineFillFragmentInput as O}from"./PatternOutlineFillShader.js";const S=16,F=1/S,b=128;class w extends m{}t([e(3,a)],w.prototype,"color",void 0),t([e(4,a)],w.prototype,"tlbr",void 0),t([e(5,l)],w.prototype,"angle",void 0),t([e(6,l)],w.prototype,"aux1",void 0),t([e(7,l)],w.prototype,"aux2",void 0),t([e(8,n)],w.prototype,"aux3",void 0),t([e(9,n)],w.prototype,"aux4",void 0),t([e(10,n)],w.prototype,"zoomRange",void 0);class C extends O{}class R extends j{constructor(){super(...arguments),this.type="ComplexOutlineFillShader"}vertex(t,o){const{aux1:e,aux2:r,aux3:i,aux4:p}=t,a={...t,width:e,height:r,offset:i,scale:p.multiply(F)},n={...t,halfWidth:e,referenceHalfWidth:r,offset:i,normal:p.subtract(b).multiply(F)},m=g(this,n),u=h(this,a),f=s(m.isOutline,new l(.5));return{...m,...u,...this.maybeRunHittest(t,o,f)}}fragment(t){const{isOutline:o}=t,e=s(o,new l(.5)),r=x(t,this.antialiasingControls.blur),i=f(this,t),a=p(e,r,i),n=p(e,new l(1/255),new l(0));return this.getFragmentOutput(a,t,n)}hittest(t,o,e){return p(e,c(this.hittestRequest),d(this,t,o))}}t([r(v)],R.prototype,"mosaicInfo",void 0),t([r(y)],R.prototype,"localTileOffset",void 0),t([o(0,i(w)),o(1,i(u))],R.prototype,"vertex",null),t([o(0,i(C))],R.prototype,"fragment",null);export{R as ComplexOutlineFillShader,w as ComplexOutlineFillVertexInput,S as packPrecision,b as signedToUnsignedByte};
5
+ import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,input as i}from"../../GraphShaderModule.js";import{greaterThan as s,Float as l,ifElse as p,Vec4 as a,Vec2 as n}from"../../graph/glsl.js";import{FeatureVertexInput as m,BaseHittestVertexInput as u}from"./AFeatureShader.js";import{getComplexFillVertexData as h,getComplexFillFragmentColor as f}from"./ComplexFillShader.js";import{signedToUnsignedByte as d,packPrecision as c}from"./constants.js";import{hittestFill as x,failHittest as y}from"./hittestUtils.js";import{getLineFragmentColor as j}from"./LineShader.js";import{LocalTileOffset as v}from"./LocalTileOffset.js";import{MosaicInfo as g}from"./MosaicInfo.js";import{AOutlineFillShader as O,getOutlineFillVertexData as S}from"./OutlineFillShader.js";import{PatternOutlineFillFragmentInput as F}from"./PatternOutlineFillShader.js";const b=1/c;class w extends m{}t([e(3,a)],w.prototype,"color",void 0),t([e(4,a)],w.prototype,"tlbr",void 0),t([e(5,l)],w.prototype,"angle",void 0),t([e(6,l)],w.prototype,"aux1",void 0),t([e(7,l)],w.prototype,"aux2",void 0),t([e(8,n)],w.prototype,"aux3",void 0),t([e(9,n)],w.prototype,"aux4",void 0),t([e(10,n)],w.prototype,"zoomRange",void 0);class C extends F{}class R extends O{constructor(){super(...arguments),this.type="ComplexOutlineFillShader"}vertex(t,o){const{aux1:e,aux2:r,aux3:i,aux4:p}=t,a={...t,width:e,height:r,offset:i,scale:p.multiply(b)},n={...t,halfWidth:e,referenceHalfWidth:r,offset:i,normal:p.subtract(d).multiply(b)},m=S(this,n),u=h(this,a),f=s(m.isOutline,new l(.5));return{...m,...u,...this.maybeRunHittest(t,o,f)}}fragment(t){const{isOutline:o}=t,e=s(o,new l(.5)),r=j(t,this.antialiasingControls.blur),i=f(this,t),a=p(e,r,i),n=p(e,new l(1/255),new l(0));return this.getFragmentOutput(a,t,n)}hittest(t,o,e){return p(e,y(this.hittestRequest),x(this,t,o))}}t([r(g)],R.prototype,"mosaicInfo",void 0),t([r(v)],R.prototype,"localTileOffset",void 0),t([o(0,i(w)),o(1,i(u))],R.prototype,"vertex",null),t([o(0,i(C))],R.prototype,"fragment",null);export{R as ComplexOutlineFillShader,w as ComplexOutlineFillVertexInput};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- var i;!function(i){i[i.Geographic=0]="Geographic",i[i.Arithmatic=1]="Arithmatic"}(i||(i={}));const t=3.14159265359/180,c=3.14159265359/128,r=180/3.141592654,a=1/8,e=1,o=1,h=1.1,n=1,p=1/4,g=1/8,m=.2,A=24,G=8,f=8,s=1e-5,u=.05,v=2,x=0,b=1,d=2,j=3,k=1e-30,l=1,q=4,w=0,y=2,z=3,B=0,C=2,D=2,E=3,F=0,H=3,I=16777216,J=1.1;export{i as RotationType,b as attrVvColor,d as attrVvOpacity,j as attrVvRotation,x as attrVvSize,C as bitsetFillRandomPatternOffset,q as bitsetGenericConsiderAlphaOnly,l as bitsetGenericLockColor,E as bitsetLineIsSdf,D as bitsetLineScaleDash,w as bitsetMarkerAlignmentMap,y as bitsetMarkerOutlineAllowColorOverride,z as bitsetMarkerScaleSymbolsProportionally,F as bitsetTextIsBackground,H as bitsetTextIsMapAligned,B as bitsetTypeFillOutline,c as c256ToRad,t as cDegToRad,r as cRadToDeg,s as epsilon,u as epsilonHitTest,p as extrudeScalePlacementPadding,e as fillPositionPrecision,J as magnifierBarrelFactor,v as maxFilterCount,I as maxRepresentableInt,G as maxSdfDistance,k as nanMagicNumber,g as offsetPrecision,m as outlineScale,f as placementPadding,a as positionPrecision,A as sdfFontSize,o as softEdgeRatio,n as thinLineHalfWidth,h as thinLineWidthFactor};
5
+ var i;!function(i){i[i.Geographic=0]="Geographic",i[i.Arithmatic=1]="Arithmatic"}(i||(i={}));const t=3.14159265359/180,c=3.14159265359/128,r=180/3.141592654,a=1/8,e=1,o=1,h=1.1,n=1,p=1/4,g=1/8,m=.2,A=24,G=8,f=8,s=1e-5,u=.05,v=2,x=0,b=1,d=2,j=3,k=1e-30,l=1,q=4,w=0,y=2,z=3,B=0,C=2,D=2,E=3,F=0,H=3,I=16777216,J=1.1,K=16,L=128;export{i as RotationType,b as attrVvColor,d as attrVvOpacity,j as attrVvRotation,x as attrVvSize,C as bitsetFillRandomPatternOffset,q as bitsetGenericConsiderAlphaOnly,l as bitsetGenericLockColor,E as bitsetLineIsSdf,D as bitsetLineScaleDash,w as bitsetMarkerAlignmentMap,y as bitsetMarkerOutlineAllowColorOverride,z as bitsetMarkerScaleSymbolsProportionally,F as bitsetTextIsBackground,H as bitsetTextIsMapAligned,B as bitsetTypeFillOutline,c as c256ToRad,t as cDegToRad,r as cRadToDeg,s as epsilon,u as epsilonHitTest,p as extrudeScalePlacementPadding,e as fillPositionPrecision,J as magnifierBarrelFactor,v as maxFilterCount,I as maxRepresentableInt,G as maxSdfDistance,k as nanMagicNumber,g as offsetPrecision,m as outlineScale,K as packPrecision,f as placementPadding,a as positionPrecision,A as sdfFontSize,L as signedToUnsignedByte,o as softEdgeRatio,n as thinLineHalfWidth,h as thinLineWidthFactor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{maxMapSizeGpu as t}from"../../../../../../../../../layers/support/rasterFunctions/pixelUtils.js";import{uniform as o,define as a,UniformGroup as r}from"../../../../GraphShaderModule.js";import{FixedArray as p,Float as s,mix as n,clamp as l,max as i,Vec4 as m,Vec3 as c,step as u,sign as d,dot as y,Vec2 as h}from"../../../../graph/glsl.js";import{oneMinus as f}from"../../utils.js";import{BaseRasterProcessorShader as g}from"./BaseRasterProcessorShader.js";class w extends r{}e([o(p.ofType(s,3*t))],w.prototype,"rangeMaps",void 0),e([o(p.ofType(s,2*t))],w.prototype,"noDataRanges",void 0),e([o(s)],w.prototype,"unmatchMask",void 0),e([o(s)],w.prototype,"replacementValue",void 0),e([o(h)],w.prototype,"clampRange",void 0);class M extends g{constructor(){super(...arguments),this.type="RemapShader"}_process(e){const t=this._getPixel(e),{rrr:o}=t,{mapValue:a,includeMask:r}=this._computeMapValue(o),{unmatchMask:p,clampRange:s,replacementValue:c}=this.remapConfig,u=this.replaceUnmatched?c:p.multiply(t.r),d=n(u,a,r),y=l(d,s.x,s.y),h=this._computeNoDataFactor(o).multiply(i(p,r));return new m(y,y,y,t.a).multiply(h)}_computeMapValue(e){const{rangeMaps:o}=this.remapConfig;let a=new c(0,0,0),r=new s(0);for(let p=0;p<t/3;p++){const t=9*p,s=new c(o[t],o[t+3],o[t+6]),l=new c(o[t+1],o[t+4],o[t+7]),i=u(s,e).multiply(u(e,l)),m=new c(o[t+2],o[t+5],o[t+8]);r=n(r,m.x,i.x),r=n(r,m.y,i.y),r=n(r,m.z,i.z),a=a.add(i)}return{mapValue:r,includeMask:d(y(a,new c(1,1,1)))}}_computeNoDataFactor(e){const{noDataRanges:o}=this.remapConfig;let a=new c(0,0,0);for(let r=0;r<t/3;r++){const t=6*r,p=new c(o[t],o[t+2],o[t+4]),s=new c(o[t+1],o[t+3],o[t+5]);a=a.add(u(p,e).multiply(u(e,s)))}return f(d(y(a,new c(1,1,1))))}}e([o(w)],M.prototype,"remapConfig",void 0),e([a],M.prototype,"replaceUnmatched",void 0);export{M as RemapShader};
5
+ import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{maxMapSizeGpu as t}from"../../../../../../../../../layers/support/rasterFunctions/pixelUtils.js";import{uniform as o,define as r,UniformGroup as a}from"../../../../GraphShaderModule.js";import{FixedArray as p,Float as s,mix as i,clamp as m,max as n,Vec4 as l,Vec3 as c,step as u,sign as d,dot as h,Vec2 as y}from"../../../../graph/glsl.js";import{oneMinus as f}from"../../utils.js";import{BaseRasterProcessorShader as g}from"./BaseRasterProcessorShader.js";import{computeMapValue as j}from"./math.js";class v extends a{}e([o(p.ofType(s,3*t))],v.prototype,"rangeMaps",void 0),e([o(p.ofType(s,2*t))],v.prototype,"noDataRanges",void 0),e([o(s)],v.prototype,"unmatchMask",void 0),e([o(s)],v.prototype,"replacementValue",void 0),e([o(y)],v.prototype,"clampRange",void 0);class x extends g{constructor(){super(...arguments),this.type="RemapShader"}_process(e){const o=this._getPixel(e),{rangeMaps:r,unmatchMask:a,clampRange:p,replacementValue:s}=this.remapConfig,{mapValue:c,includeMask:u}=j(o.r,r,t),d=this.replaceUnmatched?s:a.multiply(o.r),h=i(d,c,u),y=m(h,p.x,p.y),f=this._computeNoDataFactor(o.rrr).multiply(n(a,u));return new l(y,y,y,o.a).multiply(f)}_computeNoDataFactor(e){const{noDataRanges:o}=this.remapConfig;let r=new c(0,0,0);for(let a=0;a<t/3;a++){const t=6*a,p=new c(o[t],o[t+2],o[t+4]),s=new c(o[t+1],o[t+3],o[t+5]);r=r.add(u(p,e).multiply(u(e,s)))}return f(d(h(r,new c(1,1,1))))}}e([o(v)],x.prototype,"remapConfig",void 0),e([r],x.prototype,"replaceUnmatched",void 0);export{x as RemapShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{sign as t,abs as r,Vec4 as n,floor as u,step as i}from"../../../../graph/glsl.js";function o(n){const u=t(n),i=n.add(r(u).subtract(1));return u.multiply(u).divide(i)}function d(t){return new n(u(t.rgb.add(.5)),t.a)}function e(t,r){return i(r.x,t).multiply(i(t,r.y))}export{e as getRangeClipFactor,o as invertValue,d as roundOutput};
5
+ import{sign as n,abs as t,Vec4 as e,floor as r,step as u,Vec3 as l,Float as i,mix as o,dot as a}from"../../../../graph/glsl.js";function c(e){const r=n(e),u=e.add(t(r).subtract(1));return r.multiply(r).divide(u)}function d(n){return new e(r(n.rgb.add(.5)),n.a)}function w(n,t){return u(t.x,n).multiply(u(n,t.y))}function p(t,e,r){const c=new l(t);let d=new l(0,0,0),w=new i(0);for(let n=0;n<r/3;n++){const t=9*n,r=new l(e[t],e[t+3],e[t+6]),i=new l(e[t+1],e[t+4],e[t+7]),a=u(r,c).multiply(u(c,i)),p=new l(e[t+2],e[t+5],e[t+8]);w=o(w,p.x,a.x),w=o(w,p.y,a.y),w=o(w,p.z,a.z),d=d.add(a)}return{mapValue:w,includeMask:n(a(d,new l(1,1,1)))}}export{p as computeMapValue,w as getRangeClipFactor,c as invertValue,d as roundOutput};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import r from"../../../../../../core/Error.js";import e from"../../../../../../core/Logger.js";import{getDeepValue as t}from"../../../../../../core/object.js";import"../../../../../../core/has.js";import"../../../../../../core/RandomLCG.js";import"../../../../../webgl/checkWebGLError.js";import"../../../../../webgl/enums.js";import"../../../../../webgl/FramebufferObject.js";import{Program as o}from"../../../../../webgl/Program.js";import"../../../../../webgl/GLObjectType.js";import"../../../../../webgl/Texture.js";import{createTexture as i}from"../../Utils.js";const s=()=>e.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram");function n(e,t,o){const i=t.length;if(i!==o){const n=new r("Invalid Uniform",`Invalid length, expected ${o} but got ${i}`,{uniformName:e,values:t});s().errorOnce(n)}}class a{constructor(r,e,t,o,i,s){this._program=null,this._vao=null,this._temporaryTextures=[],this.vertexShader=r,this.fragmentShader=e,this._locations=t,this._locationInfo=o,this._uniformBindings=i,this._transformFeedbackBindings=s}destroy(){this._program&&this._program.dispose(),this.cleanupTemporaryTextures()}get locations(){return this._locations}get locationInfo(){return this._locationInfo}setUniforms(r){this._uniforms=r}cleanupTemporaryTextures(){for(const r of this._temporaryTextures)r.dispose();this._temporaryTextures=[]}bind(r){const e=this._uniforms;if(!this._program){const e=new Map;for(const[r,o]of this._locations)e.set(r,o);const t=[];for(const r of this._transformFeedbackBindings??[]){const{index:e,propertyKey:o}=r;t[e]=`v_${o}`}this._program=new o(r,this.vertexShader,this.fragmentShader,e,new Map,t)}const s=this._program;r.useProgram(s);for(const o of this._uniformBindings){const{shaderModulePath:a,uniformName:f,uniformType:m,uniformArrayLength:c}=o,p=t(a,e);if(null==p){if("sampler2D"===m)continue;throw new Error(`Failed to find uniform value for ${a}`)}switch("array"===m||"array-2d"===m?o.uniformArrayElementType:m){case"sampler2D":{const{unit:e,texture:t}=p;if(s.setUniform1i(f,e),"type"in t)r.bindTexture(t,e);else{const o=i(r,t.descriptor,t.data);r.bindTexture(o,e)}break}case"int":if(!c){s.setUniform1i(f,p);break}n(o.uniformName,p,c),s.setUniform1iv(f,p);break;case"float":if(!c){s.setUniform1f(f,p);break}n(o.uniformName,p,c),s.setUniform1fv(f,p);break;case"vec2":if(!c){s.setUniform2f(f,p[0],p[1]);break}n(o.uniformName,p,c),s.setUniform2fv(f,p.flat());break;case"vec3":if(!c){s.setUniform3f(f,p[0],p[1],p[2]);break}n(o.uniformName,p,c),s.setUniform3fv(f,p.flat());break;case"vec4":if(!c){s.setUniform4f(f,p[0],p[1],p[2],p[3]);break}n(o.uniformName,p,c),s.setUniform4fv(f,p.flat());break;case"mat3":s.setUniformMatrix3fv(f,p);break;case"mat4":s.setUniformMatrix4fv(f,p);break;default:throw new Error(`Unable to set uniform for type ${m}`)}}}}export{a as TypedShaderProgram};
5
+ import r from"../../../../../../core/Error.js";import e from"../../../../../../core/Logger.js";import{getDeepValue as t}from"../../../../../../core/object.js";import"../../../../../../core/has.js";import"../../../../../../core/RandomLCG.js";import"../../../../../webgl/checkWebGLError.js";import"../../../../../webgl/enums.js";import"../../../../../webgl/FramebufferObject.js";import{Program as o}from"../../../../../webgl/Program.js";import"../../../../../webgl/GLObjectType.js";import"../../../../../webgl/Texture.js";import{createTexture as i}from"../../textureUtils.js";const s=()=>e.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram");function n(e,t,o){const i=t.length;if(i!==o){const n=new r("Invalid Uniform",`Invalid length, expected ${o} but got ${i}`,{uniformName:e,values:t});s().errorOnce(n)}}class a{constructor(r,e,t,o,i,s){this._program=null,this._vao=null,this._temporaryTextures=[],this.vertexShader=r,this.fragmentShader=e,this._locations=t,this._locationInfo=o,this._uniformBindings=i,this._transformFeedbackBindings=s}destroy(){this._program&&this._program.dispose(),this.cleanupTemporaryTextures()}get locations(){return this._locations}get locationInfo(){return this._locationInfo}setUniforms(r){this._uniforms=r}cleanupTemporaryTextures(){for(const r of this._temporaryTextures)r.dispose();this._temporaryTextures=[]}bind(r){const e=this._uniforms;if(!this._program){const e=new Map;for(const[r,o]of this._locations)e.set(r,o);const t=[];for(const r of this._transformFeedbackBindings??[]){const{index:e,propertyKey:o}=r;t[e]=`v_${o}`}this._program=new o(r,this.vertexShader,this.fragmentShader,e,new Map,t)}const s=this._program;r.useProgram(s);for(const o of this._uniformBindings){const{shaderModulePath:a,uniformName:f,uniformType:m,uniformArrayLength:c}=o,u=t(a,e);if(null==u){if("sampler2D"===m)continue;throw new Error(`Failed to find uniform value for ${a}`)}switch("array"===m||"array-2d"===m?o.uniformArrayElementType:m){case"sampler2D":{const{unit:e,texture:t}=u;if(s.setUniform1i(f,e),"type"in t)r.bindTexture(t,e);else{const o=i(r,t.descriptor,t.data);r.bindTexture(o,e)}break}case"int":if(!c){s.setUniform1i(f,u);break}n(o.uniformName,u,c),s.setUniform1iv(f,u);break;case"float":if(!c){s.setUniform1f(f,u);break}n(o.uniformName,u,c),s.setUniform1fv(f,u);break;case"vec2":if(!c){s.setUniform2f(f,u[0],u[1]);break}n(o.uniformName,u,c),s.setUniform2fv(f,u.flat());break;case"vec3":if(!c){s.setUniform3f(f,u[0],u[1],u[2]);break}n(o.uniformName,u,c),s.setUniform3fv(f,u.flat());break;case"vec4":if(!c){s.setUniform4f(f,u[0],u[1],u[2],u[3]);break}n(o.uniformName,u,c),s.setUniform4fv(f,u.flat());break;case"mat3":s.setUniformMatrix3fv(f,u);break;case"mat4":s.setUniformMatrix4fv(f,u);break;default:throw new Error(`Unable to set uniform for type ${m}`)}}}}export{a as TypedShaderProgram};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Logger.js";import"../../../webgl/checkWebGLError.js";import"../../../webgl/enums.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/GLObjectType.js";import{Texture as e}from"../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../webgl/TextureDescriptor.js";function t(t,r,a){const i=new p(r.width,r.height);return i.dataType=r.dataType,r.depth&&(i.depth=r.depth),r.flipped&&(i.flipped=r.flipped),r.hasMipmap&&(i.hasMipmap=r.hasMipmap),i.internalFormat=r.internalFormat,r.isImmutable&&(i.isImmutable=r.isImmutable),r.isOpaque&&(i.isOpaque=r.isOpaque),r.maxAnisotropy&&(i.maxAnisotropy=r.maxAnisotropy),i.pixelFormat=r.pixelFormat,r.preMultiplyAlpha&&(i.preMultiplyAlpha=r.preMultiplyAlpha),r.samplingMode&&(i.samplingMode=r.samplingMode),r.target&&(i.target=r.target),i.uniform=r.uniform,r.unpackAlignment&&(i.unpackAlignment=r.unpackAlignment),r.wrapMode&&(i.wrapMode=r.wrapMode),new e(t,i,a)}export{t as createTexture};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ function r(r){return"url"in r&&"urlHash"in r?{...r,url:""}:r}export{r as discardUrlIfHasUrlHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../Graphic.js";import t from"../../../core/Collection.js";import i from"../../../core/Error.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isAbortError as o}from"../../../core/promiseUtils.js";import{watch as n,on as l,syncAndInitial as m}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../geometry/Extent.js";import{create as h}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as d}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as g}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as u}from"../../../layers/support/MediaElementView.js";import"../../../renderers/SimpleRenderer.js";import"../../../symbols/SimpleFillSymbol.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../symbols/Font.js";import"../../../core/mathUtils.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/checkWebGLError.js";import"../../webgl/enums.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/number.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../geometry/SpatialReference.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import f from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import j from"../engine/webgl/Overlay.js";import b from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import _ from"../../layers/LayerView.js";import v from"../../layers/MediaLayerView.js";import{TaskPriority as E}from"../../support/Scheduler.js";let G=class extends(w(v(_))){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this._interaction=null,this.layer=null,this.elements=new t}initialize(){this.addHandles([n((()=>[this.interactive,this.suspended]),(async()=>{if(this.interactive&&!this._interaction){const{MediaLayerInteraction:e}=await import("./support/MediaLayerInteraction.js");this._interaction=new e({view:this.view,layer:this.layer}),this.selectedElement!==this._interaction.selectedElement&&(this._interaction.selectedElement=this.selectedElement),this.interactionOptions!==this._interaction.options&&(this._interaction.options=this.interactionOptions)}this._interaction&&(this._interaction.enabled=!this.suspended&&this.interactive)}),m),n((()=>this.interactionOptions),(e=>{this._interaction&&(this._interaction.options=e)}),m),n((()=>this.selectedElement),(e=>{this._interaction&&(this._interaction.selectedElement=e)}),m)])}attach(){this.addAttachHandles([l((()=>this.layer.effectiveSource),"refresh",(()=>{this._tileStrategy.refresh((e=>this._updateTile(e))),this.requestUpdate()})),l((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new b,this.container.addChild(this._overlayContainer),this._fetchQueue=new f({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t),scheduler:this.scheduler,priority:E.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const i=[],s=e.normalize(),r=[s.x,s.y];for(const{elementView:{normalizedCoords:o,element:n}}of this._elementReferences.values())null!=o&&d(o.rings,r)&&i.push({type:"media",element:n,layer:this.layer,mapPoint:e,sourcePoint:n.toSource(e)});return i.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updateTile(e)))}_acquireTile(e){const t=new C(e.clone());return this._updateTile(t),t}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then((t=>{const[i,s]=e.setElements(t);this._referenceElements(e,i),this._dereferenceElements(e,s),this.requestUpdate()}),(e=>{o(e)||s.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const i=this.layer.effectiveSource;if(null==i)return[];this.view.featuresTilingScheme.getTileBounds(S,e,!0);const s=new p({xmin:S[0],ymin:S[1],xmax:S[2],ymax:S[3],spatialReference:this.view.spatialReference});return i.queryElements(s,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const i of t)this._referenceElement(e,i)}_referenceElement(e,t){r(this._elementReferences,t.uid,(()=>{const e=new u({element:t,spatialReference:this.view.spatialReference}),r=new j(e);return this._overlayContainer.addChild(r),this.elements.add(t),this._updatingHandles.addPromise(t.load().catch((e=>{s.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new i("element-load-error","Element cannot be displayed",{element:t,error:e}))}))),{debugGraphic:null,elementView:e,overlay:r,tiles:new Set}})).tiles.add(e)}_dereferenceElements(e,t){for(const i of t)this._dereferenceElement(e,i)}_dereferenceElement(e,t){const i=this._elementReferences.get(t.uid);i.tiles.delete(e),i.tiles.size||(this._overlayContainer.removeChild(i.overlay),i.overlay.destroy(),i.elementView.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(i.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const i=t.elementView.normalizedCoords;if(null==i)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.elementView.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const s=[],r=[];for(const e of this._tileStrategy.tiles){const o=T(this.view.featuresTilingScheme,e,i);t.tiles.has(e)?o||r.push(e):o&&s.push(e)}for(const t of s)this._referenceElement(t,e);for(const t of r)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.elementView.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const i=new u({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=i)for(const s of this._tileStrategy.tiles){T(this.view.featuresTilingScheme,s,i)&&this._referenceElement(s,e)}}};e([a()],G.prototype,"layer",void 0),e([a({readOnly:!0})],G.prototype,"elements",void 0),G=e([c("esri.views.2d.layers.MediaLayerView2D")],G);const S=h(),q={xmin:0,ymin:0,xmax:0,ymax:0};function T(e,t,i){return e.getTileBounds(S,t.key,!0),q.xmin=S[0],q.ymin=S[1],q.xmax=S[2],q.ymax=S[3],g(q,i)}class C{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],i=new Set(this.elements);this.elements=e;for(const s of e)i.has(s)?i.delete(s):t.push(s);return this.isReady=!0,[t,Array.from(i)]}destroy(){}}const M=G;export{M as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../Graphic.js";import t from"../../../core/Collection.js";import i from"../../../core/Error.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isAbortError as o}from"../../../core/promiseUtils.js";import{watch as n,on as l,syncAndInitial as m}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../geometry/Extent.js";import{create as h}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as d}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as g}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as f}from"../../../layers/support/MediaElementView.js";import"../../../renderers/SimpleRenderer.js";import"../../../symbols/SimpleFillSymbol.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../symbols/Font.js";import"../../../core/mathUtils.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/number.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/GLObjectType.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../geometry/SpatialReference.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import u from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import j from"../engine/webgl/Overlay.js";import b from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import _ from"../../layers/LayerView.js";import v from"../../layers/MediaLayerView.js";import{TaskPriority as E}from"../../support/Scheduler.js";let G=class extends(w(v(_))){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this._interaction=null,this.layer=null,this.elements=new t}initialize(){this.addHandles([n((()=>[this.interactive,this.suspended]),(async()=>{if(this.interactive&&!this._interaction){const{MediaLayerInteraction:e}=await import("./support/MediaLayerInteraction.js");this._interaction=new e({view:this.view,layer:this.layer}),this.selectedElement!==this._interaction.selectedElement&&(this._interaction.selectedElement=this.selectedElement),this.interactionOptions!==this._interaction.options&&(this._interaction.options=this.interactionOptions)}this._interaction&&(this._interaction.enabled=!this.suspended&&this.interactive)}),m),n((()=>this.interactionOptions),(e=>{this._interaction&&(this._interaction.options=e)}),m),n((()=>this.selectedElement),(e=>{this._interaction&&(this._interaction.selectedElement=e)}),m)])}attach(){this.addAttachHandles([l((()=>this.layer.effectiveSource),"refresh",(()=>{this._tileStrategy.refresh((e=>this._updateTile(e))),this.requestUpdate()})),l((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new b,this.container.addChild(this._overlayContainer),this._fetchQueue=new u({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t),scheduler:this.scheduler,priority:E.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const i=[],s=e.normalize(),r=[s.x,s.y];for(const{elementView:{normalizedCoords:o,element:n}}of this._elementReferences.values())null!=o&&d(o.rings,r)&&i.push({type:"media",element:n,layer:this.layer,mapPoint:e,sourcePoint:n.toSource(e)});return i.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updateTile(e)))}_acquireTile(e){const t=new C(e.clone());return this._updateTile(t),t}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then((t=>{const[i,s]=e.setElements(t);this._referenceElements(e,i),this._dereferenceElements(e,s),this.requestUpdate()}),(e=>{o(e)||s.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const i=this.layer.effectiveSource;if(null==i)return[];this.view.featuresTilingScheme.getTileBounds(S,e,!0);const s=new p({xmin:S[0],ymin:S[1],xmax:S[2],ymax:S[3],spatialReference:this.view.spatialReference});return i.queryElements(s,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const i of t)this._referenceElement(e,i)}_referenceElement(e,t){r(this._elementReferences,t.uid,(()=>{const e=new f({element:t,spatialReference:this.view.spatialReference}),r=new j(e);return this._overlayContainer.addChild(r),this.elements.add(t),this._updatingHandles.addPromise(t.load().catch((e=>{s.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new i("element-load-error","Element cannot be displayed",{element:t,error:e}))}))),{debugGraphic:null,elementView:e,overlay:r,tiles:new Set}})).tiles.add(e)}_dereferenceElements(e,t){for(const i of t)this._dereferenceElement(e,i)}_dereferenceElement(e,t){const i=this._elementReferences.get(t.uid);i.tiles.delete(e),i.tiles.size||(this._overlayContainer.removeChild(i.overlay),i.overlay.destroy(),i.elementView.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(i.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const i=t.elementView.normalizedCoords;if(null==i)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.elementView.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const s=[],r=[];for(const e of this._tileStrategy.tiles){const o=T(this.view.featuresTilingScheme,e,i);t.tiles.has(e)?o||r.push(e):o&&s.push(e)}for(const t of s)this._referenceElement(t,e);for(const t of r)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.elementView.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const i=new f({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=i)for(const s of this._tileStrategy.tiles){T(this.view.featuresTilingScheme,s,i)&&this._referenceElement(s,e)}}};e([a()],G.prototype,"layer",void 0),e([a({readOnly:!0})],G.prototype,"elements",void 0),G=e([c("esri.views.2d.layers.MediaLayerView2D")],G);const S=h(),q={xmin:0,ymin:0,xmax:0,ymax:0};function T(e,t,i){return e.getTileBounds(S,t.key,!0),q.xmin=S[0],q.ymin=S[1],q.xmax=S[2],q.ymax=S[3],g(q,i)}class C{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],i=new Set(this.elements);this.elements=e;for(const s of e)i.has(s)?i.delete(s):t.push(s);return this.isReady=!0,[t,Array.from(i)]}destroy(){}}const M=G;export{M as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../core/mathUtils.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/checkWebGLError.js";import"../../webgl/enums.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/number.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../geometry/SpatialReference.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import n from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import{getHighlightGraphics as p}from"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as m}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as c}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as u,resampleImage as f}from"./support/imageUtils.js";import d from"../tiling/TileInfoView.js";import j from"../tiling/TileKey.js";import y from"../tiling/TileQueue.js";import w from"../tiling/TileStrategy.js";import b from"../../layers/LayerView.js";import _ from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as T,MapServiceLayerViewHelper as G}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as V}from"../../support/drapedUtils.js";import{defaultHighlightName as q}from"../../support/HighlightDefaults.js";import{TaskPriority as v}from"../../support/Scheduler.js";const I=[0,0];let C=class extends(_(m(c(b)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new d(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new y({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:v.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new w({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),T(this,this.layer)){const e=this._highlightView=new n({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new G({createFetchPopupFeaturesQueryGeometry:(e,i)=>V(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:(i,t)=>{e.graphicUpdateHandler({graphic:i,property:t})},layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=p(e);if(0===s.length)return i();const r=t?.name??q;return this._addHighlightGraphics(s,r),i((()=>!this.destroyed&&this._removeHighlightGraphics(s,r)))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map((e=>e.uid)),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map((e=>e.uid)),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return u(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new j(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return u(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new j(0,0,0,0);let a,n=null;try{if(n=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),u(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(p){if(s(p))throw p;if(this.resampling&&"unknown"===n&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:u(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],C.prototype,"resampling",null),e([o()],C.prototype,"tilemapCache",null),C=e([l("esri.views.2d.layers.TileLayerView2D")],C);const H=C;export{H as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../core/mathUtils.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/number.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/GLObjectType.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../geometry/SpatialReference.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import n from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import{getHighlightGraphics as p}from"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as m}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as c}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as f,resampleImage as u}from"./support/imageUtils.js";import d from"../tiling/TileInfoView.js";import j from"../tiling/TileKey.js";import y from"../tiling/TileQueue.js";import w from"../tiling/TileStrategy.js";import b from"../../layers/LayerView.js";import _ from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as T,MapServiceLayerViewHelper as G}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as V}from"../../support/drapedUtils.js";import{defaultHighlightName as q}from"../../support/HighlightDefaults.js";import{TaskPriority as v}from"../../support/Scheduler.js";const I=[0,0];let P=class extends(_(m(c(b)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new d(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new y({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:v.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new w({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),T(this,this.layer)){const e=this._highlightView=new n({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new G({createFetchPopupFeaturesQueryGeometry:(e,i)=>V(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:(i,t)=>{e.graphicUpdateHandler({graphic:i,property:t})},layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=p(e);if(0===s.length)return i();const r=t?.name??q;return this._addHighlightGraphics(s,r),i((()=>!this.destroyed&&this._removeHighlightGraphics(s,r)))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map((e=>e.uid)),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map((e=>e.uid)),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return f(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new j(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return u(this._tileInfoView,o,s,e)}}return f(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new j(0,0,0,0);let a,n=null;try{if(n=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),f(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(p){if(s(p))throw p;if(this.resampling&&"unknown"===n&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?u(this._tileInfoView,a,h,e):a:f(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],P.prototype,"resampling",null),e([o()],P.prototype,"tilemapCache",null),P=e([l("esri.views.2d.layers.TileLayerView2D")],P);const C=P;export{C as default};