@arcgis/core 4.23.0-next.20220118 → 4.23.0-next.20220126

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 (359) hide show
  1. package/Graphic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/00c5bb5eecb0e89266df.js +1 -0
  4. package/assets/esri/core/workers/chunks/021a37e2b191298e80b7.js +1 -0
  5. package/assets/esri/core/workers/chunks/1370c92c40fd6271553c.js +1 -0
  6. package/assets/esri/core/workers/chunks/199670a3a564ebe3bd79.js +1 -0
  7. package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +1 -0
  8. package/assets/esri/core/workers/chunks/1fbcc8424452d0256bd6.js +1 -0
  9. package/assets/esri/core/workers/chunks/{7c9d2638693d5f798b23.js → 23b15e7c2f96d260e16c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{99f0d896c17dd09cd285.js → 2629adf79e7fd9f25f07.js} +1 -1
  12. package/assets/esri/core/workers/chunks/2792ca40f1e92849247c.js +1 -0
  13. package/assets/esri/core/workers/chunks/2a96f1bba9ce6883e5e0.js +1 -0
  14. package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
  15. package/assets/esri/core/workers/chunks/3231ee3e090bb4cac3fc.js +1 -0
  16. package/assets/esri/core/workers/chunks/{0c3e3a5baf54bd5e210c.js → 36e250278b5622ccf068.js} +1 -1
  17. package/assets/esri/core/workers/chunks/395ba088d4864588ff66.js +1 -0
  18. package/assets/esri/core/workers/chunks/3cc77692b2eee27b9c9e.js +1 -0
  19. package/assets/esri/core/workers/chunks/3f343f792fd9f44d6f25.js +1 -0
  20. package/assets/esri/core/workers/chunks/{8a250ec51097f16feb66.js → 40a1e713f63ec77110c0.js} +1 -1
  21. package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
  22. package/assets/esri/core/workers/chunks/{ba6fdaed6c315dc13981.js → 434b16731c6a81f868ef.js} +1 -1
  23. package/assets/esri/core/workers/chunks/4385a268c2a64281d1c1.js +1 -0
  24. package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 438f0b5ae5c53ae4f06a.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 46b4bb66a54bbd8e2e57.js} +1 -1
  26. package/assets/esri/core/workers/chunks/4c76146014dc15143ba3.js +1 -0
  27. package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.js +1 -0
  28. package/assets/esri/core/workers/chunks/5d991b74d958005c26c4.js +1 -0
  29. package/assets/esri/core/workers/chunks/5dfe1f8d520025e2118b.js +1 -0
  30. package/assets/esri/core/workers/chunks/601e697dc7414bda128a.js +1 -0
  31. package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +1 -0
  32. package/assets/esri/core/workers/chunks/68a59ce98177d8513337.js +1 -0
  33. package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → 6f50a9647f026a8d4729.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{47395d225229d237f0ac.js → 7bc5cc5dbf1b7b70ddac.js} +1 -1
  36. package/assets/esri/core/workers/chunks/7d661129a0d8c466eeec.js +1 -0
  37. package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/8070972c0efb78523b68.js +1 -0
  39. package/assets/esri/core/workers/chunks/8fa0a14165d43ffe87a5.js +1 -0
  40. package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
  41. package/assets/esri/core/workers/chunks/94b8dbf859df71858d1c.js +1 -0
  42. package/assets/esri/core/workers/chunks/97a28641b3b2fd31bea2.js +1 -0
  43. package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 97ec9eef0048760fa260.js} +1 -1
  44. package/assets/esri/core/workers/chunks/98986e6601b0366376b4.js +1 -0
  45. package/assets/esri/core/workers/chunks/9cdcf9309d6feda70185.js +1 -0
  46. package/assets/esri/core/workers/chunks/a78757b9c7e8cbea08fa.js +1 -0
  47. package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
  48. package/assets/esri/core/workers/chunks/{b10fcbe1393c812fc219.js → aa861b8eae6c85f3dad4.js} +1 -1
  49. package/assets/esri/core/workers/chunks/aace7e1fef256bb961c9.js +1 -0
  50. package/assets/esri/core/workers/chunks/{ed0297fc61014e848c18.js → af5694b4d278cf1db2d9.js} +1 -1
  51. package/assets/esri/core/workers/chunks/afbb4f802ca5774f0326.js +1 -0
  52. package/assets/esri/core/workers/chunks/b0b036ad3ad3cd956747.js +1 -0
  53. package/assets/esri/core/workers/chunks/b2c5f92e3d7606297ca9.js +1 -0
  54. package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
  55. package/assets/esri/core/workers/chunks/b2ebe4f6d100e15b512d.js +1 -0
  56. package/assets/esri/core/workers/chunks/b8316c6469a543029bc6.js +1 -0
  57. package/assets/esri/core/workers/chunks/{4b69129c0557852d9b3d.js → ba5eb394f098968c22d2.js} +1 -1
  58. package/assets/esri/core/workers/chunks/bf0a65b4be31959f921d.js +1 -0
  59. package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +1 -0
  60. package/assets/esri/core/workers/chunks/c890c7fca27170e3341f.js +1 -0
  61. package/assets/esri/core/workers/chunks/{573dc3064e84ca86844d.js → c959e0d1cf7dce0421b9.js} +1 -1
  62. package/assets/esri/core/workers/chunks/c976785f2391c77d8a30.js +1 -0
  63. package/assets/esri/core/workers/chunks/{1fd48459afb58a6cf14f.js → ca2f5faa01d99c21ec14.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{7aa543a97f055cddea99.js → cc146c57bbdac8029fd8.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{7e596478507466953e65.js → cef4af64860ebbfc1c47.js} +1 -1
  67. package/assets/esri/core/workers/chunks/d72488db62fcf39447b6.js +1 -0
  68. package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +981 -0
  69. package/assets/esri/core/workers/chunks/e4b84ca8ddfd48dd79b1.js +1 -0
  70. package/assets/esri/core/workers/chunks/e4e2036373166c1d5cf5.js +1 -0
  71. package/assets/esri/core/workers/chunks/e4f93c55eaefab4192b5.js +1 -0
  72. package/assets/esri/core/workers/chunks/e6165e17fbb07bfc40a1.js +1 -0
  73. package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
  74. package/assets/esri/core/workers/chunks/{f678293de9a6d8f5b5db.js → ec89466f76d0ba22525e.js} +1 -1
  75. package/assets/esri/core/workers/chunks/ee45618c45806ab654cb.js +1 -0
  76. package/assets/esri/core/workers/chunks/f4baa5ea2e42b1317941.js +1 -0
  77. package/assets/esri/core/workers/chunks/f760a3e030b0f358a92a.js +1 -0
  78. package/assets/esri/core/workers/chunks/face43cf5abcd2f5bd9d.js +1 -0
  79. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  80. package/assets/esri/themes/base/_mixins.scss +4 -1
  81. package/assets/esri/themes/base/icons/style.scss +11 -2
  82. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
  83. package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
  84. package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
  85. package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
  86. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
  87. package/assets/esri/themes/base/widgets/_FeatureTable.scss +6 -0
  88. package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
  89. package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
  90. package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
  91. package/assets/esri/themes/base/widgets/_Print.scss +24 -11
  92. package/assets/esri/themes/base/widgets/_Search.scss +4 -2
  93. package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
  94. package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
  95. package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
  96. package/assets/esri/themes/dark/main.css +1 -1
  97. package/assets/esri/themes/dark-blue/main.css +1 -1
  98. package/assets/esri/themes/dark-green/main.css +1 -1
  99. package/assets/esri/themes/dark-purple/main.css +1 -1
  100. package/assets/esri/themes/dark-red/main.css +1 -1
  101. package/assets/esri/themes/light/main.css +1 -1
  102. package/assets/esri/themes/light/view.css +1 -1
  103. package/assets/esri/themes/light-blue/main.css +1 -1
  104. package/assets/esri/themes/light-green/main.css +1 -1
  105. package/assets/esri/themes/light-purple/main.css +1 -1
  106. package/assets/esri/themes/light-red/main.css +1 -1
  107. package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
  108. package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
  109. package/chunks/CloudsComposition.glsl.js +4 -4
  110. package/chunks/ComponentShader.glsl.js +19 -19
  111. package/chunks/DefaultMaterial.glsl.js +2 -2
  112. package/chunks/Terrain.glsl.js +11 -11
  113. package/chunks/WaterSurface.glsl.js +21 -21
  114. package/chunks/pe.js +1 -1
  115. package/chunks/vec3.js +1 -1
  116. package/chunks/vxlLayer.js +1 -1
  117. package/core/accessorSupport/ensureType.js +1 -1
  118. package/core/accessorSupport/get.js +1 -1
  119. package/core/accessorSupport/read.js +1 -1
  120. package/core/accessorSupport/set.js +1 -1
  121. package/core/accessorSupport/write.js +1 -1
  122. package/core/has.js +1 -1
  123. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  124. package/core/typedArrayUtil.js +1 -1
  125. package/core/workers/workerFactory.js +1 -1
  126. package/geometry/pe.js +1 -1
  127. package/geometry/support/axisAngleDegrees.js +1 -1
  128. package/geometry/support/heightModelInfoUtils.js +1 -1
  129. package/interfaces.d.ts +315 -78
  130. package/layers/RouteLayer.js +1 -1
  131. package/layers/VoxelLayer.js +1 -1
  132. package/layers/VoxelWasmPerScene.js +1 -1
  133. package/layers/mixins/OperationalLayer.js +1 -1
  134. package/layers/support/RasterWorker.js +1 -1
  135. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  136. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  137. package/libs/vxl/enums.js +1 -1
  138. package/package.json +2 -2
  139. package/popup/content/AttachmentsContent.js +1 -1
  140. package/popup/content/support/mediaInfoTypes.js +1 -1
  141. package/portal/schemas/buildingSceneLayerItem.js +1 -1
  142. package/portal/schemas/definitions.js +1 -1
  143. package/portal/schemas/integratedMeshLayerItem.js +1 -1
  144. package/portal/schemas/pointCloudLayerItem.js +1 -1
  145. package/portal/schemas/sceneLayerItem.js +1 -1
  146. package/portal/schemas/webScene.js +1 -1
  147. package/rasterRenderers.js +1 -1
  148. package/rest/find.js +1 -1
  149. package/rest/geometryService/generalize.js +1 -1
  150. package/rest/geometryService/lengths.js +1 -1
  151. package/rest/geometryService/offset.js +1 -1
  152. package/rest/geometryService/relation.js +1 -1
  153. package/rest/geometryService/trimExtend.js +1 -1
  154. package/rest/identify.js +1 -1
  155. package/{tasks → rest}/operations/find.js +0 -0
  156. package/{tasks → rest}/operations/generalize.js +0 -0
  157. package/rest/operations/identify.js +5 -0
  158. package/{tasks → rest}/operations/lengths.js +0 -0
  159. package/{tasks → rest}/operations/offset.js +0 -0
  160. package/{tasks → rest}/operations/relation.js +0 -0
  161. package/{tasks → rest}/operations/trimExtend.js +0 -0
  162. package/{tasks → rest}/operations/urlUtils.js +0 -0
  163. package/rest/print.js +1 -1
  164. package/rest/query/operations/query.js +1 -1
  165. package/rest/query/operations/queryAttachments.js +1 -1
  166. package/rest/query/operations/queryRelatedRecords.js +1 -1
  167. package/rest/query/operations/queryTopFeatures.js +1 -1
  168. package/rest/route/utils.js +1 -1
  169. package/rest/support/NetworkServiceDescription.js +1 -1
  170. package/rest/support/RouteInfo.js +1 -1
  171. package/rest/support/RouteParameters.js +1 -1
  172. package/rest/support/RouteSettings.js +5 -0
  173. package/rest/support/Stop.js +1 -1
  174. package/rest/support/networkEnums.js +1 -1
  175. package/support/revision.js +1 -1
  176. package/symbols/Font.js +1 -1
  177. package/symbols/LabelSymbol3D.js +1 -1
  178. package/symbols/PointSymbol3D.js +1 -1
  179. package/symbols/TextSymbol.js +1 -1
  180. package/symbols/TextSymbol3DLayer.js +1 -1
  181. package/symbols/cim/CIMSymbolHelper.js +1 -1
  182. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  183. package/symbols/cim/cimAnalyzer.js +1 -1
  184. package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
  185. package/symbols/support/Symbol3DVerticalOffset.js +1 -1
  186. package/symbols/support/cimSymbolUtils.js +1 -1
  187. package/symbols/support/previewCIMSymbol.js +1 -1
  188. package/symbols/support/previewSymbol2D.js +1 -1
  189. package/symbols/support/previewSymbol3D.js +1 -1
  190. package/symbols/support/previewWebStyleSymbol.js +1 -1
  191. package/symbols/support/svgUtils.js +1 -1
  192. package/symbols/support/textUtils.js +5 -0
  193. package/symbols.js +1 -1
  194. package/views/2d/engine/vectorTiles/style/VectorTilesRequestManager.js +1 -1
  195. package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
  196. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  197. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  198. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  199. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  200. package/views/2d/support/engineHelpers.js +1 -1
  201. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  202. package/views/3d/environment/CloudsComposition.js +1 -1
  203. package/views/3d/environment/CloudsGenerator.js +1 -1
  204. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  205. package/views/3d/environment/Fog.js +1 -1
  206. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  207. package/views/3d/environment/weather.js +1 -1
  208. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  209. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  210. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  211. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  212. package/views/3d/layers/GraphicsView3D.js +1 -1
  213. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  214. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  215. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  216. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  217. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  218. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +5 -0
  219. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  220. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  221. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  222. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  223. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  224. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  225. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  226. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  227. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  228. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  229. package/views/3d/layers/graphics/{Graphics3DGraphicLikeLayerView.js → GraphicsProcessor.js} +1 -1
  230. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  231. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  232. package/views/3d/terrain/OverlayRenderer.js +1 -1
  233. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +7 -1
  234. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +28 -24
  235. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +21 -13
  236. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
  237. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +12 -14
  238. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  239. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  240. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  241. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  242. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  243. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  244. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  245. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  246. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  247. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  248. package/views/3d/webgl-engine/parts/Model.js +1 -1
  249. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  250. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  251. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  252. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  253. package/views/SceneView.js +1 -1
  254. package/views/interactive/dragEventPipeline.js +1 -1
  255. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  256. package/views/support/DefaultsFromMap.js +1 -1
  257. package/views/webgl/ContextState.js +1 -1
  258. package/views/webgl/FramebufferObject.js +1 -1
  259. package/views/webgl/Renderbuffer.js +1 -1
  260. package/views/webgl/RenderingContext.js +1 -1
  261. package/views/webgl/Texture.js +1 -1
  262. package/views/webgl/Util.js +1 -1
  263. package/views/webgl/enums.js +1 -1
  264. package/views/webgl/rasterUtils.js +1 -1
  265. package/views/webgl/testFloatBufferBlend.js +1 -1
  266. package/widgets/Attachments.js +1 -1
  267. package/widgets/Editor/workflowUtils.js +1 -1
  268. package/widgets/Feature/FeatureExpression.js +1 -1
  269. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  270. package/widgets/Feature/FeatureMedia.js +1 -1
  271. package/widgets/Feature/FeatureViewModel.js +1 -1
  272. package/widgets/FeatureForm/InputField.js +1 -1
  273. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  274. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  275. package/widgets/FeatureTable.js +1 -1
  276. package/widgets/LayerList/LayerListViewModel.js +1 -1
  277. package/widgets/Popup/PopupViewModel.js +1 -1
  278. package/widgets/Popup/actionUtils.js +1 -1
  279. package/widgets/Slice/SliceViewModel.js +1 -1
  280. package/widgets/Slider/SliderViewModel.js +1 -1
  281. package/widgets/Slider.js +1 -1
  282. package/widgets/Weather/WeatherViewModel.js +1 -1
  283. package/widgets/Weather/css.js +1 -1
  284. package/widgets/Weather.js +1 -1
  285. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  286. package/widgets/support/InteractiveToolViewModel.js +1 -1
  287. package/widgets/support/geolocationUtils.js +1 -1
  288. package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
  289. package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
  290. package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
  291. package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
  292. package/assets/components/assets/calcite-icon/squareF16.json +0 -1
  293. package/assets/components/assets/calcite-icon/squareF24.json +0 -1
  294. package/assets/components/assets/calcite-icon/squareF32.json +0 -1
  295. package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
  296. package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
  297. package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
  298. package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
  299. package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
  300. package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
  301. package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
  302. package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
  303. package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
  304. package/assets/esri/core/workers/chunks/01ef8de7f76a8c61b464.js +0 -1
  305. package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
  306. package/assets/esri/core/workers/chunks/0f254c3e91e8fee55f28.js +0 -1
  307. package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
  308. package/assets/esri/core/workers/chunks/21a77eed1a4ef5b0ff08.js +0 -1
  309. package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
  310. package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
  311. package/assets/esri/core/workers/chunks/2d947080a27db6ce0d75.js +0 -1
  312. package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
  313. package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
  314. package/assets/esri/core/workers/chunks/3564e14010953def6df9.js +0 -1
  315. package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
  316. package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
  317. package/assets/esri/core/workers/chunks/403c7d64f12f00330d88.js +0 -1
  318. package/assets/esri/core/workers/chunks/4409d77c9734de4e82a7.js +0 -1
  319. package/assets/esri/core/workers/chunks/4c301ca9c493b96df746.js +0 -1
  320. package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
  321. package/assets/esri/core/workers/chunks/615aa2d3ecafe30c80c0.js +0 -1
  322. package/assets/esri/core/workers/chunks/631c5b514bb73782c570.js +0 -1
  323. package/assets/esri/core/workers/chunks/6c1e92ff4c732dfda756.js +0 -1
  324. package/assets/esri/core/workers/chunks/722a10c65456844d72b9.js +0 -1
  325. package/assets/esri/core/workers/chunks/75d53b28afe732c459b2.js +0 -1
  326. package/assets/esri/core/workers/chunks/85b34d91cf07567d6873.js +0 -1
  327. package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
  328. package/assets/esri/core/workers/chunks/89de05207744149fb58b.js +0 -1
  329. package/assets/esri/core/workers/chunks/8fdd5bca3716816d359b.js +0 -1
  330. package/assets/esri/core/workers/chunks/987182b3a578fc7de251.js +0 -1
  331. package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
  332. package/assets/esri/core/workers/chunks/9d9dffc8884d66a258e4.js +0 -1
  333. package/assets/esri/core/workers/chunks/a28b53c61bddefb6616e.js +0 -1
  334. package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
  335. package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
  336. package/assets/esri/core/workers/chunks/a960074644c3722be71e.js +0 -1
  337. package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
  338. package/assets/esri/core/workers/chunks/b99e69302ea701fff0ea.js +0 -971
  339. package/assets/esri/core/workers/chunks/b9de831ac379cf1d2969.js +0 -1
  340. package/assets/esri/core/workers/chunks/bc790b2f964144d10abe.js +0 -1
  341. package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
  342. package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
  343. package/assets/esri/core/workers/chunks/c3eca92d02958732e141.js +0 -1
  344. package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
  345. package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
  346. package/assets/esri/core/workers/chunks/cb68db7169b9dfd1c3ff.js +0 -1
  347. package/assets/esri/core/workers/chunks/cc96608b2802fbfe7a08.js +0 -1
  348. package/assets/esri/core/workers/chunks/cd02fe27eb07681cb366.js +0 -1
  349. package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
  350. package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
  351. package/assets/esri/core/workers/chunks/dd433c160f7a0c120b82.js +0 -1
  352. package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
  353. package/assets/esri/core/workers/chunks/e2d68bcd2f99a65387bf.js +0 -1
  354. package/assets/esri/core/workers/chunks/ef8b75b92cf549e0507e.js +0 -1
  355. package/assets/esri/core/workers/chunks/f7fc4c993536e62f7f3e.js +0 -1
  356. package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
  357. package/symbols/support/constants.js +0 -5
  358. package/tasks/operations/identify.js +0 -5
  359. package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3437],{45699:(t,e,s)=>{s.d(e,{a:()=>h,b:()=>a,m:()=>r,r:()=>n,t:()=>o});var i=s(46851);function r(t,e,s){const i=e[0],r=e[1],n=e[2],o=e[3],a=e[4],h=e[5],l=s[0],c=s[1],u=s[2],f=s[3],_=s[4],d=s[5];return t[0]=i*l+n*c,t[1]=r*l+o*c,t[2]=i*u+n*f,t[3]=r*u+o*f,t[4]=i*_+n*d+a,t[5]=r*_+o*d+h,t}function n(t,e,s){const i=e[0],r=e[1],n=e[2],o=e[3],a=e[4],h=e[5],l=Math.sin(s),c=Math.cos(s);return t[0]=i*c+n*l,t[1]=r*c+o*l,t[2]=i*-l+n*c,t[3]=r*-l+o*c,t[4]=a,t[5]=h,t}function o(t,e,s){const i=e[0],r=e[1],n=e[2],o=e[3],a=e[4],h=e[5],l=s[0],c=s[1];return t[0]=i,t[1]=r,t[2]=n,t[3]=o,t[4]=i*l+n*c+a,t[5]=r*l+o*c+h,t}function a(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=s,t[2]=-s,t[3]=i,t[4]=0,t[5]=0,t}function h(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t}function l(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t[2]=e[2]-s[2],t[3]=e[3]-s[3],t[4]=e[4]-s[4],t[5]=e[5]-s[5],t}const c=r,u=l;Object.freeze({__proto__:null,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},set:function(t,e,s,i,r,n,o){return t[0]=e,t[1]=s,t[2]=i,t[3]=r,t[4]=n,t[5]=o,t},invert:function(t,e){const s=e[0],i=e[1],r=e[2],n=e[3],o=e[4],a=e[5];let h=s*n-i*r;return h?(h=1/h,t[0]=n*h,t[1]=-i*h,t[2]=-r*h,t[3]=s*h,t[4]=(r*a-n*o)*h,t[5]=(i*o-s*a)*h,t):null},determinant:function(t){return t[0]*t[3]-t[1]*t[2]},multiply:r,rotate:n,scale:function(t,e,s){const i=e[0],r=e[1],n=e[2],o=e[3],a=e[4],h=e[5],l=s[0],c=s[1];return t[0]=i*l,t[1]=r*l,t[2]=n*c,t[3]=o*c,t[4]=a,t[5]=h,t},translate:o,fromRotation:a,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t[4]=0,t[5]=0,t},fromTranslation:h,str:function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+1)},add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t[2]=e[2]+s[2],t[3]=e[3]+s[3],t[4]=e[4]+s[4],t[5]=e[5]+s[5],t},subtract:l,multiplyScalar:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*s,t[5]=e[5]*s,t},multiplyScalarAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t[2]=e[2]+s[2]*i,t[3]=e[3]+s[3]*i,t[4]=e[4]+s[4]*i,t[5]=e[5]+s[5]*i,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]},equals:function(t,e){const s=t[0],r=t[1],n=t[2],o=t[3],a=t[4],h=t[5],l=e[0],c=e[1],u=e[2],f=e[3],_=e[4],d=e[5];return Math.abs(s-l)<=i.E*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(r-c)<=i.E*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(n-u)<=i.E*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(o-f)<=i.E*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-_)<=i.E*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(h-d)<=i.E*Math.max(1,Math.abs(h),Math.abs(d))},mul:c,sub:u})},21106:(t,e,s)=>{function i(){const t=new Float32Array(6);return t[0]=1,t[3]=1,t}function r(t,e,s,i){const r=e[i],n=e[i+1];t[i]=s[0]*r+s[2]*n+s[4],t[i+1]=s[1]*r+s[3]*n+s[5]}function n(t,e,s,i=0,n=0,o=2){const a=n||e.length/o;for(let n=i;n<a;n++)r(t,e,s,n*o)}s.d(e,{c:()=>i,t:()=>n}),Object.freeze({__proto__:null,create:i,clone:function(t){const e=new Float32Array(6);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},fromValues:function(t,e,s,i,r,n){const o=new Float32Array(6);return o[0]=t,o[1]=e,o[2]=s,o[3]=i,o[4]=r,o[5]=n,o},createView:function(t,e){return new Float32Array(t,e,6)},transform:r,transformMany:n})},4307:(t,e,s)=>{s.d(e,{b:()=>h,s:()=>r,t:()=>f});var i=s(46851);function r(t,e,s){return t[0]=e,t[1]=s,t}function n(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t}function o(t,e,s){return t[0]=e[0]*s[0],t[1]=e[1]*s[1],t}function a(t,e,s){return t[0]=e[0]/s[0],t[1]=e[1]/s[1],t}function h(t,e){const s=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(s*s+i*i)}function l(t,e){const s=e[0]-t[0],i=e[1]-t[1];return s*s+i*i}function c(t){const e=t[0],s=t[1];return Math.sqrt(e*e+s*s)}function u(t){const e=t[0],s=t[1];return e*e+s*s}function f(t,e,s){const i=e[0],r=e[1];return t[0]=s[0]*i+s[2]*r+s[4],t[1]=s[1]*i+s[3]*r+s[5],t}const _=c,d=n,m=o,p=a,g=h,y=l,x=u;Object.freeze({__proto__:null,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},set:r,add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t},subtract:n,multiply:o,divide:a,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},min:function(t,e,s){return t[0]=Math.min(e[0],s[0]),t[1]=Math.min(e[1],s[1]),t},max:function(t,e,s){return t[0]=Math.max(e[0],s[0]),t[1]=Math.max(e[1],s[1]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t},scaleAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t},distance:h,squaredDistance:l,length:c,squaredLength:u,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},normalize:function(t,e){const s=e[0],i=e[1];let r=s*s+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},cross:function(t,e,s){const i=e[0]*s[1]-e[1]*s[0];return t[0]=t[1]=0,t[2]=i,t},lerp:function(t,e,s,i){const r=e[0],n=e[1];return t[0]=r+i*(s[0]-r),t[1]=n+i*(s[1]-n),t},random:function(t,e){e=e||1;const s=2*(0,i.R)()*Math.PI;return t[0]=Math.cos(s)*e,t[1]=Math.sin(s)*e,t},transformMat2:function(t,e,s){const i=e[0],r=e[1];return t[0]=s[0]*i+s[2]*r,t[1]=s[1]*i+s[3]*r,t},transformMat2d:f,transformMat3:function(t,e,s){const i=e[0],r=e[1];return t[0]=s[0]*i+s[3]*r+s[6],t[1]=s[1]*i+s[4]*r+s[7],t},transformMat4:function(t,e,s){const i=e[0],r=e[1];return t[0]=s[0]*i+s[4]*r+s[12],t[1]=s[1]*i+s[5]*r+s[13],t},rotate:function(t,e,s,i){const r=e[0]-s[0],n=e[1]-s[1],o=Math.sin(i),a=Math.cos(i);return t[0]=r*a-n*o+s[0],t[1]=r*o+n*a+s[1],t},angle:function(t,e){const s=t[0],i=t[1],r=e[0],n=e[1];let o=s*s+i*i;o>0&&(o=1/Math.sqrt(o));let a=r*r+n*n;a>0&&(a=1/Math.sqrt(a));const h=(s*r+i*n)*o*a;return h>1?0:h<-1?Math.PI:Math.acos(h)},str:function(t){return"vec2("+t[0]+", "+t[1]+")"},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},equals:function(t,e){const s=t[0],r=t[1],n=e[0],o=e[1];return Math.abs(s-n)<=i.E*Math.max(1,Math.abs(s),Math.abs(n))&&Math.abs(r-o)<=i.E*Math.max(1,Math.abs(r),Math.abs(o))},projectAndScale:function(t,e,s,i,r){let n=e[0]-s[0],o=e[1]-s[1];const a=(i[0]*n+i[1]*o)*(r-1);return n=i[0]*a,o=i[1]*a,t[0]=e[0]+n,t[1]=e[1]+o,t},len:_,sub:d,mul:m,div:p,dist:g,sqrDist:y,sqrLen:x})},1265:(t,e,s)=>{function i(){return new Float32Array(2)}function r(t,e){const s=new Float32Array(2);return s[0]=t,s[1]=e,s}function n(){return i()}function o(){return r(1,1)}function a(){return r(1,0)}function h(){return r(0,1)}s.d(e,{c:()=>i,f:()=>r});const l=n(),c=o(),u=a(),f=h();Object.freeze({__proto__:null,create:i,clone:function(t){const e=new Float32Array(2);return e[0]=t[0],e[1]=t[1],e},fromValues:r,createView:function(t,e){return new Float32Array(t,e,2)},zeros:n,ones:o,unitX:a,unitY:h,ZEROS:l,ONES:c,UNIT_X:u,UNIT_Y:f})},83798:(t,e,s)=>{s.d(e,{E:()=>r});const i=new(s(79087).Z);function r(t){if(!i.hasBidiChar(t))return[t,!1];let e;return e="rtl"===i.checkContextual(t)?"IDNNN":"ICNNN",[i.bidiTransform(t,e,"VLYSN"),!0]}},32243:(t,e,s)=>{function i(t){return t=t||globalThis.location.hostname,l.some((e=>{var s;return null!=(null==(s=t)?void 0:s.match(e))}))}function r(t,e){return t&&(e=e||globalThis.location.hostname)?null!=e.match(n)||null!=e.match(a)?t.replace("static.arcgis.com","staticdev.arcgis.com"):null!=e.match(o)||null!=e.match(h)?t.replace("static.arcgis.com","staticqa.arcgis.com"):t:t}s.d(e,{pJ:()=>r,XO:()=>i});const n=/^devext.arcgis.com$/,o=/^qaext.arcgis.com$/,a=/^[\w-]*\.mapsdevext.arcgis.com$/,h=/^[\w-]*\.mapsqa.arcgis.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,n,o,/^jsapps.esri.com$/,a,h]},72542:(t,e,s)=>{s(22021);const i=[1/256,1/65536,1/16777216,1/4294967296];!function(t,e=0){let s=0;for(let r=0;r<4;r++)s+=t[e+r]*i[r]}(new Uint8ClampedArray([255,255,255,255]))},70171:(t,e,s)=>{var i,r,n;let o;s.d(e,{Ze:()=>_,Kd:()=>l,qe:()=>u});const a=null!=(i=null==(r=globalThis.esriConfig)?void 0:r.locale)?i:null==(n=globalThis.dojoConfig)?void 0:n.locale;function h(){var t,e;return null!=(t=null!=a?a:null==(e=globalThis.navigator)?void 0:e.language)?t:"en"}function l(){return void 0===o&&(o=h()),o}const c=[];function u(t){return c.push(t),{remove(){c.splice(c.indexOf(t),1)}}}const f=[];function _(t){return f.push(t),{remove(){c.splice(f.indexOf(t),1)}}}null==globalThis.addEventListener||globalThis.addEventListener("languagechange",(function(){const t=null!=undefined?undefined:h();o!==t&&(o=t,[...f].forEach((e=>{e.call(null,t)})),[...c].forEach((e=>{e.call(null,t)})))}))},70345:(t,e,s)=>{s.d(e,{zY:()=>x,v1:()=>y,GP:()=>o,wp:()=>u,XV:()=>d,zv:()=>p,QK:()=>m,ov:()=>f,hh:()=>_,qh:()=>g});var i=s(22974),r=s(33955),n=s(31936);function o(t){const e=(0,i.d9)(t);return(s=e)&&((0,r.oU)(s)?c(s.rings):(0,r.l9)(s)?c(s.paths):(0,r.aW)(s)&&l(s.points)),e;var s}function a(t){if(t)for(let e=t.length-1;e>0;--e)t[e][0]-=t[e-1][0],t[e][1]-=t[e-1][1]}function h(t){if(t)for(const e of t)a(e)}function l(t){if(t){const e=t.length;for(let s=1;s<e;++s)t[s][0]+=t[s-1][0],t[s][1]+=t[s-1][1]}}function c(t){if(t)for(const e of t)l(e)}function u(t){t&&((0,r.oU)(t)?h(t.rings):(0,r.l9)(t)?h(t.paths):(0,r.aW)(t)&&a(t.points))}function f(t){if(t)for(const e of t)_(e)}function _(t){t&&t.reverse()}function d(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function m(t){return!(!t||0===t.length)&&t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]}function p(t){return t[4]}function g(t,e){t[4]=e}class y{constructor(t,e,s,i){this.acceptPolygon=e,this.acceptPolyline=s,this.geomUnitsPerPoint=i,this.pathCount=-1,this.pathIndex=-1,this.iteratePath=!1,t&&((0,r.oU)(t)?e&&(this.multiPath=t.rings,this.isClosed=!0):(0,r.l9)(t)?s&&(this.multiPath=t.paths,this.isClosed=!1):(0,r.YX)(t)&&e&&(this.multiPath=v(t).rings,this.isClosed=!0),this.multiPath&&(this.pathCount=this.multiPath.length)),this.internalPlacement=new n.u}next(){if(!this.multiPath)return null;for(;this.iteratePath||this.pathIndex<this.pathCount-1;){this.iteratePath||this.pathIndex++;const t=this.processPath(this.multiPath[this.pathIndex]);if(t)return t}return this.pathCount=-1,this.pathIndex=-1,this.multiPath=null,null}}class x{constructor(t,e,s,i){this.inputGeometries=t,this.acceptPolygon=e,this.acceptPolyline=s,this.geomUnitsPerPoint=i,this.pathCount=-1,this.pathIndex=-1,this.iteratePath=!1}next(){for(;;){if(!this.multiPath){let t=this.inputGeometries.next();for(;t;){if((0,r.oU)(t)?this.acceptPolygon&&(this.multiPath=t.rings,this.isClosed=!0):(0,r.l9)(t)?this.acceptPolyline&&(this.multiPath=t.paths,this.isClosed=!1):(0,r.YX)(t)&&this.acceptPolygon&&(this.multiPath=v(t).rings,this.isClosed=!0),this.multiPath){this.pathCount=this.multiPath.length,this.pathIndex=-1;break}t=this.inputGeometries.next()}if(!this.multiPath)return null}for(;this.iteratePath||this.pathIndex<this.pathCount-1;){this.iteratePath||this.pathIndex++;const t=this.processPath(this.multiPath[this.pathIndex]);if(t)return t}this.pathCount=-1,this.pathIndex=-1,this.multiPath=null}}}function v(t){return{rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}}},21793:(t,e,s)=>{s.d(e,{M:()=>i}),s(22974);class i{constructor(t){this._geometry=t}next(){const t=this._geometry;return this._geometry=null,t}}},61741:(t,e,s)=>{s.d(e,{h:()=>lt,W:()=>ct});var i=s(22974),r=s(33955),n=s(70345);class o{static local(){return null===o.instance&&(o.instance=new o),o.instance}execute(t,e,s,i){return new a(t,e,s)}}o.instance=null;class a{constructor(t,e,s){this._inputGeometries=t,this._angleTolerance=void 0!==e.angleTolerance?e.angleTolerance:120,this._maxCosAngle=Math.cos((1-Math.abs(this._angleTolerance)/180)*Math.PI)}next(){let t=this._inputGeometries.next();for(;t;){if((0,r.oU)(t)){this._isClosed=!0;const e=(0,i.d9)(t);return this._processMultipath(e.rings),e}if((0,r.l9)(t)){this._isClosed=!1;const e=(0,i.d9)(t);return this._processMultipath(e.paths),e}if((0,r.YX)(t)){if(this._maxCosAngle)return t;this._isClosed=!0;const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];return this._processPath(e),{rings:[e]}}t=this._inputGeometries.next()}return null}_processMultipath(t){if(t)for(const e of t)this._processPath(e)}_processPath(t){if(t){let e,s,i,r,o,a,h=t.length,l=t[0];this._isClosed&&++h;for(let c=1;c<h;++c){let u;u=this._isClosed&&c===h-1?t[0]:t[c];const f=u[0]-l[0],_=u[1]-l[1],d=Math.sqrt(f*f+_*_);c>1&&d>0&&i>0&&(e*f+s*_)/d/i<=this._maxCosAngle&&(0,n.qh)(l,1),1===c&&(r=f,o=_,a=d),d>0&&(l=u,e=f,s=_,i=d)}this._isClosed&&i>0&&a>0&&(e*r+s*o)/a/i<=this._maxCosAngle&&(0,n.qh)(t[0],1)}}}var h=s(95648);const l=.03;class c{constructor(){this._path=[]}path(){return this._path}addPath(t,e){e||t.reverse(),Array.prototype.push.apply(this._path,t),e||t.reverse()}static mergePath(t,e){e&&Array.prototype.push.apply(t,e)}startPath(t){this._path.push(t)}lineTo(t){this._path.push(t)}close(){const t=this._path;t.length>1&&(t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]||t.push([t[0][0],t[0][1]]))}}class u{constructor(t=0,e=!1){}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);t[0]/=e,t[1]/=e}calculateLength(t,e){const s=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(s*s+i*i)}calculateSegLength(t,e){return this.calculateLength(t[e],t[e+1])}calculatePathLength(t){let e=0;const s=t?t.length:0;for(let i=0;i<s-1;++i)e+=this.calculateSegLength(t,i);return e}calculatePathArea(t){let e=0;const s=t?t.length:0;for(let i=0;i<s-1;++i)e+=(t[i+1][0]-t[i][0])*(t[i+1][1]+t[i][1]);return e/2}getCoord2D(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}getSegCoord2D(t,e,s){return this.getCoord2D(t[e],t[e+1],s)}getAngle(t,e,s){const i=e[0]-t[0],r=e[1]-t[1];return Math.atan2(r,i)}getSegAngle(t,e,s){return this.getAngle(t[e],t[e+1],s)}getAngleCS(t,e,s){const i=e[0]-t[0],r=e[1]-t[1],n=Math.sqrt(i*i+r*r);return n>0?[i/n,r/n]:[1,0]}getSegAngleCS(t,e,s){return this.getAngleCS(t[e],t[e+1],s)}cut(t,e,s,i){return[s<=0?t[e]:this.getSegCoord2D(t,e,s),i>=1?t[e+1]:this.getSegCoord2D(t,e,i)]}addSegment(t,e,s){s&&t.push(e[0]),t.push(e[1])}getSubCurve(t,e,s){const i=[];return this.appendSubCurve(i,t,e,s)?i:null}appendSubCurve(t,e,s,i){const r=e?e.length-1:0;let n=0,o=!0,a=0;for(;a<r;){const r=this.calculateSegLength(e,a);if(0!==r){if(o){if(n+r>s){const h=(s-n)/r;let l=1,c=!1;n+r>=i&&(l=(i-n)/r,c=!0);const u=this.cut(e,a,h,l);if(u&&this.addSegment(t,u,o),c)break;o=!1}}else{if(n+r>i){const s=this.cut(e,a,0,(i-n)/r);s&&this.addSegment(t,s,o);break}this.addSegment(t,[e[a],e[a+1]],o)}n+=r,++a}else++a}return!0}getCIMPointAlong(t,e){const s=t?t.length-1:0;let i=0,r=-1;for(;r<s;){++r;const s=this.calculateSegLength(t,r);if(0!==s){if(i+s>e){const n=(e-i)/s;return this.getCoord2D(t[r],t[r+1],n)}i+=s}}return null}isEmpty(t,e){if(!t||t.length<=1)return!0;const s=t?t.length-1:0;let i=-1;for(;i<s;){if(++i,t[i+1][0]!==t[i][0]||t[i+1][1]!==t[i][1])return!1;if(e&&t[i+1][2]!==t[i][2])return!1}return!0}offset(t,e,s,i,r){if(!t||t.length<2)return null;let n=0,o=t[n++],a=n;for(;n<t.length;){const e=t[n];e[0]===o[0]&&e[1]===o[1]||(n!==a&&(t[a]=t[n]),o=t[a++]),n++}const l=t[0][0]===t[a-1][0]&&t[0][1]===t[a-1][1];if(l&&--a,a<(l?3:2))return null;const c=[];o=l?t[a-1]:null;let u=t[0];for(let r=0;r<a;r++){const n=r===a-1?l?t[0]:null:t[r+1];if(o)if(n){const t=[n[0]-u[0],n[1]-u[1]];this.normalize(t);const r=[u[0]-o[0],u[1]-o[1]];this.normalize(r);const a=r[0]*t[1]-r[1]*t[0],l=r[0]*t[0]+r[1]*t[1];if(a>=0==e<=0){if(l<1){const s=[t[0]-r[0],t[1]-r[1]];this.normalize(s);const n=Math.sqrt((1+l)/2);if(n>1/i){const t=-Math.abs(e)/n;c.push([u[0]-s[0]*t,u[1]-s[1]*t])}}}else switch(s){case h.id.Mitered:{const s=Math.sqrt((1+l)/2);if(s>0&&1/s<i){const i=[t[0]-r[0],t[1]-r[1]];this.normalize(i);const n=Math.abs(e)/s;c.push([u[0]-i[0]*n,u[1]-i[1]*n]);break}}case h.id.Bevelled:c.push([u[0]+r[1]*e,u[1]-r[0]*e]),c.push([u[0]+t[1]*e,u[1]-t[0]*e]);break;case h.id.Rounded:if(l<1){c.push([u[0]+r[1]*e,u[1]-r[0]*e]);const s=Math.floor(2.5*(1-l));if(s>0){const i=1/s;let n=i;for(let o=1;o<s;o++,n+=i){const s=[r[1]*(1-n)+t[1]*n,-r[0]*(1-n)-t[0]*n];this.normalize(s),c.push([u[0]+s[0]*e,u[1]+s[1]*e])}}c.push([u[0]+t[1]*e,u[1]-t[0]*e])}break;case h.id.Square:default:if(a<0)c.push([u[0]+(r[1]+r[0])*e,u[1]+(r[1]-r[0])*e]),c.push([u[0]+(t[1]-t[0])*e,u[1]-(t[0]+t[1])*e]);else{const s=Math.sqrt((1+Math.abs(l))/2),i=[t[0]-r[0],t[1]-r[1]];this.normalize(i);const n=e/s;c.push([u[0]-i[0]*n,u[1]-i[1]*n])}}}else{const t=[u[0]-o[0],u[1]-o[1]];this.normalize(t),c.push([u[0]+t[1]*e,u[1]-t[0]*e])}else{const t=[n[0]-u[0],n[1]-u[1]];this.normalize(t),c.push([u[0]+t[1]*e,u[1]-t[0]*e])}o=u,u=n}return c.length<(l?3:2)?null:(l&&c.push([c[0][0],c[0][1]]),c)}}const f=1.7320508075688772,_=h.TF.OpenEnded;class d{static local(){return null===d.instance&&(d.instance=new d),d.instance}execute(t,e,s,i){return new m(t,e,s)}}d.instance=null;class m extends n.zY{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new u,this._width=(void 0!==e.width?e.width:5)*s,this._arrowType=void 0!==e.geometricEffectArrowType?e.geometricEffectArrowType:_,this._offsetFlattenError=l*s}processPath(t){switch(this._arrowType){case h.TF.OpenEnded:default:return this._constructSimpleArrow(t,!0);case h.TF.Block:return this._constructSimpleArrow(t,!1);case h.TF.Crossed:return this._constructCrossedArrow(t)}}_constructSimpleArrow(t,e){const s=this._curveHelper.calculatePathLength(t);let i=this._width;s<2*i&&(i=s/2);const r=this._curveHelper.getSubCurve(t,0,s-i);if(!r)return null;const n=i/2;if(this._curveHelper.isEmpty(r,!1))return null;const o=this._constructOffset(r,-n);if(!o)return null;const a=this._constructOffset(r,n);if(!a)return null;const h=this._constructArrowBasePoint(o,-n/2);if(!h)return null;const l=this._constructArrowBasePoint(a,n/2);if(!l)return null;const u=t[t.length-1];e||(this._makeControlPoint(a,!0),this._makeControlPoint(o,!0));const f=new c;return f.addPath(a,!0),f.lineTo(l),this._makeControlPoint(f.path()),f.lineTo(u),this._makeControlPoint(f.path()),f.lineTo(h),this._makeControlPoint(f.path()),f.addPath(o,!1),e?{paths:[f.path()]}:(f.close(),{rings:[f.path()]})}_constructCrossedArrow(t){const e=this._curveHelper.calculatePathLength(t);let s=this._width;e<s*(1+f+1)&&(s=e/(1+f+1));const i=this._curveHelper.getSubCurve(t,0,e-s*(1+f));if(!i)return null;const r=s/2;if(this._curveHelper.isEmpty(i,!1))return null;const n=this._constructOffset(i,r);if(!n)return null;const o=this._constructOffset(i,-r);if(!o)return null;const a=this._curveHelper.getSubCurve(t,0,e-s);if(!a)return null;if(this._curveHelper.isEmpty(a,!1))return null;const h=this._constructOffset(a,r);if(!h)return null;const l=this._constructOffset(a,-r);if(!l)return null;const u=h[h.length-1],_=this._constructArrowBasePoint(h,r/2);if(!_)return null;const d=l[l.length-1],m=this._constructArrowBasePoint(l,-r/2);if(!m)return null;const p=t[t.length-1];this._makeControlPoint(n,!1),this._makeControlPoint(o,!1);const g=new c;return g.addPath(n,!0),this._makeControlPoint(g.path()),g.lineTo(d),g.lineTo(m),this._makeControlPoint(g.path()),g.lineTo(p),this._makeControlPoint(g.path()),g.lineTo(_),this._makeControlPoint(g.path()),g.lineTo(u),this._makeControlPoint(g.path()),g.addPath(o,!1),{paths:[g.path()]}}_constructOffset(t,e){return this._curveHelper.offset(t,e,h.id.Rounded,4,this._offsetFlattenError)}_constructArrowBasePoint(t,e){if(!t||t.length<2)return null;const s=t[t.length-2],i=t[t.length-1],r=[i[0]-s[0],i[1]-s[1]];return this._curveHelper.normalize(r),[i[0]+r[1]*e,i[1]-r[0]*e]}_makeControlPoint(t,e=!1){(0,n.qh)(e?t[0]:t[t.length-1],1)}}class p{static local(){return null===p.instance&&(p.instance=new p),p.instance}execute(t,e,s,i){return new g(t,e,s,i)}}p.instance=null;class g{constructor(t,e,s,i){this._inputGeometries=t,this._curveHelper=new u,this._size=(void 0!==e.size?e.size:1)*s,this._offsetFlattenError=l*s}next(){let t=this._inputGeometries.next();for(;t;){if((0,r.YX)(t))if(this._size>0){const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]],s=this._curveHelper.offset(e,this._size,h.id.Rounded,4,this._offsetFlattenError);if(s)return{rings:[s]}}else{if(!(this._size<0))return t;if(Math.min(t.xmax-t.xmin,t.ymax-t.ymin)+2*this._size>0)return{xmin:t.xmin-this._size,xmax:t.xmax+this._size,ymin:t.ymin-this._size,ymax:t.ymax+this._size}}if((0,r.oU)(t)){if(0===this._size)return t;const e=[];for(const s of t.rings){const t=this._curveHelper.offset(s,this._size,h.id.Rounded,4,this._offsetFlattenError);t&&e.push(t)}if(e.length)return{rings:e}}if((0,r.l9)(t)&&this._size>0){const e=[];for(const s of t.paths)if(s&&s.length>1){const t=this._curveHelper.offset(s,this._size,h.id.Rounded,4,this._offsetFlattenError),i=this._curveHelper.offset(s,-this._size,h.id.Rounded,4,this._offsetFlattenError);if(t&&i){for(let e=i.length-1;e>=0;e--)t.push(i[e]);t.push([t[0][0],t[0][1]]),e.push(t)}}if(e.length)return{rings:e}}(0,r.wp)(t)&&this._size,t=this._inputGeometries.next()}return null}}class y{static local(){return null===y.instance&&(y.instance=new y),y.instance}execute(t,e,s,i){return new x(t,e,s)}}y.instance=null;class x{constructor(t,e,s){var i;this._default_point_size=20,this._inputGeometries=t,this._geomUnitsPerPoint=s,this._rule=null!=(i=e.rule)?i:h.Em.FullGeometry,this._default_size=this._default_point_size*s}next(){let t;for(;t=this._inputGeometries.next();){let e;if((0,r.wp)(t)?e=this._processGeom([[[t.x,t.y]]]):(0,r.aW)(t)?e=this._processGeom([t.points]):(0,r.l9)(t)?e=this._processGeom(t.paths):(0,r.oU)(t)&&(e=this._processGeom(t.rings)),e&&e.length)return{paths:e}}return null}_clone(t){return[t[0],t[1]]}_mid(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}_mix(t,e,s,i){return[t[0]*e+s[0]*i,t[1]*e+s[1]*i]}_add(t,e){return[t[0]+e[0],t[1]+e[1]]}_add2(t,e,s){return[t[0]+e,t[1]+s]}_sub(t,e){return[t[0]-e[0],t[1]-e[1]]}_dist(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}_norm(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}_normalize(t,e=1){const s=e/this._norm(t);t[0]*=s,t[1]*=s}_leftPerpendicular(t){const e=t[1],s=-t[0];t[0]=e,t[1]=s}_leftPerp(t){return[t[1],-t[0]]}_rightPerpendicular(t){const e=-t[1],s=t[0];t[0]=e,t[1]=s}_rightPerp(t){return[-t[1],t[0]]}_dotProduct(t,e){return t[0]*e[0]+t[1]*e[1]}_crossProduct(t,e){return-(t[0]*e[1]-t[1]*e[0])}_rotateDirect(t,e,s){s=-s;const i=t[0]*e-t[1]*s,r=t[0]*s+t[1]*e;t[0]=i,t[1]=r}_makeCtrlPt(t){const e=[t[0],t[1]];return(0,n.qh)(e,1),e}_addAngledTicks(t,e,s,i){const r=this._sub(s,e);this._normalize(r);const n=this._crossProduct(r,this._sub(i,e));let o;o=n>0?this._rightPerp(r):this._leftPerp(r);const a=Math.abs(n)/2,h=[];h.push([e[0]+(o[0]-r[0])*a,e[1]+(o[1]-r[1])*a]),h.push(e),h.push(s),h.push([s[0]+(o[0]+r[0])*a,s[1]+(o[1]+r[1])*a]),t.push(h)}_addBezier2(t,e,s,i,r){if(0==r--)return void t.push(i);const n=this._mid(e,s),o=this._mid(s,i),a=this._mid(n,o);this._addBezier2(t,e,n,a,r),this._addBezier2(t,a,o,i,r)}_addBezier3(t,e,s,i,r,n){if(0==n--)return void t.push(r);const o=this._mid(e,s),a=this._mid(s,i),h=this._mid(i,r),l=this._mid(o,a),c=this._mid(a,h),u=this._mid(l,c);this._addBezier3(t,e,o,l,u,n),this._addBezier3(t,u,c,h,r,n)}_add90DegArc(t,e,s,i,r){const n=null!=r?r:this._crossProduct(this._sub(s,e),this._sub(i,e))>0,o=this._mid(e,s),a=this._sub(o,e);n?this._leftPerpendicular(a):this._rightPerpendicular(a),o[0]+=a[0],o[1]+=a[1],this._addBezier3(t,e,this._mix(e,.33333,o,.66667),this._mix(s,.33333,o,.66667),s,4)}_addArrow(t,e,s){const i=e[0],r=e[1],n=e[e.length-1],o=this._sub(i,r);this._normalize(o);const a=this._crossProduct(o,this._sub(n,r)),h=.5*a,l=this._leftPerp(o),c=[n[0]-l[0]*a,n[1]-l[1]*a],u=e.length-1,f=[];f.push(s?[-l[0],-l[1]]:l);let _=[-o[0],-o[1]];for(let t=1;t<u-1;t++){const s=this._sub(e[t+1],e[t]);this._normalize(s);const i=this._dotProduct(s,_),r=this._crossProduct(s,_),n=Math.sqrt((1+i)/2),o=this._sub(s,_);this._normalize(o),o[0]/=n,o[1]/=n,f.push(r<0?[-o[0],-o[1]]:o),_=s}f.push(this._rightPerp(_));for(let s=f.length-1;s>0;s--)t.push([e[s][0]+f[s][0]*h,e[s][1]+f[s][1]*h]);t.push([c[0]+f[0][0]*h,c[1]+f[0][1]*h]),t.push([c[0]+f[0][0]*a,c[1]+f[0][1]*a]),t.push(i),t.push([c[0]-f[0][0]*a,c[1]-f[0][1]*a]),t.push([c[0]-f[0][0]*h,c[1]-f[0][1]*h]);for(let s=1;s<f.length;s++)t.push([e[s][0]-f[s][0]*h,e[s][1]-f[s][1]*h])}_cp2(t,e,s){return t.length>=2?t[1]:this._add2(t[0],e*this._default_size,-s*this._default_size)}_cp3(t,e,s,i){if(t.length>=3)return t[2];const r=this._mix(t[0],1-s,e,s),n=this._sub(e,t[0]);return this._normalize(n),this._rightPerpendicular(n),[r[0]+n[0]*i*this._default_size,r[1]+n[1]*i*this._default_size]}_arrowPath(t){if(t.length>2)return t;const e=t[0],s=this._cp2(t,-4,0),i=this._sub(e,s);this._normalize(i);const r=this._rightPerp(i);return[e,s,[e[0]+(r[0]-i[0])*this._default_size,e[1]+(r[1]-i[1])*this._default_size]]}_arrowLastSeg(t){const e=t[0],s=this._cp2(t,-4,0);let i;if(t.length>=3)i=t[t.length-1];else{const t=this._sub(e,s);this._normalize(t);const r=this._rightPerp(t);i=[e[0]+(r[0]-t[0])*this._default_size,e[1]+(r[1]-t[1])*this._default_size]}return[s,i]}_processGeom(t){if(!t)return null;const e=[];for(const s of t){if(!s||0===s.length)continue;const t=s.length;let i=s[0];switch(this._rule){case h.Em.PerpendicularFromFirstSegment:{const t=this._cp2(s,0,-1),r=this._cp3(s,t,.5,4),n=[];n.push(r),n.push(this._mid(i,t)),e.push(n);break}case h.Em.ReversedFirstSegment:{const t=this._cp2(s,0,-1);e.push([t,i]);break}case h.Em.PerpendicularToSecondSegment:{const t=this._cp2(s,-4,1),r=this._cp3(s,t,.882353,-1.94),n=[];n.push(this._mid(t,r)),n.push(i),e.push(n);break}case h.Em.SecondSegmentWithTicks:{const t=this._cp2(s,-4,1),r=this._cp3(s,t,.882353,-1.94),n=this._sub(r,t);let o;o=this._crossProduct(n,this._sub(i,t))>0?this._rightPerp(o):this._leftPerp(n);const a=[];a.push([t[0]+(o[0]-n[0])/3,t[1]+(o[1]-n[1])/3]),a.push(t),a.push(r),a.push([r[0]+(o[0]+n[0])/3,r[1]+(o[1]+n[1])/3]),e.push(a);break}case h.Em.DoublePerpendicular:{const t=this._cp2(s,0,-1),r=this._cp3(s,t,.5,3),n=this._mid(i,t),o=this._sub(n,r);this._normalize(o);const a=this._crossProduct(o,this._sub(i,r));this._leftPerpendicular(o);const h=[];h.push(i),h.push([r[0]+o[0]*a,r[1]+o[1]*a]),e.push(h);const l=[];l.push([r[0]-o[0]*a,r[1]-o[1]*a]),l.push(t),e.push(l);break}case h.Em.OppositeToFirstSegment:{const t=this._cp2(s,0,-1),r=this._cp3(s,t,.5,3),n=this._mid(i,t),o=this._sub(n,r);this._normalize(o);const a=this._crossProduct(o,this._sub(i,r));this._leftPerpendicular(o);const h=[];h.push([r[0]+o[0]*a,r[1]+o[1]*a]),h.push([r[0]-o[0]*a,r[1]-o[1]*a]),e.push(h);break}case h.Em.TriplePerpendicular:{const t=this._cp2(s,0,-1),r=this._cp3(s,t,.5,4),n=this._mid(i,t),o=this._sub(n,r);this._normalize(o);const a=this._crossProduct(o,this._sub(i,r));this._leftPerpendicular(o);const h=[];h.push([r[0]+o[0]*a*.8,r[1]+o[1]*a*.8]),h.push([n[0]+.8*(i[0]-n[0]),n[1]+.8*(i[1]-n[1])]),e.push(h),e.push([r,n]);const l=[];l.push([r[0]-o[0]*a*.8,r[1]-o[1]*a*.8]),l.push([n[0]+.8*(t[0]-n[0]),n[1]+.8*(t[1]-n[1])]),e.push(l);break}case h.Em.HalfCircleFirstSegment:{const t=this._cp2(s,0,-1),r=this._cp3(s,t,.5,4),n=this._mid(i,t);let o=this._sub(t,i);const a=Math.cos(Math.PI/18),h=Math.sin(Math.PI/18),l=Math.sqrt((1+a)/2),c=Math.sqrt((1-a)/2),u=[];let f;this._crossProduct(o,this._sub(r,i))>0?(u.push(i),o=this._sub(i,n),f=t):(u.push(t),o=this._sub(t,n),f=i),this._rotateDirect(o,l,c),o[0]/=l,o[1]/=l;for(let t=1;t<=18;t++)u.push(this._add(n,o)),this._rotateDirect(o,a,h);u.push(f),e.push(u);break}case h.Em.HalfCircleSecondSegment:{const t=this._cp2(s,0,-1),r=this._cp3(s,t,1,-1);let n=this._sub(i,t);this._normalize(n);const o=this._crossProduct(n,this._sub(r,t))/2;this._leftPerpendicular(n);const a=[t[0]+n[0]*o,t[1]+n[1]*o];n=this._sub(t,a);const h=Math.cos(Math.PI/18);let l=Math.sin(Math.PI/18);o>0&&(l=-l);const c=[t];for(let t=1;t<=18;t++)this._rotateDirect(n,h,l),c.push(this._add(a,n));e.push(c);break}case h.Em.HalfCircleExtended:{const r=this._cp2(s,0,-2),n=this._cp3(s,r,1,-1);let o;if(t>=4)o=s[3];else{const t=this._sub(i,r);o=this._add(n,t)}const a=this._dist(r,n)/2/.75,h=this._sub(r,i);this._normalize(h,a);const l=this._sub(n,o);this._normalize(l,a);const c=[o,n];e.push(c);const u=[this._clone(n)];this._addBezier3(u,n,this._add(n,l),this._add(r,h),r,4),u.push(i),e.push(u);break}case h.Em.OpenCircle:{const t=this._cp2(s,-2,0),r=this._sub(t,i),n=Math.cos(Math.PI/18),o=-Math.sin(Math.PI/18),a=[t];for(let t=1;t<=33;t++)this._rotateDirect(r,n,o),a.push(this._add(i,r));e.push(a);break}case h.Em.CoverageEdgesWithTicks:{const r=this._cp2(s,0,-1);let n,o;if(t>=3)n=s[2];else{const t=this._sub(r,i),e=this._leftPerp(t);n=[i[0]+e[0]-.25*t[0],i[1]+e[1]-.25*t[1]]}if(t>=4)o=s[3];else{const t=this._mid(i,r),e=this._sub(i,r);this._normalize(e),this._leftPerpendicular(e);const s=this._crossProduct(e,this._sub(n,t));this._rightPerpendicular(e),o=[n[0]+e[0]*s*2,n[1]+e[1]*s*2]}const a=this._sub(r,i);let h,l;h=this._crossProduct(a,this._sub(n,i))>0?this._rightPerp(a):this._leftPerp(a),l=[],l.push(n),l.push(i),l.push([i[0]+(h[0]-a[0])/3,i[1]+(h[1]-a[1])/3]),e.push(l),h=this._crossProduct(a,this._sub(o,r))>0?this._rightPerp(h):this._leftPerp(a),l=[],l.push([r[0]+(h[0]+a[0])/3,r[1]+(h[1]+a[1])/3]),l.push(r),l.push(o),e.push(l);break}case h.Em.GapExtentWithDoubleTicks:{const r=this._cp2(s,0,2),n=this._cp3(s,r,0,1);let o;if(t>=4)o=s[3];else{const t=this._sub(r,i);o=this._add(n,t)}this._addAngledTicks(e,i,r,this._mid(n,o)),this._addAngledTicks(e,n,o,this._mid(i,r));break}case h.Em.GapExtentMidline:{const r=this._cp2(s,2,0),n=this._cp3(s,r,0,1);let o;if(t>=4)o=s[3];else{const t=this._sub(r,i);o=this._add(n,t)}const a=[];a.push(this._mid(i,n)),a.push(this._mid(r,o)),e.push(a);break}case h.Em.Chevron:{const r=this._cp2(s,-1,-1);let n;if(t>=3)n=s[2];else{const t=this._sub(r,i);this._leftPerpendicular(t),n=this._add(i,t)}e.push([r,this._makeCtrlPt(i),n]);break}case h.Em.PerpendicularWithArc:{const t=this._cp2(s,0,-2),r=this._cp3(s,t,.5,-1);let n=this._sub(t,i);const o=this._norm(n);n[0]/=o,n[1]/=o;const a=this._crossProduct(n,this._sub(r,i));let h=this._dotProduct(n,this._sub(r,i));h<.05*o?h=.05*o:h>.95*o&&(h=.95*o);const l=[i[0]+n[0]*h,i[1]+n[1]*h];this._leftPerpendicular(n);let c=[];c.push([l[0]-n[0]*a,l[1]-n[1]*a]),c.push([l[0]+n[0]*a,l[1]+n[1]*a]),e.push(c);const u=[t[0]+n[0]*a,t[1]+n[1]*a];n=this._sub(t,u);const f=Math.cos(Math.PI/18);let _=Math.sin(Math.PI/18);a<0&&(_=-_),c=[i,t];for(let t=1;t<=9;t++)this._rotateDirect(n,f,_),c.push(this._add(u,n));e.push(c);break}case h.Em.ClosedHalfCircle:{const t=this._cp2(s,2,0),r=this._mid(i,t),n=this._sub(t,r),o=Math.cos(Math.PI/18),a=Math.sin(Math.PI/18),h=[i,t];for(let t=1;t<=18;t++)this._rotateDirect(n,o,a),h.push(this._add(r,n));e.push(h);break}case h.Em.TripleParallelExtended:{const t=this._cp2(s,0,-2),r=this._cp3(s,t,1,-2),o=this._mid(i,t),a=this._sub(r,t);this._normalize(a);const h=Math.abs(this._crossProduct(a,this._sub(o,t)))/2,l=this._dist(t,r),c=[t,i];c.push([i[0]+a[0]*l*.5,i[1]+a[1]*l*.5]),e.push(c);const u=[];u.push([o[0]-a[0]*h,o[1]-a[1]*h]),u.push([o[0]+a[0]*l*.375,o[1]+a[1]*l*.375]),(0,n.qh)(u[u.length-1],1),u.push([o[0]+a[0]*l*.75,o[1]+a[1]*l*.75]),e.push(u);const f=[t,r];e.push(f);break}case h.Em.ParallelWithTicks:{const t=this._cp2(s,3,0),r=this._cp3(s,t,.5,-1),n=this._sub(r,t);this._normalize(n);const o=this._crossProduct(n,this._sub(r,i));this._leftPerpendicular(n),this._addAngledTicks(e,i,t,r),this._addAngledTicks(e,this._mix(i,1,n,o),this._mix(t,1,n,o),this._mid(i,t));break}case h.Em.Parallel:{const t=this._cp2(s,3,0),r=this._cp3(s,t,.5,-1),n=this._sub(t,i);this._normalize(n);const o=this._leftPerp(n),a=this._crossProduct(n,this._sub(r,i));let h=[i,t];e.push(h),h=[],h.push([i[0]+o[0]*a,i[1]+o[1]*a]),h.push([t[0]+o[0]*a,t[1]+o[1]*a]),e.push(h);break}case h.Em.PerpendicularToFirstSegment:{const t=this._cp2(s,3,0),r=this._cp3(s,t,.5,-1),n=this._mid(i,t),o=this._sub(t,i);this._normalize(o);const a=this._crossProduct(o,this._sub(r,i));this._leftPerpendicular(o);const h=[];h.push([n[0]-o[0]*a*.25,n[1]-o[1]*a*.25]),h.push([n[0]+o[0]*a*1.25,n[1]+o[1]*a*1.25]),e.push(h);break}case h.Em.ParallelOffset:{const t=this._cp2(s,3,0),r=this._cp3(s,t,.5,-1),n=this._sub(t,i);this._normalize(n);const o=this._crossProduct(n,this._sub(r,i));this._leftPerpendicular(n);const a=[];a.push([i[0]-n[0]*o,i[1]-n[1]*o]),a.push([t[0]-n[0]*o,t[1]-n[1]*o]),e.push(a);const h=[];h.push([i[0]+n[0]*o,i[1]+n[1]*o]),h.push([t[0]+n[0]*o,t[1]+n[1]*o]),e.push(h);break}case h.Em.OffsetOpposite:{const t=this._cp2(s,3,0),r=this._cp3(s,t,.5,-1),n=this._sub(t,i);this._normalize(n);const o=this._crossProduct(n,this._sub(r,i));this._leftPerpendicular(n);const a=[];a.push([i[0]-n[0]*o,i[1]-n[1]*o]),a.push([t[0]-n[0]*o,t[1]-n[1]*o]),e.push(a);break}case h.Em.OffsetSame:{const t=this._cp2(s,3,0),r=this._cp3(s,t,.5,-1),n=this._sub(t,i);this._normalize(n);const o=this._crossProduct(n,this._sub(r,i));this._leftPerpendicular(n);const a=[];a.push([i[0]+n[0]*o,i[1]+n[1]*o]),a.push([t[0]+n[0]*o,t[1]+n[1]*o]),e.push(a);break}case h.Em.CircleWithArc:{let r=this._cp2(s,3,0);const o=this._cp3(s,r,.5,-1);let a,h;if(t>=4)a=s[3],h=this._crossProduct(this._sub(a,r),this._sub(o,r))>0;else{a=r,h=this._crossProduct(this._sub(a,i),this._sub(o,i))>0;const t=24*this._geomUnitsPerPoint,e=this._sub(a,i);this._normalize(e,t);const s=Math.sqrt(2)/2;this._rotateDirect(e,s,h?s:-s),r=this._add(i,e)}const l=this._sub(r,i),c=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18),f=[r];for(let t=1;t<=36;t++)this._rotateDirect(l,c,u),f.push(this._add(i,l));this._add90DegArc(f,r,a,o,h),(0,n.qh)(f[f.length-8],1),e.push(f);break}case h.Em.DoubleJog:{let r,n,o=this._cp2(s,-3,1);if(r=t>=3?s[2]:this._add(i,this._sub(i,o)),t>=4)n=s[3];else{const t=i;i=o,n=r;const e=this._dist(i,t),s=this._dist(n,t);let a=30*this._geomUnitsPerPoint;.5*e<a&&(a=.5*e),.5*s<a&&(a=.5*s),o=this._mix(i,a/e,t,(e-a)/e),r=this._mix(n,a/s,t,(s-a)/s)}const a=this._mid(i,o),h=this._mid(n,r),l=this._dist(i,o),c=this._dist(r,n);let u=Math.min(l,c)/8;u=Math.min(u,24*this._geomUnitsPerPoint);const f=Math.cos(Math.PI/4);let _=this._sub(i,o);this._normalize(_,u),this._crossProduct(_,this._sub(n,o))>0?this._rotateDirect(_,f,-f):this._rotateDirect(_,f,f);let d=[];d.push(o),d.push(this._add(a,_)),d.push(this._sub(a,_)),d.push(i),e.push(d),_=this._sub(n,r),this._normalize(_,u),this._crossProduct(_,this._sub(i,r))<0?this._rotateDirect(_,f,f):this._rotateDirect(_,f,-f),d=[],d.push(r),d.push(this._add(h,_)),d.push(this._sub(h,_)),d.push(n),e.push(d);break}case h.Em.PerpendicularOffset:{const t=this._cp2(s,-4,1),r=this._cp3(s,t,.882353,-1.94),n=this._sub(r,t);this._crossProduct(n,this._sub(i,t))>0?this._rightPerpendicular(n):this._leftPerpendicular(n);const o=[n[0]/8,n[1]/8],a=this._sub(this._mid(t,r),o);e.push([a,i]);break}case h.Em.LineExcludingLastSegment:{const t=this._arrowPath(s),i=[];let r=t.length-2;for(;r--;)i.push(t[r]);e.push(i);break}case h.Em.MultivertexArrow:{const t=this._arrowPath(s),i=[];this._addArrow(i,t,!1),e.push(i);break}case h.Em.CrossedArrow:{const t=this._arrowPath(s),i=[];this._addArrow(i,t,!0),e.push(i);break}case h.Em.ChevronArrow:{const[t,r]=this._arrowLastSeg(s),n=10*this._geomUnitsPerPoint,o=this._sub(i,t);this._normalize(o);const a=this._crossProduct(o,this._sub(r,t)),h=this._leftPerp(o),l=[r[0]-h[0]*a*2,r[1]-h[1]*a*2],c=[];c.push([r[0]+o[0]*n,r[1]+o[1]*n]),c.push(i),c.push([l[0]+o[0]*n,l[1]+o[1]*n]),e.push(c);break}case h.Em.ChevronArrowOffset:{const[t,r]=this._arrowLastSeg(s),n=this._sub(i,t);this._normalize(n);const o=this._crossProduct(n,this._sub(r,t));this._leftPerpendicular(n);const a=[r[0]-n[0]*o,r[1]-n[1]*o],h=[];h.push([a[0]+n[0]*o*.5,a[1]+n[1]*o*.5]),h.push(this._mid(a,i)),h.push([a[0]-n[0]*o*.5,a[1]-n[1]*o*.5]),e.push(h);break}case h.Em.PartialFirstSegment:{const[t,r]=this._arrowLastSeg(s),n=this._sub(i,t);this._normalize(n);const o=this._crossProduct(n,this._sub(r,t));this._leftPerpendicular(n);const a=[r[0]-n[0]*o,r[1]-n[1]*o];e.push([t,a]);break}case h.Em.Arch:{const t=this._cp2(s,0,-1),r=this._cp3(s,t,.5,1),n=this._sub(i,t),o=this._mix(r,1,n,.55),a=this._mix(r,1,n,-.55),h=[i];this._addBezier2(h,i,o,r,4),this._addBezier2(h,r,a,t,4),e.push(h);break}case h.Em.CurvedParallelTicks:{const t=this._cp2(s,-4,1),r=this._cp3(s,t,.882353,-1.94),n=this._sub(r,t);this._crossProduct(n,this._sub(i,t))>0?this._rightPerpendicular(n):this._leftPerpendicular(n);const o=[n[0]/8,n[1]/8],a=this._sub(this._mid(t,r),o),h=this._sub(this._mix(t,.75,r,.25),o),l=this._sub(this._mix(t,.25,r,.75),o),c=[t];this._addBezier2(c,t,h,a,3),this._addBezier2(c,a,l,r,3),e.push(c);for(let t=0;t<8;t++){const s=c[2*t+1],i=[this._clone(s)];i.push(this._add(s,[n[0]/4,n[1]/4])),e.push(i)}break}case h.Em.Arc90Degrees:{const t=this._cp2(s,0,-1),r=this._cp3(s,t,.5,1),n=[t];this._add90DegArc(n,t,i,r),e.push(n);break}case h.Em.FullGeometry:default:e.push(s)}}return e}}class v{static local(){return null===v.instance&&(v.instance=new v),v.instance}execute(t,e,s,i){return new M(t,e,s)}}v.instance=null;class M extends n.zY{constructor(t,e,s){super(t,!0,!0),this._curveHelper=new u,this._beginCut=(void 0!==e.beginCut?e.beginCut:1)*s,this._endCut=(void 0!==e.endCut?e.endCut:1)*s,this._middleCut=(void 0!==e.middleCut?e.middleCut:0)*s,this._invert=void 0!==e.invert&&e.invert,this._beginCut<0&&(this._beginCut=0),this._endCut<0&&(this._endCut=0),this._middleCut<0&&(this._middleCut=0)}processPath(t){const e=this._beginCut,s=this._endCut,i=this._middleCut,r=this._curveHelper.calculatePathLength(t),n=[];if(this._invert)if(0===e&&0===s&&0===i);else if(e+s+i>=r)n.push(t);else{let o=this._curveHelper.getSubCurve(t,0,e);o&&n.push(o),o=this._curveHelper.getSubCurve(t,.5*(r-i),.5*(r+i)),o&&n.push(o),o=this._curveHelper.getSubCurve(t,r-s,s),o&&n.push(o)}else if(0===e&&0===s&&0===i)n.push(t);else if(e+s+i>=r);else if(0===i){const i=this._curveHelper.getSubCurve(t,e,r-s);i&&n.push(i)}else{let o=this._curveHelper.getSubCurve(t,e,.5*(r-i));o&&n.push(o),o=this._curveHelper.getSubCurve(t,.5*(r+i),r-s),o&&n.push(o)}return 0===n.length?null:{paths:n}}}class b{constructor(){this._values=[],this.extPtGap=0,this.ctrlPtGap=0,this._length=0,this._currentValue=0}isEmpty(){return 0===this._values.length}size(){return this._values.length}init(t,e,s=!0){if(this._setEmpty(),!t||0===t.length)return!1;for(let e=0;e<t.length;e++){let i=Math.abs(t[e]);s&&i<1e-7&&(i=1e-7),this._values.push(i),this._length+=i}return e&&1&t.length&&(this._length*=2),0!==this._length&&(this.ctrlPtGap=this.extPtGap=0,this._currentValue=-1,!0)}scale(t){const e=this._values?this._values.length:0;for(let s=0;s<e;++s)this._values[s]*=t;this._length*=t,this.extPtGap*=t,this.ctrlPtGap*=t}addValue(t){this._length+=t,this._values.push(t)}firstValue(){return this._values[0]}lastValue(){return this._values[this._values.length-1]}nextValue(){return this._currentValue++,this._currentValue===this._values.length&&(this._currentValue=0),this._values[this._currentValue]}reset(){this._currentValue=-1}length(){return this._length}_setEmpty(){this.extPtGap=this.ctrlPtGap=this._length=0,this._currentValue=-1,this._values.length=0}}var S,P;(P=S||(S={}))[P.FAIL=0]="FAIL",P[P.END=1]="END",P[P.CONTINUE=2]="CONTINUE";class w{constructor(){this.reset()}reset(){this.segment=-1,this.segmentLength=0,this.abscissa=0,this.isPathEnd=!1,this.isPartEnd=!1}isValid(){return-1!==this.segment}copyTo(t){t.segment=this.segment,t.segmentLength=this.segmentLength,t.abscissa=this.abscissa,t.isPathEnd=this.isPathEnd,t.isPartEnd=this.isPartEnd}}class C extends u{constructor(t=0,e=!1){super(t,e),this._tolerance=l,this._currentPosition=new w}updateTolerance(t){this._tolerance=l*t}init(t,e,s=!0){return s?(this._patternLength=e.length(),this._partExtPtGap=e.extPtGap,this._partCtrlPtGap=e.ctrlPtGap):(this._patternLength=0,this._partExtPtGap=0,this._partCtrlPtGap=0),this._currentPosition.reset(),this._partSegCount=0,this._path=t,this._seg=-1,this._setPosAtNextPart()}curPositionIsValid(){return this._currentPosition.isValid()}nextPosition(t,e=S.FAIL){const s=new w;return!!this._nextPosition(t,s,null,e)&&(s.copyTo(this._currentPosition),!0)}curPointAndAngle(t){t.pt=this._getPoint(this._currentPosition);const[e,s]=this._getAngle(this._currentPosition);t.ca=e,t.sa=s}nextPointAndAngle(t,e,s=S.FAIL){const i=new w;if(!this._nextPosition(t,i,null,s))return!1;i.copyTo(this._currentPosition),e.pt=this._getPoint(i);const[r,n]=this._getAngle(i);return e.ca=r,e.sa=n,!0}nextCurve(t){if(0===t)return null;const e=[],s=new w;return this._nextPosition(t,s,e,S.END)?(s.copyTo(this._currentPosition),e):null}isPathEnd(){return this._currentPosition.isPathEnd}getPathEnd(){if(-1===this._currentPosition.segment)throw new Error("missing segment");return this._path[this._currentPosition.segment+1]}_nextPosition(t,e,s,i){if(this._currentPosition.isPathEnd)return!1;let r=this._currentPosition.abscissa;for(this._currentPosition.segmentLength>0&&(r/=this._currentPosition.segmentLength),this._currentPosition.copyTo(e);e.abscissa+t*this._partLengthRatio>e.segmentLength+this._tolerance;){if(s){if(0===s.length)if(0===r){const t=this._path[e.segment];s.push([t[0],t[1]])}else s.push(this.getSegCoord2D(this._path,e.segment,r));const t=this._path[e.segment+1];s.push([t[0],t[1]])}if(r=0,t-=(e.segmentLength-e.abscissa)/this._partLengthRatio,this._partSegCount)e.segment=this._nextSegment(),e.segmentLength=this.calculateSegLength(this._path,e.segment),e.abscissa=0,this._partSegCount--;else{if(!this._setPosAtNextPart())return i!==S.FAIL&&(e.segmentLength=this.calculateSegLength(this._path,e.segment),e.isPartEnd=!0,i===S.END?(e.abscissa=e.segmentLength,e.isPathEnd=!0):e.abscissa=e.segmentLength+t,!0);this._currentPosition.copyTo(e)}}if(e.abscissa+=t*this._partLengthRatio,s){if(0===s.length)if(0===r){const t=this._path[e.segment];s.push([t[0],t[1]])}else s.push(this.getSegCoord2D(this._path,e.segment,r));const t=e.abscissa/e.segmentLength;if(1===t){const t=this._path[e.segment+1];s.push([t[0],t[1]])}else s.push(this.getSegCoord2D(this._path,e.segment,t))}return this._partSegCount||Math.abs(e.abscissa-e.segmentLength)<this._tolerance&&(e.isPathEnd=this._partIsLast,e.isPartEnd=!0),!0}_getPoint(t){if(-1===t.segment)throw new Error("missing segment");const e=t.segmentLength<=0?0:t.abscissa/t.segmentLength;return this.getSegCoord2D(this._path,t.segment,e)}_getAngle(t){if(-1===t.segment)throw new Error("missing segment");const e=t.segmentLength<=0?0:t.abscissa/t.segmentLength;return this.getSegAngleCS(this._path,t.segment,e)}_setPosAtNextPart(){for(;this._partSegCount;)this._hasNextSegment()&&this._nextSegment(),this._partSegCount--;if(!this._hasNextSegment())return!1;for(this._partLength=0,this._partIsLast=!0,this._partSegCount=0;this._hasNextSegment();)if(this._partLength+=this.calculateSegLength(this._path,this._nextSegment()),this._partSegCount++,1===(0,n.zv)(this._path[this._getEndPointIndex()])){this._partIsLast=!this._hasNextSegment();break}let t=this._partSegCount;for(;t;)this._previousSegment(),--t;this._currentPosition.segment=this._nextSegment(),this._currentPosition.segmentLength=this.calculateSegLength(this._path,this._currentPosition.segment),this._currentPosition.abscissa=0,this._currentPosition.isPathEnd=this._currentPosition.isPartEnd=!1,--this._partSegCount;const e=this._getStartPointIndex();this._ctrlPtBegin=1===(0,n.zv)(this._path[e]);let s=e+this._partSegCount+1;if(s>=this._path.length&&(s=0),this._ctrlPtEnd=1===(0,n.zv)(this._path[s]),this._patternLength>0){const t=this._ctrlPtBegin?this._partCtrlPtGap:this._partExtPtGap,e=this._ctrlPtEnd?this._partCtrlPtGap:this._partExtPtGap;let s=Math.round((this._partLength-(t+e))/this._patternLength);s<=0&&(s=t+e>0?0:1),this._partLengthRatio=this._partLength/(t+e+s*this._patternLength),this._partLengthRatio<.01&&(this._partLengthRatio=1)}else this._partLengthRatio=1;return!0}_hasNextSegment(){return this._seg<this._path.length-2}_previousSegment(){return--this._seg}_nextSegment(){return++this._seg}_getStartPointIndex(){return this._seg}_getEndPointIndex(){return this._seg+1}}class L{static local(){return null===L.instance&&(L.instance=new L),L.instance}execute(t,e,s,i){return new I(t,e,s)}}L.instance=null;class I extends n.zY{constructor(t,e,s){var i,r;super(t,!0,!0),this._walker=new C,this._walker.updateTolerance(s),this._endings=e.lineDashEnding,this._customDashPos=-(null!=(i=e.offsetAlongLine)?i:0)*s,this._offsetAtEnd=(null!=(r=e.customEndingOffset)?r:0)*s,this._pattern=new b,this._pattern.init(e.dashTemplate,!0),this._pattern.scale(s)}processPath(t){if(0===this._pattern.length())return this.iteratePath=!1,{paths:[t]};if(!this.iteratePath){let e=!0;switch(this._endings){case h.sj.HalfPattern:case h.sj.HalfGap:default:this._pattern.extPtGap=0;break;case h.sj.FullPattern:this.isClosed||(this._pattern.extPtGap=.5*this._pattern.firstValue());break;case h.sj.FullGap:this.isClosed||(this._pattern.extPtGap=.5*this._pattern.lastValue());break;case h.sj.NoConstraint:this.isClosed||(e=!1);break;case h.sj.Custom:this.isClosed||(this._pattern.extPtGap=.5*this._offsetAtEnd)}const s=this._walker.calculatePathLength(t);if(this._pattern.isEmpty()||s<.1*this._pattern.length())return{paths:[t]};if(!this._walker.init(t,this._pattern,e))return{paths:[t]}}let e;if(this.iteratePath)e=this._pattern.nextValue();else{let t;switch(this._endings){case h.sj.HalfPattern:default:t=.5*this._pattern.firstValue();break;case h.sj.HalfGap:t=.5*-this._pattern.lastValue();break;case h.sj.FullGap:t=-this._pattern.lastValue();break;case h.sj.FullPattern:t=0;break;case h.sj.NoConstraint:case h.sj.Custom:t=-this._customDashPos}let s=t/this._pattern.length();s-=Math.floor(s),t=s*this._pattern.length(),this._pattern.reset(),e=this._pattern.nextValue();let i=!1;for(;t>=e;)t-=e,e=this._pattern.nextValue(),i=!i;e-=t,i?(this._walker.nextPosition(e),e=this._pattern.nextValue()):this.isClosed&&(this._firstCurve=this._walker.nextCurve(e),e=this._pattern.nextValue(),this._walker.nextPosition(e),e=this._pattern.nextValue())}let s=this._walker.nextCurve(e);return s?this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(this._firstCurve.splice(0,1),c.mergePath(s,this._firstCurve),this._firstCurve=null)):(e=this._pattern.nextValue(),!this._walker.nextPosition(e)||this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(s=this._firstCurve,this._firstCurve=null)):this.iteratePath=!0):(this.iteratePath=!1,s=this._firstCurve,this._firstCurve=null),{paths:[s]}}}class k{static local(){return null===k.instance&&(k.instance=new k),k.instance}execute(t,e,s,i){return new T(t,e,s)}}k.instance=null;class T{constructor(t,e,s){switch(this._inputGeometries=t,this._curveHelper=new u,this._width=(void 0!==e.width?e.width:2)*s,e.method){case h.$y.Mitered:default:this._method=h.id.Mitered;break;case h.$y.Bevelled:this._method=h.id.Bevelled;break;case h.$y.Rounded:case h.$y.TrueBuffer:this._method=h.id.Rounded;break;case h.$y.Square:this._method=h.id.Square}this._option=e.option,this._offsetFlattenError=l*s}next(){let t=this._inputGeometries.next();for(;t;){if((0,r.YX)(t)&&this._width>0){if(Math.min(t.xmax-t.xmin,t.ymax-t.ymin)-2*this._width<0)return t;const e=[];return e.push([[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]),e.push([[t.xmin+this._width,t.ymin+this._width],[t.xmax-this._width,t.ymin+this._width],[t.xmax-this._width,t.ymax-this._width],[t.xmin+this._width,t.ymax-this._width],[t.xmin+this._width,t.ymin+this._width]]),{rings:e}}if((0,r.oU)(t)&&this._width>0){const e=[];for(const s of t.rings){const t=this._curveHelper.calculatePathLength(s),i=this._curveHelper.offset(s,this._width,this._method,4,this._offsetFlattenError);i&&(t<0&&i.reverse(),e.push(i))}if(e.length)return{rings:e}}t=this._inputGeometries.next()}return null}}class z{static local(){return null===z.instance&&(z.instance=new z),z.instance}execute(t,e,s,i){return new E(t,e,s)}}z.instance=null;class E extends n.zY{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new u,this._length=(void 0!==e.length?e.length:20)*s,this._angle=void 0!==e.angle?e.angle:225,this._position=void 0!==e.position?e.position:50,this._length<0&&(this._length=-this._length),this._position<20&&(this._position=20),this._position>80&&(this._position=80),this._mirror=!1}processPath(t){if(this._curveHelper.isEmpty(t,!1))return null;const e=t[0],s=t[t.length-1],i=[s[0]-e[0],s[1]-e[1]];this._curveHelper.normalize(i);const r=[e[0]+(s[0]-e[0])*this._position/100,e[1]+(s[1]-e[1])*this._position/100],n=Math.cos((90-this._angle)/180*Math.PI);let o=Math.sin((90-this._angle)/180*Math.PI);return this._mirror&&(o=-o),this._mirror=!this._mirror,{paths:[[e,[r[0]-this._length/2*n,r[1]-this._length/2*o],[r[0]+this._length/2*n,r[1]+this._length/2*o],s]]}}}class A{static local(){return null===A.instance&&(A.instance=new A),A.instance}execute(t,e,s,i){return new F(t,e,s)}}A.instance=null;class F{constructor(t,e,s){this._inputGeometries=t,this._offsetX=void 0!==e.offsetX?e.offsetX*s:0,this._offsetY=void 0!==e.offsetY?-e.offsetY*s:0}next(){let t=this._inputGeometries.next();for(;t;){if((0,r.YX)(t))return{xmin:t.xmin+this._offsetX,xmax:t.xmax+this._offsetX,ymin:t.ymin+this._offsetY,ymax:t.ymax+this._offsetY};if((0,r.oU)(t)){const e=(0,i.d9)(t);return this._moveMultipath(e.rings,this._offsetX,this._offsetY),e}if((0,r.l9)(t)){const e=(0,i.d9)(t);return this._moveMultipath(e.paths,this._offsetX,this._offsetY),e}if((0,r.aW)(t)){const e=(0,i.d9)(t);return this._movePath(e.points,this._offsetX,this._offsetY),e}if((0,r.wp)(t))return{x:t.x+this._offsetX,y:t.y+this._offsetY};t=this._inputGeometries.next()}return null}_moveMultipath(t,e,s){if(t)for(const i of t)this._movePath(i,e,s)}_movePath(t,e,s){if(t)for(const i of t)i[0]+=e,i[1]+=s}}class R{static local(){return null===R.instance&&(R.instance=new R),R.instance}execute(t,e,s,i,r){return new O(t,e,s,r)}}R.instance=null;class O{constructor(t,e,s,i){var r;this._inputGeometries=t,this._curveHelper=new u,this._offset=(null!=(r=e.offset)?r:1)*s,i||(this._offset=-this._offset),this._method=e.method,this._option=e.option,this._offsetFlattenError=l*s}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._offset)return t;if((0,r.YX)(t)){if(this._method===h.id.Rounded&&this._offset>0){const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]],s=this._curveHelper.offset(e,this._offset,this._method,4,this._offsetFlattenError);return s?{rings:[s]}:null}if(Math.min(t.xmax-t.xmin,t.ymax-t.ymin)+2*this._offset>0)return{xmin:t.xmin-this._offset,xmax:t.xmax+this._offset,ymin:t.ymin-this._offset,ymax:t.ymax+this._offset}}if((0,r.oU)(t)){const e=[];for(const s of t.rings){const t=this._curveHelper.offset(s,this._offset,this._method,4,this._offsetFlattenError);t&&e.push(t)}if(e.length)return{rings:e}}if((0,r.l9)(t)){const e=[];for(const s of t.paths){const t=this._curveHelper.offset(s,this._offset,this._method,4,this._offsetFlattenError);t&&e.push(t)}if(e.length)return{paths:e}}t=this._inputGeometries.next()}return null}}class N{static local(){return null===N.instance&&(N.instance=new N),N.instance}execute(t,e,s,i){return new W(t,e,s)}}N.instance=null;class W{constructor(t,e,s){this._inputGeometries=t,this._reverse=void 0===e.reverse||e.reverse}next(){let t=this._inputGeometries.next();for(;t;){if(!this._reverse)return t;if((0,r.l9)(t)){const e=(0,i.d9)(t);return(0,n.ov)(e.paths),e}t=this._inputGeometries.next()}return null}}var V=s(24470),B=s(20322);class G{static local(){return null===G.instance&&(G.instance=new G),G.instance}execute(t,e,s,i){return new D(t,e,s)}}G.instance=null;class D{constructor(t,e,s){this._inputGeometries=t,this._rotateAngle=void 0!==e.angle?-e.angle*Math.PI/180:0}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._rotateAngle)return t;const e=(0,V.Ue)();(0,B.$P)(e,t);const s=(e[2]+e[0])/2,n=(e[3]+e[1])/2;if((0,r.YX)(t)){const e={rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]};return this._rotateMultipath(e.rings,s,n),e}if((0,r.oU)(t)){const e=(0,i.d9)(t);return this._rotateMultipath(e.rings,s,n),e}if((0,r.l9)(t)){const e=(0,i.d9)(t);return this._rotateMultipath(e.paths,s,n),e}if((0,r.aW)(t)){const e=(0,i.d9)(t);return this._rotatePath(e.points,s,n),e}if((0,r.wp)(t))return t;t=this._inputGeometries.next()}return null}_rotateMultipath(t,e,s){if(t)for(const i of t)this._rotatePath(i,e,s)}_rotatePath(t,e,s){if(t){const i=Math.cos(this._rotateAngle),r=Math.sin(this._rotateAngle);for(const n of t){const t=n[0]-e,o=n[1]-s;n[0]=e+t*i-o*r,n[1]=s+t*r+o*i}}}}class X{static local(){return null===X.instance&&(X.instance=new X),X.instance}execute(t,e,s,i){return new U(t,e,s)}}X.instance=null;class U{constructor(t,e,s){this._inputGeometries=t,this._xFactor=void 0!==e.xScaleFactor?e.xScaleFactor:1.15,this._yFactor=void 0!==e.yScaleFactor?e.yScaleFactor:1.15}next(){let t=this._inputGeometries.next();for(;t;){if(1===this._xFactor&&1===this._yFactor)return t;const e=(0,V.Ue)();(0,B.$P)(e,t);const s=(e[2]+e[0])/2,n=(e[3]+e[1])/2;if((0,r.YX)(t)){const e={rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]};return this._scaleMultipath(e.rings,s,n),e}if((0,r.oU)(t)){const e=(0,i.d9)(t);return this._scaleMultipath(e.rings,s,n),e}if((0,r.l9)(t)){const e=(0,i.d9)(t);return this._scaleMultipath(e.paths,s,n),e}if((0,r.aW)(t)){const e=(0,i.d9)(t);return this._scalePath(e.points,s,n),e}if((0,r.wp)(t))return t;t=this._inputGeometries.next()}return null}_scaleMultipath(t,e,s){if(t)for(const i of t)this._scalePath(i,e,s)}_scalePath(t,e,s){if(t)for(const i of t){const t=(i[0]-e)*this._xFactor,r=(i[1]-s)*this._yFactor;i[0]=e+t,i[1]=s+r}}}class H{static local(){return null===H.instance&&(H.instance=new H),H.instance}execute(t,e,s,i){return new Y(t,e,s)}}H.instance=null;class Y{constructor(t,e,s){this._inputGeometries=t,this._height=(void 0!==e.amplitude?e.amplitude:2)*s,this._period=(void 0!==e.period?e.period:3)*s,this._style=e.waveform,this._height<=0&&(this._height=Math.abs(this._height)),this._period<=0&&(this._period=Math.abs(this._period)),this._pattern=new b,this._pattern.addValue(this._period),this._pattern.addValue(this._period),this._walker=new C,this._walker.updateTolerance(s)}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._height||0===this._period)return t;if((0,r.l9)(t)){const e=this._processGeom(t.paths);if(e.length)return{paths:e}}if((0,r.oU)(t)){const e=this._processGeom(t.rings);if(e.length)return{rings:e}}t=this._inputGeometries.next()}return null}_processGeom(t){const e=[];for(const s of t)if(this._walker.init(s,this._pattern))switch(this._style){case h.zQ.Sinus:default:e.push(this._constructCurve(s,!1));break;case h.zQ.Square:e.push(this._constructSquare(s));break;case h.zQ.Triangle:e.push(this._constructTriangle(s));break;case h.zQ.Random:e.push(this._constructCurve(s,!0))}else e.push(s);return e}_constructCurve(t,e){const s=new c,i=this._walker.calculatePathLength(t);let r=Math.round(i/this._period);0===r&&(r=1);const n=16*r+1,o=i/r,a=this._period/16,h=1/n,l=2*Math.PI*i/o,u=2*Math.PI*Math.random(),f=2*Math.PI*Math.random(),_=2*Math.PI*Math.random(),d=.75-Math.random()/2,m=.75-Math.random()/2,p={};this._walker.curPointAndAngle(p),s.startPath(p.pt);let g=0;for(;;){if(!this._walker.nextPointAndAngle(a,p)){s.lineTo(t[t.length-1]);break}{const t=g;let i;if(g+=h,e){const e=this._height/2*(1+.3*Math.sin(d*l*t+u));i=e*Math.sin(l*t+f),i+=e*Math.sin(m*l*t+_),i/=2}else i=.5*this._height*Math.sin(.5*l*t);s.lineTo([p.pt[0]-i*p.sa,p.pt[1]+i*p.ca])}}return s.path()}_constructSquare(t){const e=new c,s=this._walker.calculatePathLength(t);Math.round(s/this._period);let i=!0;for(;;){let t=!1;if(this._walker.curPositionIsValid()){const s={};this._walker.curPointAndAngle(s);const r={};if(this._walker.nextPointAndAngle(this._period,r)){const n={};this._walker.nextPointAndAngle(this._period,n)&&(i?(e.startPath(s.pt),i=!1):e.lineTo(s.pt),e.lineTo([s.pt[0]-this._height/2*s.sa,s.pt[1]+this._height/2*s.ca]),e.lineTo([r.pt[0]-this._height/2*r.sa,r.pt[1]+this._height/2*r.ca]),e.lineTo([r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca]),e.lineTo([n.pt[0]+this._height/2*n.sa,n.pt[1]-this._height/2*n.ca]),t=!0)}}if(!t){e.lineTo(this._walker.getPathEnd());break}}return e.path()}_constructTriangle(t){const e=new c,s=this._walker.calculatePathLength(t);Math.round(s/this._period);let i=!0;for(;;){let t=!1;if(this._walker.curPositionIsValid()){const s={};this._walker.curPointAndAngle(s);const r={};if(this._walker.nextPointAndAngle(this._period/2,r)){const n={};this._walker.nextPointAndAngle(this._period,n)&&(this._walker.nextPosition(this._period/2)&&(i?(e.startPath(s.pt),i=!1):e.lineTo(s.pt),e.lineTo([r.pt[0]-this._height/2*r.sa,r.pt[1]+this._height/2*r.ca]),e.lineTo([n.pt[0]+this._height/2*n.sa,n.pt[1]-this._height/2*n.ca])),t=!0)}}if(!t){e.lineTo(this._walker.getPathEnd());break}}return e.path()}}class J{static local(){return null===J.instance&&(J.instance=new J),J.instance}execute(t,e,s,i){return new Z(t,e,s)}}J.instance=null;class Z extends n.v1{constructor(t,e,s){var i;super(t,!0,!0),this._geometryWalker=new C,this._geometryWalker.updateTolerance(s),this._angleToLine=null==(i=e.angleToLine)||i,this._offset=(e.offset?e.offset:0)*s,this._originalEndings=e.endings,this._offsetAtEnd=(e.customEndingOffset?e.customEndingOffset:0)*s,this._position=-(e.offsetAlongLine?e.offsetAlongLine:0)*s,this._pattern=new b,this._pattern.init(e.placementTemplate,!1),this._pattern.scale(s),this._endings=this._originalEndings}processPath(t){if(this._pattern.isEmpty())return null;let e;if(this.iteratePath)e=this._pattern.nextValue();else{this._originalEndings===h.JS.WithFullGap&&this.isClosed?this._endings=h.JS.WithMarkers:this._endings=this._originalEndings,this._pattern.extPtGap=0;let s,i=!0;switch(this._endings){case h.JS.NoConstraint:s=-this._position,s=this._adjustPosition(s),i=!1;break;case h.JS.WithHalfGap:default:s=-this._pattern.lastValue()/2;break;case h.JS.WithFullGap:s=-this._pattern.lastValue(),this._pattern.extPtGap=this._pattern.lastValue();break;case h.JS.WithMarkers:s=0;break;case h.JS.Custom:s=-this._position,s=this._adjustPosition(s),this._pattern.extPtGap=.5*this._offsetAtEnd}if(!this._geometryWalker.init(t,this._pattern,i))return null;this._pattern.reset();let r=0;for(;s>r;)s-=r,r=this._pattern.nextValue();r-=s,e=r,this.iteratePath=!0}const s={};return this._geometryWalker.nextPointAndAngle(e,s)?this._endings===h.JS.WithFullGap&&this._geometryWalker.isPathEnd()?(this.iteratePath=!1,null):this._endings===h.JS.WithMarkers&&this._geometryWalker.isPathEnd()&&(this.iteratePath=!1,this.isClosed)?null:(this.internalPlacement.setTranslate(s.pt[0]-this._offset*s.sa,s.pt[1]+this._offset*s.ca),this._angleToLine&&this.internalPlacement.setRotateCS(s.ca,s.sa),this.internalPlacement):(this.iteratePath=!1,null)}_adjustPosition(t){let e=t/this._pattern.length();return e-=Math.floor(e),e*this._pattern.length()}}class q{static local(){return null===q.instance&&(q.instance=new q),q.instance}execute(t,e,s,i){return new K(t,e,s)}}q.instance=null;class K extends n.v1{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new u,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*s:0,this._type=e.extremityPlacement,this._position=void 0!==e.offsetAlongLine?e.offsetAlongLine*s:0,this._beginProcessed=!1}processPath(t){let e;switch(this._type){case h.Tx.Both:default:this._beginProcessed?(e=this._atExtremities(t,this._position,!1),this._beginProcessed=!1,this.iteratePath=!1):(e=this._atExtremities(t,this._position,!0),this._beginProcessed=!0,this.iteratePath=!0);break;case h.Tx.JustBegin:e=this._atExtremities(t,this._position,!0);break;case h.Tx.JustEnd:e=this._atExtremities(t,this._position,!1);case h.Tx.None:}return e}_atExtremities(t,e,s){const i=t.length;if(i<2)return null;const r=s?1:i-2,o=s?i:-1,a=s?1:-1;let h,l=0,c=s?t[0]:t[i-1];for(let s=r;s!==o;s+=a){h=c,c=t[s];const i=this._curveHelper.calculateLength(h,c);if(l+i>e){const t=(e-l)/i,[s,r]=this._curveHelper.getAngleCS(h,c,t),o=(0,n.XV)(h,c,t);return this.internalPlacement.setTranslate(o[0]-this._offset*r,o[1]+this._offset*s),this._angleToLine&&this.internalPlacement.setRotateCS(-s,-r),this.internalPlacement}l+=i}return null}}class ${static local(){return null===$.instance&&($.instance=new $),$.instance}execute(t,e,s,i){return new j(t,e,s)}}$.instance=null;class j extends n.v1{constructor(t,e,s){super(t,!0,!0),this._walker=new C,this._walker.updateTolerance(s),this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*s:0,this._beginGap=void 0!==e.beginPosition?e.beginPosition*s:0,this._endGap=void 0!==e.endPosition?e.endPosition*s:0,this._flipFirst=void 0===e.flipFirst||e.flipFirst,this._pattern=new b,this._pattern.init(e.positionArray,!1,!1),this._subPathLen=0,this._posCount=this._pattern.size(),this._isFirst=!0,this._prevPos=0}processPath(t){if(this._pattern.isEmpty())return null;let e;if(this.iteratePath){const t=this._pattern.nextValue()*this._subPathLen,s=this._beginGap+t;e=s-this._prevPos,this._prevPos=s}else{if(this._posCount=this._pattern.size(),this._isFirst=!0,this._prevPos=0,this._subPathLen=this._walker.calculatePathLength(t)-this._beginGap-this._endGap,this._subPathLen<0)return this.iteratePath=!1,null;if(!this._walker.init(t,this._pattern,!1))return null;this._pattern.reset();const s=this._pattern.nextValue()*this._subPathLen,i=this._beginGap+s;e=i-this._prevPos,this._prevPos=i,this.iteratePath=!0}const s={};if(!this._walker.nextPointAndAngle(e,s,S.END))return this.iteratePath=!1,null;this.internalPlacement.setTranslate(s.pt[0]-this._offset*s.sa,s.pt[1]+this._offset*s.ca);const i=this._isFirst&&this._flipFirst;let r,n;return this._angleToLine?(r=s.ca,n=s.sa):(r=1,n=0),i&&(r=-r,n=-n),this.internalPlacement.setRotateCS(r,n),this._isFirst=!1,this._posCount--,0===this._posCount&&(this.iteratePath=!1),this.internalPlacement}}var Q=s(31936);class tt{static local(){return null===tt.instance&&(tt.instance=new tt),tt.instance}execute(t,e,s,i){return new et(t,e,s,i)}}tt.instance=null;class et{constructor(t,e,s,i){if(this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,this._currentX=0,this._currentY=0,this._stepX=(void 0!==e.stepX?Math.abs(e.stepX):16)*s,this._stepY=(void 0!==e.stepY?Math.abs(e.stepY):16)*s,0!==this._stepX&&0!==this._stepY&&t&&function(t){return void 0!==t.rings}(t)&&t.rings){if(this._gridType=void 0!==e.gridType?e.gridType:h.bj.Fixed,this._gridType===h.bj.Random)this._randomness=void 0!==e.randomness?e.randomness/100:1,this._gridAngle=0,this._shiftOddRows=!1,this._cosAngle=1,this._sinAngle=0,this._offsetX=0,this._offsetY=0;else{if(this._randomness=0,this._gridAngle=void 0!==e.gridAngle?e.gridAngle:0,this._shiftOddRows=void 0!==e.shiftOddRows&&e.shiftOddRows,this._offsetX=void 0!==e.offsetX?e.offsetX*s:0,this._offsetY=void 0!==e.offsetY?e.offsetY*s:0,this._cosAngle=Math.cos(this._gridAngle/180*Math.PI),this._sinAngle=-Math.sin(this._gridAngle/180*Math.PI),this._stepX)if(this._offsetX<0)for(;this._offsetX<-.5*this._stepX;)this._offsetX+=this._stepX;else for(;this._offsetX>=.5*this._stepX;)this._offsetX-=this._stepX;if(this._stepY)if(this._offsetY<0)for(;this._offsetY<-.5*this._stepY;)this._offsetY+=this._stepY;else for(;this._offsetY>=.5*this._stepY;)this._offsetY-=this._stepY}this._graphicOriginX=0,this._graphicOriginY=0,this._internalPlacement=new Q.u,this._calculateMinMax(t),this._geometry=t}}next(){return this._geometry?this._nextInside():null}_calculateMinMax(t){let e,s,i,r,n,o,a,h;this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,n=o=Number.MAX_VALUE,a=h=-Number.MAX_VALUE;for(const l of t.rings){const t=l?l.length:0;for(let c=0;c<t;++c)e=l[c][0]-this._graphicOriginX-this._offsetX,s=l[c][1]-this._graphicOriginY-this._offsetY,i=this._cosAngle*e-this._sinAngle*s,r=this._sinAngle*e+this._cosAngle*s,n=Math.min(n,i),a=Math.max(a,i),o=Math.min(o,r),h=Math.max(h,r)}n+=this._graphicOriginX,a+=this._graphicOriginX,o+=this._graphicOriginY,h+=this._graphicOriginY,this._xMin=Math.round(n/this._stepX),this._xMax=Math.round(a/this._stepX),this._yMin=Math.round(o/this._stepY),this._yMax=Math.round(h/this._stepY),this._currentX=this._xMax+1,this._currentY=this._yMin-1}_nextInside(){for(;;){if(this._currentX>this._xMax){if(this._currentY++,this._currentY>this._yMax)return null;this._currentX=this._xMin,this._shiftOddRows&&this._currentY%2&&this._currentX--}let t=this._currentX*this._stepX+this._offsetX;this._shiftOddRows&&this._currentY%2&&(t+=.5*this._stepX);const e=this._currentY*this._stepY+this._offsetY;let s,i;return this._currentX++,this._gridType===h.bj.Random?(s=this._graphicOriginX+t+this._stepX*this._randomness*(.5-Math.random())*2/3,i=this._graphicOriginY+e+this._stepY*this._randomness*(.5-Math.random())*2/3):(s=this._graphicOriginX+this._cosAngle*t+this._sinAngle*e,i=this._graphicOriginY-this._sinAngle*t+this._cosAngle*e),this._internalPlacement.setTranslate(s,i),this._internalPlacement}}}class st{static local(){return null===st.instance&&(st.instance=new st),st.instance}execute(t,e,s,i){return new it(t,e,s)}}st.instance=null;class it extends n.v1{constructor(t,e,s){super(t,!0,!0),this._curveHelper=new u,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*s:0,this._relativeTo=e.relativeTo,this._position=void 0!==e.startPointOffset?e.startPointOffset*s:0,this._epsilon=.001*s}processPath(t){const e=this._position;if(this._relativeTo===h.CS.SegmentMidpoint){for(this.iteratePath||(this._segmentCount=t.length,this._curSegment=1,this.iteratePath=!0);this._curSegment<this._segmentCount;){const e=this._curSegment;this._curSegment++;const s=t[e-1],i=t[e],r=this._curveHelper.calculateLength(s,i);if(r<this._epsilon)continue;const o=.5+this._position/r,[a,h]=this._curveHelper.getAngleCS(s,i,o),l=(0,n.XV)(s,i,o);return this.internalPlacement.setTranslate(l[0]-this._offset*h,l[1]+this._offset*a),this._angleToLine&&this.internalPlacement.setRotateCS(a,h),this.internalPlacement}return this.iteratePath=!1,null}this._relativeTo===h.CS.LineEnd&&(0,n.hh)(t);const s=this.onLine(t,e);return this._relativeTo===h.CS.LineEnd&&(0,n.hh)(t),s}onLine(t,e){let s,i=!1;switch(this._relativeTo){case h.CS.LineMiddle:default:s=this._curveHelper.calculatePathLength(t)/2+e;break;case h.CS.LineBeginning:s=e;break;case h.CS.LineEnd:s=e,i=!0}const r=t.length;let o,a=0,l=t[0];for(let e=1;e<r;++e){o=l,l=t[e];const r=this._curveHelper.calculateLength(o,l);if(a+r>s){const t=(s-a)/r,[e,h]=this._curveHelper.getAngleCS(o,l,t),c=(0,n.XV)(o,l,t),u=i?this._offset:-this._offset;return this.internalPlacement.setTranslate(c[0]-u*h,c[1]+u*e),this._angleToLine&&(i?this.internalPlacement.setRotateCS(-e,-h):this.internalPlacement.setRotateCS(e,h)),this.internalPlacement}a+=r}return null}}class rt{static local(){return null===rt.instance&&(rt.instance=new rt),rt.instance}execute(t,e,s,i){return new nt(t,e,s)}}rt.instance=null;class nt extends n.v1{constructor(t,e,s){super(t,!0,!0),this._curveHelper=new u,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*s:0,this._endPoints=void 0===e.placeOnEndPoints||e.placeOnEndPoints,this._controlPoints=void 0===e.placeOnControlPoints||e.placeOnControlPoints,this._regularVertices=void 0===e.placeOnRegularVertices||e.placeOnRegularVertices,this._tags=[],this._tagIterator=0}processPath(t){if(this.iteratePath||(this._preparePath(t),this.iteratePath=!0),this._tagIterator>=this._tags.length)return this._tags.length=0,this._tagIterator=0,this.iteratePath=!1,null;const e=this._tags[this._tagIterator];this._angleToLine&&this.internalPlacement.setRotate(e[2]);let s=e[0],i=e[1];if(0!==this._offset){const t=Math.cos(e[2]),r=Math.sin(e[2]);s-=this._offset*r,i+=this._offset*t}return this.internalPlacement.setTranslate(s,i),this._tagIterator++,this.internalPlacement}_preparePath(t){this._tags.length=0,this._tagIterator=0;const e=(0,n.QK)(t),s=t.length-1;let i,r,o=0,a=0,h=0,l=0,c=0;for(;o<s;){o++,i=t[o-1],r=t[o];const u=(0,n.zv)(i),f=(0,n.zv)(r);(this._angleToLine||0!==this._offset)&&(l=this._curveHelper.getAngle(i,r,0)),1===o?e?(a=l,h=u):(this._endPoints||this._controlPoints&&1===u)&&this._tags.push([i[0],i[1],l]):1===u?this._controlPoints&&this._tags.push([i[0],i[1],ot(c,l)]):this._regularVertices&&this._tags.push([i[0],i[1],ot(c,l)]),(this._angleToLine||0!==this._offset)&&(c=this._curveHelper.getAngle(i,r,1)),o===s&&(e?1===f||1===h?this._controlPoints&&this._tags.push([r[0],r[1],ot(c,a)]):this._regularVertices&&this._tags.push([r[0],r[1],ot(c,a)]):(this._endPoints||this._controlPoints&&1===f)&&this._tags.push([r[0],r[1],c]))}this._tagIterator=0}}function ot(t,e){const s=Math.PI;for(;Math.abs(e-t)>s+2e-15;)e-t>s?e-=2*s:e+=2*s;return(t+e)/2}class at{static local(){return null===at.instance&&(at.instance=new at),at.instance}execute(t,e,s,i){return new ht(t,e,s)}}at.instance=null;class ht{constructor(t,e,s){this._geometry=t,this._offsetX=void 0!==e.offsetX?e.offsetX*s:0,this._offsetY=void 0!==e.offsetY?e.offsetY*s:0,this._method=void 0!==e.method?e.method:h.Lh.OnPolygon,this._internalPlacement=new Q.u}next(){const t=this._geometry;return this._geometry=null,t&&function(t){return void 0!==t.rings}(t)?this._polygonCenter(t):null}_polygonCenter(t){let e=!1;switch(this._method){case h.Lh.OnPolygon:default:case h.Lh.CenterOfMass:case h.Lh.BoundingBoxCenter:{const s=(0,V.Ue)();(0,B.$P)(s,t),this._internalPlacement.setTranslate((s[2]+s[0])/2+this._offsetX,(s[3]+s[1])/2-this._offsetY),e=!0;break}}return e?this._internalPlacement:null}}function lt(t){if(!t)return null;switch(t.type){case"CIMGeometricEffectAddControlPoints":return o.local();case"CIMGeometricEffectArrow":return d.local();case"CIMGeometricEffectBuffer":return p.local();case"CIMGeometricEffectControlMeasureLine":return y.local();case"CIMGeometricEffectCut":return v.local();case"CIMGeometricEffectDashes":return L.local();case"CIMGeometricEffectDonut":return k.local();case"CIMGeometricEffectJog":return z.local();case"CIMGeometricEffectMove":return A.local();case"CIMGeometricEffectOffset":return R.local();case"CIMGeometricEffectReverse":return N.local();case"CIMGeometricEffectRotate":return G.local();case"CIMGeometricEffectScale":return X.local();case"CIMGeometricEffectWave":return H.local()}return null}function ct(t){if(!t)return null;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":return J.local();case"CIMMarkerPlacementAtExtremities":return q.local();case"CIMMarkerPlacementAtRatioPositions":return $.local();case"CIMMarkerPlacementInsidePolygon":return tt.local();case"CIMMarkerPlacementOnLine":return st.local();case"CIMMarkerPlacementOnVertices":return rt.local();case"CIMMarkerPlacementPolygonCenter":return at.local()}return null}},31936:(t,e,s)=>{s.d(e,{u:()=>i});class i{constructor(){this.setIdentity()}getAngle(){return(null==this.rz||0===this.rz&&1!==this.rz_c&&0!==this.rz_s)&&(this.rz=Math.atan2(this.rz_s,this.rz_c)),this.rz}setIdentity(){this.tx=0,this.ty=0,this.tz=0,this.s=1,this.rx=0,this.ry=0,this.rz=0,this.rz_c=1,this.rz_s=0}setTranslate(t,e){this.tx=t,this.ty=e}setTranslateZ(t){this.tz=t}setRotateCS(t,e){this.rz=void 0,this.rz_c=t,this.rz_s=e}setRotate(t){this.rz=t,this.rz_c=void 0,this.rz_s=void 0}setRotateY(t){this.ry=t}setScale(t){this.s=t}setMeasure(t){this.m=t}}},24562:(t,e,s)=>{s.d(e,{B$:()=>W,E0:()=>V});var i=s(22303),r=s(83798),n=(s(72542),s(22974)),o=s(92604),a=s(22021),h=s(62357),l=s(24470),c=s(20322),u=s(31936),f=s(70586),_=s(71143),d=s(33955),m=s(21793),p=s(61741),g=s(3172),y=s(20102),x=s(95330);class v{constructor(){this._resourceMap=new Map,this._inFlightResourceMap=new Map,this.geometryEngine=null}destroy(){this._inFlightResourceMap.clear(),this._resourceMap.clear()}getResource(t){var e;return null!=(e=this._resourceMap.get(t))?e:null}async fetchResource(t,e){const s={width:0,height:0},i=this._resourceMap,r=i.get(t);if(r)return s.width=r.width,s.height=r.height,s;let n=this._inFlightResourceMap.get(t);return n||(n=function(t,e){if(t.includes(";base64,")){const e=new Image;return e.src=t,e.decode().then((()=>({ok:!0,value:e}))).catch((e=>(0,x.D_)(e)?{ok:!1,error:e}:{ok:!1,error:new y.Z("invalid-resource",`Could not fetch requested resource at ${t}`)}))}return(0,g.default)(t,{responseType:"image",...e}).then((t=>({ok:!0,value:t.data}))).catch((e=>(0,x.D_)(e)?{ok:!1,error:e}:{ok:!1,error:new y.Z("invalid-resource",`Could not fetch requested resource at ${t}`)}))}(t,e),this._inFlightResourceMap.set(t,n),n=n.then((e=>{if(this._inFlightResourceMap.delete(t),e.ok){i.set(t,e.value);const r=e.value;return s.width=r.width,s.height=r.height,s}return s})),n)}deleteResource(t){this._inFlightResourceMap.delete(t),this._resourceMap.delete(t)}}var M=s(95648),b=s(34240);class S{constructor(){}rasterizeText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const s=this._textRasterizationCanvas,i=s.getContext("2d");this._setFontProperties(i,e),this.parameters=e,this.textLines=t.split(/\r?\n/),this.lineHeight=this._computeLineHeight();const r=this._computeTextWidth(i,e),{decoration:n,weight:o}=e.font;this.lineThroughWidthOffset=n&&"line-through"===n?.1*this.lineHeight:0;const a=this.lineHeight*this.textLines.length;s.width=r+2*this.lineThroughWidthOffset,s.height=a,this.renderedLineHeight=Math.round(this.lineHeight*e.pixelRatio),this.renderedHaloSize=e.halo.size*e.pixelRatio,this.renderedWidth=r*e.pixelRatio,this.renderedHeight=a*e.pixelRatio,this.lineThroughWidthOffset*=e.pixelRatio,this.fillStyle=function(t){return`rgba(${t.slice(0,3).toString()},${t[3]})`}(e.color),this.haloStyle=function(t){return`rgb(${t.slice(0,3).toString()})`}(e.halo.color);const h=this.renderedLineHeight,l=this.renderedHaloSize;this._setFontProperties(i,e);const c=function(t,e){return"center"===t?.5*e:"right"===t?e:0}(i.textAlign,this.renderedWidth)+l,u=l,f=l>0;let _=this.lineThroughWidthOffset,d=0;f&&this._renderHalo(i,c,u,_,d,e),d+=u,_+=c;for(const t of this.textLines)i.globalCompositeOperation="destination-out",i.fillStyle="rgb(0, 0, 0)",i.fillText(t,_,d),i.globalCompositeOperation="source-over",i.fillStyle=this.fillStyle,i.fillText(t,_,d),n&&"none"!==n&&this._renderDecoration(i,_,d,n,o),d+=h;const m=this.renderedWidth+2*this.lineThroughWidthOffset,p=this.renderedHeight,g=i.getImageData(0,0,m,p),y=new Uint8Array(g.data);if(e.premultiplyColors){let t;for(let e=0;e<y.length;e+=4)t=y[e+3]/255,y[e]=y[e]*t,y[e+1]=y[e+1]*t,y[e+2]=y[e+2]*t}return{size:[m,p],image:new Uint32Array(y.buffer),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0}}_renderHalo(t,e,s,i,r,n){const o=this.renderedWidth,a=this.renderedHeight;this._haloRasterizationCanvas||(this._haloRasterizationCanvas=document.createElement("canvas")),this._haloRasterizationCanvas.width=o,this._haloRasterizationCanvas.height=a;const h=this._haloRasterizationCanvas,l=h.getContext("2d");l.clearRect(0,0,o,a),this._setFontProperties(l,n);const{decoration:c,weight:u}=n.font;l.fillStyle=this.haloStyle,l.strokeStyle=this.haloStyle;const f=this.renderedHaloSize<3;l.lineJoin=f?"miter":"round",f?this._renderHaloEmulated(l,e,s,c,u):this._renderHaloNative(l,e,s,c,u),t.globalAlpha=this.parameters.halo.color[3],t.drawImage(h,0,0,o,a,i,r,o,a),t.globalAlpha=1}_renderHaloEmulated(t,e,s,i,r){const n=this.renderedLineHeight,o=this.renderedHaloSize;for(const a of this.textLines){for(const[i,r]of P)t.fillText(a,e+o*i,s+o*r);i&&"none"!==i&&this._renderDecoration(t,e,s,i,r),s+=n}}_renderHaloNative(t,e,s,i,r){const n=this.renderedLineHeight,o=this.renderedHaloSize;for(const a of this.textLines){const h=2*o,l=5,c=.1;for(let n=0;n<l;n++){const o=1-(l-1)*c+n*c;t.lineWidth=o*h,t.strokeText(a,e,s),i&&"none"!==i&&this._renderDecoration(t,e,s,i,r)}s+=n}}_setFontProperties(t,e){const s=e.font,i=`${s.style} ${s.weight} ${(0,h.F2)(e.size*e.pixelRatio)}px ${s.family}, sans-serif`;let r;switch(t.font=i,t.textBaseline="top",e.horizontalAlignment){case"left":default:r="left";break;case"right":r="right";break;case"center":r="center"}t.textAlign=r}computeTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const s=this._textRasterizationCanvas,i=s.getContext("2d");this._setFontProperties(i,e),this.parameters=e,this.textLines=t.split(/\r?\n/),this.lineHeight=this._computeLineHeight();const r=this._computeTextWidth(i,e),n=this.lineHeight*this.textLines.length;return s.width=r,s.height=n,[r*e.pixelRatio,n*e.pixelRatio]}_computeTextWidth(t,e){let s=0;for(const e of this.textLines)s=Math.max(s,t.measureText(e).width);const i=e.font;return("italic"===i.style||"oblique"===i.style||"string"==typeof i.weight&&("bold"===i.weight||"bolder"===i.weight)||"number"==typeof i.weight&&i.weight>600)&&(s+=.3*t.measureText("w").width),s+=2*this.parameters.halo.size,Math.round(s)}_computeLineHeight(){let t=1.275*this.parameters.size;const e=this.parameters.font.decoration;return e&&"underline"===e&&(t*=1.3),Math.round(t+2*this.parameters.halo.size)}_renderDecoration(t,e,s,i,r){const n=.9*this.lineHeight,o="bold"===r?.06:"bolder"===r?.09:.04;switch(t.textAlign){case"center":e-=this.renderedWidth/2;break;case"right":e-=this.renderedWidth}const a=t.textBaseline;if("underline"===i)switch(a){case"top":s+=n;break;case"middle":s+=n/2}else if("line-through"===i)switch(a){case"top":s+=n/1.5;break;case"middle":s+=n/3}t.save(),t.beginPath(),t.strokeStyle=t.fillStyle,t.lineWidth=Math.ceil(n*o),t.moveTo(e-this.lineThroughWidthOffset,s),t.lineTo(e+this.renderedWidth+2*this.lineThroughWidthOffset,s),t.stroke(),t.restore()}}const P=[];{const t=16;for(let e=0;e<360;e+=360/t)P.push([Math.cos(Math.PI*e/180),Math.sin(Math.PI*e/180)])}s(30729),s(16534),s(58195);const w=Math.PI/180,C=o.Z.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class L{constructor(t){this._t=t}static createIdentity(){return new L([1,0,0,0,1,0])}clone(){const t=this._t;return new L(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new L([t,0,0,0,e,0])}scale(t,e){const s=this._t;return s[0]*=t,s[1]*=t,s[2]*=t,s[3]*=e,s[4]*=e,s[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new L([0,0,t,0,0,e])}translate(t,e){const s=this._t;return s[2]+=t,s[5]+=e,this}static createRotate(t){const e=Math.cos(t),s=Math.sin(t);return new L([e,-s,0,s,e,0])}rotate(t){return L.multiply(this,L.createRotate(t),this)}static multiply(t,e,s){const i=t._t,r=e._t,n=i[0]*r[0]+i[3]*r[1],o=i[1]*r[0]+i[4]*r[1],a=i[2]*r[0]+i[5]*r[1]+r[2],h=i[0]*r[3]+i[3]*r[4],l=i[1]*r[3]+i[4]*r[4],c=i[2]*r[3]+i[5]*r[4]+r[5],u=s._t;return u[0]=n,u[1]=o,u[2]=a,u[3]=h,u[4]=l,u[5]=c,s}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new L([0,0,0,0,0,0]);e=1/e;const s=(t[1]*t[5]-t[2]*t[4])*e,i=(t[2]*t[3]-t[0]*t[5])*e,r=t[4]*e,n=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new L([r,n,s,o,a,i])}}class I{constructor(t,e){this._transfos=[],this._sizeTransfos=[],this._geomUnitsPerPoint=1,this._flippedYs=!1,this._placementPool=new _.Z(u.u,null,null,100),this._earlyReturn=!1,this._mapRotation=0,this._resourceManager=t||new v,this._transfos.push(e||L.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1)}setTransform(t,e){this._transfos=[t||L.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}setFlippedYs(t){this._flippedYs=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}flippedYs(){return!this.isEmbedded()&&this._flippedYs}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e){const s=e?t.scaleRatio():1;L.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*s)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1)}drawSymbol(t,e){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e)}}drawMultiLayerSymbol(t,e){if(!t)return;const s=t.symbolLayers;if(!s)return;const i=t.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(s,e),e=t.next()}}else this.drawSymbolLayers(s,e)}executeEffects(t,e){const s=this._resourceManager.geometryEngine;let i=new m.M(e);for(const e of t){const t=(0,p.h)(e);t&&(i=t.execute(i,e,this.geomUnitsPerPoint(),s,this.flippedYs()))}return i}drawSymbolLayers(t,e){let s=t.length;for(;s--;){const i=t[s];if(!i||!1===i.enable)continue;const r=i.effects;if(r&&r.length>0){const t=this.executeEffects(r,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(i,e),!this._earlyReturn););}}else this.drawSymbolLayer(i,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const s=this._buildHatchPolyline(e,t,this.geomUnitsPerPoint());s&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,s),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const s=t.markerPlacement;if(s){const i=(0,p.W)(s);if(i){const r="CIMMarkerPlacementInsidePolygon"===s.type;r&&this.pushClipPath(e);const n=i.execute(e,s,this.geomUnitsPerPoint(),this._resourceManager.geometryEngine);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}r&&this.popClipPath()}}else{const s=this._placementPool.acquire();if((0,d.wp)(e))s.tx=e.x,s.ty=e.y,this.drawMarker(t,s);else for(const i of e.points)if(s.tx=i[0],s.ty=i[1],this.drawMarker(t,s),this._earlyReturn)break;this._placementPool.release(s)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){var s,i,r,n,o;if(!t)return;const a=this._resourceManager.getResource(t.url),h=null!=(s=t.size)?s:10;if((0,f.Wi)(a)||h<=0)return;const l=a.width,c=a.height;if(!l||!c)return;const u=l/c,_=null!=(i=t.scaleX)?i:1,d=L.createIdentity(),m=t.anchorPoint;if(m){let e=m.x,s=m.y;"Absolute"!==t.anchorPointUnits&&(e*=h*u*_,s*=h),d.translate(-e,-s)}let p=null!=(r=t.rotation)?r:0;t.rotateClockwise&&(p=-p),this._mapRotation&&(p+=this._mapRotation),p&&d.rotate(p*w);let g=null!=(n=t.offsetX)?n:0,y=null!=(o=t.offsetY)?o:0;if(g||y){if(this._mapRotation){const t=w*this._mapRotation,e=Math.cos(t),s=Math.sin(t),i=g*s+y*e;g=g*e-y*s,y=i}d.translate(g,y)}const x=this.geomUnitsPerPoint();1!==x&&d.scale(x,x);const v=e.getAngle();v&&d.rotate(v),d.translate(e.tx,e.ty),this.push(d,!1),this.drawImage(t.url,h,t.scaleX),this.pop()}drawVectorMarker(t,e){var s,i,r,n;if(!t)return;const o=t.markerGraphics;if(!o)return;const a=null!=(s=t.size)?s:10,h=t.frame,l=h?h.ymax-h.ymin:0,c=a&&l?a/l:1,u=L.createIdentity();h&&u.translate(.5*-(h.xmax+h.xmin),.5*-(h.ymax+h.ymin));const f=t.anchorPoint;if(f){let e=f.x,s=f.y;"Absolute"!==t.anchorPointUnits?h&&(e*=h.xmax-h.xmin,s*=h.ymax-h.ymin):(e/=c,s/=c),u.translate(-e,-s)}1!==c&&u.scale(c,c);let _=null!=(i=t.rotation)?i:0;t.rotateClockwise&&(_=-_),this._mapRotation&&(_+=this._mapRotation),_&&u.rotate(_*w);let d=null!=(r=t.offsetX)?r:0,m=null!=(n=t.offsetY)?n:0;if(d||m){if(this._mapRotation){const t=w*this._mapRotation,e=Math.cos(t),s=Math.sin(t),i=d*s+m*e;d=d*e-m*s,m=i}u.translate(d,m)}const p=this.geomUnitsPerPoint();1!==p&&u.scale(p,p);const g=e.getAngle();g&&u.rotate(g),u.translate(e.tx,e.ty),this.push(u,t.scaleSymbolsProportionally);for(const t of o)if(t&&t.symbol&&t.geometry||C.error("Invalid marker graphic",t),this.drawSymbol(t.symbol,t.geometry),this._earlyReturn)break;this.pop()}drawTextSymbol(t,e){var s,i,r,n;if(!t)return;if(!(0,d.wp)(e))return;if((null!=(s=t.height)?s:10)<=0)return;const o=L.createIdentity();let a=null!=(i=t.angle)?i:0;a=-a,a&&o.rotate(a*w);const h=null!=(r=t.offsetX)?r:0,l=null!=(n=t.offsetY)?n:0;(h||l)&&o.translate(h,l);const c=this.geomUnitsPerPoint();1!==c&&o.scale(c,c),o.translate(e.x,e.y),this.push(o,!1),this.drawText(t),this.pop()}_buildHatchPolyline(t,e,s){let i=(void 0!==t.separation?t.separation:4)*s,r=void 0!==t.rotation?t.rotation:0;if(0===i)return null;i<0&&(i=-i);let n=0;const o=.5*i;for(;n>o;)n-=i;for(;n<-o;)n+=i;const a=(0,l.Ue)();(0,c.$P)(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const h=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;r>180;)r-=180;for(;r<0;)r+=180;const u=Math.cos(r*w),f=Math.sin(r*w),_=-i*f,d=i*u;let m,p,g,y;n=(void 0!==t.offsetX?t.offsetX*s:0)*f-(void 0!==t.offsetY?t.offsetY*s:0)*u,m=g=Number.MAX_VALUE,p=y=-Number.MAX_VALUE;for(const t of h){const e=t[0],s=t[1],i=u*e+f*s,r=-f*e+u*s;m=Math.min(m,i),g=Math.min(g,r),p=Math.max(p,i),y=Math.max(y,r)}g=Math.floor(g/i)*i;let x=u*m-f*g-_*n/i,v=f*m+u*g-d*n/i,M=u*p-f*g-_*n/i,b=f*p+u*g-d*n/i;const S=1+Math.round((y-g)/i),P=[];for(let t=0;t<S;t++)x+=_,v+=d,M+=_,b+=d,P.push([[x,v],[M,b]]);return{paths:P}}}class k extends I{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new b.Z(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return(0,l.al)(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if((0,d.oU)(t))this._processPath(t.rings,0);else if((0,d.l9)(t))this._processPath(t.paths,0);else if((0,d.YX)(t)){const e=z(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,s){if(!t||this._clipCount>0)return;const i=.5*this.transformSize(s);if((0,d.oU)(t))this._processPath(t.rings,i);else if((0,d.l9)(t))this._processPath(t.paths,i);else if((0,d.YX)(t)){const e=z(t);e&&this._processPath(e.rings,i)}else console.error("drawSolidStroke unexpected geometry type!")}pushClipPath(t){this.drawSolidFill(t),++this._clipCount}popClipPath(){--this._clipCount}drawImage(t,e,s){let i=s*e,r=e;const n=this._resourceManager.getResource(t);!e&&(0,f.pC)(n)&&(i=s*n.width,r=n.height),this._merge(this.transformPt([-i/2,-r/2]),0),this._merge(this.transformPt([-i/2,r/2]),0),this._merge(this.transformPt([i/2,-r/2]),0),this._merge(this.transformPt([i/2,r/2]),0)}drawText(t){this._textRasterizer||(this._textRasterizer=new S)}_processPath(t,e){if(t)for(const s of t){const t=s?s.length:0;if(t>1){this._merge(this.transformPt(s[0]),e);for(let i=1;i<t;++i)this._merge(this.transformPt(s[i]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class T extends I{constructor(t,e,s){super(e,s),this._ctx=t}drawSolidFill(t,e){if(!t)return;if((0,d.oU)(t))this._buildPath(t.rings,!0);else if((0,d.l9)(t))this._buildPath(t.paths,!0);else if((0,d.YX)(t))this._buildPath(z(t).rings,!0);else{if(!(0,d.aW)(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const s=this._ctx;s.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+e[3]/255+")",s.fill("evenodd")}drawSolidStroke(t,e,s,i,r,n){if(!t||!e||0===s)return;if((0,d.oU)(t))this._buildPath(t.rings,!0);else if((0,d.l9)(t))this._buildPath(t.paths,!1);else{if(!(0,d.YX)(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(z(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+e[3]/255+")",o.lineWidth=this.transformSize(s)+.5,this._setCapStyle(i),this._setJoinStyle(r),o.miterLimit=n,o.stroke()}pushClipPath(t){if(this._ctx.save(),(0,d.oU)(t))this._buildPath(t.rings,!0);else if((0,d.l9)(t))this._buildPath(t.paths,!0);else{if(!(0,d.YX)(t))return;this._buildPath(z(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e,s){const i=this._resourceManager.getResource(t);if((0,f.Wi)(i))return;const r=this._ctx,n=r.canvas.width,o=r.canvas.height;let a=e*s*(i.width/i.height),h=s*e;e||(a=s*i.width,h=s*i.height),this._ctx.drawImage(i,0,0,i.width,i.height,0,0,Math.min(this.transformSize(a),n),Math.min(this.transformSize(h),o))}drawText(t){this._textRasterizer||(this._textRasterizer=new S)}_buildPath(t,e){const s=this._ctx;if(s.beginPath(),t)for(const i of t){const t=i?i.length:0;if(t>1){let r=this.transformPt(i[0]);s.moveTo(r[0],r[1]);for(let e=1;e<t;++e)r=this.transformPt(i[e]),s.lineTo(r[0],r[1]);e&&s.closePath()}}}_setCapStyle(t){switch(t){case M.kP.Butt:this._ctx.lineCap="butt";break;case M.kP.Round:this._ctx.lineCap="round";break;case M.kP.Square:this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case M.r4.Bevel:this._ctx.lineJoin="bevel";break;case M.r4.Round:this._ctx.lineJoin="round";break;case M.r4.Miter:this._ctx.lineJoin="miter"}}}const z=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null;var E=s(72233);s(31363);const A=Math.PI,F=A/2,R=96/72,O=(Math.PI,o.Z.getLogger("esri.symbols.cim.CIMSymbolHelper"));function N(t,e){switch(e.type){case"CIMSymbolReference":return N(t,e.symbol);case"CIMPointSymbol":{const s={x:0,y:0};t.drawSymbol(e,s);break}case"CIMLineSymbol":{const s={paths:[[[0,0],[0,1]]]};t.drawSymbol(e,s);break}case"CIMPolygonSymbol":{const s={rings:[[[0,0],[0,1],[0,0]]]};t.drawSymbol(e,s);break}case"CIMTextSymbol":{const s={x:0,y:0};t.drawSymbol(e,s);break}case"CIMVectorMarker":{const s=new u.u;t.drawMarker(e,s);break}}return t.envelope()}class W{static getEnvelope(t,e){const s=new k(e);if(Array.isArray(t)){let e;for(const i of t)e?e.union(N(s,i)):e=N(s,i);return e}return N(s,t)}static getTextureAnchor(t,e){const s=this.getEnvelope(t,e);if(!s)return[0,0,0];const i=(s.x+.5*s.width)*R,r=-(s.y+.5*s.height)*R,n=s.width*R+2,o=s.height*R+2;return[i/n,r/o,o]}static rasterize(t,e,s,i,r=!0){const n=s||this.getEnvelope(e,i);if(!n)return[null,0,0,0,0];const o=(n.x+.5*n.width)*R,a=(n.y+.5*n.height)*R;t.width=n.width*R,t.height=n.height*R,s||(t.width+=2,t.height+=2);const h=t.getContext("2d"),l=L.createScale(R,-R);l.translate(.5*t.width-o,.5*t.height+a);const c=new T(h,i,l);switch(e.type){case"CIMPointSymbol":{const t={type:"point",x:0,y:0};c.drawSymbol(e,t);break}case"CIMVectorMarker":{const t=new u.u;c.drawMarker(e,t);break}}const f=h.getImageData(0,0,t.width,t.height),_=new Uint8Array(f.data);if(r){let t;for(let e=0;e<_.length;e+=4)t=_[e+3]/255,_[e]=_[e]*t,_[e+1]=_[e+1]*t,_[e+2]=_[e+2]*t}return[_,t.width,t.height,-o/t.width,-a/t.height]}static fromTextSymbol(t){const{angle:e,color:s,font:i,haloColor:n,haloSize:o,horizontalAlignment:a,kerning:h,text:l,verticalAlignment:c,xoffset:u,yoffset:f}=t;let _,d,m,p,g;i&&(_=i.family,d=i.style,m=i.weight,p=i.size,g=i.decoration);let y=!1;return l&&(y=(0,r.E)(l)[1]),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",angle:e,blockProgression:M.zV.BTT,depth3D:1,extrapolateBaselines:!0,fontEffects:M.eZ.Normal,fontEncoding:M.DD.Unicode,fontFamilyName:_||"Arial",fontStyleName:H(d,m),fontType:M.Ky.Unspecified,haloSize:o,height:p,hinting:M.Dd.Default,horizontalAlignment:D(null!=a?a:"center"),kerning:h,letterWidth:100,ligatures:!0,lineGapType:"Multiple",offsetX:(0,E.NA)(u),offsetY:(0,E.NA)(f),strikethrough:"line-through"===g,underline:"underline"===g,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:U(s)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:U(n)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:y?M.UX.RTL:M.UX.LTR,verticalAlignment:X(null!=c?c:"baseline"),verticalGlyphOrientation:M.RS.Right,wordSpacing:100,billboardMode3D:M.UR.FaceNearPlane},textString:l}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(t){const{height:e,outline:s,width:i,xoffset:r,xscale:n,yoffset:o,yscale:a}=t,h=[],l={type:"CIMPolygonSymbol",symbolLayers:h};if(s){const{cap:t,join:e,miterLimit:i,width:r}=s;h.push({type:"CIMSolidStroke",color:U(s.color),capStyle:B(t),joinStyle:G(e),miterLimit:i,width:r})}let c=t.url;"esriPFS"===t.type&&t.imageData&&(c=t.imageData);const u="angle"in t?t.angle:0,f=i*(n||1),_=e*(a||1);return h.push({type:"CIMPictureFill",invertBackfaceTexture:!1,scaleX:1,textureFilter:M.Qb.Picture,tintColor:null,url:c,height:_,width:f,offsetX:(0,E.NA)(r),offsetY:(0,E.NA)(o),rotation:(0,E.NA)(-u),colorSubstitutions:null}),l}static fromSimpleFillSymbol(t){const{color:e,style:s,outline:i}=t,r=[],o={type:"CIMPolygonSymbol",symbolLayers:r};let h=null;if(i){const{cap:t,join:e,style:s}=i;"solid"!==s&&"none"!==s&&"esriSLSSolid"!==s&&"esriSLSNull"!==s&&(h=[{type:"CIMGeometricEffectDashes",dashTemplate:Z(s,t),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),r.push({type:"CIMSolidStroke",color:U(i.color),capStyle:B(t),joinStyle:G(e),miterLimit:i.miterLimit,width:i.width,effects:h})}if(s&&"solid"!==s&&"none"!==s&&"esriSFSSolid"!==s&&"esriSFSNull"!==s){const t={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:U(e),capStyle:M.kP.Butt,joinStyle:M.r4.Miter,width:.75}]};let i=0;const o=(0,a.fp)(Math.ceil(window.devicePixelRatio)),h=K(s)?8*o:10*o;switch(s){case"vertical":case"esriSFSVertical":i=90;break;case"forward-diagonal":case"esriSFSForwardDiagonal":case"diagonal-cross":case"esriSFSDiagonalCross":i=-45;break;case"backward-diagonal":case"esriSFSBackwardDiagonal":i=45;break;case"cross":case"esriSFSCross":i=0}r.push({type:"CIMHatchFill",lineSymbol:t,offsetX:0,offsetY:0,rotation:i,separation:h}),"cross"===s||"esriSFSCross"===s?r.push({type:"CIMHatchFill",lineSymbol:(0,n.d9)(t),offsetX:0,offsetY:0,rotation:90,separation:h}):"diagonal-cross"!==s&&"esriSFSDiagonalCross"!==s||r.push({type:"CIMHatchFill",lineSymbol:(0,n.d9)(t),offsetX:0,offsetY:0,rotation:45,separation:h})}else!s||"solid"!==s&&"esriSFSSolid"!==s||r.push({type:"CIMSolidFill",enable:!0,color:U(e)});return o}static fromSimpleLineSymbol(t){const{cap:e,color:s,join:i,marker:r,miterLimit:n,style:o,width:a}=t;let h=null;"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(h=[{type:"CIMGeometricEffectDashes",dashTemplate:Z(o,e),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const l=[];if(r){let t;switch(r.placement){case"begin-end":t=M.Tx.Both;break;case"begin":t=M.Tx.JustBegin;break;case"end":t=M.Tx.JustEnd;break;default:t=M.Tx.None}const e=W.fromSimpleMarker(r,a,s).symbolLayers[0];e.markerPlacement={type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:t,offsetAlongLine:0},l.push(e)}return"none"!==o&&"esriSLSNull"!==o&&l.push({type:"CIMSolidStroke",color:U(s),capStyle:B(e),joinStyle:G(i),miterLimit:n,width:a,effects:h}),{type:"CIMLineSymbol",symbolLayers:l}}static fromPictureMarker(t){const{angle:e,height:s,width:i,xoffset:r,yoffset:n}=t;let o=t.url;return"esriPMS"===t.type&&t.imageData&&(o=t.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:M.Qb.Picture,tintColor:null,url:o,size:s,width:i,offsetX:(0,E.NA)(r),offsetY:(0,E.NA)(n),rotation:(0,E.NA)(-e)}]}}static fromSimpleMarker(t,e,s){var i;const{style:r}=t,n=null!=(i=t.color)?i:s;if("path"===r){const e=[];if("outline"in t&&t.outline){const s=t.outline;e.push({type:"CIMSolidStroke",enable:!0,width:(0,h.F2)(Math.round((0,h.Wz)(s.width))),color:U(s.color)})}e.push({type:"CIMSolidFill",enable:!0,color:U(n),path:t.path});const[s,i]=q("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,E.NA)(-t.angle),size:(0,E.NA)(t.size||6),offsetX:(0,E.NA)(t.xoffset),offsetY:(0,E.NA)(t.yoffset),frame:s,markerGraphics:[{type:"CIMMarkerGraphic",geometry:i,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]}}const[o,a]=q(r);let l;if(a&&o){const s=[];if("outline"in t&&t.outline){const e=t.outline;s.push({type:"CIMSolidStroke",enable:!0,width:e.width>.667?(0,h.F2)(Math.round((0,h.Wz)(e.width))):e.width,color:U(e.color)})}else!e||"line-marker"!==t.type||"cross"!==t.style&&"x"!==t.style||s.push({type:"CIMSolidStroke",enable:!0,width:e,color:U(n)});s.push({type:"CIMSolidFill",enable:!0,color:U(n)});const i={type:"CIMPolygonSymbol",symbolLayers:s};l={type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,E.NA)(-t.angle),size:(0,E.NA)(t.size||6*e),offsetX:(0,E.NA)(t.xoffset),offsetY:(0,E.NA)(t.yoffset),frame:o,markerGraphics:[{type:"CIMMarkerGraphic",geometry:a,symbol:i}]}]}}return l}static fromCIMHatchFill(t){var e;const s=null!=(e=t.separation)?e:4,i=s/2;let r=this._getLineSymbolPeriod(t.lineSymbol)||4;for(;r<4;)r*=2;const n=r/2;return{type:"CIMVectorMarker",frame:{xmin:-n,xmax:n,ymin:-i,ymax:i},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-n,0],[n,0]]]},symbol:t.lineSymbol}],size:s}}static _getLineSymbolPeriod(t){if(t){const e=this._getEffectsRepeat(t.effects);if(e)return e;if(t.symbolLayers)for(const e of t.symbolLayers){const t=this._getEffectsRepeat(e.effects);if(t)return t;if(e){const t=this._getPlacementRepeat(e.markerPlacement);if(t)return t}}}return 0}static _getEffectsRepeat(t){if(t)for(const e of t)if(e)switch(e.type){case"CIMGeometricEffectDashes":{const t=e.dashTemplate;if(t&&t.length){let e=0;for(const s of t)e+=s;return 1&t.length&&(e*=2),e}break}case"CIMGeometricEffectWave":return e.period;default:O.error(`unsupported geometric effect type ${e.type}`)}return 0}static _getPlacementRepeat(t){if(t)switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineVariableSize":{const e=t.placementTemplate;if(e&&e.length){let t=0;for(const s of e)t+=s;return 1&e.length&&(t*=2),t}break}}return 0}static fromCIMInsidePolygon(t){const e=t.markerPlacement,s={type:t.type,...t};let i,r,n,o;return s.markerPlacement=null,s.anchorPoint=null,!0===e.shiftOddRows?(r=e.stepX/2,n=e.stepY,o=2*e.stepY,i=[{x:-r,y:0},{x:r,y:0},{x:0,y:n},{x:0,y:-n}].map((t=>({type:"CIMMarkerGraphic",geometry:t,symbol:{type:"CIMPointSymbol",symbolLayers:[s]}})))):(r=e.stepX/2,n=e.stepY/2,o=e.stepY,i=[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:{type:"CIMPointSymbol",symbolLayers:[s]}}]),{type:"CIMVectorMarker",frame:{xmin:-r,xmax:r,ymin:-n,ymax:n},markerGraphics:i,size:o}}static getFillColor(t){if(!t)return null;switch(t.type){case"CIMPolygonSymbol":if(t.symbolLayers)for(const e of t.symbolLayers){const t=W.getFillColor(e);if(null!=t)return t}break;case"CIMTextSymbol":return W.getFillColor(t.symbol);case"CIMSolidFill":return t.color}}static getStrokeColor(t){if(t)switch(t.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(t.symbolLayers)for(const e of t.symbolLayers){const t=W.getStrokeColor(e);if(void 0!==t)return t}break;case"CIMTextSymbol":return W.getStrokeColor(t.symbol);case"CIMSolidStroke":return t.color}}static getStrokeWidth(t){if(t)switch(t.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(t.symbolLayers)for(const e of t.symbolLayers){const t=W.getStrokeWidth(e);if(void 0!==t)return t}break;case"CIMTextSymbol":return W.getStrokeWidth(t.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return t.width}}static getSize(t){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{let e=0;if(t.symbolLayers)for(const s of t.symbolLayers){const t=W.getSize(s);t>e&&(e=t)}return e}case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":return t.width;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":return t.size}}static getMarkerScaleRatio(t){if(t&&"CIMVectorMarker"===t.type&&!1!==t.scaleSymbolsProportionally&&t.frame){const e=t.frame.ymax-t.frame.ymin;return t.size/e}return 1}}class V{static findApplicableOverrides(t,e,s){if(t&&e){if(t.primitiveName){let i=!1;for(const e of s)if(e.primitiveName===t.primitiveName){i=!0;break}if(!i)for(const i of e)i.primitiveName===t.primitiveName&&s.push(i)}switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":if(t.effects)for(const i of t.effects)V.findApplicableOverrides(i,e,s);if(t.symbolLayers)for(const i of t.symbolLayers)V.findApplicableOverrides(i,e,s);break;case"CIMTextSymbol":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":case"CIMVectorMarker":case"CIMCharacterMarker":case"CIMPictureMarker":if(t.effects)for(const i of t.effects)V.findApplicableOverrides(i,e,s);if(t.markerPlacement&&V.findApplicableOverrides(t.markerPlacement,e,s),"CIMVectorMarker"===t.type){if(t.markerGraphics)for(const i of t.markerGraphics)V.findApplicableOverrides(i,e,s),V.findApplicableOverrides(i.symbol,e,s)}else"CIMCharacterMarker"===t.type?V.findApplicableOverrides(t.symbol,e,s):"CIMHatchFill"===t.type&&V.findApplicableOverrides(t.lineSymbol,e,s)}}}static findEffectOverrides(t,e,s){if(!e||!t)return;const i=t.length;for(let r=0;r<i;r++){const i=t[r],n=null==i?void 0:i.primitiveName;if(n){let t=!1;for(const e of s)if(e.primitiveName===n){t=!0;break}if(!t)for(const t of e)t.primitiveName===n&&s.push(t)}}}static applyOverrides(t,e,s,i){if(!e)return;const r=t=>t?t.charAt(0).toLowerCase()+t.substr(1):t;if(t.primitiveName)for(const n of e)if(n.primitiveName===t.primitiveName){const e=r(n.propertyName);if(i&&i.push({cim:t,nocapPropertyName:e,value:t[e]}),n.expression&&(n.value=V.toValue(n.propertyName,n.expression)),s){let e=!1;for(const i of s)i.primitiveName===t.primitiveName&&(e=!0);e||s.push(n)}t[e]=n.value}switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":if(t.effects)for(const r of t.effects)V.applyOverrides(r,e,s,i);if(t.symbolLayers)for(const r of t.symbolLayers)V.applyOverrides(r,e,s,i);break;case"CIMTextSymbol":break;case"CIMSolidStroke":case"CIMSolidFill":case"CIMVectorMarker":if(t.effects)for(const r of t.effects)V.applyOverrides(r,e,s,i);if("CIMVectorMarker"===t.type&&t.markerGraphics)for(const r of t.markerGraphics)V.applyOverrides(r,e,s,i),V.applyOverrides(r.symbol,e,s,i)}}static restoreOverrides(t){for(const e of t)e.cim[e.nocapPropertyName]=e.value}static buildOverrideKey(t){let e="";for(const s of t)void 0!==s.value&&(e+=`${s.primitiveName}${s.propertyName}${JSON.stringify(s.value)}`);return e}static toValue(t,e){if("DashTemplate"===t)return e.split(" ").map((t=>Number(t)));if("Color"===t){const t=new i.Z(e).toRgba();return t[3]*=255,t}return e}}const B=t=>{if(!t)return M.kP.Butt;switch(t){case"butt":return M.kP.Butt;case"square":return M.kP.Square;case"round":return M.kP.Round}},G=t=>{if(!t)return M.r4.Miter;switch(t){case"miter":return M.r4.Miter;case"round":return M.r4.Round;case"bevel":return M.r4.Bevel}},D=t=>{if(!t)return"Center";switch(t){case"left":return"Left";case"right":return"Right";case"center":return"Center";case"justify":return"Justify"}},X=t=>{if(!t)return"Center";switch(t){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},U=t=>{if(!t)return[0,0,0,0];const{r:e,g:s,b:i,a:r}=t;return[e,s,i,255*r]},H=(t,e)=>{const s=Y(e),i=J(t);return s&&i?`${s}-${i}`:`${s}${i}`},Y=t=>{if(!t)return"";switch(t.toLowerCase()){case"bold":case"bolder":return"bold"}return""},J=t=>{if(!t)return"";switch(t.toLowerCase()){case"italic":case"oblique":return"italic"}return""},Z=(t,e)=>{const s="butt"===e;switch(t){case"dash":case"esriSLSDash":return s?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return s?[4,3,1,3]:[3,4,0,4];case"dot":case"esriSLSDot":return s?[1,3]:[0,4];case"long-dash":case"esriSLSLongDash":return s?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return s?[8,3,1,3]:[7,4,0,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return s?[8,3,1,3,1,3]:[7,4,0,4,0,4];case"short-dash":case"esriSLSShortDash":return s?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return s?[4,1,1,1]:[3,2,0,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return s?[4,1,1,1,1,1]:[3,2,0,2,0,2];case"short-dot":case"esriSLSShortDot":return s?[1,1]:[0,2];case"solid":case"esriSLSSolid":case"none":return O.error("Unexpected: style does not require rasterization"),[0,0];default:return O.error(`Tried to rasterize SLS, but found an unexpected style: ${t}!`),[0,0]}},q=t=>{const e=50;let s,i;const r=t;if("circle"===r||"esriSMSCircle"===r){const t=.25;let r=Math.acos(1-t/e),n=Math.ceil(A/r/4);0===n&&(n=1),r=F/n,n*=4;const o=[];o.push([e,0]);for(let t=1;t<n;t++)o.push([e*Math.cos(t*r),-e*Math.sin(t*r)]);o.push([e,0]),s={rings:[o]},i={xmin:-e,ymin:-e,xmax:e,ymax:e}}else if("cross"===r||"esriSMSCross"===r){const t=0;s={rings:[[[t,e],[t,t],[e,t],[e,-t],[t,-t],[t,-e],[-t,-e],[-t,-t],[-e,-t],[-e,t],[-t,t],[-t,e],[t,e]]]},i={xmin:-e,ymin:-e,xmax:e,ymax:e}}else if("diamond"===r||"esriSMSDiamond"===r)s={rings:[[[-e,0],[0,e],[e,0],[0,-e],[-e,0]]]},i={xmin:-e,ymin:-e,xmax:e,ymax:e};else if("square"===r||"esriSMSSquare"===r)s={rings:[[[-e,-e],[-e,e],[e,e],[e,-e],[-e,-e]]]},i={xmin:-e,ymin:-e,xmax:e,ymax:e};else if("x"===r||"esriSMSX"===r){const t=0;s={rings:[[[0,t],[e-t,e],[e,e-t],[t,0],[e,t-e],[e-t,-e],[0,-t],[t-e,-e],[-e,t-e],[-t,0],[-e,e-t],[t-e,e],[0,t]]]},i={xmin:-e,ymin:-e,xmax:e,ymax:e}}else if("triangle"===r||"esriSMSTriangle"===r){const t=57.735026918962575,e=-t,r=2/3*100,n=r-100;s={rings:[[[e,n],[0,r],[t,n],[e,n]]]},i={xmin:e,ymin:n,xmax:t,ymax:r}}else"arrow"===r&&(s={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},i={xmin:-e,ymin:-e,xmax:e,ymax:e});return[i,s]},K=t=>"vertical"===t||"horizontal"===t||"cross"===t||"esriSFSCross"===t||"esriSFSVertical"===t||"esriSFSHorizontal"===t},34240:(t,e,s)=>{s.d(e,{Z:()=>i});class i{constructor(t=0,e=0,s=0,i=0){this.x=t,this.y=e,this.width=s,this.height=i}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}},81485:(t,e,s)=>{s.d(e,{S:()=>Y,c:()=>C});var i=s(22303),r=s(22974),n=s(92604),o=s(70586),a=s(62357),h=s(19153),l=s(59266),c=s(24562),u=s(95648),f=(s(72542),s(33955));function _(t){let e=1/0,s=-1/0,i=1/0,r=-1/0;for(const n of t)for(const t of n)t[0]<e&&(e=t[0]),t[0]>s&&(s=t[0]),t[1]<i&&(i=t[1]),t[1]>r&&(r=t[1]);return[e,i,s,r]}function d(t){return t?t.rings?_(t.rings):t.paths?_(t.paths):(0,f.YX)(t)?[t.xmin,t.ymin,t.xmax,t.ymax]:null:null}function m(t,e,s,i,r){const[n,o,a,h]=t;if(a<n||h<o)return[0,0,0];const l=a-n,c=h-o,u=Math.floor(31.5),f=(128-2*(u+1))/Math.max(l,c),_=Math.round(l*f)+2*u,d=Math.round(c*f)+2*u;let m=1;e&&(m=d/f/(e.ymax-e.ymin));let p=0,g=0;if(i)if(r){if(e&&s&&e.ymax-e.ymin>0){const t=(e.xmax-e.xmin)/(e.ymax-e.ymin);p=i.x/(s*t),g=i.y/s}}else p=i.x,g=i.y;return p=.5*(e.xmax+e.xmin)+p*(e.xmax-e.xmin),g=.5*(e.ymax+e.ymin)+g*(e.ymax-e.ymin),p-=n,g-=o,p*=f,g*=f,p+=u,g+=u,[m,p/_-.5,-(g/d-.5)]}var p=s(72233),g=s(76819),y=s(74465);const x=n.Z.getLogger("esri.symbols.cim.cimAnalyzer");function v(t){switch(t){case"Butt":return u.RL.BUTT;case"Square":return u.RL.SQUARE;default:return u.RL.ROUND}}function M(t){switch(t){case"Bevel":return u.AH.BEVEL;case"Miter":return u.AH.MITER;default:return u.AH.ROUND}}function b(t){switch(t){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function S(t){switch(t){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function P(t,e,s,i){let r;t[e]?r=t[e]:(r={},t[e]=r),r[s]=i}function w(t){const e=t.markerPlacement;return e&&e.angleToLine?u.v2.MAP:u.v2.SCREEN}async function C(t,e,s,i,r){const n=null!=i?i:[];if(!t)return n;let o,a;const h={};if("CIMSymbolReference"!==t.type)return x.error("Expect cim type to be 'CIMSymbolReference'"),n;if(o=t.symbol,a=t.primitiveOverrides,a){const t=[];for(const s of a){const i=s.valueExpressionInfo;if(i&&e){const r=i.expression,n=(0,l.Yi)(r,e.spatialReference,e.fields).then((t=>{t&&P(h,s.primitiveName,s.propertyName,t)}));t.push(n)}else null!=s.value&&P(h,s.primitiveName,s.propertyName,s.value)}t.length>0&&await Promise.all(t)}const f=[];switch(Z(o,s,f),f.length>0&&await Promise.all(f),o.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":!function(t,e,s,i,r,n,o){if(!t)return;const a=t.symbolLayers;if(!a)return;const h=t.effects;let l;const f=c.B$.getSize(t);"CIMPointSymbol"===t.type&&"Map"===t.angleAlignment&&(l=u.v2.MAP);let _=a.length;for(;_--;){const u=a[_];if(!u||!1===u.enable)continue;let d;h&&h.length&&(d=[...h]);const m=u.effects;m&&m.length&&(h?d.push(...m):d=[...m]);const p=[];let g;c.E0.findEffectOverrides(d,e,p),g=p.length>0?X(d,p,s,i):d;const y=[];switch(c.E0.findApplicableOverrides(u,e,y),u.type){case"CIMSolidFill":L(u,g,s,y,i,r);break;case"CIMPictureFill":I(u,g,s,y,i,n,r);break;case"CIMHatchFill":k(u,g,s,y,i,r);break;case"CIMGradientFill":T(u,g,s,y,i,r);break;case"CIMSolidStroke":z(u,g,s,y,i,r,"CIMPolygonSymbol"===t.type,f);break;case"CIMPictureStroke":E(u,g,s,y,i,r,"CIMPolygonSymbol"===t.type,f);break;case"CIMGradientStroke":A(u,g,s,y,i,r,"CIMPolygonSymbol"===t.type,f);break;case"CIMCharacterMarker":if(F(u,g,s,y,i,r))break;break;case"CIMPictureMarker":if(F(u,g,s,y,i,r))break;"CIMLineSymbol"===t.type&&(l=w(u)),R(u,g,s,y,i,n,r,l,f);break;case"CIMVectorMarker":if(F(u,g,s,y,i,r))break;"CIMLineSymbol"===t.type&&(l=w(u)),O(u,g,s,y,i,r,n,l,f,o);break;default:x.error("Cannot analyze CIM layer",u.type)}}}(o,a,h,e,n,s,r)}return n}function L(t,e,s,i,r,n){const o=t.primitiveName,a=(0,p.NO)(t.color),[l,c]=J(i,o,e,null),u=(0,h.hP)(JSON.stringify(t)+c).toString();n.push({type:"fill",templateHash:u,materialHash:l?()=>u:u,cim:t,materialOverrides:null,colorLocked:t.colorLocked,color:D(o,s,"Color",r,a,G),height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,effects:e})}function I(t,e,s,i,r,n,a){const l=t.primitiveName,c=t.tintColor?(0,p.NO)(t.tintColor):{r:255,g:255,b:255,a:1},[u,f]=J(i,l,e,null),_=(0,h.hP)(JSON.stringify(t)+f).toString(),d=(0,h.hP)(`${t.url}${JSON.stringify(t.colorSubstitutions)}`).toString();let m=(0,p.NA)(t.scaleX);if("width"in t){const e=t.width;let s=1;const i=n.getResource(t.url);(0,o.pC)(i)&&(s=i.width/i.height),m/=s*(t.height/e)}a.push({type:"fill",templateHash:_,materialHash:u?()=>d:d,cim:t,materialOverrides:null,colorLocked:t.colorLocked,effects:e,color:D(l,s,"TintColor",r,c,G),height:D(l,s,"Height",r,t.height),scaleX:D(l,s,"ScaleX",r,m),angle:D(l,s,"Rotation",r,(0,p.NA)(t.rotation)),offsetX:D(l,s,"OffsetX",r,(0,p.NA)(t.offsetX)),offsetY:D(l,s,"OffsetY",r,(0,p.NA)(t.offsetY)),url:t.url})}function k(t,e,s,i,r,n){const o=["Rotation","OffsetX","OffsetY"],a=i.filter((e=>e.primitiveName!==t.primitiveName&&-1===o.indexOf(e.propertyName))),l=t.primitiveName,[c,u]=J(i,l,e,null),f=(0,h.hP)(JSON.stringify(t)+u).toString(),_=(0,h.hP)(`${t.separation}${JSON.stringify(t.lineSymbol)}`).toString();n.push({type:"fill",templateHash:f,materialHash:c?H(_,s,a,r):_,cim:t,materialOverrides:a,colorLocked:t.colorLocked,effects:e,color:{r:255,g:255,b:255,a:1},height:D(l,s,"Separation",r,t.separation),scaleX:1,angle:D(l,s,"Rotation",r,(0,p.NA)(t.rotation)),offsetX:D(l,s,"OffsetX",r,(0,p.NA)(t.offsetX)),offsetY:D(l,s,"OffsetY",r,(0,p.NA)(t.offsetY))})}function T(t,e,s,i,r,n){const o=t.primitiveName,[a,l]=J(i,o,e,null),c=(0,h.hP)(JSON.stringify(t)+l).toString();n.push({type:"fill",templateHash:c,materialHash:a?H(c,s,i,r):c,cim:t,materialOverrides:null,colorLocked:t.colorLocked,effects:e,color:{r:128,g:128,b:128,a:1},height:0,angle:0,offsetX:0,offsetY:0,scaleX:1})}function z(t,e,s,i,r,n,o,a){const l=t.primitiveName,c=(0,p.NO)(t.color),u=void 0!==t.width?t.width:4,f=v(t.capStyle),_=M(t.joinStyle),d=t.miterLimit,[m,g]=J(i,l,e,null),y=(0,h.hP)(JSON.stringify(t)+g).toString();let x,b;if(e&&e instanceof Array&&e.length>0){const t=e[e.length-1];if("CIMGeometricEffectDashes"===t.type&&"NoConstraint"===t.lineDashEnding&&null===t.offsetAlongLine){const t=(e=[...e]).pop();x=t.dashTemplate,b=t.scaleDash}}n.push({type:"line",templateHash:y,materialHash:m?()=>y:y,cim:t,materialOverrides:null,isOutline:o,colorLocked:t.colorLocked,effects:e,color:D(l,s,"Color",r,c,G),width:D(l,s,"Width",r,u),cap:D(l,s,"CapStyle",r,f),join:D(l,s,"JoinStyle",r,_),miterLimit:D(l,s,"MiterLimit",r,d),referenceWidth:a,zOrder:B(t.name),dashTemplate:x,scaleDash:b})}function E(t,e,s,i,r,n,o,a){const l=(0,h.hP)(`${t.url}${JSON.stringify(t.colorSubstitutions)}`).toString(),c=t.primitiveName,u=(0,p.NO)(t.tintColor),f=void 0!==t.width?t.width:4,_=v(t.capStyle),d=M(t.joinStyle),m=t.miterLimit,[g,y]=J(i,c,e,null),x=(0,h.hP)(JSON.stringify(t)+y).toString();n.push({type:"line",templateHash:x,materialHash:g?()=>l:l,cim:t,materialOverrides:null,isOutline:o,colorLocked:t.colorLocked,effects:e,color:D(c,s,"TintColor",r,u,G),width:D(c,s,"Width",r,f),cap:D(c,s,"CapStyle",r,_),join:D(c,s,"JoinStyle",r,d),miterLimit:D(c,s,"MiterLimit",r,m),referenceWidth:a,zOrder:B(t.name),dashTemplate:null,scaleDash:!1,url:t.url})}function A(t,e,s,i,r,n,o,a){const l=t.primitiveName,c=void 0!==t.width?t.width:4,u=v(t.capStyle),f=M(t.joinStyle),_=t.miterLimit,[d,m]=J(i,l,e,null),p=(0,h.hP)(JSON.stringify(t)+m).toString();n.push({type:"line",templateHash:p,materialHash:d?H(p,s,i,r):p,cim:t,materialOverrides:null,isOutline:o,colorLocked:t.colorLocked,effects:e,color:{r:128,g:128,b:128,a:1},width:D(l,s,"Width",r,c),cap:D(l,s,"CapStyle",r,u),join:D(l,s,"JoinStyle",r,f),miterLimit:D(l,s,"MiterLimit",r,_),referenceWidth:a,zOrder:B(t.name),dashTemplate:null,scaleDash:!1})}function F(t,e,s,i,r,n){const o=t.markerPlacement;if(!o||"CIMMarkerPlacementInsidePolygon"!==o.type)return!1;const a=o,l=["Rotation","OffsetX","OffsetY"],c=i.filter((e=>e.primitiveName!==t.primitiveName&&-1===l.indexOf(e.propertyName))),u="url"in t?t.url:null,[f,_]=J(i,a.primitiveName,e,null),d=(0,h.hP)(JSON.stringify(t)+_).toString();let m=a.stepY,g=null,y=1;return o.shiftOddRows&&(m*=2,g=function(t){return t?2*t:0},y=.5),n.push({type:"fill",templateHash:d,materialHash:f?H(d,s,c,r):d,cim:t,materialOverrides:c,colorLocked:t.colorLocked,effects:e,color:{r:255,g:255,b:255,a:1},height:D(a.primitiveName,s,"StepY",r,m,g),scaleX:y,angle:D(a.primitiveName,s,"GridAngle",r,a.gridAngle),offsetX:D(a.primitiveName,s,"OffsetX",r,(0,p.NA)(a.offsetX)),offsetY:D(a.primitiveName,s,"OffsetY",r,(0,p.NA)(a.offsetY)),url:u}),!0}function R(t,e,s,i,r,n,a,l,c){var u;const f=t.primitiveName,_=(0,p.NA)(t.size);let d=(0,p.NA)(t.scaleX);const m=(0,p.NA)(t.rotation),g=(0,p.NA)(t.offsetX),y=(0,p.NA)(t.offsetY),x=t.tintColor?(0,p.NO)(t.tintColor):{r:255,g:255,b:255,a:1},v=(0,h.hP)(`${t.url}${JSON.stringify(t.colorSubstitutions)}`).toString(),M=U(t.markerPlacement,i,s,r),[b,S]=J(i,f,e,M),P=(0,h.hP)(JSON.stringify(t)+S).toString(),w=null!=(u=t.anchorPoint)?u:{x:0,y:0};if("width"in t){const e=t.width;let s=1;const i=n.getResource(t.url);(0,o.pC)(i)&&(s=i.width/i.height),d/=s*(_/e)}a.push({type:"marker",templateHash:P,materialHash:b?()=>v:v,cim:t,materialOverrides:null,colorLocked:t.colorLocked,effects:e,scaleSymbolsProportionally:!1,alignment:l,size:D(f,s,"Size",r,_),scaleX:D(f,s,"ScaleX",r,d),rotation:D(f,s,"Rotation",r,m),offsetX:D(f,s,"OffsetX",r,g),offsetY:D(f,s,"OffsetY",r,y),color:D(f,s,"TintColor",r,x,G),anchorPoint:{x:w.x,y:-w.y},isAbsoluteAnchorPoint:"Relative"!==t.anchorPointUnits,outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,frameHeight:0,rotateClockwise:t.rotateClockwise,referenceSize:c,sizeRatio:1,markerPlacement:t.markerPlacement,url:t.url})}function O(t,e,s,i,r,n,o,a,h,l){const c=t.markerGraphics;if(!c)return;let u=0;if(t.scaleSymbolsProportionally){const e=t.frame;e&&(u=e.ymax-e.ymin)}const f=U(t.markerPlacement,i,s,r);for(const _ of c)if(_){const c=_.symbol;if(!c)continue;switch(c.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":W(t,e,f,_,i,s,r,n,o,a,h,u,l);break;case"CIMTextSymbol":N(t,e,f,_,s,i,r,n,a,h,u)}}}function N(t,e,s,i,r,n,o,a,l,u,f){c.E0.findApplicableOverrides(i,n,[]);const _=i.geometry;if(!("x"in _)||!("y"in _))return;const d=i.symbol,m=function(t){return t.underline?"underline":t.strikethrough?"line-through":"none"}(d),g=function(t){let e="",s="";if(t){const i=t.toLowerCase();-1!==i.indexOf("italic")?e="italic":-1!==i.indexOf("oblique")&&(e="oblique"),-1!==i.indexOf("bold")?s="bold":-1!==i.indexOf("light")&&(s="lighter")}return{style:e,weight:s}}(d.fontStyleName),y=function(t){const e=t.toLowerCase().split(" ").join("-");switch(e){case"serif":return"noto-serif";case"sans-serif":return"arial-unicode-ms";case"monospace":return"ubuntu-mono";case"fantasy":return"cabin-sketch";case"cursive":return"redressed";default:return e}}(d.fontFamilyName);d.font={family:y,decoration:m,...g};const x=t.frame,v=_.x-.5*(x.xmin+x.xmax),M=_.y-.5*(x.ymin+x.ymax),P=t.size/f,w=t.primitiveName,C=(0,p.NA)(d.height)*P,L=(0,p.NA)(d.angle),I=(0,p.NA)(t.offsetX)+((0,p.NA)(d.offsetX)+v)*P,k=(0,p.NA)(t.offsetY)+((0,p.NA)(d.offsetY)+M)*P,T=(0,p.NO)(c.B$.getFillColor(d));let z=(0,p.NO)(c.B$.getStrokeColor(d)),E=c.B$.getStrokeWidth(d);E||(z=(0,p.NO)(c.B$.getFillColor(d.haloSymbol)),E=d.haloSize*P);const[A,F]=J(n,w,e,s),R=JSON.stringify(t.effects)+Number(t.colorLocked)+JSON.stringify(t.anchorPoint)+t.anchorPointUnits+JSON.stringify(t.markerPlacement),O=(0,h.hP)(JSON.stringify(i)+R+F).toString(),N=D(i.primitiveName,r,"TextString",o,i.textString,p.X3,d.textCase);if(null==N)return;const{fontStyleName:W}=d,V=y+(W?"-"+W.toLowerCase():"-regular"),B=V;a.push({type:"text",templateHash:O,materialHash:A||"function"==typeof N||N.match(/\[(.*?)\]/)?(t,e,s)=>B+"-"+(0,p.hf)(N,t,e,s):B+"-"+(0,h.hP)(N),cim:d,materialOverrides:null,colorLocked:t.colorLocked,effects:e,alignment:l,anchorPoint:{x:t.anchorPoint?t.anchorPoint.x:0,y:t.anchorPoint?t.anchorPoint.y:0},isAbsoluteAnchorPoint:"Relative"!==t.anchorPointUnits,fontName:V,decoration:m,weight:D(w,r,"Weight",o,g.weight),style:D(w,r,"Size",o,g.style),size:D(w,r,"Size",o,C),angle:D(w,r,"Rotation",o,L),offsetX:D(w,r,"OffsetX",o,I),offsetY:D(w,r,"OffsetY",o,k),horizontalAlignment:b(d.horizontalAlignment),verticalAlignment:S(d.verticalAlignment),text:N,color:T,outlineColor:z,outlineSize:E,referenceSize:u,sizeRatio:1,markerPlacement:s})}function W(t,e,s,i,r,n,a,l,u,f,_,y,x){const v=i.symbol,M=v.symbolLayers;if(!M)return;if(x)return void V(t,e,s,i,n,r,a,l,u,f,_,y);let b=M.length;if(q(M))return void function(t,e,s,i,r,n,o,a,l,u,f,_){const g=i.geometry,y=r[0],x=r[1],v=d(g);if(!v)return;const[M,b,S]=m(v,t.frame,t.size,t.anchorPoint,"Relative"!==t.anchorPointUnits),P={type:"sdf",geom:g,asFill:!0},w=t.primitiveName,C=(0,p.NA)(t.size),L=(0,p.NA)(t.rotation),I=(0,p.NA)(t.offsetX),k=(0,p.NA)(t.offsetY),T=x.path,z=x.primitiveName,E=y.primitiveName,A=(0,p.NO)(c.B$.getFillColor(x)),F=(0,p.NO)(c.B$.getStrokeColor(y)),R=c.B$.getStrokeWidth(y);let O=!1,N="";for(const t of n)t.primitiveName!==z&&t.primitiveName!==E&&t.primitiveName!==w||(void 0!==t.value?N+=`-${t.primitiveName}-${t.propertyName}-${JSON.stringify(t.value)}`:t.valueExpressionInfo&&(O=!0));const W=JSON.stringify({...t,markerGraphics:null}),V=(0,h.hP)(JSON.stringify(P)+T).toString(),B={type:"marker",templateHash:(0,h.hP)(JSON.stringify(i)+JSON.stringify(x)+JSON.stringify(y)+W+N).toString(),materialHash:O?()=>V:V,cim:P,materialOverrides:null,colorLocked:t.colorLocked,effects:e,scaleSymbolsProportionally:t.scaleSymbolsProportionally,alignment:u,anchorPoint:{x:b,y:S},isAbsoluteAnchorPoint:!1,size:D(t.primitiveName,o,"Size",a,C),rotation:D(t.primitiveName,o,"Rotation",a,L),offsetX:D(t.primitiveName,o,"OffsetX",a,I),offsetY:D(t.primitiveName,o,"OffsetY",a,k),scaleX:1,frameHeight:_,rotateClockwise:t.rotateClockwise,referenceSize:f,sizeRatio:M,color:D(z,o,"Color",a,A,G),outlineColor:D(E,o,"Color",a,F,G),outlineWidth:D(E,o,"Width",a,R),markerPlacement:s,path:T};l.push(B)}(t,e,s,i,M,r,n,a,l,f,_,y);const S=g.j.applyEffects(v.effects,i.geometry,u.geometryEngine);if(S)for(;b--;){const x=M[b];if(x&&!1!==x.enable)switch(x.type){case"CIMSolidFill":case"CIMSolidStroke":{var P;const v=g.j.applyEffects(x.effects,S,u.geometryEngine),M=d(v);if(!M)continue;const[b,w,C]=m(M,t.frame,t.size,t.anchorPoint,"Relative"!==t.anchorPointUnits),L="CIMSolidFill"===x.type,I={type:"sdf",geom:v,asFill:L},k=t.primitiveName,T=null!=(P=(0,p.NA)(t.size))?P:10,z=(0,p.NA)(t.rotation),E=(0,p.NA)(t.offsetX),A=(0,p.NA)(t.offsetY),F=x.path,R=x.primitiveName,O=(0,p.NO)(L?c.B$.getFillColor(x):c.B$.getStrokeColor(x)),N=L?{r:0,g:0,b:0,a:0}:(0,p.NO)(c.B$.getStrokeColor(x)),W=c.B$.getStrokeWidth(x);if(!L&&!W)break;let V=!1,B="";for(const t of r)t.primitiveName!==R&&t.primitiveName!==k||(void 0!==t.value?B+=`-${t.primitiveName}-${t.propertyName}-${JSON.stringify(t.value)}`:t.valueExpressionInfo&&(V=!0));(0,o.pC)(e)&&"function"==typeof e&&(V=!0);const X=JSON.stringify({...t,markerGraphics:null}),U=(0,h.hP)(JSON.stringify(I)+F).toString(),H={type:"marker",templateHash:(0,h.hP)(JSON.stringify(i)+JSON.stringify(x)+X+B).toString(),materialHash:V?()=>U:U,cim:I,materialOverrides:null,colorLocked:t.colorLocked,effects:e,scaleSymbolsProportionally:t.scaleSymbolsProportionally,alignment:f,anchorPoint:{x:w,y:C},isAbsoluteAnchorPoint:!1,size:D(t.primitiveName,n,"Size",a,T),rotation:D(t.primitiveName,n,"Rotation",a,z),offsetX:D(t.primitiveName,n,"OffsetX",a,E),offsetY:D(t.primitiveName,n,"OffsetY",a,A),scaleX:1,frameHeight:y,rotateClockwise:t.rotateClockwise,referenceSize:_,sizeRatio:b,color:D(R,n,"Color",a,O,G),outlineColor:D(R,n,"Color",a,N,G),outlineWidth:D(R,n,"Width",a,W),markerPlacement:s,path:F};l.push(H);break}default:V(t,e,s,i,n,r,a,l,u,f,_,y)}}}function V(t,e,s,i,r,n,l,u,f,_,d,m){const g=function(t,e){return{type:t.type,enable:!0,name:t.name,colorLocked:t.colorLocked,primitiveName:t.primitiveName,anchorPoint:t.anchorPoint,anchorPointUnits:t.anchorPointUnits,offsetX:0,offsetY:0,rotateClockwise:t.rotateClockwise,rotation:0,size:t.size,billboardMode3D:t.billboardMode3D,depth3D:t.depth3D,frame:t.frame,markerGraphics:[e],scaleSymbolsProportionally:t.scaleSymbolsProportionally,respectFrame:t.respectFrame,clippingPath:t.clippingPath}}(t,i);let y=[];const x=["Rotation","OffsetX","OffsetY"];y=n.filter((e=>e.primitiveName!==t.primitiveName||-1===x.indexOf(e.propertyName)));let v="";for(const t of n)void 0!==t.value&&(v+=`-${t.primitiveName}-${t.propertyName}-${JSON.stringify(t.value)}`);const[M,b,S]=c.B$.getTextureAnchor(g,f),P=t.primitiveName,w=(0,p.NA)(t.rotation),C=(0,p.NA)(t.offsetX),L=(0,p.NA)(t.offsetY),I=(0,h.hP)(JSON.stringify(g)+v).toString(),k={type:"marker",templateHash:I,materialHash:y.length>0||(0,o.pC)(e)&&"function"==typeof e?H(I,r,y,l):I,cim:g,materialOverrides:y,colorLocked:t.colorLocked,effects:e,scaleSymbolsProportionally:t.scaleSymbolsProportionally,alignment:_,anchorPoint:{x:M,y:b},isAbsoluteAnchorPoint:!1,size:t.size,rotation:D(P,r,"Rotation",l,w),offsetX:D(P,r,"OffsetX",l,C),offsetY:D(P,r,"OffsetY",l,L),color:{r:255,g:255,b:255,a:1},outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,scaleX:1,frameHeight:m,rotateClockwise:t.rotateClockwise,referenceSize:d,sizeRatio:S/(0,a.F2)(t.size),markerPlacement:s};u.push(k)}function B(t){if(t&&0===t.indexOf("Level_")){const e=parseInt(t.substr(6),10);if(!isNaN(e))return e}return 0}function G(t){if(!t||0===t.length)return null;const e=new i.Z(t).toRgba();return{r:e[0],g:e[1],b:e[2],a:e[3]}}function D(t,e,s,i,r,n,o){const a=e[t];if(a){const t=a[s];if("string"==typeof t||"number"==typeof t||t instanceof Array)return n?n.call(null,t,o):t;if(null!=t&&t instanceof l.mz)return(e,s,a)=>{let h=(0,y.Z)(t,e,{$view:a},i.geometryType,s);return null!==h&&n&&(h=n.call(null,h,o)),null!==h?h:r}}return r}function X(t,e,s,i){for(const t of e)if(t.valueExpressionInfo){const e=s[t.primitiveName]&&s[t.primitiveName][t.propertyName];e instanceof l.mz&&(t.fn=(t,s,r)=>(0,y.Z)(e,t,{$view:r},i.geometryType,s))}const n=t=>t?t.charAt(0).toLowerCase()+t.substr(1):t;return(s,i,o)=>{for(const t of e)t.fn&&(t.value=t.fn(s,i,o));const a=[];for(let s of t){var h;const t=null==(h=s)?void 0:h.primitiveName;if(t){let i=!1;for(const o of e)if(o.primitiveName===t){const t=n(o.propertyName);null!=o.value&&o.value!==s[t]&&(i||(s=(0,r.d9)(s),i=!0),s[t]=o.value)}}a.push(s)}return a}}function U(t,e,s,i){const n=[];if(c.E0.findApplicableOverrides(t,e,n),0===n.length)return t;for(const t of n)if(t.valueExpressionInfo){const e=s[t.primitiveName]&&s[t.primitiveName][t.propertyName];e instanceof l.mz&&(t.fn=(t,s,r)=>(0,y.Z)(e,t,{$view:r},i.geometryType,s))}const o=t=>t?t.charAt(0).toLowerCase()+t.substr(1):t;return(e,s,i)=>{for(const t of n)t.fn&&(t.value=t.fn(e,s,i));const a=(0,r.d9)(t),h=t.primitiveName;for(const t of n)if(t.primitiveName===h){const e=o(t.propertyName);null!=t.value&&t.value!==a[e]&&(a[e]=t.value)}return a}}function H(t,e,s,i){for(const t of s)if(t.valueExpressionInfo){const s=e[t.primitiveName]&&e[t.primitiveName][t.propertyName];s instanceof l.mz&&(t.fn=(t,e,r)=>(0,y.Z)(s,t,{$view:r},i.geometryType,e))}return(e,i,r)=>{for(const t of s)t.fn&&(t.value=t.fn(e,i,r));return(0,h.hP)(t+c.E0.buildOverrideKey(s)).toString()}}function Y(t,e){if(!e||0===e.length)return t;const s=JSON.parse(JSON.stringify(t));return c.E0.applyOverrides(s,e),s}function J(t,e,s,i){let r=!1,n="";for(const s of t)s.primitiveName===e&&(void 0!==s.value?n+=`-${s.primitiveName}-${s.propertyName}-${JSON.stringify(s.value)}`:s.valueExpressionInfo&&(r=!0));return(0,o.pC)(s)&&"function"==typeof s&&(r=!0),(0,o.pC)(i)&&"function"==typeof i&&(r=!0),[r,n]}function Z(t,e,s){if(t&&e)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const i=t.symbolLayers;if(!i)return;for(const t of i)switch($(t,e,s),t.type){case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":case"CIMPictureStroke":case"CIMGradientStroke":case"CIMCharacterMarker":case"CIMPictureMarker":"url"in t&&t.url&&s.push(e.fetchResource(t.url,null));break;case"CIMVectorMarker":{const i=t.markerGraphics;if(!i)continue;for(const t of i)if(t){const i=t.symbol;i&&Z(i,e,s)}}}}}}const q=t=>t&&2===t.length&&t[0].enable&&t[1].enable&&"CIMSolidStroke"===t[0].type&&"CIMSolidFill"===t[1].type&&!t[0].effects&&!t[1].effects;let K;function $(t,e,s){t.effects&&!(0,o.pC)(e.geometryEngine)&&(K?s.push(K):(0,p.Cc)(t.effects)&&(K=(0,p.RI)(),s.push(K),K.then((t=>e.geometryEngine=t))))}},76819:(t,e,s)=>{s.d(e,{j:()=>a});var i=s(33955),r=s(70345),n=s(21793),o=s(61741);class a{static executeEffects(t,e,s){const i=(0,r.GP)(e);let a=new n.M(i);for(const e of t){const t=(0,o.h)(e);t&&(a=t.execute(a,e,1.3333333333333333,s,!0))}return a}static next(t){const e=t.next();return(0,r.wp)(e),e}static applyEffects(t,e,s){if(!t)return e;let r=new n.M(e);for(const e of t){const t=(0,o.h)(e);t&&(r=t.execute(r,e,1,s,!1))}let a,h=null;for(;a=r.next();)h?(0,i.l9)(h)?(0,i.l9)(a)&&h.paths.push(...a.paths):(0,i.oU)(h)&&(0,i.oU)(a)&&h.rings.push(...a.rings):h=a;return h}}},72233:(t,e,s)=>{function i(t,e,s,i){return"function"==typeof t?t(e,s,i):t}function r(t,e,s){const i=t=>{let e=t.length;for(;e--;)if(-1===" /-,\n".indexOf(t.charAt(e)))return!1;return!0},r=[];let o=0,a=-1;do{if(a=e.indexOf("[",o),a>=o){if(a>o){const t=e.substr(o,a-o);r.push([t,null,i(t)])}if(o=a+1,a=e.indexOf("]",o),a>=o){if(a>o){const s=t[e.substr(o,a-o)];s&&r.push([null,s,!1])}o=a+1}}}while(-1!==a);if(o<e.length-1){const t=e.substr(o);r.push([t,null,i(t)])}return t=>{let e="",i=null;for(const s of r){const[r,n,o]=s;if(r)o?i=r:(i&&(e+=i,i=null),e+=r);else{const s=t.attributes[n];s&&(i&&(e+=i,i=null),e+=s)}}return n(e,s)}}function n(t,e){switch("string"!=typeof t&&(t=String(t)),e){case"LowerCase":return t.toLowerCase();case"Allcaps":return t.toUpperCase();default:return t}}function o(t){return t?{r:t[0],g:t[1],b:t[2],a:t[3]/255}:{r:0,g:0,b:0,a:0}}s.d(e,{X3:()=>n,Qs:()=>r,hf:()=>i,NO:()=>o,NA:()=>a,RI:()=>l,Cc:()=>h});const a=t=>isNaN(t)||!t?0:t,h=t=>{if(!t)return!1;for(const e of t)switch(e.type){case"CIMGeometricEffectBuffer":case"CIMGeometricEffectOffset":return!0}return!1};function l(){return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))}},74465:(t,e,s)=>{s.d(e,{Z:()=>o});var i=s(20102),r=s(92604),n=s(82397);function o(t,e,s,i,n){const o=t.referencesGeometry()&&n?h(e,i,n):e,a=t.repurposeFeature(o);try{return t.evaluate({...s,$feature:a})}catch(t){return r.Z.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:",t),null}}const a=new Map;function h(t,e,s){const{transform:o,hasZ:h,hasM:l}=s;a.has(e)||a.set(e,function(t){const e={};switch(t){case"esriGeometryPoint":return(t,s,i,r)=>(0,n.U1)(s,e,t,i,r);case"esriGeometryPolygon":return(t,s,i,r)=>(0,n.Ie)(s,e,t,i,r);case"esriGeometryPolyline":return(t,s,i,r)=>(0,n.G6)(s,e,t,i,r);case"esriGeometryMultipoint":return(t,s,i,r)=>(0,n.J9)(s,e,t,i,r);default:return r.Z.getLogger("esri.views.2d.support.arcadeOnDemand").error(new i.Z("mapview-arcade",`Unable to handle geometryType: ${t}`)),t=>t}}(e));const c=a.get(e)(t.geometry,o,h,l);return{...t,geometry:c}}},31363:(t,e,s)=>{s.d(e,{_U:()=>n,DT:()=>a,B1:()=>i,JJ:()=>r,sX:()=>f,k3:()=>u,DQ:()=>l,Or:()=>c});const i=Number.POSITIVE_INFINITY,r=Math.PI,n=2*r,o=128/r,a=r/180,h=1/Math.LN2;function l(t,e){return(t%=e)>=0?t:t+e}function c(t){return l(t*o,256)}function u(t){return Math.log(t)*h}function f(t,e,s){return t*(1-s)+e*s}},35362:(t,e,s)=>{s.d(e,{V:()=>r,E:()=>i});class i{constructor(t,e){this.x=t,this.y=e}clone(){return new i(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){this.x=t,this.y=e}normalize(){const t=this.x,e=this.y,s=Math.sqrt(t*t+e*e);this.x/=s,this.y/=s}rightPerpendicular(){const t=this.x;this.x=this.y,this.y=-t}move(t,e){this.x+=t,this.y+=e}assign(t){this.x=t.x,this.y=t.y}assignAdd(t,e){this.x=t.x+e.x,this.y=t.y+e.y}assignSub(t,e){this.x=t.x-e.x,this.y=t.y-e.y}rotate(t,e){const s=this.x,i=this.y;this.x=s*t-i*e,this.y=s*e+i*t}scale(t){this.x*=t,this.y*=t}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}static distance(t,e){const s=e.x-t.x,i=e.y-t.y;return Math.sqrt(s*s+i*i)}static add(t,e){return new i(t.x+e.x,t.y+e.y)}static sub(t,e){return new i(t.x-e.x,t.y-e.y)}}var r;!function(t){t[t.Unknown=0]="Unknown",t[t.Point=1]="Point",t[t.LineString=2]="LineString",t[t.Polygon=3]="Polygon"}(r||(r={}))},30729:(t,e,s)=>{var i,r;function n(t){switch(t){case"left":return i.Left;case"right":return i.Right;case"center":case"justify":return i.Center}}function o(t){switch(t){case"top":return r.Top;case"middle":return r.Center;case"baseline":return r.Baseline;case"bottom":return r.Bottom}}function a(t){switch(t){case"above-left":case"esriServerPointLabelPlacementAboveLeft":return[i.Right,r.Bottom];case"above-center":case"above-along":case"esriServerPointLabelPlacementAboveCenter":case"esriServerLinePlacementAboveAlong":return[i.Center,r.Bottom];case"above-right":case"esriServerPointLabelPlacementAboveRight":return[i.Left,r.Bottom];case"center-left":case"esriServerPointLabelPlacementCenterLeft":return[i.Right,r.Center];case"center-center":case"center-along":case"esriServerPointLabelPlacementCenterCenter":case"esriServerLinePlacementCenterAlong":case"always-horizontal":case"esriServerPolygonPlacementAlwaysHorizontal":return[i.Center,r.Center];case"center-right":case"esriServerPointLabelPlacementCenterRight":return[i.Left,r.Center];case"below-left":case"esriServerPointLabelPlacementBelowLeft":return[i.Right,r.Top];case"below-center":case"below-along":case"esriServerPointLabelPlacementBelowCenter":case"esriServerLinePlacementBelowAlong":return[i.Center,r.Top];case"below-right":case"esriServerPointLabelPlacementBelowRight":return[i.Left,r.Top];default:return console.debug(`Found invalid placement type ${t}`),[i.Center,r.Center]}}function h(t){switch(t){case i.Right:return-1;case i.Center:return 0;case i.Left:return 1;default:return console.debug(`Found invalid horizontal alignment ${t}`),0}}function l(t){switch(t){case r.Top:return 1;case r.Center:return 0;case r.Bottom:case r.Baseline:return-1;default:return console.debug(`Found invalid vertical alignment ${t}`),0}}function c(t){switch(t){case"left":return i.Left;case"right":return i.Right;case"center":case"justify":return i.Center}}function u(t){switch(t){case"above-along":case"below-along":case"center-along":case"esriServerLinePlacementAboveAlong":case"esriServerLinePlacementBelowAlong":case"esriServerLinePlacementCenterAlong":return!0;default:return!1}}s.d(e,{TR:()=>r,qv:()=>a,Hd:()=>c,kH:()=>n,g:()=>h,b7:()=>o,tf:()=>l,NS:()=>u}),function(t){t[t.Left=-1]="Left",t[t.Center=0]="Center",t[t.Right=1]="Right"}(i||(i={})),function(t){t[t.Top=1]="Top",t[t.Center=0]="Center",t[t.Bottom=-1]="Bottom",t[t.Baseline=2]="Baseline"}(r||(r={}))},63523:(t,e,s)=>{s.d(e,{dk:()=>_,Gq:()=>g,a:()=>m,mE:()=>d,m2:()=>h,qr:()=>p,jj:()=>o,hF:()=>a});var i=s(20102),r=s(30729),n=s(66039);function o(t,e){switch(t){case n.LW.FILL:return _.from(e);case n.LW.LINE:return m.from(e);case n.LW.MARKER:return d.from(e);case n.LW.TEXT:return p.from(e);case n.LW.LABEL:return g.from(e);default:throw new Error(`Unable to createMaterialKey for unknown geometryType ${t}`)}}function a(t){switch(h.load(t).geometryType){case n.LW.MARKER:return new d(t);case n.LW.FILL:return new _(t);case n.LW.LINE:return new m(t);case n.LW.TEXT:return new p(t);case n.LW.LABEL:return new g(t)}}class h{constructor(t){this._data=0,this._data=t}static load(t){const e=this.shared;return e.data=t,e}set data(t){this._data=t}get data(){return this._data}get geometryType(){return this.bits(8,11)}set geometryType(t){this.setBits(t,8,11)}get mapAligned(){return!!this.bit(20)}set mapAligned(t){this.setBit(20,t)}get sdf(){return!!this.bit(11)}set sdf(t){this.setBit(11,t)}get pattern(){return!!this.bit(12)}set pattern(t){this.setBit(12,t)}get textureBinding(){return this.bits(0,8)}set textureBinding(t){this.setBits(t,0,8)}get geometryTypeString(){switch(this.geometryType){case n.LW.FILL:return"fill";case n.LW.MARKER:return"marker";case n.LW.LINE:return"line";case n.LW.TEXT:return"text";case n.LW.LABEL:return"label";default:throw new i.Z(`Unable to handle unknown geometryType: ${this.geometryType}`)}}setBit(t,e){const s=1<<t;e?this._data|=s:this._data&=~s}bit(t){return(this._data&1<<t)>>t}setBits(t,e,s){for(let i=e,r=0;i<s;i++,r++)this.setBit(i,0!=(t&1<<r))}bits(t,e){let s=0;for(let i=t,r=0;i<e;i++,r++)s|=this.bit(i)<<r;return s}hasVV(){return!1}setVV(t,e){}getVariation(){return{mapAligned:this.mapAligned,pattern:this.pattern,sdf:this.sdf}}getVariationHash(){return this._data&~(7&this.textureBinding)}}h.shared=new h(0);const l=t=>class extends t{get vvSizeMinMaxValue(){return 0!==this.bit(16)}set vvSizeMinMaxValue(t){this.setBit(16,t)}get vvSizeScaleStops(){return 0!==this.bit(17)}set vvSizeScaleStops(t){this.setBit(17,t)}get vvSizeFieldStops(){return 0!==this.bit(18)}set vvSizeFieldStops(t){this.setBit(18,t)}get vvSizeUnitValue(){return 0!==this.bit(19)}set vvSizeUnitValue(t){this.setBit(19,t)}hasVV(){return super.hasVV()||this.vvSizeMinMaxValue||this.vvSizeScaleStops||this.vvSizeFieldStops||this.vvSizeUnitValue}setVV(t,e){super.setVV(t,e);const s=function(t,e){const s=n.X.SIZE_FIELD_STOPS|n.X.SIZE_MINMAX_VALUE|n.X.SIZE_SCALE_STOPS|n.X.SIZE_UNIT_VALUE,i=(t&(n.mf.FIELD_TARGETS_OUTLINE|n.mf.MINMAX_TARGETS_OUTLINE|n.mf.SCALE_TARGETS_OUTLINE|n.mf.UNIT_TARGETS_OUTLINE))>>>4;return e.isOutline||e.isOutlinedFill?s&i:s&~i}(t,e)&t;this.vvSizeMinMaxValue=!!(s&n.X.SIZE_MINMAX_VALUE),this.vvSizeFieldStops=!!(s&n.X.SIZE_FIELD_STOPS),this.vvSizeUnitValue=!!(s&n.X.SIZE_UNIT_VALUE),this.vvSizeScaleStops=!!(s&n.X.SIZE_SCALE_STOPS)}},c=t=>class extends t{get vvRotation(){return 0!==this.bit(15)}set vvRotation(t){this.setBit(15,t)}hasVV(){return super.hasVV()||this.vvRotation}setVV(t,e){super.setVV(t,e),this.vvRotation=!e.isOutline&&!!(t&n.X.ROTATION)}},u=t=>class extends t{get vvColor(){return 0!==this.bit(13)}set vvColor(t){this.setBit(13,t)}hasVV(){return super.hasVV()||this.vvColor}setVV(t,e){super.setVV(t,e),this.vvColor=!e.isOutline&&!!(t&n.X.COLOR)}},f=t=>class extends t{get vvOpacity(){return 0!==this.bit(14)}set vvOpacity(t){this.setBit(14,t)}hasVV(){return super.hasVV()||this.vvOpacity}setVV(t,e){super.setVV(t,e),this.vvOpacity=!e.isOutline&&!!(t&n.X.OPACITY)}};class _ extends(u(f(l(h)))){static load(t){const e=this.shared;return e.data=t,e}static from(t){const e=this.load(0);return e.geometryType=n.LW.FILL,e.dotDensity="dot-density"===t.stride.fill,e.simple="simple"===t.stride.fill,e.outlinedFill=t.isOutlinedFill,e.dotDensity||e.setVV(t.vvFlags,t),e.data}getVariation(){return{...super.getVariation(),dotDensity:this.dotDensity,outlinedFill:this.outlinedFill,simple:this.simple,vvColor:this.vvColor,vvOpacity:this.vvOpacity,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}get dotDensity(){return!!this.bit(15)}set dotDensity(t){this.setBit(15,t)}get simple(){return!!this.bit(22)}set simple(t){this.setBit(22,t)}get outlinedFill(){return!!this.bit(21)}set outlinedFill(t){this.setBit(21,t)}}_.shared=new _(0);class d extends(u(f(c(l(h))))){static load(t){const e=this.shared;return e.data=t,e}static from(t){const e=this.load(0);return e.geometryType=n.LW.MARKER,e.setVV(t.vvFlags,t),e.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvRotation:this.vvRotation,vvOpacity:this.vvOpacity,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}d.shared=new d(0);class m extends(u(f(l(h)))){static load(t){const e=this.shared;return e.data=t,e}static from(t){const e=this.load(0);return e.geometryType=n.LW.LINE,e.setVV(t.vvFlags,t),e.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvOpacity:this.vvOpacity,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}m.shared=new m(0);class p extends(u(f(c(l(h))))){static load(t){const e=this.shared;return e.data=t,e}static from(t){const e=this.load(0);return e.geometryType=n.LW.TEXT,e.setVV(t.vvFlags,t),e.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvOpacity:this.vvOpacity,vvRotation:this.vvRotation,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}p.shared=new p(0);class g extends(l(h)){static load(t){const e=this.shared;return e.data=t,e}static from(t){const e=this.load(0);return e.geometryType=n.LW.LABEL,e.setVV(t.vvFlags,t),e.mapAligned=(0,r.NS)(t.placement),e.data}getVariation(){return{...super.getVariation(),vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}g.shared=new g(0)},58195:(t,e,s)=>{s.d(e,{Nr:()=>y});var i=s(45699),r=s(21106),n=s(4307),o=s(1265),a=s(30729),h=s(12142),l=s(87893);class c{constructor(t,e,s,i){this.center=(0,o.f)(t,e),this.centerT=(0,o.c)(),this.halfWidth=s/2,this.halfHeight=i/2,this.width=s,this.height=i}get x(){return this.center[0]}get y(){return this.center[1]}get blX(){return this.center[0]+this.halfWidth}get blY(){return this.center[1]+this.halfHeight}get trX(){return this.center[0]-this.halfWidth}get trY(){return this.center[1]-this.halfHeight}get xmin(){return this.x-this.halfWidth}get xmax(){return this.x+this.halfWidth}get ymin(){return this.y-this.halfHeight}get ymax(){return this.y+this.halfHeight}set x(t){this.center[0]=t}set y(t){this.center[1]=t}clone(){return new c(this.x,this.y,this.width,this.height)}serialize(t){return t.writeF32(this.center[0]),t.writeF32(this.center[1]),t.push(this.width),t.push(this.height),t}findCollisionDelta(t,e=4){const s=Math.abs(t.centerT[0]-this.centerT[0]),i=Math.abs(t.centerT[1]-this.centerT[1]),r=(t.halfWidth+this.halfWidth+e)/s,n=(t.halfHeight+this.halfHeight+e)/i,o=Math.min(r,n);return Math.log2(o)}extend(t){const e=Math.min(this.xmin,t.xmin),s=Math.min(this.ymin,t.ymin),i=Math.max(this.xmax,t.xmax)-e,r=Math.max(this.ymax,t.ymax)-s,n=e+i/2,o=s+r/2;this.width=i,this.height=r,this.halfWidth=i/2,this.halfHeight=r/2,this.x=n,this.y=o}static deserialize(t){const e=t.readF32(),s=t.readF32(),i=t.readInt32(),r=t.readInt32();return new c(e,s,i,r)}}const u=Math.PI/180;class f{constructor(t,e,s,i){this._rotationT=(0,r.c)(),this._xBounds=0,this._yBounds=0,this.minZoom=0,this.maxZoom=255,this._bounds=null;const n=s.rect,o=new Float32Array(8);t*=i,e*=i;const a=s.code?n.width*i:s.metrics.width,h=s.code?n.height*i:s.metrics.height;o[0]=t,o[1]=e,o[2]=t+a,o[3]=e,o[4]=t,o[5]=e+h,o[6]=t+a,o[7]=e+h,this._data=o,this._setTextureCoords(n),this._scale=i,this._mosaic=s,this.x=t,this.y=e,this.maxOffset=Math.max(t+a,e+h)}get width(){return this._mosaic.metrics.width*this._scale}get mosaic(){return this._mosaic}set angle(t){this._angle=t,(0,i.b)(this._rotationT,-t),this._setOffsets(this._data)}get angle(){return this._angle}get xTopLeft(){return this._data[0]}get yTopLeft(){return this._data[1]}get xBottomRight(){return this._data[6]}get yBottomRight(){return this._data[7]}get texcoords(){return this._texcoords}get textureBinding(){return this._mosaic.textureBinding}get offsets(){return this._offsets||this._setOffsets(this._data),this._offsets}get char(){return String.fromCharCode(this._mosaic.code)}get code(){return this._mosaic.code}get bounds(){if(!this._bounds){const{height:t,width:e}=this._mosaic.metrics,s=e*this._scale,n=Math.abs(t)*this._scale,o=new Float32Array(8);o[0]=this.x,o[1]=this.y,o[2]=this.x+s,o[3]=this.y,o[4]=this.x,o[5]=this.y+n,o[6]=this.x+s,o[7]=this.y+n;const a=(0,i.m)((0,r.c)(),this._rotationT,this._T);(0,r.t)(o,o,a);let h=1/0,l=1/0,u=0,f=0;for(let t=0;t<4;t++){const e=o[2*t],s=o[2*t+1];h=Math.min(h,e),l=Math.min(l,s),u=Math.max(u,e),f=Math.max(f,s)}const _=u-h,d=f-l,m=h+_/2,p=l+d/2;this._bounds=new c(m,p,_,d)}return this._bounds}setTransform(t){this._T=t,this._offsets=null}_setOffsets(t){this._offsets||(this._offsets={upperLeft:0,upperRight:0,lowerLeft:0,lowerRight:0});const e=this._offsets,s=new Float32Array(8),n=(0,i.m)((0,r.c)(),this._rotationT,this._T);(0,r.t)(s,t,n),e.upperLeft=(0,h.UJ)(8*s[0],8*s[1]),e.upperRight=(0,h.UJ)(8*s[2],8*s[3]),e.lowerLeft=(0,h.UJ)(8*s[4],8*s[5]),e.lowerRight=(0,h.UJ)(8*s[6],8*s[7])}_setTextureCoords({x:t,y:e,width:s,height:i}){this._texcoords={upperLeft:(0,h.UJ)(t,e),upperRight:(0,h.UJ)(t+s,e),lowerLeft:(0,h.UJ)(t,e+i),lowerRight:(0,h.UJ)(t+s,e+i)}}}const _=(t,e)=>({code:0,page:0,sdf:!0,rect:new l.Z(0,0,11,8),textureBinding:e,metrics:{advance:0,height:4,width:t,left:0,top:0}});class d{constructor(t,e,s){this._rotation=0,this._decorate(t,e,s),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=e.length>1,this._hasRotation=0!==s.angle,this._T=this._createGlyphTransform(this.bounds,s);for(const e of t)e.setTransform(this._T)}setRotation(t){if(0===t&&0===this._rotation)return;this._rotation=t;const e=this._T,s=(0,i.b)((0,r.c)(),t);(0,i.m)(e,s,e);for(const t of this.glyphs)t.setTransform(this._T)}_decorate(t,e,s){if(!s.decoration||"none"===s.decoration||!t.length)return;const i=s.scale,r="underline"===s.decoration?30:20,n=t[0].textureBinding;for(const s of e){const e=s.startX*i,o=s.startY*i,a=(s.width+s.glyphWidthEnd)*i;t.push(new f(e,o+r*i,_(a,n),1))}}get boundsT(){const t=this.bounds,e=(0,n.s)((0,o.c)(),t.x,t.y);if((0,n.t)(e,e,this._T),this._hasRotation){const s=Math.max(t.width,t.height);return new c(e[0],e[1],s,s)}return new c(e[0],e[1],t.width,t.height)}_createBounds(t){let e=1/0,s=1/0,i=0,r=0;for(const n of t)e=Math.min(e,n.xTopLeft),s=Math.min(s,n.yTopLeft),i=Math.max(i,n.xTopLeft+n.width),r=Math.max(r,n.yBottomRight);const n=i-e,o=r-s;return new c(e+n/2,s+o/2,n,o)}_createGlyphTransform(t,e){const s=u*e.angle,a=(0,r.c)(),h=(0,o.c)();return(0,i.t)(a,a,(0,n.s)(h,e.xOffset,-e.yOffset)),e.isCIM?(0,i.r)(a,a,s):((0,i.t)(a,a,(0,n.s)(h,t.x,t.y)),(0,i.r)(a,a,s),(0,i.t)(a,a,(0,n.s)(h,-t.x,-t.y))),a}}class m{constructor(t,e,s,i,r,n){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(e,s)),this.end=Math.max(0,Math.max(e,s)),this.end<t.length&&(this.glyphWidthEnd=t[this.end].metrics.width),this.width=i,this.yMin=r,this.yMax=n}}const p=t=>10===t,g=t=>32===t;function y(t,e,s){const i=s.scale,r=new Array,n=function(t,e,s){const i=new Array,r=1/s.scale,n=s.maxLineWidth*r,o=e?t.length-1:0,a=e?-1:t.length,h=e?-1:1;let l=o,c=0,u=0,f=l,_=f,d=0,y=1/0,x=0;for(;l!==a;){const{code:e,metrics:s}=t[l],r=Math.abs(s.top);if(p(e)||g(e)||(y=Math.min(y,r),x=Math.max(x,r+s.height)),p(e))l!==o&&(i.push(new m(t,f,l-h,c,y,x)),y=1/0,x=0),c=0,f=l+h,_=l+h,u=0;else if(g(e))_=l+h,u=0,d=s.advance,c+=s.advance;else if(c>n){if(_!==f){const e=_-2*h;c-=d,i.push(new m(t,f,e,c-u,y,x)),y=1/0,x=0,f=_,c=u}else i.push(new m(t,f,l-h,c,y,x)),y=1/0,x=0,f=l,_=l,c=0;c+=s.advance,u+=s.advance}else c+=s.advance,u+=s.advance;l+=h}const v=new m(t,f,l-h,c,y,x);return v.start>=0&&v.end<t.length&&i.push(v),i}(t,e,s),o=function(t,e){let s=0;for(let e=0;e<t.length;e++){const{width:i}=t[e];s=Math.max(i,s)}const i="underline"===e.decoration?4:0,r=t[0].yMin;return{x:0,y:r,height:t[t.length-1].yMax+e.lineHeight*(t.length-1)+i-r,width:s}}(n,s),{vAlign:h,hAlign:l}=s,c=h===a.TR.Baseline?1:0,u=c?0:h-1,_=(1-c)*-o.y+u*(o.height/2)+-26*(c?1:0);for(let e=0;e<n.length;e++){const{start:o,end:a,width:h}=n[e];let c=-1*(l+1)*(h/2)-3;const u=e*s.lineHeight+_-3;n[e].startX=c,n[e].startY=u;for(let e=o;e<=a;e++){const s=t[e];if(p(s.code))continue;const n=new f(c+s.metrics.left,u-s.metrics.top,s,i);c+=s.metrics.advance,r.push(n)}}return new d(r,n,s)}},47988:(t,e,s)=>{s.d(e,{Z:()=>h});var i=s(43697),r=s(3920),n=s(5600),o=(s(67676),s(80442),s(75215),s(52011));let a=class extends r.r{initialize(){}destroy(){}get supportsTileUpdates(){return!1}get spatialReference(){const t=this.get("tileStore.tileScheme.spatialReference");return t&&t.toJSON()||null}};(0,i._)([(0,n.Cb)({readOnly:!0})],a.prototype,"supportsTileUpdates",null),(0,i._)([(0,n.Cb)({constructOnly:!0})],a.prototype,"remoteClient",void 0),(0,i._)([(0,n.Cb)({constructOnly:!0})],a.prototype,"service",void 0),(0,i._)([(0,n.Cb)()],a.prototype,"spatialReference",null),(0,i._)([(0,n.Cb)({constructOnly:!0})],a.prototype,"tileInfo",void 0),(0,i._)([(0,n.Cb)({constructOnly:!0})],a.prototype,"tileStore",void 0),a=(0,i._)([(0,o.j)("esri.views.2d.layers.features.processors.BaseProcessor")],a);const h=a},61945:(t,e,s)=>{s.r(e),s.d(e,{default:()=>hs});var i=s(43697),r=s(83798),n=s(20102),o=s(80442),a=s(92604),h=s(70586),l=s(95330),c=(s(75215),s(67676),s(37697),s(52011)),u=s(22862),f=s(82971),_=s(61027),d=s(15923),m=s(5600),p=s(4307),g=s(34084);const y=new Set,x=[],v=new Map,M=[0,0];let b=class extends d.Z{constructor(t){super(t),this._keyToItem=new Map,this.concurrency=6,this.strategy="scale-first",this.tileInfoView=null}initialize(){const{concurrency:t,process:e}=this;this._queue=new g.e({concurrency:t,process:(t,s)=>{const i=this._keyToItem.get(t);return e(i,{signal:s})},peeker:t=>t.values().next().value})}destroy(){this.clear(),this._queue.destroy(),this._queue=null}get length(){return this._queue?this._queue.length:0}get onGoingCount(){return this._keyToItem.size}get updating(){return this.length>0||this.onGoingCount>0}abort(t){const e="string"==typeof t?t:t.id;this._queue.abort(e)}clear(){this._queue.clear(),this._keyToItem.clear(),this.notifyChange("updating")}has(t){return"string"==typeof t?this._keyToItem.has(t):this._keyToItem.has(t.id)}isOngoing(t){const e="string"==typeof t?t:t.id;return this.has(e)&&this._queue.isOngoing(e)}pause(){this._queue.pause()}push(t,e){const s=t.key.id+"-"+e;if(this.has(s))return this.get(s);const i=this._queue.push(s),r=()=>{this._keyToItem.delete(s),this.notifyChange("updating")};return this._keyToItem.set(s,t),i.then(r,r),this.notifyChange("updating"),i}reset(){this._queue.reset(),this.notifyChange("updating")}resume(){this._queue.resume()}_peekByScaleFirst(t){if(!this.state)return t.values().next().value;const e=this.tileInfoView;let s=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;t.forEach((t=>{const e=this._keyToItem.get(t),r=this.tileInfoView.getTileScale(e.key);v.has(r)||(v.set(r,[]),s=Math.max(r,s),i=Math.min(r,i)),v.get(r).push(e.key),y.add(r)}));let r=this.state.scale;v.has(r)||(function(t,e){t.length=0,e.forEach((e=>t.push(e)))}(x,y),x.sort(((t,e)=>t-e)),r=x.reduce(((t,e)=>Math.abs(e-r)<Math.abs(t-r)?e:t),x[0])),r=Math.min(r,s),r=Math.max(r,i);const n=v.get(r),o=e.getClosestInfoForScale(r),a=o.getColumnForX(this.state.center[0]),h=o.getRowForY(this.state.center[1]);return n.sort(((t,e)=>{const s=o.denormalizeCol(t.col,t.world),i=o.denormalizeCol(e.col,e.world);return Math.sqrt((a-s)*(a-s)+(h-t.row)*(h-t.row))-Math.sqrt((a-i)*(a-i)+(h-e.row)*(h-e.row))})),y.clear(),v.clear(),n[0].id}_peekByCenterFirst(t){if(!this.state)return t.values().next().value;const e=this.tileInfoView,s=this.state.center;let i=Number.POSITIVE_INFINITY,r=null;return t.forEach((t=>{const n=this._keyToItem.get(t);e.getTileCoords(M,n.key);const o=(0,p.b)(M,s);o<i&&(i=o,r=n.key)})),r.id}};(0,i._)([(0,m.Cb)({constructOnly:!0})],b.prototype,"concurrency",void 0),(0,i._)([(0,m.Cb)({constructOnly:!0})],b.prototype,"process",void 0),(0,i._)([(0,m.Cb)()],b.prototype,"state",void 0),(0,i._)([(0,m.Cb)({constructOnly:!0})],b.prototype,"strategy",void 0),(0,i._)([(0,m.Cb)({constructOnly:!0})],b.prototype,"tileInfoView",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],b.prototype,"updating",null),b=(0,i._)([(0,c.j)("esri.views.2d.tiling.PagedTileQueue")],b),s(83068);var S=s(55415);const P=new Set,w=[],C=new Map,L=[0,0];let I=class extends d.Z{constructor(t){super(t),this._keyToItem=new Map,this.concurrency=6,this.strategy="scale-first",this.tileInfoView=null}initialize(){const{concurrency:t,process:e,strategy:s}=this;this._queue=new g.e({concurrency:t,process:(t,s)=>{const i=this._keyToItem.get(t);return e(i,{signal:s})},peeker:"scale-first"===s?t=>this._peekByScaleFirst(t):t=>this._peekByCenterFirst(t)})}destroy(){this.clear(),this._queue.destroy(),this._queue=null}get length(){return this._queue?this._queue.length:0}get onGoingCount(){return this._keyToItem.size}get updating(){return this.length>0||this.onGoingCount>0}abort(t){const e="string"==typeof t?t:t.id;this._queue.abort(e)}clear(){this._queue.clear(),this._keyToItem.clear(),this.notifyChange("updating")}has(t){return"string"==typeof t?this._keyToItem.has(t):this._keyToItem.has(t.id)}isOngoing(t){const e="string"==typeof t?t:t.id;return this.has(e)&&this._queue.isOngoing(e)}pause(){this._queue.pause()}push(t){const e=t.key.id;if(this._queue.has(e))return this._queue.get(e);const s=this._queue.push(e),i=()=>{this._keyToItem.delete(e),this.notifyChange("updating")};return this._keyToItem.set(e,t),s.then(i,i),this.notifyChange("updating"),s}reset(){this._queue.reset()}resume(){this._queue.resume()}_peekByScaleFirst(t){if(!this.state)return t.values().next().value;const e=this.tileInfoView;let s=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;t.forEach((t=>{const e=this._keyToItem.get(t),r=this.tileInfoView.getTileScale(e.key);C.has(r)||(C.set(r,[]),s=Math.max(r,s),i=Math.min(r,i)),C.get(r).push(e.key),P.add(r)}));let r=this.state.scale;C.has(r)||(function(t,e){t.length=0,e.forEach((e=>t.push(e)))}(w,P),w.sort(((t,e)=>t-e)),r=w.reduce(((t,e)=>Math.abs(e-r)<Math.abs(t-r)?e:t),w[0])),r=Math.min(r,s),r=Math.max(r,i);const n=C.get(r),o=e.getClosestInfoForScale(r),a=o.getColumnForX(this.state.center[0]),h=o.getRowForY(this.state.center[1]);return n.sort(((t,e)=>{const s=o.denormalizeCol(t.col,t.world),i=o.denormalizeCol(e.col,e.world);return Math.sqrt((a-s)*(a-s)+(h-t.row)*(h-t.row))-Math.sqrt((a-i)*(a-i)+(h-e.row)*(h-e.row))})),P.clear(),C.clear(),n[0].id}_peekByCenterFirst(t){if(!this.state)return t.values().next().value;const e=this.tileInfoView,s=this.state.center;let i=Number.POSITIVE_INFINITY,r=null;return t.forEach((t=>{const n=this._keyToItem.get(t);e.getTileCoords(L,n.key);const o=(0,p.b)(L,s);o<i&&(i=o,r=n.key)})),r.id}};(0,i._)([(0,m.Cb)({constructOnly:!0})],I.prototype,"concurrency",void 0),(0,i._)([(0,m.Cb)({constructOnly:!0})],I.prototype,"process",void 0),(0,i._)([(0,m.Cb)()],I.prototype,"state",void 0),(0,i._)([(0,m.Cb)({constructOnly:!0})],I.prototype,"strategy",void 0),(0,i._)([(0,m.Cb)({constructOnly:!0})],I.prototype,"tileInfoView",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],I.prototype,"updating",null),I=(0,i._)([(0,c.j)("esri.views.2d.tiling.TileQueue")],I),s(24470),s(67524),new S.Z(0,0,0,0),new Map;var k=s(16534),T=s(66039),z=s(29996);const E=new Map;E.set(T.LW.MARKER,{multiplier:1,indicesPerRecord:6,verticesPerRecord:4}),E.set(T.LW.LINE,{multiplier:1,indicesPerRecord:24,verticesPerRecord:8}),E.set(T.LW.FILL,{multiplier:1,indicesPerRecord:10,verticesPerRecord:10}),E.set(T.LW.TEXT,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4}),E.set(T.LW.LABEL,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4});class A{constructor(t,e){this._pos=0;const s=e?this._roundToNearest(e,t.BYTES_PER_ELEMENT):40;this._array=new ArrayBuffer(s),this._buffer=new t(this._array),this._ctor=t,this._i16View=new Int16Array(this._array)}get length(){return this._pos}_roundToNearest(t,e){const s=Math.round(t);return s+(e-s%e)}_ensureSize(t){if(this._pos+t>=this._buffer.length){const e=this._roundToNearest(1.25*(this._array.byteLength+t*this._buffer.BYTES_PER_ELEMENT),this._buffer.BYTES_PER_ELEMENT),s=new ArrayBuffer(e),i=new this._ctor(s);i.set(this._buffer,0),this._array=s,this._buffer=i,this._i16View=new Int16Array(this._array)}}ensureSize(t){this._ensureSize(t)}writeF32(t){this._ensureSize(1);const e=this._pos;return new Float32Array(this._array,4*this._pos,1)[0]=t,this._pos++,e}push(t){this._ensureSize(1);const e=this._pos;return this._buffer[this._pos++]=t,e}writeFixed(t){this._buffer[this._pos++]=t}setValue(t,e){this._buffer[t]=e}i1616Add(t,e,s){this._i16View[2*t]+=e,this._i16View[2*t+1]+=s}getValue(t){return this._buffer[t]}incr(t){if(this._buffer.length<t)throw new Error("Increment index overflows the target buffer");this._buffer[t]++}decr(t){this._buffer[t]--}writeRegion(t){this._ensureSize(t.length);const e=this._pos;return this._buffer.set(t,this._pos),this._pos+=t.length,e}writeManyFrom(t,e,s){this._ensureSize(s-e);for(let i=e;i!==s;i++)this.writeFixed(t._buffer[i])}buffer(){const t=this._array.slice(0,4*this._pos);return this.destroy(),t}toArray(){const t=this._array,e=[];for(let s=0;s<t.byteLength/4;s++)e.push(t[s]);return e}seek(t){this._pos=t}destroy(){this._array=null,this._buffer=null}}class F{constructor(t,e,s){this._start={index:0,vertex:0};const i=function(t,e,s){const{indicesPerRecord:i,multiplier:r,verticesPerRecord:n}=E.get(t);return{recordBytes:s*k.XJ*Uint32Array.BYTES_PER_ELEMENT,indexBytes:r*i*s*Uint32Array.BYTES_PER_ELEMENT,vertexBytes:r*n*s*e}}(t,e,s),r=e/4;this.geometryType=t,this._records=new A(Int32Array,i.recordBytes),this._indices=new A(Uint32Array,i.indexBytes),this._vertices=new A(Uint32Array,i.vertexBytes),this._metrics=new A(Float32Array,0),this._strideInt=r}serialize(t){const e=this._records.buffer(),s=this._indices.buffer(),i=this._vertices.buffer(),r=this._metrics.length?this._metrics.buffer():null,n=4*this._strideInt;return t.push(e,s,i),{stride:n,records:e,indices:s,vertices:i,metrics:r}}get strideInt(){return this._strideInt}get recordCount(){return this._records.length/k.XJ}get vertexCount(){return this._vertices.length/this._strideInt}get indexCount(){return this._indices.length}get indexWriter(){return this._indices}get vertexWriter(){return this._vertices}get metricWriter(){return this._metrics}vertexEnsureSize(t){this._vertices.ensureSize(t)}indexEnsureSize(t){this._indices.ensureSize(t)}recordStart(){this._start.index=this._indices.length,this._start.vertex=this._vertices.length}recordEnd(t,e,s,i,r,n,o,a){this._records.push(t),this._records.push(e),this._records.push(s),this._records.push(i),this._records.push(r),this._records.push(n),this._records.push(o),this._records.writeF32(a)}writeIndex(t){this._indices.push(t)}writeVertex(t){this._vertices.push(t)}writeVertexF32(t){this._vertices.writeF32(t)}copyLastFrom(t,e,s){const i=t._records.length-k.XJ,r=t._records.getValue(i),n=t._records.getValue(i+1),o=t._records.getValue(i+2),a=t._records.getValue(i+4),h=t._records.getValue(i+6),l=t._records.getValue(i+7),c=this._vertices.length,u=(t._start.vertex-this._vertices.length)/this._strideInt,f=this._indices.length,_=this.vertexCount;for(let e=t._start.index;e!==t._indices.length;e++){const s=t._indices.getValue(e);this._indices.push(s-u)}for(let e=t._start.vertex;e!==t._vertices.length;e++){const s=t._vertices.getValue(e);this._vertices.push(s)}for(let t=c;t<=this._vertices.length;t+=this._strideInt)this._vertices.i1616Add(t,e,s);this._records.push(r),this._records.push(n),this._records.push(o),this._records.push(f),this._records.push(a),this._records.push(_),this._records.push(h),this._records.push(l)}}var R=s(14867);function O(t){switch(t){case 1:case 8:case 32:return-1;case 2:case 64:return 0;case 4:case 16:case 128:return 1}}function N(t){switch(t){case 1:case 2:case 4:return-1;case 8:case 16:return 0;case 32:case 64:case 128:return 1}}class W{constructor(t,e,s,i,r){this._hasAggregate=!1,this.hasRecords=!1,this._data={self:new Map,neighbors:new Array},this._current={geometryType:0,writer:null,overlaps:0,start:0,insertAfter:0,sortKey:0,id:0,materialKey:0,indexStart:0,vertStart:0,isDotDensity:!1,bufferingEnabled:!1,metricBoxLenPointer:0},this.hint=e,this.tileKey=t,this._hasAggregate=i,this._pixelBufferEnabled=r,this._strideOptions=s}get hasAggregates(){return this._hasAggregate}get hasPixelBufferEnabled(){return this._pixelBufferEnabled}serialize(t){const e=[];return e.push(this._serializeTileVertexData(this.tileKey,this.tileKey,this._data.self)),this._data.neighbors.forEach(((s,i)=>{const r=1<<i,n=O(r),o=N(r),a=(0,R.M)(new S.Z(this.tileKey),n,o,t),h=this._serializeTileVertexData(this.tileKey,a.id,s.vertexData);h.message.bufferIds=s.displayIds,e.push(h)})),e}_serializeTileVertexData(t,e,s){var i,r,n,o,a;const h=new Array;return{message:{tileKeyOrigin:t,tileKey:e,data:{[T.LW.MARKER]:null==(i=s.get(T.LW.MARKER))?void 0:i.serialize(h),[T.LW.FILL]:null==(r=s.get(T.LW.FILL))?void 0:r.serialize(h),[T.LW.LINE]:null==(n=s.get(T.LW.LINE))?void 0:n.serialize(h),[T.LW.TEXT]:null==(o=s.get(T.LW.TEXT))?void 0:o.serialize(h),[T.LW.LABEL]:null==(a=s.get(T.LW.LABEL))?void 0:a.serialize(h)}},transferList:h}}featureStart(t,e){this._current.insertAfter=t,this._current.sortKey=e}featureEnd(){}recordStart(t,e,s,i){this._current.writer=this._getVertexWriter(s),this._current.overlaps=0,this._current.indexStart=this._current.writer.indexCount,this._current.vertStart=this._current.writer.vertexCount,this._current.bufferingEnabled=i,this._current.id=t,this._current.materialKey=e,this._current.geometryType=s,this._current.isDotDensity=!1,this._current.writer.recordStart()}recordCount(){return this._current.writer.recordCount}vertexCount(){return this._current.writer.vertexCount}indexCount(){return this._current.writer.indexCount}vertexEnsureSize(t){this._current.writer.vertexEnsureSize(t)}indexEnsureSize(t){this._current.writer.indexEnsureSize(t)}vertexBounds(t,e,s,i){this._current.bufferingEnabled&&this._addOverlap(t,e,s,i)}vertexWrite(t){this._current.writer.writeVertex(t)}vertexWriteF32(t){this._current.writer.writeVertexF32(t)}vertexEnd(){}vertexWriter(){return this._current.writer.vertexWriter}indexWrite(t){this._current.writer.writeIndex(t)}indexWriter(){return this._current.writer.indexWriter}metricWriter(){return this._current.writer.metricWriter}metricStart(t,e,s,i,r,n,o,a){this._current.writer=this._getVertexWriter(T.LW.LABEL);const h=this._current.writer.metricWriter;h.push((0,_.jL)(t)),h.push(e),h.push(s),h.push(i),h.push(r),h.push(n),h.push(o),h.push(a),h.push(255),this._current.metricBoxLenPointer=h.push(0)}metricEnd(){const t=this._current.writer.metricWriter;0===t.getValue(this._current.metricBoxLenPointer)&&t.seek(t.length-10)}metricBoxWrite(t,e,s,i){const r=this._current.writer.metricWriter;r.incr(this._current.metricBoxLenPointer),r.push(0),r.push(0),r.push(t),r.push(e),r.push(s),r.push(i)}recordEnd(){const t=this._current.indexStart,e=this._current.writer.indexCount;if(t===e)return!1;this.hasRecords=!0;const s=e-t,i=this._current.vertStart,r=this._current.writer.vertexCount-i;if(this._current.writer.recordEnd(this._current.id,this._current.materialKey,this._current.insertAfter,t,s,i,r,this._current.sortKey),!this._pixelBufferEnabled||this._hasAggregate||0===this._current.overlaps||this._current.geometryType===T.LW.LABEL)return!0;const n=this._current.writer;for(let t=0;t<8;t++){const e=1<<t;if(this._current.overlaps&e){this._data.neighbors[t]||(this._data.neighbors[t]={vertexData:new Map,displayIds:new Set});const s=this._data.neighbors[t],i=this._current.geometryType;if(!s.vertexData.has(i)){const t=(0,z.$_)(i,this._strideOptions).geometry,e=new F(i,t,k.Ip);s.vertexData.set(i,e)}const r=s.vertexData.get(this._current.geometryType),o=8,a=512*-O(e)*o,h=512*-N(e)*o;r.copyLastFrom(n,a,h),s.displayIds.add(this._current.id)}}return!0}_addOverlap(t,e,s,i){const r=255^((t<0+s?148:t>=k.I_-s?41:189)|(e<0+i?224:e>=k.I_-i?7:231));this._current.overlaps|=r}_getVertexWriter(t){if(!this._data.self.has(t)){const e=this._data.self,s=(0,z.$_)(t,this._strideOptions).geometry;e.set(t,new F(t,s,this.hint.records))}return this._data.self.get(t)}}var V=s(65390),B=s(22021),G=s(62357),D=s(95648),X=s(30729),U=s(37720),H=s(12142),Y=s(63523);const J=100;function Z(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t}function q(t,e){return Math.sqrt(t*t+e*e)}function K(t){const e=q(t[0],t[1]);t[0]/=e,t[1]/=e}function $(t,e){return q(t[0]-e[0],t[1]-e[1])}function j(t){return"function"==typeof t}function Q(t=2){return 1/Math.max(t,1)}function tt(t,e){return[!!t.minScale&&e.scaleToZoom(t.minScale)||0,!!t.maxScale&&e.scaleToZoom(t.maxScale)||J]}function et(t){return t.length-1}function st(t,e,s=1){const[i,r]=function(t,e){return t[e+1]}(t,e);return Math.sqrt(i*i+r*r)*s}class it{constructor(t,e,s,i,r){this._segments=t,this._index=e,this._distance=s,this._xStart=i,this._yStart=r,this._done=!1}static create(t){return new it(t,0,0,t[0][0],t[0][1])}clone(){return new it(this._segments,this._index,this._distance,this.xStart,this.yStart)}equals(t){return this._index===t._index||t._index===this._index-1&&(0===this._distance||1===t._distance)||t._index===this._index+1&&(1===this._distance||0===t._distance)}leq(t){return this._index<t._index||this._index===t._index&&this._distance<=t._distance}geq(t){return this._index>t._index||this._index===t._index&&this._distance>=t._distance}get _segment(){return this._segments[this._index+1]}get angle(){const t=this.dy,e=(0*t+-1*-this.dx)/(1*this.length);let s=Math.acos(e);return t>0&&(s=2*Math.PI-s),s}get xStart(){return this._xStart}get yStart(){return this._yStart}get x(){return this.xStart+this.distance*this.dx}get y(){return this.yStart+this.distance*this.dy}get dx(){return this._segment[0]}get dy(){return this._segment[1]}get xMidpoint(){return this.xStart+.5*this.dx}get yMidpoint(){return this.yStart+.5*this.dy}get xEnd(){return this.xStart+this.dx}get yEnd(){return this.yStart+this.dy}get length(){const{dx:t,dy:e}=this;return Math.sqrt(t*t+e*e)}get remainingLength(){return this.length*(1-this._distance)}get backwardLength(){return this.length*this._distance}get distance(){return this._distance}get done(){return this._done}hasPrev(){return this._index-1>=0}hasNext(){return this._index+1<et(this._segments)}next(){return this.hasNext()?(this._xStart+=this.dx,this._yStart+=this.dy,this._distance=0,this._index+=1,this):null}prev(){return this.hasPrev()?(this._index-=1,this._xStart-=this.dx,this._yStart-=this.dy,this._distance=1,this):(this._done=!0,null)}_seekBackwards(t,e){const s=this.backwardLength;if(t<=s)return this._distance=(s-t)/this.length,this;let i=this.backwardLength;for(;this.prev();){if(i+this.length>t)return this._seekBackwards(t-i);i+=this.length}return this._distance=0,e?this:null}seek(t,e=!1){if(t<0)return this._seekBackwards(Math.abs(t),e);if(t<=this.remainingLength)return this._distance=(this.backwardLength+t)/this.length,this;let s=this.remainingLength;for(;this.next();){if(s+this.length>t)return this.seek(t-s,e);s+=this.length}return this._distance=1,e?this:null}}function rt(t,e,s,i=!0){const r=function(t){let e=0;for(let s=0;s<et(t);s++)e+=st(t,s);return e}(t),n=it.create(t),o=r/2;if(!i)return n.seek(o),void s(n.clone(),0,o+0*e,r);const a=Math.max((r-e)/2,0),h=Math.floor(a/e),l=o-h*e;n.seek(l);for(let t=-h;t<=h;t++)n.x<512&&n.x>=0&&n.y<512&&n.y>=0&&s(n.clone(),t,o+t*e,r),n.seek(e)}function nt(t,e){const s=1e-6;if(e<=0)return;const i=t.length;if(i<3)return;const r=[];let n=0;r.push(0);for(let e=1;e<i;e++)n+=$(t[e],t[e-1]),r.push(n);e=Math.min(e,.2*n);const o=[];o.push(t[0][0]),o.push(t[0][1]);const a=t[i-1][0],h=t[i-1][1],l=Z([0,0],t[0],t[1]);K(l),t[0][0]+=e*l[0],t[0][1]+=e*l[1],Z(l,t[i-1],t[i-2]),K(l),t[i-1][0]+=e*l[0],t[i-1][1]+=e*l[1];for(let t=1;t<i;t++)r[t]+=e;r[i-1]+=e;const c=.5*e;for(let n=1;n<i-1;n++){let a=0,h=0,l=0;for(let i=n-1;i>=0&&!(r[i+1]<r[n]-c);i--){const o=c+r[i+1]-r[n],u=r[i+1]-r[i],f=r[n]-r[i]<c?1:o/u;if(Math.abs(f)<s)break;const _=f*f,d=f*o-.5*_*u,m=f*u/e,p=t[i+1],g=t[i][0]-p[0],y=t[i][1]-p[1];a+=m/d*(p[0]*f*o+.5*_*(o*g-u*p[0])-_*f*u*g/3),h+=m/d*(p[1]*f*o+.5*_*(o*y-u*p[1])-_*f*u*y/3),l+=m}for(let o=n+1;o<i&&!(r[o-1]>r[n]+c);o++){const i=c-r[o-1]+r[n],u=r[o]-r[o-1],f=r[o]-r[n]<c?1:i/u;if(Math.abs(f)<s)break;const _=f*f,d=f*i-.5*_*u,m=f*u/e,p=t[o-1],g=t[o][0]-p[0],y=t[o][1]-p[1];a+=m/d*(p[0]*f*i+.5*_*(i*g-u*p[0])-_*f*u*g/3),h+=m/d*(p[1]*f*i+.5*_*(i*y-u*p[1])-_*f*u*y/3),l+=m}o.push(a/l),o.push(h/l)}o.push(a),o.push(h);for(let e=0,s=0;e<i;e++)t[e][0]=o[s++],t[e][1]=o[s++]}var ot=s(98732),at=s(70345),ht=s(61741);class lt{static getPlacement(t,e,s,i){const r=(0,ht.W)(e);if(!r)return null;const n=(0,at.GP)(t);return r.execute(n,e,s,i)}}var ct=s(58195);const ut=t=>class extends t{constructor(...t){super(...t),this._isCIM=!1,this._vertexBoundsScale=1,this.geometryType=T.LW.TEXT,this._aux=(0,H.Jz)(0,0,this._referenceSize,this._bitset)}bindTextInfo(t,e){t&&t.length?this._shapingInfo=(0,h.Po)(t,(t=>(0,ct.Nr)(t,e,{scale:this._scale,angle:this._angle,xOffset:this._xOffset,yOffset:this._yOffset,hAlign:this._xAlignD,vAlign:this._yAlignD,maxLineWidth:Math.max(32,Math.min(this._lineWidth,512)),lineHeight:k.xm*Math.max(.25,Math.min(this._lineHeight,4)),decoration:this._decoration,isCIM:this._isCIM}))):this._shapingInfo=null}_write(t,e,s,i){const r=e.getDisplayId();this._writeGeometry(t,e,r,s,i)}_writeGeometry(t,e,s,i,r){const n=this._shapingInfo;if((0,h.Wi)(n))return;if((0,h.pC)(this._textPlacement)){const o=null!=r?r:e.readLegacyGeometryForDisplay();return this._writePlacedText(t,s,o,n,i)}const o=r?(0,ot.oB)((0,ot.GH)(r),2):"esriGeometryPolygon"===e.geometryType?e.readCentroid():e.readGeometryForDisplay();if(!(0,h.Wi)(o)){if(o.isPoint){const[e,i]=o.coords;if(!t.hasAggregates&&t.hasPixelBufferEnabled&&(e<0||e>=512||i<0||i>=512))return;return this._writeGlyphs(t,s,{x:e,y:i},n)}o.forEachVertex(((e,i)=>this._writeGlyphs(t,s,{x:e,y:i},n)))}}_writePlacedText(t,e,s,i,r){const n=(0,h.Wg)(this._textPlacement),o=lt.getPlacement(s,n,(0,G.F2)(1),r.geometryEngine);if(!o)return;let a=o.next();for(;null!=a;){const s=a.getAngle();i.setRotation(s);const r=a.tx,n=a.ty;r<0||r>=512||n<0||n>=512||(this._writeGlyphs(t,e,{x:r,y:n},i),i.setRotation(-s)),a=o.next()}}_writeGlyphs(t,e,s,i){const r=Y.m2.load(this._materialKey),n=(0,H.UJ)(Math.round(8*s.x),Math.round(8*s.y)),o=this._vertexBoundsScale,a=i.bounds,h=2*Math.max(a.width,a.height);for(const l of i.glyphs)r.textureBinding=l.textureBinding,t.recordStart(e,r.data,this.geometryType,!0),t.vertexBounds(s.x+a.x+this._xOffset,s.y+a.y-this._yOffset,h*o,h*o),this._writeVertices(t,e,n,l),t.recordEnd()}_writeGlyph(t,e,s,i,r){const n=Y.m2.load(this._materialKey),o=(0,H.UJ)(Math.round(8*s),Math.round(8*i));n.textureBinding=r.textureBinding,t.recordStart(e,n.data,this.geometryType,!0);const a=r.bounds,h=this._vertexBoundsScale;t.vertexBounds(s+a.x*h,i+a.y*h,a.width*h,a.height*h),this._writeVertices(t,e,o,r),t.recordEnd()}_writeVertices(t,e,s,i){const r=t.vertexCount();this._writeVertexCommon(t,e,s,i),t.vertexWrite(i.offsets.upperLeft),t.vertexWrite(i.texcoords.upperLeft),t.vertexEnd(),this._writeVertexCommon(t,e,s,i),t.vertexWrite(i.offsets.upperRight),t.vertexWrite(i.texcoords.upperRight),t.vertexEnd(),this._writeVertexCommon(t,e,s,i),t.vertexWrite(i.offsets.lowerLeft),t.vertexWrite(i.texcoords.lowerLeft),t.vertexEnd(),this._writeVertexCommon(t,e,s,i),t.vertexWrite(i.offsets.lowerRight),t.vertexWrite(i.texcoords.lowerRight),t.vertexEnd(),t.indexWrite(r+0),t.indexWrite(r+1),t.indexWrite(r+2),t.indexWrite(r+1),t.indexWrite(r+3),t.indexWrite(r+2)}_writeVertexCommon(t,e,s,i){const r=this._color,n=this._haloColor,o=(0,H.Jz)(0,0,this._referenceSize,this._bitset),a=(0,H.Jz)(0,0,this._size,this._haloSize);t.vertexWrite(s),t.vertexWrite(e),t.vertexWrite(r),t.vertexWrite(n),t.vertexWrite(a),t.vertexWrite(o),t.vertexWrite(this._minMaxZoom)}};var ft=s(76819);class _t{bindFeature(t,e,s){}write(t,e,s,i){var r;if((0,h.Wi)(this._effects)||0===(null==(r=this._effects)?void 0:r.length))return this._write(t,e,i);const n=ft.j.executeEffects(this._effects,e.readLegacyGeometryForDisplay(),i.geometryEngine);let o=ft.j.next(n);for(;o;)this._write(t,e,i,o),o=ft.j.next(n)}_write(t,e,s,i){}}class dt extends(ut(_t)){constructor(t,e,s,i,r,n,o,a,h,l,c,u,f,_,d,m,p,g,y=!1,x,v){super(),this._xOffset=(0,G.F2)(f),this._yOffset=(0,G.F2)(_),this._decoration=l||"none",this._color=r,this._haloColor=n,this._haloSize=Math.min(Math.floor(5*(0,G.F2)((0,G.t_)(s))),127),this._size=Math.min(Math.round((0,G.F2)(e)),127);const M=Math.min(Math.round((0,G.F2)(i||e)),127);this._referenceSize=Math.round(Math.sqrt(256*M)),this._scale=this._size/k.Ex,this._angle=u,this._justify=(0,X.Hd)(o||"center"),this._xAlignD=(0,X.kH)(o||"center"),this._yAlignD=(0,X.b7)(a||"baseline"),this._baseline="baseline"===(a||"baseline"),this._bitset=(h===D.v2.MAP?1:0)|(c?1:0)<<1;const b=Y.m2.load(t);b.sdf=!0,this._materialKey=b.data,this._lineWidth=(0,G.F2)(d)||512,this._lineHeight=m||1,this._textPlacement=p,this._effects=g,this._isCIM=y,this._minMaxZoom=(0,H.UJ)(Math.round(x*k.MI),Math.round(v*k.MI))}static fromText(t,e){const s=new dt(t.materialKey,t.font.size,t.haloSize||0,t.font.size,t.color&&(0,U.aH)(t.color)||0,t.haloColor&&(0,U.aH)(t.haloColor)||0,t.horizontalAlignment,t.verticalAlignment,D.v2.SCREEN,t.font.decoration,!1,t.angle||0,t.xoffset,t.yoffset,t.lineWidth,t.lineHeight,null,null,!1,0,J),[,i]=(0,r.E)(t.text);return s.bindTextInfo(e,i),s._vertexBoundsScale=t.maxVVSize?t.maxVVSize/t.font.size:1,s}static fromCIMText(t,e,s){const i=t.scaleFactor||1,n=t.size*t.sizeRatio*i,[o,a]=tt(t.scaleInfo,s),h=new dt(t.materialKey,n,t.outlineSize*t.sizeRatio,t.referenceSize,(0,U.t2)(t.color),(0,U.t2)(t.outlineColor),t.horizontalAlignment,t.verticalAlignment,t.alignment,t.decoration,t.colorLocked,t.angle,t.offsetX*t.sizeRatio*i,t.offsetY*t.sizeRatio*i,512,1,t.markerPlacement,t.effects,!0,o,a),[,l]=(0,r.E)(t.text);return h.bindTextInfo(e,l),h._vertexBoundsScale=t.maxVVSize?t.maxVVSize/n:1,h}}const mt=a.Z.getLogger("esri.views.2d.engine.webgl.WGLLabelTemplate"),pt=function(t){const e=new Map;return t=>(e.has(t)||e.set(t,(t=>{let e=0;if(0===t)return 1/0;for(;!(t%2);)e++,t/=2;return e})(t)),e.get(t))}(),gt=t=>Math.floor(127*t+127),yt=t=>Math.floor(10*t),xt=t=>Math.round(t*(254/360));class vt extends dt{constructor(t,e,s,i){var r,n,o;super(t,s.font.size,s.haloSize||0,s.font.size,s.color&&(0,U.aH)(s.color)||0,s.haloColor&&(0,U.aH)(s.haloColor)||0,s.horizontalAlignment,s.verticalAlignment,(0,X.NS)(e.labelPlacement)?D.v2.MAP:D.v2.SCREEN,s.font.decoration,!1,s.angle||0,s.xoffset,s.yoffset,s.lineWidth,s.lineHeight,null,null,null,null,null),this._outLineLabelAngle=0,this._refPlacementPadding=0,this._refPlacementDirX=0,this._refPlacementDirY=0,this._refOffsetX=0,this._refOffsetY=0,this._zoomLevel=0,this.geometryType=T.LW.LABEL,this._allowOverrun=null!=(r=e.allowOverrun)&&r,this._repeatLabel=null==(n=e.repeatLabel)||n,this._labelPosition=null!=(o=e.labelPosition)?o:"curved";const a=function(t,e){const s=!!t.minScale&&e.scaleToZoom(t.minScale)||0;return(0,B.uZ)(s,0,25.5)}(e,i),h=function(t,e){const s=!!t.maxScale&&e.scaleToZoom(t.maxScale)||255;return(0,B.uZ)(s,0,25.5)}(e,i),l=e.labelPlacement,[c,u]=(0,X.qv)(l);this._xAlignD=c,this._yAlignD=u,this._minZoom=a,this._maxZoom=h,this._refPlacementPadding=(0,G.F2)(s.haloSize)+k.Iw,this._repeatLabelDistance=e.repeatLabelDistance?(0,G.F2)(e.repeatLabelDistance):128;const f=Y.Gq.load(t);f.sdf=!0,this._materialKey=f.data}static fromLabelClass(t,e){if("esriServerLinePlacementCenterAlong"===t.labelPlacement){const e=t.symbol;e.xoffset=0,e.yoffset=0,e.angle=0,e.font.decoration="none"}return new vt(t.materialKey,t,t.symbol,e)}get _shapedBox(){return(0,h.Wg)(this._shapingInfo).bounds}setZoomLevel(t){this._zoomLevel=t}bindReferenceTemplate(t){let e=(0,X.g)(this._xAlignD),s=(0,X.tf)(this._yAlignD);if(this._refOffsetX=0,this._refOffsetY=0,(0,h.Wi)(t))return void(this._refSymbolAndPlacementOffset=(0,H.Jz)(0,0,gt(e),gt(s)));if("circle"===t.boundsType&&(e||s)){const t=Math.sqrt(e*e+s*s);e/=t,s/=t}const i=Math.max(t.height,t.width),r=4*this._refPlacementPadding;this._refSymbolAndPlacementOffset=(0,H.Jz)(r,i,gt(e),gt(s)),this._referenceSize=i,this._refPlacementDirX=e,this._refPlacementDirY=s,this._refOffsetX=t.xOffset,this._refOffsetY=t.yOffset}_write(t,e){if((0,h.Wi)(this._shapingInfo))return;const s=this._shapingInfo,i=e.getDisplayId(),r="esriGeometryPolygon"===e.geometryType?e.readLegacyCentroid():e.readLegacyGeometry();if(r)switch(this.current={out:t,inId:i,inShaping:s,zoomLevel:this._zoomLevel},e.geometryType){case"esriGeometryPolyline":this._placeLineLabels(r);break;case"esriGeometryPoint":case"esriGeometryPolygon":this._placePointLabels(r);break;default:((t,e="mapview-labeling")=>{mt.error(new n.Z(e,t))})("mapview-labeling",`Geometry of type ${e.geometryType} is not supported`)}}_isVisible(t,e){const s=yt(this.current.zoomLevel);return yt(t)<=s&&s<=yt(e)}_placePointLabels(t){const{out:e,inId:s,inShaping:i}=this.current;this._writeGlyphs(e,s,t,i)}_placeLineLabels(t){const e=function(t,e){const s=e;for(let e=0;e<t.length;e++){let i=t[e];const r=[];r.push(i[0]);for(let t=1;t<i.length;t++){let[e,s]=r[t-1];e+=i[t][0],s+=i[t][1],r.push([e,s])}nt(r,s);const n=[];n.push(r[0]);for(let t=1;t<r.length;t++){const[e,s]=r[t-1],[i,o]=r[t],a=Math.round(i-e),h=Math.round(o-s);n.push([a,h])}t[e]=n,i=n}return t}(t.paths,this.current.inShaping.bounds.width),s=this._placeSubdivGlyphs.bind(this),i=(this._shapedBox.width+this._repeatLabelDistance)/2;for(const t of e)rt(t,i,s,this._repeatLabel)}_placeSubdivGlyphs(t,e,s,i){const r=pt(e),n=this._shapedBox.width/2,o=Math.sqrt(this._repeatLabelDistance)/2,a=Math.min(s,i-s),h=Math.log2(a/(o+n/2)),l=0===e?h:Math.min(r,h),c=Math.max(this._minZoom,this.current.zoomLevel+1-l),u=this.current.zoomLevel-c,f=this._shapedBox.width/2*2**u;this.current.inShaping.isMultiline?0===e&&this._placeStraight(t,c):this._allowOverrun&&u<0?this._placeStraightAlong(t,this._minZoom):"parallel"===this._labelPosition?this._placeStraightAlong(t,c):"curved"===this._labelPosition&&this._placeCurved(t,c,f)}_placeStraight(t,e){const{out:s,inId:i,inShaping:r}=this.current;this._writeGlyphs(s,i,t,r,e)}_placeCurved(t,e,s){const{out:i,inId:r}=this.current;i.metricStart(r,e,t.x,t.y,0,0,0,0);const n=t.clone(),o=t.angle*(180/Math.PI)%360,a=(t.angle*(180/Math.PI)+180)%360;this._outLineLabelAngle=xt(o),this._placeFirst(n,e,1),this._placeBack(t,n,e,s,1),this._placeForward(t,n,e,s,1),this._outLineLabelAngle=xt(a),this._placeFirst(n,e,0),this._placeBack(t,n,e,s,0),this._placeForward(t,n,e,s,0),i.metricEnd()}_placeStraightAlong(t,e){const{out:s,inId:i}=this.current;s.metricStart(i,e,t.x,t.y,0,0,0,0);const r=t.clone(),n=t.angle*(180/Math.PI)%360,o=(t.angle*(180/Math.PI)+180)%360;this._outLineLabelAngle=xt(n),this._placeFirst(r,e,1,!0),this._outLineLabelAngle=xt(o),this._placeFirst(r,e,0,!0),s.metricEnd()}_placeBack(t,e,s,i,r){const n=t.clone();let o=t.backwardLength+0;for(;n.prev()&&!(o>=i);)this._placeOnSegment(n,e,o,s,-1,r),o+=n.length+0}_placeForward(t,e,s,i,r){const n=t.clone();let o=t.remainingLength+0;for(;n.next()&&!(o>=i);)this._placeOnSegment(n,e,o,s,1,r),o+=n.length+0}_placeFirst(t,e,s,i=!1){const r=t,n=this.current.inShaping,o=n.glyphs,a=this.current.zoomLevel,{out:h,inId:l}=this.current;for(const c of o){const o=c.x>n.bounds.x?s:1-s,u=o*t.remainingLength+(1-o)*t.backwardLength,f=Math.abs(c.x+c.width/2-n.bounds.x),_=Math.max(0,a+Math.log2(f/(u+0))),d=Math.max(e,i?0:_);if(c.maxZoom=25,c.angle=t.angle+(1-s)*Math.PI,c.minZoom=d,this._writeGlyph(h,l,r.x,r.y,c),s&&this._isVisible(c.minZoom,c.maxZoom)){const t=c.bounds;h.metricBoxWrite(t.center[0],t.center[1],t.width,t.height)}}}_placeOnSegment(t,e,s,i,r,n){const o=this.current.inShaping.glyphs,{out:a,inId:h}=this.current,l=this.current.inShaping,c=this.current.zoomLevel,u=t.dx/t.length,f=t.dy/t.length,_={x:t.x+s*-r*u,y:t.y+s*-r*f};for(const u of o){const o=u.x>l.bounds.x?n:1-n;if(!(o&&1===r||!o&&-1===r))continue;const f=Math.abs(u.x+u.width/2-l.bounds.x),d=Math.max(0,c+Math.log2(f/s)-.1),m=Math.max(i,c+Math.log2(f/(s+t.length+0)));if(0!==d&&(u.angle=t.angle+(1-n)*Math.PI,u.minZoom=m,u.maxZoom=d,this._writeGlyph(a,h,_.x,_.y,u),n&&this._isVisible(u.minZoom,u.maxZoom))){const s=u.bounds,i=t.x-e.x,r=t.y-e.y;a.metricBoxWrite(s.center[0]+i,s.center[1]+r,s.width,s.height)}}}_writeGlyphs(t,e,s,i,r=this._minZoom){if(s.x<0||s.x>=512||s.y<0||s.y>=512)return;const n=s.x+this._refOffsetX,o=s.y-this._refOffsetY;for(const s of i.glyphs)s.minZoom=r,s.maxZoom=this._maxZoom,this._writeGlyph(t,e,n,o,s);const a=this._refPlacementDirX,h=this._refPlacementDirY,l=i.boundsT;t.metricStart(e,r,n,o,a,h,this._referenceSize,this._materialKey),t.metricBoxWrite(l.center[0],l.center[1],l.width,l.height),t.metricEnd()}_writeVertexCommon(t,e,s,i){const r=this._color,n=this._haloColor,o=(0,H.Jz)(0,0,this._size,this._haloSize),a=Math.max(i.minZoom,this._minZoom),h=Math.min(i.maxZoom,this._maxZoom),l=(0,H.Jz)(yt(a),yt(h),this._outLineLabelAngle,0);t.vertexWrite(s),t.vertexWrite(e),t.vertexWrite(r),t.vertexWrite(n),t.vertexWrite(o),t.vertexWrite(this._refSymbolAndPlacementOffset),t.vertexWrite(l)}}var Mt=s(21106),bt=s(1265),St=s(45699);const Pt=3.14159265359/180,wt=t=>class extends t{constructor(...t){super(...t),this.angle=0,this.xOffset=0,this.yOffset=0,this.width=0,this.height=0,this.boundsType="square",this._anchorX=0,this._anchorY=0,this._computedWidth=0,this._computedHeight=0,this._vertexBoundsScaleX=1,this._vertexBoundsScaleY=1,this._offsets={xUpperLeft:0,yUpperLeft:0,xUpperRight:0,yUpperRight:0,xBottomLeft:0,yBottomLeft:0,xBottomRight:0,yBottomRight:0},this.geometryType=T.LW.MARKER}_write(t,e,s,i){const r=e.getDisplayId();t.recordStart(r,this._materialKey,this.geometryType,!0),this._writeGeometry(t,e,r,s,i),t.recordEnd()}_writeGeometry(t,e,s,i,r){if((0,h.pC)(this._markerPlacement))return this._writePlacedMarkers(t,e,i,r);const n=r?(0,ot.oB)((0,ot.GH)(r),2):"esriGeometryPolygon"===e.geometryType?e.readCentroid():e.readGeometryForDisplay();if(!(0,h.Wi)(n)){if(n.isPoint){const[e,i]=n.coords;if(!t.hasAggregates&&t.hasPixelBufferEnabled&&(e<0||e>=512||i<0||i>=512))return;return this._writeVertices(t,s,this._getPos(e,i),e,i)}n.forEachVertex(((e,i)=>this._writeVertices(t,s,this._getPos(e,i),e,i)))}}_writePlacedMarkers(t,e,s,i){const r=null!=i?i:e.readLegacyGeometryForDisplay(),n=lt.getPlacement(r,(0,h.Wg)(this._markerPlacement),(0,G.F2)(1),s.geometryEngine);if(!n)return;const o=e.getDisplayId(),a=(0,bt.c)(),l=(0,Mt.c)();let c=n.next();for(;null!=c;){const{tx:e,ty:s}=c;e>=-128&&e<=640&&s>=-128&&s<=640&&(this._applyTransformation(l,a,c.getAngle()/Pt),this._writeVertices(t,o,this._getPos(e,s),e,s)),c=n.next()}}_writeVertices(t,e,s,i,r){const n=t.vertexCount();t.vertexBounds(i+this.xOffset,r-this.yOffset,this._computedWidth*this._vertexBoundsScaleX,this._computedHeight*this._vertexBoundsScaleY),t.vertexWrite(s),t.vertexWrite(this._offsetUpperLeft),t.vertexWrite(this._texUpperLeft),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.vertexWrite(s),t.vertexWrite(this._offsetUpperRight),t.vertexWrite(this._texUpperRight),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.vertexWrite(s),t.vertexWrite(this._offsetBottomLeft),t.vertexWrite(this._texBottomLeft),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.vertexWrite(s),t.vertexWrite(this._offsetBottomRight),t.vertexWrite(this._texBottomRight),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.indexWrite(n+0),t.indexWrite(n+1),t.indexWrite(n+2),t.indexWrite(n+1),t.indexWrite(n+3),t.indexWrite(n+2)}_applyTransformation(t,e,s=0){(0,St.a)(t,(0,bt.f)(this.xOffset,-this.yOffset)),this.angle+s!==0&&(0,St.r)(t,t,Pt*(this.angle+s));const i=this._computedWidth,r=this._computedHeight,n=(this._anchorX-.5)*i,o=(this._anchorY-.5)*r;(0,p.s)(e,n,o),(0,p.t)(e,e,t),this._offsetUpperLeft=(0,H.UJ)(16*e[0],16*e[1]),this._offsets.xUpperLeft=e[0],this._offsets.yUpperLeft=e[1],(0,p.s)(e,n+i,o),(0,p.t)(e,e,t),this._offsetUpperRight=(0,H.UJ)(16*e[0],16*e[1]),this._offsets.xUpperRight=e[0],this._offsets.yUpperRight=e[1],(0,p.s)(e,n,o+r),(0,p.t)(e,e,t),this._offsetBottomLeft=(0,H.UJ)(16*e[0],16*e[1]),this._offsets.xBottomLeft=e[0],this._offsets.yBottomLeft=e[1],(0,p.s)(e,n+i,o+r),(0,p.t)(e,e,t),this._offsetBottomRight=(0,H.UJ)(16*e[0],16*e[1]),this._offsets.xBottomRight=e[0],this._offsets.yBottomRight=e[1]}_getPos(t,e){return(0,H.UJ)(Math.round(8*t),Math.round(8*e))}};class Ct extends(wt(_t)){constructor(t,e,s,i,r,n,o,a,h,l,c,u,f,_,d,m,p,g,y,x,v,M,b){super(),this.angle=i,this.height=o,this.width=n,this.xOffset=e*y,this.yOffset=s*y,this._markerPlacement=x,this._effects=v,this._anchorX=.5-(.5+m)*d.width/d.width,this._anchorY=.5-(.5+p)*d.height/d.height,this._minMaxZoom=(0,H.UJ)(Math.round(M*k.MI),Math.round(b*k.MI));const S=(_===D.v2.MAP?k.Tz:k.CQ)|(c?k.Uh:0)|(f?k.oK:0)|(u?k.e0:0),P=d&&d.sdf,w=Y.mE.load(t);w.sdf=P,w.pattern=!0,w.textureBinding=d.textureBinding,this._materialKey=w.data,this._fillColor=r,this._outlineColor=h,this._sizeOutlineWidth=(0,H.Jz)(Math.round(Math.min(Math.sqrt(128*n),255)),Math.round(Math.min(Math.sqrt(128*o),255)),Math.round(Math.min(Math.sqrt(128*l),255)),Math.round(Math.min(Math.sqrt(128*a),255)));const C=d.rect.x+k.fL,L=d.rect.y+k.fL,I=C+d.width,T=L+d.height;this._offsets.xUpperLeft=C,this._offsets.yUpperLeft=L,this._offsets.xUpperRight=I,this._offsets.yUpperRight=L,this._offsets.xBottomLeft=C,this._offsets.yBottomLeft=T,this._offsets.xBottomRight=I,this._offsets.yBottomRight=T,this._texUpperLeft=(0,H.UJ)(C,L),this._texUpperRight=(0,H.UJ)(I,L),this._texBottomLeft=(0,H.UJ)(C,T),this._texBottomRight=(0,H.UJ)(I,T),n*=g,o*=g,n*=y,o*=y;const z=Math.round(64*g);this._bitestAndDistRatio=(0,H.UJ)(S,z),this._computedWidth=n,this._computedHeight=o;const E=(0,bt.c)(),A=(0,Mt.c)();this._applyTransformation(A,E)}static fromCIMMarker(t,e,s){const i=e&&e.width||1,r=e&&e.height||1,n=t.size,o=i/r*t.scaleX,a=t.scaleSymbolsProportionally&&t.frameHeight?n/t.frameHeight:1;let l=(0,U.t2)(t.color);const c=(0,U.t2)(t.outlineColor),u=(0,G.F2)(n),f=u*o,_=(0,G.F2)(t.offsetX||0),d=(0,G.F2)(t.offsetY||0),m=(0,G.F2)(t.outlineWidth||0)*a,p=t.alignment||D.v2.SCREEN,g=(0,G.F2)(t.referenceSize),[y,x]=tt(t.scaleInfo,s);e.sdf||0!==l||(l=-1);let v=t.rotation||0;t.rotateClockwise||(v=-v);let M=0,b=0;const S=t.anchorPoint;S&&(t.isAbsoluteAnchorPoint?n&&(M=-S.x/(n*o),b=S.y/n):(M=S.x,b=S.y));const P=new Ct(t.materialKey,_,d,v,l,f,u,g,c,m,t.colorLocked,t.scaleSymbolsProportionally,!1,p,e,M,b,t.sizeRatio,(0,h.Pt)(t.scaleFactor,1),t.markerPlacement,t.effects,y,x);return P._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/f:1,P._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/u:1,P}static fromPictureMarker(t,e){const s=Math.round((0,G.F2)(t.width)),i=Math.round((0,G.F2)(t.height)),r=k.ru,n=Math.round((0,G.F2)(t.xoffset||0)),o=Math.round((0,G.F2)(t.yoffset||0)),a=new Ct(t.materialKey,n,o,t.angle,r,s,i,i,0,0,!1,!1,!1,D.v2.SCREEN,e,0,0,1,1,null,null,0,J);return a._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.width:1,a._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.height:1,a}static fromSimpleMarker(t,e){const s=(0,U.aH)(t.color),i=Math.round((0,G.F2)(t.size)),r=i,n=Math.round((0,G.F2)(t.xoffset||0)),o=Math.round((0,G.F2)(t.yoffset||0)),a=t.style,h=t.outline,l=0|(h&&h.color&&(0,U.aH)(h.color)),c=0|(h&&h.width&&Math.round((0,G.F2)(h.width))),u=new Ct(t.materialKey,n,o,t.angle,s,i,r,r,l,c,!1,!1,"esriSMSCross"===a||"esriSMSX"===a,D.v2.SCREEN,e,0,0,126/64,1,null,null,0,J);return u.boundsType="esriSMSCircle"===a?"circle":"square",u._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.size:1,u._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.size:1,u}static fromLineSymbolMarker(t,e){const s=(0,U.aH)(t.color),i=Math.round((0,G.F2)(6*t.lineWidth)),r=i,n="cross"===t.style||"x"===t.style;let o;switch(t.placement){case"begin-end":o=D.Tx.Both;break;case"begin":o=D.Tx.JustBegin;break;case"end":o=D.Tx.JustEnd;break;default:o=D.Tx.None}const a={type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:o,offsetAlongLine:0},h=new Ct(t.materialKey,0,0,0,s,i,r,r/6,s,n?Math.round((0,G.F2)(t.lineWidth)):0,!1,!1,n,D.v2.MAP,e,0,0,126/64,1,a,null,0,J);return h.boundsType="circle"===t.style?"circle":"square",h}}var Lt=s(58333),It=s(55987),kt=(s(95401),s(5428)),Tt=s(35362),zt=s(31294);function Et(t,e,s,i,r,n,o){se=0;const a=(i-s)*n,h=r&&r.length,l=h?(r[0]-s)*n:a;let c,u,f,_,d,m=At(e,s,0,0,l,n,!0);if(m&&m.next!==m.prev){if(h&&(m=function(t,e,s,i,r,n){const o=new Array;for(let r=0,a=i.length;r<a;r++){const h=At(t,e,0,i[r]*n,r<a-1?i[r+1]*n:s*n,n,!1);h===h.next&&(h.steiner=!0),o.push(Bt(h))}o.sort(qt);for(const t of o)Gt(t,r),r=Ft(r,r.next);return r}(e,s,i,r,m,n)),a>80*n){c=f=e[0+s*n],u=_=e[1+s*n];for(let t=n;t<l;t+=n){const i=e[t+s*n],r=e[t+1+s*n];c=Math.min(c,i),u=Math.min(u,r),f=Math.max(f,i),_=Math.max(_,r)}d=Math.max(f-c,_-u),d=0!==d?1/d:0}Rt(m,t,n,c,u,d,o,0)}}function At(t,e,s,i,r,n,o){let a;if(o===function(t,e,s,i,r,n){let o=0;for(let s=i,a=r-n;s<r;s+=n)o+=(t[a+e*n]-t[s+e*n])*(t[s+1+e*n]+t[a+1+e*n]),a=s;return o}(t,e,0,i,r,n)>0)for(let s=i;s<r;s+=n)a=Wt(s+e*n,t[s+e*n],t[s+1+e*n],a);else for(let s=r-n;s>=i;s-=n)a=Wt(s+e*n,t[s+e*n],t[s+1+e*n],a);return a&&Zt(a,a.next)&&(Vt(a),a=a.next),a}function Ft(t,e=t){if(!t)return t;let s,i=t;do{if(s=!1,i.steiner||!Zt(i,i.next)&&0!==Xt(i.prev,i,i.next))i=i.next;else{if(Vt(i),i=e=i.prev,i===i.next)break;s=!0}}while(s||i!==e);return e}function Rt(t,e,s,i,r,n,o,a){if(!t)return;!a&&n&&(t=Dt(t,i,r,n));let h=t;for(;t.prev!==t.next;){const l=t.prev,c=t.next;if(n?Nt(t,i,r,n):Ot(t))e.push(l.index/s+o),e.push(t.index/s+o),e.push(c.index/s+o),Vt(t),t=c.next,h=c.next;else if((t=c)===h){a?1===a?Rt(t=Kt(t,e,s,o),e,s,i,r,n,o,2):2===a&&$t(t,e,s,i,r,n,o):Rt(Ft(t),e,s,i,r,n,o,1);break}}}function Ot(t){const e=t.prev,s=t,i=t.next;if(Xt(e,s,i)>=0)return!1;let r=t.next.next;const n=r;let o=0;for(;r!==t.prev&&(0===o||r!==n);){if(o++,Ht(e.x,e.y,s.x,s.y,i.x,i.y,r.x,r.y)&&Xt(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Nt(t,e,s,i){const r=t.prev,n=t,o=t.next;if(Xt(r,n,o)>=0)return!1;const a=r.x<n.x?r.x<o.x?r.x:o.x:n.x<o.x?n.x:o.x,h=r.y<n.y?r.y<o.y?r.y:o.y:n.y<o.y?n.y:o.y,l=r.x>n.x?r.x>o.x?r.x:o.x:n.x>o.x?n.x:o.x,c=r.y>n.y?r.y>o.y?r.y:o.y:n.y>o.y?n.y:o.y,u=Jt(a,h,e,s,i),f=Jt(l,c,e,s,i);let _=t.prevZ,d=t.nextZ;for(;_&&_.z>=u&&d&&d.z<=f;){if(_!==t.prev&&_!==t.next&&Ht(r.x,r.y,n.x,n.y,o.x,o.y,_.x,_.y)&&Xt(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,d!==t.prev&&d!==t.next&&Ht(r.x,r.y,n.x,n.y,o.x,o.y,d.x,d.y)&&Xt(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;_&&_.z>=u;){if(_!==t.prev&&_!==t.next&&Ht(r.x,r.y,n.x,n.y,o.x,o.y,_.x,_.y)&&Xt(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&Ht(r.x,r.y,n.x,n.y,o.x,o.y,d.x,d.y)&&Xt(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Wt(t,e,s,i){const r=te.create(t,e,s);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Vt(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Bt(t){let e=t,s=t;do{(e.x<s.x||e.x===s.x&&e.y<s.y)&&(s=e),e=e.next}while(e!==t);return s}function Gt(t,e){if(e=function(t,e){let s=e;const i=t.x,r=t.y;let n,o=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){const t=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(t<=i&&t>o){if(o=t,t===i){if(r===s.y)return s;if(r===s.next.y)return s.next}n=s.x<s.next.x?s:s.next}}s=s.next}while(s!==e);if(!n)return null;if(i===o)return n.prev;const a=n,h=n.x,l=n.y;let c,u=1/0;for(s=n.next;s!==a;)i>=s.x&&s.x>=h&&i!==s.x&&Ht(r<l?i:o,r,h,l,r<l?o:i,r,s.x,s.y)&&(c=Math.abs(r-s.y)/(i-s.x),(c<u||c===u&&s.x>n.x)&&Yt(s,t)&&(n=s,u=c)),s=s.next;return n}(t,e)){const s=Qt(e,t);Ft(s,s.next)}}function Dt(t,e,s,i){for(let r;r!==t;r=r.next){if(r=r||t,null===r.z&&(r.z=Jt(r.x,r.y,e,s,i)),r.prev.next!==r||r.next.prev!==r)return r.prev.next=r,r.next.prev=r,Dt(t,e,s,i);r.prevZ=r.prev,r.nextZ=r.next}return t.prevZ.nextZ=null,t.prevZ=null,function(t){let e,s=1;for(;;){let i,r=t;t=null,e=null;let n=0;for(;r;){n++,i=r;let o=0;for(;o<s&&i;o++)i=i.nextZ;let a=s;for(;o>0||a>0&&i;){let s;0===o?(s=i,i=i.nextZ,a--):0!==a&&i?r.z<=i.z?(s=r,r=r.nextZ,o--):(s=i,i=i.nextZ,a--):(s=r,r=r.nextZ,o--),e?e.nextZ=s:t=s,s.prevZ=e,e=s}r=i}if(e.nextZ=null,s*=2,n<2)return t}}(t)}function Xt(t,e,s){return(e.y-t.y)*(s.x-e.x)-(e.x-t.x)*(s.y-e.y)}function Ut(t,e,s,i){return!!(Zt(t,e)&&Zt(s,i)||Zt(t,i)&&Zt(s,e))||Xt(t,e,s)>0!=Xt(t,e,i)>0&&Xt(s,i,t)>0!=Xt(s,i,e)>0}function Ht(t,e,s,i,r,n,o,a){return(r-o)*(e-a)-(t-o)*(n-a)>=0&&(t-o)*(i-a)-(s-o)*(e-a)>=0&&(s-o)*(n-a)-(r-o)*(i-a)>=0}function Yt(t,e){return Xt(t.prev,t,t.next)<0?Xt(t,e,t.next)>=0&&Xt(t,t.prev,e)>=0:Xt(t,e,t.prev)<0||Xt(t,t.next,e)<0}function Jt(t,e,s,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-s)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Zt(t,e){return t.x===e.x&&t.y===e.y}function qt(t,e){return t.x-e.x}function Kt(t,e,s,i){let r=t;do{const n=r.prev,o=r.next.next;!Zt(n,o)&&Ut(n,r,r.next,o)&&Yt(n,o)&&Yt(o,n)&&(e.push(n.index/s+i),e.push(r.index/s+i),e.push(o.index/s+i),Vt(r),Vt(r.next),r=t=o),r=r.next}while(r!==t);return r}function $t(t,e,s,i,r,n,o){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.index!==t.index&&jt(a,t)){let h=Qt(a,t);return a=Ft(a,a.next),h=Ft(h,h.next),Rt(a,e,s,i,r,n,o,0),void Rt(h,e,s,i,r,n,o,0)}t=t.next}a=a.next}while(a!==t)}function jt(t,e){return t.next.index!==e.index&&t.prev.index!==e.index&&!function(t,e){let s=t;do{if(s.index!==t.index&&s.next.index!==t.index&&s.index!==e.index&&s.next.index!==e.index&&Ut(s,s.next,t,e))return!0;s=s.next}while(s!==t);return!1}(t,e)&&Yt(t,e)&&Yt(e,t)&&function(t,e){let s=t,i=!1;const r=(t.x+e.x)/2,n=(t.y+e.y)/2;do{s.y>n!=s.next.y>n&&s.next.y!==s.y&&r<(s.next.x-s.x)*(n-s.y)/(s.next.y-s.y)+s.x&&(i=!i),s=s.next}while(s!==t);return i}(t,e)}function Qt(t,e){const s=te.create(t.index,t.x,t.y),i=te.create(e.index,e.x,e.y),r=t.next,n=e.prev;return t.next=e,e.prev=t,s.next=r,r.prev=s,i.next=s,s.prev=i,n.next=i,i.prev=n,i}class te{constructor(){this.index=0,this.x=0,this.y=0,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}static create(t,e,s){const i=se<ee.length?ee[se++]:new te;return i.index=t,i.x=e,i.y=s,i.prev=null,i.next=null,i.z=null,i.prevZ=null,i.nextZ=null,i.steiner=!1,i}}const ee=new Array;let se=0;for(let t=0;t<8096;t++)ee.push(new te);const ie=new zt.b(0,0,0,1,0),re=new zt.b(0,0,0,1,0);function ne(t,e,s){let i=0;for(let r=1;r<s;r++){const s=t[2*(e+r-1)],n=t[2*(e+r-1)+1];i+=(t[2*(e+r)]-s)*(t[2*(e+r)+1]+n)}return i}function oe(t,e,s,i,r){let n=0;for(let o=s;o<i;o+=3){const s=2*(t.getValue(o)-r),i=2*(t.getValue(o+1)-r),a=2*(t.getValue(o+2)-r);n+=Math.abs((e[s]-e[a])*(e[i+1]-e[s+1])-(e[s]-e[i])*(e[a+1]-e[s+1]))}return n}ie.setExtent(k.I_),re.setExtent(k.I_);var ae=s(67327);const he=16,le=t=>class extends t{constructor(...t){super(...t),this.tessellationProperties={},this._tessellationOptions={halfWidth:0,pixelCoordRatio:1,offset:0},this.geometryType=T.LW.LINE}writeGeometry(t,e,s,i){this._writeGeometry(t,e,s,i)}_initializeTessellator(t){const e=Y.a.load(this._materialKey),s=Y.dk.load(this._materialKey),i=this._tessellationOptions,r=e.vvSizeFieldStops||e.vvSizeMinMaxValue||e.vvSizeScaleStops||e.vvSizeUnitValue,n=this.tessellationProperties._halfWidth<k.tQ&&!t&&!r;this.tessellationProperties.minMaxZoom=this._minMaxZoom,i.wrapDistance=65535,i.textured=this._isDashed||this._hasPattern,i.offset=this.tessellationProperties.offset,i.halfWidth=this.tessellationProperties._halfWidth;const o=n?0:1,a=s.outlinedFill?ue:ce;this._lineTessellator=new ae.z(a(this.tessellationProperties,o,o),fe(this.tessellationProperties),n)}_write(t,e,s,i){const r="esriGeometryPoint"===e.geometryType;t.recordStart(e.getDisplayId(),this._materialKey,this.geometryType,r),this._writeGeometry(t,e,i,r),t.recordEnd()}_writeGeometry(t,e,s,i){const r=null!=s?s:e.readLegacyGeometryForDisplay(),n=this._getLines(r,i);(0,h.Wi)(n)||this._writeVertices(t,e,n)}_getLines(t,e){if((0,h.Wi)(t))return null;const s=t.paths||t.rings;return(0,h.Wi)(s)?null:function(t,e){re.setPixelMargin(e);const s=re,i=-e,r=k.I_+e;let n=[],o=!1,a=0;for(;a<t.length;){const e=[],h=t[a];if(!h)return null;s.reset(Tt.V.LineString);let[l,c]=h[0];if(o)s.moveTo(l,c);else{if(l<i||l>r||c<i||c>r){o=!0;continue}e.push({x:l,y:c})}let u=!1;const f=h.length;for(let t=1;t<f;++t)if(l+=h[t][0],c+=h[t][1],o)s.lineTo(l,c);else{if(l<i||l>r||c<i||c>r){u=!0;break}e.push({x:l,y:c})}if(u)o=!0;else{if(o){const t=s.resultWithStarts();if(t)for(const e of t)n.push(e)}else n.push({line:e,start:0});a++,o=!1}}return n=n.filter((t=>t.line.length>1)),0===n.length?null:n}(s,e?256:16)}_writeVertices(t,e,s){const i=e.getDisplayId(),r=t.vertexCount(),n=this.tessellationProperties,o=this._tessellationOptions;n.out=t,n.id=i,n.indexCount=0,n.vertexCount=0,n.offset=r,o.capType=this._capType,o.joinType=this._joinType;const a=Y.dk.load(this._materialKey);this.tessellationProperties.key=a.outlinedFill?a:Y.a.load(this._materialKey);for(const{line:t,start:e}of s)o.initialDistance=e%65535,this._lineTessellator.tessellate(t,o)}},ce=(t,e,s)=>(i,r,n,o,a,h,l,c,u,f,_)=>{const d=(0,H.UJ)(_,Math.ceil(he*t._halfWidth)),m=(0,H.Jz)(Math.round(he*l),Math.round(he*c),Math.round(he*u),Math.round(he*f)),p=(0,H.Jz)(he*a,he*h,0,t._bitset),g=t.out;return g.vertexBounds(i,r,e,s),g.vertexWrite((0,H.UJ)(8*i,8*r)),g.vertexWrite(t.id),g.vertexWrite(t._fillColor),g.vertexWrite(m),g.vertexWrite(d),g.vertexWrite(t._tl),g.vertexWrite(t._br),g.vertexWrite(p),g.vertexWrite((0,H.UJ)(Math.ceil(he*t._halfReferenceWidth),0)),g.vertexWrite(t.minMaxZoom),g.vertexEnd(),t.offset+t.vertexCount++},ue=(t,e,s)=>(i,r,n,o,a,h,l,c,u,f,_)=>{const d=(0,H.Jz)(0,0,he*t._halfWidth,he*t._halfReferenceWidth),m=(0,H.Jz)(he*l+128,he*c+128,he*u+128,he*f+128),p=t.out,g=t._bitset<<24|t.id;return p.vertexBounds(i,r,e,s),p.vertexWrite((0,H.UJ)(8*i,8*r)),p.vertexWrite(g),p.vertexWrite(t._fillColor),t.key.simple||(p.vertexWrite(0),p.vertexWrite(0)),p.vertexWrite(d),p.vertexWrite(m),t.key.simple||p.vertexWrite(t.minMaxZoom),p.vertexEnd(),t.offset+t.vertexCount++},fe=t=>(e,s,i)=>{const r=t.out;r.indexWrite(e),r.indexWrite(s),r.indexWrite(i),t.indexCount+=3},_e=a.Z.getLogger("esri.views.2d.engine.webgl.WGLLineTemplate");class de extends(le(_t)){constructor(t,e,s,i,r,n,o,a,h,l,c,u,f,_,d,m,p,g,y){super();const x=Y.a.load(t);e&&(x.sdf=e.sdf,x.pattern=!0,x.textureBinding=e.textureBinding),this._capType=i,this._joinType=r,this._miterLimitCosine=Q(n),this.tessellationProperties._fillColor=o,this.tessellationProperties._tl=a,this.tessellationProperties._br=h,this._hasPattern=l,this._isDashed=c,this._zOrder=m,this._effects=p,this._minMaxZoom=(0,H.UJ)(Math.round(g*k.MI),Math.round(y*k.MI)),this._materialKey=x.data;const v=(f?k.Uh:0)|(_?k.SD:0)|(u?k._6:0);this.tessellationProperties._bitset=v,this.tessellationProperties._halfWidth=.5*s,this.tessellationProperties._halfReferenceWidth=.5*d,this.tessellationProperties.offset=0,this._initializeTessellator(!1)}static fromCIMLine(t,e,s){const i=t.color,r=t.scaleFactor||1,n=!!t.dashTemplate;let o=t.cap;n&&o===D.RL.ROUND&&(o=D.RL.SQUARE);const a=t.join,h=(0,G.F2)(t.width)*r,l=(0,G.F2)(t.referenceWidth),c=(0,G.F2)(t.miterLimit),u=i&&(0,U.t2)(i)||0,[f,_]=tt(t.scaleInfo,s);if(!e)return new de(t.materialKey,e,h,o,a,c,u,0,0,!1,n,t.scaleDash,t.colorLocked,!1,l,t.zOrder,t.effects,f,_);const{rect:d,width:m,height:p}=e,g=d.x+k.fL,y=d.y+k.fL,x=g+m,v=y+p,M=(0,H.UJ)(g,y),b=(0,H.UJ)(x,v);return new de(t.materialKey,e,h,o,a,c,u,M,b,!0,n,t.scaleDash,t.colorLocked,!1,l,t.zOrder,t.effects,f,_)}static fromFillOutline(t){var e;return t.isOutlinedFill&&t.outline&&"esriSLSSolid"===(null==(e=t.outline)?void 0:e.style)?de.fromSimpleLine({hash:"",materialKey:t.materialKey,...t.outline},null,!0):null}static fromSimpleLine(t,e,s=!1){const{color:i}=t,r="esriSLSSolid"!==t.style&&"esriSLSNull"!==t.style,n=(0,z.ws)(t.cap||"round"),o=(0,z.xV)(t.join||"round");let a=i&&"esriSLSNull"!==t.style&&(0,U.aH)(i)||0;"esriSLSNull"===t.style&&(a=0);const h=(0,G.F2)(t.width),l=t.miterLimit;if(!e)return new de(t.materialKey,e,h,n,o,l,a,0,0,!1,r,!0,!1,s,h,0,null,0,J);const{rect:c,width:u,height:f}=e,_=c.x+k.fL,d=c.y+k.fL,m=_+u,p=d+f,g=(0,H.UJ)(_,d),y=(0,H.UJ)(m,p);return new de(t.materialKey,e,h,n,o,l,a,g,y,!0,r,!0,!1,s,h,0,null,0,J)}static fromPictureLineSymbol(t,e,s,i){return _e.error("PictureLineSymbol support does not exist!"),null}}const me=t=>class extends t{constructor(...t){super(...t),this.forceLibtess=!1,this._bitset=0,this._lineTemplate=null,this.geometryType=T.LW.FILL}_maybeAddLineTemplate(t){this._lineTemplate=de.fromFillOutline(t)}_write(t,e,s,i){const r="esriGeometryPoint"===e.geometryType,n=Y.dk.load(this._materialKey);t.recordStart(e.getDisplayId(),this._materialKey,this.geometryType,r),this._writeGeometry(t,e,n,i,r),n.outlinedFill&&(0,h.pC)(this._lineTemplate)&&this._lineTemplate.writeGeometry(t,e,i,r),t.recordEnd()}_writeGeometry(t,e,s,i,r){const n=this._getGeometry(e,i,r);if((0,h.Wi)(n))return;const o=t.indexCount();if(!(n.maxLength>100)&&!this.forceLibtess&&function(t,e){const{coords:s,lengths:i,hasIndeterminateRingOrder:r}=e,n=t.indexWriter(),o=t.vertexCount();if(r)return!1;const a=n.length;let h=0;for(let t=0;t<i.length;){let e=t,r=i[t],l=ne(s,h,r);const c=[];for(;++e<i.length;){const t=i[e],n=ne(s,h+r,t);if(!(n>0))break;l+=n,c.push(h+r),r+=t}const u=n.length;Et(n,s,h,h+r,c,2,o);const f=oe(n,s,u,n.length,o),_=Math.abs(l);if(Math.abs((f-_)/Math.max(1e-7,_))>1e-5)return n.seek(a),!1;t=e,h+=r}return!0}(t,n))return void(!(o===t.indexCount())&&this._writeVertices(t,e,n.coords,n.lengths,s));const a=function(t,e){const s=t.indexWriter(),i=t.vertexCount(),{coords:r,lengths:n}=e,{buffer:o,vertexCount:a}=(0,V.b)(r,n);s.ensureSize(a);for(let t=0;t<a;t++)s.push(t+i);return o}(t,n);o!==t.indexCount()&&this._writeVertices(t,e,a,[a.length/2],s)}_writeVertices(t,e,s,i,r){const n=e.getDisplayId(),o=this._bitset<<24|n;let a=0;const h=i.reduce(((t,e)=>t+e)),l=r.dotDensity?4:10;t.vertexEnsureSize(l*h);for(const n of i){const i=n+a;for(let n=a;n<i;n++){const i=s[2*n],a=s[2*n+1],h=(0,H.UJ)(1*i,1*a);t.vertexBounds(i,a,0,0),t.vertexWrite(h),t.vertexWrite(o),r.dotDensity?t.vertexWriteF32(1/Math.abs(e.readGeometryArea())):(t.vertexWrite(this.fillColor),r.simple||(t.vertexWrite(this.tl),t.vertexWrite(this.br)),t.vertexWrite(this.aux2),t.vertexWrite(this.aux3),r.simple||t.vertexWrite(this._minMaxZoom))}a+=n}}_getGeometry(t,e,s){const i=e?(0,ot.oB)((0,ot.GH)(e),2):t.readGeometryForDisplay();return i?function(t,e){if((0,h.Wi)(t))return null;if(!function(t,e,s){let i=0;for(let e=0;e<t.lengths.length;e++){const r=t.lengths[e];for(let e=0;e<r;e++){const r=t.coords[2*(e+i)],n=t.coords[2*(e+i)+1];if(r<-128||r>s||n<-128||n>s)return!0}i+=r}return!1}(t,0,k.I_+128))return t;ie.setPixelMargin(e),ie.reset(Tt.V.Polygon);let s=0;for(let e=0;e<t.lengths.length;e++){const i=t.lengths[e];let r=t.coords[2*(0+s)],n=t.coords[2*(0+s)+1];ie.moveTo(r,n);for(let e=1;e<i;e++)r=t.coords[2*(e+s)],n=t.coords[2*(e+s)+1],ie.lineTo(r,n);ie.close(),s+=i}const i=ie.result(!1);if(!i)return null;const r=[],n=[];for(const t of i){let e=0;for(const s of t)n.push(s.x),n.push(s.y),e++;r.push(e)}return new kt.Z(r,n)}(i,s?256:8):null}};var pe=s(81485),ge=s(72233);const ye=a.Z.getLogger("esri.views.2d.engine.webgl.WGLDynamicMeshTemplate");class xe extends _t{constructor(t){super(),this._ongoingMaterialRequestMap=new Map,this._materialCache=new Map,this._dynamicPropertyMap=new Map,this._cimLayer=t}analyze(t,e,s,i,r){if(r&&0===r.length)return null;const n=r&&r.length>0,o=e.readLegacyFeature(),a=this._materialCache,h=this._cimLayer.materialHash;if(!h)return ye.error("A Dynamic mesh template must have a material hash value or function!"),Promise.reject(null);const l="function"==typeof h?h(o,s,i):h;if(a.has(l)){const t=a.get(l);return Promise.resolve(t)}const c=this._ongoingMaterialRequestMap.get(l);if(c)return c;const u=this._cimLayer,f=(0,pe.S)(u.cim,this._cimLayer.materialOverrides);f.mosaicHash=l;const{type:_,url:d}=u,m={cim:f,type:_,mosaicHash:l,url:d,size:null,dashTemplate:null,text:null,fontName:null};switch(_){case"marker":m.size=(0,ge.hf)(u.size,o,s,i);break;case"line":m.dashTemplate=u.dashTemplate;break;case"text":m.text=(0,ge.hf)(u.text,o,s,i),m.fontName=(0,ge.hf)(u.fontName,o,s,i)}const p=t.getMosaicItem(m,r).then((t=>(n||(this._ongoingMaterialRequestMap.delete(l),a.set(l,t)),t))).catch((t=>(this._ongoingMaterialRequestMap.delete(l),ye.error(".analyze()",t.message),null)));return n||this._ongoingMaterialRequestMap.set(l,p),p}}function ve(t,e){if(t&&"name"in t){const s=t;return e&&e.error(new n.Z(s.name,s.message,s.details)),!1}return!0}const Me=128;class be extends(me(xe)){constructor(t,e,s){var i;if(super(t),this._minMaxZoom=(0,H.UJ)(Math.round(e*k.MI),Math.round(s*k.MI)),j(t.color)){const e=(e,s,i)=>{const r=t.color(e,s,i);return r&&(0,U.t2)(r)||0};this._dynamicPropertyMap.set("fillColor",e)}else{const e=t.color;this.fillColor=e&&(0,U.t2)(e)||0}const r="CIMMarkerPlacementInsidePolygon"===(null==(i=t.cim.placement)?void 0:i.type)&&t.cim.placement.shiftOddRows?2:1,n=t.height;if(j(n)){const t=(t,e,s)=>n(t,e,s)*r;this._dynamicPropertyMap.set("_height",t)}else this._height=(n||0)*r;const o=t.offsetX;if(j(o)){const t=(t,e,s)=>{let i=(0,G.F2)(o(t,e,s))+Me;return i>255?i=255:i<0&&(i=0),i};this._dynamicPropertyMap.set("_offsetX",t)}else{let t=(0,G.F2)(o||0)+Me;t>255?t=255:t<0&&(t=0),this._offsetX=t}const a=t.offsetY;if(j(a)){const t=(t,e,s)=>{let i=(0,G.F2)(-a(t,e,s))+Me;return i>255?i=255:i<0&&(i=0),i};this._dynamicPropertyMap.set("_offsetY",t)}else{let t=(0,G.F2)(-a||0)+Me;t>255?t=255:t<0&&(t=0),this._offsetY=t}const l=t.scaleX;j(l)?this._dynamicPropertyMap.set("_scaleX",l):this._scaleX=l||1;const c=t.angle;if(j(c)){const t=(t,e,s)=>(0,It.Or)(c(t,e,s));this._dynamicPropertyMap.set("_angle",t)}else this._angle=(0,It.Or)(c)||0;if((0,h.pC)(t.effects)){const e=t.effects;j(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}this._cimFillLayer=t,this._fillMaterialKey=Y.dk.load(t.materialKey)}static fromCIMFill(t,e){const[s,i]=tt(t.scaleInfo,e);return new be(t,s,i)}bindFeature(t,e,s){const i=t.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(i,e,s)}));const r=this._fillMaterialKey,n=this._materialCache,o=(0,this._cimFillLayer.materialHash)(i,e,s),a=n.get(o);let h=null;if(a&&ve(a.spriteMosaicItem)&&(h=a.spriteMosaicItem),h){const{rect:t,width:e,height:s}=h,i=t.x+k.fL,n=t.y+k.fL,o=i+e,a=n+s;let l=Math.round((0,G.F2)(this._height));l>255?l=255:l<=0&&(l=a-n);let c=Math.round((0,G.F2)(this._height/s*e||0));c>255?c=255:c<=0&&(c=o-i);const u=this._scaleX,f=1;this.tl=(0,H.UJ)(i,n),this.br=(0,H.UJ)(o,a),this.aux2=(0,H.Jz)(c,l,this._offsetX,this._offsetY),this.aux3=(0,H.Jz)(u,f,this._angle,0),r.sdf=h.sdf,r.pattern=!0,r.textureBinding=h.textureBinding}else this.tl=0,this.br=0,this.aux2=0,this.aux3=0,r.sdf=!1,r.pattern=!1,r.textureBinding=0;this._materialKey=r.data}}class Se extends(le(xe)){constructor(t,e,s){super(t),this._minMaxZoom=(0,H.UJ)(Math.round(e*k.MI),Math.round(s*k.MI)),this._cimLineLayer=t;let i=0;j(t.width)||(i=.5*(0,G.F2)(t.width)),this._dynamicPropertyMap.set("_halfWidth",((e,s,r)=>j(t.width)?.5*(0,G.F2)(t.width(e,s,r)):i)),j(t.cap)?this._dynamicPropertyMap.set("_capType",t.cap):this._capType=t.cap,j(t.join)?this._dynamicPropertyMap.set("_joinType",t.join):this._joinType=t.join;const r=t.color;if(j(r)){const t=(t,e,s)=>(0,U.t2)(r(t,e,s));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=r&&(0,U.t2)(r)||0;const n=t.miterLimit;if(j(n)){const t=(t,e,s)=>Q(n(t,e,s));this._dynamicPropertyMap.set("_miterLimitCosine",t)}else this._miterLimitCosine=Q(n);if((0,h.pC)(t.effects)){const e=t.effects;j(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}this._scaleFactor=t.scaleFactor||1,this._isDashed=null!=t.dashTemplate,this.tessellationProperties._bitset=(t.colorLocked?1:0)|(t.scaleDash?1:0)<<1,this._materialKey=t.materialKey,this._initializeTessellator(!0)}static fromCIMLine(t,e){const[s,i]=tt(t.scaleInfo,e);return new Se(t,s,i)}bindFeature(t,e,s){const i=t.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(i,e,s)})),this._halfWidth*=this._scaleFactor;const r=this._materialCache,n=(0,this._cimLineLayer.materialHash)(i,e,s),o=r.get(n);let a=null;if(o&&ve(o.spriteMosaicItem)&&(a=o.spriteMosaicItem),a){this._hasPattern=!0;const{rect:t,width:e,height:s}=a,i=t.x+k.fL,r=t.y+k.fL,n=i+e,o=r+s;this.tessellationProperties._tl=(0,H.UJ)(i,r),this.tessellationProperties._br=(0,H.UJ)(n,o)}else this._hasPattern=!1,this.tessellationProperties._tl=0,this.tessellationProperties._br=0;this.tessellationProperties._fillColor=this._fillColor,this.tessellationProperties._halfWidth=this._halfWidth,this.tessellationProperties.offset=0,this.tessellationProperties._halfReferenceWidth=this.tessellationProperties._halfWidth;const h=Y.a.load(this._materialKey);a&&(h.sdf=a.sdf,h.pattern=!0,h.textureBinding=a.textureBinding),this._materialKey=h.data}}const Pe=(0,bt.c)(),we=(0,Mt.c)(),Ce=a.Z.getLogger("esri.views.2d.engine.webgl.WGLDynamicMarkerTemplate");class Le extends(wt(xe)){constructor(t,e,s){super(t),this._cimMarkerLayer=t,this._minMaxZoom=(0,H.UJ)(Math.round(e*k.MI),Math.round(s*k.MI));const i=t.color;if(j(i)){const t=(t,e,s)=>(0,U.t2)(i(t,e,s));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=(0,U.t2)(i);const r=t.outlineColor;if(j(r)){const t=(t,e,s)=>(0,U.t2)(r(t,e,s));this._dynamicPropertyMap.set("_outlineColor",t)}else this._outlineColor=(0,U.t2)(r);const n=t.size;if(j(n)){const t=(t,e,s)=>(0,G.F2)(n(t,e,s));this._dynamicPropertyMap.set("_size",t)}else this._size=(0,G.F2)(n)||0;const o=t.scaleX;j(o)?this._dynamicPropertyMap.set("_scaleX",o):this._scaleX=o||1;const a=t.offsetX;if(j(a)){const t=(t,e,s)=>(0,G.F2)(a(t,e,s));this._dynamicPropertyMap.set("xOffset",t)}else this.xOffset=(0,G.F2)(a)||0;const l=t.offsetY;if(j(l)){const t=(t,e,s)=>(0,G.F2)(l(t,e,s));this._dynamicPropertyMap.set("yOffset",t)}else this.yOffset=(0,G.F2)(l)||0;const c=t.outlineWidth;if(j(c)){const t=(t,e,s)=>(0,G.F2)(c(t,e,s));this._dynamicPropertyMap.set("_outlineWidth",t)}else this._outlineWidth=(0,G.F2)(c)||0;const u=t.rotation;if(j(u)?this._dynamicPropertyMap.set("_angle",u):this._angle=u||0,(0,h.pC)(t.effects)){const e=t.effects;j(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}if((0,h.pC)(t.markerPlacement)){const e=t.markerPlacement;j(e)?this._dynamicPropertyMap.set("_markerPlacement",e):this._markerPlacement=e}this._scaleFactor=(0,h.Pt)(t.scaleFactor,1),this._bitSet=(t.alignment===D.v2.MAP?1:0)|(t.colorLocked?1:0)<<1|(t.scaleSymbolsProportionally?1:0)<<3,this._materialKey=t.materialKey}static fromCIMMarker(t,e){const[s,i]=tt(t.scaleInfo,e);return new Le(t,s,i)}bindFeature(t,e,s){const i=t.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(i,e,s)}));const r=this._cimMarkerLayer.materialHash,o="function"==typeof r?r(i,e,s):r,a=this._materialCache.get(o);if(!a||!ve(a.spriteMosaicItem)||!a.spriteMosaicItem)return void Ce.error(new n.Z("mapview-cim","Encountered an error when binding feature"));const h=a.spriteMosaicItem,l=this._cimMarkerLayer.sizeRatio,c=h.width/h.height*this._scaleX,u=this._cimMarkerLayer.rotateClockwise?this._angle:-this._angle;let f=this._size,_=f*c;const d=this.xOffset,m=this.yOffset;this.xOffset*=this._scaleFactor,this.yOffset*=this._scaleFactor;const p=this._cimMarkerLayer.scaleSymbolsProportionally&&this._cimMarkerLayer.frameHeight?this._size/(0,G.F2)(this._cimMarkerLayer.frameHeight):1,g=this._outlineWidth*p,y=(0,G.F2)(this._cimMarkerLayer.referenceSize);let x=0,v=0;const M=this._cimMarkerLayer.anchorPoint;M&&(this._cimMarkerLayer.isAbsoluteAnchorPoint?this._size&&(x=-M.x/(this._size*c),v=M.y/this._size):(x=M.x,v=M.y)),this._sizeOutlineWidth=(0,H.Jz)(Math.round(Math.min(Math.sqrt(128*_),255)),Math.round(Math.min(Math.sqrt(128*f),255)),Math.round(Math.min(Math.sqrt(128*g),255)),Math.round(Math.min(Math.sqrt(128*y),255))),this.angle=u;const b=Math.round(64*l);this._bitestAndDistRatio=(0,H.UJ)(this._bitSet,b);const S=h.rect.x+k.fL,P=h.rect.y+k.fL,w=S+h.width,C=P+h.height;this._texUpperLeft=(0,H.UJ)(S,P),this._texUpperRight=(0,H.UJ)(w,P),this._texBottomLeft=(0,H.UJ)(S,C),this._texBottomRight=(0,H.UJ)(w,C);const L=Y.mE.load(this._materialKey);L.sdf=h.sdf,L.pattern=!0,L.textureBinding=h.textureBinding,this._materialKey=L.data,this._anchorX=.5-(.5+x)*h.width/h.width,this._anchorY=.5-(.5+v)*h.height/h.height,_*=l,f*=l,_*=this._scaleFactor,f*=this._scaleFactor,_*=h.rect.width/h.width,f*=h.rect.height/h.height,this._computedWidth=_,this._computedHeight=f,this._applyTransformation(we,Pe),this.xOffset=d,this.yOffset=m}}function Ie(t){const e=new Array(t.length);for(let s=0;s<t.length;s++)e[s]=t.charCodeAt(s);return e}class ke extends(ut(xe)){constructor(t,e,s){super(t),this._horizontalAlignment="center",this._verticalAlignment="middle",this._textToGlyphs=new Map,this._minMaxZoom=(0,H.UJ)(Math.round(e*k.MI),Math.round(s*k.MI));const i=t.scaleFactor||1;this._cimTextLayer=t;const r=t.color;if(j(r)){const t=(t,e,s)=>(0,U.t2)(r(t,e,s));this._dynamicPropertyMap.set("_color",t)}else this._color=(0,U.t2)(r);const n=t.outlineColor;if(j(n)){const t=(t,e,s)=>(0,U.t2)(n(t,e,s));this._dynamicPropertyMap.set("_haloColor",t)}else this._haloColor=(0,U.t2)(n);let o,a,l;if(j(t.size)||(o=Math.min(Math.round((0,G.F2)(t.size*t.sizeRatio)),127)),this._dynamicPropertyMap.set("_size",((e,s,i)=>j(t.size)?Math.min(Math.round((0,G.F2)(t.size(e,s,i)*t.sizeRatio)),127):o)),j(t.outlineSize)){const e=(e,s,i)=>Math.min(Math.floor(5*(0,G.F2)(t.outlineSize(e,s,i)*t.sizeRatio)),127);this._dynamicPropertyMap.set("_haloSize",e)}else this._haloSize=Math.min(Math.floor(5*(0,G.F2)(t.outlineSize*t.sizeRatio)),127);if(j(t.offsetX)||(a=Math.round((0,G.F2)(t.offsetX*t.sizeRatio))),this._dynamicPropertyMap.set("_xOffset",((e,s,i)=>j(t.offsetX)?Math.round((0,G.F2)(t.offsetX(e,s,i)*t.sizeRatio)):a)),j(t.offsetY)||(l=Math.round((0,G.F2)(t.offsetY*t.sizeRatio))),this._dynamicPropertyMap.set("_yOffset",((e,s,i)=>j(t.offsetY)?Math.round((0,G.F2)(t.offsetY(e,s,i)*t.sizeRatio)):l)),j(t.angle)?this._dynamicPropertyMap.set("_angle",t.angle):this._angle=t.angle,j(t.horizontalAlignment)?this._dynamicPropertyMap.set("_horizontalAlignment",t.horizontalAlignment):this._horizontalAlignment=t.horizontalAlignment,j(t.verticalAlignment)?this._dynamicPropertyMap.set("_verticalAlignment",t.verticalAlignment):this._verticalAlignment=t.verticalAlignment,(0,h.pC)(t.effects)){const e=t.effects;j(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}if((0,h.pC)(t.markerPlacement)){const e=t.markerPlacement;j(e)?this._dynamicPropertyMap.set("_markerPlacement",e):this._textPlacement=e}j(t.text)?this._dynamicPropertyMap.set("_text",t.text):this._text=t.text,this._scaleFactor=i;const c=Math.min(Math.round((0,G.F2)(t.referenceSize*t.sizeRatio)),127);this._referenceSize=Math.round(Math.sqrt(256*c)),this._materialKey=t.materialKey;const u=Y.qr.load(this._materialKey);u.sdf=!0,this._bitset=(t.alignment===D.v2.MAP?1:0)|(t.colorLocked?1:0)<<1,this._materialKey=u.data,this._decoration="none",this._lineHeight=1,this._lineWidth=512,this._isCIM=!0}static fromCIMText(t,e){const[s,i]=tt(t.scaleInfo,e);return new ke(t,s,i)}async analyze(t,e,s,i){const r=e.readLegacyFeature(),n=function(t,e,s,i){return"string"==typeof t.text?t.text:"function"==typeof t.text?t.text(e,s,i):""}(this._cimTextLayer,r,s,i),o=await super.analyze(t,e,s,i,Ie(n));return o&&o.glyphMosaicItems&&this._textToGlyphs.set(n,o.glyphMosaicItems),o}bindFeature(t,e,s){const i=t.readLegacyFeature();if(this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(i,e,s)})),!this._text||0===this._text.length)return void(this._shapingInfo=null);this._size*=this._scaleFactor,this._scale=this._size/k.Ex,this._xOffset*=this._scaleFactor,this._yOffset*=this._scaleFactor,this._xAlignD=(0,X.kH)(this._horizontalAlignment||"center"),this._yAlignD=(0,X.b7)(this._verticalAlignment||"baseline");const r=this._textToGlyphs.get(this._text);this.bindTextInfo(r,!1)}}const Te=128;class ze extends(me(_t)){constructor(t,e,s,i,r,n,o,a,h,l,c,u,f,_,d,m){super(),this._effects=_;const p=Y.dk.load(t);e&&(p.sdf=e.sdf,p.pattern=!0,p.textureBinding=e.textureBinding),this.fillColor=s,this.tl=i,this.br=r,this.aux2=(0,H.Jz)(n,o,a,h),this.aux3=(0,H.Jz)(l,c,u,0),this._bitset=f,this._minMaxZoom=(0,H.UJ)(Math.round(d*k.MI),Math.round(m*k.MI)),this._materialKey=p.data}static fromCIMFill(t,e,s){const i=t.color,r=i&&(0,U.t2)(i)||0,n=t.materialKey,[o,a]=tt(t.scaleInfo,s);if(!e)return new ze(n,null,r,0,0,0,0,0,0,0,0,0,t.colorLocked?k.Uh:0,t.effects,o,a);const{rect:h,width:l,height:c}=e,u=t.scaleX||1,f=h.x+k.fL,_=h.y+k.fL,d=f+l,m=_+c,p=t.height,g=u*p;let y=Math.round(p);y>255?y=255:y<=0&&(y=m-_);let x=Math.round(g);x>255?x=255:x<=0&&(x=d-f);let v=(0,G.F2)(t.offsetX||0)+Te;v>255&&(v=255);let M=(0,G.F2)(-t.offsetY||0)+Te;M>255&&(M=255);const b=(0,H.UJ)(f,_),S=(0,H.UJ)(d,m);return new ze(n,e,r,b,S,x,y,v,M,Te,Te,(0,It.s5)(t.angle),t.colorLocked?k.Uh:0,t.effects,o,a)}static fromSimpleFill(t,e,s=!1){const{color:i}=t,r=i&&"esriSFSNull"!==t.style&&(0,U.aH)(i)||0,n=s?k.Uh:0,o=t.materialKey;let a;if(e){const{rect:t,width:s,height:i}=e,h=t.x+k.fL,l=t.y+k.fL,c=h+s,u=l+i,f=(0,H.UJ)(h,l),_=(0,H.UJ)(c,u);a=new ze(o,e,r,f,_,s,i,0,0,Te,Te,0,n,null,0,J)}else a=new ze(o,null,r,0,0,0,0,0,0,0,0,0,n,null,0,J);return a._maybeAddLineTemplate(t),a}static fromPictureFill(t,e,s=!1){const i=k.ru,{rect:r,width:n,height:o}=e,a=r.x+k.fL,h=r.y+k.fL,l=a+n,c=h+o,u=(0,H.UJ)(a,h),f=(0,H.UJ)(l,c);let _=Math.round((0,G.F2)(t.width));_>255&&(_=255);let d=Math.round((0,G.F2)(t.height));d>255&&(d=255);let m=(0,G.F2)(t.xoffset)+Te;m>255&&(m=255);let p=(0,G.F2)(-t.yoffset)+Te;p>255&&(p=255);const g=t.materialKey,y=s?k.Uh:0,x=new ze(g,e,i,u,f,_,d,m,p,Te*t.xscale,Te*t.yscale,0,y,null,0,J);return x._maybeAddLineTemplate(t),x}}class Ee{constructor(){this._resolver=null}isHeld(){return!!this._resolver}async acquire(){if(!this._resolver)return this._resolver=(0,l.hh)(),Promise.resolve();await this._resolver.promise,await this.acquire()}release(){const t=this._resolver;this._resolver=null,t.resolve()}}var Ae=s(28823);const Fe=a.Z.getLogger("esri.views.2d.engine.webgl.mesh.templates.WGLTemplateStore"),Re=new Array,Oe={isOutline:!1,isOutlinedFill:!1,placement:null,stride:{fill:"default"},vvFlags:0},Ne={...Lt.eG,hash:JSON.stringify(Lt.eG),materialKey:(0,Y.jj)(T.LW.MARKER,Oe)},We={...Lt.wW,hash:JSON.stringify(Lt.wW),materialKey:(0,Y.jj)(T.LW.LINE,Oe)},Ve={...Lt.lj,hash:JSON.stringify(Lt.lj),materialKey:(0,Y.jj)(T.LW.FILL,Oe)};function Be(t,e){const s=t.length;return t.push(null),e.then((e=>t[s]=e)),t}function Ge(t){return!!(1&t)}class De{constructor(t,e){this._idCounter=1,this._templateIdCounter=1,this._idToTemplateGroup=new Map,this._symbolToTemplate=new Map,this._fetchQueue=[],this._idToResolver=new Map,this._cimTemplateCache=new Map,this._cimAnalyses=[],this._lock=new Ee,this._fetchResource=t,this._tileInfo=e}get _markerError(){return this._errorTemplates.marker[0]}get _fillError(){return this._errorTemplates.fill[0]}get _lineError(){return this._errorTemplates.line[0]}get _textError(){return this._errorTemplates.line[0]}createTemplateGroup(t,e){this._initErrorTemplates();const s=t.hash;if(this._symbolToTemplate.has(s))return this._symbolToTemplate.get(s);const i=new Array;e&&this._createMeshTemplates(i,e,!0),this._createMeshTemplates(i,t,!1);const r=this._createGroupId("expanded-cim"===t.type&&Xe(t));return this._idToTemplateGroup.set(r,i),this._symbolToTemplate.set(s,r),r}getTemplateGroup(t){return this._idToTemplateGroup.has(t)?this._idToTemplateGroup.get(t):Re}getDynamicTemplateGroup(t){return this._idToTemplateGroup.has(t)?(Ge(t)||Fe.error("mapview-template-store",`Id ${t} does not refer to a dynamic template`),this._idToTemplateGroup.get(t)):Re}getMosaicItem(t,e){const s=this._createTemplateId(),i=new Promise((t=>this._idToResolver.set(s,t)));return this._fetchQueue.push({symbol:t,id:s,glyphIds:e}),i}finalize(t){return this._fetchQueue.length||this._lock.isHeld()?async function(t,e,s){try{await t.acquire(),await e(s),t.release()}catch(e){throw t.release(),e}}(this._lock,this._fetchAllQueuedResources.bind(this),t):Promise.resolve()}_initErrorTemplates(){this._errorTemplates||(this._errorTemplates={fill:this._createMeshTemplates([],Ve,!1),marker:this._createMeshTemplates([],Ne,!1),line:this._createMeshTemplates([],We,!1)})}_fetchAllQueuedResources(t){if(!this._fetchQueue.length)return Promise.resolve();const e=this._fetchQueue,s=this._cimAnalyses;return this._fetchQueue=[],this._cimAnalyses=[],Promise.all(s).then((()=>this._fetchResource(e,t).then((t=>{for(const{id:e,mosaicItem:s}of t)this._idToResolver.get(e)(s),this._idToResolver.delete(e)})))).catch((t=>{(0,l.D_)(t)?this._fetchQueue=this._fetchQueue.concat(e):"worker:port-closed"===t.name||Fe.error(new n.Z("mapview-template-store","Unable to fetch requested texture resources",t))}))}_createGroupId(t){return this._idCounter++<<1|(t?1:0)}_createTemplateId(){return this._templateIdCounter++}async _createSMS(t){const{spriteMosaicItem:e}=await this.getMosaicItem(t);return ve(e,Fe)?Ct.fromSimpleMarker(t,e):this._markerError}async _createPMS(t){const{spriteMosaicItem:e}=await this.getMosaicItem(t);return ve(e,Fe)?Ct.fromPictureMarker(t,e):this._markerError}async _createSFS(t,e){const{spriteMosaicItem:s}=await this.getMosaicItem(t);return ve(s,Fe)?ze.fromSimpleFill(t,s,e):this._fillError}async _createPFS(t,e){const{spriteMosaicItem:s}=await this.getMosaicItem(t);return ve(s,Fe)?ze.fromPictureFill(t,s,e):this._fillError}async _createSLS(t,e){const{spriteMosaicItem:s}=await this.getMosaicItem(t);return ve(s,Fe)?de.fromSimpleLine(t,s):this._lineError}async _createLMS(t){const{spriteMosaicItem:e}=await this.getMosaicItem(t);return ve(e,Fe)?Ct.fromLineSymbolMarker(t,e):this._markerError}async _createTS(t){const{glyphMosaicItems:e}=await this.getMosaicItem(t);return dt.fromText(t,e)}async _createCIMText(t){const{glyphMosaicItems:e}=await this.getMosaicItem((0,Ae.xS)(t),Ie(t.text));return ve(e,Fe)?dt.fromCIMText(t,e,this._tileInfo):this._textError}async _createCIMFill(t){const{spriteMosaicItem:e}=await this.getMosaicItem((0,Ae.xS)(t));return ve(e,Fe)?ze.fromCIMFill(t,e,this._tileInfo):this._fillError}async _createCIMLine(t){const{spriteMosaicItem:e}=await this.getMosaicItem((0,Ae.xS)(t));return ve(e,Fe)?de.fromCIMLine(t,e,this._tileInfo):this._lineError}async _createCIMMarker(t){const{spriteMosaicItem:e}=await this.getMosaicItem((0,Ae.xS)(t));return ve(e,Fe)?Ct.fromCIMMarker(t,e,this._tileInfo):this._markerError}async _createCIM(t){const e=t.templateHash;if(this._cimTemplateCache.has(e))return this._cimTemplateCache.get(e);let s;switch(t.type){case"marker":s=await this._createCIMMarker(t);break;case"line":s=await this._createCIMLine(t);break;case"fill":s=await this._createCIMFill(t);break;case"text":s=await this._createCIMText(t)}return this._cimTemplateCache.set(e,s),s}async _createDynamicCIM(t){const e=t.templateHash;if(this._cimTemplateCache.has(e))return this._cimTemplateCache.get(e);let s;switch(t.type){case"marker":s=Le.fromCIMMarker(t,this._tileInfo);break;case"line":s=Se.fromCIMLine(t,this._tileInfo);break;case"fill":s=be.fromCIMFill(t,this._tileInfo);break;case"text":s=ke.fromCIMText(t,this._tileInfo)}return this._cimTemplateCache.set(e,s),s}_createPrimitiveMeshTemplates(t,e,s){switch(e.type){case"esriSMS":return Be(t,this._createSMS(e));case"esriPMS":return Be(t,this._createPMS(e));case"esriSFS":return Be(t,this._createSFS(e,s));case"line-marker":return Be(t,this._createLMS(e));case"esriPFS":return Be(t,this._createPFS(e,s));case"esriSLS":return Be(t,this._createSLS(e,!1));case"esriTS":return Be(t,this._createTS(e));default:return Fe.error("Unable to create mesh template for unknown symbol type {: $ }{symbol.type}"),t}}_createMeshTemplates(t,e,s){if(-1!==e.type.indexOf("3d"))return Fe.error("3D symbols are not supported with MapView"),t;if("expanded-cim"===e.type){for(const s of e.layers)"function"==typeof s.materialHash?Be(t,this._createDynamicCIM(s)):Be(t,this._createCIM(s));return t}if("composite-symbol"===e.type){for(const i of e.layers)this._createPrimitiveMeshTemplates(t,i,s);return t}return"cim"===e.type||"label"===e.type||"web-style"===e.type?t:this._createPrimitiveMeshTemplates(t,e,s)}}const Xe=t=>{if(!t.layers)return!1;for(const e of t.layers)if("function"==typeof e.materialHash)return!0;return!1};class Ue{constructor(t,e,s){this._loadPromise=(0,V.j)(),this._geometryType=t,this._idField=e,this._templateStore=s}update(t,e){(0,h.pC)(t.mesh.labels)&&(this._labelTemplates=this._createLabelTemplates(t.mesh.labels,e)),this._schema=t}_createLabelTemplates(t,e){const s=new Map;if("simple"===t.type){for(const i of t.classes){const t=vt.fromLabelClass(i,e);s.set(i.index,t)}return s}for(const i in t.classes){const r=t.classes[i];for(const t of r){const i=vt.fromLabelClass(t,e);s.set(t.index,i)}}return s}get templates(){return this._templateStore}async analyze(t,e,s,i,r,n,o){if((0,l.Hc)(o))return;let a;"dictionary"===s.type&&(a=await s.analyze(this._idField,t.copy(),e,r,n,o));let c=0;for(;t.next();){let e;if(e=a?a[c++]:(0,h.pC)(i)&&(0,_.nE)(t.getDisplayId())&&1!==t.readAttribute("cluster_count")?i.match(this._idField,t,this._geometryType,r,n):s.match(this._idField,t,this._geometryType,r,n),t.setGroupId(e),Ge(e)){const s=this._templateStore.getDynamicTemplateGroup(e);for(const e of s)e&&e.analyze&&e.analyze(this._templateStore,t,r,n)}}return await this._loadPromise,this._templateStore.finalize(o)}async analyzeGraphics(t,e,s,i,r,n){if((0,l.Hc)(n))return;const o=t.getCursor();for(s&&await s.analyze(this._idField,o.copy(),e,i,r,n);o.next();){let t=o.getGroupId();if(null!=t&&-1!==t||(t=s.match(this._idField,o,o.geometryType,i,r),o.setGroupId(t)),Ge(t)){const e=this._templateStore.getDynamicTemplateGroup(t);for(const t of e)t&&t.analyze&&t.analyze(this._templateStore,o,i,r)}o.setGroupId(t)}return await this._loadPromise,this._templateStore.finalize(n)}writeGraphic(t,e,s,i){const r=e.getGroupId(),n=e.getDisplayId(),o=this._templateStore.getTemplateGroup(r);if(t.featureStart(e.insertAfter,0),null!=n){if(Ge(r))for(const t of o)t&&t.bindFeature(e,null,null);if(o){for(const r of o)r&&r.write(t,e,s,i);t.featureEnd()}}}writeCursor(t,e,s,i,r,n,o){const a=e.getGroupId(),l=e.getDisplayId(),c=this._templateStore.getTemplateGroup(a),u=this._schema.mesh.sortKey;let f=0;if((0,h.pC)(u)&&(f=null!=u.fieldIndex?e.getComputedNumericAtIndex(u.fieldIndex):null!=u.field?e.readAttribute(u.field):e.readAttribute(this._idField),f*="asc"===u.order?1:-1),t.featureStart(0,null==f||isNaN(f)?0:f),null!=l&&c){if(Ge(a))for(const t of c)t.bindFeature(e,s,i);for(const s of c)s.write(t,e,r,o);if((0,h.pC)(n)&&t.hasRecords){const s=n&&this._findLabelRef(c);this._writeLabels(t,e,n,s,r,o)}t.featureEnd()}}_findLabelRef(t){for(const e of t)if(e instanceof Ct)return e;return null}_writeLabels(t,e,s,i,r,n){for(const o of s)if((0,h.pC)(o)&&o){const{glyphs:s,rtl:a,index:h}=o,l=this._labelTemplates.get(h);l.setZoomLevel(r),l.bindReferenceTemplate(i),l.bindTextInfo(s,a),l.write(t,e,null,n)}}}var He=s(13867),Ye=s(59266),Je=s(74465);const Ze=a.Z.getLogger("esri/views/2d/engine/webgl/util/Matcher");async function qe(t,e,s,i){switch(t.type){case"simple":return Ke.fromBasicRenderer(t,e,s,i);case"map":return Qe.fromUVRenderer(t,e,s,i);case"interval":return je.fromCBRenderer(t,e,s,i);case"dictionary":return ss.fromDictionaryRenderer(t,e,s,i);case"subtype":return $e.fromSubtypes(t,e,s,i)}}class Ke{constructor(){this.type="feature",this._defaultResult=null}static async fromBasicRenderer(t,e,s,i){const r=new Ke;if(t.symbol){const n=await(0,Ae.B3)(t.symbol,s,i),o=e.createTemplateGroup(n,null);r.setDefault(o)}return r}size(){return 1}getDefault(){return this._defaultResult}setDefault(t){this._defaultResult=t}match(t,e,s,i,r){return this.getDefault()}async analyze(t,e,s,i,r,n){return null}}class $e extends Ke{constructor(t,e){super(),this._subMatchers=t,this._subtypeField=e}static async fromSubtypes(t,e,s,i){const r=new Map,n=[];for(const o in t.renderers){const a=parseInt(o,10),h=qe(t.renderers[o],e,s,i).then((t=>r.set(a,t)));n.push(h)}return await Promise.all(n),new $e(r,t.subtypeField)}match(t,e,s,i,r){const n=e.readAttribute(this._subtypeField),o=this._subMatchers.get(n);return o?o.match(t,e,s,i,r):null}}class je extends Ke{constructor(t,e,s,i){super(),this.type="interval",this._intervals=[],this._isMaxInclusive=e,this._fieldIndex=i,this._field=t,this._normalizationInfo=s}static async fromCBRenderer(t,e,s,i){const{isMaxInclusive:r,normalizationField:n,normalizationTotal:o,normalizationType:a}=t,h=t.field,l=new je(h,r,{normalizationField:n,normalizationTotal:o,normalizationType:a},t.fieldIndex),c=await(0,Ae.B3)(t.backgroundFillSymbol,s,i);await Promise.all(t.intervals.map((async t=>{const r=await(0,Ae.B3)(t.symbol,s,i),n=await e.createTemplateGroup(r,c),o={min:t.min,max:t.max};l.add(o,n)})));const u=await(0,Ae.B3)(t.defaultSymbol,s,i);if(u){const t=await e.createTemplateGroup(u,c);l.setDefault(t)}return l}add(t,e){this._intervals.push({interval:t,result:e}),this._intervals.sort(((t,e)=>t.interval.min-e.interval.min))}size(){return super.size()+this._intervals.length}match(t,e,s,i,r){if(null==this._fieldIndex&&!this._field)return this.getDefault();const n=null!=this._fieldIndex?e.getComputedNumericAtIndex(this._fieldIndex):this._getValueFromField(e);if(!n&&(null==n||isNaN(n)))return this.getDefault();for(let t=0;t<this._intervals.length;t++){const{interval:e,result:s}=this._intervals[t],i=n>=e.min,r=this._isMaxInclusive?n<=e.max:n<e.max;if(i&&r)return s}return this.getDefault()}_needsNormalization(){const t=this._normalizationInfo;return t&&(t.normalizationField||t.normalizationTotal||t.normalizationType)}_getValueFromField(t){const e=t.readAttribute(this._field);if(!this._needsNormalization()||null==e)return e;const{normalizationField:s,normalizationTotal:i,normalizationType:r}=this._normalizationInfo,n=!!s&&t.readAttribute(s);if(r)switch(r){case"esriNormalizeByField":return n?e/n:void 0;case"esriNormalizeByLog":return Math.log(e)*Math.LOG10E;case"esriNormalizeByPercentOfTotal":return e/i*100;default:return void Ze.error(`Found unknown normalization type: ${r}`)}else Ze.error("Normalization is required, but no type was set!")}}class Qe extends Ke{constructor(t,e,s){super(),this.type="map",this._nullResult=null,this._resultsMap=new Map,this._fieldsIndex=s,this._fields=t,this._seperator=e||""}static async fromUVRenderer(t,e,s,i){const r=t.fieldDelimiter,n=[t.field];t.field2&&n.push(t.field2),t.field3&&n.push(t.field3);const o=await(0,Ae.B3)(t.backgroundFillSymbol,s,i),a=new Qe(n,r,t.fieldIndex);await Promise.all(t.map.map((async t=>{const r=await(0,Ae.B3)(t.symbol,s,i),n=await e.createTemplateGroup(r,o);"<Null>"===t.value?a.setNullResult(n):a.add(t.value,n)})));const h=await(0,Ae.B3)(t.defaultSymbol,s,i);if(h){const t=await e.createTemplateGroup(h,o);a.setDefault(t)}return a}setNullResult(t){this._nullResult=t}add(t,e){this._resultsMap.set(t.toString(),e)}size(){return super.size()+this._resultsMap.size}match(t,e,s,i,r){if(null==this._fieldsIndex&&!this._fields)return this.getDefault();const n=null!=this._fieldsIndex?e.getComputedStringAtIndex(this._fieldsIndex):this._getValueFromFields(e);if(null!==this._nullResult&&(null==n||""===n||"<Null>"===n))return this._nullResult;if(!n&&null==n)return this.getDefault();const o=n.toString();return this._resultsMap.has(o)?this._resultsMap.get(o):this.getDefault()}_getValueFromFields(t){const e=[];for(const s of this._fields){const i=t.readAttribute(s);null==i||""===i?e.push("<Null>"):e.push(i)}return e.join(this._seperator)}}let ts;async function es(){return ts||(ts=Promise.all([s.e(7319),s.e(1773),s.e(755),s.e(3471),s.e(6740)]).then(s.bind(s,72961))),ts}class ss extends Ke{constructor(t,e,s,i,r){super(),this.type="dictionary",this._groupIdCache=new He.Z(100),this._renderer=t,this._fieldMap=t.fieldMap,this._symbolFields=t.getSymbolFields(),this._templates=e,this._info=s,this._scaleFn=i,this._schemaUtilsModule=r}static async fromDictionaryRenderer(t,e,i,r){const[{default:n},o]=await Promise.all([Promise.all([s.e(7319),s.e(1773),s.e(755),s.e(36)]).then(s.bind(s,12501)),es()]),a=n.fromJSON(t.renderer);await a.fetchResources({spatialReference:i.spatialReference,fields:i.fields});const h=await async function(t,e){const s=t||1;if("number"==typeof s)return(t,e,i)=>s;const i=await(0,Ye.Yi)(s,e.spatialReference,e.fields);return(t,s,r)=>(0,Je.Z)(i,t,{$view:r},e.geometryType,s)||1}(a.scaleExpression,i);return new ss(a,e,i,h,o)}async _analyzeFeature(t,e,s,i,r){const o=t.readLegacyFeature(),a=this._scaleFn(o,s,i),h=this._attributeHash(o)+"-"+a,l=this._groupIdCache.get(h);if(l)return l;const c={...i,spatialReference:this._info.spatialReference,abortOptions:r,fields:this._info.fields},u=await this._renderer.getSymbolAsync(o,c),f=this._schemaUtilsModule.createSymbolSchema(u,this._renderer),_=(0,Ae.B3)(f,this._info,e,r).then((t=>{if("expanded-cim"!==t.type)return Ze.error(new n.Z("mapview-bad-type",`Found unexpected type ${t.type} in dictionary response`)),null;t.hash+="-"+a;for(const e of t.layers)e.scaleFactor=a,e.templateHash+="-"+a,"text"===e.type&&"string"==typeof e.text&&e.text.indexOf("[")>-1&&(e.text=(0,ge.Qs)(this._fieldMap,e.text,e.cim.textCase));return this._templates.createTemplateGroup(t,null)}));return this._groupIdCache.put(h,_,1),_}async analyze(t,e,s,i,r,n){const o=e.getCursor(),a=[];for(;o.next();)a.push(this._analyzeFeature(o,s,i,r,n));return Promise.all(a)}match(t,e,s,i,r){return null}_attributeHash(t){let e="";for(const s of this._symbolFields){const i=this._fieldMap[s];i&&(e+=t.attributes[i]+"-")}return e}}var is=s(47988);class rs{constructor(t){this._remoteClient=t,this._resourceMap=new Map,this._inFlightResourceMap=new Map,this.geometryEngine=null}destroy(){}async fetchResource(t,e){const s=this._resourceMap,i=s.get(t);if(i)return i;let r=this._inFlightResourceMap.get(t);if(r)return r;try{r=this._remoteClient.invoke("tileRenderer.fetchResource",{url:t},{...e}),this._inFlightResourceMap.set(t,r),r.then((e=>(this._inFlightResourceMap.delete(t),s.set(t,e),e)))}catch(t){return(0,l.D_)(t)?null:{width:0,height:0}}return r}getResource(t){var e;return null!=(e=this._resourceMap.get(t))?e:null}}function ns(t,e){return(!t.minScale||t.minScale>=e)&&(!t.maxScale||t.maxScale<=e)}function os(t){const e=t.message,s={message:{data:{},tileKey:e.tileKey,tileKeyOrigin:e.tileKeyOrigin},transferList:new Array};for(const t in e.data){const i=e.data[t];if(s.message.data[t]=null,(0,h.pC)(i)){const e=i.stride,r=i.indices.slice(0),n=i.vertices.slice(0),o=i.records.slice(0),a={stride:e,indices:r,vertices:n,records:o,metrics:(0,h.Po)(i.metrics,(t=>t.slice(0)))};s.transferList.push(r,n,o),s.message.data[t]=a}}return s}a.Z.getLogger("esri.views.2d.layers.features.processors.SymbolProcessor");let as=class extends is.Z{constructor(){super(...arguments),this.type="symbol",this._matchers={feature:null,aggregate:null},this._bufferData=new Map,this._bufferIds=new Map}initialize(){this.handles.add([this.tileStore.on("update",this.onTileUpdate.bind(this))]),this._resourceManagerProxy=new rs(this.remoteClient)}destroy(){this._resourceManagerProxy.destroy()}get supportsTileUpdates(){return!0}forEachBufferId(t){this._bufferIds.forEach((e=>{e.forEach(t)}))}async update(t,e){const s=e.schema.processors[0];if("symbol"!==s.type)return;const i=(0,u.Hg)(this._schema,s);(0,u.uD)(i,"mesh")&&((0,o.Z)("esri-2d-update-debug")&&console.debug("Applying Update - Processor:",i),t.mesh=!0,t.why.mesh.push("Symbology changed"),this._schema=s,this._factory=this._createFactory(s),this._factory.update(s,this.tileStore.tileScheme.tileInfo))}onTileMessage(t,e,s,i){return(0,l.k_)(i),this._onTileData(t,e,s,i)}onTileClear(t){return this._bufferData.delete(t.key.id),this._bufferIds.delete(t.key.id),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:t.id,data:{clear:!0}})}onTileError(t,e,s){const i=s.signal,r={tileKey:t.id,error:e};return this.remoteClient.invoke("tileRenderer.onTileError",r,{signal:i})}onTileUpdate(t){for(const e of t.removed)this._bufferData.has(e.key.id)&&this._bufferData.delete(e.key.id),this._bufferIds.has(e.key.id)&&this._bufferIds.delete(e.key.id);for(const e of t.added)this._bufferData.forEach((t=>{for(const s of t)s.message.tileKey===e.id&&this._updateTileMesh("append",e,os(s),[],!1,!1,null)}))}_addBufferData(t,e){this._bufferData.has(t)||this._bufferData.set(t,[]),this._bufferData.get(t).push(os(e))}_createFactory(t){const{geometryType:e,objectIdField:s,fields:i}=this.service,r={geometryType:e,fields:i,spatialReference:f.Z.fromJSON(this.spatialReference)},n=new De(((t,e)=>this.remoteClient.invoke("tileRenderer.getMaterialItems",t,e)),this.tileStore.tileScheme.tileInfo),{matcher:o,aggregateMatcher:a}=t.mesh;return this._store=n,this._matchers.feature=qe(o,n,r,this._resourceManagerProxy),this._matchers.aggregate=(0,h.Po)(a,(t=>qe(t,n,r,this._resourceManagerProxy))),new Ue(e,s,n)}async _onTileData(t,e,s,i){(0,l.k_)(i);const{type:r,addOrUpdate:n,remove:o}=e,a=e.end,c=!!this._schema.mesh.sortKey;if(!n){const e={type:r,addOrUpdate:null,remove:o,clear:!1,end:a,sort:c};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:t.id,data:e},i)}const u=this._processFeatures(t,n,s,i);try{const s=await u;if((0,h.Wi)(s)){const e={type:r,addOrUpdate:null,remove:o,clear:!1,end:a,sort:c};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:t.id,data:e},i)}const n=[];for(const e of s){let s=!1;const i=e.message.bufferIds,r=t.key.id,o=e.message.tileKey;if(r!==o&&(0,h.pC)(i)){if(!this.tileStore.get(o)){this._addBufferData(r,e),n.push(e);continue}let t=this._bufferIds.get(o);t||(t=new Set,this._bufferIds.set(o,t));const a=Array.from(i);for(const e of a){if(t.has(e)){s=!0;break}t.add(e)}}s||(this._addBufferData(r,e),n.push(e))}await(0,l.$6)(n.map((s=>{const n=t.key.id===s.message.tileKey,o=n?e.remove:[],a=n&&e.end;return this._updateTileMesh(r,t,s,o,a,e.clear,i.signal)})))}catch(e){this._handleError(t,e,i)}}async _updateTileMesh(t,e,s,i,r,n,o){const a=t,c=s.message.tileKey,u=!!this._schema.mesh.sortKey;c!==e.key.id&&(r=!1);const f=(0,h.Po)(s,(t=>t.message)),_=(0,h.Po)(s,(t=>t.transferList))||[],d={type:a,addOrUpdate:f,remove:i,clear:!1,end:r,sort:u},m={transferList:(0,h.Wg)(_)||[],signal:o};return(0,l.k_)(m),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:c,data:d},m)}async _processFeatures(t,e,s,i){if((0,h.Wi)(e)||!e.hasFeatures)return null;const r={transform:t.transform,hasZ:!1,hasM:!1},n=this._factory,o={viewingMode:"",scale:t.scale},a=await this._matchers.feature,c=await this._matchers.aggregate;(0,l.k_)(i);const u=this._getLabelInfos(t,e);return await n.analyze(e.getCursor(),this._resourceManagerProxy,a,c,r,o),(0,l.k_)(i),this._writeFeatureSet(t,e,r,u,n,s)}_writeFeatureSet(t,e,s,i,r,n){const o=e.getSize(),a=new W(t.key.id,{features:o,records:o,metrics:0},this._schema.mesh.matcher.stride,n,!0),l={viewingMode:"",scale:t.scale},c=e.getCursor();for(;c.next();)try{const e=c.getDisplayId(),n=(0,h.pC)(i)?i.get(e):null;r.writeCursor(a,c,s,l,t.level,n,this._resourceManagerProxy)}catch(t){}const u=t.tileInfoView.tileInfo.isWrappable;return a.serialize(u)}_handleError(t,e,s){if(!(0,l.D_)(e)){const i={tileKey:t.id,error:e.message};return this.remoteClient.invoke("tileRenderer.onTileError",i,{signal:s.signal})}}_getLabelingSchemaForScale(t){const e=this._schema.mesh.labels;if((0,h.Wi)(e))return null;if("subtype"===e.type){const s={type:"subtype",classes:{}};let i=!1;for(const r in e.classes){const n=e.classes[r].filter((e=>ns(e,t.scale)));i=i||!!n.length,s.classes[r]=n}return i?s:null}const s=e.classes.filter((e=>ns(e,t.scale)));return s.length?{type:"simple",classes:s}:null}_getLabels(t,e){if("subtype"===e.type){var s;const i=this.service.subtypeField,r=(0,h.s3)(i,"Expected to find subtype Field"),n=t.readAttribute(r);return null==n?[]:null!=(s=e.classes[n])?s:[]}return e.classes}_getLabelInfos(t,e){const s=this._getLabelingSchemaForScale(t);if((0,h.Wi)(s))return null;const i=new Map,n=e.getCursor();for(;n.next();){const t=n.getDisplayId(),e=[],o=(0,_.nE)(t),a=o&&1!==n.readAttribute("cluster_count")?"aggregate":"feature",h=this._getLabels(n,s);for(const s of h){if(s.target!==a)continue;const i=n.getStorage(),h=o&&"feature"===a?i.getComputedStringAtIndex(n.readAttribute("referenceId"),s.fieldIndex):i.getComputedStringAtIndex(t,s.fieldIndex);if(!h)continue;const l=(0,r.E)(h.toString()),c=l[0],u=l[1];this._store.getMosaicItem(s.symbol,Ie(c)).then((t=>{e[s.index]={glyphs:t.glyphMosaicItems,rtl:u,index:s.index}}))}i.set(t,e)}return i}};as=(0,i._)([(0,c.j)("esri.views.2d.layers.features.processors.SymbolProcessor")],as);const hs=as},14867:(t,e,s)=>{function i(t,e,s,i){const r=t.clone(),n=1<<r.level,o=r.col+e,a=r.row+s;return i&&o<0?(r.col=o+n,r.world-=1):o>=n?(r.col=o-n,r.world+=1):r.col=o,r.row=a,r}s.d(e,{M:()=>i}),s(3651)},28823:(t,e,s)=>{s.d(e,{xS:()=>y,B3:()=>g});var i=s(81485),r=s(66039),n=s(63523);const o={marker:r.LW.MARKER,fill:r.LW.FILL,line:r.LW.LINE,text:r.LW.TEXT};class a{constructor(t,e,s,i){const r={minScale:null==e?void 0:e.minScale,maxScale:null==e?void 0:e.maxScale},a=function(t){return t.minScale||t.maxScale?t.minScale+"-"+t.maxScale:""}(r);this.layers=t,this.data=e,this.hash=this._createHash()+a,this.rendererKey=s;const h={isOutline:!1,isOutlinedFill:!1,placement:null,stride:{fill:"default"},vvFlags:s};for(const e of t){const t=o[e.type];e.materialKey=(0,n.jj)(t,h),e.maxVVSize=i,e.scaleInfo=r,e.templateHash+=a}}get type(){return"expanded-cim"}_createHash(){let t="";for(const e of this.layers)t+=e.templateHash;return t}}var h=s(32243),l=s(20102),c=s(95330),u=s(17452),f=s(65587),_=s(25929),d=s(27391);async function m(t,e,s){if(!t.name)return Promise.reject(new l.Z("style-symbol-reference-name-missing","Missing name in style symbol reference"));if(t.styleName&&"Esri2DPointSymbolsStyle"===t.styleName)return async function(t,e){const s=d.wm.replace(/\{SymbolName\}/gi,t.name);try{const t=await(0,d.EJ)(s,e);return(0,d.KV)(t.data)}catch(t){return(0,c.k_)(t),null}}(t,s);try{return async function(t,e,s,i){const r=t.data,n={portal:s&&s.portal||f.Z.getDefault(),url:(0,u.mN)(t.baseUrl),origin:"portal-item"},o=r.items.find((t=>t.name===e));if(!o)throw new l.Z("symbolstyleutils:symbol-name-not-found",`The symbol name '${e}' could not be found`,{symbolName:e});let a=(0,_.f)((0,d.v9)(o,"cimRef"),n);(0,h.XO)()&&(a=(0,h.pJ)(a));try{const t=await(0,d.EJ)(a,i);return(0,d.KV)(t.data)}catch(t){return(0,c.k_)(t),null}}(await(0,d.n2)(t,e,s),t.name,e,s)}catch(t){return(0,c.k_)(t),null}}const p=async(t,e,s)=>new a(await(0,i.c)(t.data,e,s),t.data,t.rendererKey,t.maxVVSize),g=async(t,e,s,i)=>{if(!t)return null;if("cim"===t.type)return p(t,e,s);if("web-style"===t.type){const r={type:"cim",data:await m(t,null,i),rendererKey:t.rendererKey,maxVVSize:t.maxVVSize};return p(r,e,s)}return t};function y(t){if(!t)return null;const{type:e,cim:s,url:i,materialHash:r}=t,n={cim:s,type:e,mosaicHash:r,url:i,size:null,dashTemplate:null,path:null,text:null,fontName:null};switch(e){case"marker":n.size=t.size,n.path=t.path;break;case"line":n.dashTemplate=t.dashTemplate;break;case"text":n.text=t.text,n.fontName=t.fontName}return n}}}]);