@arcgis/core 5.1.0-next.83 → 5.1.0-next.85
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{e89dc473f46a5584d2ef.js → 004af103a94d21cb4889.js} +3 -3
- package/assets/esri/core/workers/chunks/53d13e13d8729bd4dcf2.js +1 -0
- package/assets/esri/core/workers/chunks/{45c83eb7c2a06166e3b0.js → 56717ff315c6ec874142.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e2c0c6d724f7639d4c1.js → 713ab619060bd5087479.js} +13 -13
- package/assets/esri/core/workers/chunks/{a9b5ce00323cd5574bf7.js → 7160e3e7340beb7fdb42.js} +1 -1
- package/assets/esri/core/workers/chunks/79eca9ccd4dc52da1d59.js +1 -0
- package/assets/esri/core/workers/chunks/{bd8cb64b6e08839398f3.js → c7da0981822182e15f3a.js} +1 -1
- package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +596 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +6 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/chunks/EdgeShader.glsl.js +13 -9
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/GlowBlur.glsl.js +9 -13
- package/chunks/GlowComposition.glsl.js +10 -10
- package/chunks/ShadowCastVisualize.glsl.js +10 -10
- package/config.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/screenUtils.js +1 -1
- package/form/types.d.ts +1 -1
- package/geohash/GeohashCell.js +1 -1
- package/geohash/GeohashTree.js +1 -1
- package/kernel.js +1 -1
- package/layers/scene/ModelFileInfo.js +1 -1
- package/layers/scene/modelQuerySupport.js +1 -1
- package/package.json +1 -1
- package/popup/Features.d.ts +10 -0
- package/popup/Features.js +1 -1
- package/rest/knowledgeGraph/GraphQueryStreamingResult.d.ts +4 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/views/2d/FrameTask.js +1 -1
- package/views/2d/LabelManager.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/flow/FlowContainer.js +1 -1
- package/views/2d/engine/flow/FlowView2D.js +1 -1
- package/views/2d/engine/flow/styles/AFlowResources.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Stack.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/transitions/FadeTransition.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/webgl/AFeatureTile.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/ResizableUint32Array.js +2 -0
- package/views/2d/engine/webgl/TileCpuState.js +2 -0
- package/views/2d/engine/webgl/TileGpuState.js +2 -0
- package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +2 -0
- package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +2 -0
- package/views/2d/engine/webgl/cpuMapped/GpuMeshState.js +2 -0
- package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugContainer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestDisplayObject.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/FeatureTilePresentStrategy.js +2 -0
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/aggregation/AAggregateSpatialIndex.js +1 -1
- package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
- package/views/2d/layers/features/aggregation/GridCell.js +1 -1
- package/views/2d/layers/features/aggregation/GridIndexCell.js +2 -0
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceMessage.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
- package/views/2d/layers/features/support/Hashed.js +2 -0
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicStore.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
- package/views/2d/tiling/TileCombinedCoverage.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +2 -0
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool2.js +2 -0
- package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +2 -0
- package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/environment/CloudyWeather.js +1 -1
- package/views/3d/environment/FoggyWeather.js +1 -1
- package/views/3d/environment/RainyWeather.js +1 -1
- package/views/3d/environment/SnowyWeather.js +1 -1
- package/views/3d/environment/SunnyWeather.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl/ManagedColorAttachment.js +1 -1
- package/views/3d/webgl/ManagedDepthAttachment.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +11 -11
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +2 -0
- package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/raymarching/{RayDistanceFalloff.glsl.js → DistanceFalloff.glsl.js} +2 -2
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/StencilUtils.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -7
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/support/rasterHitTestUtils.js +1 -1
- package/views/support/waitForResources.js +1 -1
- package/views/video/VideoOperationalDataView.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/textureUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.d.ts +61 -0
- package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +2 -0
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +9 -4
- package/widgets/BatchAttributeForm/templates/UtilityNetworkAssociationsElementTemplate.js +2 -0
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.d.ts +17 -2
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GroupColumn.d.ts +7 -1
- package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +9 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/FeatureTable/support/types.d.ts +8 -0
- package/widgets/FeatureTable.js +1 -1
- package/assets/esri/core/workers/chunks/38f1a86b8dd9ee684ee5.js +0 -596
- package/assets/esri/core/workers/chunks/8f4cd30ce23e41c1a42c.js +0 -1
- package/assets/esri/core/workers/chunks/cbf1a03f54bd8d2a2b47.js +0 -1
- package/views/2d/engine/webgl/PooledUint32Array.js +0 -2
- package/views/2d/engine/webgl/cpuMapped/Buffer.js +0 -2
- package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +0 -2
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +0 -2
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DistanceFalloff.glsl.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2649],{85560(t,e,s){function i(){const t=new Float32Array(6);return t[0]=1,t[3]=1,t}function n(t,e,s,i){const n=e[i],r=e[i+1];t[i]=s[0]*n+s[2]*r+s[4],t[i+1]=s[1]*n+s[3]*r+s[5]}s.d(e,{vt:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,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},create:i,fromValues:function(t,e,s,i,n,r){const o=new Float32Array(6);return o[0]=t,o[1]=e,o[2]=s,o[3]=i,o[4]=n,o[5]=r,o},transform:n,transformMany:function(t,e,s,i=0,r=0,o=2){const a=r||e.length/o;for(let r=i;r<a;r++)n(t,e,s,r*o)}},Symbol.toStringTag,{value:"Module"}))},88340(t,e,s){function i(){return new Float32Array(2)}function n(t,e){const s=new Float32Array(2);return s[0]=t,s[1]=e,s}function r(){return i()}function o(){return n(1,1)}function a(){return n(1,0)}function h(){return n(0,1)}s.d(e,{Un:()=>c,fA:()=>n,uY:()=>l,vt:()=>i});const l=r(),c=o(),u=a(),_=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:_,ZEROS:l,clone:function(t){const e=new Float32Array(2);return e[0]=t[0],e[1]=t[1],e},create:i,fromValues:n,ones:o,unitX:a,unitY:h,zeros:r},Symbol.toStringTag,{value:"Module"}))},16905(t,e,s){s.d(e,{$0:()=>h,D_:()=>n,Tl:()=>a,e$:()=>o,lw:()=>r});var i=s(34304);function n(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function r(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=s[0],c=s[1],u=s[2],_=s[3],f=s[4],p=s[5];return t[0]=i*l+r*c,t[1]=n*l+o*c,t[2]=i*u+r*_,t[3]=n*u+o*_,t[4]=i*f+r*p+a,t[5]=n*f+o*p+h,t}function o(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=Math.sin(s),c=Math.cos(s);return t[0]=i*c+r*l,t[1]=n*c+o*l,t[2]=i*-l+r*c,t[3]=n*-l+o*c,t[4]=a,t[5]=h,t}function a(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=s[0],c=s[1];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=i*l+r*c+a,t[5]=n*l+o*c+h,t}function h(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 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(Object.defineProperty({__proto__:null,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},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},determinant:function(t){return t[0]*t[3]-t[1]*t[2]},equals:function(t,e){const s=t[0],n=t[1],r=t[2],o=t[3],a=t[4],h=t[5],l=e[0],c=e[1],u=e[2],_=e[3],f=e[4],p=e[5],d=(0,i.FD)();return Math.abs(s-l)<=d*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(r-u)<=d*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-_)<=d*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(a-f)<=d*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(h-p)<=d*Math.max(1,Math.abs(h),Math.abs(p))},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]},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)},fromRotation:h,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:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t},identity:n,invert:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5];let h=s*r-i*n;return h?(h=1/h,t[0]=r*h,t[1]=-i*h,t[2]=-n*h,t[3]=s*h,t[4]=(n*a-r*o)*h,t[5]=(i*o-s*a)*h,t):null},mul:c,multiply:r,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},rotate:o,scale:function(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=s[0],c=s[1];return t[0]=i*l,t[1]=n*l,t[2]=r*c,t[3]=o*c,t[4]=a,t[5]=h,t},set:function(t,e,s,i,n,r,o){return t[0]=e,t[1]=s,t[2]=i,t[3]=n,t[4]=r,t[5]=o,t},str:function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},sub:u,subtract:l,translate:a},Symbol.toStringTag,{value:"Module"}))},36745(t,e,s){s.d(e,{z:()=>a});var i=s(4718),n=s(51118),r=s(60408),o=s(92722);class a{static fromOptimized(t,e,s=1){return(new h).initialize(t,e,s)}static fromJSON(t){const[e,s]=c(t),i=(0,r.Pv)(t),n=(0,r.W0)(t);return(new u).initialize(e,s,i,n,1)}static fromOptimizedCIM(t,e,s=1){return(new _).initialize(t,e,s)}static fromJSONCIM(t,e=1){const[s,i]=c(t),n=(0,r.Pv)(t),o=(0,r.W0)(t);return(new f).initialize(s,i,n,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new _).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSON(t,e=!1,s=!1){return(new u).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new _).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new f).initialize([],t,e,s,i)}asJSON(){const t=(0,n.x)(this),{hasZ:e,hasM:s}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:s}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:s?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:s}:{paths:t,hasZ:e,hasM:s}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,n=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+n),-.5*s}invertY(){this.yFactor*=-1}}class h extends a{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,s){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=s,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,s=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],e.slice(s,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let n=this._pathOffset+e;n<t;n+=e){const t=s[n-e],r=s[n-e+1],o=s[n]-t,a=s[n+1]-r;i+=Math.sqrt(o*o+a*a)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new h).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function c(t){return(0,r.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,r.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,r.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,r.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,r.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class u extends a{initialize(t,e,s,i,n){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=n,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],n=e[i],r=t[0],o=t[1],a=n[0]-r,h=n[1]-o;s+=Math.sqrt(a*a+h*h)}return s}startPath(){this._paths.push([])}getCurrentPath(){return(new u).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,n.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,s=new o.A([],[],t,e),{coords:i,lengths:n}=s;if("esriGeometryPoint"===this.geometryType)i.push(...this._paths[0][0]),n.length=0;else for(const s of this._paths){for(const n of s)i.push(n[0]),i.push(n[1]*this.yFactor),t&&i.push(n[2]),e&&i.push(n[this._mIndex]);n.push(s.length)}return s}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new u).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class _ extends h{initialize(t,e,s){return super.initialize(t,e,s),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new _).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class f extends u{initialize(t,e,s,i,n){return super.initialize(t,e,s,i,n)}clone(){return(new f).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},32011(t,e,s){s.d(e,{d:()=>h});var i=s(19419),n=s(537),r=s(12359),o=s(95108),a=s(12176);function h(t){if(0===t.totalSize)return null;const e=(0,n.z8)(t);if(!e)return null;const s=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let o=0,a=0;t.reset();for(let e=0;t.nextPath();e++){const s=t.getCurrentRingArea();s>a&&(a=s,o=e)}if(t.seekPath(o),0===t.pathSize)return null;t.seekPathStart();const h=(0,n.B$)(t);if(Math.abs(a)<=2*s*s)return[(h[0]+h[2])/2,(h[1]+h[3])/2];t.seekPathStart();const _=(0,r.w2)(t,(0,i.vt)());if(null===_)return null;if(t.totalPoints<4)return _;const f=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],p=[NaN,NaN,NaN,NaN],y=[NaN,NaN,NaN,NaN];let P=!1,x=c(_,t,!0);0===x.distance&&(P=!0,f[0][0]=_[0],f[0][1]=_[1],x=c(_,t,!1)),p[0]=x.distance,y[0]=0;const M=[NaN,NaN];let b=!1,S=.25,C=-1,w=NaN;do{if(w=NaN,f[1]=u(t,d(h[0],h[2],S),0,e),isNaN(f[1][0])||isNaN(f[1][1])||(x=c(f[1],t,!1),w=x.distance),!isNaN(w)&&w>s&&l(f[1],t))b=!0,p[1]=w,y[1]=m(f[1],_);else if(!isNaN(w)&&w>C&&(C=w,M[0]=f[1][0],M[1]=f[1][1]),S-=.01,S<.1){if(!(C>=0))break;b=!0,p[1]=C,f[1][0]=M[0],f[1][1]=M[1],y[1]=m(f[1],_)}}while(!b);b=!1,S=.5,C=-1;let k=.01,I=1;do{if(w=NaN,f[2]=u(t,d(h[0],h[2],S),0,e),isNaN(f[2][0])||isNaN(f[2][1])||(x=c(f[2],t,!1),w=x.distance),!isNaN(w)&&w>s&&l(f[2],t))b=!0,p[2]=w,y[2]=m(f[2],_);else if(!isNaN(w)&&w>C)C=w,M[0]=f[2][0],M[1]=f[2][1];else if(w>C&&(C=w,M[0]=f[2][0],M[1]=f[2][1]),S=.5+k*I,k+=.01,I*=-1,S<.3||S>.7){if(!(C>=0))break;b=!0,p[2]=C,f[2][0]=M[0],f[2][1]=M[1],y[2]=m(f[2],_)}}while(!b);b=!1,S=.75,C=-1;do{if(w=NaN,f[3]=u(t,d(h[0],h[2],S),0,e),isNaN(f[3][0])||isNaN(f[3][1])||(x=c(f[3],t,!1),w=x.distance),!isNaN(w)&&w>s&&l(f[3],t))b=!0,p[3]=w,y[3]=m(f[3],_);else if(w>C&&(C=w,M[0]=f[3][0],M[1]=f[3][1]),S+=.01,S>.9){if(!(C>=0))break;b=!0,p[3]=C,f[3][0]=M[0],f[3][1]=M[1],y[3]=m(f[3],_)}}while(!b);const z=[0,1,2,3],v=P?0:1;let T;for(let t=v;t<4;t++)for(let t=v;t<3;t++){const e=y[t],s=y[t+1];g(e,s)>0&&(T=z[t],z[t]=z[t+1],z[t+1]=T,y[t]=s,y[t+1]=e)}let A=v,L=0,E=0;for(let t=v;t<4;t++){switch(t){case 0:E=2*p[z[t]];break;case 1:E=1.66666666*p[z[t]];break;case 2:E=1.33333333*p[z[t]];break;case 3:E=p[z[t]]}E>L&&(L=E,A=z[t])}return f[A]}function l(t,e){let s,i,n,r,o=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(s=e.x,i=e.y;e.nextPoint();s=n,i=r)n=e.x,r=e.y,i>t[1]!=r>t[1]&&((n-s)*(t[1]-i)-(r-i)*(t[0]-s)>0?o++:o--);return 0!==o}function c(t,e,s){if(s&&l(t,e))return{coord:t,distance:0};let i=1/0,n=0,r=0,a=[0,0],h=[0,0];const c=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(a[0]=e.x,a[1]=e.y;e.nextPoint();a=h){h=[e.x,e.y],(0,o.gR)(c,t,a,h);const s=m(t,c);s<i&&(i=s,n=c[0],r=c[1])}return{coord:[n,r],distance:Math.sqrt(i)}}function u(t,e,s,n){const r=[e,0];let o=1/0,h=1/0,l=!1,c=!1;const u=[[e,n[1]-1],[e,n[3]+1]],p=[0,0],d=[0,0],m=[0,0],g=[[0,0],[0,0]],y=(0,i.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(g[0][0]=t.x,g[0][1]=t.y;t.nextPoint();g[0][0]=g[1][0],g[0][1]=g[1][1]){if(g[1][0]=t.x,g[1][1]=t.y,null===_(y,g))continue;if(d[0]=u[0][0],d[1]=u[0][1],m[0]=u[1][0],m[1]=u[1][1],0===f(y,d,m))continue;if(!(0,a.Ql)(u[0],u[1],g[0],g[1],p))continue;const e=p[1];o>h?e<o&&(o=e,l=!0):e<h&&(h=e,c=!0)}return l&&c?r[1]=(o+h)/2:r[0]=r[1]=NaN,r}function _(t,e){if(e.length<2)return null;t||(t=(0,i.vt)());const[s,n]=e[0],[r,o]=e[1];return t[0]=Math.min(s,r),t[1]=Math.min(n,o),t[2]=Math.max(s,r),t[3]=Math.max(n,o),t}function f(t,e,s){let i=p(e,t),n=p(s,t);const r=t[0],o=t[1],a=t[2],h=t[3];if(i&n)return 0;if(!(i|n))return 4;const l=(i?1:0)|(n?2:0);do{const l=s[0]-e[0],c=s[1]-e[1];if(l>c)3&i?(1&i?(e[1]+=c*(r-e[0])/l,e[0]=r):(e[1]+=c*(a-e[0])/l,e[0]=a),i=p(e,t)):3&n?(1&n?(s[1]+=c*(r-s[0])/l,s[0]=r):(s[1]+=c*(a-s[0])/l,s[0]=a),n=p(s,t)):i?(4&i?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),i=p(e,t)):(4&n?(s[0]+=l*(o-s[1])/c,s[1]=o):(s[0]+=l*(h-s[1])/c,s[1]=h),n=p(s,t));else if(12&i?(4&i?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),i=p(e,t)):12&n?(4&n?(s[0]+=l*(o-s[1])/c,s[1]=o):(s[0]+=l*(h-s[1])/c,s[1]=h),n=p(s,t)):i?(1&i?(e[1]+=c*(r-e[0])/l,e[0]=r):(e[1]+=c*(a-e[0])/l,e[0]=a),i=p(e,t)):(1&n?(s[1]+=c*(r-s[0])/l,s[0]=r):(s[1]+=c*(a-s[0])/l,s[0]=a),n=p(s,t)),i&n)return 0}while(i|n);return l}function p(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function d(t,e,s){return t+(e-t)*s}function m(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function g(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const s=isNaN(t),i=isNaN(e);return s<i?-1:s>i?1:0}},35833(t,e,s){s.d(e,{$Z:()=>o,NS:()=>l,Xs:()=>h,ai:()=>d,g1:()=>m,hd:()=>c,kT:()=>g,lX:()=>a,mO:()=>u,qc:()=>y,vZ:()=>f,yM:()=>_});var i=s(36745),n=s(6774),r=s(93397);const o=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(463),s.e(6160)]).then(s.bind(s,46160))),a=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(8872)]).then(s.bind(s,55666))),h=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(1060)]).then(s.bind(s,51190))),l=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(837)]).then(s.bind(s,97528))),c=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(463),s.e(795)]).then(s.bind(s,50795))),u=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(6936)]).then(s.bind(s,15605))),_=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(1075)]).then(s.bind(s,3637))),f=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(1948)]).then(s.bind(s,83299)));let p;function d(t){switch(t.type){case"CIMGeometricEffectDonut":case"CIMGeometricEffectBuffer":return o.getImportPromise();case"CIMGeometricEffectEnclosingPolygon":return a.getImportPromise();case"CIMGeometricEffectOffset":return Promise.all([u.getImportPromise(),c.getImportPromise()]);case"CIMGeometricEffectTaperedPolygon":return Promise.all([_.getImportPromise(),h.getImportPromise(),l.getImportPromise()]);default:return Promise.resolve()}}function m(t){return"CIMMarkerPlacementAtMeasuredUnits"===t.type?f.getImportPromise():Promise.resolve()}class g{constructor(t){this._geometry=t}next(){const t=this._geometry;return this._geometry=null,t}}function y(t,e,s){if(!t)return null;p||(p=new n.O3(0,0,0,1));const r=s?-1:1,o="esriGeometryPolygon"===t.geometryType,a=o?3:2,h=o?3:2;let l,c;for(p.reset(a),p.setPixelMargin(e+1),p.setExtent(512);t.nextPath();)if(!(t.pathSize<h)){for(t.nextPoint(),l=t.x,c=r*t.y,p.moveTo(l,c);t.nextPoint();)l=t.x,c=r*t.y,p.lineTo(l,c);o&&p.close()}const u=p.result(!1);if(u){const e=i.z.createEmptyOptimizedCIM(t.geometryType);for(const t of u){e.startPath();for(const s of t)e.pushXY(s.x,r*s.y)}return e.reset(),e}return null}},92580(t,e,s){s.d(e,{A:()=>Kt,c:()=>Qt});class i{static{this.instance=null}static local(){return null===i.instance&&(i.instance=new i),i.instance}execute(t,e){return new n(t,e)}}class n{constructor(t,e){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();if(!t)return null;for(;t;){if("esriGeometryPolygon"===t.geometryType)this._isClosed=!0;else if("esriGeometryPolyline"===t.geometryType)this._isClosed=!1;else{if("esriGeometryEnvelope"!==t.geometryType){t=this._inputGeometries.next();continue}if(this._maxCosAngle)return t;this._isClosed=!0}for(;t.nextPath();)this._processPath(t);return t.reset(),t}return null}_processPath(t){if(t.nextPoint()){const e=t.x,s=t.y;let i=e,n=s,r=t.pathSize,o=0,a=0,h=0,l=0,c=0,u=0;this._isClosed&&++r;for(let _=1;t.nextPoint()||_<r;++_){let f,p;this._isClosed&&_===r-1?(f=e,p=s):(f=t.x,p=t.y);const d=f-i,m=p-n,g=Math.sqrt(d*d+m*m);_>1&&g>0&&h>0&&(o*d+a*m)/g/h<=this._maxCosAngle&&t.setControlPointAt(_-1),1===_&&(l=d,c=m,u=g),g>0&&(i=f,n=p,o=d,a=m,h=g)}this._isClosed&&h>0&&u>0&&(o*l+a*c)/u/h<=this._maxCosAngle&&t.setControlPointAt(0)}}}var r=s(36745),o=s(51118),a=s(98939);function h(t,e){t[4]=e}class l{constructor(t,e=!0,s=!0,i=0){this._angleToLine=!0,this._keepUpright=!1,this.isClosed=!1,this.geometryCursor=null,this.geometryCursor=!e&&"esriGeometryPolygon"===t.geometryType||!s&&"esriGeometryPolyline"===t.geometryType?null:t,this.geomUnitsPerPoint=i,this.iterateMultiPath=!1,this.iteratePath=!1,this.internalPlacement=new a.W}next(){if(!this.geometryCursor)return null;const t=this.processMultiPath(this.geometryCursor);if(this.iterateMultiPath&&t||(this.geometryCursor=null),!t)return null;const e=t.getAngle();if(this._angleToLine&&this._keepUpright&&Math.abs(e)>.5*Math.PI){const s=e+Math.PI,i=Math.atan2(Math.sin(s),Math.cos(s));Number.isNaN(i)||t.setRotate(i)}return t}processMultiPath(t){for(;this.iteratePath||t.pathIndex<t.totalSize-1;){this.iteratePath||t.nextPath(),this.iterateMultiPath=!0;const e=this.processPath(t);if(e)return e}return this.iterateMultiPath=!1,null}}class c{constructor(t,e,s,i=0){this.isClosed=!1,this.inputGeometries=t,this.acceptPolygon=e,this.acceptPolyline=s,this.geomUnitsPerPoint=i,this.iteratePath=!1,this.multiPathCursor=null}next(){for(;;){if(!this.multiPathCursor){let t=this.inputGeometries.next();for(;t&&(this.isClosed=this.acceptPolygon&&"esriGeometryPolygon"===t.geometryType||"esriGeometryEnvelope"===t.geometryType,this.multiPathCursor=t,!this.multiPathCursor);)t=this.inputGeometries.next();if(!this.multiPathCursor)return null}for(;this.iteratePath||this.multiPathCursor.nextPath();){this.multiPathCursor.seekPathStart();const t=this.processPath(this.multiPathCursor);if(t)return t}this.multiPathCursor=null}}}const u=.03;class _{constructor(t=0,e=!1){}isEmpty(t){if(!t.nextPoint())return!0;let e,s,i,n;for(e=t.x,s=t.y;t.nextPoint();e=s,s=n)if(i=t.x,n=t.y,i!==e||n!==s)return t.seekPathStart(),!1;return t.seekPathStart(),!0}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);0!==e&&(t[0]/=e,t[1]/=e)}getLength(t,e,s,i){const n=s-t,r=i-e;return Math.sqrt(n*n+r*r)}getSegLength(t){const[[e,s],[i,n]]=t;return this.getLength(e,s,i,n)}getCoord2D(t,e,s,i,n){return[t+(s-t)*n,e+(i-e)*n]}getSegCoord2D(t,e){const[[s,i],[n,r]]=t;return this.getCoord2D(s,i,n,r,e)}getAngle(t,e,s,i,n){const r=s-t,o=i-e;return Math.atan2(o,r)}getAngleCS(t,e,s,i,n,r){null==t&&(t=[0,0]);const o=i-e,a=n-s,h=Math.sqrt(o*o+a*a);return 0!==h?(t[0]=o/h,t[1]=a/h,t):(t[0]=1,t[1]=0,t)}getSegAngleCS(t,e,s){const[[i,n],[r,o]]=e;return this.getAngleCS(t,i,n,r,o,s)}cut(t,e,s,i,n,r){return[n<=0?[t,e]:this.getCoord2D(t,e,s,i,n),r>=1?[s,i]:this.getCoord2D(t,e,s,i,r)]}getSubCurve(t,e,s){const i=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");return this.appendSubCurve(i,t,e,s)?i:null}appendSubCurve(t,e,s,i){t.startPath(),e.seekPathStart();let n=0,r=!0;if(!e.nextPoint())return!1;let o=e.x,a=e.y;for(;e.nextPoint();){const h=this.getLength(o,a,e.x,e.y);if(0!==h){if(r){if(n+h>s){const l=(s-n)/h;let c=1,u=!1;n+h>=i&&(c=(i-n)/h,u=!0);const _=this.cut(o,a,e.x,e.y,l,c);if(_&&t.pushPoints(_),u)break;r=!1}}else{if(n+h>i){const s=this.cut(o,a,e.x,e.y,0,(i-n)/h);s&&t.pushPoint(s[1]);break}t.pushXY(e.x,e.y)}n+=h,o=e.x,a=e.y}else o=e.x,a=e.y}return!0}getCIMPointAlong(t,e){if(!t.nextPoint())return null;let s,i,n,r,o=0;for(s=t.x,i=t.y;t.nextPoint();s=n,i=r){n=t.x,r=t.y;const a=this.getLength(s,i,n,r);if(0!==a){if(o+a>e){const t=(e-o)/a;return this.getCoord2D(s,i,n,r,t)}o+=a}}return null}offset(t,e,s,i,n){if(!t||t.length<2)return null;let r=0,o=t[r++],a=r;for(;r<t.length;){const e=t[r];e[0]===o[0]&&e[1]===o[1]||(r!==a&&(t[a]=t[r]),o=t[a++]),r++}const h=t[0][0]===t[a-1][0]&&t[0][1]===t[a-1][1];if(h&&--a,a<(h?3:2))return null;const l=[];o=h?t[a-1]:null;let c=t[0];for(let n=0;n<a;n++){const r=n===a-1?h?t[0]:null:t[n+1];if(o)if(r){const t=[r[0]-c[0],r[1]-c[1]];this.normalize(t);const n=[c[0]-o[0],c[1]-o[1]];this.normalize(n);const a=n[0]*t[1]-n[1]*t[0],h=n[0]*t[0]+n[1]*t[1];if(0===a&&1===h){c=r;continue}if(a>=0==e<=0){if(h<1){const s=[t[0]-n[0],t[1]-n[1]];this.normalize(s);const r=Math.sqrt((1+h)/2);if(r>1/i){const t=-Math.abs(e)/r;l.push([c[0]-s[0]*t,c[1]-s[1]*t])}}}else switch(s){case"Mitered":{const s=Math.sqrt((1+h)/2);if(s>0&&1/s<i){const i=[t[0]-n[0],t[1]-n[1]];this.normalize(i);const r=Math.abs(e)/s;l.push([c[0]-i[0]*r,c[1]-i[1]*r]);break}}case"Bevelled":l.push([c[0]+n[1]*e,c[1]-n[0]*e]),l.push([c[0]+t[1]*e,c[1]-t[0]*e]);break;case"Rounded":if(h<1){l.push([c[0]+n[1]*e,c[1]-n[0]*e]);const s=Math.floor(2.5*(1-h));if(s>0){const i=1/s;let r=i;for(let o=1;o<s;o++,r+=i){const s=[n[1]*(1-r)+t[1]*r,-n[0]*(1-r)-t[0]*r];this.normalize(s),l.push([c[0]+s[0]*e,c[1]+s[1]*e])}}l.push([c[0]+t[1]*e,c[1]-t[0]*e])}break;default:if(a<0)l.push([c[0]+(n[1]+n[0])*e,c[1]+(n[1]-n[0])*e]),l.push([c[0]+(t[1]-t[0])*e,c[1]-(t[0]+t[1])*e]);else{const s=Math.sqrt((1+Math.abs(h))/2),i=[t[0]-n[0],t[1]-n[1]];this.normalize(i);const r=e/s;l.push([c[0]-i[0]*r,c[1]-i[1]*r])}}}else{const t=[c[0]-o[0],c[1]-o[1]];this.normalize(t),l.push([c[0]+t[1]*e,c[1]-t[0]*e])}else{const t=[r[0]-c[0],r[1]-c[1]];this.normalize(t),l.push([c[0]+t[1]*e,c[1]-t[0]*e])}o=c,c=r}return l.length<(h?3:2)?null:(h&&l.push([l[0][0],l[0][1]]),l)}}const f=1.7320508075688772;class p{static{this.instance=null}static local(){return null===p.instance&&(p.instance=new p),p.instance}execute(t,e,s){return new d(t,e,s)}}class d extends c{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new _,this._width=(void 0!==e.width?e.width:5)*s,this._arrowType=void 0!==e.geometricEffectArrowType?e.geometricEffectArrowType:void 0!==e.arrowType?e.arrowType:"OpenEnded",this._offsetFlattenError=u*s}processPath(t){const e=r.z.createEmptyOptimizedCIM(t.geometryType);switch(this._arrowType){case"OpenEnded":default:this._constructSimpleArrow(e,t,!0);break;case"Block":this._constructSimpleArrow(e,t,!1);break;case"Crossed":this._constructCrossedArrow(e,t)}return e}_constructSimpleArrow(t,e,s){const i=e.pathLength();let n=this._width;i<2*n&&(n=i/2);const r=this._curveHelper.getSubCurve(e,0,i-n);if(!r||!r.nextPath())return;r.seekPathStart();const a=n/2;if(this._curveHelper.isEmpty(r))return;const h=(0,o.A)(r),l=this._constructOffset(h,-a);if(!l)return;const c=this._constructOffset(h,a);if(!c)return;const u=this._constructArrowBasePoint(l,-a/2);if(!u)return;const _=this._constructArrowBasePoint(c,a/2);if(!_)return;e.seekInPath(e.pathSize-1);const f=[e.x,e.y];t.pushPath(c),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(_),t.nextPoint(),t.setControlPoint(),t.pushPoint(f),t.nextPoint(),t.setControlPoint(),t.pushPoint(u),t.nextPoint(),t.setControlPoint(),t.pushPoints(l.reverse()),t.setControlPoint(),s||(t.setControlPointAt(0),t.setControlPointAt(t.pathSize-1),t.pushPoint(c[0])),t.reset()}_constructCrossedArrow(t,e){const s=e.pathLength();let i=this._width;s<i*(1+f+1)&&(i=s/(1+f+1)),e.seekPathStart();const n=this._curveHelper.getSubCurve(e,0,s-i*(1+f));if(!n)return;n.nextPath();const r=i/2;if(this._curveHelper.isEmpty(n))return;const a=(0,o.A)(n),h=this._constructOffset(a,r);if(!h)return;const l=this._constructOffset(a,-r);if(!l)return;const c=this._curveHelper.getSubCurve(e,0,s-i);if(!c)return;if(c.nextPath(),this._curveHelper.isEmpty(c))return;const u=(0,o.A)(c),_=this._constructOffset(u,r);if(!_)return;const p=this._constructOffset(u,-r);if(!p)return;const d=_[_.length-1],m=this._constructArrowBasePoint(_,r/2);if(!m)return;const g=p[p.length-1],y=this._constructArrowBasePoint(p,-r/2);if(!y)return;e.seekInPath(e.pathSize-1);const P=[e.x,e.y];t.pushPath(h),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(g),t.nextPoint(),t.setControlPoint(),t.pushPoint(y),t.nextPoint(),t.setControlPoint(),t.pushPoint(P),t.nextPoint(),t.setControlPoint(),t.pushPoint(m),t.nextPoint(),t.setControlPoint(),t.pushPoint(d),t.nextPoint(),t.setControlPoint(),t.pushPoints(l.reverse()),t.nextPoint(),t.setControlPoint(),t.reset()}_constructOffset(t,e){return this._curveHelper.offset(t,e,"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],n=[i[0]-s[0],i[1]-s[1]];return this._curveHelper.normalize(n),[i[0]+n[1]*e,i[1]-n[0]*e]}}var m=s(16930),g=s(35833);class y{static{this.instance=null}static local(){return null===y.instance&&(y.instance=new y),y.instance}execute(t,e,s,i,n,r){return new P(t,e,s,i,n,r)}}class P{constructor(t,e,s,i,n,r){this._preventClipping=r,this._inputGeometries=t,this._tileKey=i,this._curveHelper=new _,this._size=(void 0!==e.size?e.size:1)*s,this._maxInflateSize=n*s,this._offsetFlattenError=u*s}next(){let t;for(;t=this._inputGeometries.next();){if(0===this._size)return t;if("esriGeometryEnvelope"===t.geometryType)if(this._size>0){const e=r.z.createEmptyOptimizedCIM(t.geometryType),s=(0,o.x)(t)[0],i=this._curveHelper.offset(s,this._size,"Rounded",4,this._offsetFlattenError);if(i)return e.pushPath(i),e}else if(this._size<0){const e=t.asJSON();if(Math.min(e.xmax-e.xmin,e.ymax-e.ymin)+2*this._size>0)return r.z.fromJSONCIM({xmin:e.xmin-this._size,xmax:e.xmax+this._size,ymin:e.ymin-this._size,ymax:e.ymax+this._size})}const e=!this._preventClipping&&this._tileKey?(0,g.qc)(t,this._maxInflateSize,!0):t;if(!e)continue;const s=g.$Z.module,i={...e.asJSON(),spatialReference:{wkid:m.A.WebMercator.wkid}},n=s.execute(i,this._size);return n?r.z.fromJSONCIM(n):null}return null}}var x=s(95108);class M{static{this.instance=null}static local(){return null===M.instance&&(M.instance=new M),M.instance}execute(t,e,s){return new b(t,e,s)}}class b{constructor(t,e,s){this._defaultPointSize=20,this._inputGeometries=t,this._geomUnitsPerPoint=s,this._rule=e.rule??"FullGeometry",this._defaultSize=this._defaultPointSize*s}next(){let t;for(;t=this._inputGeometries.next();){const e=this._processGeom((0,o.x)(t));if(e?.length)return r.z.fromJSONCIM({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){const i=t[0]*e-t[1]*s,n=t[0]*s+t[1]*e;t[0]=i,t[1]=n}_makeCtrlPt(t){const e=[t[0],t[1]];return h(e,1),e}_addAngledTicks(t,e,s,i){const n=this._sub(s,e);this._normalize(n);const r=this._crossProduct(n,this._sub(i,e));let o;o=r>0?this._rightPerp(n):this._leftPerp(n);const a=Math.abs(r)/2,h=[];h.push([e[0]+(o[0]-n[0])*a,e[1]+(o[1]-n[1])*a]),h.push(e),h.push(s),h.push([s[0]+(o[0]+n[0])*a,s[1]+(o[1]+n[1])*a]),t.push(h)}_addBezier2(t,e,s,i,n){if(0===n--)return void t.push(i);const r=this._mid(e,s),o=this._mid(s,i),a=this._mid(r,o);this._addBezier2(t,e,r,a,n),this._addBezier2(t,a,o,i,n)}_addBezier3(t,e,s,i,n,r){if(0===r--)return void t.push(n);const o=this._mid(e,s),a=this._mid(s,i),h=this._mid(i,n),l=this._mid(o,a),c=this._mid(a,h),u=this._mid(l,c);this._addBezier3(t,e,o,l,u,r),this._addBezier3(t,u,c,h,n,r)}_add90DegArc(t,e,s,i,n){const r=n??this._crossProduct(this._sub(s,e),this._sub(i,e))>0,o=this._mid(e,s),a=this._sub(o,e);r?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],n=e[1],r=e[e.length-1],o=this._sub(i,n),a=this._norm(o);this._normalize(o);const h=Math.abs(this._crossProduct(o,this._sub(r,n)));let l=this._dotProduct(o,this._sub(r,n));l<.05*a?l=.05*a:l>.95*a&&(l=.95*a);const c=.5*h,u=this._leftPerp(o),_=[n[0]+o[0]*l,n[1]+o[1]*l],f=e.length-1,p=[];p.push(s?[-u[0],-u[1]]:u);let d=[-o[0],-o[1]];for(let t=1;t<f-1;t++){const s=this._sub(e[t+1],e[t]);this._normalize(s);const i=this._dotProduct(s,d),n=this._crossProduct(s,d),r=Math.sqrt((1+i)/2),o=this._sub(s,d);this._normalize(o),o[0]/=r,o[1]/=r,p.push(n<0?[-o[0],-o[1]]:o),d=s}p.push(this._rightPerp(d));for(let s=p.length-1;s>0;s--)t.push([e[s][0]+p[s][0]*c,e[s][1]+p[s][1]*c]);t.push([_[0]+p[0][0]*c,_[1]+p[0][1]*c]),t.push([_[0]+p[0][0]*h,_[1]+p[0][1]*h]),t.push(i),t.push([_[0]-p[0][0]*h,_[1]-p[0][1]*h]),t.push([_[0]-p[0][0]*c,_[1]-p[0][1]*c]);for(let s=1;s<p.length;s++)t.push([e[s][0]-p[s][0]*c,e[s][1]-p[s][1]*c])}_addDash(t,e,s){const i=this._norm(s)/7;this._normalize(s);let n=[];for(let r=0;r<=7;r++)n.push([e[0]+s[0]*r*i,e[1]+s[1]*r*i]),1&r&&(t.push(n),n=[])}_cp2(t,e,s){return t.length>=2?t[1]:this._add2(t[0],e*this._defaultSize,s*this._defaultSize)}_cp3(t,e,s,i){if(t.length>=3)return t[2];const n=this._mix(t[0],1-s,e,s),r=this._sub(e,t[0]);return this._normalize(r),this._rightPerpendicular(r),[n[0]+r[0]*i*this._defaultSize,n[1]+r[1]*i*this._defaultSize]}_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 n=this._rightPerp(i);return[e,s,[e[0]+(n[0]-i[0])*this._defaultSize,e[1]+(n[1]-i[1])*this._defaultSize]]}_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 n=this._rightPerp(t);i=[e[0]+(n[0]-t[0])*this._defaultSize,e[1]+(n[1]-t[1])*this._defaultSize]}return[s,i]}_processGeom(t){if(!t)return null;const e=[];for(const s of t){const t=s.length>1&&(0,x.Yl)(s)<this._defaultSize;if(!s||0===s.length||t)continue;const i=s.length;let n=s[0];switch(this._rule){case"PerpendicularFromFirstSegment":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,4),r=[];r.push(i),r.push(this._mid(n,t)),e.push(r);break}case"ReversedFirstSegment":{const t=this._cp2(s,0,-1);e.push([t,n]);break}case"PerpendicularToSecondSegment":{if(s.length<3)return[];const t=this._cp2(s,-4,1),i=this._cp3(s,t,.882353,-1.94),r=[];r.push(this._mid(t,i)),r.push(n),e.push(r);break}case"SecondSegmentWithTicks":{if(s.length<3)return[];const t=this._cp2(s,-4,1),i=this._cp3(s,t,.882353,-1.94),r=this._sub(i,t);let o;o=this._crossProduct(r,this._sub(n,t))>0?this._rightPerp(r):this._leftPerp(r);const a=[];a.push([t[0]+(o[0]-r[0])/3,t[1]+(o[1]-r[1])/3]),a.push(t),a.push(i),a.push([i[0]+(o[0]+r[0])/3,i[1]+(o[1]+r[1])/3]),e.push(a);break}case"DoublePerpendicular":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,3),r=this._mid(n,t),o=this._sub(r,i);this._normalize(o);const a=this._crossProduct(o,this._sub(n,i));this._leftPerpendicular(o);const h=[];h.push(n),h.push([i[0]+o[0]*a,i[1]+o[1]*a]),e.push(h);const l=[];l.push([i[0]-o[0]*a,i[1]-o[1]*a]),l.push(t),e.push(l);break}case"OppositeToFirstSegment":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,3),r=this._mid(n,t),o=this._sub(r,i);this._normalize(o);const a=this._crossProduct(o,this._sub(n,i));this._leftPerpendicular(o);const h=[];h.push([i[0]+o[0]*a,i[1]+o[1]*a]),h.push([i[0]-o[0]*a,i[1]-o[1]*a]),e.push(h);break}case"TriplePerpendicular":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,4),r=this._mid(n,t),o=this._sub(r,i);this._normalize(o);const a=this._crossProduct(o,this._sub(n,i));this._leftPerpendicular(o);const h=[];h.push([i[0]+o[0]*a*.8,i[1]+o[1]*a*.8]),h.push([r[0]+.8*(n[0]-r[0]),r[1]+.8*(n[1]-r[1])]),e.push(h),e.push([i,r]);const l=[];l.push([i[0]-o[0]*a*.8,i[1]-o[1]*a*.8]),l.push([r[0]+.8*(t[0]-r[0]),r[1]+.8*(t[1]-r[1])]),e.push(l);break}case"HalfCircleFirstSegment":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,4),r=this._mid(n,t);let o=this._sub(t,n);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 _;this._crossProduct(o,this._sub(i,n))>0?(u.push(n),o=this._sub(n,r),_=t):(u.push(t),o=this._sub(t,r),_=n),this._rotateDirect(o,l,c),o[0]/=l,o[1]/=l;for(let t=1;t<=18;t++)u.push(this._add(r,o)),this._rotateDirect(o,a,h);u.push(_),e.push(u);break}case"HalfCircleSecondSegment":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,1,-1);let r=this._sub(n,t);this._normalize(r);const o=this._crossProduct(r,this._sub(i,t))/2;this._leftPerpendicular(r);const a=[t[0]+r[0]*o,t[1]+r[1]*o];r=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(r,h,l),c.push(this._add(a,r));e.push(c);break}case"HalfCircleExtended":{const t=this._cp2(s,0,-2),r=this._cp3(s,t,1,-1);let o;if(i>=4)o=s[3];else{const e=this._sub(n,t);o=this._add(r,e)}const a=this._dist(t,r)/2/.75,h=this._sub(t,n);this._normalize(h,a);const l=this._sub(r,o);this._normalize(l,a);const c=[o,r];e.push(c);const u=[this._clone(r)];this._addBezier3(u,r,this._add(r,l),this._add(t,h),t,4),u.push(n),e.push(u);break}case"OpenCircle":{const t=this._cp2(s,-2,0),i=this._sub(t,n),r=Math.cos(Math.PI/18),o=-Math.sin(Math.PI/18),a=[t];for(let t=1;t<=33;t++)this._rotateDirect(i,r,o),a.push(this._add(n,i));e.push(a);break}case"CoverageEdgesWithTicks":{const t=this._cp2(s,0,-1);let r,o;if(i>=3)r=s[2];else{const e=this._sub(t,n),s=this._leftPerp(e);r=[n[0]+s[0]-.25*e[0],n[1]+s[1]-.25*e[1]]}if(i>=4)o=s[3];else{const e=this._mid(n,t),s=this._sub(n,t);this._normalize(s),this._leftPerpendicular(s);const i=this._crossProduct(s,this._sub(r,e));this._rightPerpendicular(s),o=[r[0]+s[0]*i*2,r[1]+s[1]*i*2]}const a=this._sub(t,n);let h,l;h=this._crossProduct(a,this._sub(r,n))>0?this._rightPerp(a):this._leftPerp(a),l=[],l.push(r),l.push(n),l.push([n[0]+(h[0]-a[0])/3,n[1]+(h[1]-a[1])/3]),e.push(l),h=this._crossProduct(a,this._sub(o,t))>0?this._rightPerp(a):this._leftPerp(a),l=[],l.push([t[0]+(h[0]+a[0])/3,t[1]+(h[1]+a[1])/3]),l.push(t),l.push(o),e.push(l);break}case"GapExtentWithDoubleTicks":{const t=this._cp2(s,0,2),r=this._cp3(s,t,0,1);let o;if(i>=4)o=s[3];else{const e=this._sub(t,n);o=this._add(r,e)}this._addAngledTicks(e,n,t,this._mid(r,o)),this._addAngledTicks(e,r,o,this._mid(n,t));break}case"GapExtentMidline":{const t=this._cp2(s,2,0),r=this._cp3(s,t,0,1);let o;if(i>=4)o=s[3];else{const e=this._sub(t,n);o=this._add(r,e)}const a=[];a.push(this._mid(n,r)),a.push(this._mid(t,o)),e.push(a);break}case"Chevron":{const t=this._cp2(s,-1,-1);let r;if(i>=3)r=s[2];else{const e=this._sub(t,n);this._leftPerpendicular(e),r=this._add(n,e)}e.push([t,this._makeCtrlPt(n),r]);break}case"PerpendicularWithArc":{const t=this._cp2(s,0,-2),r=this._cp3(s,t,.5,-1),o=this._sub(t,n),a=this._norm(o);o[0]/=a,o[1]/=a;const h=this._crossProduct(o,this._sub(r,n));let l=this._dotProduct(o,this._sub(r,n));l<.05*a?l=.05*a:l>.95*a&&(l=.95*a);const c=[n[0]+o[0]*l,n[1]+o[1]*l];let u=this._leftPerp(o),_=[];if(_.push([c[0]-u[0]*h,c[1]-u[1]*h]),_.push([c[0]+u[0]*h,c[1]+u[1]*h]),e.push(_),i>=4){const t=s[3];let i=this._dotProduct(o,this._sub(t,n));i<.1*a?i=.1*a:i>.9*a&&(i=.9*a);const r=[n[0]+o[0]*i,n[1]+o[1]*i],h=this._crossProduct(o,this._sub(t,n)),l=[];l.push([r[0]-u[0]*h,r[1]-u[1]*h]),l.push([r[0]+u[0]*h,r[1]+u[1]*h]),e.push(l)}const f=[t[0]+u[0]*h,t[1]+u[1]*h];u=this._sub(t,f);const p=Math.cos(Math.PI/18);let d=Math.sin(Math.PI/18);h<0&&(d=-d),_=[n,t];for(let t=1;t<=9;t++)this._rotateDirect(u,p,d),_.push(this._add(f,u));e.push(_);break}case"ClosedHalfCircle":{const t=this._cp2(s,2,0),i=this._mid(n,t),r=this._sub(t,i),o=Math.cos(Math.PI/18),a=Math.sin(Math.PI/18),h=[n,t];for(let t=1;t<=18;t++)this._rotateDirect(r,o,a),h.push(this._add(i,r));e.push(h);break}case"TripleParallelExtended":{const t=this._cp2(s,0,-2),i=this._cp3(s,t,1,-2),r=this._mid(n,t),o=this._sub(i,t);this._normalize(o);const a=Math.abs(this._crossProduct(o,this._sub(r,t)))/2,l=this._dist(t,i),c=[t,n];c.push([n[0]+o[0]*l*.5,n[1]+o[1]*l*.5]),e.push(c);const u=[];u.push([r[0]-o[0]*a,r[1]-o[1]*a]),u.push([r[0]+o[0]*l*.375,r[1]+o[1]*l*.375]),h(u[u.length-1],1),u.push([r[0]+o[0]*l*.75,r[1]+o[1]*l*.75]),e.push(u);const _=[t,i];e.push(_);break}case"ParallelWithTicks":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(i,t);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r),this._addAngledTicks(e,n,t,i),this._addAngledTicks(e,this._mix(n,1,r,o),this._mix(t,1,r,o),this._mid(n,t));break}case"Parallel":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(t,n);this._normalize(r);const o=this._leftPerp(r),a=this._crossProduct(r,this._sub(i,n));let h=[n,t];e.push(h),h=[],h.push([n[0]+o[0]*a,n[1]+o[1]*a]),h.push([t[0]+o[0]*a,t[1]+o[1]*a]),e.push(h);break}case"PerpendicularToFirstSegment":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._mid(n,t),o=this._sub(t,n);this._normalize(o);const a=this._crossProduct(o,this._sub(i,n));this._leftPerpendicular(o);const h=[];h.push([r[0]-o[0]*a*.25,r[1]-o[1]*a*.25]),h.push([r[0]+o[0]*a*1.25,r[1]+o[1]*a*1.25]),e.push(h);break}case"ParallelOffset":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(t,n);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r);const a=[];a.push([n[0]-r[0]*o,n[1]-r[1]*o]),a.push([t[0]-r[0]*o,t[1]-r[1]*o]),e.push(a);const h=[];h.push([n[0]+r[0]*o,n[1]+r[1]*o]),h.push([t[0]+r[0]*o,t[1]+r[1]*o]),e.push(h);break}case"OffsetOpposite":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(t,n);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r);const a=[];a.push([n[0]-r[0]*o,n[1]-r[1]*o]),a.push([t[0]-r[0]*o,t[1]-r[1]*o]),e.push(a);break}case"OffsetSame":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(t,n);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r);const a=[];a.push([n[0]+r[0]*o,n[1]+r[1]*o]),a.push([t[0]+r[0]*o,t[1]+r[1]*o]),e.push(a);break}case"CircleWithArc":{let t=this._cp2(s,3,0);const r=this._cp3(s,t,.5,-1);let o,a;if(i>=4)o=s[3],a=this._crossProduct(this._sub(o,t),this._sub(r,t))>0;else{o=t,a=this._crossProduct(this._sub(o,n),this._sub(r,n))>0;const e=24*this._geomUnitsPerPoint,s=this._sub(o,n);this._normalize(s,e);const i=Math.sqrt(2)/2;this._rotateDirect(s,i,a?i:-i),t=this._add(n,s)}const l=this._sub(t,n),c=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18),_=[t];for(let t=1;t<=36;t++)this._rotateDirect(l,c,u),_.push(this._add(n,l));this._add90DegArc(_,t,o,r,a),h(_[_.length-8],1),e.push(_);break}case"DoubleJog":{let t,r=this._cp2(s,-3,1),o=this._cp3(s,r,-1,-.5);if(i>=4)t=s[3];else{const e=n;n=r,t=o;const s=this._dist(n,e),i=this._dist(t,e);let a=30*this._geomUnitsPerPoint;.5*s<a&&(a=.5*s),.5*i<a&&(a=.5*i),r=this._mix(n,a/s,e,(s-a)/s),o=this._mix(t,a/i,e,(i-a)/i)}const a=this._mid(n,r),h=this._mid(t,o),l=this._dist(n,r),c=this._dist(o,t);let u=Math.min(l,c)/8;u=Math.min(u,24*this._geomUnitsPerPoint);const _=Math.cos(Math.PI/4);let f=this._sub(n,r);this._normalize(f,u),this._crossProduct(f,this._sub(t,r))>0?this._rotateDirect(f,_,-_):this._rotateDirect(f,_,_);let p=[];p.push(r),p.push(this._add(a,f)),p.push(this._sub(a,f)),p.push(n),e.push(p),f=this._sub(t,o),this._normalize(f,u),this._crossProduct(f,this._sub(n,o))<0?this._rotateDirect(f,_,_):this._rotateDirect(f,_,-_),p=[],p.push(o),p.push(this._add(h,f)),p.push(this._sub(h,f)),p.push(t),e.push(p);break}case"PerpendicularOffset":{const t=this._cp2(s,-4,1),i=this._cp3(s,t,.882353,-1.94),r=this._sub(i,t);this._crossProduct(r,this._sub(n,t))>0?this._rightPerpendicular(r):this._leftPerpendicular(r);const o=[r[0]/8,r[1]/8],a=this._sub(this._mid(t,i),o);e.push([a,n]);break}case"LineExcludingLastSegment":{const t=this._arrowPath(s),i=[];let n=t.length-2;for(;n--;)i.push(t[n]);e.push(i);break}case"MultivertexArrow":{const t=this._arrowPath(s),i=[];this._addArrow(i,t,!1),e.push(i);break}case"CrossedArrow":{const t=this._arrowPath(s),i=[];this._addArrow(i,t,!0),e.push(i);break}case"ChevronArrow":{const[t,i]=this._arrowLastSeg(s),r=10*this._geomUnitsPerPoint,o=this._sub(n,t),a=this._norm(o);this._normalize(o);const h=this._crossProduct(o,this._sub(i,t));let l=this._dotProduct(o,this._sub(i,t));l<.05*a?l=.05*a:l>.95*a-r&&(l=.95*a-r);const c=[t[0]+o[0]*l,t[1]+o[1]*l],u=this._leftPerp(o),_=[];_.push([c[0]+u[0]*h+o[0]*r,c[1]+u[1]*h+o[1]*r]),_.push(n),_.push([c[0]-u[0]*h+o[0]*r,c[1]-u[1]*h+o[1]*r]),e.push(_);break}case"ChevronArrowOffset":{const[t,i]=this._arrowLastSeg(s),r=this._sub(n,t),o=this._norm(r);this._normalize(r);const a=this._crossProduct(r,this._sub(i,t));let h=this._dotProduct(r,this._sub(i,t));h<.05*o?h=.05*o:h>.95*o&&(h=.95*o);const l=[t[0]+r[0]*h,t[1]+r[1]*h];this._leftPerpendicular(r);const c=[];c.push([l[0]+r[0]*a*.5,l[1]+r[1]*a*.5]),c.push(this._mid(l,n)),c.push([l[0]-r[0]*a*.5,l[1]-r[1]*a*.5]),e.push(c);break}case"PartialFirstSegment":{const[t,i]=this._arrowLastSeg(s),r=this._sub(n,t),o=this._norm(r);this._normalize(r);let a=this._dotProduct(r,this._sub(i,t));a<.05*o?a=.05*o:a>.95*o&&(a=.95*o);const h=[t[0]+r[0]*a,t[1]+r[1]*a];e.push([t,h]);break}case"Arch":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,1),r=this._sub(n,t),o=this._mix(i,1,r,.55),a=this._mix(i,1,r,-.55),h=[n];this._addBezier2(h,n,o,i,4),this._addBezier2(h,i,a,t,4),e.push(h);break}case"CurvedParallelTicks":{const t=this._cp2(s,-4,1),i=this._cp3(s,t,.882353,-1.94),r=this._sub(i,t);this._crossProduct(r,this._sub(n,t))>0?this._rightPerpendicular(r):this._leftPerpendicular(r);const o=[r[0]/8,r[1]/8],a=this._sub(this._mid(t,i),o),h=this._sub(this._mix(t,.75,i,.25),o),l=this._sub(this._mix(t,.25,i,.75),o),c=[t];this._addBezier2(c,t,h,a,3),this._addBezier2(c,a,l,i,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,[r[0]/4,r[1]/4])),e.push(i)}break}case"Arc90Degrees":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,1),r=[t];this._add90DegArc(r,t,n,i),e.push(r);break}case"TipWithPerpendicularAndTicks":{const[t,i]=this._arrowLastSeg(s),r=10*this._geomUnitsPerPoint,o=this._sub(n,t),a=this._norm(o);this._normalize(o);let h=this._crossProduct(o,this._sub(i,t)),l=this._dotProduct(o,this._sub(i,t));l<.05*a?l=.05*a:l>.95*a-r&&(l=.95*a-r);const c=this._leftPerp(o),u=[n[0]-o[0]*r,n[1]-o[1]*r],_=.5*Math.max(a-l-r,r);h=Math.abs(h);const f=[];f.push([u[0]+c[0]*(h+_)-o[0]*_,u[1]+c[1]*(h+_)-o[1]*_]),f.push([u[0]+c[0]*h,u[1]+c[1]*h]),f.push([u[0]-c[0]*h,u[1]-c[1]*h]),f.push([u[0]-c[0]*(h+_)-o[0]*_,u[1]-c[1]*(h+_)-o[1]*_]),e.push(f),e.push([u,n]);break}case"ConcentricCircles":{const t=this._cp2(s,1,0),r=this._cp3(s,t,2,0),o=Math.cos(Math.PI/18),a=Math.sin(Math.PI/18);let l=this._dist(t,n),c=[l,0],u=[];for(let t=0;t<=36;t++)u.push(this._add(n,c)),this._rotateDirect(c,o,a);if(e.push(u),i>=4){u=[];const t=s[3];l=this._dist(t,n),c=[l,0];for(let t=0;t<=36;t++)u.push(this._add(n,c)),0===t&&(u.push(this._add(n,c)),h(u[1],1)),this._rotateDirect(c,o,a);e.push(u)}u=[],l=this._dist(r,n),c=[l,0];for(let t=0;t<=36;t++)u.push(this._add(n,c)),this._rotateDirect(c,o,a);e.push(u);break}case"DoubleJogArrow":{n=this._arrowPath(s)[0];const[t,i]=this._arrowLastSeg(s),r=this._sub(n,t),o=this._norm(r);this._normalize(r);const a=Math.abs(this._crossProduct(r,this._sub(i,n)));let h=Math.abs(this._dotProduct(r,this._sub(i,n)));h<.05*o?h=.05*o:h>.95*o&&(h=.95*o);const l=Math.max(a,h),c=this._leftPerp(r);let u=[];const _=[n[0]-r[0]*h*.5+c[0]*a*.5,n[1]-r[1]*h*.5+c[1]*a*.5];u.push([_[0],_[1]]),_[0]+=r[0]*l*.5+c[0]*l*.4,_[1]+=r[1]*l*.5+c[1]*l*.4,u.push([_[0],_[1]]),_[0]-=c[0]*l*.25,_[1]-=c[1]*l*.25,u.push([_[0],_[1]]),_[0]+=r[0]*l*.5+c[0]*l*.4,_[1]+=r[1]*l*.5+c[1]*l*.4,u.push([_[0],_[1]]),e.push(u),u=[],_[0]=n[0]-r[0]*h*.5-c[0]*a*.5,_[1]=n[1]-r[1]*h*.5-c[1]*a*.5,u.push([_[0],_[1]]),_[0]+=r[0]*l*.5-c[0]*l*.4,_[1]+=r[1]*l*.5-c[1]*l*.4,u.push([_[0],_[1]]),_[0]+=c[0]*l*.25,_[1]+=c[1]*l*.25,u.push([_[0],_[1]]),_[0]+=r[0]*l*.5-c[0]*l*.4,_[1]+=r[1]*l*.5-c[1]*l*.4,u.push([_[0],_[1]]),e.push(u);break}case"LinkedChevrons":{const t=this._cp2(s,-5,0),i=this._cp3(s,t,-.2,1),r=this._sub(n,t);this._normalize(r);const o=this._leftPerp(r),a=Math.abs(this._crossProduct(r,this._sub(i,t)));e.push([t,n]);const h=[];h.push([n[0]-r[0]*a+o[0]*a,n[1]-r[1]*a+o[1]*a]),h.push(n),h.push([n[0]-r[0]*a-o[0]*a,n[1]-r[1]*a-o[1]*a]),e.push(h),this._addDash(e,t,[-r[0]*a+o[0]*a,-r[1]*a+o[1]*a]),this._addDash(e,t,[-r[0]*a-o[0]*a,-r[1]*a-o[1]*a]);break}case"SegmentThenHalfCircle":{const t=this._cp2(s,2,0),r=this._cp3(s,t,1.5,0);let o;o=i>=4?s[3]:this._cp3(s,t,1.25,-.5);const a=this._sub(t,n);this._normalize(a);const h=.5*this._dist(t,r),l=this._crossProduct(a,this._sub(o,n))>0,c=Math.cos(Math.PI/18);let u=Math.sin(Math.PI/18);l&&(u=-u);const _=[n,t];a[0]*=h,a[1]*=h;const f=this._add(t,a);a[0]=-a[0],a[1]=-a[1];for(let t=1;t<=18;t++)this._rotateDirect(a,c,u),_.push(this._add(f,a));e.push(_);break}case"LineWithStraightTicks":{const t=this._cp2(s,-2,1),i=this._cp3(s,t,-1,-.5),r=this._sub(i,t);this._normalize(r);const o=this._dotProduct(r,this._sub(t,n)),a=this._dotProduct(r,this._sub(i,n));let h=[n];h.push([n[0]+r[0]*o,n[1]+r[1]*o]),h.push(t),e.push(h),h=[n],h.push([n[0]+r[0]*a,n[1]+r[1]*a]),h.push(i),e.push(h);break}case"DoubleCurve":{const t=this._cp2(s,-5,-1),i=this._cp3(s,t,2,0),r=Math.atan2(1,5),o=Math.cos(r),a=Math.sin(r),l=this._sub(t,n),c=this._dist(n,t);this._normalize(l),this._rotateDirect(l,o,-a);const u=[n];u.push([n[0]+l[0]*c*.5,n[1]+l[1]*c*.5]),h(u[1],1),u.push([n[0]+l[0]*c*.8,n[1]+l[1]*c*.8]),this._addBezier2(u,u[2],[n[0]+l[0]*c,n[1]+l[1]*c],t,3);const _=this._sub(i,t),f=this._dist(t,i);this._normalize(_),this._rotateDirect(_,o,-a),this._addBezier2(u,t,[i[0]-_[0]*f,i[1]-_[1]*f],[i[0]-_[0]*f*.8,i[1]-_[1]*f*.8],3),u.push(i),e.push(u);break}case"ParallelWithTicksByWidth":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,3),r=this._sub(t,n);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r),o>0?(this._addAngledTicks(e,n,[n[0]+r[0]*o,n[1]+r[1]*o],t),this._addAngledTicks(e,t,[t[0]+r[0]*o,t[1]+r[1]*o],n)):(this._addAngledTicks(e,[n[0]+r[0]*o,n[1]+r[1]*o],n,t),this._addAngledTicks(e,[t[0]+r[0]*o,t[1]+r[1]*o],n,t));break}case"EnclosingRoundedRectangle":{const t=this._cp2(s,3,-2),e=[Math.min(n[0],t[0]),Math.max(n[1],t[1])],i=[Math.max(n[0],t[0]),Math.min(n[1],t[1])],r=i[0]-e[0],o=e[1]-i[1],a=Math.min(r,o)/10,h=[];h.push([e[0]+a+.75*(r-2*a),e[1]]),h.push([i[0]-a,e[1]]),this._add90DegArc(h,[i[0]-a,e[1]],[i[0],e[1]-a],[i[0],e[1]]),h.push([i[0],i[1]+a]),this._add90DegArc(h,[i[0],i[1]+a],[i[0]-a,i[1]],i),h.push([e[0]+a,i[1]]),this._add90DegArc(h,[e[0]+a,i[1]],[e[0],i[1]+a],[e[0],i[1]]),h.push([e[0],e[1]-a]),this._add90DegArc(h,[e[0],e[1]-a],[e[0]+a,e[1]],e),h.push([e[0]+a+.75*(r-2*a),e[1]]);break}default:e.push(s)}}return e}}class S{static{this.instance=null}static local(){return null===S.instance&&(S.instance=new S),S.instance}execute(t,e,s){return new C(t,e,s)}}class C extends c{constructor(t,e,s){super(t,!0,!0),this._curveHelper=new _,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{_beginCut:e,_endCut:s,_middleCut:i}=this,n=t.pathLength(),o=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._invert){if(0!==e||0!==s||0!==i)if(e+s+i>=n)for(o.startPath();t.nextPoint();)o.pushXY(t.x,t.y);else this._curveHelper.appendSubCurve(o,t,0,e),this._curveHelper.appendSubCurve(o,t,.5*(n-i),.5*(n+i)),this._curveHelper.appendSubCurve(o,t,n-s,s)}else if(0===e&&0===s&&0===i)for(o.startPath();t.nextPoint();)o.pushXY(t.x,t.y);else e+s+i<n&&(0===i?this._curveHelper.appendSubCurve(o,t,e,n-s):(this._curveHelper.appendSubCurve(o,t,e,.5*(n-i)),this._curveHelper.appendSubCurve(o,t,.5*(n+i),n-s)));return 0===o.totalSize?null:o}}class w{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=!0){if(this._setEmpty(),!t||0===t.length)return!1;for(let s=0;s<t.length;s++){let i=Math.abs(t[s]);e&&i<1e-7&&(i=1e-7),this._values.push(i),this._length+=i}return 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}}class k{constructor(){this.pt=null,this.ca=0,this.sa=0}}class I{constructor(){this.reset()}reset(){this.segment=null,this.segmentLength=0,this.abscissa=0,this.isPathEnd=!1,this.isPartEnd=!1}isValid(){return null!==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 z extends _{constructor(t=0,e=!1){super(t,e),this._tempPos=new I,this._tempPt=[0,0],this._tolerance=u,this._currentPosition=new I}updateTolerance(t){this._tolerance=u*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._pathCursor=t,this._seg=-1,this._setPosAtNextPart()}curPositionIsValid(){return this._currentPosition.isValid()}nextPosition(t,e=0){const s=new I;return!!this._nextPosition(t,s,null,e)&&(s.copyTo(this._currentPosition),!0)}curPointAndAngle(t){t.pt=this._getPoint(this._currentPosition);const[e,s]=this._getAngleCS(this._tempPt,this._currentPosition);t.ca=e,t.sa=s}nextPointAndAngle(t,e,s=0){const i=this._tempPos;if(!this._nextPosition(t,i,null,s))return!1;i.copyTo(this._currentPosition),e.pt=this._getPoint(i);const[n,r]=this._getAngleCS(this._tempPt,i);return e.ca=n,e.sa=r,!0}nextCurve(t){if(0===t)return null;const e=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");e.startPath(),e.nextPath();const s=new I;return this._nextPosition(t,s,e,1)?(s.copyTo(this._currentPosition),e):null}isPathEnd(){return this._currentPosition.isPathEnd}getPathEnd(){return this._currentPosition.segment[1]}getPt(t){return this._pathCursor.seekInPath(t),[this._pathCursor.x,this._pathCursor.y]}getSeg(t){return[this.getPt(t),this.getPt(t+1)]}_nextPosition(t,e,s,i){if(this._currentPosition.isPathEnd)return!1;let n=this._currentPosition.abscissa;for(this._currentPosition.segmentLength>0&&(n/=this._currentPosition.segmentLength),this._currentPosition.copyTo(e);e.abscissa+t*this._partLengthRatio>e.segmentLength+this._tolerance;){if(s){if(0===s.pathSize)if(0===n){const t=e.segment[0];s.pushXY(t[0],t[1])}else s.pushPoint(this.getSegCoord2D(e.segment,n));const t=e.segment[1];s.pushXY(t[0],t[1])}if(n=0,t-=(e.segmentLength-e.abscissa)/this._partLengthRatio,this._partSegCount)e.segment=this._nextSegment(),e.segmentLength=this.getSegLength(e.segment),e.abscissa=0,this._partSegCount--;else{if(!this._setPosAtNextPart())return 0!==i&&(e.segmentLength=this.getSegLength(e.segment),e.isPartEnd=!0,1===i?(e.abscissa=e.segmentLength,e.isPathEnd=!0):e.abscissa=e.segmentLength+t,!0);this._currentPosition.copyTo(e)}}if(e.abscissa+=t*this._partLengthRatio,s){0===s.pathSize&&(0===n?s.pushPoint(e.segment[0]):s.pushPoint(this.getSegCoord2D(e.segment,n)));const t=e.abscissa/e.segmentLength;1===t?s.pushPoint(e.segment[1]):s.pushPoint(this.getSegCoord2D(e.segment,t))}return this._partSegCount||Math.abs(e.abscissa-e.segmentLength)<this._tolerance&&(e.isPathEnd=this._partIsLast,e.isPartEnd=!0),!0}_getPoint(t){const e=t.segmentLength<=0?0:t.abscissa/t.segmentLength;return this.getSegCoord2D(this._currentPosition.segment,e)}_getAngleCS(t,e){const s=e.segmentLength<=0?0:e.abscissa/e.segmentLength;return this.getSegAngleCS(t,this._currentPosition.segment,s)}_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.getSegLength(this._nextSegment()),this._partSegCount++,this._pathCursor.getControlPointAt(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.getSegLength(this._currentPosition.segment),this._currentPosition.abscissa=0,this._currentPosition.isPathEnd=this._currentPosition.isPartEnd=!1,--this._partSegCount;const e=this._getStartPointIndex();this._ctrlPtBegin=this._pathCursor.getControlPointAt(e);let s=e+this._partSegCount+1;if(s>=this._pathCursor.pathSize&&(s=0),this._ctrlPtEnd=this._pathCursor.getControlPointAt(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._pathCursor.pathSize-2}_previousSegment(){return this.getSeg(--this._seg)}_nextSegment(){return this.getSeg(++this._seg)}_getStartPointIndex(){return this._seg}_getEndPointIndex(){return this._seg+1}}var v=s(93397);class T{static{this.instance=null}static local(){return null===T.instance&&(T.instance=new T),T.instance}execute(t,e,s){return new A(t,e,s)}}class A extends c{constructor(t,e,s){super(t,!0,!0),this._firstCurve=null,this._walker=new z,this._walker.updateTolerance(s),this._endings=e.lineDashEnding??"NoConstraint",this._customDashPos=-(e.offsetAlongLine??0)*s,this._offsetAtEnd=(e.customEndingOffset??0)*s;let i=(0,v.FH)(e).dashTemplate;null==i&&(i=[]),i.length%2&&(i=[...i,...i]);let n=0;for(;n<i.length&&0===i[n];)n++;let r=0;const o=[];for(let t=n;t<i.length;t++)0===i[t]?r++:0===r?o.push(i[t]):1&r?(o[o.length-1]+=i[t],r=0):(o.push(i[t]),r=0);i=o,i.length<=1?i=0===i.length||n%2==0?[]:[-1]:i.length%2==1?n%2==1?i.unshift(0):i.push(0):n%2==1&&(i.unshift(0),i.push(0)),this._pattern=new w,this._pattern.init(i,!1),this._pattern.scale(s)}processPath(t){if(this._pattern.size()%2==1)return null;if(0===this._pattern.length()){this.iteratePath=!1;const e=(0,o.A)(t);return r.z.fromJSONCIM({paths:[e]})}if(!this.iteratePath){let e=!0;switch(this._endings){case"HalfPattern":case"HalfGap":default:this._pattern.extPtGap=0;break;case"FullPattern":this.isClosed||(this._pattern.extPtGap=.5*this._pattern.firstValue());break;case"FullGap":this.isClosed||(this._pattern.extPtGap=.5*this._pattern.lastValue());break;case"NoConstraint":this.isClosed||(e=!1);break;case"Custom":this.isClosed||(this._pattern.extPtGap=.5*this._offsetAtEnd)}const s=t.pathLength();if(this._pattern.isEmpty()||s<.1*this._pattern.length()){const e=(0,o.A)(t);return r.z.fromJSONCIM({paths:[e]})}if(!this._walker.init(t,this._pattern,e)){const e=(0,o.A)(t);return r.z.fromJSONCIM({paths:[e]})}}let e;if(this.iteratePath)e=this._pattern.nextValue();else{let t;switch(this._endings){case"HalfPattern":default:t=.5*this._pattern.firstValue();break;case"HalfGap":t=.5*-this._pattern.lastValue();break;case"FullGap":t=-this._pattern.lastValue();break;case"FullPattern":t=0;break;case"NoConstraint":case"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())}0===e&&(e=this._pattern.nextValue(),this._walker.nextPosition(e),e=this._pattern.nextValue());let s=this._walker.nextCurve(e);if(s)if(this._walker.isPathEnd()){if(this.iteratePath=!1,this._firstCurve){for(this._firstCurve.nextPath();this._firstCurve.nextPoint();)s.pushXY(this._firstCurve.x,this._firstCurve.y);this._firstCurve=null}}else e=this._pattern.nextValue(),!this._walker.nextPosition(e)||this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(s.pushCursor(this._firstCurve),this._firstCurve=null)):this.iteratePath=!0;else this.iteratePath=!1,s=this._firstCurve,this._firstCurve=null;return s?.reset(),s}}class L{static{this.instance=null}static local(){return null===L.instance&&(L.instance=new L),L.instance}execute(t,e,s,i,n,r){return new E(t,e,s,i,n,r)}}class E{constructor(t,e,s,i,n,r){this._preventClipping=r,this._inputGeometries=t,this._tileKey=i,this._maxInflateSize=n*s,this._width=(void 0!==e.width?e.width:2)*s,e.method,this._option=e.option??"Accurate"}next(){let t;for(;t=this._inputGeometries.next();){if("esriGeometryEnvelope"===t.geometryType&&this._width>0){const e=t.asJSON();return Math.min(e.xmax-e.xmin,e.ymax-e.ymin)-2*this._width<0?t:r.z.fromJSONCIM({paths:[[[e.xmin+this._width,e.ymin+this._width],[e.xmax-this._width,e.ymin+this._width],[e.xmax-this._width,e.ymax-this._width],[e.xmin+this._width,e.ymax-this._width],[e.xmin+this._width,e.ymin+this._width]],[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}if("esriGeometryPolygon"===t.geometryType){if(0===this._width)return t.clone();const e=g.$Z.module,s=!this._preventClipping&&this._tileKey?(0,g.qc)(t,this._maxInflateSize,!0):t.clone();if(!s)continue;const i={...s.asJSON(),spatialReference:{wkid:m.A.WebMercator.wkid}},n=e.execute(i,-this._width);if(n)for(const t of n.rings)if(t){s.startPath();for(const e of t.reverse())s.pushXY(e[0],s.yFactor*e[1])}return s}}return null}}var R=s(537);class G{static{this.instance=null}static local(){return null===G.instance&&(G.instance=new G),G.instance}execute(t,e){return new N(t,e)}}class N{constructor(t,e){this._inputGeometries=t,this._medhod=e.method}next(){let t=this._inputGeometries.next();const e=this._medhod;for(;null!=t;){if(t.totalSize>0)switch(e){case"RectangularBox":return O(t);case"ConvexHull":return this._constructConvexHull(t);default:return F(t)}t=this._inputGeometries.next()}return null}_constructConvexHull(t){switch(t.geometryType){case"esriGeometryPolyline":case"esriGeometryPolygon":{const e=g.lX.module,s={...t.asJSON(),spatialReference:{wkid:m.A.WebMercator.wkid}},i=e.execute(s);return i?r.z.fromJSONCIM(i):null}case"esriGeometryEnvelope":return t;default:return null}}}function O(t){const e=(0,R.z8)(t),s={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]};return r.z.fromJSONCIM(s)}function F(t){switch(t.geometryType){case"esriGeometryPolyline":{const e=[];for(;t.nextPath();)D(t,e);return r.z.fromJSONCIM({rings:e})}case"esriGeometryPolygon":case"esriGeometryEnvelope":return t;default:return null}}function D(t,e){if(t.seekPathStart(),!t.nextPoint())return;const s=t.x,i=t.y,n=[[s,i]];for(e.push(n);t.nextPoint();)n.push([t.x,t.y]);n.push([s,i])}class X{static{this.instance=null}static local(){return null===X.instance&&(X.instance=new X),X.instance}execute(t,e,s){return new Y(t,e,s)}}class Y extends c{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new _,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){const e=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._curveHelper.isEmpty(t))return null;t.seekInPath(0);const s=t.x,i=t.y;t.seekInPath(t.pathSize-1);const n=t.x,o=t.y,a=[n-s,o-i];this._curveHelper.normalize(a);const h=s+(n-s)*this._position/100,l=i+(o-i)*this._position/100,c=Math.cos((90-this._angle)/180*Math.PI);let u=Math.sin((90-this._angle)/180*Math.PI);this._mirror&&(u=-u),this._mirror=!this._mirror;const _=[h-this._length/2*c,l-this._length/2*u],f=[h+this._length/2*c,l+this._length/2*u];return e.pushPath([[s,i],_,f,[n,o]]),e}}class H{static{this.instance=null}static local(){return null===H.instance&&(H.instance=new H),H.instance}execute(t,e,s){return new W(t,e,s)}}class W{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(t.totalSize>0)return this._move(t.clone(),this._offsetX,this._offsetY);t=this._inputGeometries.next()}return null}_move(t,e,s){for(;t.nextPath();)for(;t.nextPoint();)t.x=t.x+e,t.y=t.y+s;return t.reset(),t}}var B=s(60408);class U{static{this.instance=null}static local(){return null===U.instance&&(U.instance=new U),U.instance}execute(t,e,s,i,n,r){return new V(t,e,s,i,n,r)}}class V{constructor(t,e,s,i,n,r){this._preventClipping=r,this._inputGeometries=t,this._tileKey=i,this._curveHelper=new _,this._offset=(e.offset??1)*s,this._method=e.method??"Square",this._maxInflateSize=Math.max(Math.abs(n*s),10),this._option=e.option||"Fast",this._offsetFlattenError=u*s}next(){let t;for(;t=this._inputGeometries.next();){if(0===this._offset)return t.clone();if("esriGeometryEnvelope"===t.geometryType){if("Rounded"===this._method&&this._offset>0){const e=(0,o.A)(t),s=this._curveHelper.offset(e,-this._offset,this._method,4,this._offsetFlattenError);if(s){const e=r.z.createEmptyOptimizedCIM(t.geometryType);return e.pushPath(s),e}return null}const e=t.asJSON();if((0,B.ZC)(e)&&Math.min(e.xmax-e.xmin,e.ymax-e.ymin)+2*this._offset>0)return r.z.fromJSONCIM({xmin:e.xmin-this._offset,xmax:e.xmax+this._offset,ymin:e.ymin-this._offset,ymax:e.ymax+this._offset})}const e=!this._preventClipping&&this._tileKey?(0,g.qc)(t,this._maxInflateSize,!0):t.clone();if(!e)continue;const s=g.mO.module,i=g.hd.module,n={...e.asJSON(),spatialReference:{wkid:m.A.WebMercator.wkid}};let a,h=$(this._method);return"esriGeometryPolygon"===t.geometryType&&this._offset>0?("square"===h&&(h="bevel"),a=i.executeMany([n],[this._offset],h,"round")[0]):a=s.execute(n,-this._offset,{joins:h,flattenError:this._offsetFlattenError,miterLimit:4}),a?r.z.fromJSONCIM(a):null}return null}}function $(t){switch(t){case"Rounded":return"round";case"Bevelled":return"bevel";case"Mitered":return"miter";case"Square":return"square"}}var q=s(12359),J=s(28076);class Z{static{this.instance=null}static local(){return null===Z.instance&&(Z.instance=new Z),Z.instance}execute(t,e,s){return new j(t,e,s)}}class j{constructor(t,e,s){this._inputGeometries=t,this._length=(void 0!==e.length?e.length:J.D.CIMGeometricEffectRadial.length)*s,this._angle=void 0!==e.angle?e.angle*Math.PI/180:J.D.CIMGeometricEffectRadial.angle,this._lx=Math.cos(this._angle)*this._length,this._ly=Math.sin(this._angle)*this._length}next(){let t=this._inputGeometries.next();for(;t;){if("esriGeometryPoint"===t.geometryType||"esriGeometryMultipoint"===t.geometryType){const e=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");return t.nextPath()&&t.nextPoint()&&e.pushPath([[t.x,t.y],[t.x+this._lx,t.y+this._ly]]),e}if("esriGeometryPolygon"===t.geometryType){const e=(0,q.IK)(t);if(!e)return null;const s=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");return s.pushPath([[e[0],e[1]],[e[0]+this._lx,e[1]+this._ly]]),s}t=this._inputGeometries.next()}return null}}class K{static{this.instance=null}static local(){return null===K.instance&&(K.instance=new K),K.instance}execute(t,e,s){return new Q(t,e,s)}}class Q{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("esriGeometryPolyline"===t.geometryType)return tt(t.clone());t=this._inputGeometries.next()}return null}}function tt(t){for(;t.nextPath();)for(let e=0;e<t.pathSize/2;e++){t.seekInPath(e);const s=t.x,i=t.y;t.seekInPath(t.pathSize-e-1);const n=t.x,r=t.y;t.x=s,t.y=i,t.seekInPath(e),t.x=n,t.y=r}return t.reset(),t}class et{static{this.instance=null}static local(){return null===et.instance&&(et.instance=new et),et.instance}execute(t,e,s){return new st(t,e,s)}}class st{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||"esriGeometryPoint"===t.geometryType)return t;if(t.totalSize>0){const e=(0,R.z8)(t),s=(e[2]+e[0])/2,i=(e[3]+e[1])/2;return t.reset(),this._rotate(t.clone(),s,i)}t=this._inputGeometries.next()}return null}_rotate(t,e,s){const i=Math.cos(this._rotateAngle),n=Math.sin(this._rotateAngle);for(;t.nextPath();)for(;t.nextPoint();){const r=t.x-e,o=t.y-s;t.x=e+r*i-o*n,t.y=s+r*n+o*i}return t.reset(),t}}class it{static{this.instance=null}static local(){return null===it.instance&&(it.instance=new it),it.instance}execute(t,e,s){return new nt(t,e,s)}}class nt{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(){const t=this._inputGeometries.next();if(t){if(1===this._xFactor&&1===this._yFactor)return t;if("esriGeometryPoint"===t.geometryType)return t;if(t.totalSize>0){const e=(0,R.z8)(t),s=(e[2]+e[0])/2,i=(e[3]+e[1])/2;return t.reset(),this._scaleCursor(t.clone(),s,i)}}return null}_scaleCursor(t,e,s){for(;t.nextPath();)for(;t.nextPoint();)t.x=e+(t.x-e)*this._xFactor,t.y=s+(t.y-s)*this._yFactor;return t.reset(),t}}class rt{constructor(){this._polyline=[]}beginPath(t){this._polyline.push([t])}lineTo(t){if(0===this._polyline.length)throw new Error("No path started. Call beginPath first.");this._polyline[this._polyline.length-1].push(t)}getPointCount(){return this._polyline.reduce((t,e)=>t+e.length,0)}addSegment(t,e,s){s&&this.beginPath(t),this.lineTo(e)}getXY(t){let e=0;for(const s of this._polyline){if(t<e+s.length)return s[t-e];e+=s.length}return null}getGeometry(){return this._polyline}}class ot{static{this.instance=null}static local(){return null===ot.instance&&(ot.instance=new ot),ot.instance}execute(t,e,s){return new at(t,e,s)}}class at extends c{constructor(t,e,s){super(t,!1,!0),this._suppress=void 0!==e.suppress&&e.suppress,this._invert=void 0!==e.invert&&e.invert}processPath(t){if(t.totalSize<=0)return null;if(!this._suppress){const e=r.z.createEmptyOptimizedCIM("esriGeometryPolygon",!1,!1,t.yFactor);for(t.seekPathEnd();t.nextPoint();)e.pushXY(t.x,t.y);return e}const e=[],s=new Array(t.pathSize);let i=0;for(t.seekPathStart();t.nextPoint();)s[i++]=t.getControlPoint(),e.push([t.x,t.y]);let n=!0,o=!0,a=!1,h=!this._invert;i=0;const l=new rt;let c=e[0];for(;i<e.length-1;){const t=e[i+1],r=s[i],u=s[i+1];i++,o&&(h=r||u?this._invert:!this._invert,o=!1),h?(l.addSegment(c,t,n),n=!1):a=!0,c=t,u&&(h?(h=!1,n=!0):h=!0)}const u=l.getGeometry();if(0===u.length)return null;if(!a&&e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]){const t=u[u.length-1];return t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]||t.push([t[0][0],t[0][1]]),r.z.fromJSONCIM({paths:u})}const _=u[u.length-1];return l.getPointCount()>1&&"esriGeometryPolygon"===t.geometryType&&_[0][0]===_[_.length-1][0]&&_[0][1]===_[_.length-1][1]&&u.length>1&&(u[u.length-1].push(...u[0]),u.splice(0,1)),r.z.fromJSONCIM({paths:u})}}var ht=s(49186),lt=s(53966),ct=s(6774);const ut=()=>lt.A.getLogger("esri.symbols.cim.effects.EffectTaperedPolygon");class _t{static{this.instance=null}static local(){return null===_t.instance&&(_t.instance=new _t),_t.instance}execute(t,e,s){return new ft(t,e,s)}}class ft extends c{constructor(t,e,s){super(t,!1,!0),this._slopeS=0,this._slopeC=1,this._lastTangent1=new ct.bR(NaN,NaN),this._lastWidth=0,this._geomUnitsPerPoint=s,this._halfFromWidth=Math.abs(void 0!==e.fromWidth?e.fromWidth:0)*s*.5,this._halfToWidth=Math.abs(void 0!==e.toWidth?e.toWidth:1)*s*.5,this._originalLength=(void 0!==e.length?e.length:0)*s,this._length=0}processPath(t){if(t.totalSize<=0)return null;if(this._halfFromWidth<=0&&this._halfToWidth<=0){const e=r.z.createEmptyOptimizedCIM("esriGeometryPolygon",!1,!1,t.yFactor);for(t.seekPathEnd();t.prevPoint();)e.pushXY(t.x,t.y);for(t.seekPathStart();t.nextPoint();)e.pushXY(t.x,t.y);return e}const e=t.getCurrentPath().asJSON(),s=g.NS.module.execute(e,.25*this._geomUnitsPerPoint,{removeDegenerateParts:!0}),i=null==s?null:(0,B.Bi)(s)?s.rings:(0,B.Rg)(s)?s.paths:null;if(!i)return ut().error(new ht.A("mapview-bad-resource","Unable to process geometry")),null;const n=g.Xs.module.execute(s);if((0===this._originalLength||this._originalLength>n)&&n>0){this._length=n;const t=(this._halfToWidth-this._halfFromWidth)/this._length;if(Math.abs(t)<1){const e=t*t;this._slopeC=Math.sqrt(1/(1+e)),this._slopeS=Math.sqrt(e/(1+e)),t<0&&(this._slopeS=-this._slopeS)}else this._slopeC=this._slopeS=.7071}else this._length=this._originalLength,this._slopeC=1,this._slopeS=0;const o=[];for(const t of i){const e=new rt,s=new rt;let i=0;this._setFromOffset(t.slice(0,2),e,s);for(let n=0,r=3;r<=t.length;++n,++r)i=this._setOffset(t.slice(n,r),i,e,s);this._setToOffset(t.slice(-2),i,e,s);const[n]=e.getGeometry(),[r]=s.getGeometry();o.push([...n,...r.reverse()])}const a={rings:o,spatialReference:{wkid:m.A.WebMercator.wkid}},h=g.yM.module.execute(a);return r.z.fromJSONCIM(h)}_setFromOffset([[t,e],[s,i]],n,r){const o=this._halfFromWidth,a=new ct.bR(s-t,i-e).normalize().scale(o);n.beginPath([t-a.y,e+a.x]),r.beginPath([t+a.y,e-a.x])}_setToOffset([[t,e],[s,i]],n,r,o){let a;a=(n+=Math.sqrt((s-t)**2+(i-e)**2))>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*n/this._length;const h=new ct.bR(s-t,i-e).normalize().scale(a);r.lineTo([s-h.y,i+h.x]),o.lineTo([s+h.y,i-h.x])}_setOffset([[t,e],[s,i],[n,r]],o,a,h){const l=Math.sqrt((s-t)**2+(i-e)**2);let c;c=o+l>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*(o+l)/this._length,o+=l;const u=new ct.bR(s,i),_=new ct.bR(s-t,i-e).normalize(),f=new ct.bR(n-s,r-i).normalize(),p=ct.bR.sub(f,_),d=a.getPointCount(),m=h.getPointCount();_.leftPerpendicular(),f.leftPerpendicular();const g=_.x*f.x+_.y*f.y;if(g>.99){const t=ct.bR.add(_,f).scale(c/2),e=t.clone().rotate(this._slopeC,this._slopeS);a.lineTo([u.x+e.x,u.y+e.y]);const s=t.rotateReverse(this._slopeC,this._slopeS);h.lineTo([u.x-s.x,u.y-s.y])}else{const s=_.x*f.y-_.y*f.x;if(p.scale(1/s),s<0){p.scale(-c).rotateReverse(this._slopeC,this._slopeS);const t=h.getXY(m-1);t||ut().error(new ht.A("mapview-bad-resource","Unable to process geometry, index out of scope"));const e=ct.bR.add(u,p).sub(ct.bR.fromArray(t));if(_.x*e.y-_.y*e.x>0){const t=_.clone().scale(-c).rotateReverse(this._slopeC,this._slopeS),e=f.clone().scale(-c).rotateReverse(this._slopeC,this._slopeS);h.lineTo([u.x+t.x,u.y+t.y]),h.lineTo([u.x,u.y]),h.lineTo([u.x+e.x,u.y+e.y])}else h.lineTo([u.x+p.x,u.y+p.y])}else{p.scale(c).rotate(this._slopeC,this._slopeS);const t=a.getXY(d-1);t||ut().error(new ht.A("mapview-bad-resource","Unable to process geometry, index out of scope"));const e=ct.bR.add(u,p).sub(ct.bR.fromArray(t));if(_.x*e.y-_.y*e.x>0){const t=_.clone().scale(c).rotate(this._slopeC,this._slopeS),e=f.clone().scale(c).rotate(this._slopeC,this._slopeS);a.lineTo([u.x+t.x,u.y+t.y]),a.lineTo([u.x,u.y]),a.lineTo([u.x+e.x,u.y+e.y])}else a.lineTo([u.x+p.x,u.y+p.y])}const i=Math.acos(g);let n=1;if(c>.25){const t=2*Math.acos(1-.25/c);t<i&&(n=Math.round(i/t))}const r=Math.cos(i/n),o=Math.sin(i/n),l=_.clone();if(s<0){l.rotate(this._slopeC,this._slopeS);const s=a.getXY(d-1);s||ut().error(new ht.A("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=ct.bR.add(u,l.clone().scale(this._lastWidth)),n=ct.bR.sub(i,ct.bR.fromArray(s)),r=_.x*n.y-_.y*n.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const s=new ct.bR(t,e),i=this._lastTangent1.clone().scale(this._lastWidth);i.rotate(this._slopeC,this._slopeS);const n=_.clone().scale(this._lastWidth);n.rotate(this._slopeC,this._slopeS),a.lineTo([s.x+i.x,s.y+i.y]),a.lineTo([s.x,s.y]),a.lineTo([s.x+n.x,s.y+n.y])}}else{l.scale(-1).rotateReverse(this._slopeC,this._slopeS);const s=h.getXY(m-1);s||ut().error(new ht.A("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=ct.bR.add(u,l.clone().scale(this._lastWidth)),n=ct.bR.sub(i,ct.bR.fromArray(s)),r=_.x*n.y-_.y*n.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const s=new ct.bR(t,e),i=this._lastTangent1.clone().scale(-this._lastWidth);i.rotateReverse(this._slopeC,this._slopeS);const n=_.clone().scale(-this._lastWidth);n.rotateReverse(this._slopeC,this._slopeS),h.lineTo([s.x+i.x,s.y+i.y]),h.lineTo([s.x,s.y]),h.lineTo([s.x+n.x,s.y+n.y])}}l.scale(c);for(let t=0;t<=n;t++)s<0?(a.lineTo([u.x+l.x,u.y+l.y]),l.rotateReverse(r,o)):(h.lineTo([u.x+l.x,u.y+l.y]),l.rotate(r,o))}return this._lastTangent1.setCoords(_.x,_.y),this._lastWidth=c,o}}class pt{static{this.instance=null}static local(){return null===pt.instance&&(pt.instance=new pt),pt.instance}execute(t,e,s){return new dt(t,e,s)}}class dt{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??"Sinus",this._height<=0&&(this._height=Math.abs(this._height)),this._period<=0&&(this._period=Math.abs(this._period)),this._pattern=new w,this._pattern.addValue(this._period),this._pattern.addValue(this._period),this._walker=new z,this._walker.updateTolerance(s)}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._height||0===this._period)return t;const e=this._processGeom(t);if(e)return e;t=this._inputGeometries.next()}return null}_processGeom(t){const e=r.z.createEmptyOptimizedCIM(t.geometryType);for(;t.nextPath();){e.startPath();const s=t.pathLength();if(this._walker.init(t,this._pattern))switch(this._style){case"Sinus":default:this._constructCurve(e,s,!1);break;case"Square":this._constructSquare(e,s);break;case"Triangle":this._constructTriangle(e,s);break;case"Random":this._constructCurve(e,s,!0)}else for(;t.nextPoint();)e.pushXY(t.x,t.y)}return e}_constructCurve(t,e,s){let i=Math.round(e/this._period);0===i&&(i=1);const n=16*i+1,r=e/i,o=this._period/16,a=1/n,h=2*Math.PI*e/r,l=2*Math.PI*Math.random(),c=2*Math.PI*Math.random(),u=2*Math.PI*Math.random(),_=.75-Math.random()/2,f=.75-Math.random()/2,p=new k;this._walker.curPointAndAngle(p),t.pushPoint(p.pt);let d=0;for(;;){if(!this._walker.nextPointAndAngle(o,p)){t.pushPoint(this._walker.getPathEnd());break}{const e=d;let i;if(d+=a,s){const t=this._height/2*(1+.3*Math.sin(_*h*e+l));i=t*Math.sin(h*e+c),i+=t*Math.sin(f*h*e+u),i/=2}else i=.5*this._height*Math.sin(.5*h*e);t.pushXY(p.pt[0]-i*p.sa,p.pt[1]+i*p.ca)}}}_constructSquare(t,e){Math.round(e/this._period);let s=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const i=new k;this._walker.curPointAndAngle(i);const n=new k;if(this._walker.nextPointAndAngle(this._period,n)){const r=new k;this._walker.nextPointAndAngle(this._period,r)&&(s?(t.pushPoint(i.pt),s=!1):t.pushPoint(i.pt),t.pushXY(i.pt[0]-this._height/2*i.sa,i.pt[1]+this._height/2*i.ca),t.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),t.pushXY(n.pt[0]+this._height/2*n.sa,n.pt[1]-this._height/2*n.ca),t.pushXY(r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}_constructTriangle(t,e){Math.round(e/this._period);let s=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const i=new k;this._walker.curPointAndAngle(i);const n=new k;if(this._walker.nextPointAndAngle(this._period/2,n)){const r=new k;this._walker.nextPointAndAngle(this._period,r)&&(this._walker.nextPosition(this._period/2)&&(s?(t.pushPoint(i.pt),s=!1):t.pushPoint(i.pt),t.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),t.pushXY(r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca)),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}}class mt{static{this.instance=null}static local(){return null===mt.instance&&(mt.instance=new mt),mt.instance}execute(t,e,s){return new gt(t,e,s)}}class gt extends l{constructor(t,e,s){super(t),this._geometryWalker=new z,this._geometryWalker.updateTolerance(s),this._angleToLine=e.angleToLine??!0,this._keepUpright=e.keepUpright??!1,this._offset=(e.offset?e.offset:0)*s,this._originalEndings=e.endings??"WithHalfGap",this._offsetAtEnd=(e.customEndingOffset?e.customEndingOffset:0)*s,this._position=-(e.offsetAlongLine?e.offsetAlongLine:0)*s,this._pattern=new w,this._pattern.init(e.placementTemplate),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{"WithFullGap"===this._originalEndings&&this.isClosed?this._endings="WithMarkers":this._endings=this._originalEndings,this._pattern.extPtGap=0;let s,i=!0;switch(this._endings){case"NoConstraint":s=-this._position,s=this._adjustPosition(s),i=!1;break;case"WithHalfGap":default:s=-this._pattern.lastValue()/2;break;case"WithFullGap":s=-this._pattern.lastValue(),this._pattern.extPtGap=this._pattern.lastValue();break;case"WithMarkers":s=0;break;case"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 n=0;for(;s>n;)s-=n,n=this._pattern.nextValue();n-=s,e=n,this.iteratePath=!0}const s=new k;return this._geometryWalker.nextPointAndAngle(e,s)?"WithFullGap"===this._endings&&this._geometryWalker.isPathEnd()?(this.iteratePath=!1,null):"WithMarkers"===this._endings&&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 yt{static{this.instance=null}static local(){return null===yt.instance&&(yt.instance=new yt),yt.instance}execute(t,e,s){return new Pt(t,e,s)}}class Pt extends l{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new _,this._placePerPart=e.placePerPart??!1,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._keepUpright=e.keepUpright??!1,this._offset=void 0!==e.offset?e.offset*s:0,this._type=e.extremityPlacement??"Both",this._position=void 0!==e.offsetAlongLine?e.offsetAlongLine*s:0,this._beginProcessed=!1}processMultiPath(t){return this._placePerPart?super.processMultiPath(t):this.processPath(t)}processPath(t){let e;switch(this._type){case"Both":default:this._beginProcessed?(e=this._atExtremities(t,this._position,!1),this._beginProcessed=!1,this.iterateMultiPath=!1,this.iteratePath=!1):(e=this._atExtremities(t,this._position,!0),this._beginProcessed=!0,this.iterateMultiPath=!0,this.iteratePath=!0);break;case"JustBegin":e=this._atExtremities(t,this._position,!0);break;case"JustEnd":e=this._atExtremities(t,this._position,!1);case"None":}return e}_atExtremities(t,e,s){if(this._placePerPart||(s?t.seekPath(0):t.seekPath(t.totalSize-1)),s||t.seekPathEnd(),s?t.nextPoint():t.prevPoint()){let i=0,[n,r]=[0,0],[o,a]=[t.x,t.y];const h=[0,0];for(;s?t.nextPoint():t.prevPoint();){n=o,r=a,o=t.x,a=t.y;const s=this._curveHelper.getLength(n,r,o,a);if(i+s>e){const t=(e-i)/s,[l,c]=this._curveHelper.getAngleCS(h,n,r,o,a,t),u=this._curveHelper.getCoord2D(n,r,o,a,t);return this.internalPlacement.setTranslate(u[0]-this._offset*c,u[1]+this._offset*l),this._angleToLine&&this.internalPlacement.setRotateCS(-l,-c),this.internalPlacement}i+=s}}return null}}const xt=.001;class Mt{static{this.instance=null}static local(){return null===Mt.instance&&(Mt.instance=new Mt),Mt.instance}execute(t,e,s){return new bt(t,e,s)}}class bt extends l{constructor(t,e,s){super(t),this._segmentIterator=null,this._segCount=0,this._firstSeg=!0,this._seg=null,this._ms=[],this._from=0,this._to=0,this._pt=null,this._walker=new z,this._walker.updateTolerance(s),this._placePerPart=e.placePerPart??!1,this._angleToLine=e.angleToLine??!1,this._keepUpright=e.keepUpright??!1,this._offset=(e.offset??0)*s,this._interval=(e.interval??0)*s,this._interval<=0&&(this._interval=.01),this._skipRate=e.skipMarkerRate??0,this._skipRate<=1&&(this._skipRate=0),this._placeAtExtremities=e.placeAtExtremities??!1}processPath(t){if(!this.iteratePath){const{fromGeometry:e}=g.vZ.module,s=e(t.getCurrentPath().asJSON()).getGeometry(),i=s.getPathStart(0);this._segmentIterator=s.querySegmentIteratorAtVertex(i),this._segCount=s.getSegmentCountPath(0),this._firstSeg=!0,this.iteratePath=!0,this._pt=s.getXY(0).clone()}for(;0===this._ms.length&&this._segmentIterator?.hasNextSegment();){--this._segCount,this._seg=this._segmentIterator.nextSegment(),this._from=this._seg.getStartAttributeAsDbl(2,0),this._to=this._seg.getEndAttributeAsDbl(2,0);const e=!isNaN(this._from),s=!isNaN(this._to);e&&(this._from=Math.round(this._from/xt)*xt,Math.abs(this._from)<xt&&(this._from=0)),s&&(this._to=Math.round(this._to/xt)*xt,Math.abs(this._to)<xt&&(this._to=0));let i=e?Math.floor(this._from/this._interval):0,n=s?Math.floor(this._to/this._interval):0;if(e&&(this._placeAtExtremities||!this._firstSeg||!this._placePerPart&&t.pathIndex>0)&&Math.abs(i*this._interval-this._from)<xt&&(!this._skipRate||i%this._skipRate)&&this._ms.push(this._from),this._firstSeg=!1,e&&s&&!(Math.abs(this._from-this._to)<xt))if(this._from<=this._to){i*this._interval<this._from+xt&&++i,n*this._interval>this._to-xt&&--n;for(let t=i;t<=n;++t)(!this._skipRate||t%this._skipRate)&&this._ms.push(t*this._interval)}else{i*this._interval>this._from-xt&&--i,n*this._interval<this._to+xt&&++n;for(let t=n;t<=i;++t)(!this._skipRate||t%this._skipRate)&&this._ms.push(t*this._interval)}}let e=0;if(0===this._ms.length){if(this.iteratePath=!1,!this._segCount&&this._placeAtExtremities&&!isNaN(this._to)&&(this._placePerPart||t.pathIndex===t.totalSize-1)){const t=Math.floor(this._to/this._interval);Math.abs(t*this._interval-this._to)<xt&&(!this._skipRate||t%this._skipRate)&&(this._ms.push(this._to),e=1)}if(0===this._ms.length)return null}const s=this._ms.pop(),i=isNaN(this._from)||isNaN(this._to)||Math.abs(this._from-this._to)<xt?e:(s-this._from)/(this._to-this._from);this._seg.queryCoord2D(i,this._pt);const n=this._seg.getTangent(i),{x:r,y:o}=n.normalize();return this.internalPlacement.setTranslate(this._pt.x-this._offset*o,this._pt.y+this._offset*r),this._angleToLine&&this.internalPlacement.setRotateCS(r,o),this.internalPlacement.setMeasure(s),this.internalPlacement}}class St{static{this.instance=null}static local(){return null===St.instance&&(St.instance=new St),St.instance}execute(t,e,s){return new Ct(t,e,s)}}class Ct extends l{constructor(t,e,s){super(t),this._walker=new z,this._walker.updateTolerance(s),this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._keepUpright=e.keepUpright??!1,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 w,this._pattern.init(e.positionArray,!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=t.pathLength()-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=new k;if(!this._walker.nextPointAndAngle(e,s,1))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 n,r;return this._angleToLine?(n=s.ca,r=s.sa):(n=1,r=0),i&&(n=-n,r=-r),this.internalPlacement.setRotateCS(n,r),this._isFirst=!1,this._posCount--,0===this._posCount&&(this.iteratePath=!1),this.internalPlacement}}var wt=s(87811);const kt=512,It=24,zt=1e-6;class vt{static{this.instance=null}static local(){return null===vt.instance&&(vt.instance=new vt),vt.instance}execute(t,e,s,i){return new Tt(t,e,s,i)}}class Tt{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._accelerationMap=null,this._testInsidePolygon=!1,this._verticalSubdivision=!0,this._stepX=Math.abs(e.stepX??16)*s,this._stepY=Math.abs(e.stepY??16)*s,this._stepX=Math.round(128*this._stepX)/128,this._stepY=Math.round(128*this._stepY)/128,0!==this._stepX&&0!==this._stepY){if(this._gridType=e.gridType??"Fixed","Random"===this._gridType){const t=e.seed??13,s=1;this._randomLCG=new wt.A(t*s),this._randomness=(e.randomness??100)/100,this._gridAngle=0,this._shiftOddRows=!1,this._cosAngle=1,this._sinAngle=0,this._offsetX=0,this._offsetY=0,this._buildRandomValues()}else{if(this._randomness=0,this._gridAngle=e.gridAngle??0,this._shiftOddRows=e.shiftOddRows??!1,this._offsetX=(e.offsetX??0)*s,this._offsetY=(e.offsetY??0)*s,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}if(this._graphicOriginX=0,this._graphicOriginY=0,null!=i){const[t,e,s,n]=i.split("/"),r=parseFloat(t),o=parseFloat(e),a=parseFloat(s),h=parseFloat(n);this._graphicOriginX=-(h*2**r+a)*kt,this._graphicOriginY=o*kt,this._testInsidePolygon=!0}this._internalPlacement=new a.W,this._calculateMinMax(t),this._geometryCursor=t}}next(){return this._geometryCursor?this._nextInside():null}_buildRandomValues(){if(!Tt._randValues){Tt._randValues=[];for(let t=0;t<It;t++)for(let t=0;t<It;t++)Tt._randValues.push(this._randomLCG.getFloat()),Tt._randValues.push(this._randomLCG.getFloat())}}_calculateMinMax(t){let e,s,i,n,r,o,a,h,l,c,u,_,f,p;this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,a=h=f=u=Number.MAX_VALUE,l=c=p=_=-Number.MAX_VALUE;const d=1!==this._cosAngle;for(t.reset();t.nextPath();)for(;t.nextPoint();)o=t.x,r=t.y,e=o-this._graphicOriginX-this._offsetX,s=r-this._graphicOriginY-this._offsetY,d?(i=this._cosAngle*e-this._sinAngle*s,n=this._sinAngle*e+this._cosAngle*s):(i=e,n=s),a=Math.min(a,i),l=Math.max(l,i),h=Math.min(h,n),c=Math.max(c,n),u=Math.min(u,r),_=Math.max(_,r),f=Math.min(f,o),p=Math.max(p,o);u=u!==Number.MAX_VALUE?u:-512-this._stepY,_=_!==-Number.MAX_VALUE?_:this._stepY,f=f!==Number.MAX_VALUE?f:-this._stepX,p=p!==-Number.MAX_VALUE?p:kt+this._stepX;const m=_-u,g=p-f;if(this._verticalSubdivision=m>=g,this._polygonMin=this._verticalSubdivision?u:f,this._testInsidePolygon){let t=0-this._graphicOriginX-this._offsetX-this._stepX,e=kt-this._graphicOriginX-this._offsetX+this._stepX,s=-512-this._graphicOriginY-this._offsetY-this._stepY,i=0-this._graphicOriginY-this._offsetY+this._stepY;if(d){const n=[[t,s],[t,i],[e,s],[e,i]];t=s=Number.MAX_VALUE,e=i=-Number.MAX_VALUE;for(const r of n){const n=this._cosAngle*r[0]-this._sinAngle*r[1],o=this._sinAngle*r[0]+this._cosAngle*r[1];t=Math.min(t,n),e=Math.max(e,n),s=Math.min(s,o),i=Math.max(i,o)}}a=a!==Number.MAX_VALUE?Math.max(a,t):t,h=h!==Number.MAX_VALUE?Math.max(h,s):s,l=l!==-Number.MAX_VALUE?Math.min(l,e):e,c=c!==-Number.MAX_VALUE?Math.min(c,i):i}this._xMin=Math.round(a/this._stepX),this._xMax=Math.round(l/this._stepX),this._yMin=Math.round(h/this._stepY),this._yMax=Math.round(c/this._stepY),this._currentX=this._xMax+1,this._currentY=this._yMin-1,this._buildAccelerationMap(t,f,p,u,_)}_buildAccelerationMap(t,e,s,i,n){t.reset();const r=new Map,o=this._verticalSubdivision,a=o?n-i:s-e;let h=Math.ceil(a/10);if(h<=1)return;const l=Math.floor(a/h);let c,u,_,f,p,d,m,g,y,P,x;for(h++,this._delta=l,o?(y=-512-2*this._stepY,P=2*this._stepY,x=i):(y=-2*this._stepX,P=kt+2*this._stepX,x=e);t.nextPath();)if(!(t.pathSize<2)&&t.nextPoint())for(c=t.x,u=t.y;t.nextPoint();c=_,u=f){if(_=t.x,f=t.y,o){if(u===f||u<y&&f<y||u>P&&f>P)continue;p=Math.min(u,f),d=Math.max(u,f)}else{if(c===_||c<y&&_<y||c>P&&_>P)continue;p=Math.min(c,_),d=Math.max(c,_)}for(;p<d;)m=Math.floor((p-x)/l),At(m,c,u,_,f,r),p+=l;g=Math.floor((d-x)/l),g>m&&At(g,c,u,_,f,r)}this._accelerationMap=r}_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;if(this._currentX++,"Random"===this._gridType){const n=(this._currentX%It+It)%It,r=(this._currentY%It+It)%It;s=this._graphicOriginX+t+this._stepX*this._randomness*(.5-Tt._randValues[r*It+n])*2/3,i=this._graphicOriginY+e+this._stepY*this._randomness*(.5-Tt._randValues[r*It+n+1])*2/3}else s=this._graphicOriginX+this._cosAngle*t+this._sinAngle*e,i=this._graphicOriginY-this._sinAngle*t+this._cosAngle*e;if(!this._testInsidePolygon||this._isInsidePolygon(s,i,this._geometryCursor))return this._internalPlacement.setTranslate(s,i),this._internalPlacement}}_isInsidePolygon(t,e,s){if(null==this._accelerationMap)return function(t,e,s){let i,n,r,o,a=0;for(t+=zt,e+=zt,s.reset();s.nextPath();)if(s.nextPoint())for(i=s.x,n=s.y;s.nextPoint();i=r,n=o)r=s.x,o=s.y,n>e!=o>e&&((r-i)*(e-n)-(o-n)*(t-i)>0?a++:a--);return 0!==a}(t,e,s);t+=zt,e+=zt;const i=this._verticalSubdivision,n=i?e:t,r=Math.floor((n-this._polygonMin)/this._delta),o=this._accelerationMap.get(r);if(!o)return!1;let a,h,l,c=0;for(const s of o){if(a=s[0],h=s[1],i){if(a[1]>e==h[1]>e)continue;l=(h[0]-a[0])*(e-a[1])-(h[1]-a[1])*(t-a[0])}else{if(a[0]>t==h[0]>t)continue;l=(h[1]-a[1])*(t-a[0])-(h[0]-a[0])*(e-a[1])}l>0?c++:c--}return 0!==c}}function At(t,e,s,i,n,r){let o=r.get(t);o||(o=[],r.set(t,o)),o.push([[e,s],[i,n]])}class Lt{static{this.instance=null}static local(){return null===Lt.instance&&(Lt.instance=new Lt),Lt.instance}execute(t,e,s){return new Et(t,e,s)}}class Et extends l{constructor(t,e,s){super(t),this._curveHelper=new _,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._keepUpright=e.keepUpright??!1,this._offset=void 0!==e.offset?e.offset*s:0,this._relativeTo=e.relativeTo??"LineMiddle",this._position=void 0!==e.startPointOffset?e.startPointOffset*s:0,this._epsilon=.001*s}processPath(t){const e=this._position;if("SegmentMidpoint"===this._relativeTo){if(this.iteratePath||(this.iteratePath=!0),t.nextPoint()){let[e,s]=[t.x,t.y],[i,n]=[0,0];const r=[0,0];for(;t.nextPoint();){i=t.x,n=t.y;const o=this._curveHelper.getLength(e,s,i,n);if(o<this._epsilon){e=i,s=n;continue}const a=.5+this._position/o,[h,l]=this._curveHelper.getAngleCS(r,e,s,i,n,a),c=this._curveHelper.getCoord2D(e,s,i,n,a);return this.internalPlacement.setTranslate(c[0]-this._offset*l,c[1]+this._offset*h),this._angleToLine&&this.internalPlacement.setRotateCS(h,l),this.internalPlacement}}return this.iteratePath=!1,null}const s="LineEnd"===this._relativeTo;return this.onLine(t,e,s)}onLine(t,e,s){let i,n=!1;switch(this._relativeTo){case"LineMiddle":default:t.seekPathStart(),i=t.pathLength()/2+e;break;case"LineBeginning":i=e;break;case"LineEnd":i=e,n=!0}s?t.seekPathEnd():t.seekPathStart();let r=0;if(s?t.prevPoint():t.nextPoint()){let[e,o]=[t.x,t.y],[a,h]=[0,0];const l=[0,0];for(;s?t.prevPoint():t.nextPoint();){a=t.x,h=t.y;const s=this._curveHelper.getLength(e,o,a,h);if(r+s>i){const t=(i-r)/s,[c,u]=this._curveHelper.getAngleCS(l,e,o,a,h,t),_=this._curveHelper.getCoord2D(e,o,a,h,t),f=n?-this._offset:this._offset;return this.internalPlacement.setTranslate(_[0]-f*u,_[1]+f*c),this._angleToLine&&(n?this.internalPlacement.setRotateCS(-c,-u):this.internalPlacement.setRotateCS(c,u)),this.internalPlacement}e=a,o=h,r+=s}}return null}}class Rt{static{this.instance=null}static local(){return null===Rt.instance&&(Rt.instance=new Rt),Rt.instance}execute(t,e,s){return new Gt(t,e,s)}}class Gt extends l{constructor(t,e,s){super(t),this._curveHelper=new _,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._keepUpright=e.keepUpright??!1,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]),n=Math.sin(e[2]);s-=this._offset*n,i+=this._offset*t}return this.internalPlacement.setTranslate(s,i),this._tagIterator++,this.internalPlacement}_preparePath(t){this._tags.length=0,this._tagIterator=0,t.seekPathStart();const e=t.isClosed();let s=0,i=!1,n=0,r=0;if(t.seekPathStart(),t.nextPoint()){let o=t.x,a=t.y,h=t.getControlPoint(),l=!0,c=t.nextPoint();for(;c;){const u=t.x,_=t.y,f=t.getControlPoint();(this._angleToLine||0!==this._offset)&&(n=this._curveHelper.getAngle(o,a,u,_,0)),l?(l=!1,e?(s=n,i=h):(this._endPoints||this._controlPoints&&h)&&this._tags.push([o,a,n])):h?this._controlPoints&&this._tags.push([o,a,Nt(r,n)]):this._regularVertices&&this._tags.push([o,a,Nt(r,n)]),(this._angleToLine||0!==this._offset)&&(r=this._curveHelper.getAngle(o,a,u,_,1)),c=t.nextPoint(),c||(e?f||i?this._controlPoints&&this._tags.push([u,_,Nt(r,s)]):this._regularVertices&&this._tags.push([u,_,Nt(r,s)]):(this._endPoints||this._controlPoints&&f)&&this._tags.push([u,_,r])),o=u,a=_,h=f}}this._tagIterator=0}}function Nt(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}var Ot=s(32011);class Ft{static{this.instance=null}static local(){return null===Ft.instance&&(Ft.instance=new Ft),Ft.instance}execute(t,e,s){return new Dt(t,e,s)}}class Dt{constructor(t,e,s){this._geometryCursor=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:"OnPolygon",this._placementPerPart=void 0!==e.placePerPart&&e.placePerPart,this._internalPlacement=new a.W}next(){const t=this._geometryCursor;if(!t)return null;if(!this._placementPerPart)return this._geometryCursor=null,this._polygonCenter(t);for(;t.nextPath();)if(!(t.getCurrentRingArea()<0))return this._polygonCenter(t.getCurrentPath());return this._geometryCursor=null,null}_polygonCenter(t){let e=!1;switch(this._method){case"CenterOfMass":{const s=(0,q.TP)(t);s&&(this._internalPlacement.setTranslate(s[0]+this._offsetX,s[1]+this._offsetY),e=!0)}break;case"BoundingBoxCenter":{const s=(0,R.z8)(t);s&&(this._internalPlacement.setTranslate((s[2]+s[0])/2+this._offsetX,(s[3]+s[1])/2+this._offsetY),e=!0)}break;default:{const s=(0,Ot.d)(t);null!==s&&(this._internalPlacement.setTranslate(s[0]+this._offsetX,s[1]+this._offsetY),e=!0)}}return e?this._internalPlacement:null}}class Xt{static{this.instance=null}static local(){return null===Xt.instance&&(Xt.instance=new Xt),Xt.instance}execute(t,e,s){return new Yt(t,e,s)}}class Yt{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class Ht{static{this.instance=null}static local(){return null===Ht.instance&&(Ht.instance=new Ht),Ht.instance}execute(t,e,s){return new Wt(t,e,s)}}class Wt{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class Bt{static{this.instance=null}static local(){return null===Bt.instance&&(Bt.instance=new Bt),Bt.instance}execute(t,e,s){return new Ut(t,e,s)}}class Ut{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class Vt{static{this.instance=null}static local(){return null===Vt.instance&&(Vt.instance=new Vt),Vt.instance}execute(t,e,s){return new $t(t,e,s)}}class $t{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class qt{static{this.instance=null}static local(){return null===qt.instance&&(qt.instance=new qt),qt.instance}execute(t,e,s){if("linearDimensionPointEffect"!==e?.type)throw new Error("Invalid effect type for LinearDimensionPointEffect");return new Jt(t,e,s)}}class Jt{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class Zt{static{this.instance=null}static local(){return null===Zt.instance&&(Zt.instance=new Zt),Zt.instance}execute(t,e,s){return new jt(t,e,s)}}class jt{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}function Kt(t){if(!t)return null;switch(t.type){case"CIMGeometricEffectAddControlPoints":return i.local();case"CIMGeometricEffectArrow":return p.local();case"CIMGeometricEffectBuffer":return y.local();case"CIMGeometricEffectControlMeasureLine":return M.local();case"CIMGeometricEffectCut":return S.local();case"CIMGeometricEffectDashes":return T.local();case"CIMGeometricEffectDonut":return L.local();case"CIMGeometricEffectJog":return X.local();case"CIMGeometricEffectMove":return H.local();case"CIMGeometricEffectOffset":return U.local();case"CIMGeometricEffectRadial":return Z.local();case"CIMGeometricEffectReverse":return K.local();case"CIMGeometricEffectRotate":return et.local();case"CIMGeometricEffectScale":return it.local();case"CIMGeometricEffectSuppress":return ot.local();case"CIMGeometricEffectTaperedPolygon":return _t.local();case"CIMGeometricEffectWave":return pt.local();case"CIMGeometricEffectEnclosingPolygon":return G.local();case"LinearDimensionLineEffect":return Vt.local();case"LinearDimensionLeaderLineEffect":return Bt.local();case"LinearDimensionPointEffect":return qt.local();case"LinearDimensionArrowEffect":return Xt.local();case"LinearDimensionTextEffect":return Zt.local();case"LinearDimensionExtensionLineEffect":return Ht.local()}return null}function Qt(t){if(!t)return null;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":return mt.local();case"CIMMarkerPlacementAtExtremities":return yt.local();case"CIMMarkerPlacementAtMeasuredUnits":return Mt.local();case"CIMMarkerPlacementAtRatioPositions":return St.local();case"CIMMarkerPlacementInsidePolygon":return vt.local();case"CIMMarkerPlacementOnLine":return Lt.local();case"CIMMarkerPlacementOnVertices":return Rt.local();case"CIMMarkerPlacementPolygonCenter":return Ft.local()}return null}},98939(t,e,s){s.d(e,{W:()=>i});class i{constructor(){this.setIdentity()}getAngle(){return(null==this.rz||0===this.rz&&1!==this.rzCos&&0!==this.rzSin)&&(this.rz=Math.atan2(this.rzSin,this.rzCos)),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.rzCos=1,this.rzSin=0}setTranslate(t,e){this.tx=t,this.ty=e}setTranslateZ(t){this.tz=t}setRotateCS(t,e){this.rz=void 0,this.rzCos=t,this.rzSin=e}setRotate(t){this.rz=t,this.rzCos=void 0,this.rzSin=void 0}setRotateY(t){this.ry=t}setScale(t){this.s=t}setMeasure(t){this.m=t}}},92649(t,e,s){s.r(e),s.d(e,{CIMSymbolHelper:()=>ut,CIMSymbolInflatedSizeHelper:()=>ct,capTypeToEnum:()=>ft,forEachSymbolLayer:()=>_t,getEffectsInflateSize:()=>ht,slsDashToTemplateArray:()=>Mt,symbolToCIM:()=>rt});const i=new(s(32488).A);function n(t,e=!0){if(!i.hasBidiChar(t))return[t,!1,{...i}];let s;s="rtl"===i.checkContextual(t)?"IDNNN":"ICNNN";const n=e?"VLYSN":"VLYNN";return[i.bidiTransform(t,s,n),!0,{...i}]}var r=s(4718),o=s(53966),a=s(87811),h=s(90629),l=s(19419),c=s(537),u=s(52006),_=s(31411),f=s(11831),p=s(35833),d=s(98939);s(92602);new Map,new Set,s(44208);var m=s(34727),g=s(93687),y=s(36745),P=s(12359),x=s(60408);class M{applyColorSubstitution(t,e){if(!e)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:s,height:i}=t,n=this._rasterizationCanvas,r=n.getContext("2d",{willReadFrequently:!0});t!==n&&(n.width=s,n.height=i,r.drawImage(t,0,0,s,i));const o=r.getImageData(0,0,s,i).data;if(e)for(const t of e)if(t&&t.oldColor&&4===t.oldColor.length&&t.newColor&&4===t.newColor.length){const[e,s,i,n]=t.oldColor,[r,a,h,l]=t.newColor;if(e===r&&s===a&&i===h&&n===l)continue;for(let t=0;t<o.length;t+=4)e===o[t]&&s===o[t+1]&&i===o[t+2]&&n===o[t+3]&&(o[t]=r,o[t+1]=a,o[t+2]=h,o[t+3]=l)}const a=new ImageData(o,s,i);return r.putImageData(a,0,0),n}tintImageData(t,e){if(!e||e.length<4)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:s,height:i}=t,n=this._rasterizationCanvas,r=n.getContext("2d",{willReadFrequently:!0});t!==n&&(n.width=s,n.height=i,r.drawImage(t,0,0,s,i));const o=r.getImageData(0,0,s,i),a=new Uint8Array(o.data),h=[e[0]/255,e[1]/255,e[2]/255,e[3]/255];for(let t=0;t<a.length;t+=4)a[t]*=h[0],a[t+1]*=h[1],a[t+2]*=h[2],a[t+3]*=h[3];const l=new ImageData(new Uint8ClampedArray(a.buffer),s,i);return r.putImageData(l,0,0),n}}var b=s(92580),S=s(28076);function C(t){const e=t.getFrame(0);if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement)return e;const s=document.createElement("canvas");s.width=t.width,s.height=t.height;const i=s.getContext("2d");return e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0),s}function w(t,e=0){if(0===e)return t;const s=Math.cos(e),i=Math.sin(e),[n,r]=t;return[n*s+r*-i,n*i+r*s]}function k(t,e=0){let s=0;for(let i=0;i<4;i++)s+=t[e+i]*I[i];return s}const I=[1/256,1/65536,1/16777216,1/4294967296];k(new Uint8ClampedArray([255,255,255,255])),k(new Uint8ClampedArray([255,255,255,0])),s(35521);var z=s(76213);const v=()=>o.A.getLogger("esri.symbols.cim.rasterizingUtils");let T;function A(t,e){const{colorRamp:s,gradientType:i}=e,n=L(s),r="CIMFixedColorRamp"===s.type;if("Continuous"===i&&!r)return E(t,n);const o=e.interval??S.D.CIMGradientFill.interval;if(r)return E(t,function(t,e){const s=[],i=(t.length-1)/(e-1);for(let n=0;n<e;n++){const r=t[Math.round(n*i)].color;s.push({offset:n/e,color:r}),s.push({offset:(n+1)/e,color:r})}return s}(n,o));const a=[];T??=document.createElement("canvas"),function(t,e,s,i,n){const r=s+2*n;t.width=r,t.height=i;const o=(n+1)/r,a=t.getContext("2d",{willReadFrequently:!0});if(e.length>0){const t=a.createLinearGradient(0,0,r,i);E(t,e,o),a.fillStyle=t}else a.fillStyle="rgba(128, 128, 128, 1)";a.fillRect(0,0,r,i)}(T,n,o,1,0);const h=T.getContext("2d").getImageData(0,0,o,1).data;for(let t=0,e=0;t<o;t++,e=4*t){const s=[h[e+0],h[e+1],h[e+2],h[e+3]];a.push({offset:t/o,color:s}),a.push({offset:(t+1)/o,color:s})}return E(t,a)}function L(t){const e=[];switch(t.type){case"CIMPolarContinuousColorRamp":case"CIMLinearContinuousColorRamp":{"CIMPolarContinuousColorRamp"===t.type&&v().warnOnce("CIMPolarContinuousColorRamp is currently unsupported. Falling back to CIMLinearContinuousColorRamp.");const s=t;e.push({offset:0,color:[s.fromColor[0],s.fromColor[1],s.fromColor[2],s.fromColor[3]/255]}),e.push({offset:1,color:[s.toColor[0],s.toColor[1],s.toColor[2],s.toColor[3]/255]});break}case"CIMFixedColorRamp":{const s=t,i=1/(s.colors.length-1);let n=0;for(const t of s.colors)e.push({offset:n,color:[t[0],t[1],t[2],t[3]/255]}),n+=i;break}case"CIMMultipartColorRamp":{const s=t,i=s.weights.reduce((t,e)=>t+e,0);let n=0;for(let t=0;t<s.colorRamps.length;t++){const r=s.colorRamps[t],o=s.weights[t],a=L(r);for(const t of a)e.push({offset:(n+t.offset*o)/i,color:t.color});n+=o}break}default:v().error(`Color ramp "${t.type}" currently unsupported.`)}return e}function E(t,e,s=0){for(const{offset:i,color:n}of e)t.addColorStop(Math.min(Math.max(i,s),1-s),`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${n[3]})`)}class R{constructor(t=0,e=0,s=0,i=0){this.x=t,this.y=e,this.width=s,this.height=i}static fromExtent(t){return new R(t.xmin,-t.ymax,t.xmax-t.xmin,t.ymax-t.ymin)}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)}}var G=s(5760);function N(t){return`rgba(${t.slice(0,3).toString()},${t[3]})`}class O{constructor(t){t&&(this._textRasterizationCanvas=t)}rasterizeText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const s=this._textRasterizationCanvas,i=s.getContext("2d",{willReadFrequently:!0});F(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const{decoration:n,weight:r}=e.font;this._lineThroughWidthOffset=n&&"line-through"===n?.1*this._lineHeight:0;const o=null!=e.backgroundColor||null!=e.borderLine,a=o?G.y7:0,h=this._computeTextWidth(i,e)+2*a,l=this._lineHeight*this._textLines.length+2*a;if(s.width=h+2*this._lineThroughWidthOffset,s.height=l,0===s.width||0===s.height)return s.width=s.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:s};this._renderedLineHeight=Math.round(this._lineHeight),this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._renderedWidth=h,this._renderedHeight=l,this._lineThroughWidthOffset*=e.pixelRatio;const c=(e.outline&&e.outline.color)??[0,0,0,0],u=e.color??[0,0,0,0],_=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=N(u),this._outlineStyle=N(c),this._haloStyle=function(t){return`rgb(${t.slice(0,3).toString()})`}(_);const f=this._renderedLineHeight,p=this._renderedOutlineSize,d=this._renderedHaloSize;i.save(),i.clearRect(0,0,s.width,s.height),F(i,e);const m=a*e.pixelRatio,g=function(t,e,s){return"center"===t?.5*e:"right"===t?e-s:s}(i.textAlign,this._renderedWidth-2*m,this._renderedHaloSize+this._renderedOutlineSize)+m,y=d+p+m,P=d>0;let x=this._lineThroughWidthOffset,M=0;if(o){i.save();const t=e.backgroundColor??[0,0,0,0],n=e.borderLine?.color??[0,0,0,0],r=2*(e.borderLine?.size??0);i.fillStyle=N(t),i.strokeStyle=N(n),i.lineWidth=r,i.fillRect(0,0,s.width,s.height),i.strokeRect(0,0,s.width,s.height),i.restore()}P&&this._renderHalo(i,g,y,x,M,e),p>0&&this._renderOutline(i,g,y,x,M,e),M+=y,x+=g;for(const t of this._textLines)P?(i.globalCompositeOperation="destination-out",i.fillStyle="rgb(0, 0, 0)",i.fillText(t,x,M),i.globalCompositeOperation="source-over",i.fillStyle=this._fillStyle,i.fillText(t,x,M)):(i.fillStyle=this._fillStyle,i.fillText(t,x,M)),n&&"none"!==n&&this._renderDecoration(i,x,M,n,r),M+=f;i.restore();const b=this._renderedWidth+2*this._lineThroughWidthOffset,S=this._renderedHeight,C=i.getImageData(0,0,b,S),w=new Uint8Array(C.data);if(e.premultiplyColors){let t;for(let e=0;e<w.length;e+=4)t=w[e+3]/255,w[e]=w[e]*t,w[e+1]=w[e+1]*t,w[e+2]=w[e+2]*t}let k,I;switch(e.horizontalAlignment){case"left":k=-.5;break;case"right":k=.5;break;default:k=0}switch(e.verticalAlignment){case"bottom":I=-.5;break;case"top":I=.5;break;case"baseline":I=-1/6;break;default:I=0}return{size:[b,S],image:new Uint32Array(w.buffer),sdf:!1,simplePattern:!1,anchorX:k,anchorY:I,canvas:s}}_renderHalo(t,e,s,i,n,r){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const h=this._outlineRasterizationCanvas,l=h.getContext("2d");l.clearRect(0,0,o,a),F(l,r);const{decoration:c,weight:u}=r.font;l.fillStyle=this._haloStyle,l.strokeStyle=this._haloStyle,l.lineJoin="round",this._renderOutlineNative(l,e,s,c,u,this._renderedHaloSize+this._renderedOutlineSize),t.globalAlpha=this._parameters.halo.color[3],t.drawImage(h,0,0,o,a,i,n,o,a),t.globalAlpha=1}_renderOutline(t,e,s,i,n,r){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const h=this._outlineRasterizationCanvas,l=h.getContext("2d");l.clearRect(0,0,o,a),F(l,r);const{decoration:c,weight:u}=r.font;l.fillStyle=this._outlineStyle,l.strokeStyle=this._outlineStyle,l.lineJoin="round",this._renderOutlineNative(l,e,s,c,u,this._renderedOutlineSize),t.globalAlpha=this._parameters.outline.color[3],t.drawImage(h,0,0,o,a,i,n,o,a),t.globalAlpha=1}_renderOutlineNative(t,e,s,i,n,r){const o=this._renderedLineHeight;for(const a of this._textLines){const h=2*r,l=5,c=.1;for(let r=0;r<l;r++){const o=(1-(l-1)*c+r*c)*h;t.lineWidth=o,t.strokeText(a,e,s),i&&"none"!==i&&this._renderDecoration(t,e,s,i,n,o)}s+=o}}computeTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const s=this._textRasterizationCanvas,i=s.getContext("2d");F(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const n=this._computeTextWidth(i,e),r=this._lineHeight*this._textLines.length;return s.width=n,s.height=r,[n*e.pixelRatio,r*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*(0,h.Lz)(this._parameters.halo.size),Math.round(s)}_computeLineHeightBase(){return 1.275*this._parameters.size}_computeLineHeight(){let t=this._computeLineHeightBase();const e=this._parameters.font.decoration;return e&&"underline"===e&&(t*=1.3),Math.round(t+2*(0,h.Lz)(this._parameters.halo.size))}_renderDecoration(t,e,s,i,n,r){let o=.9*this._lineHeight;const a="bold"===n?.06:"bolder"===n?.09:.04;switch(t.textAlign){case"center":e-=this._renderedWidth/2;break;case"right":e-=this._renderedWidth}const h=t.textBaseline;if("underline"===i)switch(o=.9*this._computeLineHeightBase(),h){case"top":s+=o;break;case"middle":s+=o/2}else if("line-through"===i)switch(h){case"top":s+=o/1.5;break;case"middle":s+=o/3}const l=r?1.5*r:Math.ceil(o*a);t.save(),t.beginPath(),t.strokeStyle=t.fillStyle,t.lineWidth=l,t.moveTo(e-this._lineThroughWidthOffset,s),t.lineTo(e+this._renderedWidth+2*this._lineThroughWidthOffset,s),t.stroke(),t.restore()}}function F(t,e){const s=Math.max(e.size,.5),i=e.font,n=`${i.style} ${i.weight} ${(0,h.Lz)(s).toFixed(1)}px ${i.family}, sans-serif`;let r;switch(t.font=n,t.textBaseline="top",e.horizontalAlignment){case"left":default:r="left";break;case"right":r="right";break;case"center":r="center"}t.textAlign=r}var D=s(93397),X=s(75434);function Y(t){const e=(0,h.PN)(z.GR),s=(0,h.PN)(z.cp);return Math.max(e,Math.min(t||s,s))}s(39829);const H=Math.PI/180,W=()=>o.A.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class B{constructor(t){this._t=t}static createIdentity(){return new B([1,0,0,0,1,0])}clone(){const t=this._t;return new B(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 B([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 B([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 B([e,-s,0,s,e,0])}rotate(t){return B.multiply(this,B.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],s=Math.sqrt(t*t+e*e);return[t/s,e/s]}static multiply(t,e,s){const i=t._t,n=e._t,r=i[0]*n[0]+i[3]*n[1],o=i[1]*n[0]+i[4]*n[1],a=i[2]*n[0]+i[5]*n[1]+n[2],h=i[0]*n[3]+i[3]*n[4],l=i[1]*n[3]+i[4]*n[4],c=i[2]*n[3]+i[5]*n[4]+n[5],u=s._t;return u[0]=r,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 B([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,n=t[4]*e,r=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new B([n,r,s,o,a,i])}}class U{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._geomUnitsPerPoint=1,this._placementPool=new g.A(()=>new d.W,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||B.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1)}setTransform(t,e){this._transfos=[t||B.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=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]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e){const s=e?t.scaleRatio():1;B.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,s){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,s)}}drawMultiLayerSymbol(t,e){if(!t||!e)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.asJSON()),e=t.next()}}else this.drawSymbolLayers(s,e)}executeEffects(t,e){let s=new p.kT(y.z.fromJSONCIM(e));for(const e of t){const t=(0,b.A)(e);t&&(s=t.execute(s,e,this.geomUnitsPerPoint(),null))}return s}drawSymbolLayers(t,e){let s=t.length;for(;s--;){const i=t[s];if(!i||!1===i.enable)continue;const n=i.effects;if(n&&n.length>0){const t=this.executeEffects(n,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(i,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(i,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);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,t.path);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=function(t,e,s){let i=(0,D.$w)(t.separation,S.D.CIMHatchFill.separation)*s,n=(0,D.$w)(t.rotation);if(0===i)return null;i<0&&(i=-i);let r=0;const o=.5*i;for(;r>o;)r-=i;for(;r<-o;)r+=i;const a=(0,l.vt)();(0,c.Rg)(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(;n>180;)n-=180;for(;n<0;)n+=180;const u=Math.cos(n*H),_=Math.sin(n*H),f=-i*_,p=i*u;let d,m,g,y;r=(0,D.$w)(t.offsetX)*s*_-(0,D.$w)(t.offsetY)*s*u,d=g=Number.MAX_VALUE,m=y=-Number.MAX_VALUE;for(const t of h){const e=t[0],s=t[1],i=u*e+_*s,n=-_*e+u*s;d=Math.min(d,i),g=Math.min(g,n),m=Math.max(m,i),y=Math.max(y,n)}g=Math.floor(g/i)*i;let P=u*d-_*g-f*r/i,x=_*d+u*g-p*r/i,M=u*m-_*g-f*r/i,b=_*m+u*g-p*r/i;const C=1+Math.round((y-g)/i),w=[];for(let t=0;t<C;t++)P+=f,x+=p,M+=f,b+=p,w.push([[P,x],[M,b]]);return{paths:w}}(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,b.c)(s);if(i){const n="CIMMarkerPlacementInsidePolygon"===s.type||"CIMMarkerPlacementPolygonCenter"===s.type&&s.clipAtBoundary;n&&this.pushClipPath(e);const r=i.execute(y.z.fromJSONCIM(e),s,this.geomUnitsPerPoint(),null);if(r){let e=null;for(;(e=r.next())&&(this.drawMarker(t,e),!this._earlyReturn););}n&&this.popClipPath()}}else{const s=this._placementPool.acquire();if((0,x.fT)(e))s.tx=e.x,s.ty=e.y,this.drawMarker(t,s);else if((0,x.Bi)(e)){const i=(0,P.l8)(e);i&&([s.tx,s.ty]=i,this.drawMarker(t,s))}else if((0,x.Rg)(e)){for(const i of e.paths)for(const e of i)if(s.tx=e[0],s.ty=e[1],this.drawMarker(t,s),this._earlyReturn)break}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){if(!t)return;const s=this._resourceManager.getResource(t.url),i=(0,D.$w)(t.size,S.D.CIMPictureMarker.size);if(null==s||i<=0)return;const n=s.width,r=s.height;if(!n||!r)return;const o=n/r,a=(0,D.$w)(t.scaleX,1),h=B.createIdentity(),l=t.anchorPoint;if(l){let e=l.x,s=l.y;"Absolute"!==t.anchorPointUnits&&(e*=i*o*a,s*=i),h.translate(-e,-s)}let c=(0,D.$w)(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&h.rotate(c*H);let u=(0,D.$w)(t.offsetX),_=(0,D.$w)(t.offsetY);if(u||_){if(this._mapRotation){const t=H*this._mapRotation,e=Math.cos(t),s=Math.sin(t),i=u*s+_*e;u=u*e-_*s,_=i}h.translate(u,_)}const f=this.geomUnitsPerPoint();1!==f&&h.scale(f,f);const p=e.getAngle();p&&h.rotate(p),h.translate(e.tx,e.ty),this.push(h,!1),this.drawImage(t,i),this.pop()}drawVectorMarker(t,e){if(!t)return;const s=t.markerGraphics;if(!s)return;const i=(0,D.$w)(t.size,S.D.CIMVectorMarker.size),n=t.frame,r=n?n.ymax-n.ymin:0,o=i&&r?i/r:1,a=B.createIdentity();n&&a.translate(.5*-(n.xmax+n.xmin),.5*-(n.ymax+n.ymin));const h=t.anchorPoint;if(h){let e=h.x,s=h.y;"Absolute"!==t.anchorPointUnits?n&&(e*=n.xmax-n.xmin,s*=n.ymax-n.ymin):(e/=o,s/=o),a.translate(-e,-s)}1!==o&&a.scale(o,o);let l=(0,D.$w)(t.rotation);t.rotateClockwise&&(l=-l),this._mapRotation&&(l+=this._mapRotation),l&&a.rotate(l*H);let c=(0,D.$w)(t.offsetX),u=(0,D.$w)(t.offsetY);if(c||u){if(this._mapRotation){const t=H*this._mapRotation,e=Math.cos(t),s=Math.sin(t),i=c*s+u*e;c=c*e-u*s,u=i}a.translate(c,u)}const _=this.geomUnitsPerPoint();1!==_&&a.scale(_,_);const f=e.getAngle();f&&a.rotate(f),a.translate(e.tx,e.ty),this.push(a,t.scaleSymbolsProportionally);for(const t of s){t?.symbol&&t.geometry||W().error("Invalid marker graphic",t);let e=t.textString;if("number"==typeof e&&(e=e.toString()),this.drawSymbol(t.symbol,t.geometry,e),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,s){if(!t)return;if(!(0,x.fT)(e))return;if((0,D.$w)(t.height,S.D.CIMTextSymbol.height)<=0)return;const i=B.createIdentity();let n=(0,D.$w)(t.angle);n=-n,n&&i.rotate(n*H);const r=(0,D.$w)(t.offsetX),o=(0,D.$w)(t.offsetY);(r||o)&&i.translate(r,o);const a=this.geomUnitsPerPoint();1!==a&&i.scale(a,a),i.translate(e.x,e.y),this.push(i,!1),this.drawText(t,s),this.pop()}}class V extends U{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 R(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return(0,l.fA)(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if((0,x.Bi)(t))this._processPath(t.rings,0);else if((0,x.Rg)(t))this._processPath(t.paths,0);else if((0,x.ZC)(t)){const e=J(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,s){if(!t||this._clipCount>0||null==s||s<=0)return;const i=Math.max(.5*this.transformSize((0,D.$w)(s,S.D.CIMSolidStroke.width)),.25);if((0,x.Bi)(t))this._processPath(t.rings,i);else if((0,x.Rg)(t))this._processPath(t.paths,i);else if((0,x.ZC)(t)){const e=J(t);e&&this._processPath(e.rings,i)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){(0,x.Bi)(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:s}=t,i=(0,D.$w)(t.scaleX,1);let n=i*e,r=e;const o=this._resourceManager.getResource(s);if(null!=o){const t=o.height/o.width;n=i*(e?t>1?e:e/t:o.width),r=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-n/2,-r/2]),0),this._merge(this.transformPt([-n/2,r/2]),0),this._merge(this.transformPt([n/2,-r/2]),0),this._merge(this.transformPt([n/2,r/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new O);const s=Z(t);let[i,n]=this._textRasterizer.computeTextSize(e,s);i=(0,h.PN)(i),n=(0,h.PN)(n);const r=this.transformSize(1)*this.reverseTransformScalar(1);i*=r,n*=r;let o=0;switch(t.horizontalAlignment){case"Left":o=i/2;break;case"Right":o=-i/2}let a=0;switch(t.verticalAlignment){case"Bottom":a=n/2;break;case"Top":a=-n/2;break;case"Baseline":a=n/6}this._merge(this.transformPt([-i/2+o,-n/2+a]),0),this._merge(this.transformPt([-i/2+o,n/2+a]),0),this._merge(this.transformPt([i/2+o,-n/2+a]),0),this._merge(this.transformPt([i/2+o,n/2+a]),0)}_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 $ extends U{constructor(t,e,s,i){super(e,s),this._applyAdditionalRenderProps=i,this._colorSubstitutionHelper=new M,this._ctx=t}drawSolidFill(t,e){if(!t)return;if((0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!0);else if((0,x.ZC)(t))this._buildPath(J(t).rings,!0);else{if(!(0,x.U9)(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)/255+")",s.fill("evenodd")}drawSolidStroke(t,e,s,i,n,r){if(!t||!e||0===s)return;if((0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!1);else{if(!(0,x.ZC)(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(J(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)/255+")",o.lineWidth=Math.max(this.transformSize(s),.5),this._setCapStyle(i),this._setJoinStyle(n),o.miterLimit=r,o.stroke()}pushClipPath(t){if(this._ctx.save(),(0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!0);else{if(!(0,x.ZC)(t))return;this._buildPath(J(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:s,url:i,tintColor:n}=t,r=(0,D.$w)(t.scaleX,1),o=this._resourceManager.getResource(i);if(null==o)return;let a=e*(o.width/o.height),h=e;e||(a=o.width,h=o.height);const l=(0,D.UE)(i)||"src"in o&&(0,D.UE)(o.src);let c="getFrame"in o?C(o):o;s&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,s)),this._applyAdditionalRenderProps&&!l&&n&&(c=this._colorSubstitutionHelper.tintImageData(c,n));const u=this.transformPt([0,0]),[_,f]=this.getTransformAngle(),p=this.transformSize(1),d=this._ctx;d.save(),d.setTransform({m11:r*p*_,m12:r*p*f,m21:-p*f,m22:p*_,m41:u[0],m42:u[1]}),d.drawImage(c,-a/2,-h/2,a,h),d.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new O);const s=Z(t,this.transformSize((0,h.PN)(1))),i=this._textRasterizer.rasterizeText(e,s);if(!i)return;const{size:n,anchorX:r,anchorY:o,canvas:a}=i,l=n[0]*(r+.5),c=n[1]*(o-.5),u=this._ctx,_=this.transformPt([0,0]),[f,p]=this.getTransformAngle();u.save(),u.setTransform({m11:1*f,m12:1*p,m21:-1*p,m22:1*f,m41:_[0]-1*l,m42:_[1]+1*c}),u.drawImage(a,0,0),u.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:s,height:i,offsetX:n,offsetY:r,rotation:o,scaleX:a,tintColor:h,url:l}=e;const c=this._resourceManager.getResource(l);if(null==c)return;if((0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!0);else if((0,x.ZC)(t))this._buildPath(J(t).rings,!0);else{if(!(0,x.U9)(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const u=this._ctx,_=(0,D.UE)(l)||"src"in c&&(0,D.UE)(c.src);let f,p="getFrame"in c?C(c):c;if(s&&(p=this._colorSubstitutionHelper.applyColorSubstitution(p,s)),this._applyAdditionalRenderProps){_||h&&(p=this._colorSubstitutionHelper.tintImageData(p,h)),f=u.createPattern(p,"repeat");const t=this.transformSize(1);o||(o=0),n?n*=t:n=0,r?r*=t:r=0,i&&(i*=t);const e=i?i/c.height:1,s=a&&i?a*i/c.width:1;if(0!==o||1!==e||1!==s||0!==n||0!==r){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(n,r).scaleSelf(s,e,1),f.setTransform(t)}}else f=u.createPattern(p,"repeat");u.save(),u.fillStyle=f,u.fill("evenodd"),u.restore()}drawPictureStroke(t,e){if(!t)return;let{colorSubstitutions:s,capStyle:i,joinStyle:n,miterLimit:o,tintColor:a,url:l,width:c}=e;const u=this._resourceManager.getResource(l);if(null==u)return;let _;if((0,x.Bi)(t))_=t.rings;else if((0,x.Rg)(t))_=t.paths;else{if(!(0,x.ZC)(t))return(0,x.U9)(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;_=J(t).rings}c||(c=u.width);const f=(0,D.UE)(l)||"src"in u&&(0,D.UE)(u.src);let p="getFrame"in u?C(u):u;s&&(p=this._colorSubstitutionHelper.applyColorSubstitution(p,s)),this._applyAdditionalRenderProps&&(f||a&&(p=this._colorSubstitutionHelper.tintImageData(p,a)));const d=Math.max(this.transformSize((0,h.Lz)(c)),.5),m=d/p.width,g=this._ctx,y=g.createPattern(p,"repeat-y");let P,M;g.save(),this._setCapStyle(i),this._setJoinStyle(n),void 0!==o&&(g.miterLimit=o),g.lineWidth=d;for(let t of _)if(t=(0,r.o8)(t),j(t),t&&!(t.length<=1)){P=this.transformPt(t[0]);for(let e=1;e<t.length;e++){M=this.transformPt(t[e]);const s=q(P,M),i=new DOMMatrix;i.translateSelf(0,P[1]-d/2).scaleSelf(m,m,1).rotateSelf(0,0,90-s),y.setTransform(i),g.strokeStyle=y,g.beginPath(),g.moveTo(P[0],P[1]),g.lineTo(M[0],M[1]),g.stroke(),P=M}}g.restore()}drawGradientFill(t,e){if(!t)return;let s;if((0,x.Bi)(t))s=t.rings;else if((0,x.Rg)(t))s=t.paths;else{if(!(0,x.ZC)(t))return void W().error("Unable to draw gradient fill");s=J(t).rings}this._buildPath(s,!0);const{angle:i,gradientMethod:n,gradientSize:r,gradientSizeUnits:o}=e,a=S.D.CIMGradientFill,c=e.gradientType??a.gradientType,u=-(0,m.kU)(i??0),_=(0,l.Ie)();for(const t of s){const e=t?t.length:0;if(e>1)for(let s=0;s<e;s++){let e=this.transformPt(t[s]);"Linear"!==n&&"Rectangular"!==n||(e=w(e,-u)),(0,l.tK)(_,e)}}const[f,p,d,g]=_,y=this._ctx;switch(y.save(),n){case"Buffered":W().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(p+g)/2,s="Absolute"===o?this.transformSize((0,h.Lz)(r)):(0,D.yX)(r,a.gradientSize)*(d-f),[i,n]="Discrete"===c?[d,d-s]:[f+s,f],l=w([i,t],u),_=w([n,t],u),m=y.createLinearGradient(l[0],l[1],_[0],_[1]);A(m,e),y.fillStyle=m,y.fill("evenodd");break}case"Circular":{const t=(0,l.gX)(_),s=(0,l.ib)(_)/2,i="Absolute"===o?this.transformSize((0,h.Lz)(r)):(0,D.yX)(r,a.gradientSize)*s,[n,u]="Discrete"===c?[s,s-i]:[i,0],f=y.createRadialGradient(t[0],t[1],n,t[0],t[1],u);A(f,e),y.fillStyle=f,y.fill("evenodd");break}case"Rectangular":{const s=(0,l.gX)(_),i=s[0],n=s[1],m=w(s,u),P=(s,i,n,r,o,a,h,l)=>{y.save(),this.pushClipPath(t);const c=w([o,a],u),_=w([h,l],u);y.beginPath(),y.moveTo(m[0],m[1]),y.lineTo(c[0],c[1]),y.lineTo(_[0],_[1]),y.lineTo(m[0],m[1]),y.clip();const f=w([s,i],u),p=w([n,r],u),d=y.createLinearGradient(f[0],f[1],p[0],p[1]);A(d,e),y.fillStyle=d,y.fill("evenodd"),y.restore()};let x="Absolute"===o?this.transformSize((0,h.Lz)(r)):(0,D.yX)(r,a.gradientSize)*((0,l.VL)(_)/2),[M,b]="Discrete"===c?[d,d-x]:[i+x,i];P(M,n,b,n,d,p,d,g),[M,b]="Discrete"===c?[f,f+x]:[i-x,i],P(M,n,b,n,f,g,f,p),x="Absolute"===o?this.transformSize((0,h.Lz)(r)):(0,D.yX)(r,a.gradientSize)*((0,l.uJ)(_)/2);let[S,C]="Discrete"===c?[g,g-x]:[n+x,n];P(i,S,i,C,d,g,f,g),[S,C]="Discrete"===c?[p,p+x]:[n-x,n],P(i,S,i,C,f,p,d,p);break}}y.restore()}drawGradientStroke(t,e){const{capStyle:s,gradientMethod:i,gradientSize:n,gradientSizeUnits:o,joinStyle:a,miterLimit:l,width:c}=e;if(!t||0===c)return;let u;if((0,x.Bi)(t))u=t.rings;else if((0,x.Rg)(t))u=t.paths;else{if(!(0,x.ZC)(t))return void W().error("Unable to draw gradient stroke");u=J(t).rings}const _=e.gradientType??S.D.CIMGradientStroke.gradientType,f=Math.max(this.transformSize((0,h.Lz)(c)),.5),p=this._ctx;let d,m;p.save(),this._setCapStyle(s),this._setJoinStyle(a),void 0!==l&&(p.miterLimit=l),p.lineWidth=f;for(let t of u){if(t=(0,r.o8)(t),j(t),!t||t.length<=1)continue;let s=0;d=this.transformPt(t[0]);for(let e=1;e<t.length;e++){m=this.transformPt(t[e]);const i=m[0]-d[0],n=m[1]-d[1];s+=Math.sqrt(i*i+n*n),d=m}const a="Absolute"===o?this.transformSize((0,h.Lz)(n)):(0,D.yX)(n,S.D.CIMGradientStroke.gradientSize)*("AcrossLine"===i?f:s);let l=0;d=this.transformPt(t[0]);for(let n=1;n<t.length;n++){m=this.transformPt(t[n]);const r=m[0]-d[0],o=m[1]-d[1],h=Math.sqrt(r*r+o*o);let c,u,g,y;switch(i){case"AcrossLine":{const[t,e]=w([r/h,o/h],-Math.PI/2),s=f/2,i="Discrete"===_?s:a-s;c=(d[0]+m[0])/2+t*i,u=(d[1]+m[1])/2+e*i,g=c-t*a,y=u-e*a;break}case"AlongLine":{const t=r/h,e=o/h;"Discrete"===_?(c=d[0]-t*l,u=d[1]-e*l,g=c+t*a,y=u+e*a):(g=d[0]+t*(s-l),y=d[1]+e*(s-l),c=g-t*a,u=y-e*a);break}default:return W().error("Unrecognized gradient method:",i),void p.restore()}const P=p.createLinearGradient(c,u,g,y);A(P,e),p.strokeStyle=P,p.beginPath(),p.moveTo(d[0],d[1]),p.lineTo(m[0],m[1]),p.stroke(),l+=h,d=m}}p.restore()}_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 n=this.transformPt(i[0]);s.moveTo(n[0],n[1]);for(let e=1;e<t;e++)n=this.transformPt(i[e]),s.lineTo(n[0],n[1]);e&&s.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function q(t,e){const s=e[0]-t[0],i=e[1]-t[1];return 180/Math.PI*Math.atan2(i,s)}const J=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;function Z(t,e=1){const s=(0,D.DW)(t),i=(0,D._d)(t.fontStyleName),n=t.fontFamilyName??"arial-unicode-ms",{weight:r,style:o}=i,a=e*(t.height||5),h=(0,D.Bu)(t.horizontalAlignment),l=(0,D.Nl)(t.verticalAlignment),c=(0,D.pM)(t),u=(0,D.pM)(t.haloSymbol),_=null!=u?e*(t.haloSize??0):0,f=(0,D._1)(t.symbol),p=e*((0,D.xo)(t.symbol)||0),d="CIMBackgroundCallout"===t.callout?.type?t.callout.backgroundSymbol:null,m=(0,D.pM)(d),g=(0,D.xo)(d),y=(0,D._1)(d);return{color:c,size:a,horizontalAlignment:h,verticalAlignment:l,font:{family:n,style:(0,D.pV)(o),weight:(0,D.Kn)(r),decoration:s},outline:{size:p||0,color:f},halo:{size:_||0,color:u,style:o},backgroundColor:m,borderLine:null!=g&&null!=y?{size:g,color:y}:null,pixelRatio:1,premultiplyColors:!0}}function j(t){let e,s,i,n,r,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],s=t[a][1]-o[1],n=0!==e?s/e:Math.PI/2,void 0!==i&&Math.abs(n-i)<=1e-4?(t.splice(a-1,1),o=r):(r=o,o=t[a],a++),i=n}var K=s(59868),Q=s(13195);const tt=Math.PI,et=tt/2,st=Math.PI/180,it=96/72,nt=()=>o.A.getLogger("esri.symbols.cim.CIMSymbolHelper");function rt(t){let e;switch(t.type){case"cim":return t.data;case"web-style":return t;case"simple-marker":{const s=ut.fromSimpleMarker(t);if(!s)throw new Error("InternalError: Cannot convert symbol to CIM");e=s;break}case"picture-marker":e=ut.fromPictureMarker(t);break;case"simple-line":e=ut.fromSimpleLineSymbol(t);break;case"simple-fill":e=ut.fromSimpleFillSymbol(t);break;case"picture-fill":e=ut.fromPictureFillSymbol(t);break;case"text":e=ut.fromTextSymbol(t)}return{type:"CIMSymbolReference",symbol:e}}function ot(t,e,s){switch(e.type){case"CIMSymbolReference":return ot(t,e.symbol,s);case"CIMPointSymbol":null==s&&(s={x:0,y:0}),t.drawSymbol(e,s);break;case"CIMLineSymbol":null==s&&(s={paths:[[[0,0],[10,0]]]}),t.drawSymbol(e,s);break;case"CIMPolygonSymbol":null==s&&(s={rings:[[[0,0],[0,10],[10,10],[10,0],[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 d.W;t.drawMarker(e,s);break}}return t.envelope()}function at(t){if(!t)return 0;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAtExtremities":case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementAtRatioPositions":case"CIMMarkerPlacementOnLine":case"CIMMarkerPlacementOnVertices":return Math.abs(t.offset??0);default:return 0}}function ht(t){if(!t)return 0;let e=0;for(const s of t)e+=lt(s);return e}function lt(t){if(!t)return 0;if((0,D.St)(t))return t.inflateSize??256;switch(t.type){case"CIMGeometricEffectArrow":return Math.abs(.5*t.width);case"CIMGeometricEffectBuffer":return Math.abs(t.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(t.length);case"CIMGeometricEffectJog":return Math.abs(.5*t.length);case"CIMGeometricEffectMove":return Math.max(Math.abs((0,D.$w)(t.offsetX)),Math.abs((0,D.$w)(t.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(t.offset);case"CIMGeometricEffectRadial":return Math.abs(t.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(t.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(t.fromWidth),Math.abs(t.toWidth));case"CIMGeometricEffectWave":return Math.abs(t.amplitude);case"CIMGeometricEffectDonut":return Math.abs(t.width)}}class ct{static getSymbolInflateSize(t,e,s,i,n){return t||(t=[0,0,0,0]),e?this._getInflateSize(t,e,s,i,n):t}static safeSize(t){const e=Math.max(Math.abs(t[0]),Math.abs(t[2])),s=Math.max(Math.abs(t[1]),Math.abs(t[3]));return Math.sqrt(e*e+s*s)}static _vectorMarkerBounds(t,e,s,i){let n=!0;const r=(0,l.vt)();if(e?.markerGraphics)for(const o of e.markerGraphics){const e=[0,0,0,0];o.geometry&&((0,c.Rg)(r,o.geometry),e[0]=0,e[1]=0,e[2]=0,e[3]=0,this.getSymbolInflateSize(e,o.symbol,s,0,i),r[0]+=e[0],r[1]+=e[1],r[2]+=e[2],r[3]+=e[3],n?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],n=!1):(t[0]=Math.min(t[0],r[0]),t[1]=Math.min(t[1],r[1]),t[2]=Math.max(t[2],r[2]),t[3]=Math.max(t[3],r[3])))}return t}static _getInflateSize(t,e,s,i,n){if(function(t){return void 0!==t.symbolLayers}(e)){const r=this._getLayersInflateSize(t,e.symbolLayers,s,i,n),o=ht(e.effects);return o>0&&(r[0]-=o,r[1]-=o,r[2]+=o,r[3]+=o),r}return this._getTextInflatedSize(t,e,n)}static _getLayersInflateSize(t,e,s,i,n){let r=!0;if(!e)return t;for(const o of e){if(!o)continue;let e=[0,0,0,0];switch(o.type){case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=o;let s=t.width;null!=s&&("Square"===t.capStyle||"Miter"===t.joinStyle?s/=1.4142135623730951:s/=2,e[0]=-s,e[1]=-s,e[2]=s,e[3]=s);break}case"CIMCharacterMarker":case"CIMVectorMarker":case"CIMPictureMarker":{const t=o;if("CIMVectorMarker"===o.type){const t=o;if(e=this._vectorMarkerBounds(e,t,s,n),t.frame){const s=(t.frame.xmin+t.frame.xmax)/2,i=(t.frame.ymin+t.frame.ymax)/2;if(e[0]-=s,e[1]-=i,e[2]-=s,e[3]-=i,null!=t.size){const s=t.size/(t.frame.ymax-t.frame.ymin);e[0]*=s,e[1]*=s,e[2]*=s,e[3]*=s}}}else if("CIMPictureMarker"===o.type){const i=o,n=s.getResource(i.url);let r=1;if(null!=n&&n.height&&(r=n.width/n.height),null!=t.size){const s=t.size/2,n=t.size*r*(i.scaleX??1)/2;e=[-n,-s,n,s]}}else if(null!=t.size){const s=t.size/2;e=[-s,-s,s,s]}if(t.anchorPoint){let s,i;"Absolute"===t.anchorPointUnits?(s=t.anchorPoint.x,i=t.anchorPoint.y):(s=t.anchorPoint.x*(e[2]-e[0]),i=t.anchorPoint.y*(e[3]-e[1]));const n=1.25*Math.sqrt(s*s+i*i);e[0]-=n,e[1]-=n,e[2]+=n,e[3]+=n}let r=(0,D.$w)(t.rotation);if(t.rotateClockwise&&(r=-r),i&&(r-=i),r){const t=st*r,s=Math.cos(t),i=Math.sin(t),n=(0,l.vt)([Q.MG,Q.MG,-Q.MG,-Q.MG]);(0,l.tK)(n,[e[0]*s-e[1]*i,e[0]*i+e[1]*s]),(0,l.tK)(n,[e[0]*s-e[3]*i,e[0]*i+e[3]*s]),(0,l.tK)(n,[e[2]*s-e[1]*i,e[2]*i+e[1]*s]),(0,l.tK)(n,[e[2]*s-e[3]*i,e[2]*i+e[3]*s]),e=n}let a=(0,D.$w)(t.offsetX),h=(0,D.$w)(t.offsetY);if(i){const t=st*i,e=Math.cos(t),s=Math.sin(t),n=a*s+h*e;a=a*e-h*s,h=n}e[0]+=a,e[1]+=h,e[2]+=a,e[3]+=h;const c=at(t.markerPlacement);c>0&&(e[0]-=c,e[1]-=c,e[2]+=c,e[3]+=c);break}}const a=ht(o.effects);a>0&&(e[0]-=a,e[1]-=a,e[2]+=a,e[3]+=a),r?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],r=!1):(t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3]))}return t}static _getTextInflatedSize(t,e,s){const i=function(t){return(0,h.PN)(Math.round((0,h.Lz)(t)))}(e.height??S.D.CIMTextSymbol.height);if(t[0]=-i/2,t[1]=-i/2,t[2]=i/2,t[3]=i/2,!s)return t;const n=s.get(e);if(!n)return t;if(!n.glyphMosaicItems.glyphs.length)return t;const{lineGapType:r,lineGap:o}=e,a=r?((t,e,s)=>{switch(t){case"ExtraLeading":return 1+e/s;case"Multiple":return e;case"Exact":return e/s}})(r,o??0,i):0,l="CIMBackgroundCallout"===e.callout?.type,c=(0,X.Tl)(n.glyphMosaicItems,{scale:i/z.eG,angle:(0,D.$w)(e.angle),xOffset:(0,D.$w)(e.offsetX),yOffset:(0,D.$w)(e.offsetY),horizontalAlignment:e.horizontalAlignment,verticalAlignment:e.verticalAlignment,maxLineWidth:Y(e.lineWidth),lineHeight:z.DY*Math.max(.25,Math.min(a||1,4)),decoration:e.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:l}).boundsT,u=Math.sqrt(c.width*c.width+c.height*c.height);return t[0]-=c.x+u,t[1]-=c.y-u,t[2]+=c.x+u,t[3]+=-c.y+u,t}}class ut{static getEnvelope(t,e,s){if(!t)return null;const i=new V(s);if(Array.isArray(t)){let s;for(const n of t)s?s.union(ot(i,n,e)):s=ot(i,n,e);return s}return ot(i,t,e)}static getTextureInfo(t,e,s,i,n){const r=i??this.getEnvelope(t,null,e);if(!r)return[0,0,0,0,1];const o=Math.max(r.width,r.height)*it;let a=null!=n?Math.max(n/o,1):1;a*=it,r.x*=a,r.y*=a,r.width*=a,r.height*=a,r.width=Math.max(Math.ceil(r.x+r.width)-Math.floor(r.x),1)-1,r.height=Math.max(Math.ceil(r.y+r.height)-Math.floor(r.y),1)-1;let h=r.x+.5*r.width,l=r.y+.5*r.height;return h+=r.x-Math.floor(r.x),l+=r.y-Math.floor(r.y),i||(r.width+=s,r.height+=s,h+=s/2,l+=s/2),[r.width,r.height,h,l,a]}static getTextureAnchor(t,e,s){const[i,n,r,o,a]=this.getTextureInfo(t,e,2,null,s);return[-r/i,-o/n,n/a*it]}static rasterize(t,e,s,i,n=!0,r){const[o,a,h,l,c]=this.getTextureInfo(e,i,2,s,r);t.width=o,t.height=a;const u=t.getContext("2d",{willReadFrequently:!0}),_=B.createScale(c,-c);_.translate(.5*o-h,.5*a+l);const f=new $(u,i,_);switch(e.type){case"CIMPointSymbol":{const t={type:"point",x:0,y:0};f.drawSymbol(e,t);break}case"CIMVectorMarker":{const t=new d.W;f.drawMarker(e,t);break}}const p=u.getImageData(0,0,t.width,t.height),m=new Uint8Array(p.data);if(n){let t;for(let e=0;e<m.length;e+=4)t=m[e+3]/255,m[e]=m[e]*t,m[e+1]=m[e+1]*t,m[e+2]=m[e+2]*t}return[m,t.width,t.height,-h/o,-l/a]}static fromTextSymbol(t){const{text:e}=t;return{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:ut.createCIMTextSymbolfromTextSymbol(t),textString:e}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(t){const{height:e,outline:s,width:i,xoffset:n,xscale:r,yoffset:o,yscale:a}=t,h=[],l={type:"CIMPolygonSymbol",symbolLayers:h};if(s){const t=Ct(s);t&&h.push(t)}let c=t.url;"esriPFS"===t.type&&t.imageData&&(c=t.imageData);const u="angle"in t?t.angle??0:0,_=(i??0)*(r||1),f=(e??0)*(a||1);return h.push({type:"CIMPictureFill",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:c,height:f,width:_,offsetX:(0,D.$w)(n),offsetY:(0,D.$w)(o),rotation:(0,D.$w)(-u),colorSubstitutions:null}),l}static fromSimpleFillSymbol(t){const{color:e,style:s,outline:i}=t,n=[],o={type:"CIMPolygonSymbol",symbolLayers:n};if(i){const t=Ct(i);t&&n.push(t)}if(s&&"solid"!==s&&"none"!==s&&"esriSFSSolid"!==s&&"esriSFSNull"!==s){const t={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:gt(e),capStyle:"Butt",joinStyle:"Miter",width:.75}]};let i=0;const o=(0,h.PN)(St(s)?8:10);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}n.push({type:"CIMHatchFill",lineSymbol:t,offsetX:0,offsetY:0,rotation:i,separation:o}),"cross"===s||"esriSFSCross"===s?n.push({type:"CIMHatchFill",lineSymbol:(0,r.o8)(t),offsetX:0,offsetY:0,rotation:90,separation:o}):"diagonal-cross"!==s&&"esriSFSDiagonalCross"!==s||n.push({type:"CIMHatchFill",lineSymbol:(0,r.o8)(t),offsetX:0,offsetY:0,rotation:45,separation:o})}else!s||"solid"!==s&&"esriSFSSolid"!==s||n.push({type:"CIMSolidFill",enable:!0,color:gt(e)});return o}static fromSimpleLineSymbol(t){const{cap:e,color:s,join:i,marker:n,miterLimit:r,style:o,width:a}=t;let h=null;"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(h=[{type:"CIMGeometricEffectDashes",dashTemplate:Mt(o,e),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const l=[];if(n){let t;switch(n.placement){case"begin-end":t="Both";break;case"begin":t="JustBegin";break;case"end":t="JustEnd";break;default:t="None"}const e=ut.fromSimpleMarker(n,a,s).symbolLayers[0];e.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,keepUpright:!1,offset:0,extremityPlacement:t,offsetAlongLine:0},l.push(e)}return l.push({type:"CIMSolidStroke",color:"none"!==o&&"esriSLSNull"!==o?gt(s):[0,0,0,0],capStyle:ft(e),joinStyle:pt(i),miterLimit:r,width:a,effects:h}),{type:"CIMLineSymbol",symbolLayers:l}}static fromPictureMarker(t){const{angle:e,height:s,width:i,xoffset:n,yoffset:r}=t;let o=t.url;return"esriPMS"===t.type&&t.imageData&&(o=t.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:s,width:i,offsetX:(0,D.$w)(n),offsetY:(0,D.$w)(r),rotation:(0,D.$w)(-e)}]}}static createCIMTextSymbolfromTextSymbol(t){const{angle:e,color:s,font:i,haloColor:r,haloSize:o,horizontalAlignment:a,kerning:h,lineWidth:l,text:c,verticalAlignment:u,xoffset:_,yoffset:f,backgroundColor:p,borderLineColor:d,borderLineSize:m}=t;let g,y,P,x,M,b;i&&(g=i.family,y=i.style,P=i.weight,x=i.size,M=i.decoration);let S=!1;return c&&(S=n(c)[1]),(p||m)&&(b={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:gt(p)},{type:"CIMSolidStroke",enable:!0,color:gt(d),width:m??0}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMTextSymbol",angle:e,blockProgression:2,depth3D:1,extrapolateBaselines:!0,fontEffects:0,fontEncoding:1,fontFamilyName:g||"Arial",fontStyleName:yt(y,P),fontType:0,haloSize:o,height:x,hinting:1,horizontalAlignment:dt(a??"center"),kerning:h,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:l,offsetX:(0,D.$w)(_),offsetY:(0,D.$w)(f),strikethrough:"line-through"===M,underline:"underline"===M,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:gt(s)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:gt(r)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:S?1:0,verticalAlignment:mt(u??"baseline"),verticalGlyphOrientation:0,wordSpacing:100,billboardMode3D:2,callout:b}}static createPictureMarkerRasterizationParam(t){const{angle:e,height:s,width:i,xoffset:n,yoffset:r}=t,o=t.url??t.source?.url??t.source?.imageData;return o?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:s,width:i,offsetX:(0,D.$w)(n),offsetY:(0,D.$w)(r),rotation:(0,D.$w)(-e)}}:null}static createPictureFillRasterizationParam(t){const{width:e,height:s,xoffset:i,yoffset:n,url:r}=t;return r?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureFill",enable:!0,scaleX:1,textureFilter:"Picture",tintColor:null,url:r,width:e,height:s,offsetX:(0,D.$w)(i),offsetY:(0,D.$w)(n),rotation:0}}:null}static fromSimpleMarker(t,e,s){const{style:i}=t,n=t.color??s;if("path"===i||"esriSMSPath"===i){const e=[];if("outline"in t&&t.outline){const s=t.outline;e.push({type:"CIMSolidStroke",enable:!0,width:s.width,color:gt(s.color),path:t.path})}e.push({type:"CIMSolidFill",enable:!0,color:gt(n),path:t.path});const[s,i]=bt("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-(0,D.$w)(t.angle),size:(0,D.$w)(t.size||6),offsetX:(0,D.$w)(t.xoffset),offsetY:(0,D.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:s,markerGraphics:[{type:"CIMMarkerGraphic",geometry:i,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]}}const r=[];let o,a,h=t.size;if("outline"in t&&t.outline&&"none"!==t.outline.style&&"esriSLSNull"!==t.outline.style){const e=t.outline,s="solid"!==e.style&&"esriSLSSolid"!==e.style;[o,a]=s?bt(i,t.size):bt(i);const n=e.width??K.A7.width;if(s){const e=n/t.size,s=(o.xmax-o.xmin)*e/2,i=(o.ymax-o.ymin)*e/2;o.xmin-=s,o.xmax+=s,o.ymin-=i,o.ymax+=i,h&&(h+=n)}const l="cross"!==t.style&&"x"!==t.style||"dot"===t?.outline.style||"short-dot"===t?.outline.style?"HalfGap":"FullPattern",c=s?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:Mt(e.style,null).map(t=>e.width&&e.width>0?t*e.width:t),lineDashEnding:l,controlPointEnding:"FullPattern"}]:void 0;r.push({type:"CIMSolidStroke",capStyle:s?"Round":"Butt",enable:!0,width:n,color:gt(e.color),effects:c})}else!e||"line-marker"!==t.type||"cross"!==t.style&&"x"!==t.style?[o,a]=bt(i):([o,a]=bt(i),r.push({type:"CIMSolidStroke",enable:!0,width:e,color:gt(n)}));r.push({type:"CIMSolidFill",enable:!0,color:gt(n)});const l={type:"CIMPolygonSymbol",symbolLayers:r};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,D.$w)(-t.angle),size:(0,D.$w)(h||6*e),offsetX:(0,D.$w)(t.xoffset),offsetY:(0,D.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:o,markerGraphics:[{type:"CIMMarkerGraphic",geometry:a,symbol:l}]}]}}static fromCIMHatchFill(t,e){const s=e*(t.separation??S.D.CIMHatchFill.separation),i=s/2,n=(0,r.o8)(t.lineSymbol);n.symbolLayers?.forEach(t=>{switch(t.type){case"CIMSolidStroke":null!=t.width&&(t.width*=e),t.effects?.forEach(t=>{if("CIMGeometricEffectDashes"===t.type){const s=t.dashTemplate;t.dashTemplate=s?.map(t=>t*e)}});break;case"CIMVectorMarker":{null!=t.size&&(t.size*=e);const s=t.markerPlacement;null!=s&&"placementTemplate"in s&&(s.placementTemplate=s.placementTemplate.map(t=>t*e));break}}});let o=this._getLineSymbolPeriod(n)||4;for(;o<4;)o*=2;const a=o/2;return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-a,xmax:a,ymin:-i,ymax:i},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-a,0],[a,0]]]},symbol:n}],size:s}}static async normalizeSymbolAndFetchResources(t,e,s=null){if(!t)return;const i=[];if("effects"in t&&t.effects)for(const e of t.effects)i.push((0,p.ai)(e));async function n(t){if("CIMTextSymbol"!==t.type)return;const{fontFamilyName:s,fontStyleName:i}=t;if("calcitewebcoreicons"===s?.toLowerCase())return;const{style:n,weight:r}=(0,D._d)(i),o=(0,D.DW)(t),a=new f.A({family:s,style:n,weight:r,decoration:o});try{await e.loadFont(a)}catch{nt().error(`Unsupported font ${s} in CIM symbol`)}}i.push(n(t)),_t(t,t=>{if(t.effects)for(const e of t.effects)i.push((0,p.ai)(e));if("CIMVectorMarker"===t.type){for(const e of t.markerGraphics)(0,u.Ed)(e.geometry)&&(e.geometry=(0,_.GS)(e.geometry,{maxDeviation:.01}));t.markerPlacement&&i.push((0,p.g1)(t.markerPlacement))}"url"in t&&t.url&&i.push(e.fetchResource(t.url,{signal:s})),"symbol"in t&&i.push(n(t.symbol))}),await Promise.all(i)}static _getLineSymbolPeriod(t){if(t){const e=this._getEffectsRepeat(t.effects);if(e)return e;if(t.symbolLayers)for(const e of t.symbolLayers)if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;switch(e.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{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:nt().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={...t};s.markerPlacement=null,s.anchorPoint=null;const i=Math.abs(e.stepX),n=Math.abs(e.stepY),r=(e.randomness??100)/100;let o,l,c,u;if("Random"===e.gridType){const t=(0,h.PN)(z.yv),s=Math.max(Math.floor(t/i),1),_=Math.max(Math.floor(t/n),1);o=s*i/2,l=_*n/2,c=2*l;const f=new a.A(e.seed),p=r*i/1.5,d=r*n/1.5;u=[];for(let t=0;t<s;t++)for(let e=0;e<_;e++){const s=t*i-o+p*(.5-f.getFloat()),r=e*n-l+d*(.5-f.getFloat());u.push({x:s,y:r}),0===t&&u.push({x:s+2*o,y:r}),0===e&&u.push({x:s,y:r+2*l})}}else!0===e.shiftOddRows?(o=i/2,l=n,c=2*n,u=[{x:-o,y:0},{x:o,y:0},{x:0,y:l},{x:0,y:-l}]):(o=i/2,l=n/2,c=n,u=[{x:-i,y:0},{x:0,y:-n},{x:-i,y:-n},{x:0,y:0},{x:i,y:0},{x:0,y:n},{x:i,y:n},{x:-i,y:n},{x:i,y:-n}]);return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-o,xmax:o,ymin:-l,ymax:l},markerGraphics:u.map(t=>({type:"CIMMarkerGraphic",geometry:t,symbol:{type:"CIMPointSymbol",symbolLayers:[s]}})),size:c}}}function _t(t,e){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const s=t.symbolLayers;if(!s)return;for(const t of s)if(e(t),"CIMVectorMarker"===t.type){const s=t.markerGraphics;if(!s)continue;for(const t of s)if(t){const s=t.symbol;s&&_t(s,e)}}break}}}const ft=t=>{if(!t)return"Butt";switch(t){case"butt":return"Butt";case"square":return"Square";case"round":return"Round"}},pt=t=>{if(!t)return"Miter";switch(t){case"miter":return"Miter";case"round":return"Round";case"bevel":return"Bevel"}},dt=t=>{if(null==t)return"Center";switch(t){case"left":return"Left";case"right":return"Right";case"center":return"Center"}},mt=t=>{if(null==t)return"Center";switch(t){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},gt=t=>{if(!t)return[0,0,0,0];const{r:e,g:s,b:i,a:n}=t;return[e,s,i,255*n]},yt=(t,e)=>{const s=Pt(e),i=xt(t);return s&&i?`${s}-${i}`:`${s}${i}`},Pt=t=>{if(!t)return"";switch(t.toLowerCase()){case"bold":case"bolder":return"bold"}return""},xt=t=>{if(!t)return"";switch(t.toLowerCase()){case"italic":case"oblique":return"italic"}return""},Mt=(t,e)=>{const s=.001,i="butt"===e;switch(t){case"dash":case"esriSLSDash":return i?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return i?[4,3,1,3]:[3,4,s,4];case"dot":case"esriSLSDot":return i?[1,3]:[s,4];case"long-dash":case"esriSLSLongDash":return i?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return i?[8,3,1,3]:[7,4,s,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return i?[8,3,1,3,1,3]:[7,4,s,4,s,4];case"short-dash":case"esriSLSShortDash":return i?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return i?[4,1,1,1]:[3,2,s,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return i?[4,1,1,1,1,1]:[3,2,s,2,s,2];case"short-dot":case"esriSLSShortDot":return i?[1,1]:[s,2];case"solid":case"esriSLSSolid":case"none":return nt().error("Unexpected: style does not require rasterization"),[0,0];default:return nt().error(`Tried to rasterize SLS, but found an unexpected style: ${t}!`),[0,0]}},bt=(t,e=100)=>{const s=e/2;let i,n;const r=t;if("circle"===r||"esriSMSCircle"===r){const t=.25;let e=Math.acos(1-t/s),r=Math.ceil(tt/e/4);0===r&&(r=1),e=et/r,r*=4;const o=[];o.push([s,0]);for(let t=1;t<r;t++)o.push([s*Math.cos(t*e),-s*Math.sin(t*e)]);o.push([s,0]),i={rings:[o]},n={xmin:-s,ymin:-s,xmax:s,ymax:s}}else if("cross"===r||"esriSMSCross"===r){const t=0;i={paths:[[[t,s],[t,-s]],[[s,t],[-s,t]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s}}else if("diamond"===r||"esriSMSDiamond"===r)i={rings:[[[-s,0],[0,s],[s,0],[0,-s],[-s,0]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s};else if("square"===r||"esriSMSSquare"===r)i={rings:[[[-s,-s],[-s,s],[s,s],[s,-s],[-s,-s]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s};else if("x"===r||"esriSMSX"===r)i={paths:[[[s,s],[-s,-s]],[[s,-s],[-s,s]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s};else if("triangle"===r||"esriSMSTriangle"===r){const t=.5773502691896257*e,s=-t,r=2/3*e,o=r-e;i={rings:[[[s,o],[0,r],[t,o],[s,o]]]},n={xmin:s,ymin:o,xmax:t,ymax:r}}else"arrow"===r&&(i={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s});return[n,i]},St=t=>"vertical"===t||"horizontal"===t||"cross"===t||"esriSFSCross"===t||"esriSFSVertical"===t||"esriSFSHorizontal"===t;function Ct(t){if(!t)return null;let e=null;const{cap:s,color:i,join:n,miterLimit:r,style:o,width:a}=t;return"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(e=[{type:"CIMGeometricEffectDashes",dashTemplate:Mt(o,s),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==o&&"none"!==o?gt(i):[0,0,0,0],capStyle:ft(s),joinStyle:pt(n),miterLimit:r,width:a,effects:e}}},35521(t,e,s){s.d(e,{$u:()=>n});var i=s(28076);const n=1024;i.D.CIMSolidStroke.capstyle,i.D.CIMSolidStroke.joinstyle,i.D.CIMSolidStroke.miterlimit},63933(t,e,s){s.d(e,{Dy:()=>a,UD:()=>r,iT:()=>o,xy:()=>n});var i=s(53966);function n(t){if(!t)return 0;switch(t){case"Left":case"left":return-1;case"Right":case"right":return 1;case"Justify":return i.A.getLogger("esri.views.2d.engine.webgl.alignmentUtils").warnOnce("Horizontal alignment 'justify' is not implemented. Falling back to 'center'."),0;case"Center":case"center":return 0}}function r(t){if(!t)return 0;switch(t){case"Top":case"top":return 1;case"Center":case"middle":return 0;case"Baseline":case"baseline":return 2;case"Bottom":case"bottom":return-1}}function o(t){switch(t){case 1:case"right":return-1;case 0:case"center":return 0;case-1:case"left":return 1;default:return console.debug(`Found invalid horizontal alignment ${t}`),0}}function a(t){switch(t){case 1:case"top":return 1;case 0:case"middle":return 0;case-1:case 2:case"baseline":case"bottom":return-1;default:return console.debug(`Found invalid vertical alignment ${t}`),0}}},15660(t,e,s){s.d(e,{A:()=>n});var i=s(88340);class n{constructor(t,e,s,n){this.transformedX=0,this.transformedY=0,this.center=(0,i.fA)(t,e),this.centerT=(0,i.vt)(),this.halfWidth=s/2,this.halfHeight=n/2,this.width=s,this.height=n}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 n(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]),n=(t.halfWidth+this.halfWidth+e)/s,r=(t.halfHeight+this.halfHeight+e)/i,o=Math.min(n,r);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,n=Math.max(this.ymax,t.ymax)-s,r=e+i/2,o=s+n/2;this.width=i,this.height=n,this.halfWidth=i/2,this.halfHeight=n/2,this.x=r,this.y=o}static deserialize(t){const e=t.readF32(),s=t.readF32(),i=t.readInt32(),r=t.readInt32();return new n(e,s,i,r)}}},75434(t,e,s){s.d(e,{Tl:()=>y});var i=s(16905),n=s(85560),r=s(37585),o=s(88340),a=s(63933),h=s(18989),l=s(15660);const c=Math.PI/180;class u{constructor(t,e,s,i){this._rotationT=(0,n.vt)(),this._transform=(0,n.vt)(),this._angle=0,this._bounds=null;const{mosaicItem:r,rect:o,shaping:a,code:h}=s,l=r.rect;this.width=0===h?o.width:l.width*i,this.height=0===h?o.height:l.height*i,this.x=i*(t+a.xOffset+o.left),this.y=i*(e+a.yOffset-o.top),this.textureBinding=r.textureBinding,this.texcoords={topLeft:[l.x,l.y],topRight:[l.x+l.width,l.y],bottomLeft:[l.x,l.y+l.height],bottomRight:[l.x+l.width,l.y+l.height]}}set angle(t){this._angle=t,(0,i.$0)(this._rotationT,-t),this._offsets=this._bounds=null}get angle(){return this._angle}get offsets(){if(!this._offsets){const{x:t,y:e,width:s,height:o}=this,a=(0,i.$0)((0,n.vt)(),-this.angle),h=(0,i.lw)((0,n.vt)(),a,this._transform);this._offsets={topLeft:(0,r.l0)([0,0],[t,e],h),topRight:(0,r.l0)([0,0],[t+s,e],h),bottomLeft:(0,r.l0)([0,0],[t,e+o],h),bottomRight:(0,r.l0)([0,0],[t+s,e+o],h)}}return this._offsets}get bounds(){if(this.width<=0)return null;if(!this._bounds){const t=this.offsets;let e=1/0,s=1/0,i=-1/0,n=-1/0;for(const[r,o]of[t.topLeft,t.topRight,t.bottomLeft,t.bottomRight])e=Math.min(e,r),s=Math.min(s,o),i=Math.max(i,r),n=Math.max(n,o);const r=i-e,o=n-s,a=e+r/2,h=s+o/2;this._bounds=new l.A(a,h,r,o)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}}const _=(t,e)=>({code:0,mosaicItem:{rect:new h.A(0,0,11,8),sdf:!0,page:0,textureBinding:e},rect:{height:4,width:t,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0}});function f(t,e){return t.forEach(t=>(0,r.l0)(t,t,e)),{topLeft:t[0],topRight:t[1],bottomLeft:t[2],bottomRight:t[3]}}class p{constructor(t,e,s,i){this._rotation=0,this._decorate(t,e,s,i),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=e.length>1,this._hasRotation=0!==s.angle,this._transform=this._createGlyphTransform(this.bounds,s),this._borderLineSizePx=s.borderLineSizePx,(s.borderLineSizePx||s.hasBackground)&&([this.bounds,this.textBox]=this.shapeBackground(this._transform));for(const e of t)e.setTransform(this._transform)}setRotation(t){if(0===t&&0===this._rotation)return;this._rotation=t;const e=this._transform,s=(0,i.$0)((0,n.vt)(),t);(0,i.lw)(e,s,e);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,e,s,i){if(!s.decoration||"none"===s.decoration||!t.length)return;const n=s.scale,r="underline"===s.decoration?i?.baseline??26:i?.midline??16,o=t[0].textureBinding;for(const s of e){const e=s.startX*n,i=s.startY*n,a=(s.width+s.glyphWidthEnd)*n;t.push(new u(e,i+r*n,_(a,o),1))}}shapeBackground(t){const e=(1.5+(this._borderLineSizePx||0))/2,s=this._borderLineSizePx?e:0,{xmin:i,ymin:n,xmax:r,ymax:o,x:a,y:h,width:c,height:u}=this.bounds,_=[i-8,n-8],p=[r+8,n-8],d=[i-8,o+8],m=[r+8,o+8],g=f([[_[0]-e,_[1]-e],[p[0]+e,p[1]-e],[_[0]+s,_[1]+s],[p[0]-s,p[1]+s]],t),y=f([[d[0]+s,d[1]-s],[m[0]-s,m[1]-s],[d[0]-e,d[1]+e],[m[0]+e,m[1]+e]],t),P=f([[_[0]-e,_[1]-e],[_[0]+s,_[1]+s],[d[0]-e,d[1]+e],[d[0]+s,d[1]-s]],t),x=f([[p[0]-s,p[1]+s],[p[0]+e,p[1]-e],[m[0]-s,m[1]-s],[m[0]+e,m[1]+e]],t),M={main:f([_,p,d,m],t),top:g,bot:y,left:P,right:x};return[new l.A(a,h,c+2*e,u+2*e),M]}get boundsT(){const t=this.bounds,e=(0,r.hZ)((0,o.vt)(),t.x,t.y);if((0,r.l0)(e,e,this._transform),this._hasRotation){const s=Math.max(t.width,t.height);return new l.A(e[0],e[1],s,s)}return new l.A(e[0],e[1],t.width,t.height)}_createBounds(t){let e=1/0,s=1/0,i=0,n=0;for(const r of t)e=Math.min(e,r.offsets.topLeft[0]),s=Math.min(s,r.offsets.topLeft[1]),i=Math.max(i,r.offsets.bottomRight[0]),n=Math.max(n,r.offsets.bottomRight[1]);const r=i-e,o=n-s;return new l.A(e+r/2,s+o/2,r,o)}_createGlyphTransform(t,e){const s=c*e.angle,a=(0,n.vt)(),h=(0,o.vt)();return(0,i.Tl)(a,a,(0,r.hZ)(h,e.xOffset,-e.yOffset)),e.useCIMAngleBehavior?(0,i.e$)(a,a,s):((0,i.Tl)(a,a,(0,r.hZ)(h,t.x,t.y)),(0,i.e$)(a,a,s),(0,i.Tl)(a,a,(0,r.hZ)(h,-t.x,-t.y))),a}}class d{constructor(t,e,s,i,n,r){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].rect.width),this.width=i,this.yMin=n,this.yMax=r}}const m=t=>10===t,g=t=>32===t;function y(t,e){const s=e.scale,i=new Array,n=t.sdfPadding,{faceInfo:r,glyphs:o,isRightToLeft:h}=t,l=function(t,e,s){const i=new Array,n=1/s.scale,r=s.maxLineWidth*n,o=e?t.length-1:0,a=e?-1:t.length,h=e?-1:1;let l=o,c=0,u=0,_=l,f=_,p=0,y=1/0,P=0;for(;l!==a;){const{code:e,rect:s,shaping:n}=t[l],a=Math.abs(s.top);if(m(e)||g(e)||(y=Math.min(y,a),P=Math.max(P,a+s.height)),m(e))l!==o&&(i.push(new d(t,_,l-h,c,y===1/0?0:y,P)),y=1/0,P=0),c=0,_=l+h,f=l+h,u=0;else if(g(e))f=l+h,u=0,p=n.xAdvance,c+=n.xAdvance;else if(c>r){if(f!==_){const e=f-2*h;c-=p,i.push(new d(t,_,e,c-u,y,P)),y=1/0,P=0,_=f,c=u}else i.push(new d(t,_,l-h,c,y,P)),y=1/0,P=0,_=l,f=l,c=0;c+=n.xAdvance,u+=n.xAdvance}else c+=n.xAdvance,u+=n.xAdvance;l+=h}const x=new d(t,_,l-h,c,y,P);return x.start>=0&&x.end<t.length&&i.push(x),i}(o,h,e),c=l.length?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,n=t[0].yMin;return{x:0,y:n,height:t[t.length-1].yMax+e.lineHeight*(t.length-1)+i-n,width:s}}(l,e):{y:0,height:0},_=(0,a.xy)(e.horizontalAlignment),f=(0,a.UD)(e.verticalAlignment),y=2===f?1:0,P=y?0:f-1,x=(1-y)*-c.y+P*(c.height/2)+-22*y;for(let r=0;r<l.length;r++){const{start:a,end:h,width:c}=l[r];let f=-1*(_+1)*(c/2)-n;const p=(t.isRightToLeft?l.length-1-r:r)*e.lineHeight+x-n;l[r].startX=f,l[r].startY=p;for(let t=a;t<=h;t++){const e=o[t];if(m(e.code))continue;const n=new u(f,p,e,s);f+=e.shaping.xAdvance,i.push(n)}}return new p(i,l,e,r)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2649],{85560(t,e,s){function i(){const t=new Float32Array(6);return t[0]=1,t[3]=1,t}function n(t,e,s,i){const n=e[i],r=e[i+1];t[i]=s[0]*n+s[2]*r+s[4],t[i+1]=s[1]*n+s[3]*r+s[5]}s.d(e,{vt:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,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},create:i,fromValues:function(t,e,s,i,n,r){const o=new Float32Array(6);return o[0]=t,o[1]=e,o[2]=s,o[3]=i,o[4]=n,o[5]=r,o},transform:n,transformMany:function(t,e,s,i=0,r=0,o=2){const a=r||e.length/o;for(let r=i;r<a;r++)n(t,e,s,r*o)}},Symbol.toStringTag,{value:"Module"}))},88340(t,e,s){function i(){return new Float32Array(2)}function n(t,e){const s=new Float32Array(2);return s[0]=t,s[1]=e,s}function r(){return i()}function o(){return n(1,1)}function a(){return n(1,0)}function h(){return n(0,1)}s.d(e,{Un:()=>c,fA:()=>n,uY:()=>l,vt:()=>i});const l=r(),c=o(),u=a(),_=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:_,ZEROS:l,clone:function(t){const e=new Float32Array(2);return e[0]=t[0],e[1]=t[1],e},create:i,fromValues:n,ones:o,unitX:a,unitY:h,zeros:r},Symbol.toStringTag,{value:"Module"}))},16905(t,e,s){s.d(e,{$0:()=>h,D_:()=>n,Tl:()=>a,e$:()=>o,lw:()=>r});var i=s(34304);function n(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function r(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=s[0],c=s[1],u=s[2],_=s[3],f=s[4],p=s[5];return t[0]=i*l+r*c,t[1]=n*l+o*c,t[2]=i*u+r*_,t[3]=n*u+o*_,t[4]=i*f+r*p+a,t[5]=n*f+o*p+h,t}function o(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=Math.sin(s),c=Math.cos(s);return t[0]=i*c+r*l,t[1]=n*c+o*l,t[2]=i*-l+r*c,t[3]=n*-l+o*c,t[4]=a,t[5]=h,t}function a(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=s[0],c=s[1];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=i*l+r*c+a,t[5]=n*l+o*c+h,t}function h(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 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(Object.defineProperty({__proto__:null,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},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},determinant:function(t){return t[0]*t[3]-t[1]*t[2]},equals:function(t,e){const s=t[0],n=t[1],r=t[2],o=t[3],a=t[4],h=t[5],l=e[0],c=e[1],u=e[2],_=e[3],f=e[4],p=e[5],d=(0,i.FD)();return Math.abs(s-l)<=d*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(r-u)<=d*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-_)<=d*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(a-f)<=d*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(h-p)<=d*Math.max(1,Math.abs(h),Math.abs(p))},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]},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)},fromRotation:h,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:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t},identity:n,invert:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],o=e[4],a=e[5];let h=s*r-i*n;return h?(h=1/h,t[0]=r*h,t[1]=-i*h,t[2]=-n*h,t[3]=s*h,t[4]=(n*a-r*o)*h,t[5]=(i*o-s*a)*h,t):null},mul:c,multiply:r,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},rotate:o,scale:function(t,e,s){const i=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=s[0],c=s[1];return t[0]=i*l,t[1]=n*l,t[2]=r*c,t[3]=o*c,t[4]=a,t[5]=h,t},set:function(t,e,s,i,n,r,o){return t[0]=e,t[1]=s,t[2]=i,t[3]=n,t[4]=r,t[5]=o,t},str:function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},sub:u,subtract:l,translate:a},Symbol.toStringTag,{value:"Module"}))},36745(t,e,s){s.d(e,{z:()=>a});var i=s(4718),n=s(51118),r=s(60408),o=s(92722);class a{static fromOptimized(t,e,s=1){return(new h).initialize(t,e,s)}static fromJSON(t){const[e,s]=c(t),i=(0,r.Pv)(t),n=(0,r.W0)(t);return(new u).initialize(e,s,i,n,1)}static fromOptimizedCIM(t,e,s=1){return(new _).initialize(t,e,s)}static fromJSONCIM(t,e=1){const[s,i]=c(t),n=(0,r.Pv)(t),o=(0,r.W0)(t);return(new f).initialize(s,i,n,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new _).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSON(t,e=!1,s=!1){return(new u).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new _).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new f).initialize([],t,e,s,i)}asJSON(){const t=(0,n.x)(this),{hasZ:e,hasM:s}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:s}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:s?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:s}:{paths:t,hasZ:e,hasM:s}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,n=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+n),-.5*s}invertY(){this.yFactor*=-1}}class h extends a{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,s){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=s,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,s=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],e.slice(s,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let n=this._pathOffset+e;n<t;n+=e){const t=s[n-e],r=s[n-e+1],o=s[n]-t,a=s[n+1]-r;i+=Math.sqrt(o*o+a*a)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new h).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function c(t){return(0,r.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,r.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,r.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,r.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,r.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class u extends a{initialize(t,e,s,i,n){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=n,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],n=e[i],r=t[0],o=t[1],a=n[0]-r,h=n[1]-o;s+=Math.sqrt(a*a+h*h)}return s}startPath(){this._paths.push([])}getCurrentPath(){return(new u).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,n.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,s=new o.A([],[],t,e),{coords:i,lengths:n}=s;if("esriGeometryPoint"===this.geometryType)i.push(...this._paths[0][0]),n.length=0;else for(const s of this._paths){for(const n of s)i.push(n[0]),i.push(n[1]*this.yFactor),t&&i.push(n[2]),e&&i.push(n[this._mIndex]);n.push(s.length)}return s}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new u).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class _ extends h{initialize(t,e,s){return super.initialize(t,e,s),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new _).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class f extends u{initialize(t,e,s,i,n){return super.initialize(t,e,s,i,n)}clone(){return(new f).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},32011(t,e,s){s.d(e,{d:()=>h});var i=s(19419),n=s(537),r=s(12359),o=s(95108),a=s(12176);function h(t){if(0===t.totalSize)return null;const e=(0,n.z8)(t);if(!e)return null;const s=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let o=0,a=0;t.reset();for(let e=0;t.nextPath();e++){const s=t.getCurrentRingArea();s>a&&(a=s,o=e)}if(t.seekPath(o),0===t.pathSize)return null;t.seekPathStart();const h=(0,n.B$)(t);if(Math.abs(a)<=2*s*s)return[(h[0]+h[2])/2,(h[1]+h[3])/2];t.seekPathStart();const _=(0,r.w2)(t,(0,i.vt)());if(null===_)return null;if(t.totalPoints<4)return _;const f=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],p=[NaN,NaN,NaN,NaN],y=[NaN,NaN,NaN,NaN];let P=!1,x=c(_,t,!0);0===x.distance&&(P=!0,f[0][0]=_[0],f[0][1]=_[1],x=c(_,t,!1)),p[0]=x.distance,y[0]=0;const M=[NaN,NaN];let b=!1,S=.25,C=-1,w=NaN;do{if(w=NaN,f[1]=u(t,d(h[0],h[2],S),0,e),isNaN(f[1][0])||isNaN(f[1][1])||(x=c(f[1],t,!1),w=x.distance),!isNaN(w)&&w>s&&l(f[1],t))b=!0,p[1]=w,y[1]=m(f[1],_);else if(!isNaN(w)&&w>C&&(C=w,M[0]=f[1][0],M[1]=f[1][1]),S-=.01,S<.1){if(!(C>=0))break;b=!0,p[1]=C,f[1][0]=M[0],f[1][1]=M[1],y[1]=m(f[1],_)}}while(!b);b=!1,S=.5,C=-1;let k=.01,I=1;do{if(w=NaN,f[2]=u(t,d(h[0],h[2],S),0,e),isNaN(f[2][0])||isNaN(f[2][1])||(x=c(f[2],t,!1),w=x.distance),!isNaN(w)&&w>s&&l(f[2],t))b=!0,p[2]=w,y[2]=m(f[2],_);else if(!isNaN(w)&&w>C)C=w,M[0]=f[2][0],M[1]=f[2][1];else if(w>C&&(C=w,M[0]=f[2][0],M[1]=f[2][1]),S=.5+k*I,k+=.01,I*=-1,S<.3||S>.7){if(!(C>=0))break;b=!0,p[2]=C,f[2][0]=M[0],f[2][1]=M[1],y[2]=m(f[2],_)}}while(!b);b=!1,S=.75,C=-1;do{if(w=NaN,f[3]=u(t,d(h[0],h[2],S),0,e),isNaN(f[3][0])||isNaN(f[3][1])||(x=c(f[3],t,!1),w=x.distance),!isNaN(w)&&w>s&&l(f[3],t))b=!0,p[3]=w,y[3]=m(f[3],_);else if(w>C&&(C=w,M[0]=f[3][0],M[1]=f[3][1]),S+=.01,S>.9){if(!(C>=0))break;b=!0,p[3]=C,f[3][0]=M[0],f[3][1]=M[1],y[3]=m(f[3],_)}}while(!b);const z=[0,1,2,3],v=P?0:1;let T;for(let t=v;t<4;t++)for(let t=v;t<3;t++){const e=y[t],s=y[t+1];g(e,s)>0&&(T=z[t],z[t]=z[t+1],z[t+1]=T,y[t]=s,y[t+1]=e)}let A=v,L=0,E=0;for(let t=v;t<4;t++){switch(t){case 0:E=2*p[z[t]];break;case 1:E=1.66666666*p[z[t]];break;case 2:E=1.33333333*p[z[t]];break;case 3:E=p[z[t]]}E>L&&(L=E,A=z[t])}return f[A]}function l(t,e){let s,i,n,r,o=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(s=e.x,i=e.y;e.nextPoint();s=n,i=r)n=e.x,r=e.y,i>t[1]!=r>t[1]&&((n-s)*(t[1]-i)-(r-i)*(t[0]-s)>0?o++:o--);return 0!==o}function c(t,e,s){if(s&&l(t,e))return{coord:t,distance:0};let i=1/0,n=0,r=0,a=[0,0],h=[0,0];const c=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(a[0]=e.x,a[1]=e.y;e.nextPoint();a=h){h=[e.x,e.y],(0,o.gR)(c,t,a,h);const s=m(t,c);s<i&&(i=s,n=c[0],r=c[1])}return{coord:[n,r],distance:Math.sqrt(i)}}function u(t,e,s,n){const r=[e,0];let o=1/0,h=1/0,l=!1,c=!1;const u=[[e,n[1]-1],[e,n[3]+1]],p=[0,0],d=[0,0],m=[0,0],g=[[0,0],[0,0]],y=(0,i.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(g[0][0]=t.x,g[0][1]=t.y;t.nextPoint();g[0][0]=g[1][0],g[0][1]=g[1][1]){if(g[1][0]=t.x,g[1][1]=t.y,null===_(y,g))continue;if(d[0]=u[0][0],d[1]=u[0][1],m[0]=u[1][0],m[1]=u[1][1],0===f(y,d,m))continue;if(!(0,a.Ql)(u[0],u[1],g[0],g[1],p))continue;const e=p[1];o>h?e<o&&(o=e,l=!0):e<h&&(h=e,c=!0)}return l&&c?r[1]=(o+h)/2:r[0]=r[1]=NaN,r}function _(t,e){if(e.length<2)return null;t||(t=(0,i.vt)());const[s,n]=e[0],[r,o]=e[1];return t[0]=Math.min(s,r),t[1]=Math.min(n,o),t[2]=Math.max(s,r),t[3]=Math.max(n,o),t}function f(t,e,s){let i=p(e,t),n=p(s,t);const r=t[0],o=t[1],a=t[2],h=t[3];if(i&n)return 0;if(!(i|n))return 4;const l=(i?1:0)|(n?2:0);do{const l=s[0]-e[0],c=s[1]-e[1];if(l>c)3&i?(1&i?(e[1]+=c*(r-e[0])/l,e[0]=r):(e[1]+=c*(a-e[0])/l,e[0]=a),i=p(e,t)):3&n?(1&n?(s[1]+=c*(r-s[0])/l,s[0]=r):(s[1]+=c*(a-s[0])/l,s[0]=a),n=p(s,t)):i?(4&i?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),i=p(e,t)):(4&n?(s[0]+=l*(o-s[1])/c,s[1]=o):(s[0]+=l*(h-s[1])/c,s[1]=h),n=p(s,t));else if(12&i?(4&i?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),i=p(e,t)):12&n?(4&n?(s[0]+=l*(o-s[1])/c,s[1]=o):(s[0]+=l*(h-s[1])/c,s[1]=h),n=p(s,t)):i?(1&i?(e[1]+=c*(r-e[0])/l,e[0]=r):(e[1]+=c*(a-e[0])/l,e[0]=a),i=p(e,t)):(1&n?(s[1]+=c*(r-s[0])/l,s[0]=r):(s[1]+=c*(a-s[0])/l,s[0]=a),n=p(s,t)),i&n)return 0}while(i|n);return l}function p(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function d(t,e,s){return t+(e-t)*s}function m(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function g(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const s=isNaN(t),i=isNaN(e);return s<i?-1:s>i?1:0}},35833(t,e,s){s.d(e,{$Z:()=>o,NS:()=>l,Xs:()=>h,ai:()=>d,g1:()=>m,hd:()=>c,kT:()=>g,lX:()=>a,mO:()=>u,qc:()=>y,vZ:()=>f,yM:()=>_});var i=s(36745),n=s(6774),r=s(93397);const o=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(463),s.e(6160)]).then(s.bind(s,46160))),a=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(8872)]).then(s.bind(s,55666))),h=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(1060)]).then(s.bind(s,51190))),l=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(837)]).then(s.bind(s,97528))),c=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(463),s.e(795)]).then(s.bind(s,50795))),u=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(6936)]).then(s.bind(s,15605))),_=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(1075)]).then(s.bind(s,3637))),f=(0,r.z9)(()=>Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(1948)]).then(s.bind(s,83299)));let p;function d(t){switch(t.type){case"CIMGeometricEffectDonut":case"CIMGeometricEffectBuffer":return o.getImportPromise();case"CIMGeometricEffectEnclosingPolygon":return a.getImportPromise();case"CIMGeometricEffectOffset":return Promise.all([u.getImportPromise(),c.getImportPromise()]);case"CIMGeometricEffectTaperedPolygon":return Promise.all([_.getImportPromise(),h.getImportPromise(),l.getImportPromise()]);default:return Promise.resolve()}}function m(t){return"CIMMarkerPlacementAtMeasuredUnits"===t.type?f.getImportPromise():Promise.resolve()}class g{constructor(t){this._geometry=t}next(){const t=this._geometry;return this._geometry=null,t}}function y(t,e,s){if(!t)return null;p||(p=new n.O3(0,0,0,1));const r=s?-1:1,o="esriGeometryPolygon"===t.geometryType,a=o?3:2,h=o?3:2;let l,c;for(p.reset(a),p.setPixelMargin(e+1),p.setExtent(512);t.nextPath();)if(!(t.pathSize<h)){for(t.nextPoint(),l=t.x,c=r*t.y,p.moveTo(l,c);t.nextPoint();)l=t.x,c=r*t.y,p.lineTo(l,c);o&&p.close()}const u=p.result(!1);if(u){const e=i.z.createEmptyOptimizedCIM(t.geometryType);for(const t of u){e.startPath();for(const s of t)e.pushXY(s.x,r*s.y)}return e.reset(),e}return null}},92580(t,e,s){s.d(e,{A:()=>Kt,c:()=>Qt});class i{static{this.instance=null}static local(){return null===i.instance&&(i.instance=new i),i.instance}execute(t,e){return new n(t,e)}}class n{constructor(t,e){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();if(!t)return null;for(;t;){if("esriGeometryPolygon"===t.geometryType)this._isClosed=!0;else if("esriGeometryPolyline"===t.geometryType)this._isClosed=!1;else{if("esriGeometryEnvelope"!==t.geometryType){t=this._inputGeometries.next();continue}if(this._maxCosAngle)return t;this._isClosed=!0}for(;t.nextPath();)this._processPath(t);return t.reset(),t}return null}_processPath(t){if(t.nextPoint()){const e=t.x,s=t.y;let i=e,n=s,r=t.pathSize,o=0,a=0,h=0,l=0,c=0,u=0;this._isClosed&&++r;for(let _=1;t.nextPoint()||_<r;++_){let f,p;this._isClosed&&_===r-1?(f=e,p=s):(f=t.x,p=t.y);const d=f-i,m=p-n,g=Math.sqrt(d*d+m*m);_>1&&g>0&&h>0&&(o*d+a*m)/g/h<=this._maxCosAngle&&t.setControlPointAt(_-1),1===_&&(l=d,c=m,u=g),g>0&&(i=f,n=p,o=d,a=m,h=g)}this._isClosed&&h>0&&u>0&&(o*l+a*c)/u/h<=this._maxCosAngle&&t.setControlPointAt(0)}}}var r=s(36745),o=s(51118),a=s(98939);function h(t,e){t[4]=e}class l{constructor(t,e=!0,s=!0,i=0){this._angleToLine=!0,this._keepUpright=!1,this.isClosed=!1,this.geometryCursor=null,this.geometryCursor=!e&&"esriGeometryPolygon"===t.geometryType||!s&&"esriGeometryPolyline"===t.geometryType?null:t,this.geomUnitsPerPoint=i,this.iterateMultiPath=!1,this.iteratePath=!1,this.internalPlacement=new a.W}next(){if(!this.geometryCursor)return null;const t=this.processMultiPath(this.geometryCursor);if(this.iterateMultiPath&&t||(this.geometryCursor=null),!t)return null;const e=t.getAngle();if(this._angleToLine&&this._keepUpright&&Math.abs(e)>.5*Math.PI){const s=e+Math.PI,i=Math.atan2(Math.sin(s),Math.cos(s));Number.isNaN(i)||t.setRotate(i)}return t}processMultiPath(t){for(;this.iteratePath||t.pathIndex<t.totalSize-1;){this.iteratePath||t.nextPath(),this.iterateMultiPath=!0;const e=this.processPath(t);if(e)return e}return this.iterateMultiPath=!1,null}}class c{constructor(t,e,s,i=0){this.isClosed=!1,this.inputGeometries=t,this.acceptPolygon=e,this.acceptPolyline=s,this.geomUnitsPerPoint=i,this.iteratePath=!1,this.multiPathCursor=null}next(){for(;;){if(!this.multiPathCursor){let t=this.inputGeometries.next();for(;t&&(this.isClosed=this.acceptPolygon&&"esriGeometryPolygon"===t.geometryType||"esriGeometryEnvelope"===t.geometryType,this.multiPathCursor=t,!this.multiPathCursor);)t=this.inputGeometries.next();if(!this.multiPathCursor)return null}for(;this.iteratePath||this.multiPathCursor.nextPath();){this.multiPathCursor.seekPathStart();const t=this.processPath(this.multiPathCursor);if(t)return t}this.multiPathCursor=null}}}const u=.03;class _{constructor(t=0,e=!1){}isEmpty(t){if(!t.nextPoint())return!0;let e,s,i,n;for(e=t.x,s=t.y;t.nextPoint();e=s,s=n)if(i=t.x,n=t.y,i!==e||n!==s)return t.seekPathStart(),!1;return t.seekPathStart(),!0}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);0!==e&&(t[0]/=e,t[1]/=e)}getLength(t,e,s,i){const n=s-t,r=i-e;return Math.sqrt(n*n+r*r)}getSegLength(t){const[[e,s],[i,n]]=t;return this.getLength(e,s,i,n)}getCoord2D(t,e,s,i,n){return[t+(s-t)*n,e+(i-e)*n]}getSegCoord2D(t,e){const[[s,i],[n,r]]=t;return this.getCoord2D(s,i,n,r,e)}getAngle(t,e,s,i,n){const r=s-t,o=i-e;return Math.atan2(o,r)}getAngleCS(t,e,s,i,n,r){null==t&&(t=[0,0]);const o=i-e,a=n-s,h=Math.sqrt(o*o+a*a);return 0!==h?(t[0]=o/h,t[1]=a/h,t):(t[0]=1,t[1]=0,t)}getSegAngleCS(t,e,s){const[[i,n],[r,o]]=e;return this.getAngleCS(t,i,n,r,o,s)}cut(t,e,s,i,n,r){return[n<=0?[t,e]:this.getCoord2D(t,e,s,i,n),r>=1?[s,i]:this.getCoord2D(t,e,s,i,r)]}getSubCurve(t,e,s){const i=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");return this.appendSubCurve(i,t,e,s)?i:null}appendSubCurve(t,e,s,i){t.startPath(),e.seekPathStart();let n=0,r=!0;if(!e.nextPoint())return!1;let o=e.x,a=e.y;for(;e.nextPoint();){const h=this.getLength(o,a,e.x,e.y);if(0!==h){if(r){if(n+h>s){const l=(s-n)/h;let c=1,u=!1;n+h>=i&&(c=(i-n)/h,u=!0);const _=this.cut(o,a,e.x,e.y,l,c);if(_&&t.pushPoints(_),u)break;r=!1}}else{if(n+h>i){const s=this.cut(o,a,e.x,e.y,0,(i-n)/h);s&&t.pushPoint(s[1]);break}t.pushXY(e.x,e.y)}n+=h,o=e.x,a=e.y}else o=e.x,a=e.y}return!0}getCIMPointAlong(t,e){if(!t.nextPoint())return null;let s,i,n,r,o=0;for(s=t.x,i=t.y;t.nextPoint();s=n,i=r){n=t.x,r=t.y;const a=this.getLength(s,i,n,r);if(0!==a){if(o+a>e){const t=(e-o)/a;return this.getCoord2D(s,i,n,r,t)}o+=a}}return null}offset(t,e,s,i,n){if(!t||t.length<2)return null;let r=0,o=t[r++],a=r;for(;r<t.length;){const e=t[r];e[0]===o[0]&&e[1]===o[1]||(r!==a&&(t[a]=t[r]),o=t[a++]),r++}const h=t[0][0]===t[a-1][0]&&t[0][1]===t[a-1][1];if(h&&--a,a<(h?3:2))return null;const l=[];o=h?t[a-1]:null;let c=t[0];for(let n=0;n<a;n++){const r=n===a-1?h?t[0]:null:t[n+1];if(o)if(r){const t=[r[0]-c[0],r[1]-c[1]];this.normalize(t);const n=[c[0]-o[0],c[1]-o[1]];this.normalize(n);const a=n[0]*t[1]-n[1]*t[0],h=n[0]*t[0]+n[1]*t[1];if(0===a&&1===h){c=r;continue}if(a>=0==e<=0){if(h<1){const s=[t[0]-n[0],t[1]-n[1]];this.normalize(s);const r=Math.sqrt((1+h)/2);if(r>1/i){const t=-Math.abs(e)/r;l.push([c[0]-s[0]*t,c[1]-s[1]*t])}}}else switch(s){case"Mitered":{const s=Math.sqrt((1+h)/2);if(s>0&&1/s<i){const i=[t[0]-n[0],t[1]-n[1]];this.normalize(i);const r=Math.abs(e)/s;l.push([c[0]-i[0]*r,c[1]-i[1]*r]);break}}case"Bevelled":l.push([c[0]+n[1]*e,c[1]-n[0]*e]),l.push([c[0]+t[1]*e,c[1]-t[0]*e]);break;case"Rounded":if(h<1){l.push([c[0]+n[1]*e,c[1]-n[0]*e]);const s=Math.floor(2.5*(1-h));if(s>0){const i=1/s;let r=i;for(let o=1;o<s;o++,r+=i){const s=[n[1]*(1-r)+t[1]*r,-n[0]*(1-r)-t[0]*r];this.normalize(s),l.push([c[0]+s[0]*e,c[1]+s[1]*e])}}l.push([c[0]+t[1]*e,c[1]-t[0]*e])}break;default:if(a<0)l.push([c[0]+(n[1]+n[0])*e,c[1]+(n[1]-n[0])*e]),l.push([c[0]+(t[1]-t[0])*e,c[1]-(t[0]+t[1])*e]);else{const s=Math.sqrt((1+Math.abs(h))/2),i=[t[0]-n[0],t[1]-n[1]];this.normalize(i);const r=e/s;l.push([c[0]-i[0]*r,c[1]-i[1]*r])}}}else{const t=[c[0]-o[0],c[1]-o[1]];this.normalize(t),l.push([c[0]+t[1]*e,c[1]-t[0]*e])}else{const t=[r[0]-c[0],r[1]-c[1]];this.normalize(t),l.push([c[0]+t[1]*e,c[1]-t[0]*e])}o=c,c=r}return l.length<(h?3:2)?null:(h&&l.push([l[0][0],l[0][1]]),l)}}const f=1.7320508075688772;class p{static{this.instance=null}static local(){return null===p.instance&&(p.instance=new p),p.instance}execute(t,e,s){return new d(t,e,s)}}class d extends c{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new _,this._width=(void 0!==e.width?e.width:5)*s,this._arrowType=void 0!==e.geometricEffectArrowType?e.geometricEffectArrowType:void 0!==e.arrowType?e.arrowType:"OpenEnded",this._offsetFlattenError=u*s}processPath(t){const e=r.z.createEmptyOptimizedCIM(t.geometryType);switch(this._arrowType){case"OpenEnded":default:this._constructSimpleArrow(e,t,!0);break;case"Block":this._constructSimpleArrow(e,t,!1);break;case"Crossed":this._constructCrossedArrow(e,t)}return e}_constructSimpleArrow(t,e,s){const i=e.pathLength();let n=this._width;i<2*n&&(n=i/2);const r=this._curveHelper.getSubCurve(e,0,i-n);if(!r||!r.nextPath())return;r.seekPathStart();const a=n/2;if(this._curveHelper.isEmpty(r))return;const h=(0,o.A)(r),l=this._constructOffset(h,-a);if(!l)return;const c=this._constructOffset(h,a);if(!c)return;const u=this._constructArrowBasePoint(l,-a/2);if(!u)return;const _=this._constructArrowBasePoint(c,a/2);if(!_)return;e.seekInPath(e.pathSize-1);const f=[e.x,e.y];t.pushPath(c),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(_),t.nextPoint(),t.setControlPoint(),t.pushPoint(f),t.nextPoint(),t.setControlPoint(),t.pushPoint(u),t.nextPoint(),t.setControlPoint(),t.pushPoints(l.reverse()),t.setControlPoint(),s||(t.setControlPointAt(0),t.setControlPointAt(t.pathSize-1),t.pushPoint(c[0])),t.reset()}_constructCrossedArrow(t,e){const s=e.pathLength();let i=this._width;s<i*(1+f+1)&&(i=s/(1+f+1)),e.seekPathStart();const n=this._curveHelper.getSubCurve(e,0,s-i*(1+f));if(!n)return;n.nextPath();const r=i/2;if(this._curveHelper.isEmpty(n))return;const a=(0,o.A)(n),h=this._constructOffset(a,r);if(!h)return;const l=this._constructOffset(a,-r);if(!l)return;const c=this._curveHelper.getSubCurve(e,0,s-i);if(!c)return;if(c.nextPath(),this._curveHelper.isEmpty(c))return;const u=(0,o.A)(c),_=this._constructOffset(u,r);if(!_)return;const p=this._constructOffset(u,-r);if(!p)return;const d=_[_.length-1],m=this._constructArrowBasePoint(_,r/2);if(!m)return;const g=p[p.length-1],y=this._constructArrowBasePoint(p,-r/2);if(!y)return;e.seekInPath(e.pathSize-1);const P=[e.x,e.y];t.pushPath(h),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(g),t.nextPoint(),t.setControlPoint(),t.pushPoint(y),t.nextPoint(),t.setControlPoint(),t.pushPoint(P),t.nextPoint(),t.setControlPoint(),t.pushPoint(m),t.nextPoint(),t.setControlPoint(),t.pushPoint(d),t.nextPoint(),t.setControlPoint(),t.pushPoints(l.reverse()),t.nextPoint(),t.setControlPoint(),t.reset()}_constructOffset(t,e){return this._curveHelper.offset(t,e,"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],n=[i[0]-s[0],i[1]-s[1]];return this._curveHelper.normalize(n),[i[0]+n[1]*e,i[1]-n[0]*e]}}var m=s(16930),g=s(35833);class y{static{this.instance=null}static local(){return null===y.instance&&(y.instance=new y),y.instance}execute(t,e,s,i,n,r){return new P(t,e,s,i,n,r)}}class P{constructor(t,e,s,i,n,r){this._preventClipping=r,this._inputGeometries=t,this._tileKey=i,this._curveHelper=new _,this._size=(void 0!==e.size?e.size:1)*s,this._maxInflateSize=n*s,this._offsetFlattenError=u*s}next(){let t;for(;t=this._inputGeometries.next();){if(0===this._size)return t;if("esriGeometryEnvelope"===t.geometryType)if(this._size>0){const e=r.z.createEmptyOptimizedCIM(t.geometryType),s=(0,o.x)(t)[0],i=this._curveHelper.offset(s,this._size,"Rounded",4,this._offsetFlattenError);if(i)return e.pushPath(i),e}else if(this._size<0){const e=t.asJSON();if(Math.min(e.xmax-e.xmin,e.ymax-e.ymin)+2*this._size>0)return r.z.fromJSONCIM({xmin:e.xmin-this._size,xmax:e.xmax+this._size,ymin:e.ymin-this._size,ymax:e.ymax+this._size})}const e=!this._preventClipping&&this._tileKey?(0,g.qc)(t,this._maxInflateSize,!0):t;if(!e)continue;const s=g.$Z.module,i={...e.asJSON(),spatialReference:{wkid:m.A.WebMercator.wkid}},n=s.execute(i,this._size);return n?r.z.fromJSONCIM(n):null}return null}}var x=s(95108);class M{static{this.instance=null}static local(){return null===M.instance&&(M.instance=new M),M.instance}execute(t,e,s){return new b(t,e,s)}}class b{constructor(t,e,s){this._defaultPointSize=20,this._inputGeometries=t,this._geomUnitsPerPoint=s,this._rule=e.rule??"FullGeometry",this._defaultSize=this._defaultPointSize*s}next(){let t;for(;t=this._inputGeometries.next();){const e=this._processGeom((0,o.x)(t));if(e?.length)return r.z.fromJSONCIM({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){const i=t[0]*e-t[1]*s,n=t[0]*s+t[1]*e;t[0]=i,t[1]=n}_makeCtrlPt(t){const e=[t[0],t[1]];return h(e,1),e}_addAngledTicks(t,e,s,i){const n=this._sub(s,e);this._normalize(n);const r=this._crossProduct(n,this._sub(i,e));let o;o=r>0?this._rightPerp(n):this._leftPerp(n);const a=Math.abs(r)/2,h=[];h.push([e[0]+(o[0]-n[0])*a,e[1]+(o[1]-n[1])*a]),h.push(e),h.push(s),h.push([s[0]+(o[0]+n[0])*a,s[1]+(o[1]+n[1])*a]),t.push(h)}_addBezier2(t,e,s,i,n){if(0===n--)return void t.push(i);const r=this._mid(e,s),o=this._mid(s,i),a=this._mid(r,o);this._addBezier2(t,e,r,a,n),this._addBezier2(t,a,o,i,n)}_addBezier3(t,e,s,i,n,r){if(0===r--)return void t.push(n);const o=this._mid(e,s),a=this._mid(s,i),h=this._mid(i,n),l=this._mid(o,a),c=this._mid(a,h),u=this._mid(l,c);this._addBezier3(t,e,o,l,u,r),this._addBezier3(t,u,c,h,n,r)}_add90DegArc(t,e,s,i,n){const r=n??this._crossProduct(this._sub(s,e),this._sub(i,e))>0,o=this._mid(e,s),a=this._sub(o,e);r?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],n=e[1],r=e[e.length-1],o=this._sub(i,n),a=this._norm(o);this._normalize(o);const h=Math.abs(this._crossProduct(o,this._sub(r,n)));let l=this._dotProduct(o,this._sub(r,n));l<.05*a?l=.05*a:l>.95*a&&(l=.95*a);const c=.5*h,u=this._leftPerp(o),_=[n[0]+o[0]*l,n[1]+o[1]*l],f=e.length-1,p=[];p.push(s?[-u[0],-u[1]]:u);let d=[-o[0],-o[1]];for(let t=1;t<f-1;t++){const s=this._sub(e[t+1],e[t]);this._normalize(s);const i=this._dotProduct(s,d),n=this._crossProduct(s,d),r=Math.sqrt((1+i)/2),o=this._sub(s,d);this._normalize(o),o[0]/=r,o[1]/=r,p.push(n<0?[-o[0],-o[1]]:o),d=s}p.push(this._rightPerp(d));for(let s=p.length-1;s>0;s--)t.push([e[s][0]+p[s][0]*c,e[s][1]+p[s][1]*c]);t.push([_[0]+p[0][0]*c,_[1]+p[0][1]*c]),t.push([_[0]+p[0][0]*h,_[1]+p[0][1]*h]),t.push(i),t.push([_[0]-p[0][0]*h,_[1]-p[0][1]*h]),t.push([_[0]-p[0][0]*c,_[1]-p[0][1]*c]);for(let s=1;s<p.length;s++)t.push([e[s][0]-p[s][0]*c,e[s][1]-p[s][1]*c])}_addDash(t,e,s){const i=this._norm(s)/7;this._normalize(s);let n=[];for(let r=0;r<=7;r++)n.push([e[0]+s[0]*r*i,e[1]+s[1]*r*i]),1&r&&(t.push(n),n=[])}_cp2(t,e,s){return t.length>=2?t[1]:this._add2(t[0],e*this._defaultSize,s*this._defaultSize)}_cp3(t,e,s,i){if(t.length>=3)return t[2];const n=this._mix(t[0],1-s,e,s),r=this._sub(e,t[0]);return this._normalize(r),this._rightPerpendicular(r),[n[0]+r[0]*i*this._defaultSize,n[1]+r[1]*i*this._defaultSize]}_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 n=this._rightPerp(i);return[e,s,[e[0]+(n[0]-i[0])*this._defaultSize,e[1]+(n[1]-i[1])*this._defaultSize]]}_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 n=this._rightPerp(t);i=[e[0]+(n[0]-t[0])*this._defaultSize,e[1]+(n[1]-t[1])*this._defaultSize]}return[s,i]}_processGeom(t){if(!t)return null;const e=[];for(const s of t){const t=s.length>1&&(0,x.Yl)(s)<this._defaultSize;if(!s||0===s.length||t)continue;const i=s.length;let n=s[0];switch(this._rule){case"PerpendicularFromFirstSegment":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,4),r=[];r.push(i),r.push(this._mid(n,t)),e.push(r);break}case"ReversedFirstSegment":{const t=this._cp2(s,0,-1);e.push([t,n]);break}case"PerpendicularToSecondSegment":{if(s.length<3)return[];const t=this._cp2(s,-4,1),i=this._cp3(s,t,.882353,-1.94),r=[];r.push(this._mid(t,i)),r.push(n),e.push(r);break}case"SecondSegmentWithTicks":{if(s.length<3)return[];const t=this._cp2(s,-4,1),i=this._cp3(s,t,.882353,-1.94),r=this._sub(i,t);let o;o=this._crossProduct(r,this._sub(n,t))>0?this._rightPerp(r):this._leftPerp(r);const a=[];a.push([t[0]+(o[0]-r[0])/3,t[1]+(o[1]-r[1])/3]),a.push(t),a.push(i),a.push([i[0]+(o[0]+r[0])/3,i[1]+(o[1]+r[1])/3]),e.push(a);break}case"DoublePerpendicular":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,3),r=this._mid(n,t),o=this._sub(r,i);this._normalize(o);const a=this._crossProduct(o,this._sub(n,i));this._leftPerpendicular(o);const h=[];h.push(n),h.push([i[0]+o[0]*a,i[1]+o[1]*a]),e.push(h);const l=[];l.push([i[0]-o[0]*a,i[1]-o[1]*a]),l.push(t),e.push(l);break}case"OppositeToFirstSegment":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,3),r=this._mid(n,t),o=this._sub(r,i);this._normalize(o);const a=this._crossProduct(o,this._sub(n,i));this._leftPerpendicular(o);const h=[];h.push([i[0]+o[0]*a,i[1]+o[1]*a]),h.push([i[0]-o[0]*a,i[1]-o[1]*a]),e.push(h);break}case"TriplePerpendicular":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,4),r=this._mid(n,t),o=this._sub(r,i);this._normalize(o);const a=this._crossProduct(o,this._sub(n,i));this._leftPerpendicular(o);const h=[];h.push([i[0]+o[0]*a*.8,i[1]+o[1]*a*.8]),h.push([r[0]+.8*(n[0]-r[0]),r[1]+.8*(n[1]-r[1])]),e.push(h),e.push([i,r]);const l=[];l.push([i[0]-o[0]*a*.8,i[1]-o[1]*a*.8]),l.push([r[0]+.8*(t[0]-r[0]),r[1]+.8*(t[1]-r[1])]),e.push(l);break}case"HalfCircleFirstSegment":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,4),r=this._mid(n,t);let o=this._sub(t,n);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 _;this._crossProduct(o,this._sub(i,n))>0?(u.push(n),o=this._sub(n,r),_=t):(u.push(t),o=this._sub(t,r),_=n),this._rotateDirect(o,l,c),o[0]/=l,o[1]/=l;for(let t=1;t<=18;t++)u.push(this._add(r,o)),this._rotateDirect(o,a,h);u.push(_),e.push(u);break}case"HalfCircleSecondSegment":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,1,-1);let r=this._sub(n,t);this._normalize(r);const o=this._crossProduct(r,this._sub(i,t))/2;this._leftPerpendicular(r);const a=[t[0]+r[0]*o,t[1]+r[1]*o];r=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(r,h,l),c.push(this._add(a,r));e.push(c);break}case"HalfCircleExtended":{const t=this._cp2(s,0,-2),r=this._cp3(s,t,1,-1);let o;if(i>=4)o=s[3];else{const e=this._sub(n,t);o=this._add(r,e)}const a=this._dist(t,r)/2/.75,h=this._sub(t,n);this._normalize(h,a);const l=this._sub(r,o);this._normalize(l,a);const c=[o,r];e.push(c);const u=[this._clone(r)];this._addBezier3(u,r,this._add(r,l),this._add(t,h),t,4),u.push(n),e.push(u);break}case"OpenCircle":{const t=this._cp2(s,-2,0),i=this._sub(t,n),r=Math.cos(Math.PI/18),o=-Math.sin(Math.PI/18),a=[t];for(let t=1;t<=33;t++)this._rotateDirect(i,r,o),a.push(this._add(n,i));e.push(a);break}case"CoverageEdgesWithTicks":{const t=this._cp2(s,0,-1);let r,o;if(i>=3)r=s[2];else{const e=this._sub(t,n),s=this._leftPerp(e);r=[n[0]+s[0]-.25*e[0],n[1]+s[1]-.25*e[1]]}if(i>=4)o=s[3];else{const e=this._mid(n,t),s=this._sub(n,t);this._normalize(s),this._leftPerpendicular(s);const i=this._crossProduct(s,this._sub(r,e));this._rightPerpendicular(s),o=[r[0]+s[0]*i*2,r[1]+s[1]*i*2]}const a=this._sub(t,n);let h,l;h=this._crossProduct(a,this._sub(r,n))>0?this._rightPerp(a):this._leftPerp(a),l=[],l.push(r),l.push(n),l.push([n[0]+(h[0]-a[0])/3,n[1]+(h[1]-a[1])/3]),e.push(l),h=this._crossProduct(a,this._sub(o,t))>0?this._rightPerp(a):this._leftPerp(a),l=[],l.push([t[0]+(h[0]+a[0])/3,t[1]+(h[1]+a[1])/3]),l.push(t),l.push(o),e.push(l);break}case"GapExtentWithDoubleTicks":{const t=this._cp2(s,0,2),r=this._cp3(s,t,0,1);let o;if(i>=4)o=s[3];else{const e=this._sub(t,n);o=this._add(r,e)}this._addAngledTicks(e,n,t,this._mid(r,o)),this._addAngledTicks(e,r,o,this._mid(n,t));break}case"GapExtentMidline":{const t=this._cp2(s,2,0),r=this._cp3(s,t,0,1);let o;if(i>=4)o=s[3];else{const e=this._sub(t,n);o=this._add(r,e)}const a=[];a.push(this._mid(n,r)),a.push(this._mid(t,o)),e.push(a);break}case"Chevron":{const t=this._cp2(s,-1,-1);let r;if(i>=3)r=s[2];else{const e=this._sub(t,n);this._leftPerpendicular(e),r=this._add(n,e)}e.push([t,this._makeCtrlPt(n),r]);break}case"PerpendicularWithArc":{const t=this._cp2(s,0,-2),r=this._cp3(s,t,.5,-1),o=this._sub(t,n),a=this._norm(o);o[0]/=a,o[1]/=a;const h=this._crossProduct(o,this._sub(r,n));let l=this._dotProduct(o,this._sub(r,n));l<.05*a?l=.05*a:l>.95*a&&(l=.95*a);const c=[n[0]+o[0]*l,n[1]+o[1]*l];let u=this._leftPerp(o),_=[];if(_.push([c[0]-u[0]*h,c[1]-u[1]*h]),_.push([c[0]+u[0]*h,c[1]+u[1]*h]),e.push(_),i>=4){const t=s[3];let i=this._dotProduct(o,this._sub(t,n));i<.1*a?i=.1*a:i>.9*a&&(i=.9*a);const r=[n[0]+o[0]*i,n[1]+o[1]*i],h=this._crossProduct(o,this._sub(t,n)),l=[];l.push([r[0]-u[0]*h,r[1]-u[1]*h]),l.push([r[0]+u[0]*h,r[1]+u[1]*h]),e.push(l)}const f=[t[0]+u[0]*h,t[1]+u[1]*h];u=this._sub(t,f);const p=Math.cos(Math.PI/18);let d=Math.sin(Math.PI/18);h<0&&(d=-d),_=[n,t];for(let t=1;t<=9;t++)this._rotateDirect(u,p,d),_.push(this._add(f,u));e.push(_);break}case"ClosedHalfCircle":{const t=this._cp2(s,2,0),i=this._mid(n,t),r=this._sub(t,i),o=Math.cos(Math.PI/18),a=Math.sin(Math.PI/18),h=[n,t];for(let t=1;t<=18;t++)this._rotateDirect(r,o,a),h.push(this._add(i,r));e.push(h);break}case"TripleParallelExtended":{const t=this._cp2(s,0,-2),i=this._cp3(s,t,1,-2),r=this._mid(n,t),o=this._sub(i,t);this._normalize(o);const a=Math.abs(this._crossProduct(o,this._sub(r,t)))/2,l=this._dist(t,i),c=[t,n];c.push([n[0]+o[0]*l*.5,n[1]+o[1]*l*.5]),e.push(c);const u=[];u.push([r[0]-o[0]*a,r[1]-o[1]*a]),u.push([r[0]+o[0]*l*.375,r[1]+o[1]*l*.375]),h(u[u.length-1],1),u.push([r[0]+o[0]*l*.75,r[1]+o[1]*l*.75]),e.push(u);const _=[t,i];e.push(_);break}case"ParallelWithTicks":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(i,t);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r),this._addAngledTicks(e,n,t,i),this._addAngledTicks(e,this._mix(n,1,r,o),this._mix(t,1,r,o),this._mid(n,t));break}case"Parallel":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(t,n);this._normalize(r);const o=this._leftPerp(r),a=this._crossProduct(r,this._sub(i,n));let h=[n,t];e.push(h),h=[],h.push([n[0]+o[0]*a,n[1]+o[1]*a]),h.push([t[0]+o[0]*a,t[1]+o[1]*a]),e.push(h);break}case"PerpendicularToFirstSegment":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._mid(n,t),o=this._sub(t,n);this._normalize(o);const a=this._crossProduct(o,this._sub(i,n));this._leftPerpendicular(o);const h=[];h.push([r[0]-o[0]*a*.25,r[1]-o[1]*a*.25]),h.push([r[0]+o[0]*a*1.25,r[1]+o[1]*a*1.25]),e.push(h);break}case"ParallelOffset":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(t,n);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r);const a=[];a.push([n[0]-r[0]*o,n[1]-r[1]*o]),a.push([t[0]-r[0]*o,t[1]-r[1]*o]),e.push(a);const h=[];h.push([n[0]+r[0]*o,n[1]+r[1]*o]),h.push([t[0]+r[0]*o,t[1]+r[1]*o]),e.push(h);break}case"OffsetOpposite":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(t,n);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r);const a=[];a.push([n[0]-r[0]*o,n[1]-r[1]*o]),a.push([t[0]-r[0]*o,t[1]-r[1]*o]),e.push(a);break}case"OffsetSame":{const t=this._cp2(s,3,0),i=this._cp3(s,t,.5,-1),r=this._sub(t,n);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r);const a=[];a.push([n[0]+r[0]*o,n[1]+r[1]*o]),a.push([t[0]+r[0]*o,t[1]+r[1]*o]),e.push(a);break}case"CircleWithArc":{let t=this._cp2(s,3,0);const r=this._cp3(s,t,.5,-1);let o,a;if(i>=4)o=s[3],a=this._crossProduct(this._sub(o,t),this._sub(r,t))>0;else{o=t,a=this._crossProduct(this._sub(o,n),this._sub(r,n))>0;const e=24*this._geomUnitsPerPoint,s=this._sub(o,n);this._normalize(s,e);const i=Math.sqrt(2)/2;this._rotateDirect(s,i,a?i:-i),t=this._add(n,s)}const l=this._sub(t,n),c=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18),_=[t];for(let t=1;t<=36;t++)this._rotateDirect(l,c,u),_.push(this._add(n,l));this._add90DegArc(_,t,o,r,a),h(_[_.length-8],1),e.push(_);break}case"DoubleJog":{let t,r=this._cp2(s,-3,1),o=this._cp3(s,r,-1,-.5);if(i>=4)t=s[3];else{const e=n;n=r,t=o;const s=this._dist(n,e),i=this._dist(t,e);let a=30*this._geomUnitsPerPoint;.5*s<a&&(a=.5*s),.5*i<a&&(a=.5*i),r=this._mix(n,a/s,e,(s-a)/s),o=this._mix(t,a/i,e,(i-a)/i)}const a=this._mid(n,r),h=this._mid(t,o),l=this._dist(n,r),c=this._dist(o,t);let u=Math.min(l,c)/8;u=Math.min(u,24*this._geomUnitsPerPoint);const _=Math.cos(Math.PI/4);let f=this._sub(n,r);this._normalize(f,u),this._crossProduct(f,this._sub(t,r))>0?this._rotateDirect(f,_,-_):this._rotateDirect(f,_,_);let p=[];p.push(r),p.push(this._add(a,f)),p.push(this._sub(a,f)),p.push(n),e.push(p),f=this._sub(t,o),this._normalize(f,u),this._crossProduct(f,this._sub(n,o))<0?this._rotateDirect(f,_,_):this._rotateDirect(f,_,-_),p=[],p.push(o),p.push(this._add(h,f)),p.push(this._sub(h,f)),p.push(t),e.push(p);break}case"PerpendicularOffset":{const t=this._cp2(s,-4,1),i=this._cp3(s,t,.882353,-1.94),r=this._sub(i,t);this._crossProduct(r,this._sub(n,t))>0?this._rightPerpendicular(r):this._leftPerpendicular(r);const o=[r[0]/8,r[1]/8],a=this._sub(this._mid(t,i),o);e.push([a,n]);break}case"LineExcludingLastSegment":{const t=this._arrowPath(s),i=[];let n=t.length-2;for(;n--;)i.push(t[n]);e.push(i);break}case"MultivertexArrow":{const t=this._arrowPath(s),i=[];this._addArrow(i,t,!1),e.push(i);break}case"CrossedArrow":{const t=this._arrowPath(s),i=[];this._addArrow(i,t,!0),e.push(i);break}case"ChevronArrow":{const[t,i]=this._arrowLastSeg(s),r=10*this._geomUnitsPerPoint,o=this._sub(n,t),a=this._norm(o);this._normalize(o);const h=this._crossProduct(o,this._sub(i,t));let l=this._dotProduct(o,this._sub(i,t));l<.05*a?l=.05*a:l>.95*a-r&&(l=.95*a-r);const c=[t[0]+o[0]*l,t[1]+o[1]*l],u=this._leftPerp(o),_=[];_.push([c[0]+u[0]*h+o[0]*r,c[1]+u[1]*h+o[1]*r]),_.push(n),_.push([c[0]-u[0]*h+o[0]*r,c[1]-u[1]*h+o[1]*r]),e.push(_);break}case"ChevronArrowOffset":{const[t,i]=this._arrowLastSeg(s),r=this._sub(n,t),o=this._norm(r);this._normalize(r);const a=this._crossProduct(r,this._sub(i,t));let h=this._dotProduct(r,this._sub(i,t));h<.05*o?h=.05*o:h>.95*o&&(h=.95*o);const l=[t[0]+r[0]*h,t[1]+r[1]*h];this._leftPerpendicular(r);const c=[];c.push([l[0]+r[0]*a*.5,l[1]+r[1]*a*.5]),c.push(this._mid(l,n)),c.push([l[0]-r[0]*a*.5,l[1]-r[1]*a*.5]),e.push(c);break}case"PartialFirstSegment":{const[t,i]=this._arrowLastSeg(s),r=this._sub(n,t),o=this._norm(r);this._normalize(r);let a=this._dotProduct(r,this._sub(i,t));a<.05*o?a=.05*o:a>.95*o&&(a=.95*o);const h=[t[0]+r[0]*a,t[1]+r[1]*a];e.push([t,h]);break}case"Arch":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,1),r=this._sub(n,t),o=this._mix(i,1,r,.55),a=this._mix(i,1,r,-.55),h=[n];this._addBezier2(h,n,o,i,4),this._addBezier2(h,i,a,t,4),e.push(h);break}case"CurvedParallelTicks":{const t=this._cp2(s,-4,1),i=this._cp3(s,t,.882353,-1.94),r=this._sub(i,t);this._crossProduct(r,this._sub(n,t))>0?this._rightPerpendicular(r):this._leftPerpendicular(r);const o=[r[0]/8,r[1]/8],a=this._sub(this._mid(t,i),o),h=this._sub(this._mix(t,.75,i,.25),o),l=this._sub(this._mix(t,.25,i,.75),o),c=[t];this._addBezier2(c,t,h,a,3),this._addBezier2(c,a,l,i,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,[r[0]/4,r[1]/4])),e.push(i)}break}case"Arc90Degrees":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,1),r=[t];this._add90DegArc(r,t,n,i),e.push(r);break}case"TipWithPerpendicularAndTicks":{const[t,i]=this._arrowLastSeg(s),r=10*this._geomUnitsPerPoint,o=this._sub(n,t),a=this._norm(o);this._normalize(o);let h=this._crossProduct(o,this._sub(i,t)),l=this._dotProduct(o,this._sub(i,t));l<.05*a?l=.05*a:l>.95*a-r&&(l=.95*a-r);const c=this._leftPerp(o),u=[n[0]-o[0]*r,n[1]-o[1]*r],_=.5*Math.max(a-l-r,r);h=Math.abs(h);const f=[];f.push([u[0]+c[0]*(h+_)-o[0]*_,u[1]+c[1]*(h+_)-o[1]*_]),f.push([u[0]+c[0]*h,u[1]+c[1]*h]),f.push([u[0]-c[0]*h,u[1]-c[1]*h]),f.push([u[0]-c[0]*(h+_)-o[0]*_,u[1]-c[1]*(h+_)-o[1]*_]),e.push(f),e.push([u,n]);break}case"ConcentricCircles":{const t=this._cp2(s,1,0),r=this._cp3(s,t,2,0),o=Math.cos(Math.PI/18),a=Math.sin(Math.PI/18);let l=this._dist(t,n),c=[l,0],u=[];for(let t=0;t<=36;t++)u.push(this._add(n,c)),this._rotateDirect(c,o,a);if(e.push(u),i>=4){u=[];const t=s[3];l=this._dist(t,n),c=[l,0];for(let t=0;t<=36;t++)u.push(this._add(n,c)),0===t&&(u.push(this._add(n,c)),h(u[1],1)),this._rotateDirect(c,o,a);e.push(u)}u=[],l=this._dist(r,n),c=[l,0];for(let t=0;t<=36;t++)u.push(this._add(n,c)),this._rotateDirect(c,o,a);e.push(u);break}case"DoubleJogArrow":{n=this._arrowPath(s)[0];const[t,i]=this._arrowLastSeg(s),r=this._sub(n,t),o=this._norm(r);this._normalize(r);const a=Math.abs(this._crossProduct(r,this._sub(i,n)));let h=Math.abs(this._dotProduct(r,this._sub(i,n)));h<.05*o?h=.05*o:h>.95*o&&(h=.95*o);const l=Math.max(a,h),c=this._leftPerp(r);let u=[];const _=[n[0]-r[0]*h*.5+c[0]*a*.5,n[1]-r[1]*h*.5+c[1]*a*.5];u.push([_[0],_[1]]),_[0]+=r[0]*l*.5+c[0]*l*.4,_[1]+=r[1]*l*.5+c[1]*l*.4,u.push([_[0],_[1]]),_[0]-=c[0]*l*.25,_[1]-=c[1]*l*.25,u.push([_[0],_[1]]),_[0]+=r[0]*l*.5+c[0]*l*.4,_[1]+=r[1]*l*.5+c[1]*l*.4,u.push([_[0],_[1]]),e.push(u),u=[],_[0]=n[0]-r[0]*h*.5-c[0]*a*.5,_[1]=n[1]-r[1]*h*.5-c[1]*a*.5,u.push([_[0],_[1]]),_[0]+=r[0]*l*.5-c[0]*l*.4,_[1]+=r[1]*l*.5-c[1]*l*.4,u.push([_[0],_[1]]),_[0]+=c[0]*l*.25,_[1]+=c[1]*l*.25,u.push([_[0],_[1]]),_[0]+=r[0]*l*.5-c[0]*l*.4,_[1]+=r[1]*l*.5-c[1]*l*.4,u.push([_[0],_[1]]),e.push(u);break}case"LinkedChevrons":{const t=this._cp2(s,-5,0),i=this._cp3(s,t,-.2,1),r=this._sub(n,t);this._normalize(r);const o=this._leftPerp(r),a=Math.abs(this._crossProduct(r,this._sub(i,t)));e.push([t,n]);const h=[];h.push([n[0]-r[0]*a+o[0]*a,n[1]-r[1]*a+o[1]*a]),h.push(n),h.push([n[0]-r[0]*a-o[0]*a,n[1]-r[1]*a-o[1]*a]),e.push(h),this._addDash(e,t,[-r[0]*a+o[0]*a,-r[1]*a+o[1]*a]),this._addDash(e,t,[-r[0]*a-o[0]*a,-r[1]*a-o[1]*a]);break}case"SegmentThenHalfCircle":{const t=this._cp2(s,2,0),r=this._cp3(s,t,1.5,0);let o;o=i>=4?s[3]:this._cp3(s,t,1.25,-.5);const a=this._sub(t,n);this._normalize(a);const h=.5*this._dist(t,r),l=this._crossProduct(a,this._sub(o,n))>0,c=Math.cos(Math.PI/18);let u=Math.sin(Math.PI/18);l&&(u=-u);const _=[n,t];a[0]*=h,a[1]*=h;const f=this._add(t,a);a[0]=-a[0],a[1]=-a[1];for(let t=1;t<=18;t++)this._rotateDirect(a,c,u),_.push(this._add(f,a));e.push(_);break}case"LineWithStraightTicks":{const t=this._cp2(s,-2,1),i=this._cp3(s,t,-1,-.5),r=this._sub(i,t);this._normalize(r);const o=this._dotProduct(r,this._sub(t,n)),a=this._dotProduct(r,this._sub(i,n));let h=[n];h.push([n[0]+r[0]*o,n[1]+r[1]*o]),h.push(t),e.push(h),h=[n],h.push([n[0]+r[0]*a,n[1]+r[1]*a]),h.push(i),e.push(h);break}case"DoubleCurve":{const t=this._cp2(s,-5,-1),i=this._cp3(s,t,2,0),r=Math.atan2(1,5),o=Math.cos(r),a=Math.sin(r),l=this._sub(t,n),c=this._dist(n,t);this._normalize(l),this._rotateDirect(l,o,-a);const u=[n];u.push([n[0]+l[0]*c*.5,n[1]+l[1]*c*.5]),h(u[1],1),u.push([n[0]+l[0]*c*.8,n[1]+l[1]*c*.8]),this._addBezier2(u,u[2],[n[0]+l[0]*c,n[1]+l[1]*c],t,3);const _=this._sub(i,t),f=this._dist(t,i);this._normalize(_),this._rotateDirect(_,o,-a),this._addBezier2(u,t,[i[0]-_[0]*f,i[1]-_[1]*f],[i[0]-_[0]*f*.8,i[1]-_[1]*f*.8],3),u.push(i),e.push(u);break}case"ParallelWithTicksByWidth":{const t=this._cp2(s,0,-1),i=this._cp3(s,t,.5,3),r=this._sub(t,n);this._normalize(r);const o=this._crossProduct(r,this._sub(i,n));this._leftPerpendicular(r),o>0?(this._addAngledTicks(e,n,[n[0]+r[0]*o,n[1]+r[1]*o],t),this._addAngledTicks(e,t,[t[0]+r[0]*o,t[1]+r[1]*o],n)):(this._addAngledTicks(e,[n[0]+r[0]*o,n[1]+r[1]*o],n,t),this._addAngledTicks(e,[t[0]+r[0]*o,t[1]+r[1]*o],n,t));break}case"EnclosingRoundedRectangle":{const t=this._cp2(s,3,-2),e=[Math.min(n[0],t[0]),Math.max(n[1],t[1])],i=[Math.max(n[0],t[0]),Math.min(n[1],t[1])],r=i[0]-e[0],o=e[1]-i[1],a=Math.min(r,o)/10,h=[];h.push([e[0]+a+.75*(r-2*a),e[1]]),h.push([i[0]-a,e[1]]),this._add90DegArc(h,[i[0]-a,e[1]],[i[0],e[1]-a],[i[0],e[1]]),h.push([i[0],i[1]+a]),this._add90DegArc(h,[i[0],i[1]+a],[i[0]-a,i[1]],i),h.push([e[0]+a,i[1]]),this._add90DegArc(h,[e[0]+a,i[1]],[e[0],i[1]+a],[e[0],i[1]]),h.push([e[0],e[1]-a]),this._add90DegArc(h,[e[0],e[1]-a],[e[0]+a,e[1]],e),h.push([e[0]+a+.75*(r-2*a),e[1]]);break}default:e.push(s)}}return e}}class S{static{this.instance=null}static local(){return null===S.instance&&(S.instance=new S),S.instance}execute(t,e,s){return new C(t,e,s)}}class C extends c{constructor(t,e,s){super(t,!0,!0),this._curveHelper=new _,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{_beginCut:e,_endCut:s,_middleCut:i}=this,n=t.pathLength(),o=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._invert){if(0!==e||0!==s||0!==i)if(e+s+i>=n)for(o.startPath();t.nextPoint();)o.pushXY(t.x,t.y);else this._curveHelper.appendSubCurve(o,t,0,e),this._curveHelper.appendSubCurve(o,t,.5*(n-i),.5*(n+i)),this._curveHelper.appendSubCurve(o,t,n-s,s)}else if(0===e&&0===s&&0===i)for(o.startPath();t.nextPoint();)o.pushXY(t.x,t.y);else e+s+i<n&&(0===i?this._curveHelper.appendSubCurve(o,t,e,n-s):(this._curveHelper.appendSubCurve(o,t,e,.5*(n-i)),this._curveHelper.appendSubCurve(o,t,.5*(n+i),n-s)));return 0===o.totalSize?null:o}}class w{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=!0){if(this._setEmpty(),!t||0===t.length)return!1;for(let s=0;s<t.length;s++){let i=Math.abs(t[s]);e&&i<1e-7&&(i=1e-7),this._values.push(i),this._length+=i}return 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}}class k{constructor(){this.pt=null,this.ca=0,this.sa=0}}class I{constructor(){this.reset()}reset(){this.segment=null,this.segmentLength=0,this.abscissa=0,this.isPathEnd=!1,this.isPartEnd=!1}isValid(){return null!==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 z extends _{constructor(t=0,e=!1){super(t,e),this._tempPos=new I,this._tempPt=[0,0],this._tolerance=u,this._currentPosition=new I}updateTolerance(t){this._tolerance=u*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._pathCursor=t,this._seg=-1,this._setPosAtNextPart()}curPositionIsValid(){return this._currentPosition.isValid()}nextPosition(t,e=0){const s=new I;return!!this._nextPosition(t,s,null,e)&&(s.copyTo(this._currentPosition),!0)}curPointAndAngle(t){t.pt=this._getPoint(this._currentPosition);const[e,s]=this._getAngleCS(this._tempPt,this._currentPosition);t.ca=e,t.sa=s}nextPointAndAngle(t,e,s=0){const i=this._tempPos;if(!this._nextPosition(t,i,null,s))return!1;i.copyTo(this._currentPosition),e.pt=this._getPoint(i);const[n,r]=this._getAngleCS(this._tempPt,i);return e.ca=n,e.sa=r,!0}nextCurve(t){if(0===t)return null;const e=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");e.startPath(),e.nextPath();const s=new I;return this._nextPosition(t,s,e,1)?(s.copyTo(this._currentPosition),e):null}isPathEnd(){return this._currentPosition.isPathEnd}getPathEnd(){return this._currentPosition.segment[1]}getPt(t){return this._pathCursor.seekInPath(t),[this._pathCursor.x,this._pathCursor.y]}getSeg(t){return[this.getPt(t),this.getPt(t+1)]}_nextPosition(t,e,s,i){if(this._currentPosition.isPathEnd)return!1;let n=this._currentPosition.abscissa;for(this._currentPosition.segmentLength>0&&(n/=this._currentPosition.segmentLength),this._currentPosition.copyTo(e);e.abscissa+t*this._partLengthRatio>e.segmentLength+this._tolerance;){if(s){if(0===s.pathSize)if(0===n){const t=e.segment[0];s.pushXY(t[0],t[1])}else s.pushPoint(this.getSegCoord2D(e.segment,n));const t=e.segment[1];s.pushXY(t[0],t[1])}if(n=0,t-=(e.segmentLength-e.abscissa)/this._partLengthRatio,this._partSegCount)e.segment=this._nextSegment(),e.segmentLength=this.getSegLength(e.segment),e.abscissa=0,this._partSegCount--;else{if(!this._setPosAtNextPart())return 0!==i&&(e.segmentLength=this.getSegLength(e.segment),e.isPartEnd=!0,1===i?(e.abscissa=e.segmentLength,e.isPathEnd=!0):e.abscissa=e.segmentLength+t,!0);this._currentPosition.copyTo(e)}}if(e.abscissa+=t*this._partLengthRatio,s){0===s.pathSize&&(0===n?s.pushPoint(e.segment[0]):s.pushPoint(this.getSegCoord2D(e.segment,n)));const t=e.abscissa/e.segmentLength;1===t?s.pushPoint(e.segment[1]):s.pushPoint(this.getSegCoord2D(e.segment,t))}return this._partSegCount||Math.abs(e.abscissa-e.segmentLength)<this._tolerance&&(e.isPathEnd=this._partIsLast,e.isPartEnd=!0),!0}_getPoint(t){const e=t.segmentLength<=0?0:t.abscissa/t.segmentLength;return this.getSegCoord2D(this._currentPosition.segment,e)}_getAngleCS(t,e){const s=e.segmentLength<=0?0:e.abscissa/e.segmentLength;return this.getSegAngleCS(t,this._currentPosition.segment,s)}_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.getSegLength(this._nextSegment()),this._partSegCount++,this._pathCursor.getControlPointAt(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.getSegLength(this._currentPosition.segment),this._currentPosition.abscissa=0,this._currentPosition.isPathEnd=this._currentPosition.isPartEnd=!1,--this._partSegCount;const e=this._getStartPointIndex();this._ctrlPtBegin=this._pathCursor.getControlPointAt(e);let s=e+this._partSegCount+1;if(s>=this._pathCursor.pathSize&&(s=0),this._ctrlPtEnd=this._pathCursor.getControlPointAt(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._pathCursor.pathSize-2}_previousSegment(){return this.getSeg(--this._seg)}_nextSegment(){return this.getSeg(++this._seg)}_getStartPointIndex(){return this._seg}_getEndPointIndex(){return this._seg+1}}var v=s(93397);class T{static{this.instance=null}static local(){return null===T.instance&&(T.instance=new T),T.instance}execute(t,e,s){return new A(t,e,s)}}class A extends c{constructor(t,e,s){super(t,!0,!0),this._firstCurve=null,this._walker=new z,this._walker.updateTolerance(s),this._endings=e.lineDashEnding??"NoConstraint",this._customDashPos=-(e.offsetAlongLine??0)*s,this._offsetAtEnd=(e.customEndingOffset??0)*s;let i=(0,v.FH)(e).dashTemplate;null==i&&(i=[]),i.length%2&&(i=[...i,...i]);let n=0;for(;n<i.length&&0===i[n];)n++;let r=0;const o=[];for(let t=n;t<i.length;t++)0===i[t]?r++:0===r?o.push(i[t]):1&r?(o[o.length-1]+=i[t],r=0):(o.push(i[t]),r=0);i=o,i.length<=1?i=0===i.length||n%2==0?[]:[-1]:i.length%2==1?n%2==1?i.unshift(0):i.push(0):n%2==1&&(i.unshift(0),i.push(0)),this._pattern=new w,this._pattern.init(i,!1),this._pattern.scale(s)}processPath(t){if(this._pattern.size()%2==1)return null;if(0===this._pattern.length()){this.iteratePath=!1;const e=(0,o.A)(t);return r.z.fromJSONCIM({paths:[e]})}if(!this.iteratePath){let e=!0;switch(this._endings){case"HalfPattern":case"HalfGap":default:this._pattern.extPtGap=0;break;case"FullPattern":this.isClosed||(this._pattern.extPtGap=.5*this._pattern.firstValue());break;case"FullGap":this.isClosed||(this._pattern.extPtGap=.5*this._pattern.lastValue());break;case"NoConstraint":this.isClosed||(e=!1);break;case"Custom":this.isClosed||(this._pattern.extPtGap=.5*this._offsetAtEnd)}const s=t.pathLength();if(this._pattern.isEmpty()||s<.1*this._pattern.length()){const e=(0,o.A)(t);return r.z.fromJSONCIM({paths:[e]})}if(!this._walker.init(t,this._pattern,e)){const e=(0,o.A)(t);return r.z.fromJSONCIM({paths:[e]})}}let e;if(this.iteratePath)e=this._pattern.nextValue();else{let t;switch(this._endings){case"HalfPattern":default:t=.5*this._pattern.firstValue();break;case"HalfGap":t=.5*-this._pattern.lastValue();break;case"FullGap":t=-this._pattern.lastValue();break;case"FullPattern":t=0;break;case"NoConstraint":case"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())}0===e&&(e=this._pattern.nextValue(),this._walker.nextPosition(e),e=this._pattern.nextValue());let s=this._walker.nextCurve(e);if(s)if(this._walker.isPathEnd()){if(this.iteratePath=!1,this._firstCurve){for(this._firstCurve.nextPath();this._firstCurve.nextPoint();)s.pushXY(this._firstCurve.x,this._firstCurve.y);this._firstCurve=null}}else e=this._pattern.nextValue(),!this._walker.nextPosition(e)||this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(s.pushCursor(this._firstCurve),this._firstCurve=null)):this.iteratePath=!0;else this.iteratePath=!1,s=this._firstCurve,this._firstCurve=null;return s?.reset(),s}}class L{static{this.instance=null}static local(){return null===L.instance&&(L.instance=new L),L.instance}execute(t,e,s,i,n,r){return new E(t,e,s,i,n,r)}}class E{constructor(t,e,s,i,n,r){this._preventClipping=r,this._inputGeometries=t,this._tileKey=i,this._maxInflateSize=n*s,this._width=(void 0!==e.width?e.width:2)*s,e.method,this._option=e.option??"Accurate"}next(){let t;for(;t=this._inputGeometries.next();){if("esriGeometryEnvelope"===t.geometryType&&this._width>0){const e=t.asJSON();return Math.min(e.xmax-e.xmin,e.ymax-e.ymin)-2*this._width<0?t:r.z.fromJSONCIM({paths:[[[e.xmin+this._width,e.ymin+this._width],[e.xmax-this._width,e.ymin+this._width],[e.xmax-this._width,e.ymax-this._width],[e.xmin+this._width,e.ymax-this._width],[e.xmin+this._width,e.ymin+this._width]],[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}if("esriGeometryPolygon"===t.geometryType){if(0===this._width)return t.clone();const e=g.$Z.module,s=!this._preventClipping&&this._tileKey?(0,g.qc)(t,this._maxInflateSize,!0):t.clone();if(!s)continue;const i={...s.asJSON(),spatialReference:{wkid:m.A.WebMercator.wkid}},n=e.execute(i,-this._width);if(n)for(const t of n.rings)if(t){s.startPath();for(const e of t.reverse())s.pushXY(e[0],s.yFactor*e[1])}return s}}return null}}var R=s(537);class G{static{this.instance=null}static local(){return null===G.instance&&(G.instance=new G),G.instance}execute(t,e){return new N(t,e)}}class N{constructor(t,e){this._inputGeometries=t,this._medhod=e.method}next(){let t=this._inputGeometries.next();const e=this._medhod;for(;null!=t;){if(t.totalSize>0)switch(e){case"RectangularBox":return O(t);case"ConvexHull":return this._constructConvexHull(t);default:return F(t)}t=this._inputGeometries.next()}return null}_constructConvexHull(t){switch(t.geometryType){case"esriGeometryPolyline":case"esriGeometryPolygon":{const e=g.lX.module,s={...t.asJSON(),spatialReference:{wkid:m.A.WebMercator.wkid}},i=e.execute(s);return i?r.z.fromJSONCIM(i):null}case"esriGeometryEnvelope":return t;default:return null}}}function O(t){const e=(0,R.z8)(t),s={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]};return r.z.fromJSONCIM(s)}function F(t){switch(t.geometryType){case"esriGeometryPolyline":{const e=[];for(;t.nextPath();)D(t,e);return r.z.fromJSONCIM({rings:e})}case"esriGeometryPolygon":case"esriGeometryEnvelope":return t;default:return null}}function D(t,e){if(t.seekPathStart(),!t.nextPoint())return;const s=t.x,i=t.y,n=[[s,i]];for(e.push(n);t.nextPoint();)n.push([t.x,t.y]);n.push([s,i])}class X{static{this.instance=null}static local(){return null===X.instance&&(X.instance=new X),X.instance}execute(t,e,s){return new Y(t,e,s)}}class Y extends c{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new _,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){const e=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._curveHelper.isEmpty(t))return null;t.seekInPath(0);const s=t.x,i=t.y;t.seekInPath(t.pathSize-1);const n=t.x,o=t.y,a=[n-s,o-i];this._curveHelper.normalize(a);const h=s+(n-s)*this._position/100,l=i+(o-i)*this._position/100,c=Math.cos((90-this._angle)/180*Math.PI);let u=Math.sin((90-this._angle)/180*Math.PI);this._mirror&&(u=-u),this._mirror=!this._mirror;const _=[h-this._length/2*c,l-this._length/2*u],f=[h+this._length/2*c,l+this._length/2*u];return e.pushPath([[s,i],_,f,[n,o]]),e}}class H{static{this.instance=null}static local(){return null===H.instance&&(H.instance=new H),H.instance}execute(t,e,s){return new W(t,e,s)}}class W{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(t.totalSize>0)return this._move(t.clone(),this._offsetX,this._offsetY);t=this._inputGeometries.next()}return null}_move(t,e,s){for(;t.nextPath();)for(;t.nextPoint();)t.x=t.x+e,t.y=t.y+s;return t.reset(),t}}var B=s(60408);class U{static{this.instance=null}static local(){return null===U.instance&&(U.instance=new U),U.instance}execute(t,e,s,i,n,r){return new V(t,e,s,i,n,r)}}class V{constructor(t,e,s,i,n,r){this._preventClipping=r,this._inputGeometries=t,this._tileKey=i,this._curveHelper=new _,this._offset=(e.offset??1)*s,this._method=e.method??"Square",this._maxInflateSize=Math.max(Math.abs(n*s),10),this._option=e.option||"Fast",this._offsetFlattenError=u*s}next(){let t;for(;t=this._inputGeometries.next();){if(0===this._offset)return t.clone();if("esriGeometryEnvelope"===t.geometryType){if("Rounded"===this._method&&this._offset>0){const e=(0,o.A)(t),s=this._curveHelper.offset(e,-this._offset,this._method,4,this._offsetFlattenError);if(s){const e=r.z.createEmptyOptimizedCIM(t.geometryType);return e.pushPath(s),e}return null}const e=t.asJSON();if((0,B.ZC)(e)&&Math.min(e.xmax-e.xmin,e.ymax-e.ymin)+2*this._offset>0)return r.z.fromJSONCIM({xmin:e.xmin-this._offset,xmax:e.xmax+this._offset,ymin:e.ymin-this._offset,ymax:e.ymax+this._offset})}const e=!this._preventClipping&&this._tileKey?(0,g.qc)(t,this._maxInflateSize,!0):t.clone();if(!e)continue;const s=g.mO.module,i=g.hd.module,n={...e.asJSON(),spatialReference:{wkid:m.A.WebMercator.wkid}};let a,h=$(this._method);return"esriGeometryPolygon"===t.geometryType&&this._offset>0?("square"===h&&(h="bevel"),a=i.executeMany([n],[this._offset],h,"round")[0]):a=s.execute(n,-this._offset,{joins:h,flattenError:this._offsetFlattenError,miterLimit:4}),a?r.z.fromJSONCIM(a):null}return null}}function $(t){switch(t){case"Rounded":return"round";case"Bevelled":return"bevel";case"Mitered":return"miter";case"Square":return"square"}}var q=s(12359),J=s(28076);class Z{static{this.instance=null}static local(){return null===Z.instance&&(Z.instance=new Z),Z.instance}execute(t,e,s){return new j(t,e,s)}}class j{constructor(t,e,s){this._inputGeometries=t,this._length=(void 0!==e.length?e.length:J.D.CIMGeometricEffectRadial.length)*s,this._angle=void 0!==e.angle?e.angle*Math.PI/180:J.D.CIMGeometricEffectRadial.angle,this._lx=Math.cos(this._angle)*this._length,this._ly=Math.sin(this._angle)*this._length}next(){let t=this._inputGeometries.next();for(;t;){if("esriGeometryPoint"===t.geometryType||"esriGeometryMultipoint"===t.geometryType){const e=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");return t.nextPath()&&t.nextPoint()&&e.pushPath([[t.x,t.y],[t.x+this._lx,t.y+this._ly]]),e}if("esriGeometryPolygon"===t.geometryType){const e=(0,q.IK)(t);if(!e)return null;const s=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");return s.pushPath([[e[0],e[1]],[e[0]+this._lx,e[1]+this._ly]]),s}t=this._inputGeometries.next()}return null}}class K{static{this.instance=null}static local(){return null===K.instance&&(K.instance=new K),K.instance}execute(t,e,s){return new Q(t,e,s)}}class Q{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("esriGeometryPolyline"===t.geometryType)return tt(t.clone());t=this._inputGeometries.next()}return null}}function tt(t){for(;t.nextPath();)for(let e=0;e<t.pathSize/2;e++){t.seekInPath(e);const s=t.x,i=t.y;t.seekInPath(t.pathSize-e-1);const n=t.x,r=t.y;t.x=s,t.y=i,t.seekInPath(e),t.x=n,t.y=r}return t.reset(),t}class et{static{this.instance=null}static local(){return null===et.instance&&(et.instance=new et),et.instance}execute(t,e,s){return new st(t,e,s)}}class st{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||"esriGeometryPoint"===t.geometryType)return t;if(t.totalSize>0){const e=(0,R.z8)(t),s=(e[2]+e[0])/2,i=(e[3]+e[1])/2;return t.reset(),this._rotate(t.clone(),s,i)}t=this._inputGeometries.next()}return null}_rotate(t,e,s){const i=Math.cos(this._rotateAngle),n=Math.sin(this._rotateAngle);for(;t.nextPath();)for(;t.nextPoint();){const r=t.x-e,o=t.y-s;t.x=e+r*i-o*n,t.y=s+r*n+o*i}return t.reset(),t}}class it{static{this.instance=null}static local(){return null===it.instance&&(it.instance=new it),it.instance}execute(t,e,s){return new nt(t,e,s)}}class nt{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(){const t=this._inputGeometries.next();if(t){if(1===this._xFactor&&1===this._yFactor)return t;if("esriGeometryPoint"===t.geometryType)return t;if(t.totalSize>0){const e=(0,R.z8)(t),s=(e[2]+e[0])/2,i=(e[3]+e[1])/2;return t.reset(),this._scaleCursor(t.clone(),s,i)}}return null}_scaleCursor(t,e,s){for(;t.nextPath();)for(;t.nextPoint();)t.x=e+(t.x-e)*this._xFactor,t.y=s+(t.y-s)*this._yFactor;return t.reset(),t}}class rt{constructor(){this._polyline=[]}beginPath(t){this._polyline.push([t])}lineTo(t){if(0===this._polyline.length)throw new Error("No path started. Call beginPath first.");this._polyline[this._polyline.length-1].push(t)}getPointCount(){return this._polyline.reduce((t,e)=>t+e.length,0)}addSegment(t,e,s){s&&this.beginPath(t),this.lineTo(e)}getXY(t){let e=0;for(const s of this._polyline){if(t<e+s.length)return s[t-e];e+=s.length}return null}getGeometry(){return this._polyline}}class ot{static{this.instance=null}static local(){return null===ot.instance&&(ot.instance=new ot),ot.instance}execute(t,e,s){return new at(t,e,s)}}class at extends c{constructor(t,e,s){super(t,!1,!0),this._suppress=void 0!==e.suppress&&e.suppress,this._invert=void 0!==e.invert&&e.invert}processPath(t){if(t.totalSize<=0)return null;if(!this._suppress){const e=r.z.createEmptyOptimizedCIM("esriGeometryPolygon",!1,!1,t.yFactor);for(t.seekPathEnd();t.nextPoint();)e.pushXY(t.x,t.y);return e}const e=[],s=new Array(t.pathSize);let i=0;for(t.seekPathStart();t.nextPoint();)s[i++]=t.getControlPoint(),e.push([t.x,t.y]);let n=!0,o=!0,a=!1,h=!this._invert;i=0;const l=new rt;let c=e[0];for(;i<e.length-1;){const t=e[i+1],r=s[i],u=s[i+1];i++,o&&(h=r||u?this._invert:!this._invert,o=!1),h?(l.addSegment(c,t,n),n=!1):a=!0,c=t,u&&(h?(h=!1,n=!0):h=!0)}const u=l.getGeometry();if(0===u.length)return null;if(!a&&e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]){const t=u[u.length-1];return t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]||t.push([t[0][0],t[0][1]]),r.z.fromJSONCIM({paths:u})}const _=u[u.length-1];return l.getPointCount()>1&&"esriGeometryPolygon"===t.geometryType&&_[0][0]===_[_.length-1][0]&&_[0][1]===_[_.length-1][1]&&u.length>1&&(u[u.length-1].push(...u[0]),u.splice(0,1)),r.z.fromJSONCIM({paths:u})}}var ht=s(49186),lt=s(53966),ct=s(6774);const ut=()=>lt.A.getLogger("esri.symbols.cim.effects.EffectTaperedPolygon");class _t{static{this.instance=null}static local(){return null===_t.instance&&(_t.instance=new _t),_t.instance}execute(t,e,s){return new ft(t,e,s)}}class ft extends c{constructor(t,e,s){super(t,!1,!0),this._slopeS=0,this._slopeC=1,this._lastTangent1=new ct.bR(NaN,NaN),this._lastWidth=0,this._geomUnitsPerPoint=s,this._halfFromWidth=Math.abs(void 0!==e.fromWidth?e.fromWidth:0)*s*.5,this._halfToWidth=Math.abs(void 0!==e.toWidth?e.toWidth:1)*s*.5,this._originalLength=(void 0!==e.length?e.length:0)*s,this._length=0}processPath(t){if(t.totalSize<=0)return null;if(this._halfFromWidth<=0&&this._halfToWidth<=0){const e=r.z.createEmptyOptimizedCIM("esriGeometryPolygon",!1,!1,t.yFactor);for(t.seekPathEnd();t.prevPoint();)e.pushXY(t.x,t.y);for(t.seekPathStart();t.nextPoint();)e.pushXY(t.x,t.y);return e}const e=t.getCurrentPath().asJSON(),s=g.NS.module.execute(e,.25*this._geomUnitsPerPoint,{removeDegenerateParts:!0}),i=null==s?null:(0,B.Bi)(s)?s.rings:(0,B.Rg)(s)?s.paths:null;if(!i)return ut().error(new ht.A("mapview-bad-resource","Unable to process geometry")),null;const n=g.Xs.module.execute(s);if((0===this._originalLength||this._originalLength>n)&&n>0){this._length=n;const t=(this._halfToWidth-this._halfFromWidth)/this._length;if(Math.abs(t)<1){const e=t*t;this._slopeC=Math.sqrt(1/(1+e)),this._slopeS=Math.sqrt(e/(1+e)),t<0&&(this._slopeS=-this._slopeS)}else this._slopeC=this._slopeS=.7071}else this._length=this._originalLength,this._slopeC=1,this._slopeS=0;const o=[];for(const t of i){const e=new rt,s=new rt;let i=0;this._setFromOffset(t.slice(0,2),e,s);for(let n=0,r=3;r<=t.length;++n,++r)i=this._setOffset(t.slice(n,r),i,e,s);this._setToOffset(t.slice(-2),i,e,s);const[n]=e.getGeometry(),[r]=s.getGeometry();o.push([...n,...r.reverse()])}const a={rings:o,spatialReference:{wkid:m.A.WebMercator.wkid}},h=g.yM.module.execute(a);return r.z.fromJSONCIM(h)}_setFromOffset([[t,e],[s,i]],n,r){const o=this._halfFromWidth,a=new ct.bR(s-t,i-e).normalize().scale(o);n.beginPath([t-a.y,e+a.x]),r.beginPath([t+a.y,e-a.x])}_setToOffset([[t,e],[s,i]],n,r,o){let a;a=(n+=Math.sqrt((s-t)**2+(i-e)**2))>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*n/this._length;const h=new ct.bR(s-t,i-e).normalize().scale(a);r.lineTo([s-h.y,i+h.x]),o.lineTo([s+h.y,i-h.x])}_setOffset([[t,e],[s,i],[n,r]],o,a,h){const l=Math.sqrt((s-t)**2+(i-e)**2);let c;c=o+l>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*(o+l)/this._length,o+=l;const u=new ct.bR(s,i),_=new ct.bR(s-t,i-e).normalize(),f=new ct.bR(n-s,r-i).normalize(),p=ct.bR.sub(f,_),d=a.getPointCount(),m=h.getPointCount();_.leftPerpendicular(),f.leftPerpendicular();const g=_.x*f.x+_.y*f.y;if(g>.99){const t=ct.bR.add(_,f).scale(c/2),e=t.clone().rotate(this._slopeC,this._slopeS);a.lineTo([u.x+e.x,u.y+e.y]);const s=t.rotateReverse(this._slopeC,this._slopeS);h.lineTo([u.x-s.x,u.y-s.y])}else{const s=_.x*f.y-_.y*f.x;if(p.scale(1/s),s<0){p.scale(-c).rotateReverse(this._slopeC,this._slopeS);const t=h.getXY(m-1);t||ut().error(new ht.A("mapview-bad-resource","Unable to process geometry, index out of scope"));const e=ct.bR.add(u,p).sub(ct.bR.fromArray(t));if(_.x*e.y-_.y*e.x>0){const t=_.clone().scale(-c).rotateReverse(this._slopeC,this._slopeS),e=f.clone().scale(-c).rotateReverse(this._slopeC,this._slopeS);h.lineTo([u.x+t.x,u.y+t.y]),h.lineTo([u.x,u.y]),h.lineTo([u.x+e.x,u.y+e.y])}else h.lineTo([u.x+p.x,u.y+p.y])}else{p.scale(c).rotate(this._slopeC,this._slopeS);const t=a.getXY(d-1);t||ut().error(new ht.A("mapview-bad-resource","Unable to process geometry, index out of scope"));const e=ct.bR.add(u,p).sub(ct.bR.fromArray(t));if(_.x*e.y-_.y*e.x>0){const t=_.clone().scale(c).rotate(this._slopeC,this._slopeS),e=f.clone().scale(c).rotate(this._slopeC,this._slopeS);a.lineTo([u.x+t.x,u.y+t.y]),a.lineTo([u.x,u.y]),a.lineTo([u.x+e.x,u.y+e.y])}else a.lineTo([u.x+p.x,u.y+p.y])}const i=Math.acos(g);let n=1;if(c>.25){const t=2*Math.acos(1-.25/c);t<i&&(n=Math.round(i/t))}const r=Math.cos(i/n),o=Math.sin(i/n),l=_.clone();if(s<0){l.rotate(this._slopeC,this._slopeS);const s=a.getXY(d-1);s||ut().error(new ht.A("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=ct.bR.add(u,l.clone().scale(this._lastWidth)),n=ct.bR.sub(i,ct.bR.fromArray(s)),r=_.x*n.y-_.y*n.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const s=new ct.bR(t,e),i=this._lastTangent1.clone().scale(this._lastWidth);i.rotate(this._slopeC,this._slopeS);const n=_.clone().scale(this._lastWidth);n.rotate(this._slopeC,this._slopeS),a.lineTo([s.x+i.x,s.y+i.y]),a.lineTo([s.x,s.y]),a.lineTo([s.x+n.x,s.y+n.y])}}else{l.scale(-1).rotateReverse(this._slopeC,this._slopeS);const s=h.getXY(m-1);s||ut().error(new ht.A("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=ct.bR.add(u,l.clone().scale(this._lastWidth)),n=ct.bR.sub(i,ct.bR.fromArray(s)),r=_.x*n.y-_.y*n.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const s=new ct.bR(t,e),i=this._lastTangent1.clone().scale(-this._lastWidth);i.rotateReverse(this._slopeC,this._slopeS);const n=_.clone().scale(-this._lastWidth);n.rotateReverse(this._slopeC,this._slopeS),h.lineTo([s.x+i.x,s.y+i.y]),h.lineTo([s.x,s.y]),h.lineTo([s.x+n.x,s.y+n.y])}}l.scale(c);for(let t=0;t<=n;t++)s<0?(a.lineTo([u.x+l.x,u.y+l.y]),l.rotateReverse(r,o)):(h.lineTo([u.x+l.x,u.y+l.y]),l.rotate(r,o))}return this._lastTangent1.setCoords(_.x,_.y),this._lastWidth=c,o}}class pt{static{this.instance=null}static local(){return null===pt.instance&&(pt.instance=new pt),pt.instance}execute(t,e,s){return new dt(t,e,s)}}class dt{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??"Sinus",this._height<=0&&(this._height=Math.abs(this._height)),this._period<=0&&(this._period=Math.abs(this._period)),this._pattern=new w,this._pattern.addValue(this._period),this._pattern.addValue(this._period),this._walker=new z,this._walker.updateTolerance(s)}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._height||0===this._period)return t;const e=this._processGeom(t);if(e)return e;t=this._inputGeometries.next()}return null}_processGeom(t){const e=r.z.createEmptyOptimizedCIM(t.geometryType);for(;t.nextPath();){e.startPath();const s=t.pathLength();if(this._walker.init(t,this._pattern))switch(this._style){case"Sinus":default:this._constructCurve(e,s,!1);break;case"Square":this._constructSquare(e,s);break;case"Triangle":this._constructTriangle(e,s);break;case"Random":this._constructCurve(e,s,!0)}else for(;t.nextPoint();)e.pushXY(t.x,t.y)}return e}_constructCurve(t,e,s){let i=Math.round(e/this._period);0===i&&(i=1);const n=16*i+1,r=e/i,o=this._period/16,a=1/n,h=2*Math.PI*e/r,l=2*Math.PI*Math.random(),c=2*Math.PI*Math.random(),u=2*Math.PI*Math.random(),_=.75-Math.random()/2,f=.75-Math.random()/2,p=new k;this._walker.curPointAndAngle(p),t.pushPoint(p.pt);let d=0;for(;;){if(!this._walker.nextPointAndAngle(o,p)){t.pushPoint(this._walker.getPathEnd());break}{const e=d;let i;if(d+=a,s){const t=this._height/2*(1+.3*Math.sin(_*h*e+l));i=t*Math.sin(h*e+c),i+=t*Math.sin(f*h*e+u),i/=2}else i=.5*this._height*Math.sin(.5*h*e);t.pushXY(p.pt[0]-i*p.sa,p.pt[1]+i*p.ca)}}}_constructSquare(t,e){Math.round(e/this._period);let s=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const i=new k;this._walker.curPointAndAngle(i);const n=new k;if(this._walker.nextPointAndAngle(this._period,n)){const r=new k;this._walker.nextPointAndAngle(this._period,r)&&(s?(t.pushPoint(i.pt),s=!1):t.pushPoint(i.pt),t.pushXY(i.pt[0]-this._height/2*i.sa,i.pt[1]+this._height/2*i.ca),t.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),t.pushXY(n.pt[0]+this._height/2*n.sa,n.pt[1]-this._height/2*n.ca),t.pushXY(r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}_constructTriangle(t,e){Math.round(e/this._period);let s=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const i=new k;this._walker.curPointAndAngle(i);const n=new k;if(this._walker.nextPointAndAngle(this._period/2,n)){const r=new k;this._walker.nextPointAndAngle(this._period,r)&&(this._walker.nextPosition(this._period/2)&&(s?(t.pushPoint(i.pt),s=!1):t.pushPoint(i.pt),t.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),t.pushXY(r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca)),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}}class mt{static{this.instance=null}static local(){return null===mt.instance&&(mt.instance=new mt),mt.instance}execute(t,e,s){return new gt(t,e,s)}}class gt extends l{constructor(t,e,s){super(t),this._geometryWalker=new z,this._geometryWalker.updateTolerance(s),this._angleToLine=e.angleToLine??!0,this._keepUpright=e.keepUpright??!1,this._offset=(e.offset?e.offset:0)*s,this._originalEndings=e.endings??"WithHalfGap",this._offsetAtEnd=(e.customEndingOffset?e.customEndingOffset:0)*s,this._position=-(e.offsetAlongLine?e.offsetAlongLine:0)*s,this._pattern=new w,this._pattern.init(e.placementTemplate),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{"WithFullGap"===this._originalEndings&&this.isClosed?this._endings="WithMarkers":this._endings=this._originalEndings,this._pattern.extPtGap=0;let s,i=!0;switch(this._endings){case"NoConstraint":s=-this._position,s=this._adjustPosition(s),i=!1;break;case"WithHalfGap":default:s=-this._pattern.lastValue()/2;break;case"WithFullGap":s=-this._pattern.lastValue(),this._pattern.extPtGap=this._pattern.lastValue();break;case"WithMarkers":s=0;break;case"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 n=0;for(;s>n;)s-=n,n=this._pattern.nextValue();n-=s,e=n,this.iteratePath=!0}const s=new k;return this._geometryWalker.nextPointAndAngle(e,s)?"WithFullGap"===this._endings&&this._geometryWalker.isPathEnd()?(this.iteratePath=!1,null):"WithMarkers"===this._endings&&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 yt{static{this.instance=null}static local(){return null===yt.instance&&(yt.instance=new yt),yt.instance}execute(t,e,s){return new Pt(t,e,s)}}class Pt extends l{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new _,this._placePerPart=e.placePerPart??!1,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._keepUpright=e.keepUpright??!1,this._offset=void 0!==e.offset?e.offset*s:0,this._type=e.extremityPlacement??"Both",this._position=void 0!==e.offsetAlongLine?e.offsetAlongLine*s:0,this._beginProcessed=!1}processMultiPath(t){return this._placePerPart?super.processMultiPath(t):this.processPath(t)}processPath(t){let e;switch(this._type){case"Both":default:this._beginProcessed?(e=this._atExtremities(t,this._position,!1),this._beginProcessed=!1,this.iterateMultiPath=!1,this.iteratePath=!1):(e=this._atExtremities(t,this._position,!0),this._beginProcessed=!0,this.iterateMultiPath=!0,this.iteratePath=!0);break;case"JustBegin":e=this._atExtremities(t,this._position,!0);break;case"JustEnd":e=this._atExtremities(t,this._position,!1);case"None":}return e}_atExtremities(t,e,s){if(this._placePerPart||(s?t.seekPath(0):t.seekPath(t.totalSize-1)),s||t.seekPathEnd(),s?t.nextPoint():t.prevPoint()){let i=0,[n,r]=[0,0],[o,a]=[t.x,t.y];const h=[0,0];for(;s?t.nextPoint():t.prevPoint();){n=o,r=a,o=t.x,a=t.y;const s=this._curveHelper.getLength(n,r,o,a);if(i+s>e){const t=(e-i)/s,[l,c]=this._curveHelper.getAngleCS(h,n,r,o,a,t),u=this._curveHelper.getCoord2D(n,r,o,a,t);return this.internalPlacement.setTranslate(u[0]-this._offset*c,u[1]+this._offset*l),this._angleToLine&&this.internalPlacement.setRotateCS(-l,-c),this.internalPlacement}i+=s}}return null}}const xt=.001;class Mt{static{this.instance=null}static local(){return null===Mt.instance&&(Mt.instance=new Mt),Mt.instance}execute(t,e,s){return new bt(t,e,s)}}class bt extends l{constructor(t,e,s){super(t),this._segmentIterator=null,this._segCount=0,this._firstSeg=!0,this._seg=null,this._ms=[],this._from=0,this._to=0,this._pt=null,this._walker=new z,this._walker.updateTolerance(s),this._placePerPart=e.placePerPart??!1,this._angleToLine=e.angleToLine??!1,this._keepUpright=e.keepUpright??!1,this._offset=(e.offset??0)*s,this._interval=(e.interval??0)*s,this._interval<=0&&(this._interval=.01),this._skipRate=e.skipMarkerRate??0,this._skipRate<=1&&(this._skipRate=0),this._placeAtExtremities=e.placeAtExtremities??!1}processPath(t){if(!this.iteratePath){const{fromGeometry:e}=g.vZ.module,s=e(t.getCurrentPath().asJSON()).getGeometry(),i=s.getPathStart(0);this._segmentIterator=s.querySegmentIteratorAtVertex(i),this._segCount=s.getSegmentCountPath(0),this._firstSeg=!0,this.iteratePath=!0,this._pt=s.getXY(0).clone()}for(;0===this._ms.length&&this._segmentIterator?.hasNextSegment();){--this._segCount,this._seg=this._segmentIterator.nextSegment(),this._from=this._seg.getStartAttributeAsDbl(2,0),this._to=this._seg.getEndAttributeAsDbl(2,0);const e=!isNaN(this._from),s=!isNaN(this._to);e&&(this._from=Math.round(this._from/xt)*xt,Math.abs(this._from)<xt&&(this._from=0)),s&&(this._to=Math.round(this._to/xt)*xt,Math.abs(this._to)<xt&&(this._to=0));let i=e?Math.floor(this._from/this._interval):0,n=s?Math.floor(this._to/this._interval):0;if(e&&(this._placeAtExtremities||!this._firstSeg||!this._placePerPart&&t.pathIndex>0)&&Math.abs(i*this._interval-this._from)<xt&&(!this._skipRate||i%this._skipRate)&&this._ms.push(this._from),this._firstSeg=!1,e&&s&&!(Math.abs(this._from-this._to)<xt))if(this._from<=this._to){i*this._interval<this._from+xt&&++i,n*this._interval>this._to-xt&&--n;for(let t=i;t<=n;++t)(!this._skipRate||t%this._skipRate)&&this._ms.push(t*this._interval)}else{i*this._interval>this._from-xt&&--i,n*this._interval<this._to+xt&&++n;for(let t=n;t<=i;++t)(!this._skipRate||t%this._skipRate)&&this._ms.push(t*this._interval)}}let e=0;if(0===this._ms.length){if(this.iteratePath=!1,!this._segCount&&this._placeAtExtremities&&!isNaN(this._to)&&(this._placePerPart||t.pathIndex===t.totalSize-1)){const t=Math.floor(this._to/this._interval);Math.abs(t*this._interval-this._to)<xt&&(!this._skipRate||t%this._skipRate)&&(this._ms.push(this._to),e=1)}if(0===this._ms.length)return null}const s=this._ms.pop(),i=isNaN(this._from)||isNaN(this._to)||Math.abs(this._from-this._to)<xt?e:(s-this._from)/(this._to-this._from);this._seg.queryCoord2D(i,this._pt);const n=this._seg.getTangent(i),{x:r,y:o}=n.normalize();return this.internalPlacement.setTranslate(this._pt.x-this._offset*o,this._pt.y+this._offset*r),this._angleToLine&&this.internalPlacement.setRotateCS(r,o),this.internalPlacement.setMeasure(s),this.internalPlacement}}class St{static{this.instance=null}static local(){return null===St.instance&&(St.instance=new St),St.instance}execute(t,e,s){return new Ct(t,e,s)}}class Ct extends l{constructor(t,e,s){super(t),this._walker=new z,this._walker.updateTolerance(s),this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._keepUpright=e.keepUpright??!1,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 w,this._pattern.init(e.positionArray,!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=t.pathLength()-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=new k;if(!this._walker.nextPointAndAngle(e,s,1))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 n,r;return this._angleToLine?(n=s.ca,r=s.sa):(n=1,r=0),i&&(n=-n,r=-r),this.internalPlacement.setRotateCS(n,r),this._isFirst=!1,this._posCount--,0===this._posCount&&(this.iteratePath=!1),this.internalPlacement}}var wt=s(87811);const kt=512,It=24,zt=1e-6;class vt{static{this.instance=null}static local(){return null===vt.instance&&(vt.instance=new vt),vt.instance}execute(t,e,s,i){return new Tt(t,e,s,i)}}class Tt{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._accelerationMap=null,this._testInsidePolygon=!1,this._verticalSubdivision=!0,this._stepX=Math.abs(e.stepX??16)*s,this._stepY=Math.abs(e.stepY??16)*s,this._stepX=Math.round(128*this._stepX)/128,this._stepY=Math.round(128*this._stepY)/128,0!==this._stepX&&0!==this._stepY){if(this._gridType=e.gridType??"Fixed","Random"===this._gridType){const t=e.seed??13,s=1;this._randomLCG=new wt.A(t*s),this._randomness=(e.randomness??100)/100,this._gridAngle=0,this._shiftOddRows=!1,this._cosAngle=1,this._sinAngle=0,this._offsetX=0,this._offsetY=0,this._buildRandomValues()}else{if(this._randomness=0,this._gridAngle=e.gridAngle??0,this._shiftOddRows=e.shiftOddRows??!1,this._offsetX=(e.offsetX??0)*s,this._offsetY=(e.offsetY??0)*s,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}if(this._graphicOriginX=0,this._graphicOriginY=0,null!=i){const[t,e,s,n]=i.split("/"),r=parseFloat(t),o=parseFloat(e),a=parseFloat(s),h=parseFloat(n);this._graphicOriginX=-(h*2**r+a)*kt,this._graphicOriginY=o*kt,this._testInsidePolygon=!0}this._internalPlacement=new a.W,this._calculateMinMax(t),this._geometryCursor=t}}next(){return this._geometryCursor?this._nextInside():null}_buildRandomValues(){if(!Tt._randValues){Tt._randValues=[];for(let t=0;t<It;t++)for(let t=0;t<It;t++)Tt._randValues.push(this._randomLCG.getFloat()),Tt._randValues.push(this._randomLCG.getFloat())}}_calculateMinMax(t){let e,s,i,n,r,o,a,h,l,c,u,_,f,p;this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,a=h=f=u=Number.MAX_VALUE,l=c=p=_=-Number.MAX_VALUE;const d=1!==this._cosAngle;for(t.reset();t.nextPath();)for(;t.nextPoint();)o=t.x,r=t.y,e=o-this._graphicOriginX-this._offsetX,s=r-this._graphicOriginY-this._offsetY,d?(i=this._cosAngle*e-this._sinAngle*s,n=this._sinAngle*e+this._cosAngle*s):(i=e,n=s),a=Math.min(a,i),l=Math.max(l,i),h=Math.min(h,n),c=Math.max(c,n),u=Math.min(u,r),_=Math.max(_,r),f=Math.min(f,o),p=Math.max(p,o);u=u!==Number.MAX_VALUE?u:-512-this._stepY,_=_!==-Number.MAX_VALUE?_:this._stepY,f=f!==Number.MAX_VALUE?f:-this._stepX,p=p!==-Number.MAX_VALUE?p:kt+this._stepX;const m=_-u,g=p-f;if(this._verticalSubdivision=m>=g,this._polygonMin=this._verticalSubdivision?u:f,this._testInsidePolygon){let t=0-this._graphicOriginX-this._offsetX-this._stepX,e=kt-this._graphicOriginX-this._offsetX+this._stepX,s=-512-this._graphicOriginY-this._offsetY-this._stepY,i=0-this._graphicOriginY-this._offsetY+this._stepY;if(d){const n=[[t,s],[t,i],[e,s],[e,i]];t=s=Number.MAX_VALUE,e=i=-Number.MAX_VALUE;for(const r of n){const n=this._cosAngle*r[0]-this._sinAngle*r[1],o=this._sinAngle*r[0]+this._cosAngle*r[1];t=Math.min(t,n),e=Math.max(e,n),s=Math.min(s,o),i=Math.max(i,o)}}a=a!==Number.MAX_VALUE?Math.max(a,t):t,h=h!==Number.MAX_VALUE?Math.max(h,s):s,l=l!==-Number.MAX_VALUE?Math.min(l,e):e,c=c!==-Number.MAX_VALUE?Math.min(c,i):i}this._xMin=Math.round(a/this._stepX),this._xMax=Math.round(l/this._stepX),this._yMin=Math.round(h/this._stepY),this._yMax=Math.round(c/this._stepY),this._currentX=this._xMax+1,this._currentY=this._yMin-1,this._buildAccelerationMap(t,f,p,u,_)}_buildAccelerationMap(t,e,s,i,n){t.reset();const r=new Map,o=this._verticalSubdivision,a=o?n-i:s-e;let h=Math.ceil(a/10);if(h<=1)return;const l=Math.floor(a/h);let c,u,_,f,p,d,m,g,y,P,x;for(h++,this._delta=l,o?(y=-512-2*this._stepY,P=2*this._stepY,x=i):(y=-2*this._stepX,P=kt+2*this._stepX,x=e);t.nextPath();)if(!(t.pathSize<2)&&t.nextPoint())for(c=t.x,u=t.y;t.nextPoint();c=_,u=f){if(_=t.x,f=t.y,o){if(u===f||u<y&&f<y||u>P&&f>P)continue;p=Math.min(u,f),d=Math.max(u,f)}else{if(c===_||c<y&&_<y||c>P&&_>P)continue;p=Math.min(c,_),d=Math.max(c,_)}for(;p<d;)m=Math.floor((p-x)/l),At(m,c,u,_,f,r),p+=l;g=Math.floor((d-x)/l),g>m&&At(g,c,u,_,f,r)}this._accelerationMap=r}_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;if(this._currentX++,"Random"===this._gridType){const n=(this._currentX%It+It)%It,r=(this._currentY%It+It)%It;s=this._graphicOriginX+t+this._stepX*this._randomness*(.5-Tt._randValues[r*It+n])*2/3,i=this._graphicOriginY+e+this._stepY*this._randomness*(.5-Tt._randValues[r*It+n+1])*2/3}else s=this._graphicOriginX+this._cosAngle*t+this._sinAngle*e,i=this._graphicOriginY-this._sinAngle*t+this._cosAngle*e;if(!this._testInsidePolygon||this._isInsidePolygon(s,i,this._geometryCursor))return this._internalPlacement.setTranslate(s,i),this._internalPlacement}}_isInsidePolygon(t,e,s){if(null==this._accelerationMap)return function(t,e,s){let i,n,r,o,a=0;for(t+=zt,e+=zt,s.reset();s.nextPath();)if(s.nextPoint())for(i=s.x,n=s.y;s.nextPoint();i=r,n=o)r=s.x,o=s.y,n>e!=o>e&&((r-i)*(e-n)-(o-n)*(t-i)>0?a++:a--);return 0!==a}(t,e,s);t+=zt,e+=zt;const i=this._verticalSubdivision,n=i?e:t,r=Math.floor((n-this._polygonMin)/this._delta),o=this._accelerationMap.get(r);if(!o)return!1;let a,h,l,c=0;for(const s of o){if(a=s[0],h=s[1],i){if(a[1]>e==h[1]>e)continue;l=(h[0]-a[0])*(e-a[1])-(h[1]-a[1])*(t-a[0])}else{if(a[0]>t==h[0]>t)continue;l=(h[1]-a[1])*(t-a[0])-(h[0]-a[0])*(e-a[1])}l>0?c++:c--}return 0!==c}}function At(t,e,s,i,n,r){let o=r.get(t);o||(o=[],r.set(t,o)),o.push([[e,s],[i,n]])}class Lt{static{this.instance=null}static local(){return null===Lt.instance&&(Lt.instance=new Lt),Lt.instance}execute(t,e,s){return new Et(t,e,s)}}class Et extends l{constructor(t,e,s){super(t),this._curveHelper=new _,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._keepUpright=e.keepUpright??!1,this._offset=void 0!==e.offset?e.offset*s:0,this._relativeTo=e.relativeTo??"LineMiddle",this._position=void 0!==e.startPointOffset?e.startPointOffset*s:0,this._epsilon=.001*s}processPath(t){const e=this._position;if("SegmentMidpoint"===this._relativeTo){if(this.iteratePath||(this.iteratePath=!0),t.nextPoint()){let[e,s]=[t.x,t.y],[i,n]=[0,0];const r=[0,0];for(;t.nextPoint();){i=t.x,n=t.y;const o=this._curveHelper.getLength(e,s,i,n);if(o<this._epsilon){e=i,s=n;continue}const a=.5+this._position/o,[h,l]=this._curveHelper.getAngleCS(r,e,s,i,n,a),c=this._curveHelper.getCoord2D(e,s,i,n,a);return this.internalPlacement.setTranslate(c[0]-this._offset*l,c[1]+this._offset*h),this._angleToLine&&this.internalPlacement.setRotateCS(h,l),this.internalPlacement}}return this.iteratePath=!1,null}const s="LineEnd"===this._relativeTo;return this.onLine(t,e,s)}onLine(t,e,s){let i,n=!1;switch(this._relativeTo){case"LineMiddle":default:t.seekPathStart(),i=t.pathLength()/2+e;break;case"LineBeginning":i=e;break;case"LineEnd":i=e,n=!0}s?t.seekPathEnd():t.seekPathStart();let r=0;if(s?t.prevPoint():t.nextPoint()){let[e,o]=[t.x,t.y],[a,h]=[0,0];const l=[0,0];for(;s?t.prevPoint():t.nextPoint();){a=t.x,h=t.y;const s=this._curveHelper.getLength(e,o,a,h);if(r+s>i){const t=(i-r)/s,[c,u]=this._curveHelper.getAngleCS(l,e,o,a,h,t),_=this._curveHelper.getCoord2D(e,o,a,h,t),f=n?-this._offset:this._offset;return this.internalPlacement.setTranslate(_[0]-f*u,_[1]+f*c),this._angleToLine&&(n?this.internalPlacement.setRotateCS(-c,-u):this.internalPlacement.setRotateCS(c,u)),this.internalPlacement}e=a,o=h,r+=s}}return null}}class Rt{static{this.instance=null}static local(){return null===Rt.instance&&(Rt.instance=new Rt),Rt.instance}execute(t,e,s){return new Gt(t,e,s)}}class Gt extends l{constructor(t,e,s){super(t),this._curveHelper=new _,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._keepUpright=e.keepUpright??!1,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]),n=Math.sin(e[2]);s-=this._offset*n,i+=this._offset*t}return this.internalPlacement.setTranslate(s,i),this._tagIterator++,this.internalPlacement}_preparePath(t){this._tags.length=0,this._tagIterator=0,t.seekPathStart();const e=t.isClosed();let s=0,i=!1,n=0,r=0;if(t.seekPathStart(),t.nextPoint()){let o=t.x,a=t.y,h=t.getControlPoint(),l=!0,c=t.nextPoint();for(;c;){const u=t.x,_=t.y,f=t.getControlPoint();(this._angleToLine||0!==this._offset)&&(n=this._curveHelper.getAngle(o,a,u,_,0)),l?(l=!1,e?(s=n,i=h):(this._endPoints||this._controlPoints&&h)&&this._tags.push([o,a,n])):h?this._controlPoints&&this._tags.push([o,a,Nt(r,n)]):this._regularVertices&&this._tags.push([o,a,Nt(r,n)]),(this._angleToLine||0!==this._offset)&&(r=this._curveHelper.getAngle(o,a,u,_,1)),c=t.nextPoint(),c||(e?f||i?this._controlPoints&&this._tags.push([u,_,Nt(r,s)]):this._regularVertices&&this._tags.push([u,_,Nt(r,s)]):(this._endPoints||this._controlPoints&&f)&&this._tags.push([u,_,r])),o=u,a=_,h=f}}this._tagIterator=0}}function Nt(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}var Ot=s(32011);class Ft{static{this.instance=null}static local(){return null===Ft.instance&&(Ft.instance=new Ft),Ft.instance}execute(t,e,s){return new Dt(t,e,s)}}class Dt{constructor(t,e,s){this._geometryCursor=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:"OnPolygon",this._placementPerPart=void 0!==e.placePerPart&&e.placePerPart,this._internalPlacement=new a.W}next(){const t=this._geometryCursor;if(!t)return null;if(!this._placementPerPart)return this._geometryCursor=null,this._polygonCenter(t);for(;t.nextPath();)if(!(t.getCurrentRingArea()<0))return this._polygonCenter(t.getCurrentPath());return this._geometryCursor=null,null}_polygonCenter(t){let e=!1;switch(this._method){case"CenterOfMass":{const s=(0,q.TP)(t);s&&(this._internalPlacement.setTranslate(s[0]+this._offsetX,s[1]+this._offsetY),e=!0)}break;case"BoundingBoxCenter":{const s=(0,R.z8)(t);s&&(this._internalPlacement.setTranslate((s[2]+s[0])/2+this._offsetX,(s[3]+s[1])/2+this._offsetY),e=!0)}break;default:{const s=(0,Ot.d)(t);null!==s&&(this._internalPlacement.setTranslate(s[0]+this._offsetX,s[1]+this._offsetY),e=!0)}}return e?this._internalPlacement:null}}class Xt{static{this.instance=null}static local(){return null===Xt.instance&&(Xt.instance=new Xt),Xt.instance}execute(t,e,s){return new Yt(t,e,s)}}class Yt{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class Ht{static{this.instance=null}static local(){return null===Ht.instance&&(Ht.instance=new Ht),Ht.instance}execute(t,e,s){return new Wt(t,e,s)}}class Wt{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class Bt{static{this.instance=null}static local(){return null===Bt.instance&&(Bt.instance=new Bt),Bt.instance}execute(t,e,s){return new Ut(t,e,s)}}class Ut{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class Vt{static{this.instance=null}static local(){return null===Vt.instance&&(Vt.instance=new Vt),Vt.instance}execute(t,e,s){return new $t(t,e,s)}}class $t{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class qt{static{this.instance=null}static local(){return null===qt.instance&&(qt.instance=new qt),qt.instance}execute(t,e,s){if("linearDimensionPointEffect"!==e?.type)throw new Error("Invalid effect type for LinearDimensionPointEffect");return new Jt(t,e,s)}}class Jt{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}class Zt{static{this.instance=null}static local(){return null===Zt.instance&&(Zt.instance=new Zt),Zt.instance}execute(t,e,s){return new jt(t,e,s)}}class jt{constructor(t,e,s){}next(){throw new Error("Method not implemented.")}}function Kt(t){if(!t)return null;switch(t.type){case"CIMGeometricEffectAddControlPoints":return i.local();case"CIMGeometricEffectArrow":return p.local();case"CIMGeometricEffectBuffer":return y.local();case"CIMGeometricEffectControlMeasureLine":return M.local();case"CIMGeometricEffectCut":return S.local();case"CIMGeometricEffectDashes":return T.local();case"CIMGeometricEffectDonut":return L.local();case"CIMGeometricEffectJog":return X.local();case"CIMGeometricEffectMove":return H.local();case"CIMGeometricEffectOffset":return U.local();case"CIMGeometricEffectRadial":return Z.local();case"CIMGeometricEffectReverse":return K.local();case"CIMGeometricEffectRotate":return et.local();case"CIMGeometricEffectScale":return it.local();case"CIMGeometricEffectSuppress":return ot.local();case"CIMGeometricEffectTaperedPolygon":return _t.local();case"CIMGeometricEffectWave":return pt.local();case"CIMGeometricEffectEnclosingPolygon":return G.local();case"LinearDimensionLineEffect":return Vt.local();case"LinearDimensionLeaderLineEffect":return Bt.local();case"LinearDimensionPointEffect":return qt.local();case"LinearDimensionArrowEffect":return Xt.local();case"LinearDimensionTextEffect":return Zt.local();case"LinearDimensionExtensionLineEffect":return Ht.local()}return null}function Qt(t){if(!t)return null;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":return mt.local();case"CIMMarkerPlacementAtExtremities":return yt.local();case"CIMMarkerPlacementAtMeasuredUnits":return Mt.local();case"CIMMarkerPlacementAtRatioPositions":return St.local();case"CIMMarkerPlacementInsidePolygon":return vt.local();case"CIMMarkerPlacementOnLine":return Lt.local();case"CIMMarkerPlacementOnVertices":return Rt.local();case"CIMMarkerPlacementPolygonCenter":return Ft.local()}return null}},98939(t,e,s){s.d(e,{W:()=>i});class i{constructor(){this.setIdentity()}getAngle(){return(null==this.rz||0===this.rz&&1!==this.rzCos&&0!==this.rzSin)&&(this.rz=Math.atan2(this.rzSin,this.rzCos)),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.rzCos=1,this.rzSin=0}setTranslate(t,e){this.tx=t,this.ty=e}setTranslateZ(t){this.tz=t}setRotateCS(t,e){this.rz=void 0,this.rzCos=t,this.rzSin=e}setRotate(t){this.rz=t,this.rzCos=void 0,this.rzSin=void 0}setRotateY(t){this.ry=t}setScale(t){this.s=t}setMeasure(t){this.m=t}}},92649(t,e,s){s.r(e),s.d(e,{CIMSymbolHelper:()=>ut,CIMSymbolInflatedSizeHelper:()=>ct,capTypeToEnum:()=>ft,forEachSymbolLayer:()=>_t,getEffectsInflateSize:()=>ht,slsDashToTemplateArray:()=>Mt,symbolToCIM:()=>rt});const i=new(s(32488).A);function n(t,e=!0){if(!i.hasBidiChar(t))return[t,!1,{...i}];let s;s="rtl"===i.checkContextual(t)?"IDNNN":"ICNNN";const n=e?"VLYSN":"VLYNN";return[i.bidiTransform(t,s,n),!0,{...i}]}var r=s(4718),o=s(53966),a=s(87811),h=s(90629),l=s(19419),c=s(537),u=s(52006),_=s(31411),f=s(11831),p=s(35833),d=s(98939);s(92602);new Map,new Set,s(44208);var m=s(34727),g=s(93687),y=s(36745),P=s(12359),x=(s(12176),s(60408));class M{applyColorSubstitution(t,e){if(!e)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:s,height:i}=t,n=this._rasterizationCanvas,r=n.getContext("2d",{willReadFrequently:!0});t!==n&&(n.width=s,n.height=i,r.drawImage(t,0,0,s,i));const o=r.getImageData(0,0,s,i).data;if(e)for(const t of e)if(t&&t.oldColor&&4===t.oldColor.length&&t.newColor&&4===t.newColor.length){const[e,s,i,n]=t.oldColor,[r,a,h,l]=t.newColor;if(e===r&&s===a&&i===h&&n===l)continue;for(let t=0;t<o.length;t+=4)e===o[t]&&s===o[t+1]&&i===o[t+2]&&n===o[t+3]&&(o[t]=r,o[t+1]=a,o[t+2]=h,o[t+3]=l)}const a=new ImageData(o,s,i);return r.putImageData(a,0,0),n}tintImageData(t,e){if(!e||e.length<4)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:s,height:i}=t,n=this._rasterizationCanvas,r=n.getContext("2d",{willReadFrequently:!0});t!==n&&(n.width=s,n.height=i,r.drawImage(t,0,0,s,i));const o=r.getImageData(0,0,s,i),a=new Uint8Array(o.data),h=[e[0]/255,e[1]/255,e[2]/255,e[3]/255];for(let t=0;t<a.length;t+=4)a[t]*=h[0],a[t+1]*=h[1],a[t+2]*=h[2],a[t+3]*=h[3];const l=new ImageData(new Uint8ClampedArray(a.buffer),s,i);return r.putImageData(l,0,0),n}}var b=s(92580),S=s(28076);function C(t){const e=t.getFrame(0);if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement)return e;const s=document.createElement("canvas");s.width=t.width,s.height=t.height;const i=s.getContext("2d");return e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0),s}function w(t,e=0){if(0===e)return t;const s=Math.cos(e),i=Math.sin(e),[n,r]=t;return[n*s+r*-i,n*i+r*s]}function k(t,e=0){let s=0;for(let i=0;i<4;i++)s+=t[e+i]*I[i];return s}const I=[1/256,1/65536,1/16777216,1/4294967296];k(new Uint8ClampedArray([255,255,255,255])),k(new Uint8ClampedArray([255,255,255,0])),s(35521);var z=s(76213);const v=()=>o.A.getLogger("esri.symbols.cim.rasterizingUtils");let T;function A(t,e){const{colorRamp:s,gradientType:i}=e,n=L(s),r="CIMFixedColorRamp"===s.type;if("Continuous"===i&&!r)return E(t,n);const o=e.interval??S.D.CIMGradientFill.interval;if(r)return E(t,function(t,e){const s=[],i=(t.length-1)/(e-1);for(let n=0;n<e;n++){const r=t[Math.round(n*i)].color;s.push({offset:n/e,color:r}),s.push({offset:(n+1)/e,color:r})}return s}(n,o));const a=[];T??=document.createElement("canvas"),function(t,e,s,i,n){const r=s+2*n;t.width=r,t.height=i;const o=(n+1)/r,a=t.getContext("2d",{willReadFrequently:!0});if(e.length>0){const t=a.createLinearGradient(0,0,r,i);E(t,e,o),a.fillStyle=t}else a.fillStyle="rgba(128, 128, 128, 1)";a.fillRect(0,0,r,i)}(T,n,o,1,0);const h=T.getContext("2d").getImageData(0,0,o,1).data;for(let t=0,e=0;t<o;t++,e=4*t){const s=[h[e+0],h[e+1],h[e+2],h[e+3]];a.push({offset:t/o,color:s}),a.push({offset:(t+1)/o,color:s})}return E(t,a)}function L(t){const e=[];switch(t.type){case"CIMPolarContinuousColorRamp":case"CIMLinearContinuousColorRamp":{"CIMPolarContinuousColorRamp"===t.type&&v().warnOnce("CIMPolarContinuousColorRamp is currently unsupported. Falling back to CIMLinearContinuousColorRamp.");const s=t;e.push({offset:0,color:[s.fromColor[0],s.fromColor[1],s.fromColor[2],s.fromColor[3]/255]}),e.push({offset:1,color:[s.toColor[0],s.toColor[1],s.toColor[2],s.toColor[3]/255]});break}case"CIMFixedColorRamp":{const s=t,i=1/(s.colors.length-1);let n=0;for(const t of s.colors)e.push({offset:n,color:[t[0],t[1],t[2],t[3]/255]}),n+=i;break}case"CIMMultipartColorRamp":{const s=t,i=s.weights.reduce((t,e)=>t+e,0);let n=0;for(let t=0;t<s.colorRamps.length;t++){const r=s.colorRamps[t],o=s.weights[t],a=L(r);for(const t of a)e.push({offset:(n+t.offset*o)/i,color:t.color});n+=o}break}default:v().error(`Color ramp "${t.type}" currently unsupported.`)}return e}function E(t,e,s=0){for(const{offset:i,color:n}of e)t.addColorStop(Math.min(Math.max(i,s),1-s),`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${n[3]})`)}class R{constructor(t=0,e=0,s=0,i=0){this.x=t,this.y=e,this.width=s,this.height=i}static fromExtent(t){return new R(t.xmin,-t.ymax,t.xmax-t.xmin,t.ymax-t.ymin)}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)}}var G=s(5760);function N(t){return`rgba(${t.slice(0,3).toString()},${t[3]})`}class O{constructor(t){t&&(this._textRasterizationCanvas=t)}rasterizeText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const s=this._textRasterizationCanvas,i=s.getContext("2d",{willReadFrequently:!0});F(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const{decoration:n,weight:r}=e.font;this._lineThroughWidthOffset=n&&"line-through"===n?.1*this._lineHeight:0;const o=null!=e.backgroundColor||null!=e.borderLine,a=o?G.y7:0,h=this._computeTextWidth(i,e)+2*a,l=this._lineHeight*this._textLines.length+2*a;if(s.width=h+2*this._lineThroughWidthOffset,s.height=l,0===s.width||0===s.height)return s.width=s.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:s};this._renderedLineHeight=Math.round(this._lineHeight),this._renderedOutlineSize=(e.outline.size||0)*e.pixelRatio,this._renderedHaloSize=(e.halo.size||0)*e.pixelRatio,this._renderedWidth=h,this._renderedHeight=l,this._lineThroughWidthOffset*=e.pixelRatio;const c=(e.outline&&e.outline.color)??[0,0,0,0],u=e.color??[0,0,0,0],_=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=N(u),this._outlineStyle=N(c),this._haloStyle=function(t){return`rgb(${t.slice(0,3).toString()})`}(_);const f=this._renderedLineHeight,p=this._renderedOutlineSize,d=this._renderedHaloSize;i.save(),i.clearRect(0,0,s.width,s.height),F(i,e);const m=a*e.pixelRatio,g=function(t,e,s){return"center"===t?.5*e:"right"===t?e-s:s}(i.textAlign,this._renderedWidth-2*m,this._renderedHaloSize+this._renderedOutlineSize)+m,y=d+p+m,P=d>0;let x=this._lineThroughWidthOffset,M=0;if(o){i.save();const t=e.backgroundColor??[0,0,0,0],n=e.borderLine?.color??[0,0,0,0],r=2*(e.borderLine?.size??0);i.fillStyle=N(t),i.strokeStyle=N(n),i.lineWidth=r,i.fillRect(0,0,s.width,s.height),i.strokeRect(0,0,s.width,s.height),i.restore()}P&&this._renderHalo(i,g,y,x,M,e),p>0&&this._renderOutline(i,g,y,x,M,e),M+=y,x+=g;for(const t of this._textLines)P?(i.globalCompositeOperation="destination-out",i.fillStyle="rgb(0, 0, 0)",i.fillText(t,x,M),i.globalCompositeOperation="source-over",i.fillStyle=this._fillStyle,i.fillText(t,x,M)):(i.fillStyle=this._fillStyle,i.fillText(t,x,M)),n&&"none"!==n&&this._renderDecoration(i,x,M,n,r),M+=f;i.restore();const b=this._renderedWidth+2*this._lineThroughWidthOffset,S=this._renderedHeight,C=i.getImageData(0,0,b,S),w=new Uint8Array(C.data);if(e.premultiplyColors){let t;for(let e=0;e<w.length;e+=4)t=w[e+3]/255,w[e]=w[e]*t,w[e+1]=w[e+1]*t,w[e+2]=w[e+2]*t}let k,I;switch(e.horizontalAlignment){case"left":k=-.5;break;case"right":k=.5;break;default:k=0}switch(e.verticalAlignment){case"bottom":I=-.5;break;case"top":I=.5;break;case"baseline":I=-1/6;break;default:I=0}return{size:[b,S],image:new Uint32Array(w.buffer),sdf:!1,simplePattern:!1,anchorX:k,anchorY:I,canvas:s}}_renderHalo(t,e,s,i,n,r){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const h=this._outlineRasterizationCanvas,l=h.getContext("2d");l.clearRect(0,0,o,a),F(l,r);const{decoration:c,weight:u}=r.font;l.fillStyle=this._haloStyle,l.strokeStyle=this._haloStyle,l.lineJoin="round",this._renderOutlineNative(l,e,s,c,u,this._renderedHaloSize+this._renderedOutlineSize),t.globalAlpha=this._parameters.halo.color[3],t.drawImage(h,0,0,o,a,i,n,o,a),t.globalAlpha=1}_renderOutline(t,e,s,i,n,r){const o=this._renderedWidth,a=this._renderedHeight;this._outlineRasterizationCanvas||(this._outlineRasterizationCanvas=document.createElement("canvas")),this._outlineRasterizationCanvas.width=o,this._outlineRasterizationCanvas.height=a;const h=this._outlineRasterizationCanvas,l=h.getContext("2d");l.clearRect(0,0,o,a),F(l,r);const{decoration:c,weight:u}=r.font;l.fillStyle=this._outlineStyle,l.strokeStyle=this._outlineStyle,l.lineJoin="round",this._renderOutlineNative(l,e,s,c,u,this._renderedOutlineSize),t.globalAlpha=this._parameters.outline.color[3],t.drawImage(h,0,0,o,a,i,n,o,a),t.globalAlpha=1}_renderOutlineNative(t,e,s,i,n,r){const o=this._renderedLineHeight;for(const a of this._textLines){const h=2*r,l=5,c=.1;for(let r=0;r<l;r++){const o=(1-(l-1)*c+r*c)*h;t.lineWidth=o,t.strokeText(a,e,s),i&&"none"!==i&&this._renderDecoration(t,e,s,i,n,o)}s+=o}}computeTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const s=this._textRasterizationCanvas,i=s.getContext("2d");F(i,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const n=this._computeTextWidth(i,e),r=this._lineHeight*this._textLines.length;return s.width=n,s.height=r,[n*e.pixelRatio,r*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*(0,h.Lz)(this._parameters.halo.size),Math.round(s)}_computeLineHeightBase(){return 1.275*this._parameters.size}_computeLineHeight(){let t=this._computeLineHeightBase();const e=this._parameters.font.decoration;return e&&"underline"===e&&(t*=1.3),Math.round(t+2*(0,h.Lz)(this._parameters.halo.size))}_renderDecoration(t,e,s,i,n,r){let o=.9*this._lineHeight;const a="bold"===n?.06:"bolder"===n?.09:.04;switch(t.textAlign){case"center":e-=this._renderedWidth/2;break;case"right":e-=this._renderedWidth}const h=t.textBaseline;if("underline"===i)switch(o=.9*this._computeLineHeightBase(),h){case"top":s+=o;break;case"middle":s+=o/2}else if("line-through"===i)switch(h){case"top":s+=o/1.5;break;case"middle":s+=o/3}const l=r?1.5*r:Math.ceil(o*a);t.save(),t.beginPath(),t.strokeStyle=t.fillStyle,t.lineWidth=l,t.moveTo(e-this._lineThroughWidthOffset,s),t.lineTo(e+this._renderedWidth+2*this._lineThroughWidthOffset,s),t.stroke(),t.restore()}}function F(t,e){const s=Math.max(e.size,.5),i=e.font,n=`${i.style} ${i.weight} ${(0,h.Lz)(s).toFixed(1)}px ${i.family}, sans-serif`;let r;switch(t.font=n,t.textBaseline="top",e.horizontalAlignment){case"left":default:r="left";break;case"right":r="right";break;case"center":r="center"}t.textAlign=r}var D=s(93397),X=s(75434);function Y(t){const e=(0,h.PN)(z.GR),s=(0,h.PN)(z.cp);return Math.max(e,Math.min(t||s,s))}s(39829);const H=Math.PI/180,W=()=>o.A.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class B{constructor(t){this._t=t}static createIdentity(){return new B([1,0,0,0,1,0])}clone(){const t=this._t;return new B(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 B([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 B([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 B([e,-s,0,s,e,0])}rotate(t){return B.multiply(this,B.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],s=Math.sqrt(t*t+e*e);return[t/s,e/s]}static multiply(t,e,s){const i=t._t,n=e._t,r=i[0]*n[0]+i[3]*n[1],o=i[1]*n[0]+i[4]*n[1],a=i[2]*n[0]+i[5]*n[1]+n[2],h=i[0]*n[3]+i[3]*n[4],l=i[1]*n[3]+i[4]*n[4],c=i[2]*n[3]+i[5]*n[4]+n[5],u=s._t;return u[0]=r,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 B([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,n=t[4]*e,r=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new B([n,r,s,o,a,i])}}class U{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._geomUnitsPerPoint=1,this._placementPool=new g.A(()=>new d.W,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||B.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1)}setTransform(t,e){this._transfos=[t||B.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=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]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e){const s=e?t.scaleRatio():1;B.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,s){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,s)}}drawMultiLayerSymbol(t,e){if(!t||!e)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.asJSON()),e=t.next()}}else this.drawSymbolLayers(s,e)}executeEffects(t,e){let s=new p.kT(y.z.fromJSONCIM(e));for(const e of t){const t=(0,b.A)(e);t&&(s=t.execute(s,e,this.geomUnitsPerPoint(),null))}return s}drawSymbolLayers(t,e){let s=t.length;for(;s--;){const i=t[s];if(!i||!1===i.enable)continue;const n=i.effects;if(n&&n.length>0){const t=this.executeEffects(n,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(i,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(i,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);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,t.path);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=function(t,e,s){let i=(0,D.$w)(t.separation,S.D.CIMHatchFill.separation)*s,n=(0,D.$w)(t.rotation);if(0===i)return null;i<0&&(i=-i);let r=0;const o=.5*i;for(;r>o;)r-=i;for(;r<-o;)r+=i;const a=(0,l.vt)();(0,c.Rg)(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(;n>180;)n-=180;for(;n<0;)n+=180;const u=Math.cos(n*H),_=Math.sin(n*H),f=-i*_,p=i*u;let d,m,g,y;r=(0,D.$w)(t.offsetX)*s*_-(0,D.$w)(t.offsetY)*s*u,d=g=Number.MAX_VALUE,m=y=-Number.MAX_VALUE;for(const t of h){const e=t[0],s=t[1],i=u*e+_*s,n=-_*e+u*s;d=Math.min(d,i),g=Math.min(g,n),m=Math.max(m,i),y=Math.max(y,n)}g=Math.floor(g/i)*i;let P=u*d-_*g-f*r/i,x=_*d+u*g-p*r/i,M=u*m-_*g-f*r/i,b=_*m+u*g-p*r/i;const C=1+Math.round((y-g)/i),w=[];for(let t=0;t<C;t++)P+=f,x+=p,M+=f,b+=p,w.push([[P,x],[M,b]]);return{paths:w}}(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,b.c)(s);if(i){const n="CIMMarkerPlacementInsidePolygon"===s.type||"CIMMarkerPlacementPolygonCenter"===s.type&&s.clipAtBoundary;n&&this.pushClipPath(e);const r=i.execute(y.z.fromJSONCIM(e),s,this.geomUnitsPerPoint(),null);if(r){let e=null;for(;(e=r.next())&&(this.drawMarker(t,e),!this._earlyReturn););}n&&this.popClipPath()}}else{const s=this._placementPool.acquire();if((0,x.fT)(e))s.tx=e.x,s.ty=e.y,this.drawMarker(t,s);else if((0,x.Bi)(e)){const i=(0,P.l8)(e);i&&([s.tx,s.ty]=i,this.drawMarker(t,s))}else if((0,x.Rg)(e)){for(const i of e.paths)for(const e of i)if(s.tx=e[0],s.ty=e[1],this.drawMarker(t,s),this._earlyReturn)break}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){if(!t)return;const s=this._resourceManager.getResource(t.url),i=(0,D.$w)(t.size,S.D.CIMPictureMarker.size);if(null==s||i<=0)return;const n=s.width,r=s.height;if(!n||!r)return;const o=n/r,a=(0,D.$w)(t.scaleX,1),h=B.createIdentity(),l=t.anchorPoint;if(l){let e=l.x,s=l.y;"Absolute"!==t.anchorPointUnits&&(e*=i*o*a,s*=i),h.translate(-e,-s)}let c=(0,D.$w)(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&h.rotate(c*H);let u=(0,D.$w)(t.offsetX),_=(0,D.$w)(t.offsetY);if(u||_){if(this._mapRotation){const t=H*this._mapRotation,e=Math.cos(t),s=Math.sin(t),i=u*s+_*e;u=u*e-_*s,_=i}h.translate(u,_)}const f=this.geomUnitsPerPoint();1!==f&&h.scale(f,f);const p=e.getAngle();p&&h.rotate(p),h.translate(e.tx,e.ty),this.push(h,!1),this.drawImage(t,i),this.pop()}drawVectorMarker(t,e){if(!t)return;const s=t.markerGraphics;if(!s)return;const i=(0,D.$w)(t.size,S.D.CIMVectorMarker.size),n=t.frame,r=n?n.ymax-n.ymin:0,o=i&&r?i/r:1,a=B.createIdentity();n&&a.translate(.5*-(n.xmax+n.xmin),.5*-(n.ymax+n.ymin));const h=t.anchorPoint;if(h){let e=h.x,s=h.y;"Absolute"!==t.anchorPointUnits?n&&(e*=n.xmax-n.xmin,s*=n.ymax-n.ymin):(e/=o,s/=o),a.translate(-e,-s)}1!==o&&a.scale(o,o);let l=(0,D.$w)(t.rotation);t.rotateClockwise&&(l=-l),this._mapRotation&&(l+=this._mapRotation),l&&a.rotate(l*H);let c=(0,D.$w)(t.offsetX),u=(0,D.$w)(t.offsetY);if(c||u){if(this._mapRotation){const t=H*this._mapRotation,e=Math.cos(t),s=Math.sin(t),i=c*s+u*e;c=c*e-u*s,u=i}a.translate(c,u)}const _=this.geomUnitsPerPoint();1!==_&&a.scale(_,_);const f=e.getAngle();f&&a.rotate(f),a.translate(e.tx,e.ty),this.push(a,t.scaleSymbolsProportionally);for(const t of s){t?.symbol&&t.geometry||W().error("Invalid marker graphic",t);let e=t.textString;if("number"==typeof e&&(e=e.toString()),this.drawSymbol(t.symbol,t.geometry,e),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,s){if(!t)return;if(!(0,x.fT)(e))return;if((0,D.$w)(t.height,S.D.CIMTextSymbol.height)<=0)return;const i=B.createIdentity();let n=(0,D.$w)(t.angle);n=-n,n&&i.rotate(n*H);const r=(0,D.$w)(t.offsetX),o=(0,D.$w)(t.offsetY);(r||o)&&i.translate(r,o);const a=this.geomUnitsPerPoint();1!==a&&i.scale(a,a),i.translate(e.x,e.y),this.push(i,!1),this.drawText(t,s),this.pop()}}class V extends U{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 R(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return(0,l.fA)(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if((0,x.Bi)(t))this._processPath(t.rings,0);else if((0,x.Rg)(t))this._processPath(t.paths,0);else if((0,x.ZC)(t)){const e=J(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,s){if(!t||this._clipCount>0||null==s||s<=0)return;const i=Math.max(.5*this.transformSize((0,D.$w)(s,S.D.CIMSolidStroke.width)),.25);if((0,x.Bi)(t))this._processPath(t.rings,i);else if((0,x.Rg)(t))this._processPath(t.paths,i);else if((0,x.ZC)(t)){const e=J(t);e&&this._processPath(e.rings,i)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){(0,x.Bi)(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:s}=t,i=(0,D.$w)(t.scaleX,1);let n=i*e,r=e;const o=this._resourceManager.getResource(s);if(null!=o){const t=o.height/o.width;n=i*(e?t>1?e:e/t:o.width),r=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-n/2,-r/2]),0),this._merge(this.transformPt([-n/2,r/2]),0),this._merge(this.transformPt([n/2,-r/2]),0),this._merge(this.transformPt([n/2,r/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new O);const s=Z(t);let[i,n]=this._textRasterizer.computeTextSize(e,s);i=(0,h.PN)(i),n=(0,h.PN)(n);const r=this.transformSize(1)*this.reverseTransformScalar(1);i*=r,n*=r;let o=0;switch(t.horizontalAlignment){case"Left":o=i/2;break;case"Right":o=-i/2}let a=0;switch(t.verticalAlignment){case"Bottom":a=n/2;break;case"Top":a=-n/2;break;case"Baseline":a=n/6}this._merge(this.transformPt([-i/2+o,-n/2+a]),0),this._merge(this.transformPt([-i/2+o,n/2+a]),0),this._merge(this.transformPt([i/2+o,-n/2+a]),0),this._merge(this.transformPt([i/2+o,n/2+a]),0)}_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 $ extends U{constructor(t,e,s,i){super(e,s),this._applyAdditionalRenderProps=i,this._colorSubstitutionHelper=new M,this._ctx=t}drawSolidFill(t,e){if(!t)return;if((0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!0);else if((0,x.ZC)(t))this._buildPath(J(t).rings,!0);else{if(!(0,x.U9)(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)/255+")",s.fill("evenodd")}drawSolidStroke(t,e,s,i,n,r){if(!t||!e||0===s)return;if((0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!1);else{if(!(0,x.ZC)(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(J(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)/255+")",o.lineWidth=Math.max(this.transformSize(s),.5),this._setCapStyle(i),this._setJoinStyle(n),o.miterLimit=r,o.stroke()}pushClipPath(t){if(this._ctx.save(),(0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!0);else{if(!(0,x.ZC)(t))return;this._buildPath(J(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:s,url:i,tintColor:n}=t,r=(0,D.$w)(t.scaleX,1),o=this._resourceManager.getResource(i);if(null==o)return;let a=e*(o.width/o.height),h=e;e||(a=o.width,h=o.height);const l=(0,D.UE)(i)||"src"in o&&(0,D.UE)(o.src);let c="getFrame"in o?C(o):o;s&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,s)),this._applyAdditionalRenderProps&&!l&&n&&(c=this._colorSubstitutionHelper.tintImageData(c,n));const u=this.transformPt([0,0]),[_,f]=this.getTransformAngle(),p=this.transformSize(1),d=this._ctx;d.save(),d.setTransform({m11:r*p*_,m12:r*p*f,m21:-p*f,m22:p*_,m41:u[0],m42:u[1]}),d.drawImage(c,-a/2,-h/2,a,h),d.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new O);const s=Z(t,this.transformSize((0,h.PN)(1))),i=this._textRasterizer.rasterizeText(e,s);if(!i)return;const{size:n,anchorX:r,anchorY:o,canvas:a}=i,l=n[0]*(r+.5),c=n[1]*(o-.5),u=this._ctx,_=this.transformPt([0,0]),[f,p]=this.getTransformAngle();u.save(),u.setTransform({m11:1*f,m12:1*p,m21:-1*p,m22:1*f,m41:_[0]-1*l,m42:_[1]+1*c}),u.drawImage(a,0,0),u.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:s,height:i,offsetX:n,offsetY:r,rotation:o,scaleX:a,tintColor:h,url:l}=e;const c=this._resourceManager.getResource(l);if(null==c)return;if((0,x.Bi)(t))this._buildPath(t.rings,!0);else if((0,x.Rg)(t))this._buildPath(t.paths,!0);else if((0,x.ZC)(t))this._buildPath(J(t).rings,!0);else{if(!(0,x.U9)(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const u=this._ctx,_=(0,D.UE)(l)||"src"in c&&(0,D.UE)(c.src);let f,p="getFrame"in c?C(c):c;if(s&&(p=this._colorSubstitutionHelper.applyColorSubstitution(p,s)),this._applyAdditionalRenderProps){_||h&&(p=this._colorSubstitutionHelper.tintImageData(p,h)),f=u.createPattern(p,"repeat");const t=this.transformSize(1);o||(o=0),n?n*=t:n=0,r?r*=t:r=0,i&&(i*=t);const e=i?i/c.height:1,s=a&&i?a*i/c.width:1;if(0!==o||1!==e||1!==s||0!==n||0!==r){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(n,r).scaleSelf(s,e,1),f.setTransform(t)}}else f=u.createPattern(p,"repeat");u.save(),u.fillStyle=f,u.fill("evenodd"),u.restore()}drawPictureStroke(t,e){if(!t)return;let{colorSubstitutions:s,capStyle:i,joinStyle:n,miterLimit:o,tintColor:a,url:l,width:c}=e;const u=this._resourceManager.getResource(l);if(null==u)return;let _;if((0,x.Bi)(t))_=t.rings;else if((0,x.Rg)(t))_=t.paths;else{if(!(0,x.ZC)(t))return(0,x.U9)(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;_=J(t).rings}c||(c=u.width);const f=(0,D.UE)(l)||"src"in u&&(0,D.UE)(u.src);let p="getFrame"in u?C(u):u;s&&(p=this._colorSubstitutionHelper.applyColorSubstitution(p,s)),this._applyAdditionalRenderProps&&(f||a&&(p=this._colorSubstitutionHelper.tintImageData(p,a)));const d=Math.max(this.transformSize((0,h.Lz)(c)),.5),m=d/p.width,g=this._ctx,y=g.createPattern(p,"repeat-y");let P,M;g.save(),this._setCapStyle(i),this._setJoinStyle(n),void 0!==o&&(g.miterLimit=o),g.lineWidth=d;for(let t of _)if(t=(0,r.o8)(t),j(t),t&&!(t.length<=1)){P=this.transformPt(t[0]);for(let e=1;e<t.length;e++){M=this.transformPt(t[e]);const s=q(P,M),i=new DOMMatrix;i.translateSelf(0,P[1]-d/2).scaleSelf(m,m,1).rotateSelf(0,0,90-s),y.setTransform(i),g.strokeStyle=y,g.beginPath(),g.moveTo(P[0],P[1]),g.lineTo(M[0],M[1]),g.stroke(),P=M}}g.restore()}drawGradientFill(t,e){if(!t)return;let s;if((0,x.Bi)(t))s=t.rings;else if((0,x.Rg)(t))s=t.paths;else{if(!(0,x.ZC)(t))return void W().error("Unable to draw gradient fill");s=J(t).rings}this._buildPath(s,!0);const{angle:i,gradientMethod:n,gradientSize:r,gradientSizeUnits:o}=e,a=S.D.CIMGradientFill,c=e.gradientType??a.gradientType,u=-(0,m.kU)(i??0),_=(0,l.Ie)();for(const t of s){const e=t?t.length:0;if(e>1)for(let s=0;s<e;s++){let e=this.transformPt(t[s]);"Linear"!==n&&"Rectangular"!==n||(e=w(e,-u)),(0,l.tK)(_,e)}}const[f,p,d,g]=_,y=this._ctx;switch(y.save(),n){case"Buffered":W().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(p+g)/2,s="Absolute"===o?this.transformSize((0,h.Lz)(r)):(0,D.yX)(r,a.gradientSize)*(d-f),[i,n]="Discrete"===c?[d,d-s]:[f+s,f],l=w([i,t],u),_=w([n,t],u),m=y.createLinearGradient(l[0],l[1],_[0],_[1]);A(m,e),y.fillStyle=m,y.fill("evenodd");break}case"Circular":{const t=(0,l.gX)(_),s=(0,l.ib)(_)/2,i="Absolute"===o?this.transformSize((0,h.Lz)(r)):(0,D.yX)(r,a.gradientSize)*s,[n,u]="Discrete"===c?[s,s-i]:[i,0],f=y.createRadialGradient(t[0],t[1],n,t[0],t[1],u);A(f,e),y.fillStyle=f,y.fill("evenodd");break}case"Rectangular":{const s=(0,l.gX)(_),i=s[0],n=s[1],m=w(s,u),P=(s,i,n,r,o,a,h,l)=>{y.save(),this.pushClipPath(t);const c=w([o,a],u),_=w([h,l],u);y.beginPath(),y.moveTo(m[0],m[1]),y.lineTo(c[0],c[1]),y.lineTo(_[0],_[1]),y.lineTo(m[0],m[1]),y.clip();const f=w([s,i],u),p=w([n,r],u),d=y.createLinearGradient(f[0],f[1],p[0],p[1]);A(d,e),y.fillStyle=d,y.fill("evenodd"),y.restore()};let x="Absolute"===o?this.transformSize((0,h.Lz)(r)):(0,D.yX)(r,a.gradientSize)*((0,l.VL)(_)/2),[M,b]="Discrete"===c?[d,d-x]:[i+x,i];P(M,n,b,n,d,p,d,g),[M,b]="Discrete"===c?[f,f+x]:[i-x,i],P(M,n,b,n,f,g,f,p),x="Absolute"===o?this.transformSize((0,h.Lz)(r)):(0,D.yX)(r,a.gradientSize)*((0,l.uJ)(_)/2);let[S,C]="Discrete"===c?[g,g-x]:[n+x,n];P(i,S,i,C,d,g,f,g),[S,C]="Discrete"===c?[p,p+x]:[n-x,n],P(i,S,i,C,f,p,d,p);break}}y.restore()}drawGradientStroke(t,e){const{capStyle:s,gradientMethod:i,gradientSize:n,gradientSizeUnits:o,joinStyle:a,miterLimit:l,width:c}=e;if(!t||0===c)return;let u;if((0,x.Bi)(t))u=t.rings;else if((0,x.Rg)(t))u=t.paths;else{if(!(0,x.ZC)(t))return void W().error("Unable to draw gradient stroke");u=J(t).rings}const _=e.gradientType??S.D.CIMGradientStroke.gradientType,f=Math.max(this.transformSize((0,h.Lz)(c)),.5),p=this._ctx;let d,m;p.save(),this._setCapStyle(s),this._setJoinStyle(a),void 0!==l&&(p.miterLimit=l),p.lineWidth=f;for(let t of u){if(t=(0,r.o8)(t),j(t),!t||t.length<=1)continue;let s=0;d=this.transformPt(t[0]);for(let e=1;e<t.length;e++){m=this.transformPt(t[e]);const i=m[0]-d[0],n=m[1]-d[1];s+=Math.sqrt(i*i+n*n),d=m}const a="Absolute"===o?this.transformSize((0,h.Lz)(n)):(0,D.yX)(n,S.D.CIMGradientStroke.gradientSize)*("AcrossLine"===i?f:s);let l=0;d=this.transformPt(t[0]);for(let n=1;n<t.length;n++){m=this.transformPt(t[n]);const r=m[0]-d[0],o=m[1]-d[1],h=Math.sqrt(r*r+o*o);let c,u,g,y;switch(i){case"AcrossLine":{const[t,e]=w([r/h,o/h],-Math.PI/2),s=f/2,i="Discrete"===_?s:a-s;c=(d[0]+m[0])/2+t*i,u=(d[1]+m[1])/2+e*i,g=c-t*a,y=u-e*a;break}case"AlongLine":{const t=r/h,e=o/h;"Discrete"===_?(c=d[0]-t*l,u=d[1]-e*l,g=c+t*a,y=u+e*a):(g=d[0]+t*(s-l),y=d[1]+e*(s-l),c=g-t*a,u=y-e*a);break}default:return W().error("Unrecognized gradient method:",i),void p.restore()}const P=p.createLinearGradient(c,u,g,y);A(P,e),p.strokeStyle=P,p.beginPath(),p.moveTo(d[0],d[1]),p.lineTo(m[0],m[1]),p.stroke(),l+=h,d=m}}p.restore()}_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 n=this.transformPt(i[0]);s.moveTo(n[0],n[1]);for(let e=1;e<t;e++)n=this.transformPt(i[e]),s.lineTo(n[0],n[1]);e&&s.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function q(t,e){const s=e[0]-t[0],i=e[1]-t[1];return 180/Math.PI*Math.atan2(i,s)}const J=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;function Z(t,e=1){const s=(0,D.DW)(t),i=(0,D._d)(t.fontStyleName),n=t.fontFamilyName??"arial-unicode-ms",{weight:r,style:o}=i,a=e*(t.height||5),h=(0,D.Bu)(t.horizontalAlignment),l=(0,D.Nl)(t.verticalAlignment),c=(0,D.pM)(t),u=(0,D.pM)(t.haloSymbol),_=null!=u?e*(t.haloSize??0):0,f=(0,D._1)(t.symbol),p=e*((0,D.xo)(t.symbol)||0),d="CIMBackgroundCallout"===t.callout?.type?t.callout.backgroundSymbol:null,m=(0,D.pM)(d),g=(0,D.xo)(d),y=(0,D._1)(d);return{color:c,size:a,horizontalAlignment:h,verticalAlignment:l,font:{family:n,style:(0,D.pV)(o),weight:(0,D.Kn)(r),decoration:s},outline:{size:p||0,color:f},halo:{size:_||0,color:u,style:o},backgroundColor:m,borderLine:null!=g&&null!=y?{size:g,color:y}:null,pixelRatio:1,premultiplyColors:!0}}function j(t){let e,s,i,n,r,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],s=t[a][1]-o[1],n=0!==e?s/e:Math.PI/2,void 0!==i&&Math.abs(n-i)<=1e-4?(t.splice(a-1,1),o=r):(r=o,o=t[a],a++),i=n}var K=s(59868),Q=s(13195);const tt=Math.PI,et=tt/2,st=Math.PI/180,it=96/72,nt=()=>o.A.getLogger("esri.symbols.cim.CIMSymbolHelper");function rt(t){let e;switch(t.type){case"cim":return t.data;case"web-style":return t;case"simple-marker":{const s=ut.fromSimpleMarker(t);if(!s)throw new Error("InternalError: Cannot convert symbol to CIM");e=s;break}case"picture-marker":e=ut.fromPictureMarker(t);break;case"simple-line":e=ut.fromSimpleLineSymbol(t);break;case"simple-fill":e=ut.fromSimpleFillSymbol(t);break;case"picture-fill":e=ut.fromPictureFillSymbol(t);break;case"text":e=ut.fromTextSymbol(t)}return{type:"CIMSymbolReference",symbol:e}}function ot(t,e,s){switch(e.type){case"CIMSymbolReference":return ot(t,e.symbol,s);case"CIMPointSymbol":null==s&&(s={x:0,y:0}),t.drawSymbol(e,s);break;case"CIMLineSymbol":null==s&&(s={paths:[[[0,0],[10,0]]]}),t.drawSymbol(e,s);break;case"CIMPolygonSymbol":null==s&&(s={rings:[[[0,0],[0,10],[10,10],[10,0],[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 d.W;t.drawMarker(e,s);break}}return t.envelope()}function at(t){if(!t)return 0;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAtExtremities":case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementAtRatioPositions":case"CIMMarkerPlacementOnLine":case"CIMMarkerPlacementOnVertices":return Math.abs(t.offset??0);default:return 0}}function ht(t){if(!t)return 0;let e=0;for(const s of t)e+=lt(s);return e}function lt(t){if(!t)return 0;if((0,D.St)(t))return t.inflateSize??256;switch(t.type){case"CIMGeometricEffectArrow":return Math.abs(.5*t.width);case"CIMGeometricEffectBuffer":return Math.abs(t.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(t.length);case"CIMGeometricEffectJog":return Math.abs(.5*t.length);case"CIMGeometricEffectMove":return Math.max(Math.abs((0,D.$w)(t.offsetX)),Math.abs((0,D.$w)(t.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(t.offset);case"CIMGeometricEffectRadial":return Math.abs(t.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(t.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(t.fromWidth),Math.abs(t.toWidth));case"CIMGeometricEffectWave":return Math.abs(t.amplitude);case"CIMGeometricEffectDonut":return Math.abs(t.width)}}class ct{static getSymbolInflateSize(t,e,s,i,n){return t||(t=[0,0,0,0]),e?this._getInflateSize(t,e,s,i,n):t}static safeSize(t){const e=Math.max(Math.abs(t[0]),Math.abs(t[2])),s=Math.max(Math.abs(t[1]),Math.abs(t[3]));return Math.sqrt(e*e+s*s)}static _vectorMarkerBounds(t,e,s,i){let n=!0;const r=(0,l.vt)();if(e?.markerGraphics)for(const o of e.markerGraphics){const e=[0,0,0,0];o.geometry&&((0,c.Rg)(r,o.geometry),e[0]=0,e[1]=0,e[2]=0,e[3]=0,this.getSymbolInflateSize(e,o.symbol,s,0,i),r[0]+=e[0],r[1]+=e[1],r[2]+=e[2],r[3]+=e[3],n?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],n=!1):(t[0]=Math.min(t[0],r[0]),t[1]=Math.min(t[1],r[1]),t[2]=Math.max(t[2],r[2]),t[3]=Math.max(t[3],r[3])))}return t}static _getInflateSize(t,e,s,i,n){if(function(t){return void 0!==t.symbolLayers}(e)){const r=this._getLayersInflateSize(t,e.symbolLayers,s,i,n),o=ht(e.effects);return o>0&&(r[0]-=o,r[1]-=o,r[2]+=o,r[3]+=o),r}return this._getTextInflatedSize(t,e,n)}static _getLayersInflateSize(t,e,s,i,n){let r=!0;if(!e)return t;for(const o of e){if(!o)continue;let e=[0,0,0,0];switch(o.type){case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=o;let s=t.width;null!=s&&("Square"===t.capStyle||"Miter"===t.joinStyle?s/=1.4142135623730951:s/=2,e[0]=-s,e[1]=-s,e[2]=s,e[3]=s);break}case"CIMCharacterMarker":case"CIMVectorMarker":case"CIMPictureMarker":{const t=o;if("CIMVectorMarker"===o.type){const t=o;if(e=this._vectorMarkerBounds(e,t,s,n),t.frame){const s=(t.frame.xmin+t.frame.xmax)/2,i=(t.frame.ymin+t.frame.ymax)/2;if(e[0]-=s,e[1]-=i,e[2]-=s,e[3]-=i,null!=t.size){const s=t.size/(t.frame.ymax-t.frame.ymin);e[0]*=s,e[1]*=s,e[2]*=s,e[3]*=s}}}else if("CIMPictureMarker"===o.type){const i=o,n=s.getResource(i.url);let r=1;if(null!=n&&n.height&&(r=n.width/n.height),null!=t.size){const s=t.size/2,n=t.size*r*(i.scaleX??1)/2;e=[-n,-s,n,s]}}else if(null!=t.size){const s=t.size/2;e=[-s,-s,s,s]}if(t.anchorPoint){let s,i;"Absolute"===t.anchorPointUnits?(s=t.anchorPoint.x,i=t.anchorPoint.y):(s=t.anchorPoint.x*(e[2]-e[0]),i=t.anchorPoint.y*(e[3]-e[1]));const n=1.25*Math.sqrt(s*s+i*i);e[0]-=n,e[1]-=n,e[2]+=n,e[3]+=n}let r=(0,D.$w)(t.rotation);if(t.rotateClockwise&&(r=-r),i&&(r-=i),r){const t=st*r,s=Math.cos(t),i=Math.sin(t),n=(0,l.vt)([Q.MG,Q.MG,-Q.MG,-Q.MG]);(0,l.tK)(n,[e[0]*s-e[1]*i,e[0]*i+e[1]*s]),(0,l.tK)(n,[e[0]*s-e[3]*i,e[0]*i+e[3]*s]),(0,l.tK)(n,[e[2]*s-e[1]*i,e[2]*i+e[1]*s]),(0,l.tK)(n,[e[2]*s-e[3]*i,e[2]*i+e[3]*s]),e=n}let a=(0,D.$w)(t.offsetX),h=(0,D.$w)(t.offsetY);if(i){const t=st*i,e=Math.cos(t),s=Math.sin(t),n=a*s+h*e;a=a*e-h*s,h=n}e[0]+=a,e[1]+=h,e[2]+=a,e[3]+=h;const c=at(t.markerPlacement);c>0&&(e[0]-=c,e[1]-=c,e[2]+=c,e[3]+=c);break}}const a=ht(o.effects);a>0&&(e[0]-=a,e[1]-=a,e[2]+=a,e[3]+=a),r?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],r=!1):(t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3]))}return t}static _getTextInflatedSize(t,e,s){const i=function(t){return(0,h.PN)(Math.round((0,h.Lz)(t)))}(e.height??S.D.CIMTextSymbol.height);if(t[0]=-i/2,t[1]=-i/2,t[2]=i/2,t[3]=i/2,!s)return t;const n=s.get(e);if(!n)return t;if(!n.glyphMosaicItems.glyphs.length)return t;const{lineGapType:r,lineGap:o}=e,a=r?((t,e,s)=>{switch(t){case"ExtraLeading":return 1+e/s;case"Multiple":return e;case"Exact":return e/s}})(r,o??0,i):0,l="CIMBackgroundCallout"===e.callout?.type,c=(0,X.Tl)(n.glyphMosaicItems,{scale:i/z.eG,angle:(0,D.$w)(e.angle),xOffset:(0,D.$w)(e.offsetX),yOffset:(0,D.$w)(e.offsetY),horizontalAlignment:e.horizontalAlignment,verticalAlignment:e.verticalAlignment,maxLineWidth:Y(e.lineWidth),lineHeight:z.DY*Math.max(.25,Math.min(a||1,4)),decoration:e.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:l}).boundsT,u=Math.sqrt(c.width*c.width+c.height*c.height);return t[0]-=c.x+u,t[1]-=c.y-u,t[2]+=c.x+u,t[3]+=-c.y+u,t}}class ut{static getEnvelope(t,e,s){if(!t)return null;const i=new V(s);if(Array.isArray(t)){let s;for(const n of t)s?s.union(ot(i,n,e)):s=ot(i,n,e);return s}return ot(i,t,e)}static getTextureInfo(t,e,s,i,n){const r=i??this.getEnvelope(t,null,e);if(!r)return[0,0,0,0,1];const o=Math.max(r.width,r.height)*it;let a=null!=n?Math.max(n/o,1):1;a*=it,r.x*=a,r.y*=a,r.width*=a,r.height*=a,r.width=Math.max(Math.ceil(r.x+r.width)-Math.floor(r.x),1)-1,r.height=Math.max(Math.ceil(r.y+r.height)-Math.floor(r.y),1)-1;let h=r.x+.5*r.width,l=r.y+.5*r.height;return h+=r.x-Math.floor(r.x),l+=r.y-Math.floor(r.y),i||(r.width+=s,r.height+=s,h+=s/2,l+=s/2),[r.width,r.height,h,l,a]}static getTextureAnchor(t,e,s){const[i,n,r,o,a]=this.getTextureInfo(t,e,2,null,s);return[-r/i,-o/n,n/a*it]}static rasterize(t,e,s,i,n=!0,r){const[o,a,h,l,c]=this.getTextureInfo(e,i,2,s,r);t.width=o,t.height=a;const u=t.getContext("2d",{willReadFrequently:!0}),_=B.createScale(c,-c);_.translate(.5*o-h,.5*a+l);const f=new $(u,i,_);switch(e.type){case"CIMPointSymbol":{const t={type:"point",x:0,y:0};f.drawSymbol(e,t);break}case"CIMVectorMarker":{const t=new d.W;f.drawMarker(e,t);break}}const p=u.getImageData(0,0,t.width,t.height),m=new Uint8Array(p.data);if(n){let t;for(let e=0;e<m.length;e+=4)t=m[e+3]/255,m[e]=m[e]*t,m[e+1]=m[e+1]*t,m[e+2]=m[e+2]*t}return[m,t.width,t.height,-h/o,-l/a]}static fromTextSymbol(t){const{text:e}=t;return{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:ut.createCIMTextSymbolfromTextSymbol(t),textString:e}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(t){const{height:e,outline:s,width:i,xoffset:n,xscale:r,yoffset:o,yscale:a}=t,h=[],l={type:"CIMPolygonSymbol",symbolLayers:h};if(s){const t=Ct(s);t&&h.push(t)}let c=t.url;"esriPFS"===t.type&&t.imageData&&(c=t.imageData);const u="angle"in t?t.angle??0:0,_=(i??0)*(r||1),f=(e??0)*(a||1);return h.push({type:"CIMPictureFill",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:c,height:f,width:_,offsetX:(0,D.$w)(n),offsetY:(0,D.$w)(o),rotation:(0,D.$w)(-u),colorSubstitutions:null}),l}static fromSimpleFillSymbol(t){const{color:e,style:s,outline:i}=t,n=[],o={type:"CIMPolygonSymbol",symbolLayers:n};if(i){const t=Ct(i);t&&n.push(t)}if(s&&"solid"!==s&&"none"!==s&&"esriSFSSolid"!==s&&"esriSFSNull"!==s){const t={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:gt(e),capStyle:"Butt",joinStyle:"Miter",width:.75}]};let i=0;const o=(0,h.PN)(St(s)?8:10);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}n.push({type:"CIMHatchFill",lineSymbol:t,offsetX:0,offsetY:0,rotation:i,separation:o}),"cross"===s||"esriSFSCross"===s?n.push({type:"CIMHatchFill",lineSymbol:(0,r.o8)(t),offsetX:0,offsetY:0,rotation:90,separation:o}):"diagonal-cross"!==s&&"esriSFSDiagonalCross"!==s||n.push({type:"CIMHatchFill",lineSymbol:(0,r.o8)(t),offsetX:0,offsetY:0,rotation:45,separation:o})}else!s||"solid"!==s&&"esriSFSSolid"!==s||n.push({type:"CIMSolidFill",enable:!0,color:gt(e)});return o}static fromSimpleLineSymbol(t){const{cap:e,color:s,join:i,marker:n,miterLimit:r,style:o,width:a}=t;let h=null;"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(h=[{type:"CIMGeometricEffectDashes",dashTemplate:Mt(o,e),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const l=[];if(n){let t;switch(n.placement){case"begin-end":t="Both";break;case"begin":t="JustBegin";break;case"end":t="JustEnd";break;default:t="None"}const e=ut.fromSimpleMarker(n,a,s).symbolLayers[0];e.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,keepUpright:!1,offset:0,extremityPlacement:t,offsetAlongLine:0},l.push(e)}return l.push({type:"CIMSolidStroke",color:"none"!==o&&"esriSLSNull"!==o?gt(s):[0,0,0,0],capStyle:ft(e),joinStyle:pt(i),miterLimit:r,width:a,effects:h}),{type:"CIMLineSymbol",symbolLayers:l}}static fromPictureMarker(t){const{angle:e,height:s,width:i,xoffset:n,yoffset:r}=t;let o=t.url;return"esriPMS"===t.type&&t.imageData&&(o=t.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:s,width:i,offsetX:(0,D.$w)(n),offsetY:(0,D.$w)(r),rotation:(0,D.$w)(-e)}]}}static createCIMTextSymbolfromTextSymbol(t){const{angle:e,color:s,font:i,haloColor:r,haloSize:o,horizontalAlignment:a,kerning:h,lineWidth:l,text:c,verticalAlignment:u,xoffset:_,yoffset:f,backgroundColor:p,borderLineColor:d,borderLineSize:m}=t;let g,y,P,x,M,b;i&&(g=i.family,y=i.style,P=i.weight,x=i.size,M=i.decoration);let S=!1;return c&&(S=n(c)[1]),(p||m)&&(b={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:gt(p)},{type:"CIMSolidStroke",enable:!0,color:gt(d),width:m??0}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMTextSymbol",angle:e,blockProgression:2,depth3D:1,extrapolateBaselines:!0,fontEffects:0,fontEncoding:1,fontFamilyName:g||"Arial",fontStyleName:yt(y,P),fontType:0,haloSize:o,height:x,hinting:1,horizontalAlignment:dt(a??"center"),kerning:h,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:l,offsetX:(0,D.$w)(_),offsetY:(0,D.$w)(f),strikethrough:"line-through"===M,underline:"underline"===M,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:gt(s)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:gt(r)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:S?1:0,verticalAlignment:mt(u??"baseline"),verticalGlyphOrientation:0,wordSpacing:100,billboardMode3D:2,callout:b}}static createPictureMarkerRasterizationParam(t){const{angle:e,height:s,width:i,xoffset:n,yoffset:r}=t,o=t.url??t.source?.url??t.source?.imageData;return o?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:o,size:s,width:i,offsetX:(0,D.$w)(n),offsetY:(0,D.$w)(r),rotation:(0,D.$w)(-e)}}:null}static createPictureFillRasterizationParam(t){const{width:e,height:s,xoffset:i,yoffset:n,url:r}=t;return r?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureFill",enable:!0,scaleX:1,textureFilter:"Picture",tintColor:null,url:r,width:e,height:s,offsetX:(0,D.$w)(i),offsetY:(0,D.$w)(n),rotation:0}}:null}static fromSimpleMarker(t,e,s){const{style:i}=t,n=t.color??s;if("path"===i||"esriSMSPath"===i){const e=[];if("outline"in t&&t.outline){const s=t.outline;e.push({type:"CIMSolidStroke",enable:!0,width:s.width,color:gt(s.color),path:t.path})}e.push({type:"CIMSolidFill",enable:!0,color:gt(n),path:t.path});const[s,i]=bt("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-(0,D.$w)(t.angle),size:(0,D.$w)(t.size||6),offsetX:(0,D.$w)(t.xoffset),offsetY:(0,D.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:s,markerGraphics:[{type:"CIMMarkerGraphic",geometry:i,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]}}const r=[];let o,a,h=t.size;if("outline"in t&&t.outline&&"none"!==t.outline.style&&"esriSLSNull"!==t.outline.style){const e=t.outline,s="solid"!==e.style&&"esriSLSSolid"!==e.style;[o,a]=s?bt(i,t.size):bt(i);const n=e.width??K.A7.width;if(s){const e=n/t.size,s=(o.xmax-o.xmin)*e/2,i=(o.ymax-o.ymin)*e/2;o.xmin-=s,o.xmax+=s,o.ymin-=i,o.ymax+=i,h&&(h+=n)}const l="cross"!==t.style&&"x"!==t.style||"dot"===t?.outline.style||"short-dot"===t?.outline.style?"HalfGap":"FullPattern",c=s?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:Mt(e.style,null).map(t=>e.width&&e.width>0?t*e.width:t),lineDashEnding:l,controlPointEnding:"FullPattern"}]:void 0;r.push({type:"CIMSolidStroke",capStyle:s?"Round":"Butt",enable:!0,width:n,color:gt(e.color),effects:c})}else!e||"line-marker"!==t.type||"cross"!==t.style&&"x"!==t.style?[o,a]=bt(i):([o,a]=bt(i),r.push({type:"CIMSolidStroke",enable:!0,width:e,color:gt(n)}));r.push({type:"CIMSolidFill",enable:!0,color:gt(n)});const l={type:"CIMPolygonSymbol",symbolLayers:r};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,D.$w)(-t.angle),size:(0,D.$w)(h||6*e),offsetX:(0,D.$w)(t.xoffset),offsetY:(0,D.$w)(t.yoffset),scaleSymbolsProportionally:!1,frame:o,markerGraphics:[{type:"CIMMarkerGraphic",geometry:a,symbol:l}]}]}}static fromCIMHatchFill(t,e){const s=e*(t.separation??S.D.CIMHatchFill.separation),i=s/2,n=(0,r.o8)(t.lineSymbol);n.symbolLayers?.forEach(t=>{switch(t.type){case"CIMSolidStroke":null!=t.width&&(t.width*=e),t.effects?.forEach(t=>{if("CIMGeometricEffectDashes"===t.type){const s=t.dashTemplate;t.dashTemplate=s?.map(t=>t*e)}});break;case"CIMVectorMarker":{null!=t.size&&(t.size*=e);const s=t.markerPlacement;null!=s&&"placementTemplate"in s&&(s.placementTemplate=s.placementTemplate.map(t=>t*e));break}}});let o=this._getLineSymbolPeriod(n)||4;for(;o<4;)o*=2;const a=o/2;return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-a,xmax:a,ymin:-i,ymax:i},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-a,0],[a,0]]]},symbol:n}],size:s}}static async normalizeSymbolAndFetchResources(t,e,s=null){if(!t)return;const i=[];if("effects"in t&&t.effects)for(const e of t.effects)i.push((0,p.ai)(e));async function n(t){if("CIMTextSymbol"!==t.type)return;const{fontFamilyName:s,fontStyleName:i}=t;if("calcitewebcoreicons"===s?.toLowerCase())return;const{style:n,weight:r}=(0,D._d)(i),o=(0,D.DW)(t),a=new f.A({family:s,style:n,weight:r,decoration:o});try{await e.loadFont(a)}catch{nt().error(`Unsupported font ${s} in CIM symbol`)}}i.push(n(t)),_t(t,t=>{if(t.effects)for(const e of t.effects)i.push((0,p.ai)(e));if("CIMVectorMarker"===t.type){for(const e of t.markerGraphics)(0,u.Ed)(e.geometry)&&(e.geometry=(0,_.GS)(e.geometry,{maxDeviation:.01}));t.markerPlacement&&i.push((0,p.g1)(t.markerPlacement))}"url"in t&&t.url&&i.push(e.fetchResource(t.url,{signal:s})),"symbol"in t&&i.push(n(t.symbol))}),await Promise.all(i)}static _getLineSymbolPeriod(t){if(t){const e=this._getEffectsRepeat(t.effects);if(e)return e;if(t.symbolLayers)for(const e of t.symbolLayers)if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;switch(e.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{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:nt().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={...t};s.markerPlacement=null,s.anchorPoint=null;const i=Math.abs(e.stepX),n=Math.abs(e.stepY),r=(e.randomness??100)/100;let o,l,c,u;if("Random"===e.gridType){const t=(0,h.PN)(z.yv),s=Math.max(Math.floor(t/i),1),_=Math.max(Math.floor(t/n),1);o=s*i/2,l=_*n/2,c=2*l;const f=new a.A(e.seed),p=r*i/1.5,d=r*n/1.5;u=[];for(let t=0;t<s;t++)for(let e=0;e<_;e++){const s=t*i-o+p*(.5-f.getFloat()),r=e*n-l+d*(.5-f.getFloat());u.push({x:s,y:r}),0===t&&u.push({x:s+2*o,y:r}),0===e&&u.push({x:s,y:r+2*l})}}else!0===e.shiftOddRows?(o=i/2,l=n,c=2*n,u=[{x:-o,y:0},{x:o,y:0},{x:0,y:l},{x:0,y:-l}]):(o=i/2,l=n/2,c=n,u=[{x:-i,y:0},{x:0,y:-n},{x:-i,y:-n},{x:0,y:0},{x:i,y:0},{x:0,y:n},{x:i,y:n},{x:-i,y:n},{x:i,y:-n}]);return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-o,xmax:o,ymin:-l,ymax:l},markerGraphics:u.map(t=>({type:"CIMMarkerGraphic",geometry:t,symbol:{type:"CIMPointSymbol",symbolLayers:[s]}})),size:c}}}function _t(t,e){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const s=t.symbolLayers;if(!s)return;for(const t of s)if(e(t),"CIMVectorMarker"===t.type){const s=t.markerGraphics;if(!s)continue;for(const t of s)if(t){const s=t.symbol;s&&_t(s,e)}}break}}}const ft=t=>{if(!t)return"Butt";switch(t){case"butt":return"Butt";case"square":return"Square";case"round":return"Round"}},pt=t=>{if(!t)return"Miter";switch(t){case"miter":return"Miter";case"round":return"Round";case"bevel":return"Bevel"}},dt=t=>{if(null==t)return"Center";switch(t){case"left":return"Left";case"right":return"Right";case"center":return"Center"}},mt=t=>{if(null==t)return"Center";switch(t){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},gt=t=>{if(!t)return[0,0,0,0];const{r:e,g:s,b:i,a:n}=t;return[e,s,i,255*n]},yt=(t,e)=>{const s=Pt(e),i=xt(t);return s&&i?`${s}-${i}`:`${s}${i}`},Pt=t=>{if(!t)return"";switch(t.toLowerCase()){case"bold":case"bolder":return"bold"}return""},xt=t=>{if(!t)return"";switch(t.toLowerCase()){case"italic":case"oblique":return"italic"}return""},Mt=(t,e)=>{const s=.001,i="butt"===e;switch(t){case"dash":case"esriSLSDash":return i?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return i?[4,3,1,3]:[3,4,s,4];case"dot":case"esriSLSDot":return i?[1,3]:[s,4];case"long-dash":case"esriSLSLongDash":return i?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return i?[8,3,1,3]:[7,4,s,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return i?[8,3,1,3,1,3]:[7,4,s,4,s,4];case"short-dash":case"esriSLSShortDash":return i?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return i?[4,1,1,1]:[3,2,s,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return i?[4,1,1,1,1,1]:[3,2,s,2,s,2];case"short-dot":case"esriSLSShortDot":return i?[1,1]:[s,2];case"solid":case"esriSLSSolid":case"none":return nt().error("Unexpected: style does not require rasterization"),[0,0];default:return nt().error(`Tried to rasterize SLS, but found an unexpected style: ${t}!`),[0,0]}},bt=(t,e=100)=>{const s=e/2;let i,n;const r=t;if("circle"===r||"esriSMSCircle"===r){const t=.25;let e=Math.acos(1-t/s),r=Math.ceil(tt/e/4);0===r&&(r=1),e=et/r,r*=4;const o=[];o.push([s,0]);for(let t=1;t<r;t++)o.push([s*Math.cos(t*e),-s*Math.sin(t*e)]);o.push([s,0]),i={rings:[o]},n={xmin:-s,ymin:-s,xmax:s,ymax:s}}else if("cross"===r||"esriSMSCross"===r){const t=0;i={paths:[[[t,s],[t,-s]],[[s,t],[-s,t]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s}}else if("diamond"===r||"esriSMSDiamond"===r)i={rings:[[[-s,0],[0,s],[s,0],[0,-s],[-s,0]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s};else if("square"===r||"esriSMSSquare"===r)i={rings:[[[-s,-s],[-s,s],[s,s],[s,-s],[-s,-s]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s};else if("x"===r||"esriSMSX"===r)i={paths:[[[s,s],[-s,-s]],[[s,-s],[-s,s]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s};else if("triangle"===r||"esriSMSTriangle"===r){const t=.5773502691896257*e,s=-t,r=2/3*e,o=r-e;i={rings:[[[s,o],[0,r],[t,o],[s,o]]]},n={xmin:s,ymin:o,xmax:t,ymax:r}}else"arrow"===r&&(i={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},n={xmin:-s,ymin:-s,xmax:s,ymax:s});return[n,i]},St=t=>"vertical"===t||"horizontal"===t||"cross"===t||"esriSFSCross"===t||"esriSFSVertical"===t||"esriSFSHorizontal"===t;function Ct(t){if(!t)return null;let e=null;const{cap:s,color:i,join:n,miterLimit:r,style:o,width:a}=t;return"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(e=[{type:"CIMGeometricEffectDashes",dashTemplate:Mt(o,s),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==o&&"none"!==o?gt(i):[0,0,0,0],capStyle:ft(s),joinStyle:pt(n),miterLimit:r,width:a,effects:e}}},35521(t,e,s){s.d(e,{$u:()=>n});var i=s(28076);const n=1024;i.D.CIMSolidStroke.capstyle,i.D.CIMSolidStroke.joinstyle,i.D.CIMSolidStroke.miterlimit},63933(t,e,s){s.d(e,{Dy:()=>a,UD:()=>r,iT:()=>o,xy:()=>n});var i=s(53966);function n(t){if(!t)return 0;switch(t){case"Left":case"left":return-1;case"Right":case"right":return 1;case"Justify":return i.A.getLogger("esri.views.2d.engine.webgl.alignmentUtils").warnOnce("Horizontal alignment 'justify' is not implemented. Falling back to 'center'."),0;case"Center":case"center":return 0}}function r(t){if(!t)return 0;switch(t){case"Top":case"top":return 1;case"Center":case"middle":return 0;case"Baseline":case"baseline":return 2;case"Bottom":case"bottom":return-1}}function o(t){switch(t){case 1:case"right":return-1;case 0:case"center":return 0;case-1:case"left":return 1;default:return console.debug(`Found invalid horizontal alignment ${t}`),0}}function a(t){switch(t){case 1:case"top":return 1;case 0:case"middle":return 0;case-1:case 2:case"baseline":case"bottom":return-1;default:return console.debug(`Found invalid vertical alignment ${t}`),0}}},15660(t,e,s){s.d(e,{A:()=>n});var i=s(88340);class n{constructor(t,e,s,n){this.transformedX=0,this.transformedY=0,this.center=(0,i.fA)(t,e),this.centerT=(0,i.vt)(),this.halfWidth=s/2,this.halfHeight=n/2,this.width=s,this.height=n}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 n(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]),n=(t.halfWidth+this.halfWidth+e)/s,r=(t.halfHeight+this.halfHeight+e)/i,o=Math.min(n,r);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,n=Math.max(this.ymax,t.ymax)-s,r=e+i/2,o=s+n/2;this.width=i,this.height=n,this.halfWidth=i/2,this.halfHeight=n/2,this.x=r,this.y=o}static deserialize(t){const e=t.readF32(),s=t.readF32(),i=t.readInt32(),r=t.readInt32();return new n(e,s,i,r)}}},75434(t,e,s){s.d(e,{Tl:()=>y});var i=s(16905),n=s(85560),r=s(37585),o=s(88340),a=s(63933),h=s(18989),l=s(15660);const c=Math.PI/180;class u{constructor(t,e,s,i){this._rotationT=(0,n.vt)(),this._transform=(0,n.vt)(),this._angle=0,this._bounds=null;const{mosaicItem:r,rect:o,shaping:a,code:h}=s,l=r.rect;this.width=0===h?o.width:l.width*i,this.height=0===h?o.height:l.height*i,this.x=i*(t+a.xOffset+o.left),this.y=i*(e+a.yOffset-o.top),this.textureBinding=r.textureBinding,this.texcoords={topLeft:[l.x,l.y],topRight:[l.x+l.width,l.y],bottomLeft:[l.x,l.y+l.height],bottomRight:[l.x+l.width,l.y+l.height]}}set angle(t){this._angle=t,(0,i.$0)(this._rotationT,-t),this._offsets=this._bounds=null}get angle(){return this._angle}get offsets(){if(!this._offsets){const{x:t,y:e,width:s,height:o}=this,a=(0,i.$0)((0,n.vt)(),-this.angle),h=(0,i.lw)((0,n.vt)(),a,this._transform);this._offsets={topLeft:(0,r.l0)([0,0],[t,e],h),topRight:(0,r.l0)([0,0],[t+s,e],h),bottomLeft:(0,r.l0)([0,0],[t,e+o],h),bottomRight:(0,r.l0)([0,0],[t+s,e+o],h)}}return this._offsets}get bounds(){if(this.width<=0)return null;if(!this._bounds){const t=this.offsets;let e=1/0,s=1/0,i=-1/0,n=-1/0;for(const[r,o]of[t.topLeft,t.topRight,t.bottomLeft,t.bottomRight])e=Math.min(e,r),s=Math.min(s,o),i=Math.max(i,r),n=Math.max(n,o);const r=i-e,o=n-s,a=e+r/2,h=s+o/2;this._bounds=new l.A(a,h,r,o)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}}const _=(t,e)=>({code:0,mosaicItem:{rect:new h.A(0,0,11,8),sdf:!0,page:0,textureBinding:e},rect:{height:4,width:t,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0}});function f(t,e){return t.forEach(t=>(0,r.l0)(t,t,e)),{topLeft:t[0],topRight:t[1],bottomLeft:t[2],bottomRight:t[3]}}class p{constructor(t,e,s,i){this._rotation=0,this._decorate(t,e,s,i),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=e.length>1,this._hasRotation=0!==s.angle,this._transform=this._createGlyphTransform(this.bounds,s),this._borderLineSizePx=s.borderLineSizePx,(s.borderLineSizePx||s.hasBackground)&&([this.bounds,this.textBox]=this.shapeBackground(this._transform));for(const e of t)e.setTransform(this._transform)}setRotation(t){if(0===t&&0===this._rotation)return;this._rotation=t;const e=this._transform,s=(0,i.$0)((0,n.vt)(),t);(0,i.lw)(e,s,e);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,e,s,i){if(!s.decoration||"none"===s.decoration||!t.length)return;const n=s.scale,r="underline"===s.decoration?i?.baseline??26:i?.midline??16,o=t[0].textureBinding;for(const s of e){const e=s.startX*n,i=s.startY*n,a=(s.width+s.glyphWidthEnd)*n;t.push(new u(e,i+r*n,_(a,o),1))}}shapeBackground(t){const e=(1.5+(this._borderLineSizePx||0))/2,s=this._borderLineSizePx?e:0,{xmin:i,ymin:n,xmax:r,ymax:o,x:a,y:h,width:c,height:u}=this.bounds,_=[i-8,n-8],p=[r+8,n-8],d=[i-8,o+8],m=[r+8,o+8],g=f([[_[0]-e,_[1]-e],[p[0]+e,p[1]-e],[_[0]+s,_[1]+s],[p[0]-s,p[1]+s]],t),y=f([[d[0]+s,d[1]-s],[m[0]-s,m[1]-s],[d[0]-e,d[1]+e],[m[0]+e,m[1]+e]],t),P=f([[_[0]-e,_[1]-e],[_[0]+s,_[1]+s],[d[0]-e,d[1]+e],[d[0]+s,d[1]-s]],t),x=f([[p[0]-s,p[1]+s],[p[0]+e,p[1]-e],[m[0]-s,m[1]-s],[m[0]+e,m[1]+e]],t),M={main:f([_,p,d,m],t),top:g,bot:y,left:P,right:x};return[new l.A(a,h,c+2*e,u+2*e),M]}get boundsT(){const t=this.bounds,e=(0,r.hZ)((0,o.vt)(),t.x,t.y);if((0,r.l0)(e,e,this._transform),this._hasRotation){const s=Math.max(t.width,t.height);return new l.A(e[0],e[1],s,s)}return new l.A(e[0],e[1],t.width,t.height)}_createBounds(t){let e=1/0,s=1/0,i=0,n=0;for(const r of t)e=Math.min(e,r.offsets.topLeft[0]),s=Math.min(s,r.offsets.topLeft[1]),i=Math.max(i,r.offsets.bottomRight[0]),n=Math.max(n,r.offsets.bottomRight[1]);const r=i-e,o=n-s;return new l.A(e+r/2,s+o/2,r,o)}_createGlyphTransform(t,e){const s=c*e.angle,a=(0,n.vt)(),h=(0,o.vt)();return(0,i.Tl)(a,a,(0,r.hZ)(h,e.xOffset,-e.yOffset)),e.useCIMAngleBehavior?(0,i.e$)(a,a,s):((0,i.Tl)(a,a,(0,r.hZ)(h,t.x,t.y)),(0,i.e$)(a,a,s),(0,i.Tl)(a,a,(0,r.hZ)(h,-t.x,-t.y))),a}}class d{constructor(t,e,s,i,n,r){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].rect.width),this.width=i,this.yMin=n,this.yMax=r}}const m=t=>10===t,g=t=>32===t;function y(t,e){const s=e.scale,i=new Array,n=t.sdfPadding,{faceInfo:r,glyphs:o,isRightToLeft:h}=t,l=function(t,e,s){const i=new Array,n=1/s.scale,r=s.maxLineWidth*n,o=e?t.length-1:0,a=e?-1:t.length,h=e?-1:1;let l=o,c=0,u=0,_=l,f=_,p=0,y=1/0,P=0;for(;l!==a;){const{code:e,rect:s,shaping:n}=t[l],a=Math.abs(s.top);if(m(e)||g(e)||(y=Math.min(y,a),P=Math.max(P,a+s.height)),m(e))l!==o&&(i.push(new d(t,_,l-h,c,y===1/0?0:y,P)),y=1/0,P=0),c=0,_=l+h,f=l+h,u=0;else if(g(e))f=l+h,u=0,p=n.xAdvance,c+=n.xAdvance;else if(c>r){if(f!==_){const e=f-2*h;c-=p,i.push(new d(t,_,e,c-u,y,P)),y=1/0,P=0,_=f,c=u}else i.push(new d(t,_,l-h,c,y,P)),y=1/0,P=0,_=l,f=l,c=0;c+=n.xAdvance,u+=n.xAdvance}else c+=n.xAdvance,u+=n.xAdvance;l+=h}const x=new d(t,_,l-h,c,y,P);return x.start>=0&&x.end<t.length&&i.push(x),i}(o,h,e),c=l.length?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,n=t[0].yMin;return{x:0,y:n,height:t[t.length-1].yMax+e.lineHeight*(t.length-1)+i-n,width:s}}(l,e):{y:0,height:0},_=(0,a.xy)(e.horizontalAlignment),f=(0,a.UD)(e.verticalAlignment),y=2===f?1:0,P=y?0:f-1,x=(1-y)*-c.y+P*(c.height/2)+-22*y;for(let r=0;r<l.length;r++){const{start:a,end:h,width:c}=l[r];let f=-1*(_+1)*(c/2)-n;const p=(t.isRightToLeft?l.length-1-r:r)*e.lineHeight+x-n;l[r].startX=f,l[r].startY=p;for(let t=a;t<=h;t++){const e=o[t];if(m(e.code))continue;const n=new u(f,p,e,s);f+=e.shaping.xAdvance,i.push(n)}}return new p(i,l,e,r)}}}]);
|