@agrotools1/at-components 0.2.3 → 0.2.5
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/dist/AGraphicContainer-d82e96aa.js +109 -0
- package/dist/APIKeyMixin-2ee64e59.js +19 -0
- package/dist/Analysis-449f84c5.js +31 -0
- package/dist/ArcGISCachedService-a838709f.js +47 -0
- package/dist/ArcGISService-7e5e8710.js +25 -0
- package/dist/AreaMeasurement2D-971dad40.js +405 -0
- package/dist/AreaMeasurement3D-48bc0242.js +488 -0
- package/dist/AttachmentInfo-ad88d558.js +34 -0
- package/dist/AttachmentQuery-c86dac15.js +18 -0
- package/dist/AttributeStore-3851ad0b.js +1707 -0
- package/dist/BaseDynamicLayerView2D-02baa49a.js +63 -0
- package/dist/BingMapsLayer-67c70069.js +112 -0
- package/dist/Bitmap-d455f554.js +128 -0
- package/dist/BitmapContainer-c78799ad.js +23 -0
- package/dist/BlendLayer-246e4998.js +13 -0
- package/dist/BoundsStore-b18f4e4e.js +63 -0
- package/dist/BufferObject-22d914df.js +100 -0
- package/dist/BufferView-5272765e.js +683 -0
- package/dist/BuildingSceneLayer-f08d5129.js +535 -0
- package/dist/Button-335b8469.js +36 -0
- package/dist/CSVLayer-40c0bd0e.js +208 -0
- package/dist/CSVSourceWorker-b8df4580.js +367 -0
- package/dist/CardWithInsights/CardWithInsights.d.ts +2 -1
- package/dist/CatalogDynamicGroupLayerView2D-3abd5c54.js +66 -0
- package/dist/CatalogFootprintLayerView2D-22c795e4.js +76 -0
- package/dist/CatalogLayer-74d18466.js +262 -0
- package/dist/CatalogLayerView2D-ffee45d8.js +52 -0
- package/dist/ClassBreaksDefinition-5a577d31.js +18 -0
- package/dist/ColorMaterial.glsl-bc384e65.js +64 -0
- package/dist/ColorSet-570396b9.js +45 -0
- package/dist/ColorStop-5009138a.js +29 -0
- package/dist/Container-f931e682.js +521 -0
- package/dist/CustomParametersMixin-9e8adcf6.js +12 -0
- package/dist/DefaultMaterial.glsl-092e1a97.js +42 -0
- package/dist/DefaultMaterial_COLOR_GAMMA-43e030be.js +653 -0
- package/dist/DefaultTheme-59d78c72.js +130 -0
- package/dist/DeleteForwardEditsParameters-8b5196fa.js +18 -0
- package/dist/DimensionLayer-6fc6ab12.js +129 -0
- package/dist/DirectLineMeasurement3D-6823c93d.js +449 -0
- package/dist/DistanceMeasurement2D-a6cf62b6.js +303 -0
- package/dist/DoubleArray-bb8ff0fb.js +25 -0
- package/dist/Dropdown/Filter/test.mocks.d.ts +6 -0
- package/dist/Dropdown/List/test.mocks.d.ts +6 -0
- package/dist/EdgeProcessingWorker-c5511714.js +63 -0
- package/dist/EditBusLayer-513ca203.js +107 -0
- package/dist/ElevationInfo-234040e3.js +56 -0
- package/dist/ElevationLayer-599949a0.js +129 -0
- package/dist/ElevationQuery-aaa7fb05.js +598 -0
- package/dist/ElevationSamplerWorker-07be3a80.js +62 -0
- package/dist/ExportImageParameters-b28e28df.js +66 -0
- package/dist/ExportStrategy-d6fd38ed.js +93 -0
- package/dist/ExportWMSImageParameters-be4cc5df.js +33 -0
- package/dist/External-55b35c8d.js +110 -0
- package/dist/Faq/Faq.d.ts +1 -1
- package/dist/Faq/index.d.ts +1 -1
- package/dist/FeatureCollectionSnappingSource-fce9fa91.js +130 -0
- package/dist/FeatureCommandQueue-4e426066.js +1244 -0
- package/dist/FeatureEffect-0a86f0ba.js +39 -0
- package/dist/FeatureEffectLayer-13705792.js +13 -0
- package/dist/FeatureFilter-1635b86a.js +27 -0
- package/dist/FeatureLayer-d2f8e7c0.js +693 -0
- package/dist/FeatureLayerBase-40e10dd6.js +148 -0
- package/dist/FeatureLayerSource-ebd2bea5.js +444 -0
- package/dist/FeatureLayerView2D-23240236.js +1967 -0
- package/dist/FeaturePipelineWorker-8d07a1dd.js +3633 -0
- package/dist/FeatureReductionLayer-55609d4e.js +225 -0
- package/dist/FeatureReductionSelection-2f351ee7.js +22 -0
- package/dist/FeatureServiceSnappingSource-513edf0d.js +481 -0
- package/dist/FeatureServiceSnappingSourceWorker-d6deecd4.js +747 -0
- package/dist/FeatureSet-ffd45984.js +188 -0
- package/dist/FeatureStore-9fd6c0f8.js +131 -0
- package/dist/FeatureTemplate-e4854302.js +12 -0
- package/dist/FeatureType-b4ef51c2.js +25 -0
- package/dist/FieldsIndex-91fb234a.js +109 -0
- package/dist/FormTemplate-67f4d44e.js +350 -0
- package/dist/GeoJSONLayer-e3495648.js +236 -0
- package/dist/GeoJSONSourceWorker-b0ee6d8e.js +247 -0
- package/dist/GeoRSSLayer-afac8cf1.js +73 -0
- package/dist/GeoRSSLayerView2D-b03f6564.js +140 -0
- package/dist/GeometryUtils-058e30f4.js +403 -0
- package/dist/GraphicContainer-d0803f7a.js +26 -0
- package/dist/GraphicManipulator-797ae6c6.js +1499 -0
- package/dist/GraphicsLayer-a30f80da.js +38 -0
- package/dist/GraphicsLayerView2D-0c92e0f2.js +114 -0
- package/dist/GraphicsSnappingSource-e928ab8c.js +273 -0
- package/dist/GraphicsView2D-963eb026.js +620 -0
- package/dist/GroupLayer-7f131ab8.js +147 -0
- package/dist/GroupLayerView2D-5fcc27fc.js +98 -0
- package/dist/HUDMaterial.glsl-3b450c01.js +65 -0
- package/dist/HighlightCounter-fda615cd.js +41 -0
- package/dist/HighlightGraphicContainer-8cfde780.js +18 -0
- package/dist/I3SBinaryReader-a4021fad.js +310 -0
- package/dist/I3SLayerDefinitions-f004f8b6.js +55 -0
- package/dist/I3SUtil-040e44af.js +59 -0
- package/dist/IdentityManager-012e74ca.js +899 -0
- package/dist/ImageHistogramParameters-f7c4c804.js +905 -0
- package/dist/ImageryLayer-c3f0176f.js +1799 -0
- package/dist/ImageryLayerView2D-5a14beb5.js +352 -0
- package/dist/ImageryTileLayer-a93e8471.js +2157 -0
- package/dist/ImageryTileLayerView2D-3e9fea94.js +1110 -0
- package/dist/Indices-f0dca4b5.js +67 -0
- package/dist/Input/index.d.ts +4547 -3
- package/dist/IntegratedMesh3DTilesLayer-7e70c76e.js +112 -0
- package/dist/IntegratedMeshLayer-2283f8d9.js +141 -0
- package/dist/InteractiveAnalysisViewModel-f0a0c72a.js +7397 -0
- package/dist/InterleavedLayout-9490090b.js +163 -0
- package/dist/KMLLayer-06b7037f.js +162 -0
- package/dist/KMLLayerView2D-59f96ec9.js +253 -0
- package/dist/KnowledgeGraphLayerView2D-6c8c4aae.js +43 -0
- package/dist/LRUCache-fc532e9b.js +32 -0
- package/dist/LabelClass-eae6271b.js +135 -0
- package/dist/LabelMetric-ee740bd1.js +400 -0
- package/dist/LaserlinePath.glsl-f58264f5.js +64 -0
- package/dist/Laserlines.glsl-14ab8523.js +65 -0
- package/dist/LayerFloorInfo-6ac1a57d.js +15 -0
- package/dist/LayerView-e41297e4.js +206 -0
- package/dist/LercWorker-22ed35b2.js +157 -0
- package/dist/LineOfSightLayer-6bf67bb7.js +147 -0
- package/dist/LinkChartLayer-e9a861f0.js +1027 -0
- package/dist/Lyr3DWorker-29f7a041.js +82 -0
- package/dist/MagnifierPrograms-1584f9b5.js +806 -0
- package/dist/MapImageLayer-b89cf158.js +169 -0
- package/dist/MapImageLayerView2D-e3f4a4cc.js +146 -0
- package/dist/MapNotesLayer-966f3446.js +283 -0
- package/dist/MapNotesLayerView2D-4aedef2a.js +161 -0
- package/dist/MapServiceLayerViewHelper-4f262166.js +288 -0
- package/dist/MeasurementWidgetContent-82971f95.js +2642 -0
- package/dist/MediaLayer-697a7c14.js +523 -0
- package/dist/MediaLayerView2D-64897044.js +332 -0
- package/dist/MemCache-0861cc28.js +227 -0
- package/dist/MemorySourceWorker-e1c531ac.js +222 -0
- package/dist/Mesh-44c8f6ba.js +980 -0
- package/dist/MeshLocalVertexSpace-6fe3a662.js +19 -0
- package/dist/MultiOriginJSONSupport-248453ac.js +158 -0
- package/dist/Notifications/index.d.ts +1 -0
- package/dist/OGCFeatureLayer-2daa0551.js +211 -0
- package/dist/OGCFeatureLayerView2D-7cebf7e0.js +82 -0
- package/dist/ObjectStack-424092a9.js +21 -0
- package/dist/Octree-21d216f2.js +495 -0
- package/dist/OpenStreetMapLayer-ade6fa9d.js +30 -0
- package/dist/OperationalLayer-097ad3e0.js +44 -0
- package/dist/OrderByInfo-e9ed942d.js +16 -0
- package/dist/OrderedLayer-fef2b56e.js +26 -0
- package/dist/OrientedImageryLayer-424a6234.js +216 -0
- package/dist/OverlayCompositing.glsl-1954a291.js +65 -0
- package/dist/OverrideHelper-f8aace2c.js +242 -0
- package/dist/PBFDecoderWorker-15cd639d.js +213 -0
- package/dist/PointCloudLayer-c820d269.js +197 -0
- package/dist/PointCloudUniqueValueRenderer-e7d37f08.js +115 -0
- package/dist/PointCloudWorker-3e28270d.js +212 -0
- package/dist/PooledRBush-e4cbf810.js +272 -0
- package/dist/Popup-2c03dbc0.js +3990 -0
- package/dist/PortalLayer-09e5a300.js +126 -0
- package/dist/Program-ed5a5aa3.js +694 -0
- package/dist/ProgramTemplate-976cfde1.js +35 -0
- package/dist/QueryEngine-8915348b.js +896 -0
- package/dist/QueryTask-f386d91d.js +119 -0
- package/dist/RasterSymbolizer-6177c6ec.js +3024 -0
- package/dist/RasterVFDisplayObject-6411b56f.js +581 -0
- package/dist/RasterWorker-f825daf0.js +78 -0
- package/dist/RawBlockCache-0d61962b.js +185 -0
- package/dist/RealisticTree.glsl-c9fd0d3c.js +42 -0
- package/dist/RefreshableLayer-0945a308.js +80 -0
- package/dist/RefreshableLayerView-4956f17c.js +16 -0
- package/dist/Relationship-9a82bd43.js +64 -0
- package/dist/RelationshipQuery-68ad49a7.js +22 -0
- package/dist/RenderingContext-49610ad9.js +889 -0
- package/dist/RibbonLine.glsl-6314f72e.js +65 -0
- package/dist/RouteLayer-ff5c8f33.js +786 -0
- package/dist/RouteLayerView2D-2cc60ad2.js +195 -0
- package/dist/SDFHelper-b08be611.js +140 -0
- package/dist/SSAO.glsl-0e92c4e5.js +43 -0
- package/dist/SSAOBlur.glsl-a2bb2587.js +42 -0
- package/dist/ScaleRangeLayer-ab226dbd.js +21 -0
- package/dist/SceneLayer-884ec175.js +542 -0
- package/dist/SceneLayerSnappingSource-aa2944b9.js +218 -0
- package/dist/SceneLayerSnappingSourceWorker-5616c206.js +112 -0
- package/dist/SceneLayerWorker-9745b8b5.js +164 -0
- package/dist/SceneService-da855dda.js +215 -0
- package/dist/Scheduler-b3c40220.js +373 -0
- package/dist/Search/index.d.ts +1 -0
- package/dist/Search/test.mocks.d.ts +3 -0
- package/dist/Search/utils.d.ts +3 -0
- package/dist/Select/index.d.ts +3 -3
- package/dist/ShadedColorMaterial.glsl-f953e894.js +64 -0
- package/dist/SnappingOperation-be595c42.js +48 -0
- package/dist/SourceLayerData-ec8ab72c.js +116 -0
- package/dist/SpatialFilter-7d64232d.js +1701 -0
- package/dist/Stop-c022e866.js +281 -0
- package/dist/StreamLayer-d603abd8.js +188 -0
- package/dist/StreamLayerView2D-6d6618cf.js +164 -0
- package/dist/StyleRepository-2f08de17.js +2212 -0
- package/dist/SublayersOwner-cc0e4f54.js +545 -0
- package/dist/SubtypeGroupLayer-bacf048d.js +514 -0
- package/dist/SubtypeGroupLayerView2D-b3ed2c1a.js +84 -0
- package/dist/TechniqueInstance-397b7dc2.js +233 -0
- package/dist/TemporalLayer-7844bd88.js +23 -0
- package/dist/Texture-b1727861.js +501 -0
- package/dist/TextureOnly.glsl-ffd4a7df.js +65 -0
- package/dist/Theme-12cb681b.js +3426 -0
- package/dist/Tick-25d07d27.js +723 -0
- package/dist/TileContainer-ab77d7a6.js +31 -0
- package/dist/TileInfoTilemapCache-3e97ab02.js +38 -0
- package/dist/TileLayer-03cfc8ab.js +194 -0
- package/dist/TileLayerView2D-3cfd6a21.js +187 -0
- package/dist/TilemapCache-36e3c4b7.js +189 -0
- package/dist/TimeInfo-cea2517f.js +42 -0
- package/dist/TimeOnly-5a143001.js +706 -0
- package/dist/Tooltip-2b4711cb.js +138 -0
- package/dist/TopFeaturesQuery-285284f1.js +32 -0
- package/dist/TurboLine-708823a3.js +565 -0
- package/dist/UniqueValueRenderer-3d92c0b9.js +1039 -0
- package/dist/UnknownLayer-d3dbe7c9.js +30 -0
- package/dist/UnknownTimeZone-ed4def19.js +15 -0
- package/dist/UnsupportedLayer-40bbb9f5.js +31 -0
- package/dist/UpdateTracking2D-23c8ff3f.js +8566 -0
- package/dist/Upload/index.d.ts +1 -1
- package/dist/Util-2ba07f64.js +57 -0
- package/dist/VectorTileLayer-ba191a02.js +544 -0
- package/dist/VectorTileLayerView2D-bd3971cd.js +2108 -0
- package/dist/Version-d45bee25.js +33 -0
- package/dist/VertexArrayObject-08a9d938.js +73 -0
- package/dist/VertexColor.glsl-cfafd4c9.js +2683 -0
- package/dist/VertexSnappingCandidate-cbae227c.js +13 -0
- package/dist/VideoLayerView2D-ec66c226.js +124 -0
- package/dist/VoxelLayer-888a65f9.js +631 -0
- package/dist/WFSLayer-786bdecd.js +221 -0
- package/dist/WFSSourceWorker-a212500b.js +157 -0
- package/dist/WGLContainer-f05c906a.js +5426 -0
- package/dist/WMSLayer-b2c46060.js +536 -0
- package/dist/WMSLayerView2D-a90672e9.js +117 -0
- package/dist/WMTSLayer-860b1a45.js +531 -0
- package/dist/WMTSLayerView2D-c492825d.js +142 -0
- package/dist/WebTileLayer-e178eb17.js +110 -0
- package/dist/WhereClause-ad3cc5ae.js +2766 -0
- package/dist/WorkerHandle-ef6ad49b.js +47 -0
- package/dist/WorkerTileHandler-c2b98dae.js +1539 -0
- package/dist/action-46ccf03a.js +198 -0
- package/dist/action-group-9785519d.js +145 -0
- package/dist/action-menu-f423306a.js +1759 -0
- package/dist/agrotools-theme.css +2 -2
- package/dist/agrotools-theme.css.map +1 -1
- package/dist/apng-66c828d8.js +392 -0
- package/dist/arcade-af30f385.js +229 -0
- package/dist/arcadeAsyncRuntime-fdce05e3.js +943 -0
- package/dist/arcadeUtils-2b5a1e68.js +8741 -0
- package/dist/arcgis-knowledge-client-core-192a1ac0.js +1218 -0
- package/dist/arcgis-knowledge-client-core-simd-4fb6c777.js +1218 -0
- package/dist/arcgisLayers-f43f9183.js +152 -0
- package/dist/associatedFeatureServiceUtils-15949591.js +92 -0
- package/dist/axisAngleDegrees-de05cd64.js +49 -0
- package/dist/basis_transcoder-6f118404.js +1248 -0
- package/dist/calcite-action-bar-9722a11e.js +303 -0
- package/dist/calcite-action-f5829479.js +22 -0
- package/dist/calcite-action-group-3e77994f.js +28 -0
- package/dist/calcite-button-8979d383.js +228 -0
- package/dist/calcite-flow-b50ce308.js +128 -0
- package/dist/calcite-flow-item-57549b16.js +499 -0
- package/dist/calcite-icon-fb43725c.js +16 -0
- package/dist/calcite-input-fcc054c7.js +24 -0
- package/dist/calcite-label-10d65c11.js +79 -0
- package/dist/calcite-list-2847bddc.js +2135 -0
- package/dist/calcite-list-item-53cde043.js +576 -0
- package/dist/calcite-list-item-group-256eb990.js +71 -0
- package/dist/calcite-loader-022a5436.js +14 -0
- package/dist/calcite-modal-5b1a23d9.js +333 -0
- package/dist/calcite-notice-17009704.js +181 -0
- package/dist/calcite-option-c7d00181.js +94 -0
- package/dist/calcite-scrim-1dced2db.js +18 -0
- package/dist/calcite-select-a96a55a3.js +231 -0
- package/dist/capabilities-3f86754a.js +50 -0
- package/dist/chartCommon-af8c14ae.js +256 -0
- package/dist/chartUtilsAm5-418cf95f.js +2954 -0
- package/dist/clientSideDefaults-2aad569c.js +39 -0
- package/dist/colorRamps-0fae1fde.js +38 -0
- package/dist/colorUtils-6d5e716b.js +164 -0
- package/dist/commonProperties-d1f695a2.js +60 -0
- package/dist/computeTranslationToOriginAndRotation-cba163ab.js +60 -0
- package/dist/conditionalSlot-14f35023.js +27 -0
- package/dist/createConnection-f3b9e606.js +299 -0
- package/dist/dataUtils-65604399.js +1421 -0
- package/dist/deduplicate-16f30199.js +89 -0
- package/dist/defaults-b7c93d2a.js +31 -0
- package/dist/deleteForwardEdits-f31f885d.js +13 -0
- package/dist/diffUtils-54c1c039.js +90 -0
- package/dist/drapedUtils-166cd4c2.js +75 -0
- package/dist/earcut-ffaa9a50.js +292 -0
- package/dist/edgeProcessing-1a2c4169.js +252 -0
- package/dist/editingSupport-ffa6f639.js +203 -0
- package/dist/editsZScale-2840378a.js +37 -0
- package/dist/elevationInfoUtils-c1caf596.js +126 -0
- package/dist/executeForIds-b9c9164b.js +14 -0
- package/dist/executeForTopCount-8a73aea7.js +17 -0
- package/dist/executeForTopExtents-a3d0b42e.js +17 -0
- package/dist/executeForTopIds-f14d5790.js +17 -0
- package/dist/executeQueryJSON-6cd89bed.js +15 -0
- package/dist/executeQueryPBF-e1d32cfc.js +152 -0
- package/dist/executeRelationshipQuery-5cadcb20.js +53 -0
- package/dist/executeTopFeaturesQuery-32dda453.js +18 -0
- package/dist/featureConversionUtils-a5f0b9b2.js +479 -0
- package/dist/featureLayerUtils-828813e8.js +250 -0
- package/dist/featureLayerUtils-9e9f97c1.js +142 -0
- package/dist/featureSetUtils-2f86a02f.js +2530 -0
- package/dist/featuresetbase-bb981400.js +707 -0
- package/dist/featuresetgeom-0185b49f.js +99 -0
- package/dist/featuresetstats-3d689b79.js +81 -0
- package/dist/featuresetstring-83733fad.js +95 -0
- package/dist/fetchService-25e9ba70.js +33 -0
- package/dist/fieldProperties-cd5649d9.js +33 -0
- package/dist/floatRGBA-005cc596.js +20 -0
- package/dist/form-41e8f739.js +138 -0
- package/dist/geohashUtils-776cae3b.js +85 -0
- package/dist/geojson-7ef69d00.js +208 -0
- package/dist/geomasync-43a66474.js +567 -0
- package/dist/geometryEngine-e18a460d.js +192 -0
- package/dist/geometryEngineAsync-ae21d4e2.js +217 -0
- package/dist/geometryEngineBase-d653892b.js +18463 -0
- package/dist/geometryEngineJSON-031f6196.js +46 -0
- package/dist/geometryEngineJSON-9aeb41cd.js +171 -0
- package/dist/geometryEngineWorker-1c2f96e6.js +11 -0
- package/dist/geometryServiceUtils-50afe031.js +28 -0
- package/dist/georeference-cf051555.js +291 -0
- package/dist/gif-3fe5f761.js +323 -0
- package/dist/gltfexport-3ec498d6.js +705 -0
- package/dist/groupLayerUtils-5b8e1f89.js +39 -0
- package/dist/heatmapUtils-b512588d.js +45 -0
- package/dist/highlightReasons-b0f772b2.js +19 -0
- package/dist/hydrated-36edecd6.js +40 -0
- package/dist/i3s-239f062a.js +809 -0
- package/dist/icon-5e93376e.js +127 -0
- package/dist/imageBitmapUtils-142daeaf.js +23 -0
- package/dist/imageUtils-27ed5e73.js +89 -0
- package/dist/imageUtils-901282e9.js +69 -0
- package/dist/imageryUtils-b1dd3a54.js +43 -0
- package/dist/index-6ebf29c1.js +43667 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +17 -13
- package/dist/input-message-20d19cfb.js +92 -0
- package/dist/input2-8da11a51.js +575 -0
- package/dist/interactive-bcb1b82d.js +80 -0
- package/dist/jsonContext-45fce1e1.js +15 -0
- package/dist/jsonUtils-09f69988.js +86 -0
- package/dist/jsonUtils-1f447d0c.js +476 -0
- package/dist/jsonUtils-db906457.js +59 -0
- package/dist/kmlUtils-6412718d.js +112 -0
- package/dist/knowledgeGraphService-80890106.js +739 -0
- package/dist/knowledgegraph-475723f0.js +149 -0
- package/dist/labelUtils-85708580.js +61 -0
- package/dist/labelingInfo-62fc9d21.js +46 -0
- package/dist/layersCreator-a94b60fe.js +151 -0
- package/dist/layersLoader-39c74edb.js +197 -0
- package/dist/lazyLayerLoader-7922c10d.js +10 -0
- package/dist/lclayout-6ac84378.js +773 -0
- package/dist/lengthUtils-6a89d855.js +5 -0
- package/dist/lerc-wasm-b8b3cd2c.js +325 -0
- package/dist/libtess-61451fa0.js +269 -0
- package/dist/libtess-asm-fef1a4ca.js +3673 -0
- package/dist/lineSegment-f45db35c.js +76 -0
- package/dist/loadGLTFMesh-2f9cee21.js +181 -0
- package/dist/loadable-c29cb205.js +24 -0
- package/dist/loader-d9b4787f.js +79 -0
- package/dist/lyr3DWorker-33babc2c.js +2108 -0
- package/dist/mapViewDeps-f5b886c8.js +3052 -0
- package/dist/mediaLayerUtils-5a2c2fe8.js +35 -0
- package/dist/meshFeatureSet-2312bbe6.js +126 -0
- package/dist/meshVertexSpaceUtils-c9b69510.js +58 -0
- package/dist/multidimensionalUtils-e85f5a78.js +290 -0
- package/dist/normalizeUtilsSync-555b1847.js +181 -0
- package/dist/number-72e1a662.js +128 -0
- package/dist/objectResourceUtils-abe804cf.js +1455 -0
- package/dist/observers-f3bd3593.js +30 -0
- package/dist/ogcFeatureUtils-7097c17e.js +206 -0
- package/dist/openCloseComponent-67a2c20c.js +37 -0
- package/dist/orientedBoundingBox-4ae2c366.js +447 -0
- package/dist/parser-7a76caf9.js +488 -0
- package/dist/pbf-0b9b579c.js +215 -0
- package/dist/pbfQueryUtils-baba23c7.js +422 -0
- package/dist/pe-wasm-d080c07b.js +887 -0
- package/dist/persistable-82932da9.js +89 -0
- package/dist/perspectiveUtils-1b383b17.js +42 -0
- package/dist/pieChart-eca78f7c.js +555 -0
- package/dist/plane-84e27261.js +160 -0
- package/dist/popupUtils-b72d32fb.js +22 -0
- package/dist/popupUtils-cde1d105.js +50 -0
- package/dist/portalItemUtils-28314a3f.js +57 -0
- package/dist/portalLayers-eeaa6e57.js +312 -0
- package/dist/portalUtils-457f542e.js +7 -0
- package/dist/programUtils-0c20a48e.js +59 -0
- package/dist/project-1b5431dd.js +21 -0
- package/dist/projectPointToVector-1f1d1dc7.js +14 -0
- package/dist/projectVectorToVector-b7e757a1.js +13 -0
- package/dist/quantityUtils-b64583f9.js +33 -0
- package/dist/quantizationUtils-9e478e23.js +68 -0
- package/dist/quat-5502b70d.js +104 -0
- package/dist/query-b2397453.js +89 -0
- package/dist/queryAttachments-4361fd2f.js +39 -0
- package/dist/queryEngineUtils-f24bc98c.js +21 -0
- package/dist/queryTopFeatures-e06aa562.js +50 -0
- package/dist/queryZScale-b18ec359.js +12 -0
- package/dist/rasterProjectionHelper-935c256c.js +577 -0
- package/dist/rasterUtils-efad8a20.js +122 -0
- package/dist/rasterizingUtils-80de9b14.js +46 -0
- package/dist/request-cae502b7.js +46 -0
- package/dist/requestImageUtils-caebcf1e.js +8 -0
- package/dist/resourceExtension-7d14f4fc.js +17 -0
- package/dist/resourceUtils-8d97f5bf.js +42 -0
- package/dist/resourceUtils-be991ca4.js +69 -0
- package/dist/resourceUtils-fa1a565f.js +62 -0
- package/dist/saveAPIKeyUtils-9f0454db.js +8 -0
- package/dist/saveUtils-22a6caa6.js +24 -0
- package/dist/scaleUtils-ba5596ad.js +23 -0
- package/dist/scrim-5b1b6156.js +114 -0
- package/dist/serviceCapabilitiesUtils-3a47b26b.js +64 -0
- package/dist/sourceUtils-ded5acd6.js +71 -0
- package/dist/sphere-418b76df.js +199 -0
- package/dist/statsWorker-a082453a.js +37 -0
- package/dist/streamLayerUtils-22aa35f2.js +31 -0
- package/dist/style.css +1 -1
- package/dist/styleUtils-aa4777b6.js +75 -0
- package/dist/styleUtils-e5f7ddb7.js +14 -0
- package/dist/sublayerUtils-7c5ebfea.js +37 -0
- package/dist/substitute-da3c695d.js +52 -0
- package/dist/symbolColorUtils-5d3e355f.js +8 -0
- package/dist/symbolLayerUtils-47cdd4d1.js +31 -0
- package/dist/symbologySnappingCandidates-6ebf1df0.js +221 -0
- package/dist/t9n-c80e56d9.js +349 -0
- package/dist/testSVGPremultipliedAlpha-b9ff88ef.js +94 -0
- package/dist/timeSupport-8d2432f7.js +410 -0
- package/dist/triangle-07f96fb9.js +98 -0
- package/dist/unitConversionUtils-c1bfd22b.js +17 -0
- package/dist/unitFormatUtils-e75be0c3.js +40 -0
- package/dist/uploadAssetErrors-3493bdb9.js +70 -0
- package/dist/uploadAssets-24fe5279.js +330 -0
- package/dist/utils-17d83806.js +2746 -0
- package/dist/utils-717efd4b.js +73 -0
- package/dist/utils-74e8e651.js +433 -0
- package/dist/utils-7c8f1d3f.js +232 -0
- package/dist/utils-94cbe432.js +79 -0
- package/dist/utils-a76b92ed.js +34 -0
- package/dist/utils-e73651cf.js +419 -0
- package/dist/utils-f46de72c.js +91 -0
- package/dist/utils3-eb04cacb.js +75 -0
- package/dist/vec3-61daf837.js +81 -0
- package/dist/vec42-27060a00.js +125 -0
- package/dist/versionUtils-c9c03a5d.js +161 -0
- package/dist/visualVariableUtils-bc9bfef1.js +267 -0
- package/dist/webStyleSymbolUtils-0990caa8.js +48 -0
- package/dist/webglDeps-812387f7.js +23 -0
- package/dist/wfsUtils-fdccd660.js +343 -0
- package/dist/workerHelper-d8d5f17b.js +11 -0
- package/dist/xyChart-94c1ef04.js +3335 -0
- package/package.json +1 -1
- package/dist/AGraphicContainer-98a4c8a4.js +0 -109
- package/dist/APIKeyMixin-9511e0a5.js +0 -19
- package/dist/Accordion/Accordion.d.ts +0 -49
- package/dist/Analysis-4b1d1fb5.js +0 -31
- package/dist/ArcGISCachedService-93e2cb27.js +0 -47
- package/dist/ArcGISService-3f8d89c1.js +0 -25
- package/dist/AreaMeasurement2D-e0bb230c.js +0 -405
- package/dist/AreaMeasurement3D-a9959ecf.js +0 -488
- package/dist/AttachmentInfo-601c56e2.js +0 -34
- package/dist/AttachmentQuery-3504d550.js +0 -18
- package/dist/AttributeStore-b90878e3.js +0 -1707
- package/dist/Avatar/Avatar.d.ts +0 -66
- package/dist/BaseDynamicLayerView2D-b2faf028.js +0 -63
- package/dist/BingMapsLayer-5d79fe2b.js +0 -112
- package/dist/Bitmap-f775c851.js +0 -128
- package/dist/BitmapContainer-af5942b8.js +0 -23
- package/dist/BlendLayer-a792edf6.js +0 -13
- package/dist/BoundsStore-789624df.js +0 -63
- package/dist/BufferObject-cbd0168e.js +0 -100
- package/dist/BufferView-004ad517.js +0 -683
- package/dist/BuildingSceneLayer-25bc760b.js +0 -535
- package/dist/Button/Button.d.ts +0 -82
- package/dist/Button-70963624.js +0 -36
- package/dist/CSVLayer-fd3b6750.js +0 -208
- package/dist/CSVSourceWorker-eb24cd85.js +0 -367
- package/dist/CatalogDynamicGroupLayerView2D-dfc700a4.js +0 -66
- package/dist/CatalogFootprintLayerView2D-6eb16597.js +0 -76
- package/dist/CatalogLayer-1cc632fe.js +0 -262
- package/dist/CatalogLayerView2D-d143aa34.js +0 -52
- package/dist/Checkbox/Checkbox.d.ts +0 -87
- package/dist/ClassBreaksDefinition-07ba0c64.js +0 -18
- package/dist/ColorMaterial.glsl-e7801766.js +0 -64
- package/dist/ColorSet-df5696b5.js +0 -45
- package/dist/ColorStop-7187f368.js +0 -29
- package/dist/Container-ac97765a.js +0 -521
- package/dist/CustomParametersMixin-b3432b3e.js +0 -12
- package/dist/DataTable/Column/Column.d.ts +0 -36
- package/dist/DataTable/Counters/Counters.d.ts +0 -41
- package/dist/DataTable/DataTable.d.ts +0 -113
- package/dist/DefaultMaterial.glsl-3cc4efe7.js +0 -42
- package/dist/DefaultMaterial_COLOR_GAMMA-337c63aa.js +0 -653
- package/dist/DefaultTheme-12dffc66.js +0 -130
- package/dist/DeleteForwardEditsParameters-ae76d898.js +0 -18
- package/dist/DimensionLayer-9eb47c76.js +0 -129
- package/dist/DirectLineMeasurement3D-e9903136.js +0 -449
- package/dist/DistanceMeasurement2D-a4853462.js +0 -303
- package/dist/DoubleArray-5076283e.js +0 -25
- package/dist/EdgeProcessingWorker-c1783ddd.js +0 -63
- package/dist/EditBusLayer-e812f4c9.js +0 -107
- package/dist/ElevationInfo-fad03d5e.js +0 -56
- package/dist/ElevationLayer-397792d5.js +0 -129
- package/dist/ElevationQuery-beceb62f.js +0 -598
- package/dist/ElevationSamplerWorker-0048a204.js +0 -62
- package/dist/ExportImageParameters-c6c4bc61.js +0 -66
- package/dist/ExportStrategy-908f5b8d.js +0 -93
- package/dist/ExportWMSImageParameters-34da6b46.js +0 -33
- package/dist/External-14daf0c1.js +0 -110
- package/dist/FeatureCollectionSnappingSource-f97a1829.js +0 -130
- package/dist/FeatureCommandQueue-d4817eac.js +0 -1244
- package/dist/FeatureEffect-08976bbd.js +0 -39
- package/dist/FeatureEffectLayer-05c258f4.js +0 -13
- package/dist/FeatureFilter-8c5e44b1.js +0 -27
- package/dist/FeatureLayer-d3659466.js +0 -693
- package/dist/FeatureLayerBase-9b63f732.js +0 -148
- package/dist/FeatureLayerSource-960f1c01.js +0 -444
- package/dist/FeatureLayerView2D-7503e1ed.js +0 -1967
- package/dist/FeaturePipelineWorker-d4301d2a.js +0 -3633
- package/dist/FeatureReductionLayer-e6cf73ac.js +0 -225
- package/dist/FeatureReductionSelection-d90249a7.js +0 -22
- package/dist/FeatureServiceSnappingSource-9e49ca72.js +0 -481
- package/dist/FeatureServiceSnappingSourceWorker-39b093b3.js +0 -747
- package/dist/FeatureSet-d79f0e48.js +0 -188
- package/dist/FeatureStore-eb4b87c0.js +0 -131
- package/dist/FeatureTemplate-edb1b782.js +0 -12
- package/dist/FeatureType-bba29adb.js +0 -25
- package/dist/FieldsIndex-75cca4d0.js +0 -109
- package/dist/FormTemplate-22911c47.js +0 -350
- package/dist/GeoJSONLayer-b33c96b8.js +0 -236
- package/dist/GeoJSONSourceWorker-b04ff552.js +0 -247
- package/dist/GeoRSSLayer-6e5fcd0e.js +0 -73
- package/dist/GeoRSSLayerView2D-21b6b12e.js +0 -140
- package/dist/GeometryUtils-fa897cbd.js +0 -403
- package/dist/GraphicContainer-1fd6bfce.js +0 -26
- package/dist/GraphicManipulator-f3b7dc9b.js +0 -1499
- package/dist/GraphicsLayer-e0686779.js +0 -38
- package/dist/GraphicsLayerView2D-a7eba2fe.js +0 -114
- package/dist/GraphicsSnappingSource-594f402a.js +0 -273
- package/dist/GraphicsView2D-347562b8.js +0 -620
- package/dist/GroupLayer-7ae0a916.js +0 -147
- package/dist/GroupLayerView2D-ffcde606.js +0 -98
- package/dist/HUDMaterial.glsl-b0a3e0ce.js +0 -65
- package/dist/HighlightCounter-e18f0179.js +0 -41
- package/dist/HighlightGraphicContainer-fd774cea.js +0 -18
- package/dist/I3SBinaryReader-190e99de.js +0 -310
- package/dist/I3SLayerDefinitions-6ddaca60.js +0 -55
- package/dist/I3SUtil-44b83dc0.js +0 -59
- package/dist/IdentityManager-fbe91c13.js +0 -899
- package/dist/ImageHistogramParameters-d64fd9c8.js +0 -905
- package/dist/ImageryLayer-67878a78.js +0 -1799
- package/dist/ImageryLayerView2D-ae45faba.js +0 -352
- package/dist/ImageryTileLayer-9dca8b93.js +0 -2157
- package/dist/ImageryTileLayerView2D-977f66aa.js +0 -1110
- package/dist/Indices-e6dc3b15.js +0 -67
- package/dist/Input/Input.core.d.ts +0 -159
- package/dist/IntegratedMesh3DTilesLayer-8811e7bf.js +0 -112
- package/dist/IntegratedMeshLayer-9162c0b5.js +0 -141
- package/dist/InteractiveAnalysisViewModel-b046fcb9.js +0 -7397
- package/dist/InterleavedLayout-32973c8a.js +0 -163
- package/dist/KMLLayer-80f81df7.js +0 -162
- package/dist/KMLLayerView2D-b6ba3b80.js +0 -253
- package/dist/KnowledgeGraphLayerView2D-ae91bd81.js +0 -43
- package/dist/LRUCache-27e8c401.js +0 -32
- package/dist/LabelClass-d9a476d6.js +0 -135
- package/dist/LabelMetric-e2728bbf.js +0 -400
- package/dist/LaserlinePath.glsl-60d00e61.js +0 -64
- package/dist/Laserlines.glsl-499a6cbf.js +0 -65
- package/dist/LayerFloorInfo-d05cf9dd.js +0 -15
- package/dist/LayerView-036988a9.js +0 -206
- package/dist/Legend/Legend.d.ts +0 -73
- package/dist/LercWorker-b1b4bb47.js +0 -157
- package/dist/LineOfSightLayer-9a9a60b7.js +0 -147
- package/dist/LinkChartLayer-d61803bb.js +0 -1027
- package/dist/Lyr3DWorker-87be14e0.js +0 -82
- package/dist/MagnifierPrograms-da7a27ab.js +0 -806
- package/dist/Map/Map.d.ts +0 -26
- package/dist/MapImageLayer-f07adf1a.js +0 -169
- package/dist/MapImageLayerView2D-d1b140c3.js +0 -146
- package/dist/MapNotesLayer-c662d147.js +0 -283
- package/dist/MapNotesLayerView2D-bf9ac698.js +0 -161
- package/dist/MapServiceLayerViewHelper-fb724de9.js +0 -288
- package/dist/MeasurementWidgetContent-e4888ef2.js +0 -2642
- package/dist/MediaLayer-36d873a3.js +0 -523
- package/dist/MediaLayerView2D-e58b8ec0.js +0 -332
- package/dist/MemCache-a9232ec2.js +0 -227
- package/dist/MemorySourceWorker-20ff27d6.js +0 -222
- package/dist/Mesh-3839826a.js +0 -980
- package/dist/MeshLocalVertexSpace-00151564.js +0 -19
- package/dist/Modal/Modal.d.ts +0 -106
- package/dist/MultiOriginJSONSupport-bb258670.js +0 -158
- package/dist/OGCFeatureLayer-2a8b7ecc.js +0 -211
- package/dist/OGCFeatureLayerView2D-185f9649.js +0 -82
- package/dist/ObjectStack-10d91171.js +0 -21
- package/dist/Octree-78797046.js +0 -495
- package/dist/OpenStreetMapLayer-b0a17790.js +0 -30
- package/dist/OperationalLayer-55af27d6.js +0 -44
- package/dist/OrderByInfo-22e3c805.js +0 -16
- package/dist/OrderedLayer-1403a591.js +0 -26
- package/dist/OrientedImageryLayer-8ec8d7d1.js +0 -216
- package/dist/OverlayCompositing.glsl-ba3bd81d.js +0 -65
- package/dist/OverrideHelper-82325a2c.js +0 -242
- package/dist/PBFDecoderWorker-f6517afc.js +0 -213
- package/dist/Paginator/Paginator.d.ts +0 -43
- package/dist/PointCloudLayer-cff43a10.js +0 -197
- package/dist/PointCloudUniqueValueRenderer-f337a895.js +0 -115
- package/dist/PointCloudWorker-cdb28dc1.js +0 -212
- package/dist/PooledRBush-ee4e60af.js +0 -272
- package/dist/Popup-c7f55588.js +0 -3990
- package/dist/PortalLayer-07b3c53e.js +0 -126
- package/dist/Program-ba2f18b2.js +0 -694
- package/dist/ProgramTemplate-eee4f097.js +0 -35
- package/dist/ProgressBar/ProgressBar.d.ts +0 -73
- package/dist/QueryEngine-10c97624.js +0 -896
- package/dist/QueryTask-115430b6.js +0 -119
- package/dist/RadioButton/RadioButton.d.ts +0 -87
- package/dist/RasterSymbolizer-fbf433fe.js +0 -3024
- package/dist/RasterVFDisplayObject-20b0dd86.js +0 -581
- package/dist/RasterWorker-44c37e20.js +0 -78
- package/dist/RawBlockCache-25203dbd.js +0 -185
- package/dist/RealisticTree.glsl-bc07c4dc.js +0 -42
- package/dist/RefreshableLayer-9550b85a.js +0 -80
- package/dist/RefreshableLayerView-601f7038.js +0 -16
- package/dist/Relationship-c662830e.js +0 -64
- package/dist/RelationshipQuery-765f068e.js +0 -22
- package/dist/RenderingContext-3db74548.js +0 -889
- package/dist/RibbonLine.glsl-c6a715b7.js +0 -65
- package/dist/RouteLayer-3f5411f3.js +0 -786
- package/dist/RouteLayerView2D-a5fd4cbf.js +0 -195
- package/dist/SDFHelper-a34e90ee.js +0 -140
- package/dist/SSAO.glsl-5491a708.js +0 -43
- package/dist/SSAOBlur.glsl-f3068b8e.js +0 -42
- package/dist/ScaleRangeLayer-7ddf00b4.js +0 -21
- package/dist/SceneLayer-c594bfc3.js +0 -542
- package/dist/SceneLayerSnappingSource-a0504ac7.js +0 -218
- package/dist/SceneLayerSnappingSourceWorker-a04d6692.js +0 -112
- package/dist/SceneLayerWorker-1865768e.js +0 -164
- package/dist/SceneService-fb9f0142.js +0 -215
- package/dist/Scheduler-eacc84bb.js +0 -373
- package/dist/Select/Item/Item.d.ts +0 -104
- package/dist/Select/Multiple/Select.multiple.d.ts +0 -90
- package/dist/Select/Select.core.d.ts +0 -78
- package/dist/Select/Single/Select.single.d.ts +0 -66
- package/dist/ShadedColorMaterial.glsl-db97956b.js +0 -64
- package/dist/SnappingOperation-9622a00d.js +0 -48
- package/dist/SourceLayerData-7016f1a5.js +0 -116
- package/dist/SpatialFilter-d20d4f50.js +0 -1701
- package/dist/Stop-68022e32.js +0 -281
- package/dist/StreamLayer-7c837e3d.js +0 -188
- package/dist/StreamLayerView2D-586f5a6a.js +0 -164
- package/dist/StyleRepository-fba75e70.js +0 -2212
- package/dist/SublayersOwner-3dc574cd.js +0 -545
- package/dist/SubtypeGroupLayer-1f9c5398.js +0 -514
- package/dist/SubtypeGroupLayerView2D-0f108d9d.js +0 -84
- package/dist/Tabs/Tab/Tab.d.ts +0 -69
- package/dist/Tabs/Tabs.d.ts +0 -50
- package/dist/TechniqueInstance-0481dbff.js +0 -233
- package/dist/TemporalLayer-8116b4a4.js +0 -23
- package/dist/Texture-22a8cca5.js +0 -501
- package/dist/TextureOnly.glsl-458f8148.js +0 -65
- package/dist/Theme-f05b8eb0.js +0 -3426
- package/dist/Tick-aef93b48.js +0 -723
- package/dist/TileContainer-0bf0ea1b.js +0 -31
- package/dist/TileInfoTilemapCache-d78858c0.js +0 -38
- package/dist/TileLayer-0edee064.js +0 -194
- package/dist/TileLayerView2D-78d5801b.js +0 -187
- package/dist/TilemapCache-79699d61.js +0 -189
- package/dist/TimeInfo-40c96ade.js +0 -42
- package/dist/TimeOnly-9ee66ca6.js +0 -706
- package/dist/Tipograph/Paragraph/Paragraph.d.ts +0 -25
- package/dist/Tipograph/Title/Title.d.ts +0 -25
- package/dist/Toggle/Toggle.d.ts +0 -45
- package/dist/Tooltip-e7498dc9.js +0 -138
- package/dist/TopFeaturesQuery-ad224e01.js +0 -32
- package/dist/TurboLine-6ab04aef.js +0 -565
- package/dist/UniqueValueRenderer-eaa5f8a6.js +0 -1039
- package/dist/UnknownLayer-e280ddd4.js +0 -30
- package/dist/UnknownTimeZone-220952b5.js +0 -15
- package/dist/UnsupportedLayer-447f7676.js +0 -31
- package/dist/UpdateTracking2D-e9adad8f.js +0 -8566
- package/dist/Upload/Upload.d.ts +0 -129
- package/dist/Util-002f5109.js +0 -57
- package/dist/VectorTileLayer-3210be81.js +0 -544
- package/dist/VectorTileLayerView2D-6a51e3b8.js +0 -2108
- package/dist/Version-3de8cbca.js +0 -33
- package/dist/VertexArrayObject-07998745.js +0 -73
- package/dist/VertexColor.glsl-e415cf02.js +0 -2683
- package/dist/VertexSnappingCandidate-b676241f.js +0 -13
- package/dist/VideoLayerView2D-f659dd0d.js +0 -124
- package/dist/VoxelLayer-003f82ff.js +0 -631
- package/dist/WFSLayer-3da6c5f7.js +0 -221
- package/dist/WFSSourceWorker-9a11693a.js +0 -157
- package/dist/WGLContainer-3d159b63.js +0 -5426
- package/dist/WMSLayer-fc0632f8.js +0 -536
- package/dist/WMSLayerView2D-54e80e1b.js +0 -117
- package/dist/WMTSLayer-9324b12b.js +0 -531
- package/dist/WMTSLayerView2D-3ef936db.js +0 -142
- package/dist/WebTileLayer-45c563ff.js +0 -110
- package/dist/WhereClause-7a28b740.js +0 -2766
- package/dist/WorkerHandle-0d54a6c7.js +0 -47
- package/dist/WorkerTileHandler-786c2b24.js +0 -1539
- package/dist/action-163397e3.js +0 -198
- package/dist/action-group-4859fb97.js +0 -145
- package/dist/action-menu-2d70b2fc.js +0 -1759
- package/dist/apng-9b71d52c.js +0 -392
- package/dist/arcade-fa309282.js +0 -229
- package/dist/arcadeAsyncRuntime-738498fd.js +0 -943
- package/dist/arcadeUtils-f71d80fa.js +0 -8741
- package/dist/arcgis-knowledge-client-core-6056bcea.js +0 -1218
- package/dist/arcgis-knowledge-client-core-simd-9bc1f83e.js +0 -1218
- package/dist/arcgisLayers-b2b878bd.js +0 -152
- package/dist/associatedFeatureServiceUtils-df5b5187.js +0 -92
- package/dist/axisAngleDegrees-32643b7c.js +0 -49
- package/dist/basis_transcoder-3187cc92.js +0 -1248
- package/dist/calcite-action-bar-5a87c23c.js +0 -303
- package/dist/calcite-action-ee2ca847.js +0 -22
- package/dist/calcite-action-group-19aa86ee.js +0 -28
- package/dist/calcite-button-8e9175c0.js +0 -228
- package/dist/calcite-flow-57d26d2d.js +0 -128
- package/dist/calcite-flow-item-4a3e3fc0.js +0 -499
- package/dist/calcite-icon-d99e280a.js +0 -16
- package/dist/calcite-input-28b20785.js +0 -24
- package/dist/calcite-label-4f30e08d.js +0 -79
- package/dist/calcite-list-0cee7628.js +0 -2135
- package/dist/calcite-list-item-0a19efa8.js +0 -576
- package/dist/calcite-list-item-group-0706662f.js +0 -71
- package/dist/calcite-loader-865045b1.js +0 -14
- package/dist/calcite-modal-3e4da6fd.js +0 -333
- package/dist/calcite-notice-50b74ab7.js +0 -181
- package/dist/calcite-option-713c1d40.js +0 -94
- package/dist/calcite-scrim-809fbd0b.js +0 -18
- package/dist/calcite-select-28d8edfc.js +0 -231
- package/dist/capabilities-c8f838be.js +0 -50
- package/dist/chartCommon-13718cda.js +0 -256
- package/dist/chartUtilsAm5-6be145fb.js +0 -2954
- package/dist/clientSideDefaults-5c1f97c9.js +0 -39
- package/dist/colorRamps-8792655e.js +0 -38
- package/dist/colorUtils-54f4b662.js +0 -164
- package/dist/commonProperties-f9559903.js +0 -60
- package/dist/computeTranslationToOriginAndRotation-4876cb93.js +0 -60
- package/dist/conditionalSlot-87175989.js +0 -27
- package/dist/createConnection-f974a00a.js +0 -299
- package/dist/dataUtils-7c276b73.js +0 -1421
- package/dist/deduplicate-59fb9cac.js +0 -89
- package/dist/defaults-2bfa4a36.js +0 -31
- package/dist/deleteForwardEdits-f653b513.js +0 -13
- package/dist/diffUtils-e71a6152.js +0 -90
- package/dist/drapedUtils-b42fcbc6.js +0 -75
- package/dist/earcut-6fa1a128.js +0 -292
- package/dist/edgeProcessing-2ff1f201.js +0 -252
- package/dist/editingSupport-68545668.js +0 -203
- package/dist/editsZScale-c7cdd215.js +0 -37
- package/dist/elevationInfoUtils-5456a079.js +0 -126
- package/dist/executeForIds-4ab75c0d.js +0 -14
- package/dist/executeForTopCount-7e095ec1.js +0 -17
- package/dist/executeForTopExtents-19daf9d0.js +0 -17
- package/dist/executeForTopIds-1ba3a4af.js +0 -17
- package/dist/executeQueryJSON-46168866.js +0 -15
- package/dist/executeQueryPBF-d8623daf.js +0 -152
- package/dist/executeRelationshipQuery-011dfb45.js +0 -53
- package/dist/executeTopFeaturesQuery-02166801.js +0 -18
- package/dist/featureConversionUtils-650d7601.js +0 -479
- package/dist/featureLayerUtils-64e09283.js +0 -142
- package/dist/featureLayerUtils-b07f9c11.js +0 -250
- package/dist/featureSetUtils-9d37d6f8.js +0 -2530
- package/dist/featuresetbase-62aeb079.js +0 -707
- package/dist/featuresetgeom-51f9fc4e.js +0 -99
- package/dist/featuresetstats-4db32894.js +0 -81
- package/dist/featuresetstring-990c3287.js +0 -95
- package/dist/fetchService-5198dd4a.js +0 -33
- package/dist/fieldProperties-edfa24cb.js +0 -33
- package/dist/floatRGBA-516d7961.js +0 -20
- package/dist/form-99719d52.js +0 -138
- package/dist/geohashUtils-2bc76440.js +0 -85
- package/dist/geojson-603231df.js +0 -208
- package/dist/geomasync-e9063b4c.js +0 -567
- package/dist/geometryEngine-d3bb2fd6.js +0 -192
- package/dist/geometryEngineAsync-55aa6170.js +0 -217
- package/dist/geometryEngineBase-527e8b63.js +0 -18463
- package/dist/geometryEngineJSON-28087174.js +0 -46
- package/dist/geometryEngineJSON-d54949f9.js +0 -171
- package/dist/geometryEngineWorker-dc2c7127.js +0 -11
- package/dist/geometryServiceUtils-6a3e1e93.js +0 -28
- package/dist/georeference-ed8b2c30.js +0 -291
- package/dist/gif-204e82dd.js +0 -323
- package/dist/gltfexport-b2566542.js +0 -705
- package/dist/groupLayerUtils-ea9e6359.js +0 -39
- package/dist/heatmapUtils-56758920.js +0 -45
- package/dist/highlightReasons-de432106.js +0 -19
- package/dist/hydrated-0e1c7565.js +0 -40
- package/dist/i3s-bb0b5b67.js +0 -809
- package/dist/icon-c6e3bd23.js +0 -127
- package/dist/imageBitmapUtils-881d8c64.js +0 -23
- package/dist/imageUtils-57eeedc5.js +0 -69
- package/dist/imageUtils-ef69c578.js +0 -89
- package/dist/imageryUtils-23f51cb1.js +0 -43
- package/dist/index-01c737ed.js +0 -42563
- package/dist/input-message-673a9baa.js +0 -92
- package/dist/input2-bbf6454e.js +0 -575
- package/dist/interactive-aeb2cb9f.js +0 -80
- package/dist/jsonContext-2dc288b1.js +0 -15
- package/dist/jsonUtils-1abd4bfc.js +0 -59
- package/dist/jsonUtils-913fa1bd.js +0 -86
- package/dist/jsonUtils-f6a5e63b.js +0 -476
- package/dist/kmlUtils-7c2744fe.js +0 -112
- package/dist/knowledgeGraphService-6a349e04.js +0 -739
- package/dist/knowledgegraph-c91b0bb2.js +0 -149
- package/dist/labelUtils-a3634e8f.js +0 -61
- package/dist/labelingInfo-568c9210.js +0 -46
- package/dist/layersCreator-4a5366ea.js +0 -151
- package/dist/layersLoader-b87d4857.js +0 -197
- package/dist/lazyLayerLoader-8817000c.js +0 -10
- package/dist/lclayout-64c67b4e.js +0 -773
- package/dist/lengthUtils-695e744c.js +0 -5
- package/dist/lerc-wasm-13192bf3.js +0 -325
- package/dist/libtess-asm-4883179d.js +0 -3673
- package/dist/libtess-fc70d1ce.js +0 -269
- package/dist/lineSegment-3aa941f5.js +0 -76
- package/dist/loadGLTFMesh-db6645f5.js +0 -181
- package/dist/loadable-266f324b.js +0 -24
- package/dist/loader-d1ce1bc1.js +0 -79
- package/dist/lyr3DWorker-dd48e619.js +0 -2108
- package/dist/mapViewDeps-226d9da3.js +0 -3052
- package/dist/mediaLayerUtils-ae485c27.js +0 -35
- package/dist/meshFeatureSet-8a2ad011.js +0 -126
- package/dist/meshVertexSpaceUtils-6efe3dcc.js +0 -58
- package/dist/multidimensionalUtils-508a3f3f.js +0 -290
- package/dist/normalizeUtilsSync-1dae280b.js +0 -181
- package/dist/number-5aa3a81b.js +0 -128
- package/dist/objectResourceUtils-642ab03e.js +0 -1455
- package/dist/observers-f646a6a4.js +0 -30
- package/dist/ogcFeatureUtils-46ac1c44.js +0 -206
- package/dist/openCloseComponent-47eb52c6.js +0 -37
- package/dist/orientedBoundingBox-554ccdc6.js +0 -447
- package/dist/parser-0701286c.js +0 -488
- package/dist/pbf-5dd791f5.js +0 -215
- package/dist/pbfQueryUtils-a6ca7e23.js +0 -422
- package/dist/pe-wasm-6c16b121.js +0 -887
- package/dist/persistable-9eb0e8df.js +0 -89
- package/dist/perspectiveUtils-b194621d.js +0 -42
- package/dist/pieChart-b97433d0.js +0 -555
- package/dist/plane-3398eec1.js +0 -160
- package/dist/popupUtils-c444b896.js +0 -22
- package/dist/popupUtils-d871563b.js +0 -50
- package/dist/portalItemUtils-4c4caad0.js +0 -57
- package/dist/portalLayers-cb07742f.js +0 -312
- package/dist/portalUtils-effd590f.js +0 -7
- package/dist/programUtils-65af7b7c.js +0 -59
- package/dist/project-ee9c2947.js +0 -21
- package/dist/projectPointToVector-7dc831a9.js +0 -14
- package/dist/projectVectorToVector-5163db7a.js +0 -13
- package/dist/quantityUtils-5cd4cf90.js +0 -33
- package/dist/quantizationUtils-0a8f74c6.js +0 -68
- package/dist/quat-a508aed3.js +0 -104
- package/dist/query-b6e1fd14.js +0 -89
- package/dist/queryAttachments-7b39ebdc.js +0 -39
- package/dist/queryEngineUtils-cb8e309e.js +0 -21
- package/dist/queryTopFeatures-2e0e3941.js +0 -50
- package/dist/queryZScale-c5733d0a.js +0 -12
- package/dist/rasterProjectionHelper-213afa27.js +0 -577
- package/dist/rasterUtils-f2e44e8b.js +0 -122
- package/dist/rasterizingUtils-25cc0190.js +0 -46
- package/dist/request-e0c679b3.js +0 -46
- package/dist/requestImageUtils-37d79281.js +0 -8
- package/dist/resourceExtension-5f3f1c80.js +0 -17
- package/dist/resourceUtils-0d68cbc2.js +0 -69
- package/dist/resourceUtils-374db840.js +0 -62
- package/dist/resourceUtils-43ce192b.js +0 -42
- package/dist/saveAPIKeyUtils-1a3d4a8a.js +0 -8
- package/dist/saveUtils-43fdc547.js +0 -24
- package/dist/scaleUtils-bdf8b6cb.js +0 -23
- package/dist/scrim-44eb4dc0.js +0 -114
- package/dist/serviceCapabilitiesUtils-823612b8.js +0 -64
- package/dist/sourceUtils-01d115c6.js +0 -71
- package/dist/sphere-908cd9aa.js +0 -199
- package/dist/statsWorker-49f9befe.js +0 -37
- package/dist/streamLayerUtils-29324e05.js +0 -31
- package/dist/styleUtils-82e8da52.js +0 -75
- package/dist/styleUtils-8541d60d.js +0 -14
- package/dist/sublayerUtils-eaac2486.js +0 -37
- package/dist/substitute-1f578d70.js +0 -52
- package/dist/symbolColorUtils-18fd6b3d.js +0 -8
- package/dist/symbolLayerUtils-4c58b291.js +0 -31
- package/dist/symbologySnappingCandidates-14d94b6b.js +0 -221
- package/dist/t9n-c1c2b6c8.js +0 -349
- package/dist/testSVGPremultipliedAlpha-159dac90.js +0 -94
- package/dist/timeSupport-3f529cdb.js +0 -410
- package/dist/triangle-8a3a2ba8.js +0 -98
- package/dist/unitConversionUtils-f0ebaf75.js +0 -17
- package/dist/unitFormatUtils-555e2d94.js +0 -40
- package/dist/uploadAssetErrors-d1389781.js +0 -70
- package/dist/uploadAssets-5e85f09d.js +0 -330
- package/dist/utils-3a10b10c.js +0 -34
- package/dist/utils-505c54e9.js +0 -91
- package/dist/utils-5432e258.js +0 -433
- package/dist/utils-7a88ec6a.js +0 -419
- package/dist/utils-7fa9cdf9.js +0 -2746
- package/dist/utils-d252c575.js +0 -73
- package/dist/utils-f07e00b3.js +0 -232
- package/dist/utils-fda10b4b.js +0 -79
- package/dist/utils3-c34ab97c.js +0 -75
- package/dist/vec3-f79c600d.js +0 -81
- package/dist/vec42-36edeb73.js +0 -125
- package/dist/versionUtils-6935648b.js +0 -161
- package/dist/visualVariableUtils-c425461a.js +0 -267
- package/dist/webStyleSymbolUtils-4f42a29f.js +0 -48
- package/dist/webglDeps-5f18210d.js +0 -23
- package/dist/wfsUtils-6f7f1e3e.js +0 -343
- package/dist/workerHelper-9dc9a790.js +0 -11
- package/dist/xyChart-e5648fee.js +0 -3335
|
@@ -1,3052 +0,0 @@
|
|
|
1
|
-
import { gY as Rt, bz as zt, cs as ie, s as Ne, cr as It, dc as $t, t as Ke, fm as Dt, f$ as Lt, aO as H, k4 as Nt, k5 as Ut, k6 as Vt, bF as Gt, k7 as Ht, jo as Wt, Q as P, fc as qt, U as de, gU as jt, gX as Xt, W as re, j7 as Yt, bJ as Ue, i as Je, c9 as Kt, dO as Jt, f5 as Qt, b9 as Te, fd as Ve, fg as Ce, iT as Zt, g2 as Qe, f9 as ei, f7 as ti, iJ as ii, iL as ri, N as si, hc as ai, k8 as ni, k9 as oi, l as Ze, ka as li, he as hi, x as ci, a as ui, o as Ee, P as di, b as et, dj as pi, kb as _i } from "./index-01c737ed.js";
|
|
2
|
-
import { o as mi } from "./colorUtils-54f4b662.js";
|
|
3
|
-
import { aU as tt, aV as fi, K as ae, aW as gi, t as yi, aX as vi, aY as bi } from "./UpdateTracking2D-e9adad8f.js";
|
|
4
|
-
import { o as wi, f as F, B as xi, b as Mi, p as ge, I as O, D as Re, h as se, L as ye, T as ze, x as it, w as Oi, P as Si, A as Pi, F as Ti, E as Ci, z as Ft, t as k, u as Ei } from "./utils-7a88ec6a.js";
|
|
5
|
-
import { i as xe } from "./enums-fa8f05ab.js";
|
|
6
|
-
import { f as he } from "./OverrideHelper-82325a2c.js";
|
|
7
|
-
import { f as rt, m as st, e as Ri, a as zi } from "./SDFHelper-a34e90ee.js";
|
|
8
|
-
import { o as Fi, $ as j, _ as Fe, e as ki, j as at, t as Bi, p as Ai, f as Ii, M as $e, I as ce, J as $i, T as kt, v as Di } from "./definitions-a00a3a6c.js";
|
|
9
|
-
import { A as ve, E as D, t as Li, g as Ni, o as nt, h as Ui, i as Vi } from "./Container-ac97765a.js";
|
|
10
|
-
import { d as Gi, e as ot, a as Q, c as lt, h as ht, i as Hi, m as Wi } from "./WGLContainer-3d159b63.js";
|
|
11
|
-
import { L as A } from "./enums-25d066fc.js";
|
|
12
|
-
import { e as qi, a as Me } from "./ProgramTemplate-eee4f097.js";
|
|
13
|
-
import { n as Se } from "./programUtils-65af7b7c.js";
|
|
14
|
-
import { e as ct, r as ji, t as Xi, a as Yi, n as Ki, b as Ji, c as Qi } from "./MagnifierPrograms-da7a27ab.js";
|
|
15
|
-
import { d as Pn, f as Tn } from "./MagnifierPrograms-da7a27ab.js";
|
|
16
|
-
import { h as Ge } from "./BufferObject-cbd0168e.js";
|
|
17
|
-
import { R as v, E as ne, F as He, G as C, D as E, L, O as De, I as ke, C as Le, B as We, U as qe, T as ut, N as Be, P as Zi } from "./enums-2c166c09.js";
|
|
18
|
-
import { o as je } from "./VertexArrayObject-07998745.js";
|
|
19
|
-
import { o as er, w as tr } from "./RenderingContext-3db74548.js";
|
|
20
|
-
import { p as ir, s as rr } from "./imageUtils-57eeedc5.js";
|
|
21
|
-
import { e as sr, i as ar } from "./rasterizingUtils-25cc0190.js";
|
|
22
|
-
import { t as $ } from "./Rect-894f011c.js";
|
|
23
|
-
import { e as R, m as X } from "./Texture-22a8cca5.js";
|
|
24
|
-
import { n as dt } from "./pbf-5dd791f5.js";
|
|
25
|
-
import { o as nr } from "./floatRGBA-516d7961.js";
|
|
26
|
-
import { j as or, M as lr, y as hr } from "./LabelMetric-e2728bbf.js";
|
|
27
|
-
import { f as cr } from "./utils-505c54e9.js";
|
|
28
|
-
import { t as pt } from "./VertexElementDescriptor-d7c718c2.js";
|
|
29
|
-
import { x as N, i as Xe, s as ur } from "./Program-ba2f18b2.js";
|
|
30
|
-
import { F as dr, T as pr } from "./FeatureCommandQueue-d4817eac.js";
|
|
31
|
-
import { $ as En } from "./GraphicsView2D-347562b8.js";
|
|
32
|
-
import { t as zn } from "./GraphicContainer-1fd6bfce.js";
|
|
33
|
-
import { t as _t } from "./requestImageUtils-37d79281.js";
|
|
34
|
-
import "vue";
|
|
35
|
-
import "./vec42-36edeb73.js";
|
|
36
|
-
import "./vec4f64-043e974c.js";
|
|
37
|
-
import "./TurboLine-6ab04aef.js";
|
|
38
|
-
import "./earcut-6fa1a128.js";
|
|
39
|
-
import "./GeometryUtils-fa897cbd.js";
|
|
40
|
-
import "./OptimizedGeometry-3b808152.js";
|
|
41
|
-
import "./defaults-2bfa4a36.js";
|
|
42
|
-
import "./defaultsJSON-ba17aa15.js";
|
|
43
|
-
import "./BindType-5e76c8e1.js";
|
|
44
|
-
import "./Util-002f5109.js";
|
|
45
|
-
import "./highlightReasons-de432106.js";
|
|
46
|
-
import "./constants-5bd557fe.js";
|
|
47
|
-
import "./quantizationUtils-0a8f74c6.js";
|
|
48
|
-
import "./parser-0701286c.js";
|
|
49
|
-
import "./vec4f32-b2628ced.js";
|
|
50
|
-
import "./StyleDefinition-f4862d5a.js";
|
|
51
|
-
import "./config-61215215.js";
|
|
52
|
-
import "./featureConversionUtils-650d7601.js";
|
|
53
|
-
import "./OptimizedFeatureSet-54e095c4.js";
|
|
54
|
-
import "./NestedMap-83f8e815.js";
|
|
55
|
-
import "./CircularArray-b2bc1dfd.js";
|
|
56
|
-
import "./testSVGPremultipliedAlpha-159dac90.js";
|
|
57
|
-
import "./AttributeStore-b90878e3.js";
|
|
58
|
-
import "./labelUtils-a3634e8f.js";
|
|
59
|
-
import "./FieldsIndex-75cca4d0.js";
|
|
60
|
-
import "./UnknownTimeZone-220952b5.js";
|
|
61
|
-
import "./TimeOnly-9ee66ca6.js";
|
|
62
|
-
import "./timeSupport-3f529cdb.js";
|
|
63
|
-
import "./json-5febf88a.js";
|
|
64
|
-
import "./diffUtils-e71a6152.js";
|
|
65
|
-
import "./OrderIndependentTransparency-3eadfe42.js";
|
|
66
|
-
import "./basicInterfaces-fa4f5fa7.js";
|
|
67
|
-
import "./doublePrecisionUtils-46e21550.js";
|
|
68
|
-
import "./lengthUtils-695e744c.js";
|
|
69
|
-
import "./normalizeUtilsSync-1dae280b.js";
|
|
70
|
-
import "./AGraphicContainer-98a4c8a4.js";
|
|
71
|
-
import "./TechniqueInstance-0481dbff.js";
|
|
72
|
-
import "./TileContainer-0bf0ea1b.js";
|
|
73
|
-
import "./vec3f32-304a6a9c.js";
|
|
74
|
-
const _r = () => Ne.getLogger("esri.symbols.cim.cimAnalyzer");
|
|
75
|
-
function mr(u) {
|
|
76
|
-
const e = u.markerPlacement;
|
|
77
|
-
return e && e.angleToLine ? xe.MAP : xe.SCREEN;
|
|
78
|
-
}
|
|
79
|
-
class fr {
|
|
80
|
-
constructor(e) {
|
|
81
|
-
this._cimLayers = [], this._poMap = {}, this._primitiveOverrides = [], e && (this._resourceManager = e);
|
|
82
|
-
}
|
|
83
|
-
analyzeSymbolReference(e, t, i) {
|
|
84
|
-
if (this._cimLayers = i ?? [], !e)
|
|
85
|
-
return this._cimLayers;
|
|
86
|
-
if (this._reset(), e.primitiveOverrides) {
|
|
87
|
-
this._primitiveOverrides = e.primitiveOverrides;
|
|
88
|
-
for (const r of this._primitiveOverrides) {
|
|
89
|
-
const a = r.valueExpressionInfo;
|
|
90
|
-
if (a)
|
|
91
|
-
this._setPoMap(r.primitiveName, r.propertyName, a);
|
|
92
|
-
else if (r.value != null) {
|
|
93
|
-
let s = r.value;
|
|
94
|
-
r.propertyName.includes("Color") && (mi(s) && (s = wi(s)), s = F(s)), this._setPoMap(r.primitiveName, r.propertyName, s);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return this._analyzeSymbol(e.symbol, t), this._cimLayers;
|
|
99
|
-
}
|
|
100
|
-
_reset() {
|
|
101
|
-
this._cimLayers = [], this._poMap = {}, this._primitiveOverrides = [];
|
|
102
|
-
}
|
|
103
|
-
_analyzeSymbol(e, t) {
|
|
104
|
-
switch (e == null ? void 0 : e.type) {
|
|
105
|
-
case "CIMPointSymbol":
|
|
106
|
-
case "CIMLineSymbol":
|
|
107
|
-
case "CIMPolygonSymbol":
|
|
108
|
-
this._analyzeMultiLayerSymbol(e, t);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
_analyzeMultiLayerSymbol(e, t) {
|
|
112
|
-
const i = e == null ? void 0 : e.symbolLayers;
|
|
113
|
-
if (!i)
|
|
114
|
-
return;
|
|
115
|
-
const r = e.effects;
|
|
116
|
-
let a = xe.SCREEN;
|
|
117
|
-
const s = xi(e) ?? 0;
|
|
118
|
-
e.type === "CIMPointSymbol" && e.angleAlignment === "Map" && (a = xe.MAP);
|
|
119
|
-
const n = e.type === "CIMPolygonSymbol";
|
|
120
|
-
let o = i.length;
|
|
121
|
-
for (; o--; ) {
|
|
122
|
-
const l = i[o];
|
|
123
|
-
if (!l || l.enable === !1)
|
|
124
|
-
continue;
|
|
125
|
-
let h;
|
|
126
|
-
r != null && r.length && (h = [...r]);
|
|
127
|
-
const c = l.effects;
|
|
128
|
-
c != null && c.length && (r ? h.push(...c) : h = [...c]);
|
|
129
|
-
let d = null;
|
|
130
|
-
if (h) {
|
|
131
|
-
d = [];
|
|
132
|
-
for (const _ of h) {
|
|
133
|
-
const f = he.findEffectOverrides(_, this._primitiveOverrides);
|
|
134
|
-
f && d.push(f);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
const p = [];
|
|
138
|
-
switch (he.findApplicableOverrides(l, this._primitiveOverrides, p), l.type) {
|
|
139
|
-
case "CIMSolidFill":
|
|
140
|
-
this._analyzeSolidFill(l, d);
|
|
141
|
-
break;
|
|
142
|
-
case "CIMPictureFill":
|
|
143
|
-
this._analyzePictureFill(l, d);
|
|
144
|
-
break;
|
|
145
|
-
case "CIMHatchFill":
|
|
146
|
-
this._analyzeHatchFill(l, d);
|
|
147
|
-
break;
|
|
148
|
-
case "CIMGradientFill":
|
|
149
|
-
this._analyzeGradientFill(l, d);
|
|
150
|
-
break;
|
|
151
|
-
case "CIMSolidStroke":
|
|
152
|
-
this._analyzeSolidStroke(l, d, n, s);
|
|
153
|
-
break;
|
|
154
|
-
case "CIMPictureStroke":
|
|
155
|
-
this._analyzePictureStroke(l, d, n, s);
|
|
156
|
-
break;
|
|
157
|
-
case "CIMGradientStroke":
|
|
158
|
-
this._analyzeGradientStroke(l, d, n, s);
|
|
159
|
-
break;
|
|
160
|
-
case "CIMCharacterMarker":
|
|
161
|
-
case "CIMPictureMarker":
|
|
162
|
-
case "CIMVectorMarker": {
|
|
163
|
-
e.type !== "CIMLineSymbol" && e.type !== "CIMPolygonSymbol" || (a = mr(l));
|
|
164
|
-
const _ = [], f = l.primitiveName;
|
|
165
|
-
f && _.push(f);
|
|
166
|
-
const g = n && Mi(l.markerPlacement);
|
|
167
|
-
this._analyzeMarker(l, d, null, _, a, s, t, [], !1, g);
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
default:
|
|
171
|
-
_r().error("Cannot analyze CIM layer", l.type);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
_analyzeSolidFill(e, t) {
|
|
176
|
-
const { primitiveName: i, type: r } = e, a = F(e.color);
|
|
177
|
-
this._cimLayers.push({ type: "fill", spriteRasterizationParam: null, colorLocked: !!e.colorLocked, color: this._getValueOrOverrideExpression(r, i, "Color", a), height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, effects: t, applyRandomOffset: !1, sampleAlphaOnly: !0, hasUnresolvedReplacementColor: !1 });
|
|
178
|
-
}
|
|
179
|
-
_analyzePictureFill(e, t) {
|
|
180
|
-
const { primitiveName: i, type: r } = e, a = ge(e), s = O(e.height, k.CIMPictureFill.height);
|
|
181
|
-
let n = O(e.scaleX, 1);
|
|
182
|
-
if ("width" in e && typeof e.width == "number") {
|
|
183
|
-
const l = e.width;
|
|
184
|
-
let h = 1;
|
|
185
|
-
const c = this._resourceManager.getResource(e.url);
|
|
186
|
-
c != null && (h = c.width / c.height), n /= h * (s / l);
|
|
187
|
-
}
|
|
188
|
-
const o = { type: "sprite-rasterization-param", resource: e, overrides: this._getPrimitiveMaterialOverrides(i, r) };
|
|
189
|
-
this._cimLayers.push({ type: "fill", spriteRasterizationParam: o, colorLocked: !!e.colorLocked, effects: t, color: this._getValueOrOverrideExpression(r, i, "TintColor", a), height: this._getValueOrOverrideExpression(r, i, "Height", s), scaleX: this._getValueOrOverrideExpression(r, i, "ScaleX", n), angle: this._getValueOrOverrideExpression(r, i, "Rotation", O(e.rotation)), offsetX: this._getValueOrOverrideExpression(r, i, "OffsetX", O(e.offsetX)), offsetY: this._getValueOrOverrideExpression(r, i, "OffsetY", O(e.offsetY)), applyRandomOffset: !1, sampleAlphaOnly: !1, hasUnresolvedReplacementColor: !1 });
|
|
190
|
-
}
|
|
191
|
-
_analyzeHatchFill(e, t) {
|
|
192
|
-
var h, c, d;
|
|
193
|
-
const { primitiveName: i, type: r } = e, a = this._analyzeMaterialOverrides(i, ["Rotation", "OffsetX", "OffsetY"]), s = this._normalizePrimitiveOverrideProps(a);
|
|
194
|
-
let n = [255, 255, 255, 1], o = !1;
|
|
195
|
-
if ((h = e.lineSymbol) != null && h.symbolLayers)
|
|
196
|
-
for (const p of e.lineSymbol.symbolLayers) {
|
|
197
|
-
if (p.type !== "CIMSolidStroke")
|
|
198
|
-
continue;
|
|
199
|
-
const _ = p.primitiveName ?? i;
|
|
200
|
-
o || !_ || p.colorLocked || ((c = this._poMap[_]) == null ? void 0 : c.Color) == null && ((d = this._poMap[_]) == null ? void 0 : d.StrokeColor) == null || (n = F(p.color), n = this._maybeGetValueOrOverrideExpression(_, "StrokeColor") ?? this._getValueOrOverrideExpression(r, _, "Color", n), o = !0);
|
|
201
|
-
const f = this._maybeGetValueOrOverrideExpression(_, "StrokeWidth");
|
|
202
|
-
if (f) {
|
|
203
|
-
let g = null, y = null;
|
|
204
|
-
typeof f == "number" ? g = f : y = f.valueExpressionInfo;
|
|
205
|
-
let m = s.find((M) => M.propertyName === "strokeWidth");
|
|
206
|
-
m ? m.propertyName = "width" : (m = { type: "CIMPrimitiveOverride", primitiveName: _, propertyName: "width", valueExpressionInfo: y, value: g, defaultValue: Re(r, "width") }, s.push(m));
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
const l = { type: "sprite-rasterization-param", resource: e, overrides: s };
|
|
210
|
-
this._cimLayers.push({ type: "fill", spriteRasterizationParam: l, colorLocked: !!e.colorLocked, effects: t, color: n, height: this._getValueOrOverrideExpression(r, i, "Separation", O(e.separation, k.CIMHatchFill.separation)), scaleX: 1, angle: this._getValueOrOverrideExpression(r, i, "Rotation", O(e.rotation)), offsetX: this._getValueOrOverrideExpression(r, i, "OffsetX", O(e.offsetX)), offsetY: this._getValueOrOverrideExpression(r, i, "OffsetY", O(e.offsetY)), applyRandomOffset: !1, sampleAlphaOnly: !0, hasUnresolvedReplacementColor: !o });
|
|
211
|
-
}
|
|
212
|
-
_analyzeGradientFill(e, t) {
|
|
213
|
-
this._cimLayers.push({ type: "fill", spriteRasterizationParam: null, colorLocked: !!e.colorLocked, effects: t, color: [128, 128, 128, 1], height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, applyRandomOffset: !1, sampleAlphaOnly: !1, hasUnresolvedReplacementColor: !1 });
|
|
214
|
-
}
|
|
215
|
-
_analyzeSolidStroke(e, t, i, r) {
|
|
216
|
-
const { primitiveName: a, type: s } = e, n = F(e.color), o = O(e.width, k.CIMSolidStroke.width), l = se(e.capStyle, k.CIMSolidStroke.capstyle), h = se(e.joinStyle, k.CIMSolidStroke.joinstyle), c = e.miterLimit;
|
|
217
|
-
let d, p, _ = [];
|
|
218
|
-
if (this._analyzePrimitiveOverrides(a, t, null, null) && (_ = this._getPrimitiveMaterialOverrides(a, s)), t && t instanceof Array && t.length > 0) {
|
|
219
|
-
const g = t[t.length - 1].effect;
|
|
220
|
-
g && g.type === "CIMGeometricEffectDashes" && g.lineDashEnding === "NoConstraint" && g.offsetAlongLine === null && (d = g.dashTemplate, p = g.scaleDash, (t = [...t]).pop());
|
|
221
|
-
}
|
|
222
|
-
const f = d !== void 0 ? { type: "sprite-rasterization-param", resource: { type: "dash", dashTemplate: d, capStyle: l }, overrides: _ } : null;
|
|
223
|
-
this._cimLayers.push({ type: "line", spriteRasterizationParam: f, isOutline: i, colorLocked: !!e.colorLocked, effects: t, color: this._getValueOrOverrideExpression(s, a, "Color", n), width: this._getValueOrOverrideExpression(s, a, "Width", o), cap: this._getValueOrOverrideExpression(s, a, "CapStyle", l), join: this._getValueOrOverrideExpression(s, a, "JoinStyle", h), miterLimit: c && this._getValueOrOverrideExpression(s, a, "MiterLimit", c), referenceWidth: r, zOrder: Ae(e.name), dashTemplate: d, scaleDash: p, sampleAlphaOnly: !0 });
|
|
224
|
-
}
|
|
225
|
-
_analyzePictureStroke(e, t, i, r) {
|
|
226
|
-
const { primitiveName: a, type: s } = e, n = ge(e), o = O(e.width, k.CIMPictureStroke.width), l = se(e.capStyle, k.CIMPictureStroke.capstyle), h = se(e.joinStyle, k.CIMPictureStroke.joinstyle), c = e.miterLimit, d = { type: "sprite-rasterization-param", resource: e, overrides: this._getPrimitiveMaterialOverrides(a, s) };
|
|
227
|
-
this._cimLayers.push({ type: "line", spriteRasterizationParam: d, isOutline: i, colorLocked: !!e.colorLocked, effects: t, color: this._getValueOrOverrideExpression(s, a, "TintColor", n), width: this._getValueOrOverrideExpression(s, a, "Width", o), cap: this._getValueOrOverrideExpression(s, a, "CapStyle", l), join: this._getValueOrOverrideExpression(s, a, "JoinStyle", h), miterLimit: c && this._getValueOrOverrideExpression(s, a, "MiterLimit", c), referenceWidth: r, zOrder: Ae(e.name), dashTemplate: null, scaleDash: !1, sampleAlphaOnly: !1 });
|
|
228
|
-
}
|
|
229
|
-
_analyzeGradientStroke(e, t, i, r) {
|
|
230
|
-
const { primitiveName: a, type: s } = e, n = O(e.width, k.CIMSolidStroke.width), o = se(e.capStyle, k.CIMGradientStroke.capstyle), l = se(e.joinStyle, k.CIMGradientStroke.joinstyle), h = e.miterLimit;
|
|
231
|
-
this._cimLayers.push({ type: "line", spriteRasterizationParam: null, isOutline: i, colorLocked: !!e.colorLocked, effects: t, color: [128, 128, 128, 1], width: this._getValueOrOverrideExpression(s, a, "Width", n), cap: this._getValueOrOverrideExpression(s, a, "CapStyle", o), join: this._getValueOrOverrideExpression(s, a, "JoinStyle", l), miterLimit: h && this._getValueOrOverrideExpression(s, a, "MiterLimit", h), referenceWidth: r, zOrder: Ae(e.name), dashTemplate: null, scaleDash: !1, sampleAlphaOnly: !1 });
|
|
232
|
-
}
|
|
233
|
-
_analyzeMarker(e, t, i, r, a, s, n, o, l = !1, h = !1) {
|
|
234
|
-
if (l || (l = !!e.colorLocked), this._analyzeMarkerInsidePolygon(e, t, l))
|
|
235
|
-
return;
|
|
236
|
-
const c = O(e.size, k.CIMVectorMarker.size), d = O(e.rotation), p = O(e.offsetX), _ = O(e.offsetY), { primitiveName: f, type: g } = e, y = this._getValueOrOverrideExpression(g, f, "Size", c), m = this._getValueOrOverrideExpression(g, f, "Rotation", d), M = this._getValueOrOverrideExpression(g, f, "OffsetX", p), w = this._getValueOrOverrideExpression(g, f, "OffsetY", _);
|
|
237
|
-
switch (e.type) {
|
|
238
|
-
case "CIMPictureMarker":
|
|
239
|
-
this._analyzePictureMarker(e, t, i, r, a, s, y, m, M, w, o, l, h);
|
|
240
|
-
break;
|
|
241
|
-
case "CIMVectorMarker":
|
|
242
|
-
this._analyzeVectorMarker(e, t, i, r, a, s, y, m, M, w, o, n, l, h);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
_analyzeMarkerInsidePolygon(e, t, i) {
|
|
246
|
-
const { markerPlacement: r, type: a } = e;
|
|
247
|
-
if (!r || r.type !== "CIMMarkerPlacementInsidePolygon")
|
|
248
|
-
return !1;
|
|
249
|
-
if (a === "CIMVectorMarker" || a === "CIMPictureMarker") {
|
|
250
|
-
const d = e.primitiveName;
|
|
251
|
-
if (d && this._analyzePrimitiveOverrides([d], t, null, null))
|
|
252
|
-
return !1;
|
|
253
|
-
const p = r.primitiveName;
|
|
254
|
-
if (p && this._analyzePrimitiveOverrides([p], t, null, null))
|
|
255
|
-
return !1;
|
|
256
|
-
if (a === "CIMVectorMarker") {
|
|
257
|
-
const { markerGraphics: _ } = e;
|
|
258
|
-
if (_)
|
|
259
|
-
for (const f of _) {
|
|
260
|
-
const { symbol: g } = f;
|
|
261
|
-
if ((g == null ? void 0 : g.type) === "CIMPolygonSymbol" && g.symbolLayers) {
|
|
262
|
-
const { symbolLayers: y } = g;
|
|
263
|
-
for (const m of y)
|
|
264
|
-
if (m.type === "CIMSolidStroke")
|
|
265
|
-
return !1;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
} else {
|
|
269
|
-
const { animatedSymbolProperties: _ } = e;
|
|
270
|
-
if (_)
|
|
271
|
-
return !1;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
const s = Math.abs(r.stepX), n = Math.abs(r.stepY);
|
|
275
|
-
if (s === 0 || n === 0)
|
|
276
|
-
return !0;
|
|
277
|
-
let o, l;
|
|
278
|
-
if (r.gridType === "Random") {
|
|
279
|
-
const d = It(Fi), p = Math.max(Math.floor(d / s), 1);
|
|
280
|
-
o = n * Math.max(Math.floor(d / n), 1), l = p * s / o;
|
|
281
|
-
} else
|
|
282
|
-
r.shiftOddRows ? (o = 2 * n, l = s / n * 0.5) : (o = n, l = s / n);
|
|
283
|
-
const h = ge(e), c = e.type === "CIMCharacterMarker" ? null : { type: "sprite-rasterization-param", resource: e, overrides: [] };
|
|
284
|
-
return this._cimLayers.push({ type: "fill", spriteRasterizationParam: c, colorLocked: i, effects: t, color: h, height: o, scaleX: l, angle: r.gridAngle, offsetX: O(r.offsetX), offsetY: O(r.offsetY), applyRandomOffset: r.gridType === "Random", sampleAlphaOnly: e.type !== "CIMPictureMarker", hasUnresolvedReplacementColor: !0 }), !0;
|
|
285
|
-
}
|
|
286
|
-
_analyzePictureMarker(e, t, i, r, a, s, n, o, l, h, c, d, p) {
|
|
287
|
-
var T, S, z, U, B, W, V, q;
|
|
288
|
-
const { primitiveName: _, type: f } = e;
|
|
289
|
-
let g = O(e.scaleX, 1);
|
|
290
|
-
const y = ge(e);
|
|
291
|
-
i || (i = this._createMarkerPlacementOverrideExpression(e.markerPlacement));
|
|
292
|
-
const m = this._createAnimatedSymbolPropertiesOverrideExpression(e.animatedSymbolProperties), M = e.anchorPoint ?? { x: 0, y: 0 };
|
|
293
|
-
if ("width" in e && typeof e.width == "number") {
|
|
294
|
-
const Y = e.width;
|
|
295
|
-
let K = 1;
|
|
296
|
-
const G = this._resourceManager.getResource(e.url);
|
|
297
|
-
G != null && (K = G.width / G.height), g /= K * (O(e.size) / Y);
|
|
298
|
-
}
|
|
299
|
-
const w = [...r];
|
|
300
|
-
let x;
|
|
301
|
-
e.primitiveName && w.push(e.primitiveName), e.animatedSymbolProperties || m ? x = { type: "animated", url: e.url, urlHash: "H" + Rt(e.url), playAnimation: (T = e.animatedSymbolProperties) == null ? void 0 : T.playAnimation, reverseAnimation: (S = e.animatedSymbolProperties) == null ? void 0 : S.reverseAnimation, randomizeStartTime: (z = e.animatedSymbolProperties) == null ? void 0 : z.randomizeStartTime, randomizeStartSeed: (U = e.animatedSymbolProperties) == null ? void 0 : U.randomizeStartSeed, startTimeOffset: (B = e.animatedSymbolProperties) == null ? void 0 : B.startTimeOffset, duration: (W = e.animatedSymbolProperties) == null ? void 0 : W.duration, repeatType: (V = e.animatedSymbolProperties) == null ? void 0 : V.repeatType, repeatDelay: (q = e.animatedSymbolProperties) == null ? void 0 : q.repeatDelay } : (x = zt(e), x.markerPlacement = null);
|
|
302
|
-
const b = { type: "sprite-rasterization-param", resource: x, overrides: this._getMaterialOverrides(w, f) };
|
|
303
|
-
m && b.overrides.push(...m.overrides), this._cimLayers.push({ type: "marker", spriteRasterizationParam: b, colorLocked: d, effects: t, scaleSymbolsProportionally: !1, alignment: a, size: n, scaleX: this._getValueOrOverrideExpression(f, _, "ScaleX", g), rotation: o, offsetX: l, offsetY: h, transform: { type: "cim-marker-transform-param", params: c }, color: this._getValueOrOverrideExpression(f, _, "TintColor", y), anchorPoint: { x: M.x, y: M.y }, isAbsoluteAnchorPoint: e.anchorPointUnits !== "Relative", outlineColor: [0, 0, 0, 0], outlineWidth: 0, frameHeight: 0, widthRatio: 1, rotateClockwise: !!e.rotateClockwise, referenceSize: s, sizeRatio: 1, isOutline: p, markerPlacement: i, animatedSymbolProperties: m });
|
|
304
|
-
}
|
|
305
|
-
_analyzeVectorMarker(e, t, i, r, a, s, n, o, l, h, c, d, p, _) {
|
|
306
|
-
const f = e.markerGraphics;
|
|
307
|
-
if (!f)
|
|
308
|
-
return;
|
|
309
|
-
const g = e.frame;
|
|
310
|
-
let y = 0;
|
|
311
|
-
if (y = g ? g.ymax - g.ymin : s, y) {
|
|
312
|
-
const m = { offsetX: l, offsetY: h, rotation: o, size: n, frameHeight: y, rotateClockWise: !!e.rotateClockwise };
|
|
313
|
-
c = [...c, m];
|
|
314
|
-
}
|
|
315
|
-
i || (i = this._createMarkerPlacementOverrideExpression(e.markerPlacement));
|
|
316
|
-
for (const m of f)
|
|
317
|
-
if (m) {
|
|
318
|
-
const M = m.symbol;
|
|
319
|
-
if (!M)
|
|
320
|
-
continue;
|
|
321
|
-
const w = m.primitiveName;
|
|
322
|
-
let x;
|
|
323
|
-
if (w && r.push(w), (M.type === "CIMPointSymbol" || M.type === "CIMTextSymbol") && g) {
|
|
324
|
-
let b = 0, T = 0;
|
|
325
|
-
const S = m.geometry;
|
|
326
|
-
"x" in S && "y" in S && (b += S.x - 0.5 * (g.xmin + g.xmax), T += S.y - 0.5 * (g.ymin + g.ymax));
|
|
327
|
-
const z = e.anchorPoint;
|
|
328
|
-
z && (e.anchorPointUnits === "Absolute" ? (b -= z.x, T -= z.y) : g && (b -= (g.xmax - g.xmin) * z.x, T -= (g.ymax - g.ymin) * z.y));
|
|
329
|
-
const U = { offsetX: b, offsetY: T, rotation: 0, size: 0, frameHeight: 0, rotateClockWise: !1 };
|
|
330
|
-
x = [...c, U];
|
|
331
|
-
}
|
|
332
|
-
switch (M.type) {
|
|
333
|
-
case "CIMPointSymbol":
|
|
334
|
-
case "CIMLineSymbol":
|
|
335
|
-
case "CIMPolygonSymbol":
|
|
336
|
-
d || yr(M) ? this._analyzeMultiLayerGraphicNonSDF(e, t, i, null, m, r, a, s, x ?? c, y, p, _) : this._analyzeMultiLayerGraphic(e, t, i, null, m, r, a, s, x ?? c, y, p, _);
|
|
337
|
-
break;
|
|
338
|
-
case "CIMTextSymbol":
|
|
339
|
-
this._analyzeTextGraphic(t, i, m, r, a, s, x ?? c, p);
|
|
340
|
-
}
|
|
341
|
-
w && r.pop();
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
_analyzeMultiLayerGraphic(e, t, i, r, a, s, n, o, l, h, c, d) {
|
|
345
|
-
const p = a.symbol, _ = p.symbolLayers;
|
|
346
|
-
if (!_)
|
|
347
|
-
return;
|
|
348
|
-
let f = _.length;
|
|
349
|
-
if (gr(_))
|
|
350
|
-
return void this._analyzeCompositeMarkerGraphic(e, t, i, r, a, _, n, o, l, h, c, d);
|
|
351
|
-
const g = this._resourceManager.geometryEngine, y = tt.applyEffects(p.effects, a.geometry, g);
|
|
352
|
-
if (y)
|
|
353
|
-
for (; f--; ) {
|
|
354
|
-
const m = _[f];
|
|
355
|
-
if (!m || m.enable === !1)
|
|
356
|
-
continue;
|
|
357
|
-
const M = m.primitiveName;
|
|
358
|
-
switch (M && s.push(M), m.type) {
|
|
359
|
-
case "CIMSolidFill":
|
|
360
|
-
case "CIMSolidStroke": {
|
|
361
|
-
const w = tt.applyEffects(m.effects, y, g), x = rt(w);
|
|
362
|
-
if (!x)
|
|
363
|
-
continue;
|
|
364
|
-
const b = e.anchorPointUnits !== "Relative", [T, S, z, U] = st(x, e.frame, e.size, e.anchorPoint, b), B = m.type === "CIMSolidFill", W = { type: "sdf", geom: w, asFill: B }, { path: V } = m, q = B ? F(ye(m)) : V == null ? F(ze(m)) : [0, 0, 0, 0], Y = B ? [0, 0, 0, 0] : F(ze(m)), K = it(m) ?? 0;
|
|
365
|
-
if (!B && !K)
|
|
366
|
-
break;
|
|
367
|
-
const G = a.primitiveName;
|
|
368
|
-
let _e = null;
|
|
369
|
-
B && !m.colorLocked && (_e = this._maybeGetValueOrOverrideExpression(G, "FillColor"));
|
|
370
|
-
let oe = null;
|
|
371
|
-
B || m.colorLocked || (oe = this._maybeGetValueOrOverrideExpression(G, "StrokeColor"));
|
|
372
|
-
const Pe = _e ?? this._getValueOrOverrideExpression(m.type, M, "Color", q), me = oe ?? this._getValueOrOverrideExpression(m.type, M, "Color", Y), Z = this._maybeGetValueOrOverrideExpression(G, "StrokeWidth") ?? this._getValueOrOverrideExpression(m.type, M, "Width", K), fe = V ? { type: "sprite-rasterization-param", resource: { type: "path", path: V, asFill: B }, overrides: [] } : { type: "sprite-rasterization-param", resource: W, overrides: [] };
|
|
373
|
-
this._cimLayers.push({ type: "marker", spriteRasterizationParam: fe, colorLocked: !!m.colorLocked || !!c, effects: t, scaleSymbolsProportionally: !!e.scaleSymbolsProportionally, alignment: n, anchorPoint: { x: S, y: z }, isAbsoluteAnchorPoint: b, size: h, rotation: 0, offsetX: 0, offsetY: 0, scaleX: 1, transform: { type: "cim-marker-transform-param", params: l }, frameHeight: h, widthRatio: U, rotateClockwise: !1, referenceSize: o, sizeRatio: T, color: Pe, outlineColor: me, outlineWidth: Z, isOutline: d, markerPlacement: i, animatedSymbolProperties: r });
|
|
374
|
-
break;
|
|
375
|
-
}
|
|
376
|
-
case "CIMPictureMarker":
|
|
377
|
-
case "CIMVectorMarker":
|
|
378
|
-
m.markerPlacement ? this._analyzeMultiLayerGraphicNonSDF(e, t, i, r, a, s, n, o, l, h, !!m.colorLocked || !!c, d) : this._analyzeMarker(m, t, i, s, n, o, !1, l, c, d);
|
|
379
|
-
break;
|
|
380
|
-
default:
|
|
381
|
-
this._analyzeMultiLayerGraphicNonSDF(e, t, i, r, a, s, n, o, l, h, !!m.colorLocked || !!c, d);
|
|
382
|
-
}
|
|
383
|
-
M && s.pop();
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
_analyzeTextGraphic(e, t, i, r, a, s, n, o) {
|
|
387
|
-
var me;
|
|
388
|
-
const l = [];
|
|
389
|
-
he.findApplicableOverrides(i, this._primitiveOverrides, l);
|
|
390
|
-
const h = i.geometry;
|
|
391
|
-
if (!("x" in h) || !("y" in h))
|
|
392
|
-
return;
|
|
393
|
-
const c = i.symbol, d = Oi(c), p = Si(c.fontStyleName), _ = fi(c.fontFamilyName);
|
|
394
|
-
c.font = { family: _, decoration: d, ...p };
|
|
395
|
-
const f = O(c.height, k.CIMTextSymbol.height), g = O(c.angle), y = O(c.offsetX), m = O(c.offsetY), M = F(ye(c));
|
|
396
|
-
let w = F(ze(c)), x = it(c) ?? 0;
|
|
397
|
-
x || (w = F(ye(c.haloSymbol)), x = O(c.haloSize));
|
|
398
|
-
let b = !1;
|
|
399
|
-
if ((me = c.symbol) != null && me.symbolLayers)
|
|
400
|
-
for (const Z of c.symbol.symbolLayers)
|
|
401
|
-
F(ye(Z)) != null && (b = !!Z.colorLocked);
|
|
402
|
-
const T = i.primitiveName;
|
|
403
|
-
let S = null;
|
|
404
|
-
b || (S = this._maybeGetValueOrOverrideExpression(T, "FillColor"));
|
|
405
|
-
const z = this._maybeGetValueOrOverrideExpression(T, "TextSize"), U = this._maybeGetValueOrOverrideExpression(T, "TextAngle"), B = this._maybeGetValueOrOverrideExpression(T, "TextOffsetX"), W = this._maybeGetValueOrOverrideExpression(T, "TextOffsetY");
|
|
406
|
-
let V = null, q = null, Y = 0;
|
|
407
|
-
if (c.callout && c.callout.type === "CIMBackgroundCallout") {
|
|
408
|
-
const Z = c.callout;
|
|
409
|
-
if (Z.backgroundSymbol) {
|
|
410
|
-
const fe = Z.backgroundSymbol.symbolLayers;
|
|
411
|
-
if (fe)
|
|
412
|
-
for (const le of fe)
|
|
413
|
-
le.type === "CIMSolidFill" ? V = F(le.color) : le.type === "CIMSolidStroke" && (q = F(le.color), Y = O(le.width, k.CIMSolidStroke.width));
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
const K = this._getValueOrOverrideExpression(c.type, i.primitiveName, "TextString", i.textString ?? "");
|
|
417
|
-
if (K == null)
|
|
418
|
-
return;
|
|
419
|
-
const { fontStyleName: G } = c, _e = _ + (G ? "-" + G.toLowerCase() : "-regular"), oe = this._getMaterialOverrides(r, c.type);
|
|
420
|
-
oe.push(...this._getPrimitiveMaterialOverrides(i.primitiveName, c.type));
|
|
421
|
-
const Pe = { type: "text-rasterization-param", resource: { type: "text", textString: i.textString ?? "", font: c.font, symbol: c, primitiveName: i.primitiveName }, overrides: oe };
|
|
422
|
-
this._cimLayers.push({ type: "text", lineWidth: null, textRasterizationParam: Pe, colorLocked: !!o || !!b, effects: e, alignment: a, anchorPoint: { x: 0, y: 0 }, isAbsoluteAnchorPoint: !1, fontName: _e, decoration: d, weight: p.weight, style: p.style, size: z ?? f, angle: U ?? g, offsetX: B ?? y, offsetY: W ?? m, transform: { type: "cim-marker-transform-param", params: n }, horizontalAlignment: Pi(c.horizontalAlignment), verticalAlignment: Ti(c.verticalAlignment), text: K, color: S ?? this._getValueOrOverrideExpression(c.type, i.primitiveName, "Color", M), outlineColor: w, outlineSize: x, backgroundColor: V, borderLineColor: q, borderLineWidth: Y, referenceSize: s, sizeRatio: 1, markerPlacement: t });
|
|
423
|
-
}
|
|
424
|
-
_analyzeMultiLayerGraphicNonSDF(e, t, i, r, a, s, n, o, l, h, c, d) {
|
|
425
|
-
const p = this._buildSimpleMarker(e, a), _ = e.primitiveName, f = this._analyzeMaterialOverrides(_, ["Rotation", "OffsetX", "OffsetY"]), g = this._normalizePrimitiveOverrideProps(f), [y, m, M] = ae.getTextureAnchor(p, this._resourceManager), w = this._getMaterialOverrides(s, e.type);
|
|
426
|
-
w.push(...g);
|
|
427
|
-
const x = { type: "sprite-rasterization-param", resource: { ...p, avoidSDFRasterization: !0 }, overrides: w };
|
|
428
|
-
this._cimLayers.push({ type: "marker", spriteRasterizationParam: x, colorLocked: c, effects: t, scaleSymbolsProportionally: !!e.scaleSymbolsProportionally, alignment: n, anchorPoint: { x: y, y: m }, isAbsoluteAnchorPoint: !1, size: h, rotation: 0, offsetX: 0, offsetY: 0, transform: { type: "cim-marker-transform-param", params: l }, color: [255, 255, 255, 1], outlineColor: [0, 0, 0, 0], outlineWidth: 0, scaleX: 1, frameHeight: h, widthRatio: 1, rotateClockwise: !!e.rotateClockwise, referenceSize: o, sizeRatio: M / ie(e.size), isOutline: d, markerPlacement: i, animatedSymbolProperties: r });
|
|
429
|
-
}
|
|
430
|
-
_createMarkerPlacementOverrideExpression(e) {
|
|
431
|
-
if (!e)
|
|
432
|
-
return null;
|
|
433
|
-
const t = [];
|
|
434
|
-
return he.findApplicableOverrides(e, this._primitiveOverrides, t), { type: "cim-marker-placement-info", placement: e, overrides: mt(t) };
|
|
435
|
-
}
|
|
436
|
-
_createAnimatedSymbolPropertiesOverrideExpression(e) {
|
|
437
|
-
if (!e)
|
|
438
|
-
return null;
|
|
439
|
-
const t = [];
|
|
440
|
-
return he.findApplicableOverrides(e, this._primitiveOverrides, t), { type: "cim-animation-info", animation: e, overrides: mt(t) };
|
|
441
|
-
}
|
|
442
|
-
_buildSimpleMarker(e, t) {
|
|
443
|
-
return { type: e.type, enable: !0, name: e.name, colorLocked: e.colorLocked, primitiveName: e.primitiveName, anchorPoint: e.anchorPoint, anchorPointUnits: e.anchorPointUnits, offsetX: 0, offsetY: 0, rotateClockwise: e.rotateClockwise, rotation: 0, size: e.size, billboardMode3D: e.billboardMode3D, depth3D: e.depth3D, frame: e.frame, markerGraphics: [t], scaleSymbolsProportionally: e.scaleSymbolsProportionally, respectFrame: e.respectFrame, clippingPath: e.clippingPath };
|
|
444
|
-
}
|
|
445
|
-
_analyzeCompositeMarkerGraphic(e, t, i, r, a, s, n, o, l, h, c, d) {
|
|
446
|
-
const p = a.geometry, _ = s[0], f = s[1], g = rt(p);
|
|
447
|
-
if (!g)
|
|
448
|
-
return;
|
|
449
|
-
const y = e.anchorPointUnits !== "Relative", [m, M, w, x] = st(g, e.frame, e.size, e.anchorPoint, y), { path: b } = f, T = f.primitiveName, S = _.primitiveName, z = a.primitiveName;
|
|
450
|
-
let U = null;
|
|
451
|
-
f.colorLocked || c || (U = this._maybeGetValueOrOverrideExpression(z, "FillColor"));
|
|
452
|
-
const B = U ?? this._getValueOrOverrideExpression(f.type, T, "Color", F(f.color));
|
|
453
|
-
let W = null;
|
|
454
|
-
_.colorLocked || c || (W = this._maybeGetValueOrOverrideExpression(z, "StrokeColor"));
|
|
455
|
-
const V = W ?? this._getValueOrOverrideExpression(_.type, S, "Color", F(_.color)), q = this._maybeGetValueOrOverrideExpression(z, "StrokeWidth") ?? this._getValueOrOverrideExpression(_.type, S, "Width", O(_.width, k.CIMSolidStroke.width)), Y = { type: "sprite-rasterization-param", resource: b ? { type: "path", path: b, asFill: !0 } : { type: "sdf", geom: p, asFill: !0 }, overrides: [] };
|
|
456
|
-
this._cimLayers.push({ type: "marker", spriteRasterizationParam: Y, colorLocked: c, effects: t, scaleSymbolsProportionally: !!e.scaleSymbolsProportionally, alignment: n, anchorPoint: { x: M, y: w }, isAbsoluteAnchorPoint: y, size: h, rotation: 0, offsetX: 0, offsetY: 0, scaleX: 1, transform: { type: "cim-marker-transform-param", params: l }, frameHeight: h, widthRatio: x, rotateClockwise: !1, referenceSize: o, sizeRatio: m, color: B, outlineColor: V, outlineWidth: q, isOutline: d, markerPlacement: i, animatedSymbolProperties: r });
|
|
457
|
-
}
|
|
458
|
-
_setPoMap(e, t, i) {
|
|
459
|
-
let r;
|
|
460
|
-
this._poMap[e] ? r = this._poMap[e] : (r = {}, this._poMap[e] = r), r[t] = i;
|
|
461
|
-
}
|
|
462
|
-
_maybeGetValueOrOverrideExpression(e, t, i) {
|
|
463
|
-
return this._getValueOrOverrideExpression("", e, t, i, !1);
|
|
464
|
-
}
|
|
465
|
-
_getValueOrOverrideExpression(e, t, i, r, a = !0) {
|
|
466
|
-
if (a && !Ci(r) && (r = Re(e, i.toLowerCase())), t == null)
|
|
467
|
-
return r;
|
|
468
|
-
const s = this._poMap[t];
|
|
469
|
-
if (s == null)
|
|
470
|
-
return r;
|
|
471
|
-
const n = s[i];
|
|
472
|
-
return typeof n == "string" || typeof n == "number" || Array.isArray(n) ? n : n ? { valueExpressionInfo: n, defaultValue: r } : r;
|
|
473
|
-
}
|
|
474
|
-
_analyzePrimitiveOverrides(e, t, i, r) {
|
|
475
|
-
if (e == null)
|
|
476
|
-
return !1;
|
|
477
|
-
typeof e == "string" && (e = [e]);
|
|
478
|
-
for (const a of this._primitiveOverrides)
|
|
479
|
-
if (e.includes(a.primitiveName) && a.valueExpressionInfo)
|
|
480
|
-
return !0;
|
|
481
|
-
if (t != null) {
|
|
482
|
-
for (const a of t)
|
|
483
|
-
if ((a == null ? void 0 : a.overrides.length) > 0)
|
|
484
|
-
return !0;
|
|
485
|
-
}
|
|
486
|
-
if (i != null) {
|
|
487
|
-
for (const a of i)
|
|
488
|
-
if ((a == null ? void 0 : a.overrides.length) > 0)
|
|
489
|
-
return !0;
|
|
490
|
-
}
|
|
491
|
-
if (r != null) {
|
|
492
|
-
for (const a of r)
|
|
493
|
-
if ((a == null ? void 0 : a.overrides.length) > 0)
|
|
494
|
-
return !0;
|
|
495
|
-
}
|
|
496
|
-
return !1;
|
|
497
|
-
}
|
|
498
|
-
_getMaterialOverrides(e, t) {
|
|
499
|
-
if (!e)
|
|
500
|
-
return [];
|
|
501
|
-
const i = [];
|
|
502
|
-
for (const r of e)
|
|
503
|
-
i.push(...this._getPrimitiveMaterialOverrides(r, t));
|
|
504
|
-
return i;
|
|
505
|
-
}
|
|
506
|
-
_getPrimitiveMaterialOverrides(e, t) {
|
|
507
|
-
if (!e)
|
|
508
|
-
return [];
|
|
509
|
-
const i = this._normalizePrimitiveOverrideProps(this._primitiveOverrides.filter((r) => r.primitiveName === e));
|
|
510
|
-
return i.forEach((r) => r.defaultValue = Re(t, r.propertyName.toLowerCase())), i;
|
|
511
|
-
}
|
|
512
|
-
_analyzeMaterialOverrides(e, t) {
|
|
513
|
-
return this._primitiveOverrides.filter((i) => i.primitiveName !== e || !t.includes(i.propertyName));
|
|
514
|
-
}
|
|
515
|
-
_normalizePrimitiveOverrideProps(e) {
|
|
516
|
-
return e.map((t) => ({ ...t, propertyName: Ft(t.propertyName) }));
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
function Ae(u) {
|
|
520
|
-
if (u && u.indexOf("Level_") === 0) {
|
|
521
|
-
const e = parseInt(u.substr(6), 10);
|
|
522
|
-
if (!isNaN(e))
|
|
523
|
-
return e;
|
|
524
|
-
}
|
|
525
|
-
return 0;
|
|
526
|
-
}
|
|
527
|
-
const gr = (u) => u && u.length === 2 && u[0].enable && u[1].enable && u[0].type === "CIMSolidStroke" && u[1].type === "CIMSolidFill" && u[0].path == null && u[1].path == null && !u[0].effects && !u[1].effects;
|
|
528
|
-
function yr(u) {
|
|
529
|
-
const e = u.symbolLayers;
|
|
530
|
-
if (!e || e.length !== 2)
|
|
531
|
-
return !1;
|
|
532
|
-
const t = e.find((r) => {
|
|
533
|
-
var a;
|
|
534
|
-
return (a = r.effects) == null ? void 0 : a.find((s) => s.type === "CIMGeometricEffectDashes" && s.dashTemplate != null);
|
|
535
|
-
}), i = e.find((r) => {
|
|
536
|
-
var a;
|
|
537
|
-
return (a = r.effects) == null ? void 0 : a.find((s) => s.type === "CIMGeometricEffectAddControlPoints");
|
|
538
|
-
});
|
|
539
|
-
return !!t || !!i;
|
|
540
|
-
}
|
|
541
|
-
function mt(u) {
|
|
542
|
-
return zt(u).map((e) => ({ ...e, propertyName: Ft(e.propertyName) }));
|
|
543
|
-
}
|
|
544
|
-
let vr = class {
|
|
545
|
-
constructor(e) {
|
|
546
|
-
this.events = new $t(), this._hasMajorPerformanceCaveat = !1, this._lastRenderFrameCounter = 0, this._canvas = document.createElement("canvas"), this._canvas.setAttribute("style", "width: 100%; height:100%; display:block; willChange:transform");
|
|
547
|
-
const t = { failIfMajorPerformanceCaveat: !0, alpha: !0, antialias: !1, depth: !0, stencil: !0 };
|
|
548
|
-
e.appendChild(this._canvas);
|
|
549
|
-
let i = Ke(this._canvas, t);
|
|
550
|
-
i || (i = Ke(this._canvas, { ...t, failIfMajorPerformanceCaveat: !1 }), this._hasMajorPerformanceCaveat = !0), this._gl = i, this._handles = Dt([Lt(this._canvas, "webglcontextlost", (r) => this.events.emit("webgl-context-lost", r))]);
|
|
551
|
-
}
|
|
552
|
-
destroy() {
|
|
553
|
-
var e;
|
|
554
|
-
(e = this._canvas.parentNode) == null || e.removeChild(this._canvas), this._canvas = null, this._handles.remove(), this._gl = null;
|
|
555
|
-
}
|
|
556
|
-
get gl() {
|
|
557
|
-
return this._gl;
|
|
558
|
-
}
|
|
559
|
-
render(e, t) {
|
|
560
|
-
if (this._hasMajorPerformanceCaveat || H("esri-force-performance-mode")) {
|
|
561
|
-
if (++this._lastRenderFrameCounter >= H("esri-performance-mode-frames-between-render") && (t(), this._lastRenderViewState = e.state.clone(), this._lastRenderFrameCounter = 0), this._lastRenderViewState) {
|
|
562
|
-
const [i, r, a, s, n, o] = this._computeViewTransform(this._lastRenderViewState, e.state);
|
|
563
|
-
this._canvas.style.transform = `matrix(${i}, ${r}, ${a}, ${s}, ${n}, ${o})`;
|
|
564
|
-
}
|
|
565
|
-
} else
|
|
566
|
-
t();
|
|
567
|
-
}
|
|
568
|
-
resize(e) {
|
|
569
|
-
const t = this._canvas, i = t.style, { state: { size: r }, pixelRatio: a } = e, s = r[0], n = r[1], o = Math.round(s * a), l = Math.round(n * a);
|
|
570
|
-
t.width === o && t.height === l || (t.width = o, t.height = l), i.width = s + "px", i.height = n + "px";
|
|
571
|
-
}
|
|
572
|
-
_computeViewTransform(e, t) {
|
|
573
|
-
const [i, r] = e.center, [a, s] = t.center, [n, o] = e.toScreen([0, 0], a, s), [l, h] = e.toScreen([0, 0], i, r), c = l - n, d = h - o, p = e.scale / t.scale, _ = t.rotation - e.rotation, f = Wt();
|
|
574
|
-
return Nt(f), Ut(f, f, [p, p]), Vt(f, f, Gt(_)), Ht(f, f, [c, d]), f;
|
|
575
|
-
}
|
|
576
|
-
};
|
|
577
|
-
const br = { background: { "background.frag": `#ifdef PATTERN
|
|
578
|
-
uniform lowp float u_opacity;
|
|
579
|
-
uniform lowp sampler2D u_texture;
|
|
580
|
-
varying mediump vec4 v_tlbr;
|
|
581
|
-
varying mediump vec2 v_tileTextureCoord;
|
|
582
|
-
#else
|
|
583
|
-
uniform lowp vec4 u_color;
|
|
584
|
-
#endif
|
|
585
|
-
void main() {
|
|
586
|
-
#ifdef PATTERN
|
|
587
|
-
mediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);
|
|
588
|
-
mediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);
|
|
589
|
-
lowp vec4 color = texture2D(u_texture, samplePos);
|
|
590
|
-
gl_FragColor = u_opacity * color;
|
|
591
|
-
#else
|
|
592
|
-
gl_FragColor = u_color;
|
|
593
|
-
#endif
|
|
594
|
-
}`, "background.vert": `precision mediump float;
|
|
595
|
-
attribute vec2 a_pos;
|
|
596
|
-
uniform highp mat3 u_dvsMat3;
|
|
597
|
-
uniform mediump float u_coord_range;
|
|
598
|
-
uniform mediump float u_depth;
|
|
599
|
-
#ifdef PATTERN
|
|
600
|
-
uniform mediump mat3 u_pattern_matrix;
|
|
601
|
-
varying mediump vec2 v_tileTextureCoord;
|
|
602
|
-
uniform mediump vec4 u_tlbr;
|
|
603
|
-
uniform mediump vec2 u_mosaicSize;
|
|
604
|
-
varying mediump vec4 v_tlbr;
|
|
605
|
-
#endif
|
|
606
|
-
void main() {
|
|
607
|
-
gl_Position = vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);
|
|
608
|
-
#ifdef PATTERN
|
|
609
|
-
v_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;
|
|
610
|
-
v_tlbr = u_tlbr / u_mosaicSize.xyxy;
|
|
611
|
-
#endif
|
|
612
|
-
}` }, circle: { "circle.frag": `precision lowp float;
|
|
613
|
-
varying lowp vec4 v_color;
|
|
614
|
-
varying lowp vec4 v_stroke_color;
|
|
615
|
-
varying mediump float v_blur;
|
|
616
|
-
varying mediump float v_stroke_width;
|
|
617
|
-
varying mediump float v_radius;
|
|
618
|
-
varying mediump vec2 v_offset;
|
|
619
|
-
void main()
|
|
620
|
-
{
|
|
621
|
-
mediump float dist = length(v_offset);
|
|
622
|
-
mediump float alpha = smoothstep(0.0, -v_blur, dist - 1.0);
|
|
623
|
-
lowp float color_mix_ratio = v_stroke_width < 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));
|
|
624
|
-
gl_FragColor = alpha * mix(v_color, v_stroke_color, color_mix_ratio);
|
|
625
|
-
}`, "circle.vert": `precision mediump float;
|
|
626
|
-
attribute vec2 a_pos;
|
|
627
|
-
#pragma header
|
|
628
|
-
varying lowp vec4 v_color;
|
|
629
|
-
varying lowp vec4 v_stroke_color;
|
|
630
|
-
varying mediump float v_blur;
|
|
631
|
-
varying mediump float v_stroke_width;
|
|
632
|
-
varying mediump float v_radius;
|
|
633
|
-
varying mediump vec2 v_offset;
|
|
634
|
-
uniform highp mat3 u_dvsMat3;
|
|
635
|
-
uniform highp mat3 u_displayMat3;
|
|
636
|
-
uniform mediump vec2 u_circleTranslation;
|
|
637
|
-
uniform mediump float u_depth;
|
|
638
|
-
uniform mediump float u_antialiasingWidth;
|
|
639
|
-
void main()
|
|
640
|
-
{
|
|
641
|
-
#pragma main
|
|
642
|
-
v_color = color * opacity;
|
|
643
|
-
v_stroke_color = stroke_color * stroke_opacity;
|
|
644
|
-
v_stroke_width = stroke_width;
|
|
645
|
-
v_radius = radius;
|
|
646
|
-
v_blur = max(blur, u_antialiasingWidth / (radius + stroke_width));
|
|
647
|
-
mediump vec2 offset = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);
|
|
648
|
-
v_offset = offset;
|
|
649
|
-
mediump vec3 pos = u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);
|
|
650
|
-
gl_Position = vec4(pos.xy, u_depth, 1.0);
|
|
651
|
-
}` }, fill: { "fill.frag": `precision lowp float;
|
|
652
|
-
#ifdef PATTERN
|
|
653
|
-
uniform lowp sampler2D u_texture;
|
|
654
|
-
varying mediump vec2 v_tileTextureCoord;
|
|
655
|
-
varying mediump vec4 v_tlbr;
|
|
656
|
-
#endif
|
|
657
|
-
varying lowp vec4 v_color;
|
|
658
|
-
vec4 mixColors(vec4 color1, vec4 color2) {
|
|
659
|
-
float compositeAlpha = color2.a + color1.a * (1.0 - color2.a);
|
|
660
|
-
vec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);
|
|
661
|
-
return vec4(compositeColor, compositeAlpha);
|
|
662
|
-
}
|
|
663
|
-
void main()
|
|
664
|
-
{
|
|
665
|
-
#ifdef PATTERN
|
|
666
|
-
mediump vec2 normalizedTextureCoord = fract(v_tileTextureCoord);
|
|
667
|
-
mediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);
|
|
668
|
-
lowp vec4 color = texture2D(u_texture, samplePos);
|
|
669
|
-
gl_FragColor = v_color[3] * color;
|
|
670
|
-
#else
|
|
671
|
-
gl_FragColor = v_color;
|
|
672
|
-
#endif
|
|
673
|
-
}`, "fill.vert": `precision mediump float;
|
|
674
|
-
attribute vec2 a_pos;
|
|
675
|
-
#pragma header
|
|
676
|
-
uniform highp mat3 u_dvsMat3;
|
|
677
|
-
uniform highp mat3 u_displayMat3;
|
|
678
|
-
uniform mediump float u_depth;
|
|
679
|
-
uniform mediump vec2 u_fillTranslation;
|
|
680
|
-
#ifdef PATTERN
|
|
681
|
-
#include <util/util.glsl>
|
|
682
|
-
uniform mediump vec2 u_mosaicSize;
|
|
683
|
-
uniform mediump float u_patternFactor;
|
|
684
|
-
varying mediump vec2 v_tileTextureCoord;
|
|
685
|
-
varying mediump vec4 v_tlbr;
|
|
686
|
-
#endif
|
|
687
|
-
varying lowp vec4 v_color;
|
|
688
|
-
void main()
|
|
689
|
-
{
|
|
690
|
-
#pragma main
|
|
691
|
-
v_color = color * opacity;
|
|
692
|
-
#ifdef PATTERN
|
|
693
|
-
float patternWidth = nextPOT(tlbr.z - tlbr.x);
|
|
694
|
-
float patternHeight = nextPOT(tlbr.w - tlbr.y);
|
|
695
|
-
float scaleX = 1.0 / (patternWidth * u_patternFactor);
|
|
696
|
-
float scaleY = 1.0 / (patternHeight * u_patternFactor);
|
|
697
|
-
mat3 patterMat = mat3(scaleX, 0.0, 0.0,
|
|
698
|
-
0.0, -scaleY, 0.0,
|
|
699
|
-
0.0, 0.0, 1.0);
|
|
700
|
-
v_tileTextureCoord = (patterMat * vec3(a_pos, 1.0)).xy;
|
|
701
|
-
v_tlbr = tlbr / u_mosaicSize.xyxy;
|
|
702
|
-
#endif
|
|
703
|
-
vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);
|
|
704
|
-
gl_Position = vec4(pos.xy, u_depth, 1.0);
|
|
705
|
-
}` }, icon: { "icon.frag": `precision mediump float;
|
|
706
|
-
uniform lowp sampler2D u_texture;
|
|
707
|
-
#ifdef SDF
|
|
708
|
-
uniform lowp vec4 u_color;
|
|
709
|
-
uniform lowp vec4 u_outlineColor;
|
|
710
|
-
#endif
|
|
711
|
-
varying mediump vec2 v_tex;
|
|
712
|
-
varying lowp float v_opacity;
|
|
713
|
-
varying mediump vec2 v_size;
|
|
714
|
-
varying lowp vec4 v_color;
|
|
715
|
-
#ifdef SDF
|
|
716
|
-
varying mediump flaot v_halo_width;
|
|
717
|
-
#endif
|
|
718
|
-
#include <util/encoding.glsl>
|
|
719
|
-
vec4 mixColors(vec4 color1, vec4 color2) {
|
|
720
|
-
float compositeAlpha = color2.a + color1.a * (1.0 - color2.a);
|
|
721
|
-
vec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);
|
|
722
|
-
return vec4(compositeColor, compositeAlpha);
|
|
723
|
-
}
|
|
724
|
-
void main()
|
|
725
|
-
{
|
|
726
|
-
#ifdef SDF
|
|
727
|
-
lowp vec4 fillPixelColor = v_color;
|
|
728
|
-
float d = rgba2float(texture2D(u_texture, v_tex)) - 0.5;
|
|
729
|
-
const float softEdgeRatio = 0.248062016;
|
|
730
|
-
float size = max(v_size.x, v_size.y);
|
|
731
|
-
float dist = d * softEdgeRatio * size;
|
|
732
|
-
fillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);
|
|
733
|
-
if (v_halo_width > 0.25) {
|
|
734
|
-
lowp vec4 outlinePixelColor = u_outlineColor;
|
|
735
|
-
const float outlineLimitRatio = (16.0 / 86.0);
|
|
736
|
-
float clampedOutlineSize = softEdgeRatio * min(v_halo_width, outlineLimitRatio * max(v_size.x, v_size.y));
|
|
737
|
-
outlinePixelColor *= clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);
|
|
738
|
-
gl_FragColor = v_opacity * mixColors(fillPixelColor, outlinePixelColor);
|
|
739
|
-
}
|
|
740
|
-
else {
|
|
741
|
-
gl_FragColor = v_opacity * fillPixelColor;
|
|
742
|
-
}
|
|
743
|
-
#else
|
|
744
|
-
lowp vec4 texColor = texture2D(u_texture, v_tex);
|
|
745
|
-
gl_FragColor = v_opacity * texColor;
|
|
746
|
-
#endif
|
|
747
|
-
}`, "icon.vert": `attribute vec2 a_pos;
|
|
748
|
-
attribute vec2 a_vertexOffset;
|
|
749
|
-
attribute vec4 a_texAngleRange;
|
|
750
|
-
attribute vec4 a_levelInfo;
|
|
751
|
-
attribute float a_opacityInfo;
|
|
752
|
-
#pragma header
|
|
753
|
-
varying lowp vec4 v_color;
|
|
754
|
-
#ifdef SDF
|
|
755
|
-
varying mediump float v_halo_width;
|
|
756
|
-
#endif
|
|
757
|
-
uniform highp mat3 u_dvsMat3;
|
|
758
|
-
uniform highp mat3 u_displayMat3;
|
|
759
|
-
uniform highp mat3 u_displayViewMat3;
|
|
760
|
-
uniform mediump vec2 u_iconTranslation;
|
|
761
|
-
uniform vec2 u_mosaicSize;
|
|
762
|
-
uniform mediump float u_depth;
|
|
763
|
-
uniform mediump float u_mapRotation;
|
|
764
|
-
uniform mediump float u_level;
|
|
765
|
-
uniform lowp float u_keepUpright;
|
|
766
|
-
uniform mediump float u_fadeDuration;
|
|
767
|
-
varying mediump vec2 v_tex;
|
|
768
|
-
varying lowp float v_opacity;
|
|
769
|
-
varying mediump vec2 v_size;
|
|
770
|
-
const float C_OFFSET_PRECISION = 1.0 / 8.0;
|
|
771
|
-
const float C_256_TO_RAD = 3.14159265359 / 128.0;
|
|
772
|
-
const float C_DEG_TO_RAD = 3.14159265359 / 180.0;
|
|
773
|
-
const float tileCoordRatio = 1.0 / 8.0;
|
|
774
|
-
uniform highp float u_time;
|
|
775
|
-
void main()
|
|
776
|
-
{
|
|
777
|
-
#pragma main
|
|
778
|
-
v_color = color;
|
|
779
|
-
v_opacity = opacity;
|
|
780
|
-
#ifdef SDF
|
|
781
|
-
v_halo_width = halo_width;
|
|
782
|
-
#endif
|
|
783
|
-
float modded = mod(a_opacityInfo, 128.0);
|
|
784
|
-
float targetOpacity = (a_opacityInfo - modded) / 128.0;
|
|
785
|
-
float startOpacity = modded / 127.0;
|
|
786
|
-
float interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);
|
|
787
|
-
v_opacity *= interpolatedOpacity;
|
|
788
|
-
mediump float a_angle = a_levelInfo[1];
|
|
789
|
-
mediump float a_minLevel = a_levelInfo[2];
|
|
790
|
-
mediump float a_maxLevel = a_levelInfo[3];
|
|
791
|
-
mediump vec2 a_tex = a_texAngleRange.xy;
|
|
792
|
-
mediump float delta_z = 0.0;
|
|
793
|
-
mediump float rotated = mod(a_angle + u_mapRotation, 256.0);
|
|
794
|
-
delta_z += (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));
|
|
795
|
-
delta_z += 1.0 - step(a_minLevel, u_level);
|
|
796
|
-
delta_z += step(a_maxLevel, u_level);
|
|
797
|
-
delta_z += step(v_opacity, 0.0);
|
|
798
|
-
vec2 offset = C_OFFSET_PRECISION * a_vertexOffset;
|
|
799
|
-
v_size = abs(offset);
|
|
800
|
-
#ifdef SDF
|
|
801
|
-
offset = (120.0 / 86.0) * offset;
|
|
802
|
-
#endif
|
|
803
|
-
mediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);
|
|
804
|
-
gl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);
|
|
805
|
-
v_tex = a_tex.xy / u_mosaicSize;
|
|
806
|
-
}` }, line: { "line.frag": `precision lowp float;
|
|
807
|
-
varying mediump vec2 v_normal;
|
|
808
|
-
varying highp float v_accumulatedDistance;
|
|
809
|
-
varying mediump float v_lineHalfWidth;
|
|
810
|
-
varying lowp vec4 v_color;
|
|
811
|
-
varying mediump float v_blur;
|
|
812
|
-
#if defined (PATTERN) || defined(SDF)
|
|
813
|
-
varying mediump vec4 v_tlbr;
|
|
814
|
-
varying mediump vec2 v_patternSize;
|
|
815
|
-
varying mediump float v_widthRatio;
|
|
816
|
-
uniform sampler2D u_texture;
|
|
817
|
-
uniform mediump float u_antialiasing;
|
|
818
|
-
#endif
|
|
819
|
-
#ifdef SDF
|
|
820
|
-
#include <util/encoding.glsl>
|
|
821
|
-
#endif
|
|
822
|
-
void main()
|
|
823
|
-
{
|
|
824
|
-
mediump float fragDist = length(v_normal) * v_lineHalfWidth;
|
|
825
|
-
lowp float alpha = clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);
|
|
826
|
-
#ifdef PATTERN
|
|
827
|
-
mediump float relativeTexX = fract(v_accumulatedDistance / (v_patternSize.x * v_widthRatio));
|
|
828
|
-
mediump float relativeTexY = 0.5 + v_normal.y * v_lineHalfWidth / (v_patternSize.y * v_widthRatio);
|
|
829
|
-
mediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));
|
|
830
|
-
lowp vec4 color = texture2D(u_texture, texCoord);
|
|
831
|
-
gl_FragColor = alpha * v_color[3] * color;
|
|
832
|
-
#elif defined(SDF)
|
|
833
|
-
mediump float relativeTexX = fract((v_accumulatedDistance * 0.5) / (v_patternSize.x * v_widthRatio));
|
|
834
|
-
mediump float relativeTexY = 0.5 + 0.25 * v_normal.y;
|
|
835
|
-
mediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));
|
|
836
|
-
mediump float d = rgba2float(texture2D(u_texture, texCoord)) - 0.5;
|
|
837
|
-
float dist = d * (v_lineHalfWidth + u_antialiasing / 2.0);
|
|
838
|
-
gl_FragColor = alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;
|
|
839
|
-
#else
|
|
840
|
-
gl_FragColor = alpha * v_color;
|
|
841
|
-
#endif
|
|
842
|
-
}`, "line.vert": `precision mediump float;
|
|
843
|
-
attribute vec2 a_pos;
|
|
844
|
-
attribute vec4 a_extrude_offset;
|
|
845
|
-
attribute vec4 a_dir_normal;
|
|
846
|
-
attribute vec2 a_accumulatedDistance;
|
|
847
|
-
#pragma header
|
|
848
|
-
uniform highp mat3 u_dvsMat3;
|
|
849
|
-
uniform highp mat3 u_displayMat3;
|
|
850
|
-
uniform highp mat3 u_displayViewMat3;
|
|
851
|
-
uniform mediump float u_zoomFactor;
|
|
852
|
-
uniform mediump vec2 u_lineTranslation;
|
|
853
|
-
uniform mediump float u_antialiasing;
|
|
854
|
-
uniform mediump float u_depth;
|
|
855
|
-
varying mediump vec2 v_normal;
|
|
856
|
-
varying highp float v_accumulatedDistance;
|
|
857
|
-
const float scale = 1.0 / 31.0;
|
|
858
|
-
const mediump float tileCoordRatio = 8.0;
|
|
859
|
-
#if defined (SDF)
|
|
860
|
-
const mediump float sdfPatternHalfWidth = 15.5;
|
|
861
|
-
#endif
|
|
862
|
-
#if defined (PATTERN) || defined(SDF)
|
|
863
|
-
uniform mediump vec2 u_mosaicSize;
|
|
864
|
-
varying mediump vec4 v_tlbr;
|
|
865
|
-
varying mediump vec2 v_patternSize;
|
|
866
|
-
varying mediump float v_widthRatio;
|
|
867
|
-
#endif
|
|
868
|
-
varying lowp vec4 v_color;
|
|
869
|
-
varying mediump float v_lineHalfWidth;
|
|
870
|
-
varying mediump float v_blur;
|
|
871
|
-
void main()
|
|
872
|
-
{
|
|
873
|
-
#pragma main
|
|
874
|
-
v_color = color * opacity;
|
|
875
|
-
v_blur = blur + u_antialiasing;
|
|
876
|
-
v_normal = a_dir_normal.zw * scale;
|
|
877
|
-
#if defined (PATTERN) || defined(SDF)
|
|
878
|
-
v_tlbr = tlbr / u_mosaicSize.xyxy;
|
|
879
|
-
v_patternSize = vec2(tlbr.z - tlbr.x, tlbr.y - tlbr.w);
|
|
880
|
-
#if defined (PATTERN)
|
|
881
|
-
v_widthRatio = width / v_patternSize.y;
|
|
882
|
-
#else
|
|
883
|
-
v_widthRatio = width / sdfPatternHalfWidth / 2.0;
|
|
884
|
-
#endif
|
|
885
|
-
#endif
|
|
886
|
-
v_lineHalfWidth = (width + u_antialiasing) * 0.5;
|
|
887
|
-
mediump vec2 dir = a_dir_normal.xy * scale;
|
|
888
|
-
mediump vec2 offset_ = a_extrude_offset.zw * scale * offset;
|
|
889
|
-
mediump vec2 dist = v_lineHalfWidth * scale * a_extrude_offset.xy;
|
|
890
|
-
mediump vec3 pos = u_dvsMat3 * vec3(a_pos + offset_ * tileCoordRatio / u_zoomFactor, 1.0) + u_displayViewMat3 * vec3(dist, 0.0) + u_displayMat3 * vec3(u_lineTranslation, 0.0);
|
|
891
|
-
gl_Position = vec4(pos.xy, u_depth, 1.0);
|
|
892
|
-
#if defined (PATTERN) || defined(SDF)
|
|
893
|
-
v_accumulatedDistance = a_accumulatedDistance.x * u_zoomFactor / tileCoordRatio + dot(dir, dist + offset_);
|
|
894
|
-
#endif
|
|
895
|
-
}` }, outline: { "outline.frag": `varying lowp vec4 v_color;
|
|
896
|
-
varying mediump vec2 v_normal;
|
|
897
|
-
void main()
|
|
898
|
-
{
|
|
899
|
-
lowp float dist = abs(v_normal.y);
|
|
900
|
-
lowp float alpha = smoothstep(1.0, 0.0, dist);
|
|
901
|
-
gl_FragColor = alpha * v_color;
|
|
902
|
-
}`, "outline.vert": `attribute vec2 a_pos;
|
|
903
|
-
attribute vec2 a_offset;
|
|
904
|
-
attribute vec2 a_xnormal;
|
|
905
|
-
#pragma header
|
|
906
|
-
varying lowp vec4 v_color;
|
|
907
|
-
uniform highp mat3 u_dvsMat3;
|
|
908
|
-
uniform highp mat3 u_displayMat3;
|
|
909
|
-
uniform mediump vec2 u_fillTranslation;
|
|
910
|
-
uniform mediump float u_depth;
|
|
911
|
-
uniform mediump float u_outline_width;
|
|
912
|
-
varying lowp vec2 v_normal;
|
|
913
|
-
const float scale = 1.0 / 15.0;
|
|
914
|
-
void main()
|
|
915
|
-
{
|
|
916
|
-
#pragma main
|
|
917
|
-
v_color = color * opacity;
|
|
918
|
-
v_normal = a_xnormal;
|
|
919
|
-
mediump vec2 dist = u_outline_width * scale * a_offset;
|
|
920
|
-
mediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);
|
|
921
|
-
gl_Position = vec4(pos.xy, u_depth, 1.0);
|
|
922
|
-
}` }, text: { "text.frag": `uniform lowp sampler2D u_texture;
|
|
923
|
-
varying lowp vec2 v_tex;
|
|
924
|
-
varying lowp vec4 v_color;
|
|
925
|
-
varying mediump float v_edgeWidth;
|
|
926
|
-
varying mediump float v_edgeDistance;
|
|
927
|
-
void main()
|
|
928
|
-
{
|
|
929
|
-
lowp float dist = texture2D(u_texture, v_tex).a;
|
|
930
|
-
mediump float alpha = smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist);
|
|
931
|
-
gl_FragColor = alpha * v_color;
|
|
932
|
-
}`, "text.vert": `attribute vec2 a_pos;
|
|
933
|
-
attribute vec2 a_vertexOffset;
|
|
934
|
-
attribute vec4 a_texAngleRange;
|
|
935
|
-
attribute vec4 a_levelInfo;
|
|
936
|
-
attribute float a_opacityInfo;
|
|
937
|
-
#pragma header
|
|
938
|
-
varying lowp vec4 v_color;
|
|
939
|
-
uniform highp mat3 u_dvsMat3;
|
|
940
|
-
uniform highp mat3 u_displayMat3;
|
|
941
|
-
uniform highp mat3 u_displayViewMat3;
|
|
942
|
-
uniform mediump vec2 u_textTranslation;
|
|
943
|
-
uniform vec2 u_mosaicSize;
|
|
944
|
-
uniform mediump float u_depth;
|
|
945
|
-
uniform mediump float u_mapRotation;
|
|
946
|
-
uniform mediump float u_level;
|
|
947
|
-
uniform lowp float u_keepUpright;
|
|
948
|
-
uniform mediump float u_fadeDuration;
|
|
949
|
-
varying lowp vec2 v_tex;
|
|
950
|
-
const float offsetPrecision = 1.0 / 8.0;
|
|
951
|
-
const mediump float edgePos = 0.75;
|
|
952
|
-
uniform mediump float u_antialiasingWidth;
|
|
953
|
-
varying mediump float v_edgeDistance;
|
|
954
|
-
varying mediump float v_edgeWidth;
|
|
955
|
-
uniform lowp float u_halo;
|
|
956
|
-
const float sdfFontScale = 1.0 / 24.0;
|
|
957
|
-
const float sdfPixel = 3.0;
|
|
958
|
-
uniform highp float u_time;
|
|
959
|
-
void main()
|
|
960
|
-
{
|
|
961
|
-
#pragma main
|
|
962
|
-
if (u_halo > 0.5)
|
|
963
|
-
{
|
|
964
|
-
v_color = halo_color * opacity;
|
|
965
|
-
halo_width *= sdfPixel;
|
|
966
|
-
halo_blur *= sdfPixel;
|
|
967
|
-
}
|
|
968
|
-
else
|
|
969
|
-
{
|
|
970
|
-
v_color = color * opacity;
|
|
971
|
-
halo_width = 0.0;
|
|
972
|
-
halo_blur = 0.0;
|
|
973
|
-
}
|
|
974
|
-
float modded = mod(a_opacityInfo, 128.0);
|
|
975
|
-
float targetOpacity = (a_opacityInfo - modded) / 128.0;
|
|
976
|
-
float startOpacity = modded / 127.0;
|
|
977
|
-
float interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);
|
|
978
|
-
v_color *= interpolatedOpacity;
|
|
979
|
-
mediump float a_angle = a_levelInfo[1];
|
|
980
|
-
mediump float a_minLevel = a_levelInfo[2];
|
|
981
|
-
mediump float a_maxLevel = a_levelInfo[3];
|
|
982
|
-
mediump vec2 a_tex = a_texAngleRange.xy;
|
|
983
|
-
mediump float a_visMinAngle = a_texAngleRange.z;
|
|
984
|
-
mediump float a_visMaxAngle = a_texAngleRange.w;
|
|
985
|
-
mediump float delta_z = 0.0;
|
|
986
|
-
mediump float angle = mod(a_angle + u_mapRotation, 256.0);
|
|
987
|
-
if (a_visMinAngle < a_visMaxAngle)
|
|
988
|
-
{
|
|
989
|
-
delta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));
|
|
990
|
-
}
|
|
991
|
-
else
|
|
992
|
-
{
|
|
993
|
-
delta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));
|
|
994
|
-
}
|
|
995
|
-
delta_z += 1.0 - step(a_minLevel, u_level);
|
|
996
|
-
delta_z += step(a_maxLevel, u_level);
|
|
997
|
-
delta_z += step(v_color[3], 0.0);
|
|
998
|
-
v_tex = a_tex.xy / u_mosaicSize;
|
|
999
|
-
v_edgeDistance = edgePos - halo_width / size;
|
|
1000
|
-
v_edgeWidth = (u_antialiasingWidth + halo_blur) / size;
|
|
1001
|
-
mediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + sdfFontScale * u_displayViewMat3 * vec3(offsetPrecision * size * a_vertexOffset, 0.0) + u_displayMat3 * vec3(u_textTranslation, 0.0);
|
|
1002
|
-
gl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);
|
|
1003
|
-
}` }, util: { "encoding.glsl": `const vec4 rgba2float_factors = vec4(
|
|
1004
|
-
255.0 / (256.0),
|
|
1005
|
-
255.0 / (256.0 * 256.0),
|
|
1006
|
-
255.0 / (256.0 * 256.0 * 256.0),
|
|
1007
|
-
255.0 / (256.0 * 256.0 * 256.0 * 256.0)
|
|
1008
|
-
);
|
|
1009
|
-
float rgba2float(vec4 rgba) {
|
|
1010
|
-
return dot(rgba, rgba2float_factors);
|
|
1011
|
-
}`, "util.glsl": `float nextPOT(in float x) {
|
|
1012
|
-
return pow(2.0, ceil(log2(abs(x))));
|
|
1013
|
-
}` } };
|
|
1014
|
-
function wr(u) {
|
|
1015
|
-
let e = br;
|
|
1016
|
-
return u.split("/").forEach((t) => {
|
|
1017
|
-
e && (e = e[t]);
|
|
1018
|
-
}), e;
|
|
1019
|
-
}
|
|
1020
|
-
const xr = new qi(wr);
|
|
1021
|
-
function I(u) {
|
|
1022
|
-
return xr.resolveIncludes(u);
|
|
1023
|
-
}
|
|
1024
|
-
const ft = (u) => Se({ PATTERN: u.pattern }), Mr = { shaders: (u) => ({ vertexShader: ft(u) + I("background/background.vert"), fragmentShader: ft(u) + I("background/background.frag") }) }, Or = { shaders: (u) => ({ vertexShader: I("circle/circle.vert"), fragmentShader: I("circle/circle.frag") }) }, gt = (u) => Se({ PATTERN: u.pattern }), Sr = { shaders: (u) => ({ vertexShader: gt(u) + I("fill/fill.vert"), fragmentShader: gt(u) + I("fill/fill.frag") }) }, Pr = { shaders: (u) => ({ vertexShader: I("outline/outline.vert"), fragmentShader: I("outline/outline.frag") }) }, yt = (u) => Se({ SDF: u.sdf }), Tr = { shaders: (u) => ({ vertexShader: yt(u) + I("icon/icon.vert"), fragmentShader: yt(u) + I("icon/icon.frag") }) }, vt = (u) => Se({ PATTERN: u.pattern, SDF: u.sdf }), Cr = { shaders: (u) => ({ vertexShader: vt(u) + I("line/line.vert"), fragmentShader: vt(u) + I("line/line.frag") }) }, Er = { shaders: (u) => ({ vertexShader: I("text/text.vert"), fragmentShader: I("text/text.frag") }) };
|
|
1025
|
-
let Rr = class {
|
|
1026
|
-
constructor() {
|
|
1027
|
-
this._programByKey = /* @__PURE__ */ new Map();
|
|
1028
|
-
}
|
|
1029
|
-
dispose() {
|
|
1030
|
-
this._programByKey.forEach((e) => e.dispose()), this._programByKey.clear();
|
|
1031
|
-
}
|
|
1032
|
-
getMaterialProgram(e, t, i) {
|
|
1033
|
-
const r = t.key << 3 | this._getMaterialOptionsValue(t.type, i);
|
|
1034
|
-
if (this._programByKey.has(r))
|
|
1035
|
-
return this._programByKey.get(r);
|
|
1036
|
-
const a = this._getProgramTemplate(t.type), { shaders: s } = a, { vertexShader: n, fragmentShader: o } = s(i), l = t.getShaderHeader(), h = t.getShaderMain(), c = n.replace("#pragma header", l).replace("#pragma main", h), d = e.programCache.acquire(c, o, t.getAttributeLocations());
|
|
1037
|
-
return this._programByKey.set(r, d), d;
|
|
1038
|
-
}
|
|
1039
|
-
_getMaterialOptionsValue(e, t) {
|
|
1040
|
-
switch (e) {
|
|
1041
|
-
case A.BACKGROUND:
|
|
1042
|
-
return (t.pattern ? 1 : 0) << 1;
|
|
1043
|
-
case A.FILL:
|
|
1044
|
-
return (t.pattern ? 1 : 0) << 1;
|
|
1045
|
-
case A.OUTLINE:
|
|
1046
|
-
return 0;
|
|
1047
|
-
case A.LINE: {
|
|
1048
|
-
const i = t;
|
|
1049
|
-
return (i.sdf ? 1 : 0) << 2 | (i.pattern ? 1 : 0) << 1;
|
|
1050
|
-
}
|
|
1051
|
-
case A.ICON:
|
|
1052
|
-
return (t.sdf ? 1 : 0) << 1;
|
|
1053
|
-
case A.CIRCLE:
|
|
1054
|
-
case A.TEXT:
|
|
1055
|
-
default:
|
|
1056
|
-
return 0;
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
_getProgramTemplate(e) {
|
|
1060
|
-
switch (e) {
|
|
1061
|
-
case A.BACKGROUND:
|
|
1062
|
-
return Mr;
|
|
1063
|
-
case A.CIRCLE:
|
|
1064
|
-
return Or;
|
|
1065
|
-
case A.FILL:
|
|
1066
|
-
return Sr;
|
|
1067
|
-
case A.ICON:
|
|
1068
|
-
return Tr;
|
|
1069
|
-
case A.LINE:
|
|
1070
|
-
return Cr;
|
|
1071
|
-
case A.OUTLINE:
|
|
1072
|
-
return Pr;
|
|
1073
|
-
case A.TEXT:
|
|
1074
|
-
return Er;
|
|
1075
|
-
default:
|
|
1076
|
-
return null;
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
}, Bt = class {
|
|
1080
|
-
constructor() {
|
|
1081
|
-
this._initialized = !1;
|
|
1082
|
-
}
|
|
1083
|
-
dispose() {
|
|
1084
|
-
this._program = P(this._program), this._vertexArrayObject = P(this._vertexArrayObject);
|
|
1085
|
-
}
|
|
1086
|
-
render(e, t, i, r) {
|
|
1087
|
-
e && (this._initialized || this._initialize(e), e.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA), e.bindVAO(this._vertexArrayObject), e.useProgram(this._program), t.setSamplingMode(i), e.bindTexture(t, 0), this._program.setUniform1i("u_tex", 0), this._program.setUniform1f("u_opacity", r), e.drawArrays(ne.TRIANGLE_STRIP, 0, 4), e.bindTexture(null, 0), e.bindVAO());
|
|
1088
|
-
}
|
|
1089
|
-
_initialize(e) {
|
|
1090
|
-
if (this._initialized)
|
|
1091
|
-
return !0;
|
|
1092
|
-
const t = Me(e, ct);
|
|
1093
|
-
if (!t)
|
|
1094
|
-
return !1;
|
|
1095
|
-
const i = new Int8Array(16);
|
|
1096
|
-
i[0] = -1, i[1] = -1, i[2] = 0, i[3] = 0, i[4] = 1, i[5] = -1, i[6] = 1, i[7] = 0, i[8] = -1, i[9] = 1, i[10] = 0, i[11] = 1, i[12] = 1, i[13] = 1, i[14] = 1, i[15] = 1;
|
|
1097
|
-
const r = ct.attributes, a = new je(e, r, Gi, { geometry: Ge.createVertex(e, He.STATIC_DRAW, i) });
|
|
1098
|
-
return this._program = t, this._vertexArrayObject = a, this._initialized = !0, !0;
|
|
1099
|
-
}
|
|
1100
|
-
};
|
|
1101
|
-
class zr {
|
|
1102
|
-
constructor(e) {
|
|
1103
|
-
this._rctx = e, this._programByKey = /* @__PURE__ */ new Map();
|
|
1104
|
-
}
|
|
1105
|
-
dispose() {
|
|
1106
|
-
this._programByKey.forEach((e) => e.dispose()), this._programByKey.clear();
|
|
1107
|
-
}
|
|
1108
|
-
getProgram(e, t = []) {
|
|
1109
|
-
const i = e.vsPath + "." + e.fsPath + JSON.stringify(t);
|
|
1110
|
-
if (this._programByKey.has(i))
|
|
1111
|
-
return this._programByKey.get(i);
|
|
1112
|
-
const r = { ...t.map((h) => typeof h == "string" ? { name: h, value: !0 } : h).reduce((h, c) => ({ ...h, [c.name]: c.value }), {}) }, { vsPath: a, fsPath: s, attributes: n } = e, o = er(a, s, n, r), l = this._rctx.programCache.acquire(o.shaders.vertexShader, o.shaders.fragmentShader, o.attributes);
|
|
1113
|
-
if (!l)
|
|
1114
|
-
throw new Error("Unable to get program for key: ${key}");
|
|
1115
|
-
return this._programByKey.set(i, l), l;
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
let Fr = class {
|
|
1119
|
-
constructor() {
|
|
1120
|
-
this._resourceMap = /* @__PURE__ */ new Map(), this._inFlightResourceMap = /* @__PURE__ */ new Map(), this.geometryEngine = null, this.geometryEnginePromise = null;
|
|
1121
|
-
}
|
|
1122
|
-
destroy() {
|
|
1123
|
-
this._inFlightResourceMap.clear(), this._resourceMap.clear();
|
|
1124
|
-
}
|
|
1125
|
-
getResource(e) {
|
|
1126
|
-
return this._resourceMap.get(e) ?? null;
|
|
1127
|
-
}
|
|
1128
|
-
async fetchResource(e, t) {
|
|
1129
|
-
const i = this._resourceMap.get(e);
|
|
1130
|
-
if (i)
|
|
1131
|
-
return { width: i.width, height: i.height };
|
|
1132
|
-
let r = this._inFlightResourceMap.get(e);
|
|
1133
|
-
return r ? r.then((a) => ({ width: a.width, height: a.height })) : (r = ir(e, t), this._inFlightResourceMap.set(e, r), r.then((a) => (this._inFlightResourceMap.delete(e), this._resourceMap.set(e, a), { width: a.width, height: a.height }), () => ({ width: 0, height: 0 })));
|
|
1134
|
-
}
|
|
1135
|
-
deleteResource(e) {
|
|
1136
|
-
this._inFlightResourceMap.delete(e), this._resourceMap.delete(e);
|
|
1137
|
-
}
|
|
1138
|
-
loadFont(e) {
|
|
1139
|
-
return gi(e);
|
|
1140
|
-
}
|
|
1141
|
-
};
|
|
1142
|
-
const kr = 512;
|
|
1143
|
-
let Br = class {
|
|
1144
|
-
constructor(e) {
|
|
1145
|
-
this._resourceManager = e, this._cachedRasterizationCanvas = null;
|
|
1146
|
-
}
|
|
1147
|
-
dispose() {
|
|
1148
|
-
this._cachedRasterizationCanvas = null;
|
|
1149
|
-
}
|
|
1150
|
-
get _canvas() {
|
|
1151
|
-
return this._cachedRasterizationCanvas || (this._cachedRasterizationCanvas = document.createElement("canvas")), this._cachedRasterizationCanvas;
|
|
1152
|
-
}
|
|
1153
|
-
rasterizeJSONResource(e, t) {
|
|
1154
|
-
switch (e.type) {
|
|
1155
|
-
case "dash": {
|
|
1156
|
-
const i = e.dashTemplate, r = e.capStyle, [a, s, n] = ar(i, r);
|
|
1157
|
-
return { size: [s, n], image: new Uint32Array(a.buffer), sdf: !0, simplePattern: !0, anchorX: 0, anchorY: 0 };
|
|
1158
|
-
}
|
|
1159
|
-
case "fill-style": {
|
|
1160
|
-
const [i, r, a, s] = sr(this._canvas, e, t);
|
|
1161
|
-
return { size: [r, a], image: new Uint32Array(i.buffer), sdf: !1, simplePattern: !0, anchorX: 0, anchorY: 0, rasterizationScale: s };
|
|
1162
|
-
}
|
|
1163
|
-
case "sdf":
|
|
1164
|
-
return this._rasterizeSDFInfo(e);
|
|
1165
|
-
case "CIMHatchFill":
|
|
1166
|
-
case "CIMVectorMarker":
|
|
1167
|
-
case "CIMPictureMarker":
|
|
1168
|
-
return this._rasterizeCIMJSONResource(e, t);
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
_rasterizeCIMJSONResource(e, t) {
|
|
1172
|
-
var i;
|
|
1173
|
-
switch (e.type) {
|
|
1174
|
-
case "CIMHatchFill": {
|
|
1175
|
-
const r = ae.fromCIMHatchFill(e, t);
|
|
1176
|
-
return this._rasterizeCIMVectorMarker(r);
|
|
1177
|
-
}
|
|
1178
|
-
case "CIMPictureMarker": {
|
|
1179
|
-
const r = ae.fromCIMInsidePolygon(e);
|
|
1180
|
-
return this._rasterizeCIMVectorMarker(r);
|
|
1181
|
-
}
|
|
1182
|
-
case "CIMVectorMarker": {
|
|
1183
|
-
if (((i = e.markerPlacement) == null ? void 0 : i.type) === "CIMMarkerPlacementInsidePolygon") {
|
|
1184
|
-
const a = ae.fromCIMInsidePolygon(e);
|
|
1185
|
-
return this._rasterizeCIMVectorMarker(a);
|
|
1186
|
-
}
|
|
1187
|
-
const r = Ri(e);
|
|
1188
|
-
return r && !e.avoidSDFRasterization ? this._rasterizeSDFInfo(r) : this._rasterizeCIMVectorMarker(e, !1);
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
_rasterizeSDFInfo(e) {
|
|
1193
|
-
if (!e)
|
|
1194
|
-
return null;
|
|
1195
|
-
const [t, i, r] = zi(e);
|
|
1196
|
-
return t ? { size: [i, r], image: new Uint32Array(t.buffer), sdf: !0, simplePattern: !0, anchorX: 0, anchorY: 0 } : null;
|
|
1197
|
-
}
|
|
1198
|
-
_rasterizeCIMVectorMarker(e, t = !0) {
|
|
1199
|
-
const i = t ? yi.fromExtent(e.frame) : null, [r, a, s, n, o] = ae.rasterize(this._canvas, e, i, this._resourceManager);
|
|
1200
|
-
return r ? { size: [a, s], image: new Uint32Array(r.buffer), sdf: !1, simplePattern: !1, anchorX: n, anchorY: o } : null;
|
|
1201
|
-
}
|
|
1202
|
-
rasterizeImageResource(e, t, i, r) {
|
|
1203
|
-
this._canvas.width = e, this._canvas.height = t;
|
|
1204
|
-
const a = this._canvas.getContext("2d", { willReadFrequently: !0 });
|
|
1205
|
-
i instanceof ImageData ? a.putImageData(i, 0, 0) : (i.setAttribute("width", `${e}px`), i.setAttribute("height", `${t}px`), a.drawImage(i, 0, 0, e, t));
|
|
1206
|
-
const s = a.getImageData(0, 0, e, t), n = new Uint8Array(s.data);
|
|
1207
|
-
if (r) {
|
|
1208
|
-
for (const p of r)
|
|
1209
|
-
if (p && p.oldColor && p.oldColor.length === 4 && p.newColor && p.newColor.length === 4) {
|
|
1210
|
-
const [_, f, g, y] = p.oldColor, [m, M, w, x] = p.newColor;
|
|
1211
|
-
if (_ === m && f === M && g === w && y === x)
|
|
1212
|
-
continue;
|
|
1213
|
-
for (let b = 0; b < n.length; b += 4)
|
|
1214
|
-
_ === n[b] && f === n[b + 1] && g === n[b + 2] && y === n[b + 3] && (n[b] = m, n[b + 1] = M, n[b + 2] = w, n[b + 3] = x);
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
let o;
|
|
1218
|
-
for (let p = 0; p < n.length; p += 4)
|
|
1219
|
-
o = n[p + 3] / 255, n[p] = n[p] * o, n[p + 1] = n[p + 1] * o, n[p + 2] = n[p + 2] * o;
|
|
1220
|
-
let l = n, h = e, c = t;
|
|
1221
|
-
const d = kr;
|
|
1222
|
-
if (h >= d || c >= d) {
|
|
1223
|
-
const p = h / c;
|
|
1224
|
-
p > 1 ? (h = d, c = Math.round(d / p)) : (c = d, h = Math.round(d * p)), l = new Uint8Array(4 * h * c);
|
|
1225
|
-
const _ = new Uint8ClampedArray(l.buffer);
|
|
1226
|
-
Ei(n, e, t, _, h, c, !1);
|
|
1227
|
-
}
|
|
1228
|
-
return { size: [h, c], image: new Uint32Array(l.buffer), sdf: !1, simplePattern: !1, anchorX: 0, anchorY: 0 };
|
|
1229
|
-
}
|
|
1230
|
-
}, Oe = class {
|
|
1231
|
-
constructor(e, t) {
|
|
1232
|
-
this._width = 0, this._height = 0, this._free = [], this._width = e, this._height = t, this._free.push(new $(0, 0, e, t));
|
|
1233
|
-
}
|
|
1234
|
-
get width() {
|
|
1235
|
-
return this._width;
|
|
1236
|
-
}
|
|
1237
|
-
get height() {
|
|
1238
|
-
return this._height;
|
|
1239
|
-
}
|
|
1240
|
-
allocate(e, t) {
|
|
1241
|
-
if (e > this._width || t > this._height)
|
|
1242
|
-
return new $();
|
|
1243
|
-
let i = null, r = -1;
|
|
1244
|
-
for (let a = 0; a < this._free.length; ++a) {
|
|
1245
|
-
const s = this._free[a];
|
|
1246
|
-
e <= s.width && t <= s.height && (i === null || s.y <= i.y && s.x <= i.x) && (i = s, r = a);
|
|
1247
|
-
}
|
|
1248
|
-
return i === null ? new $() : (this._free.splice(r, 1), i.width < i.height ? (i.width > e && this._free.push(new $(i.x + e, i.y, i.width - e, t)), i.height > t && this._free.push(new $(i.x, i.y + t, i.width, i.height - t))) : (i.width > e && this._free.push(new $(i.x + e, i.y, i.width - e, i.height)), i.height > t && this._free.push(new $(i.x, i.y + t, e, i.height - t))), new $(i.x, i.y, e, t));
|
|
1249
|
-
}
|
|
1250
|
-
release(e) {
|
|
1251
|
-
for (let t = 0; t < this._free.length; ++t) {
|
|
1252
|
-
const i = this._free[t];
|
|
1253
|
-
if (i.y === e.y && i.height === e.height && i.x + i.width === e.x)
|
|
1254
|
-
i.width += e.width;
|
|
1255
|
-
else if (i.x === e.x && i.width === e.width && i.y + i.height === e.y)
|
|
1256
|
-
i.height += e.height;
|
|
1257
|
-
else if (e.y === i.y && e.height === i.height && e.x + e.width === i.x)
|
|
1258
|
-
i.x = e.x, i.width += e.width;
|
|
1259
|
-
else {
|
|
1260
|
-
if (e.x !== i.x || e.width !== i.width || e.y + e.height !== i.y)
|
|
1261
|
-
continue;
|
|
1262
|
-
i.y = e.y, i.height += e.height;
|
|
1263
|
-
}
|
|
1264
|
-
this._free.splice(t, 1), this.release(e);
|
|
1265
|
-
}
|
|
1266
|
-
this._free.push(e);
|
|
1267
|
-
}
|
|
1268
|
-
};
|
|
1269
|
-
const Ar = 256, Ir = (u) => Math.floor(u / 256);
|
|
1270
|
-
function $r(u) {
|
|
1271
|
-
const e = /* @__PURE__ */ new Set();
|
|
1272
|
-
for (const t of u)
|
|
1273
|
-
e.add(Ir(t));
|
|
1274
|
-
return e;
|
|
1275
|
-
}
|
|
1276
|
-
function Dr(u, e, t) {
|
|
1277
|
-
return u.has(e) || u.set(e, t().then(() => {
|
|
1278
|
-
u.delete(e);
|
|
1279
|
-
}).catch((i) => {
|
|
1280
|
-
u.delete(e), qt(i);
|
|
1281
|
-
})), u.get(e);
|
|
1282
|
-
}
|
|
1283
|
-
const Lr = (u) => ({ rect: new $(0, 0, 0, 0), page: 0, metrics: { left: 0, width: 0, height: 0, advance: 0, top: 0 }, code: u, sdf: !0 });
|
|
1284
|
-
let Nr = class {
|
|
1285
|
-
constructor(e, t, i) {
|
|
1286
|
-
this.width = 0, this.height = 0, this._dirties = [], this._glyphData = [], this._currentPage = 0, this._glyphCache = {}, this._textures = [], this._rangePromises = /* @__PURE__ */ new Map(), this._preloadCache = {}, this.width = e, this.height = t, this._glyphSource = i, this._binPack = new Oe(e - 4, t - 4), this._glyphData.push(new Uint8Array(e * t)), this._dirties.push(!0), this._textures.push(null), this._initDecorationGlyphs();
|
|
1287
|
-
}
|
|
1288
|
-
dispose() {
|
|
1289
|
-
this._binPack = null;
|
|
1290
|
-
for (const e of this._textures)
|
|
1291
|
-
e && e.dispose();
|
|
1292
|
-
this._textures.length = 0, this._glyphData.length = 0;
|
|
1293
|
-
}
|
|
1294
|
-
_initDecorationGlyphs() {
|
|
1295
|
-
const e = [117, 149, 181, 207, 207, 181, 149, 117], t = [], i = [];
|
|
1296
|
-
for (let s = 0; s < e.length; s++) {
|
|
1297
|
-
const n = e[s];
|
|
1298
|
-
for (let o = 0; o < 11; o++) {
|
|
1299
|
-
const l = s >= 3 && s < 5 && o >= 3 && o < 8 ? 255 : 0;
|
|
1300
|
-
t.push(n), i.push(l);
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
const r = { metrics: { width: 5, height: 2, left: 0, top: 0, advance: 0 }, bitmap: new Uint8Array(t) }, a = { metrics: { width: 5, height: 2, left: 0, top: 0, advance: 0 }, bitmap: new Uint8Array(i) };
|
|
1304
|
-
this._recordGlyph(r), this._recordGlyph(a);
|
|
1305
|
-
}
|
|
1306
|
-
getTexture(e, t) {
|
|
1307
|
-
if (!this._textures[t]) {
|
|
1308
|
-
const i = new R();
|
|
1309
|
-
i.pixelFormat = C.ALPHA, i.wrapMode = E.CLAMP_TO_EDGE, i.width = this.width, i.height = this.height, this._textures[t] = new X(e, i, new Uint8Array(this.width * this.height));
|
|
1310
|
-
}
|
|
1311
|
-
return this._dirties[t] && (this._textures[t].setData(this._glyphData[t]), this._dirties[t] = !1), this._textures[t];
|
|
1312
|
-
}
|
|
1313
|
-
async getGlyphItems(e, t, i) {
|
|
1314
|
-
const r = this._getGlyphCache(e);
|
|
1315
|
-
return await this._fetchRanges(e, t, i), t.map((a) => this._getMosaicItem(r, e, a));
|
|
1316
|
-
}
|
|
1317
|
-
bind(e, t, i, r) {
|
|
1318
|
-
const a = this.getTexture(e, i);
|
|
1319
|
-
a.setSamplingMode(t), e.bindTexture(a, r);
|
|
1320
|
-
}
|
|
1321
|
-
preloadASCIIGlyphCache(e) {
|
|
1322
|
-
const t = this._preloadCache[e];
|
|
1323
|
-
if (t != null)
|
|
1324
|
-
return t;
|
|
1325
|
-
const i = this._glyphSource.preloadASCIIRange(e).then(() => {
|
|
1326
|
-
const r = this._getGlyphCache(e);
|
|
1327
|
-
for (let a = 0; a < 256; a++)
|
|
1328
|
-
this._getMosaicItem(r, e, a);
|
|
1329
|
-
});
|
|
1330
|
-
return this._preloadCache[e] = i, i;
|
|
1331
|
-
}
|
|
1332
|
-
_getGlyphCache(e) {
|
|
1333
|
-
return this._glyphCache[e] || (this._glyphCache[e] = {}), this._glyphCache[e];
|
|
1334
|
-
}
|
|
1335
|
-
_invalidate() {
|
|
1336
|
-
this._dirties[this._currentPage] = !0;
|
|
1337
|
-
}
|
|
1338
|
-
async _fetchRanges(e, t, i) {
|
|
1339
|
-
const r = $r(t), a = [];
|
|
1340
|
-
r.forEach((s) => {
|
|
1341
|
-
a.push(this._fetchRange(e, s, i));
|
|
1342
|
-
}), await Promise.all(a);
|
|
1343
|
-
}
|
|
1344
|
-
async _fetchRange(e, t, i) {
|
|
1345
|
-
if (t > Ar)
|
|
1346
|
-
return;
|
|
1347
|
-
const r = e + t;
|
|
1348
|
-
return Dr(this._rangePromises, r, () => this._glyphSource.getRange(e, t, i));
|
|
1349
|
-
}
|
|
1350
|
-
_getMosaicItem(e, t, i) {
|
|
1351
|
-
if (!e[i]) {
|
|
1352
|
-
const r = this._glyphSource.getGlyph(t, i);
|
|
1353
|
-
if (!(r != null && r.metrics))
|
|
1354
|
-
return Lr(i);
|
|
1355
|
-
const a = this._recordGlyph(r), s = this._currentPage, n = r.metrics;
|
|
1356
|
-
e[i] = { rect: a, page: s, metrics: n, code: i, sdf: !0 }, this._invalidate();
|
|
1357
|
-
}
|
|
1358
|
-
return e[i];
|
|
1359
|
-
}
|
|
1360
|
-
_recordGlyph(e) {
|
|
1361
|
-
const t = e.metrics;
|
|
1362
|
-
let i;
|
|
1363
|
-
if (t.width === 0)
|
|
1364
|
-
i = new $(0, 0, 0, 0);
|
|
1365
|
-
else {
|
|
1366
|
-
const a = t.width + 6, s = t.height + 2 * 3;
|
|
1367
|
-
i = this._binPack.allocate(a, s), i.isEmpty && (this._dirties[this._currentPage] || (this._glyphData[this._currentPage] = null), this._currentPage = this._glyphData.length, this._glyphData.push(new Uint8Array(this.width * this.height)), this._dirties.push(!0), this._textures.push(null), this._initDecorationGlyphs(), this._binPack = new Oe(this.width - 4, this.height - 4), i = this._binPack.allocate(a, s));
|
|
1368
|
-
const n = this._glyphData[this._currentPage], o = e.bitmap;
|
|
1369
|
-
let l, h;
|
|
1370
|
-
if (o)
|
|
1371
|
-
for (let c = 0; c < s; c++) {
|
|
1372
|
-
l = a * c, h = this.width * (i.y + c) + i.x;
|
|
1373
|
-
for (let d = 0; d < a; d++)
|
|
1374
|
-
n[h + d] = o[l + d];
|
|
1375
|
-
}
|
|
1376
|
-
H("esri-glyph-debug") && this._showDebugPage(n);
|
|
1377
|
-
}
|
|
1378
|
-
return i;
|
|
1379
|
-
}
|
|
1380
|
-
_showDebugPage(e) {
|
|
1381
|
-
const t = document.createElement("canvas"), i = t.getContext("2d"), r = new ImageData(this.width, this.height), a = r.data;
|
|
1382
|
-
t.width = this.width, t.height = this.height, t.style.border = "1px solid black";
|
|
1383
|
-
for (let s = 0; s < e.length; ++s)
|
|
1384
|
-
a[4 * s] = e[s], a[4 * s + 1] = 0, a[4 * s + 2] = 0, a[4 * s + 3] = 255;
|
|
1385
|
-
i.putImageData(r, 0, 0), document.body.appendChild(t);
|
|
1386
|
-
}
|
|
1387
|
-
}, bt = class {
|
|
1388
|
-
constructor(e) {
|
|
1389
|
-
for (this._metrics = [], this._bitmaps = []; e.next(); )
|
|
1390
|
-
switch (e.tag()) {
|
|
1391
|
-
case 1: {
|
|
1392
|
-
const t = e.getMessage();
|
|
1393
|
-
for (; t.next(); )
|
|
1394
|
-
switch (t.tag()) {
|
|
1395
|
-
case 3: {
|
|
1396
|
-
const i = t.getMessage();
|
|
1397
|
-
let r, a, s, n, o, l, h;
|
|
1398
|
-
for (; i.next(); )
|
|
1399
|
-
switch (i.tag()) {
|
|
1400
|
-
case 1:
|
|
1401
|
-
r = i.getUInt32();
|
|
1402
|
-
break;
|
|
1403
|
-
case 2:
|
|
1404
|
-
a = i.getBytes();
|
|
1405
|
-
break;
|
|
1406
|
-
case 3:
|
|
1407
|
-
s = i.getUInt32();
|
|
1408
|
-
break;
|
|
1409
|
-
case 4:
|
|
1410
|
-
n = i.getUInt32();
|
|
1411
|
-
break;
|
|
1412
|
-
case 5:
|
|
1413
|
-
o = i.getSInt32();
|
|
1414
|
-
break;
|
|
1415
|
-
case 6:
|
|
1416
|
-
l = i.getSInt32();
|
|
1417
|
-
break;
|
|
1418
|
-
case 7:
|
|
1419
|
-
h = i.getUInt32();
|
|
1420
|
-
break;
|
|
1421
|
-
default:
|
|
1422
|
-
i.skip();
|
|
1423
|
-
}
|
|
1424
|
-
i.release(), r && (this._metrics[r] = { width: s, height: n, left: o, top: l, advance: h }, this._bitmaps[r] = a);
|
|
1425
|
-
break;
|
|
1426
|
-
}
|
|
1427
|
-
default:
|
|
1428
|
-
t.skip();
|
|
1429
|
-
}
|
|
1430
|
-
t.release();
|
|
1431
|
-
break;
|
|
1432
|
-
}
|
|
1433
|
-
default:
|
|
1434
|
-
e.skip();
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
getMetrics(e) {
|
|
1438
|
-
return this._metrics[e];
|
|
1439
|
-
}
|
|
1440
|
-
getBitmap(e) {
|
|
1441
|
-
return this._bitmaps[e];
|
|
1442
|
-
}
|
|
1443
|
-
}, Ur = class {
|
|
1444
|
-
constructor() {
|
|
1445
|
-
this._ranges = [];
|
|
1446
|
-
}
|
|
1447
|
-
getRange(e) {
|
|
1448
|
-
return this._ranges[e];
|
|
1449
|
-
}
|
|
1450
|
-
addRange(e, t) {
|
|
1451
|
-
this._ranges[e] = t;
|
|
1452
|
-
}
|
|
1453
|
-
}, Vr = class {
|
|
1454
|
-
constructor(e) {
|
|
1455
|
-
this._glyphInfo = {}, this._baseURL = e;
|
|
1456
|
-
}
|
|
1457
|
-
getRange(e, t, i) {
|
|
1458
|
-
const r = this._getFontStack(e);
|
|
1459
|
-
if (r.getRange(t))
|
|
1460
|
-
return Promise.resolve();
|
|
1461
|
-
const a = 256 * t, s = a + 255, n = this._baseURL.replace("{fontstack}", e).replace("{range}", a + "-" + s);
|
|
1462
|
-
return de(n, { responseType: "array-buffer", ...i }).then((o) => {
|
|
1463
|
-
r.addRange(t, new bt(new dt(new Uint8Array(o.data), new DataView(o.data))));
|
|
1464
|
-
});
|
|
1465
|
-
}
|
|
1466
|
-
async preloadASCIIRange(e) {
|
|
1467
|
-
const t = this._getFontStack(e), i = 0, r = 255, a = this._baseURL.replace("{fontstack}", e).replace("{range}", i + "-" + r), s = await de(a, { responseType: "array-buffer" }), n = new bt(new dt(new Uint8Array(s.data), new DataView(s.data)));
|
|
1468
|
-
for (let o = i; o <= r; o++)
|
|
1469
|
-
t.getRange(o) || t.addRange(o, n);
|
|
1470
|
-
}
|
|
1471
|
-
getGlyph(e, t) {
|
|
1472
|
-
const i = this._getFontStack(e);
|
|
1473
|
-
if (!i)
|
|
1474
|
-
return;
|
|
1475
|
-
const r = Math.floor(t / 256), a = i.getRange(r);
|
|
1476
|
-
return a ? { metrics: a.getMetrics(t), bitmap: a.getBitmap(t) } : void 0;
|
|
1477
|
-
}
|
|
1478
|
-
_getFontStack(e) {
|
|
1479
|
-
let t = this._glyphInfo[e];
|
|
1480
|
-
return t || (t = this._glyphInfo[e] = new Ur()), t;
|
|
1481
|
-
}
|
|
1482
|
-
};
|
|
1483
|
-
const ue = 1e20;
|
|
1484
|
-
let Gr = class {
|
|
1485
|
-
constructor(e) {
|
|
1486
|
-
this._svg = null, this.size = e;
|
|
1487
|
-
const t = document.createElement("canvas");
|
|
1488
|
-
t.width = t.height = e, this._context = t.getContext("2d", { willReadFrequently: !1 }), this._gridOuter = new Float64Array(e * e), this._gridInner = new Float64Array(e * e), this._f = new Float64Array(e), this._d = new Float64Array(e), this._z = new Float64Array(e + 1), this._v = new Int16Array(e);
|
|
1489
|
-
}
|
|
1490
|
-
dispose() {
|
|
1491
|
-
this._context = this._gridOuter = this._gridInner = this._f = this._d = this._z = this._v = null, this._svg && (document.body.removeChild(this._svg), this._svg = null);
|
|
1492
|
-
}
|
|
1493
|
-
draw(e, t, i, r = 31) {
|
|
1494
|
-
this._initSVG();
|
|
1495
|
-
const a = this.createSVGString(e, t);
|
|
1496
|
-
return new Promise((s, n) => {
|
|
1497
|
-
const o = new Image();
|
|
1498
|
-
o.src = "data:image/svg+xml; charset=utf8, " + encodeURIComponent(a), o.onload = () => {
|
|
1499
|
-
o.onload = null, this._context.clearRect(0, 0, this.size, this.size), this._context.drawImage(o, 0, 0, this.size, this.size);
|
|
1500
|
-
const h = this._context.getImageData(0, 0, this.size, this.size), c = new Uint8Array(this.size * this.size * 4);
|
|
1501
|
-
for (let d = 0; d < this.size * this.size; d++) {
|
|
1502
|
-
const p = h.data[4 * d + 3] / 255;
|
|
1503
|
-
this._gridOuter[d] = p === 1 ? 0 : p === 0 ? ue : Math.max(0, 0.5 - p) ** 2, this._gridInner[d] = p === 1 ? ue : p === 0 ? 0 : Math.max(0, p - 0.5) ** 2;
|
|
1504
|
-
}
|
|
1505
|
-
this._edt(this._gridOuter, this.size, this.size), this._edt(this._gridInner, this.size, this.size);
|
|
1506
|
-
for (let d = 0; d < this.size * this.size; d++) {
|
|
1507
|
-
const p = this._gridOuter[d] - this._gridInner[d];
|
|
1508
|
-
nr(0.5 - p / (2 * r), c, 4 * d);
|
|
1509
|
-
}
|
|
1510
|
-
s(c);
|
|
1511
|
-
};
|
|
1512
|
-
const l = i == null ? void 0 : i.signal;
|
|
1513
|
-
l && jt(l, () => n(Xt()));
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
_initSVG() {
|
|
1517
|
-
if (!this._svg) {
|
|
1518
|
-
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1519
|
-
e.setAttribute("style", "position: absolute;"), e.setAttribute("width", "0"), e.setAttribute("height", "0"), e.setAttribute("aria-hidden", "true"), e.setAttribute("role", "presentation"), document.body.appendChild(e), this._svg = e;
|
|
1520
|
-
}
|
|
1521
|
-
return this._svg;
|
|
1522
|
-
}
|
|
1523
|
-
createSVGString(e, t) {
|
|
1524
|
-
const i = this._initSVG(), r = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1525
|
-
r.setAttribute("d", e), i.appendChild(r);
|
|
1526
|
-
const a = r.getBBox(), s = a.width / a.height, n = this.size / 2;
|
|
1527
|
-
let o, l, h;
|
|
1528
|
-
if (s > 1) {
|
|
1529
|
-
o = n / a.width;
|
|
1530
|
-
const _ = n * (1 / s);
|
|
1531
|
-
l = this.size / 4, h = n - _ / 2;
|
|
1532
|
-
} else
|
|
1533
|
-
o = n / a.height, l = n - n * s / 2, h = this.size / 4;
|
|
1534
|
-
const c = -a.x * o + l, d = -a.y * o + h;
|
|
1535
|
-
r.setAttribute("style", `transform: matrix(${o}, 0, 0, ${o}, ${c}, ${d})`), r.setAttribute("stroke-width", "" + 0.5 / o);
|
|
1536
|
-
const p = `<svg style="fill:${t ? "red" : "none"}; stroke:${t ? "none" : "red"}" height="${this.size}" width="${this.size}" xmlns="http://www.w3.org/2000/svg">${i.innerHTML}</svg>`;
|
|
1537
|
-
return i.removeChild(r), p;
|
|
1538
|
-
}
|
|
1539
|
-
_edt(e, t, i) {
|
|
1540
|
-
const r = this._f, a = this._d, s = this._v, n = this._z;
|
|
1541
|
-
for (let o = 0; o < t; o++) {
|
|
1542
|
-
for (let l = 0; l < i; l++)
|
|
1543
|
-
r[l] = e[l * t + o];
|
|
1544
|
-
this._edt1d(r, a, s, n, i);
|
|
1545
|
-
for (let l = 0; l < i; l++)
|
|
1546
|
-
e[l * t + o] = a[l];
|
|
1547
|
-
}
|
|
1548
|
-
for (let o = 0; o < i; o++) {
|
|
1549
|
-
for (let l = 0; l < t; l++)
|
|
1550
|
-
r[l] = e[o * t + l];
|
|
1551
|
-
this._edt1d(r, a, s, n, t);
|
|
1552
|
-
for (let l = 0; l < t; l++)
|
|
1553
|
-
e[o * t + l] = Math.sqrt(a[l]);
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
_edt1d(e, t, i, r, a) {
|
|
1557
|
-
i[0] = 0, r[0] = -ue, r[1] = +ue;
|
|
1558
|
-
for (let s = 1, n = 0; s < a; s++) {
|
|
1559
|
-
let o = (e[s] + s * s - (e[i[n]] + i[n] * i[n])) / (2 * s - 2 * i[n]);
|
|
1560
|
-
for (; o <= r[n]; )
|
|
1561
|
-
n--, o = (e[s] + s * s - (e[i[n]] + i[n] * i[n])) / (2 * s - 2 * i[n]);
|
|
1562
|
-
n++, i[n] = s, r[n] = o, r[n + 1] = +ue;
|
|
1563
|
-
}
|
|
1564
|
-
for (let s = 0, n = 0; s < a; s++) {
|
|
1565
|
-
for (; r[n + 1] < s; )
|
|
1566
|
-
n++;
|
|
1567
|
-
t[s] = (s - i[n]) * (s - i[n]) + e[i[n]];
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
};
|
|
1571
|
-
function J(u) {
|
|
1572
|
-
return u && u.type === "static";
|
|
1573
|
-
}
|
|
1574
|
-
let Hr = class At {
|
|
1575
|
-
constructor(e, t, i = 0) {
|
|
1576
|
-
this._mosaicPages = [], this._maxItemSize = 0, this._currentPage = 0, this._pageWidth = 0, this._pageHeight = 0, this._mosaicRects = /* @__PURE__ */ new Map(), this._spriteCopyQueue = [], this.pixelRatio = 1, (e <= 0 || t <= 0) && console.error("Sprites mosaic defaultWidth and defaultHeight must be greater than zero!"), this._pageWidth = e, this._pageHeight = t, i > 0 && (this._maxItemSize = i), this.pixelRatio = window.devicePixelRatio || 1, this._binPack = new Oe(this._pageWidth, this._pageHeight);
|
|
1577
|
-
const r = Math.floor(this._pageWidth), a = Math.floor(this._pageHeight);
|
|
1578
|
-
this._mosaicPages.push({ mosaicsData: { type: "static", data: new Uint32Array(r * a) }, size: [this._pageWidth, this._pageHeight], dirty: !0, texture: void 0 });
|
|
1579
|
-
}
|
|
1580
|
-
getWidth(e) {
|
|
1581
|
-
return e >= this._mosaicPages.length ? -1 : this._mosaicPages[e].size[0];
|
|
1582
|
-
}
|
|
1583
|
-
getHeight(e) {
|
|
1584
|
-
return e >= this._mosaicPages.length ? -1 : this._mosaicPages[e].size[1];
|
|
1585
|
-
}
|
|
1586
|
-
getPageTexture(e) {
|
|
1587
|
-
return e < this._mosaicPages.length ? this._mosaicPages[e].texture : null;
|
|
1588
|
-
}
|
|
1589
|
-
has(e) {
|
|
1590
|
-
return this._mosaicRects.has(e);
|
|
1591
|
-
}
|
|
1592
|
-
get itemCount() {
|
|
1593
|
-
return this._mosaicRects.size;
|
|
1594
|
-
}
|
|
1595
|
-
getSpriteItem(e) {
|
|
1596
|
-
return this._mosaicRects.get(e);
|
|
1597
|
-
}
|
|
1598
|
-
addSpriteItem(e, t, i, r, a, s, n = 1) {
|
|
1599
|
-
if (this._mosaicRects.has(e))
|
|
1600
|
-
return this._mosaicRects.get(e);
|
|
1601
|
-
let o, l, h;
|
|
1602
|
-
if (J(i))
|
|
1603
|
-
[o, l, h] = this._allocateImage(t[0], t[1]);
|
|
1604
|
-
else {
|
|
1605
|
-
o = new $(0, 0, t[0], t[1]), l = this._mosaicPages.length;
|
|
1606
|
-
const d = void 0;
|
|
1607
|
-
this._mosaicPages.push({ mosaicsData: i, size: [t[0] + 2 * j, t[1] + 2 * j], dirty: !0, texture: d });
|
|
1608
|
-
}
|
|
1609
|
-
if (o.width <= 0 || o.height <= 0)
|
|
1610
|
-
return null;
|
|
1611
|
-
const c = { type: "sprite", rect: o, width: t[0], height: t[1], sdf: a, simplePattern: s, rasterizationScale: n, page: l };
|
|
1612
|
-
return this._mosaicRects.set(e, c), J(i) && (H("esri-mosaic-debug") && this._showDebugSprite(t, i.data), this._copy({ rect: o, spriteSize: t, spriteData: i.data, page: l, pageSize: h, repeat: r, sdf: a })), c;
|
|
1613
|
-
}
|
|
1614
|
-
hasItemsToProcess() {
|
|
1615
|
-
return this._spriteCopyQueue.length !== 0;
|
|
1616
|
-
}
|
|
1617
|
-
processNextItem() {
|
|
1618
|
-
const e = this._spriteCopyQueue.pop();
|
|
1619
|
-
e && this._copy(e);
|
|
1620
|
-
}
|
|
1621
|
-
getMosaicItemPosition(e) {
|
|
1622
|
-
const t = this.getSpriteItem(e), i = t == null ? void 0 : t.rect;
|
|
1623
|
-
if (!i)
|
|
1624
|
-
return null;
|
|
1625
|
-
i.width = t.width, i.height = t.height;
|
|
1626
|
-
const r = t.width, a = t.height, s = j, n = this._mosaicPages[t.page].size;
|
|
1627
|
-
return { size: [t.width, t.height], tl: [(i.x + s) / n[0], (i.y + s) / n[1]], br: [(i.x + s + r) / n[0], (i.y + s + a) / n[1]], page: t.page };
|
|
1628
|
-
}
|
|
1629
|
-
bind(e, t, i = 0, r = 0) {
|
|
1630
|
-
const a = this._mosaicPages[i], s = a.mosaicsData;
|
|
1631
|
-
let n = a.texture;
|
|
1632
|
-
n || (n = wt(e, a.size), a.texture = n), n.setSamplingMode(t), J(s) ? (e.bindTexture(n, r), a.dirty && (n.setData(new Uint8Array(s.data.buffer)), n.generateMipmap(), H("esri-mosaic-debug") && this._showDebugPage(i))) : (s.data.loadFrame(n), e.bindTexture(n, r), n.generateMipmap()), a.dirty = !1;
|
|
1633
|
-
}
|
|
1634
|
-
getTexture(e, t = 0) {
|
|
1635
|
-
const i = this._mosaicPages[t], r = i.mosaicsData;
|
|
1636
|
-
let a = i.texture;
|
|
1637
|
-
return a || (a = wt(e, i.size), i.texture = a), J(r) ? i.dirty && (a.setData(new Uint8Array(r.data.buffer)), a.generateMipmap(), H("esri-mosaic-debug") && this._showDebugPage(t)) : (r.data.loadFrame(a), a.generateMipmap()), i.dirty = !1, a;
|
|
1638
|
-
}
|
|
1639
|
-
dispose() {
|
|
1640
|
-
this._binPack = null;
|
|
1641
|
-
for (const e of this._mosaicPages) {
|
|
1642
|
-
const t = e.texture;
|
|
1643
|
-
t && t.dispose();
|
|
1644
|
-
const i = e.mosaicsData;
|
|
1645
|
-
J(i) || i.data.destroy();
|
|
1646
|
-
}
|
|
1647
|
-
this._mosaicPages = null, this._mosaicRects.clear();
|
|
1648
|
-
}
|
|
1649
|
-
static _copyBits(e, t, i, r, a, s, n, o, l, h, c) {
|
|
1650
|
-
let d = r * t + i, p = o * s + n;
|
|
1651
|
-
if (c) {
|
|
1652
|
-
p -= s;
|
|
1653
|
-
for (let _ = -1; _ <= h; _++, d = ((_ + h) % h + r) * t + i, p += s)
|
|
1654
|
-
for (let f = -1; f <= l; f++)
|
|
1655
|
-
a[p + f] = e[d + (f + l) % l];
|
|
1656
|
-
} else
|
|
1657
|
-
for (let _ = 0; _ < h; _++) {
|
|
1658
|
-
for (let f = 0; f < l; f++)
|
|
1659
|
-
a[p + f] = e[d + f];
|
|
1660
|
-
d += t, p += s;
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
_copy(e) {
|
|
1664
|
-
if (e.page >= this._mosaicPages.length)
|
|
1665
|
-
return;
|
|
1666
|
-
const t = this._mosaicPages[e.page], i = t.mosaicsData;
|
|
1667
|
-
if (!J(t.mosaicsData))
|
|
1668
|
-
throw new re("mapview-invalid-resource", "unsuitable data type!");
|
|
1669
|
-
const r = e.spriteData, a = i.data;
|
|
1670
|
-
a && r || console.error("Source or target images are uninitialized!"), At._copyBits(r, e.spriteSize[0], 0, 0, a, e.pageSize[0], e.rect.x + j, e.rect.y + j, e.spriteSize[0], e.spriteSize[1], e.repeat), t.dirty = !0;
|
|
1671
|
-
}
|
|
1672
|
-
_allocateImage(e, t) {
|
|
1673
|
-
e += 2 * j, t += 2 * j;
|
|
1674
|
-
const i = Math.max(e, t);
|
|
1675
|
-
if (this._maxItemSize && this._maxItemSize < i) {
|
|
1676
|
-
const a = 2 ** Math.ceil(ot(e)), s = 2 ** Math.ceil(ot(t)), n = new $(0, 0, e, t);
|
|
1677
|
-
return this._mosaicPages.push({ mosaicsData: { type: "static", data: new Uint32Array(a * s) }, size: [a, s], dirty: !0, texture: void 0 }), [n, this._mosaicPages.length - 1, [a, s]];
|
|
1678
|
-
}
|
|
1679
|
-
const r = this._binPack.allocate(e, t);
|
|
1680
|
-
if (r.width <= 0) {
|
|
1681
|
-
const a = this._mosaicPages[this._currentPage];
|
|
1682
|
-
return !a.dirty && J(a.mosaicsData) && (a.mosaicsData.data = null), this._currentPage = this._mosaicPages.length, this._mosaicPages.push({ mosaicsData: { type: "static", data: new Uint32Array(this._pageWidth * this._pageHeight) }, size: [this._pageWidth, this._pageHeight], dirty: !0, texture: void 0 }), this._binPack = new Oe(this._pageWidth, this._pageHeight), this._allocateImage(e, t);
|
|
1683
|
-
}
|
|
1684
|
-
return [r, this._currentPage, [this._pageWidth, this._pageHeight]];
|
|
1685
|
-
}
|
|
1686
|
-
_showDebugSprite([e, t], i) {
|
|
1687
|
-
const r = document.createElement("canvas");
|
|
1688
|
-
r.width = e, r.height = t, r.setAttribute("style", `position: absolute; top: ${4 + 204 * Wr++}px; right: 208px; width: 200px; height: 200px; border: 1px solid black;`);
|
|
1689
|
-
const a = r.getContext("2d"), s = new ImageData(e, t);
|
|
1690
|
-
s.data.set(new Uint8Array(i.buffer)), a.putImageData(s, 0, 0), document.body.appendChild(r);
|
|
1691
|
-
}
|
|
1692
|
-
_showDebugPage(e) {
|
|
1693
|
-
const t = this._mosaicPages[e], { size: [i, r], mosaicsData: a } = t;
|
|
1694
|
-
if (!J(a))
|
|
1695
|
-
return void console.error("Could not show sprite mosaic debug for non-static resource");
|
|
1696
|
-
const s = `mosaicDebugPage${e}`, n = document.getElementById(s) ?? document.createElement("canvas");
|
|
1697
|
-
n.id = s, n.width = i, n.height = r, n.setAttribute("style", `position: absolute; top: ${4 + 204 * e}px; right: 4px; width: 200px; height: 200px; border: 1px solid black;`);
|
|
1698
|
-
const o = n.getContext("2d"), l = new ImageData(i, r);
|
|
1699
|
-
l.data.set(new Uint8Array(a.data.buffer)), o.putImageData(l, 0, 0), document.body.appendChild(n);
|
|
1700
|
-
}
|
|
1701
|
-
}, Wr = 0;
|
|
1702
|
-
function wt(u, e) {
|
|
1703
|
-
const t = new R();
|
|
1704
|
-
return t.width = e[0], t.height = e[1], t.wrapMode = E.CLAMP_TO_EDGE, new X(u, t, null);
|
|
1705
|
-
}
|
|
1706
|
-
let qr = class {
|
|
1707
|
-
constructor(e, t, i, r) {
|
|
1708
|
-
this._animation = e, this._frameData = null;
|
|
1709
|
-
const a = (s) => {
|
|
1710
|
-
this._frameData = s, t.requestRender();
|
|
1711
|
-
};
|
|
1712
|
-
this.frameCount = this._animation.frameDurations.length, this.width = this._animation.width, this.height = this._animation.height, this._playHandle = cr(this._animation, i, r, a);
|
|
1713
|
-
}
|
|
1714
|
-
destroy() {
|
|
1715
|
-
this._playHandle.remove();
|
|
1716
|
-
}
|
|
1717
|
-
loadFrame(e) {
|
|
1718
|
-
const t = this._frameData;
|
|
1719
|
-
if (t == null)
|
|
1720
|
-
return;
|
|
1721
|
-
const i = "width" in t ? t.width : t.codedWidth, r = "height" in t ? t.height : t.codedHeight;
|
|
1722
|
-
e.updateData(0, j, j, i, r, t), this._frameData = null;
|
|
1723
|
-
}
|
|
1724
|
-
};
|
|
1725
|
-
const xt = "arial-unicode-ms-regular", jr = () => Ne.getLogger("esri.views.2d.engine.webgl.TextureManager"), ee = (u, e, t) => jr().error(new re(u, e, t));
|
|
1726
|
-
function Xr(u) {
|
|
1727
|
-
switch (u.type) {
|
|
1728
|
-
case "fill-style":
|
|
1729
|
-
case "CIMHatchFill":
|
|
1730
|
-
return Bi;
|
|
1731
|
-
}
|
|
1732
|
-
return 1;
|
|
1733
|
-
}
|
|
1734
|
-
class Ye {
|
|
1735
|
-
static fromMosaic(e, t) {
|
|
1736
|
-
return new Ye(e, t.page, t.sdf);
|
|
1737
|
-
}
|
|
1738
|
-
constructor(e, t, i) {
|
|
1739
|
-
this.mosaicType = e, this.page = t, this.sdf = i;
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
class Yr {
|
|
1743
|
-
constructor(e) {
|
|
1744
|
-
this._requestRender = e, this._resourceManager = new Fr(), this._invalidFontsMap = /* @__PURE__ */ new Map(), this._sdfConverter = new Gr(Fe), this._bindingInfos = new Array(), this._hashToBindingIndex = /* @__PURE__ */ new Map(), this._ongoingRasterizations = /* @__PURE__ */ new Map(), this._imageRequestQueue = new Yt({ concurrency: 10, process: async (t, i) => {
|
|
1745
|
-
Ue(i);
|
|
1746
|
-
try {
|
|
1747
|
-
return await de(t, { responseType: "image", signal: i });
|
|
1748
|
-
} catch (r) {
|
|
1749
|
-
throw Je(r) ? r : new re("mapview-invalid-resource", `Could not fetch requested resource at ${t}`, r);
|
|
1750
|
-
}
|
|
1751
|
-
} }), this._spriteMosaic = new Hr(2048, 2048, 500), this._glyphSource = new Vr(`${Kt.fontsUrl}/{fontstack}/{range}.pbf`), this._glyphMosaic = new Nr(1024, 1024, this._glyphSource), this._rasterizer = new Br(this.resourceManager);
|
|
1752
|
-
}
|
|
1753
|
-
dispose() {
|
|
1754
|
-
this._spriteMosaic.dispose(), this._glyphMosaic.dispose(), this._rasterizer.dispose(), this._sdfConverter.dispose(), this._spriteMosaic = null, this._glyphMosaic = null, this._sdfConverter = null, this._hashToBindingIndex.clear(), this._hashToBindingIndex = null, this._bindingInfos = null, this._ongoingRasterizations.clear(), this._ongoingRasterizations = null, this._imageRequestQueue.clear(), this._imageRequestQueue = null, this._resourceManager.destroy();
|
|
1755
|
-
}
|
|
1756
|
-
get sprites() {
|
|
1757
|
-
return this._spriteMosaic;
|
|
1758
|
-
}
|
|
1759
|
-
get glyphs() {
|
|
1760
|
-
return this._glyphMosaic;
|
|
1761
|
-
}
|
|
1762
|
-
get resourceManager() {
|
|
1763
|
-
return this._resourceManager;
|
|
1764
|
-
}
|
|
1765
|
-
async rasterizeItem(e, t) {
|
|
1766
|
-
if (e == null)
|
|
1767
|
-
return ee("mapview-null-resource", "Unable to rasterize null resource"), null;
|
|
1768
|
-
if (e.type !== "cim-rasterization-info")
|
|
1769
|
-
return ee("mapview-unexpected-resource", "Unable to rasterize resource"), null;
|
|
1770
|
-
const { resource: i } = e;
|
|
1771
|
-
if (i.type === "text") {
|
|
1772
|
-
const a = await this._rasterizeText(i, t);
|
|
1773
|
-
for (const s of a.glyphs)
|
|
1774
|
-
this._setTextureBinding(ve.GLYPH, s);
|
|
1775
|
-
return a;
|
|
1776
|
-
}
|
|
1777
|
-
const r = await this._rasterizeSprite(i, t);
|
|
1778
|
-
return r && this._setTextureBinding(ve.SPRITE, r), r;
|
|
1779
|
-
}
|
|
1780
|
-
getMosaicInfo(e, t, i = !1) {
|
|
1781
|
-
const r = this._getTextureBindingInfo(e, t, i);
|
|
1782
|
-
return r ? { size: r.size, texture: { texture: r.texture, unit: r.type === "sprite" ? ki : at } } : (ee("mapview-invalid-resource", `Unable to find resource for ${t}`), { size: [0, 0], texture: { texture: null, unit: 0 } });
|
|
1783
|
-
}
|
|
1784
|
-
_getTextureBindingInfo(e, t, i) {
|
|
1785
|
-
const r = this._bindingInfos[t - 1], a = r.page, s = i ? L.LINEAR_MIPMAP_LINEAR : L.LINEAR;
|
|
1786
|
-
switch (r.mosaicType) {
|
|
1787
|
-
case ve.SPRITE: {
|
|
1788
|
-
const n = [this.sprites.getWidth(a), this.sprites.getHeight(a)], o = this._spriteMosaic.getTexture(e, a);
|
|
1789
|
-
return o.setSamplingMode(s), { type: "sprite", texture: o, size: n };
|
|
1790
|
-
}
|
|
1791
|
-
case ve.GLYPH: {
|
|
1792
|
-
const n = [this.glyphs.width, this.glyphs.height], o = this._glyphMosaic.getTexture(e, a);
|
|
1793
|
-
return this._glyphMosaic.bind(e, s, a, at), o.setSamplingMode(s), { type: "glyph", texture: o, size: n };
|
|
1794
|
-
}
|
|
1795
|
-
default:
|
|
1796
|
-
return ee("mapview-texture-manager", `Cannot handle unknown type ${r.mosaicType}`), null;
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
_hashMosaic(e, t) {
|
|
1800
|
-
return 1 | e << 1 | (t.sdf ? 1 : 0) << 2 | t.page << 3;
|
|
1801
|
-
}
|
|
1802
|
-
_setTextureBinding(e, t) {
|
|
1803
|
-
const i = this._hashMosaic(e, t);
|
|
1804
|
-
if (!this._hashToBindingIndex.has(i)) {
|
|
1805
|
-
const r = Ye.fromMosaic(e, t), a = this._bindingInfos.length + 1;
|
|
1806
|
-
this._hashToBindingIndex.set(i, a), this._bindingInfos.push(r);
|
|
1807
|
-
}
|
|
1808
|
-
t.textureBinding = this._hashToBindingIndex.get(i);
|
|
1809
|
-
}
|
|
1810
|
-
async _rasterizeText(e, t) {
|
|
1811
|
-
const { font: i, textString: r } = e, a = vi(i), s = this._invalidFontsMap.has(a), [n, o] = bi(r), l = or(n);
|
|
1812
|
-
try {
|
|
1813
|
-
const h = s ? xt : a;
|
|
1814
|
-
return H("esri-2d-stabilize-glyphs") && await this._glyphMosaic.preloadASCIIGlyphCache(h), { type: "glyphs", glyphs: await this._glyphMosaic.getGlyphItems(h, l, t), isRightToLeft: o };
|
|
1815
|
-
} catch {
|
|
1816
|
-
return ee("mapview-invalid-resource", `Couldn't find font ${a}. Falling back to Arial Unicode MS Regular`), this._invalidFontsMap.set(a, !0), { type: "glyphs", glyphs: await this._glyphMosaic.getGlyphItems(xt, l, t), isRightToLeft: o };
|
|
1817
|
-
}
|
|
1818
|
-
}
|
|
1819
|
-
_hashSpriteResource(e) {
|
|
1820
|
-
switch (e.type) {
|
|
1821
|
-
case "path":
|
|
1822
|
-
return `path:${e.path}.${e.asFill ? 1 : 0}`;
|
|
1823
|
-
case "CIMPictureMarker":
|
|
1824
|
-
return `${e.type}:${e.url}:${e.size}`;
|
|
1825
|
-
case "CIMPictureFill":
|
|
1826
|
-
return `${e.type}:${e.url}:${e.height}`;
|
|
1827
|
-
case "CIMPictureStroke":
|
|
1828
|
-
return `${e.type}:${e.url}:${e.width}`;
|
|
1829
|
-
case "dash":
|
|
1830
|
-
return `dash:${e.capStyle}.${e.dashTemplate.join("")}`;
|
|
1831
|
-
case "sdf":
|
|
1832
|
-
return `sdf:${JSON.stringify(e.geom)}.${e.asFill ? 1 : 0}`;
|
|
1833
|
-
case "fill-style":
|
|
1834
|
-
return `fill_style:${e.style}`;
|
|
1835
|
-
case "animated":
|
|
1836
|
-
return JSON.stringify(lr(e));
|
|
1837
|
-
case "CIMHatchFill":
|
|
1838
|
-
case "CIMVectorMarker":
|
|
1839
|
-
return JSON.stringify(e);
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
async _rasterizeSprite(e, t) {
|
|
1843
|
-
var r;
|
|
1844
|
-
if (!e)
|
|
1845
|
-
return null;
|
|
1846
|
-
const i = Rt(this._hashSpriteResource(e));
|
|
1847
|
-
if (this._spriteMosaic.has(i))
|
|
1848
|
-
return this._spriteMosaic.getSpriteItem(i);
|
|
1849
|
-
if ("url" in e && e.url || e.type === "CIMPictureFill" || e.type === "CIMPictureStroke" || e.type === "CIMPictureMarker" || e.type === "CIMVectorMarker") {
|
|
1850
|
-
const a = [];
|
|
1851
|
-
ae.fetchResources({ type: "CIMPointSymbol", symbolLayers: [e] }, this._resourceManager, a), a.length > 0 && await Promise.all(a);
|
|
1852
|
-
}
|
|
1853
|
-
switch (e.type) {
|
|
1854
|
-
case "CIMPictureMarker":
|
|
1855
|
-
return ((r = e.markerPlacement) == null ? void 0 : r.type) === "CIMMarkerPlacementInsidePolygon" ? this._rasterizeJSONResource(i, e) : this._handleAsyncResource(i, e, t);
|
|
1856
|
-
case "animated":
|
|
1857
|
-
case "CIMPictureFill":
|
|
1858
|
-
case "CIMPictureStroke":
|
|
1859
|
-
case "path":
|
|
1860
|
-
return this._handleAsyncResource(i, e, t);
|
|
1861
|
-
case "sdf":
|
|
1862
|
-
case "dash":
|
|
1863
|
-
case "fill-style":
|
|
1864
|
-
case "CIMVectorMarker":
|
|
1865
|
-
case "CIMHatchFill":
|
|
1866
|
-
return this._rasterizeJSONResource(i, e);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
_rasterizeJSONResource(e, t) {
|
|
1870
|
-
const i = this._rasterizer.rasterizeJSONResource(t, Xr(t));
|
|
1871
|
-
if (i) {
|
|
1872
|
-
const { size: r, image: a, sdf: s, simplePattern: n, rasterizationScale: o } = i;
|
|
1873
|
-
return this._addItemToMosaic(e, r, { type: "static", data: a }, be(t), s, n, o);
|
|
1874
|
-
}
|
|
1875
|
-
return null;
|
|
1876
|
-
}
|
|
1877
|
-
async _handleAsyncResource(e, t, i) {
|
|
1878
|
-
if (this._ongoingRasterizations.has(e))
|
|
1879
|
-
return this._ongoingRasterizations.get(e);
|
|
1880
|
-
let r;
|
|
1881
|
-
return r = t.type === "path" ? this._handleSVG(t, e, i) : this._handleImage(t, e, i), this._ongoingRasterizations.set(e, r), r.finally(() => this._ongoingRasterizations.delete(e)), r;
|
|
1882
|
-
}
|
|
1883
|
-
async _handleSVG(e, t, i) {
|
|
1884
|
-
const r = [Fe, Fe], { asFill: a } = e, s = await this._sdfConverter.draw(e.path, a, i);
|
|
1885
|
-
return this._addItemToMosaic(t, r, { type: "static", data: new Uint32Array(s.buffer) }, !1, !0, !0);
|
|
1886
|
-
}
|
|
1887
|
-
async _handleGIFOrPNG(e, t, i) {
|
|
1888
|
-
const r = e.url, a = this.resourceManager.getResource(r);
|
|
1889
|
-
if (a == null)
|
|
1890
|
-
return null;
|
|
1891
|
-
const { width: s, height: n } = a;
|
|
1892
|
-
if (a instanceof HTMLImageElement) {
|
|
1893
|
-
if (e.type === "animated")
|
|
1894
|
-
return ee("mapview-unexpected-resource", "Attempt to configure animations for a non-animated image."), null;
|
|
1895
|
-
const d = "colorSubstitutions" in e ? e.colorSubstitutions : void 0, { size: p, sdf: _, image: f } = this._rasterizer.rasterizeImageResource(s, n, a, d);
|
|
1896
|
-
return this._addItemToMosaic(t, p, { type: "static", data: f }, be(e), _, !1);
|
|
1897
|
-
}
|
|
1898
|
-
let o, l, h;
|
|
1899
|
-
e.type === "animated" ? (o = !1, l = { playAnimation: e.playAnimation, reverseAnimation: e.reverseAnimation, randomizeStartTime: e.randomizeStartTime, randomizeStartSeed: e.randomizeStartSeed, startTimeOffset: e.startTimeOffset, duration: e.duration, repeatType: e.repeatType, repeatDelay: e.repeatDelay }, h = e.startGroup || 0) : (o = be(e), l = {}, h = 0);
|
|
1900
|
-
const c = new qr(a, this._requestRender, l, h);
|
|
1901
|
-
return this._addItemToMosaic(t, [c.width, c.height], { type: "animated", data: c }, o, !1, !1);
|
|
1902
|
-
}
|
|
1903
|
-
async _handleImage(e, t, i) {
|
|
1904
|
-
const r = e.url;
|
|
1905
|
-
if (Jr(r) || Zr(r))
|
|
1906
|
-
return this._handleGIFOrPNG(e, t, i);
|
|
1907
|
-
if (e.type === "animated")
|
|
1908
|
-
return ee("mapview-unexpected-resource", "Attempt to configure animations for a non-animated image."), null;
|
|
1909
|
-
try {
|
|
1910
|
-
let a;
|
|
1911
|
-
const s = this.resourceManager.getResource(r);
|
|
1912
|
-
if (s != null && s instanceof HTMLImageElement)
|
|
1913
|
-
a = s;
|
|
1914
|
-
else {
|
|
1915
|
-
const { data: p } = await this._imageRequestQueue.push(r, { ...i });
|
|
1916
|
-
a = p;
|
|
1917
|
-
}
|
|
1918
|
-
if (hr(r)) {
|
|
1919
|
-
if ("width" in e && "height" in e)
|
|
1920
|
-
a.width = ie(e.width), a.height = ie(e.height);
|
|
1921
|
-
else if ("cim" in e) {
|
|
1922
|
-
const p = e;
|
|
1923
|
-
a.width = ie(p.width ?? p.scaleX * p.size), a.height = ie(p.size);
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
if (!a.width || !a.height)
|
|
1927
|
-
return null;
|
|
1928
|
-
const n = a.width, o = a.height, l = "colorSubstitutions" in e ? e.colorSubstitutions : void 0, { size: h, sdf: c, image: d } = this._rasterizer.rasterizeImageResource(n, o, a, l);
|
|
1929
|
-
return this._addItemToMosaic(t, h, { type: "static", data: d }, be(e), c, !1);
|
|
1930
|
-
} catch (a) {
|
|
1931
|
-
throw Je(a) ? a : new re("mapview-invalid-resource", `Could not fetch requested resource at ${r}. ${a.message}`);
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
_addItemToMosaic(e, t, i, r, a, s, n) {
|
|
1935
|
-
return this._spriteMosaic.addSpriteItem(e, t, i, r, a, s, n);
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
function be(u) {
|
|
1939
|
-
switch (u.type) {
|
|
1940
|
-
case "CIMVectorMarker":
|
|
1941
|
-
case "CIMPictureMarker":
|
|
1942
|
-
return es(u);
|
|
1943
|
-
default:
|
|
1944
|
-
return !0;
|
|
1945
|
-
}
|
|
1946
|
-
}
|
|
1947
|
-
const Kr = (u) => u != null && u.startsWith("data:image/gif"), Jr = (u) => u && (u.includes(".gif") || Kr(u)), Qr = (u) => u != null && u.startsWith("data:image/png"), Zr = (u) => u && (u.includes(".png") || Qr(u)), es = (u) => u && "markerPlacement" in u && u.markerPlacement && u.markerPlacement.type === "CIMMarkerPlacementInsidePolygon";
|
|
1948
|
-
let ts = class {
|
|
1949
|
-
constructor(e) {
|
|
1950
|
-
this._queue = [], this._refreshable = e;
|
|
1951
|
-
}
|
|
1952
|
-
destroy() {
|
|
1953
|
-
this._queue = [];
|
|
1954
|
-
}
|
|
1955
|
-
enqueueTextureUpdate(e, t) {
|
|
1956
|
-
const i = Jt(), r = e, a = Ii, s = Math.ceil(r.height / a);
|
|
1957
|
-
Ue(t);
|
|
1958
|
-
for (let n = 0; n < s; n++) {
|
|
1959
|
-
const o = n * a, l = n === s - 1, h = l ? r.height - a * n : a;
|
|
1960
|
-
this._queue.push({ type: "chunk", request: e, resolver: i, chunk: n, chunkOffset: o, destHeight: h, chunkIsLast: l, options: t });
|
|
1961
|
-
}
|
|
1962
|
-
return Qt(t, (n) => i.reject(n)), i.promise;
|
|
1963
|
-
}
|
|
1964
|
-
upload() {
|
|
1965
|
-
let e = 0;
|
|
1966
|
-
for (; this._queue.length; ) {
|
|
1967
|
-
const t = performance.now(), i = this._queue.shift();
|
|
1968
|
-
if (i) {
|
|
1969
|
-
if (i.options.signal != null && i.options.signal.aborted)
|
|
1970
|
-
continue;
|
|
1971
|
-
switch (i.type) {
|
|
1972
|
-
case "chunk":
|
|
1973
|
-
this._uploadChunk(i);
|
|
1974
|
-
break;
|
|
1975
|
-
case "no-chunk":
|
|
1976
|
-
this._uploadNoChunk(i);
|
|
1977
|
-
}
|
|
1978
|
-
const r = performance.now() - t;
|
|
1979
|
-
if (e += r, e + r >= Ai)
|
|
1980
|
-
break;
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
this._queue.length && this._refreshable.requestRender();
|
|
1984
|
-
}
|
|
1985
|
-
_uploadChunk(e) {
|
|
1986
|
-
const { request: t, resolver: i, chunkOffset: r, chunkIsLast: a, destHeight: s } = e, { data: n, texture: o, width: l } = t;
|
|
1987
|
-
n != null && (o.updateData(0, 0, r, l, s, n, r), a && i.resolve());
|
|
1988
|
-
}
|
|
1989
|
-
_uploadNoChunk(e) {
|
|
1990
|
-
const { request: t, resolver: i } = e, { data: r, texture: a } = t;
|
|
1991
|
-
a.setData(r), i.resolve();
|
|
1992
|
-
}
|
|
1993
|
-
};
|
|
1994
|
-
const is = ii(-0.5, -0.5);
|
|
1995
|
-
let rs = class {
|
|
1996
|
-
constructor() {
|
|
1997
|
-
this._centerNdc = Te(), this._pxToNdc = Te(), this._worldDimensionsPx = Te(), this._mat3 = Ve(), this._initialized = !1;
|
|
1998
|
-
}
|
|
1999
|
-
dispose() {
|
|
2000
|
-
this._program = P(this._program), this._quad = P(this._quad);
|
|
2001
|
-
}
|
|
2002
|
-
render(e, t, i) {
|
|
2003
|
-
const { context: r } = e, a = this._updateGeometry(e, i);
|
|
2004
|
-
if (t != null) {
|
|
2005
|
-
const { r: s, g: n, b: o, a: l } = t;
|
|
2006
|
-
r.setClearColor(l * s / 255, l * n / 255, l * o / 255, l);
|
|
2007
|
-
} else
|
|
2008
|
-
r.setClearColor(0, 0, 0, 0);
|
|
2009
|
-
if (r.setStencilFunction(De.ALWAYS, 0, 255), r.setStencilWriteMask(255), !a)
|
|
2010
|
-
return r.setClearStencil(1), void r.clear(r.gl.STENCIL_BUFFER_BIT | r.gl.COLOR_BUFFER_BIT);
|
|
2011
|
-
r.setClearStencil(0), r.clear(r.gl.STENCIL_BUFFER_BIT | r.gl.COLOR_BUFFER_BIT), this._initialized || this._initialize(r), r.setDepthWriteEnabled(!1), r.setDepthTestEnabled(!1), r.setColorMask(!1, !1, !1, !1), r.setBlendingEnabled(!1), r.setStencilOp(ke.KEEP, ke.KEEP, ke.REPLACE), r.setStencilFunction(De.ALWAYS, 1, 255), r.setStencilTestEnabled(!0), r.useProgram(this._program), this._program.setUniformMatrix3fv("u_worldExtent", this._mat3), this._quad.draw(), this._quad.unbind();
|
|
2012
|
-
}
|
|
2013
|
-
_initialize(e) {
|
|
2014
|
-
if (this._initialized)
|
|
2015
|
-
return;
|
|
2016
|
-
const t = Me(e, ji);
|
|
2017
|
-
t && (this._program = t, this._quad = new Q(e, [0, 0, 1, 0, 0, 1, 1, 1]), this._initialized = !0);
|
|
2018
|
-
}
|
|
2019
|
-
_updateGeometry(e, t) {
|
|
2020
|
-
const { state: i, pixelRatio: r } = e, { size: a, rotation: s } = i, n = Math.round(a[0] * r), o = Math.round(a[1] * r);
|
|
2021
|
-
if (!i.spatialReference.isWrappable)
|
|
2022
|
-
return !1;
|
|
2023
|
-
const l = ri(s), h = Math.abs(Math.cos(l)), c = Math.abs(Math.sin(l)), d = Math.round(n * h + o * c), p = Math.round(i.worldScreenWidth);
|
|
2024
|
-
if (d <= p)
|
|
2025
|
-
return !1;
|
|
2026
|
-
const _ = n * c + o * h, f = p * r, g = (t.left - t.right) * r / n, y = (t.bottom - t.top) * r / o;
|
|
2027
|
-
Ce(this._worldDimensionsPx, f, _, 1), Ce(this._pxToNdc, 2 / n, -2 / o, 1), Ce(this._centerNdc, g, y, 1);
|
|
2028
|
-
const m = this._mat3;
|
|
2029
|
-
return Zt(m, this._centerNdc), Qe(m, m, this._pxToNdc), s !== 0 && ei(m, m, l), Qe(m, m, this._worldDimensionsPx), ti(m, m, is), !0;
|
|
2030
|
-
}
|
|
2031
|
-
}, pe = class {
|
|
2032
|
-
constructor() {
|
|
2033
|
-
this.name = this.constructor.name;
|
|
2034
|
-
}
|
|
2035
|
-
createOptions(e, t) {
|
|
2036
|
-
return null;
|
|
2037
|
-
}
|
|
2038
|
-
}, ss = class extends pe {
|
|
2039
|
-
constructor() {
|
|
2040
|
-
super(...arguments), this.defines = [], this._desc = { vsPath: "fx/integrate", fsPath: "fx/integrate", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) };
|
|
2041
|
-
}
|
|
2042
|
-
dispose() {
|
|
2043
|
-
this._quad && this._quad.dispose();
|
|
2044
|
-
}
|
|
2045
|
-
bind() {
|
|
2046
|
-
}
|
|
2047
|
-
unbind() {
|
|
2048
|
-
}
|
|
2049
|
-
draw(e, t) {
|
|
2050
|
-
if (!(t != null && t.size))
|
|
2051
|
-
return;
|
|
2052
|
-
const { context: i, renderingOptions: r } = e;
|
|
2053
|
-
this._quad || (this._quad = new Q(i, [0, 0, 1, 0, 0, 1, 1, 1]));
|
|
2054
|
-
const a = i.getBoundFramebufferObject(), { x: s, y: n, width: o, height: l } = i.getViewport(), h = t.getBlock($e.Animation);
|
|
2055
|
-
if (h == null)
|
|
2056
|
-
return;
|
|
2057
|
-
const c = t.getUniforms(i);
|
|
2058
|
-
i.setViewport(0, 0, t.size, t.size);
|
|
2059
|
-
const d = c.filterFlags, p = c.animation, _ = H("featurelayer-animation-enabled") ? r.labelsAnimationTime : 1, f = h.getFBO(i, 1);
|
|
2060
|
-
i.unbindTexture(f.colorTexture), this._computeDelta(e, f, p, d, _);
|
|
2061
|
-
const g = h.getFBO(i);
|
|
2062
|
-
i.unbindTexture(g.colorTexture), this._updateAnimationState(e, f, g), i.bindFramebuffer(a), i.setViewport(s, n, o, l);
|
|
2063
|
-
}
|
|
2064
|
-
_computeDelta(e, t, i, r, a) {
|
|
2065
|
-
const { context: s, painter: n, displayLevel: o } = e, l = n.materialManager.getProgram(this._desc, ["delta"]);
|
|
2066
|
-
if (s.bindFramebuffer(t), s.setColorMask(!0, !0, !0, !0), s.setClearColor(0, 0, 0, 0), s.clear(s.gl.COLOR_BUFFER_BIT), s.useProgram(l), !("type" in r.texture) || !("type" in i.texture))
|
|
2067
|
-
throw new Error("InternalError: Expected to find texture");
|
|
2068
|
-
s.bindTexture(r.texture, r.unit), s.bindTexture(i.texture, i.unit), l.setUniform1i("u_maskTexture", r.unit), l.setUniform1i("u_sourceTexture", i.unit), l.setUniform1f("u_timeDelta", e.deltaTime), l.setUniform1f("u_animationTime", a), l.setUniform1f("u_zoomLevel", Math.round(10 * o)), this._quad.draw();
|
|
2069
|
-
}
|
|
2070
|
-
_updateAnimationState(e, t, i) {
|
|
2071
|
-
const { context: r, painter: a } = e, s = a.materialManager.getProgram(this._desc, ["update"]);
|
|
2072
|
-
r.bindTexture(t.colorTexture, 1), r.useProgram(s), s.setUniform1i("u_sourceTexture", 1), r.bindFramebuffer(i), r.setColorMask(!0, !0, !0, !0), r.setClearColor(0, 0, 0, 0), r.clear(r.gl.COLOR_BUFFER_BIT), this._quad.draw();
|
|
2073
|
-
}
|
|
2074
|
-
};
|
|
2075
|
-
const as = (u) => u.replace("-", "_").toUpperCase(), Mt = (u) => `#define ${as(u)}
|
|
2076
|
-
`;
|
|
2077
|
-
function Ot(u) {
|
|
2078
|
-
return { attributes: /* @__PURE__ */ new Map([["a_pos", 0], ["a_tex", 1]]), shaders: { vertexShader: Mt(u) + lt("blend/blend.vert"), fragmentShader: Mt(u) + lt("blend/blend.frag") } };
|
|
2079
|
-
}
|
|
2080
|
-
const St = () => Ne.getLogger("esri.views.2d.engine.webgl.effects.blendEffects.BlendEffect");
|
|
2081
|
-
let ns = class {
|
|
2082
|
-
constructor() {
|
|
2083
|
-
this._size = [0, 0];
|
|
2084
|
-
}
|
|
2085
|
-
dispose(e) {
|
|
2086
|
-
this._backBufferTexture = P(this._backBufferTexture), this._quad = P(this._quad);
|
|
2087
|
-
}
|
|
2088
|
-
draw(e, t, i, r, a) {
|
|
2089
|
-
const { context: s, drawPhase: n } = e;
|
|
2090
|
-
if (this._setupShader(s), r && r !== "normal" && n !== D.LABEL)
|
|
2091
|
-
return void this._drawBlended(e, t, i, r, a);
|
|
2092
|
-
const o = Ot("normal"), l = s.programCache.acquire(o.shaders.vertexShader, o.shaders.fragmentShader, o.attributes);
|
|
2093
|
-
if (!l)
|
|
2094
|
-
return void St().error(new re("mapview-BlendEffect", 'Error creating shader program for blend mode "normal"'));
|
|
2095
|
-
s.useProgram(l), t.setSamplingMode(i), s.bindTexture(t, 0), l.setUniform1i("u_layerTexture", 0), l.setUniform1f("u_opacity", a), s.setBlendingEnabled(!0), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA);
|
|
2096
|
-
const h = this._quad;
|
|
2097
|
-
h.draw(), h.unbind(), l.dispose();
|
|
2098
|
-
}
|
|
2099
|
-
_drawBlended(e, t, i, r, a) {
|
|
2100
|
-
const { context: s, state: n, pixelRatio: o, inFadeTransition: l } = e, { size: h } = n, c = s.getBoundFramebufferObject();
|
|
2101
|
-
let d, p;
|
|
2102
|
-
c != null ? (d = c.width, p = c.height) : (d = Math.round(o * h[0]), p = Math.round(o * h[1])), this._createOrResizeTexture(e, d, p);
|
|
2103
|
-
const _ = this._backBufferTexture;
|
|
2104
|
-
c.copyToTexture(0, 0, d, p, 0, 0, _), s.setStencilTestEnabled(!1), s.setStencilWriteMask(0), s.setBlendingEnabled(!0), s.setDepthTestEnabled(!1), s.setDepthWriteEnabled(!1);
|
|
2105
|
-
const f = Ot(r), g = s.programCache.acquire(f.shaders.vertexShader, f.shaders.fragmentShader, f.attributes);
|
|
2106
|
-
if (!g)
|
|
2107
|
-
return void St().error(new re("mapview-BlendEffect", `Error creating shader program for blend mode ${r}`));
|
|
2108
|
-
s.useProgram(g), _.setSamplingMode(i), s.bindTexture(_, 0), g.setUniform1i("u_backbufferTexture", 0), t.setSamplingMode(i), s.bindTexture(t, 1), g.setUniform1i("u_layerTexture", 1), g.setUniform1f("u_opacity", a), g.setUniform1f("u_inFadeOpacity", l ? 1 : 0), s.setBlendFunction(v.ONE, v.ZERO);
|
|
2109
|
-
const y = this._quad;
|
|
2110
|
-
y.draw(), y.unbind(), g.dispose(), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA);
|
|
2111
|
-
}
|
|
2112
|
-
_setupShader(e) {
|
|
2113
|
-
this._quad || (this._quad = new Q(e, [-1, -1, 1, -1, -1, 1, 1, 1]));
|
|
2114
|
-
}
|
|
2115
|
-
_createOrResizeTexture(e, t, i) {
|
|
2116
|
-
const { context: r } = e;
|
|
2117
|
-
if (this._backBufferTexture === null || t !== this._size[0] || i !== this._size[1]) {
|
|
2118
|
-
if (this._backBufferTexture)
|
|
2119
|
-
this._backBufferTexture.resize(t, i);
|
|
2120
|
-
else {
|
|
2121
|
-
const a = new R();
|
|
2122
|
-
a.internalFormat = C.RGBA, a.wrapMode = E.CLAMP_TO_EDGE, a.width = t, a.height = i, this._backBufferTexture = new X(r, a);
|
|
2123
|
-
}
|
|
2124
|
-
this._size[0] = t, this._size[1] = i;
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
}, Pt = class extends pe {
|
|
2128
|
-
constructor(e) {
|
|
2129
|
-
super(), this.name = this.constructor.name, this.defines = [e];
|
|
2130
|
-
}
|
|
2131
|
-
dispose() {
|
|
2132
|
-
}
|
|
2133
|
-
bind({ context: e, painter: t }) {
|
|
2134
|
-
this._prev = e.getBoundFramebufferObject();
|
|
2135
|
-
const i = t.getFbos().effect0;
|
|
2136
|
-
e.bindFramebuffer(i), e.setColorMask(!0, !0, !0, !0), e.setClearColor(0, 0, 0, 0), e.clear(e.gl.COLOR_BUFFER_BIT);
|
|
2137
|
-
}
|
|
2138
|
-
unbind() {
|
|
2139
|
-
}
|
|
2140
|
-
draw(e, t) {
|
|
2141
|
-
const { context: i, painter: r } = e, a = r.getPostProcessingEffects(t), s = i.getBoundFramebufferObject();
|
|
2142
|
-
for (const { postProcessingEffect: n, effect: o } of a)
|
|
2143
|
-
n.draw(e, s, o);
|
|
2144
|
-
i.bindFramebuffer(this._prev), i.setStencilTestEnabled(!1), r.blitTexture(i, s.colorTexture, L.NEAREST), i.setStencilTestEnabled(!0);
|
|
2145
|
-
}
|
|
2146
|
-
}, os = class {
|
|
2147
|
-
constructor() {
|
|
2148
|
-
this._width = void 0, this._height = void 0, this._resources = null;
|
|
2149
|
-
}
|
|
2150
|
-
dispose() {
|
|
2151
|
-
this._resources && (this._resources.quadGeometry.dispose(), this._resources.quadVAO.dispose(), this._resources.highlightProgram.dispose(), this._resources.blurProgram.dispose(), this._resources = null);
|
|
2152
|
-
}
|
|
2153
|
-
preBlur(e, t) {
|
|
2154
|
-
e.bindTexture(t, ce), e.useProgram(this._resources.blurProgram), this._resources.blurProgram.setUniform4fv("u_direction", [1, 0, 1 / this._width, 0]), this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector", Li), e.bindVAO(this._resources.quadVAO), e.drawArrays(ne.TRIANGLE_STRIP, 0, 4), e.bindVAO();
|
|
2155
|
-
}
|
|
2156
|
-
finalBlur(e, t) {
|
|
2157
|
-
e.bindTexture(t, ce), e.useProgram(this._resources.blurProgram), this._resources.blurProgram.setUniform4fv("u_direction", [0, 1, 0, 1 / this._height]), this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector", Ni), e.bindVAO(this._resources.quadVAO), e.drawArrays(ne.TRIANGLE_STRIP, 0, 4), e.bindVAO();
|
|
2158
|
-
}
|
|
2159
|
-
renderHighlight(e, t, i) {
|
|
2160
|
-
e.bindTexture(t, ce), e.useProgram(this._resources.highlightProgram), i.applyHighlightOptions(e, this._resources.highlightProgram), e.bindVAO(this._resources.quadVAO), e.setBlendingEnabled(!0), e.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), e.drawArrays(ne.TRIANGLE_STRIP, 0, 4), e.bindVAO();
|
|
2161
|
-
}
|
|
2162
|
-
_initialize(e, t, i) {
|
|
2163
|
-
this._width = t, this._height = i;
|
|
2164
|
-
const r = Ge.createVertex(e, He.STATIC_DRAW, new Int8Array([-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1]).buffer), a = new je(e, /* @__PURE__ */ new Map([["a_position", 0], ["a_texcoord", 1]]), { geometry: [new pt("a_position", 2, Le.BYTE, 0, 4), new pt("a_texcoord", 2, Le.UNSIGNED_BYTE, 2, 4)] }, { geometry: r }), s = Me(e, Xi), n = Me(e, Yi);
|
|
2165
|
-
e.useProgram(s), s.setUniform1i("u_texture", ce), s.setUniform1i("u_shade", $i), s.setUniform1f("u_sigma", nt), e.useProgram(n), n.setUniform1i("u_texture", ce), n.setUniform1f("u_sigma", nt), this._resources = { quadGeometry: r, quadVAO: a, highlightProgram: s, blurProgram: n };
|
|
2166
|
-
}
|
|
2167
|
-
setup(e, t, i) {
|
|
2168
|
-
this._resources ? (this._width = t, this._height = i) : this._initialize(e, t, i);
|
|
2169
|
-
}
|
|
2170
|
-
};
|
|
2171
|
-
function Tt(u, e, t) {
|
|
2172
|
-
const i = new R(e, t);
|
|
2173
|
-
return i.wrapMode = E.CLAMP_TO_EDGE, new N(u, i, new Xe(We.STENCIL_INDEX8, e, t));
|
|
2174
|
-
}
|
|
2175
|
-
let ls = class {
|
|
2176
|
-
constructor() {
|
|
2177
|
-
this._width = void 0, this._height = void 0, this._resources = null;
|
|
2178
|
-
}
|
|
2179
|
-
dispose() {
|
|
2180
|
-
this._resources && (this._resources.sharedBlur1Fbo.dispose(), this._resources.sharedBlur2Fbo.dispose(), this._resources = null);
|
|
2181
|
-
}
|
|
2182
|
-
_initialize(e, t, i) {
|
|
2183
|
-
this._width = t, this._height = i;
|
|
2184
|
-
const r = Tt(e, t, i), a = Tt(e, t, i);
|
|
2185
|
-
this._resources = { sharedBlur1Fbo: r, sharedBlur2Fbo: a };
|
|
2186
|
-
}
|
|
2187
|
-
setup(e, t, i) {
|
|
2188
|
-
!this._resources || this._width === t && this._height === i || this.dispose(), this._resources || this._initialize(e, t, i);
|
|
2189
|
-
}
|
|
2190
|
-
get sharedBlur1Tex() {
|
|
2191
|
-
return this._resources.sharedBlur1Fbo.colorTexture;
|
|
2192
|
-
}
|
|
2193
|
-
get sharedBlur1Fbo() {
|
|
2194
|
-
return this._resources.sharedBlur1Fbo;
|
|
2195
|
-
}
|
|
2196
|
-
get sharedBlur2Tex() {
|
|
2197
|
-
return this._resources.sharedBlur2Fbo.colorTexture;
|
|
2198
|
-
}
|
|
2199
|
-
get sharedBlur2Fbo() {
|
|
2200
|
-
return this._resources.sharedBlur2Fbo;
|
|
2201
|
-
}
|
|
2202
|
-
};
|
|
2203
|
-
const te = 4, we = 4 / te;
|
|
2204
|
-
let hs = class extends pe {
|
|
2205
|
-
constructor() {
|
|
2206
|
-
super(...arguments), this.defines = ["highlight"], this._hlRenderer = new os(), this._width = void 0, this._height = void 0, this._boundFBO = null, this._hlSurfaces = new ls(), this._adjustedWidth = void 0, this._adjustedHeight = void 0, this._blitRenderer = new Bt();
|
|
2207
|
-
}
|
|
2208
|
-
dispose() {
|
|
2209
|
-
var e, t;
|
|
2210
|
-
(e = this._hlSurfaces) == null || e.dispose(), (t = this._hlRenderer) == null || t.dispose(), this._boundFBO = null;
|
|
2211
|
-
}
|
|
2212
|
-
bind(e) {
|
|
2213
|
-
const { context: t, painter: i } = e, { width: r, height: a } = t.getViewport(), s = i.getFbos().effect0;
|
|
2214
|
-
this.setup(e, r, a), t.bindFramebuffer(s), t.setColorMask(!0, !0, !0, !0), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT);
|
|
2215
|
-
}
|
|
2216
|
-
unbind() {
|
|
2217
|
-
}
|
|
2218
|
-
setup({ context: e }, t, i) {
|
|
2219
|
-
this._width = t, this._height = i;
|
|
2220
|
-
const r = t % te, a = i % te;
|
|
2221
|
-
t += r < te / 2 ? -r : te - r, i += a < te / 2 ? -a : te - a, this._adjustedWidth = t, this._adjustedHeight = i, this._boundFBO = e.getBoundFramebufferObject();
|
|
2222
|
-
const s = Math.round(t * we), n = Math.round(i * we);
|
|
2223
|
-
this._hlRenderer.setup(e, s, n), this._hlSurfaces.setup(e, s, n);
|
|
2224
|
-
}
|
|
2225
|
-
draw(e) {
|
|
2226
|
-
const { context: t, passOptions: i } = e, r = i.activeGradient, a = t.getBoundFramebufferObject();
|
|
2227
|
-
t.setViewport(0, 0, this._adjustedWidth * we, this._adjustedHeight * we), t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo), t.setStencilTestEnabled(!1), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT), this._blitRenderer.render(t, a.colorTexture, L.NEAREST, 1), t.setStencilTestEnabled(!1), t.setBlendingEnabled(!1), t.setColorMask(!1, !1, !1, !0), t.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT), this._hlRenderer.preBlur(t, this._hlSurfaces.sharedBlur1Tex), t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT), this._hlRenderer.finalBlur(t, this._hlSurfaces.sharedBlur2Tex), t.bindFramebuffer(this._boundFBO), t.setBlendingEnabled(!0), t.setColorMask(!0, !0, !0, !0), t.setViewport(0, 0, this._width, this._height), this._hlRenderer.renderHighlight(t, this._hlSurfaces.sharedBlur1Tex, r), this._boundFBO = null;
|
|
2228
|
-
}
|
|
2229
|
-
}, cs = class extends pe {
|
|
2230
|
-
constructor() {
|
|
2231
|
-
super(...arguments), this.name = this.constructor.name, this.defines = ["hittest"];
|
|
2232
|
-
}
|
|
2233
|
-
dispose() {
|
|
2234
|
-
this._fbo != null && this._fbo.dispose();
|
|
2235
|
-
}
|
|
2236
|
-
createOptions({ pixelRatio: e }, t, i = kt) {
|
|
2237
|
-
if (!t.length)
|
|
2238
|
-
return null;
|
|
2239
|
-
const r = t.shift(), a = r.x, s = r.y;
|
|
2240
|
-
return this._outstanding = r, { type: "hittest", distance: i * e, smallSymbolDistance: 0, smallSymbolSizeThreshold: 3, position: [a, s] };
|
|
2241
|
-
}
|
|
2242
|
-
bind(e) {
|
|
2243
|
-
const { context: t, attributeView: i } = e;
|
|
2244
|
-
if (!i.size)
|
|
2245
|
-
return;
|
|
2246
|
-
const r = i.getBlock($e.GPGPU);
|
|
2247
|
-
if (r == null)
|
|
2248
|
-
return;
|
|
2249
|
-
const a = r.getFBO(t);
|
|
2250
|
-
t.setViewport(0, 0, i.size, i.size), t.bindFramebuffer(a), t.setColorMask(!0, !0, !0, !0), t.setClearColor(0, 0, 0, 0), t.clear(t.gl.COLOR_BUFFER_BIT | t.gl.DEPTH_BUFFER_BIT);
|
|
2251
|
-
}
|
|
2252
|
-
unbind() {
|
|
2253
|
-
}
|
|
2254
|
-
draw(e) {
|
|
2255
|
-
if (this._outstanding == null)
|
|
2256
|
-
return;
|
|
2257
|
-
const t = this._outstanding;
|
|
2258
|
-
this._outstanding = null, this._resolve(e, t.resolvers);
|
|
2259
|
-
}
|
|
2260
|
-
async _resolve(e, t) {
|
|
2261
|
-
const { context: i, attributeView: r } = e, a = r.getBlock($e.GPGPU);
|
|
2262
|
-
if (a == null)
|
|
2263
|
-
return void t.forEach((l) => l.resolve([]));
|
|
2264
|
-
const s = a.getFBO(i), n = new Uint8Array(s.width * s.height * 4);
|
|
2265
|
-
try {
|
|
2266
|
-
await s.readPixelsAsync(0, 0, s.width, s.height, C.RGBA, qe.UNSIGNED_BYTE, n);
|
|
2267
|
-
} catch {
|
|
2268
|
-
return void t.forEach((h) => h.resolve([]));
|
|
2269
|
-
}
|
|
2270
|
-
const o = [];
|
|
2271
|
-
for (let l = 0; l < n.length; l += 4) {
|
|
2272
|
-
const h = l / 4;
|
|
2273
|
-
n[l] && o.push(h);
|
|
2274
|
-
}
|
|
2275
|
-
t.forEach((l) => l.resolve(o));
|
|
2276
|
-
}
|
|
2277
|
-
}, us = class extends pe {
|
|
2278
|
-
constructor() {
|
|
2279
|
-
super(...arguments), this.name = this.constructor.name, this.defines = ["id"], this._lastSize = 0, this._boundFBO = null;
|
|
2280
|
-
}
|
|
2281
|
-
dispose() {
|
|
2282
|
-
this._fbo != null && this._fbo.dispose();
|
|
2283
|
-
}
|
|
2284
|
-
bind({ context: e, painter: t }) {
|
|
2285
|
-
this._boundFBO = e.getBoundFramebufferObject();
|
|
2286
|
-
const i = t.getFbos().effect0;
|
|
2287
|
-
e.bindFramebuffer(i), e.setColorMask(!0, !0, !0, !0), e.setClearColor(0, 0, 0, 0), e.clear(e.gl.COLOR_BUFFER_BIT);
|
|
2288
|
-
}
|
|
2289
|
-
unbind({ context: e }) {
|
|
2290
|
-
e.bindFramebuffer(this._boundFBO), this._boundFBO = null;
|
|
2291
|
-
}
|
|
2292
|
-
draw(e, t, i = 2 * kt) {
|
|
2293
|
-
this._resolve(e, t, i);
|
|
2294
|
-
}
|
|
2295
|
-
async _resolve({ context: e, state: t, pixelRatio: i }, r, a) {
|
|
2296
|
-
const s = e.getBoundFramebufferObject(), n = t.size[1] * i, o = Math.round(a * i), l = o / 2, h = o / 2;
|
|
2297
|
-
this._ensureBuffer(o), r.forEach(async (c, d) => {
|
|
2298
|
-
const p = /* @__PURE__ */ new Map(), _ = Math.floor(d.x * i - o / 2), f = Math.floor(n - d.y * i - o / 2);
|
|
2299
|
-
await s.readPixelsAsync(_, f, o, o, C.RGBA, qe.UNSIGNED_BYTE, this._buf);
|
|
2300
|
-
for (let y = 0; y < this._buf32.length; y++) {
|
|
2301
|
-
const m = this._buf32[y];
|
|
2302
|
-
if (m !== 4294967295 && m !== 0) {
|
|
2303
|
-
const M = y % o, w = o - Math.floor(y / o), x = (l - M) * (l - M) + (h - w) * (h - w), b = p.has(m) ? p.get(m) : 4294967295;
|
|
2304
|
-
p.set(m, Math.min(x, b));
|
|
2305
|
-
}
|
|
2306
|
-
}
|
|
2307
|
-
const g = Array.from(p).sort((y, m) => y[1] - m[1]).map((y) => y[0]);
|
|
2308
|
-
c.resolve(g), r.delete(d);
|
|
2309
|
-
});
|
|
2310
|
-
}
|
|
2311
|
-
_ensureBuffer(e) {
|
|
2312
|
-
this._lastSize !== e && (this._lastSize = e, this._buf = new Uint8Array(4 * e * e), this._buf32 = new Uint32Array(this._buf.buffer));
|
|
2313
|
-
}
|
|
2314
|
-
};
|
|
2315
|
-
const Ie = 5, ds = [1, 0], ps = [0, 1], _s = [1, 0.8, 0.6, 0.4, 0.2], ms = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
|
|
2316
|
-
let fs = class {
|
|
2317
|
-
constructor() {
|
|
2318
|
-
this._intensityFBO = null, this._compositeFBO = null, this._mipsFBOs = new Array(Ie), this._nMips = Ie, this._kernelSizeArray = [3, 5, 7, 9, 11], this._size = [0, 0], this._programDesc = { luminosityHighPass: { vsPath: "post-processing/pp", fsPath: "post-processing/bloom/luminosityHighPass", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, gaussianBlur: { vsPath: "post-processing/pp", fsPath: "post-processing/bloom/gaussianBlur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, composite: { vsPath: "post-processing/pp", fsPath: "post-processing/bloom/composite", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, blit: { vsPath: "post-processing/pp", fsPath: "post-processing/blit", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) } };
|
|
2319
|
-
}
|
|
2320
|
-
dispose() {
|
|
2321
|
-
if (this._quad = P(this._quad), this._intensityFBO = P(this._intensityFBO), this._compositeFBO = P(this._compositeFBO), this._mipsFBOs) {
|
|
2322
|
-
for (let e = 0; e < this._nMips; e++)
|
|
2323
|
-
this._mipsFBOs[e] && (this._mipsFBOs[e].horizontal.dispose(), this._mipsFBOs[e].vertical.dispose());
|
|
2324
|
-
this._mipsFBOs = null;
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
draw(e, t, i) {
|
|
2328
|
-
const { width: r, height: a } = t, { context: s, painter: n } = e, { materialManager: o } = n, l = s.gl, h = this._programDesc, { strength: c, radius: d, threshold: p } = i;
|
|
2329
|
-
this._quad || (this._quad = new Q(s, [-1, -1, 1, -1, -1, 1, 1, 1])), this._createOrResizeResources(e, r, a), s.setStencilTestEnabled(!1), s.setBlendingEnabled(!0), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), s.setStencilWriteMask(0);
|
|
2330
|
-
const _ = this._quad;
|
|
2331
|
-
_.bind(), s.bindFramebuffer(this._intensityFBO);
|
|
2332
|
-
const f = o.getProgram(h.luminosityHighPass);
|
|
2333
|
-
s.useProgram(f), s.bindTexture(t.colorTexture, 0), f.setUniform1i("u_texture", 0), f.setUniform3fv("u_defaultColor", [0, 0, 0]), f.setUniform1f("u_defaultOpacity", 0), f.setUniform1f("u_luminosityThreshold", p), f.setUniform1f("u_smoothWidth", 0.01);
|
|
2334
|
-
const g = [Math.round(r / 2), Math.round(a / 2)];
|
|
2335
|
-
s.setViewport(0, 0, g[0], g[1]), s.setClearColor(0, 0, 0, 0), s.clear(l.COLOR_BUFFER_BIT), _.draw(), s.setBlendingEnabled(!1);
|
|
2336
|
-
let y = this._intensityFBO.colorTexture;
|
|
2337
|
-
for (let w = 0; w < this._nMips; w++) {
|
|
2338
|
-
const x = o.getProgram(h.gaussianBlur, [{ name: "radius", value: this._kernelSizeArray[w] }]);
|
|
2339
|
-
s.useProgram(x), s.bindTexture(y, w + 1), x.setUniform1i("u_colorTexture", w + 1), x.setUniform2fv("u_texSize", g), x.setUniform2fv("u_direction", ds), s.setViewport(0, 0, g[0], g[1]);
|
|
2340
|
-
const b = this._mipsFBOs[w];
|
|
2341
|
-
s.bindFramebuffer(b.horizontal), _.draw(), y = b.horizontal.colorTexture, s.bindFramebuffer(b.vertical), s.bindTexture(y, w + 1), x.setUniform2fv("u_direction", ps), _.draw(), y = b.vertical.colorTexture, g[0] = Math.round(g[0] / 2), g[1] = Math.round(g[1] / 2);
|
|
2342
|
-
}
|
|
2343
|
-
s.setViewport(0, 0, r, a);
|
|
2344
|
-
const m = o.getProgram(h.composite, [{ name: "nummips", value: Ie }]);
|
|
2345
|
-
s.bindFramebuffer(this._compositeFBO), s.useProgram(m), m.setUniform1f("u_bloomStrength", c), m.setUniform1f("u_bloomRadius", d), m.setUniform1fv("u_bloomFactors", _s), m.setUniform3fv("u_bloomTintColors", ms), s.bindTexture(this._mipsFBOs[0].vertical.colorTexture, 1), m.setUniform1i("u_blurTexture1", 1), s.bindTexture(this._mipsFBOs[1].vertical.colorTexture, 2), m.setUniform1i("u_blurTexture2", 2), s.bindTexture(this._mipsFBOs[2].vertical.colorTexture, 3), m.setUniform1i("u_blurTexture3", 3), s.bindTexture(this._mipsFBOs[3].vertical.colorTexture, 4), m.setUniform1i("u_blurTexture4", 4), s.bindTexture(this._mipsFBOs[4].vertical.colorTexture, 5), m.setUniform1i("u_blurTexture5", 5), _.draw(), s.bindFramebuffer(t), s.setBlendingEnabled(!0);
|
|
2346
|
-
const M = o.getProgram(h.blit);
|
|
2347
|
-
s.useProgram(M), s.bindTexture(this._compositeFBO.colorTexture, 6), M.setUniform1i("u_texture", 6), s.setBlendFunction(v.ONE, v.ONE), _.draw(), _.unbind(), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), s.setStencilTestEnabled(!0);
|
|
2348
|
-
}
|
|
2349
|
-
_createOrResizeResources(e, t, i) {
|
|
2350
|
-
const { context: r } = e;
|
|
2351
|
-
if (this._compositeFBO && this._size[0] === t && this._size[1] === i)
|
|
2352
|
-
return;
|
|
2353
|
-
this._size[0] = t, this._size[1] = i;
|
|
2354
|
-
const a = [Math.round(t / 2), Math.round(i / 2)];
|
|
2355
|
-
if (this._compositeFBO)
|
|
2356
|
-
this._compositeFBO.resize(t, i);
|
|
2357
|
-
else {
|
|
2358
|
-
const s = new R(t, i);
|
|
2359
|
-
s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, this._compositeFBO = new N(r, s);
|
|
2360
|
-
}
|
|
2361
|
-
if (this._intensityFBO)
|
|
2362
|
-
this._intensityFBO.resize(a[0], a[1]);
|
|
2363
|
-
else {
|
|
2364
|
-
const s = new R(a[0], a[1]);
|
|
2365
|
-
s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, this._intensityFBO = new N(r, s);
|
|
2366
|
-
}
|
|
2367
|
-
for (let s = 0; s < this._nMips; s++) {
|
|
2368
|
-
if (this._mipsFBOs[s])
|
|
2369
|
-
this._mipsFBOs[s].horizontal.resize(a[0], a[1]), this._mipsFBOs[s].vertical.resize(a[0], a[1]);
|
|
2370
|
-
else {
|
|
2371
|
-
const n = new R(a[0], a[1]);
|
|
2372
|
-
n.internalFormat = C.RGBA, n.wrapMode = E.CLAMP_TO_EDGE, this._mipsFBOs[s] = { horizontal: new N(r, n), vertical: new N(r, n) };
|
|
2373
|
-
}
|
|
2374
|
-
a[0] = Math.round(a[0] / 2), a[1] = Math.round(a[1] / 2);
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
};
|
|
2378
|
-
const gs = [1, 0], ys = [0, 1];
|
|
2379
|
-
let vs = class {
|
|
2380
|
-
constructor() {
|
|
2381
|
-
this._blurFBO = null, this._size = [0, 0], this._programDesc = { gaussianBlur: { vsPath: "post-processing/pp", fsPath: "post-processing/blur/gaussianBlur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, radialBlur: { vsPath: "post-processing/pp", fsPath: "post-processing/blur/radial-blur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, blit: { vsPath: "post-processing/pp", fsPath: "post-processing/blit", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) } };
|
|
2382
|
-
}
|
|
2383
|
-
dispose() {
|
|
2384
|
-
this._blurFBO && (this._blurFBO.dispose(), this._blurFBO = null);
|
|
2385
|
-
}
|
|
2386
|
-
draw(e, t, i) {
|
|
2387
|
-
const { context: r } = e, { type: a, radius: s } = i;
|
|
2388
|
-
if (s === 0)
|
|
2389
|
-
return;
|
|
2390
|
-
this._createOrResizeResources(e), this._quad || (this._quad = new Q(r, [-1, -1, 1, -1, -1, 1, 1, 1]));
|
|
2391
|
-
const n = this._quad;
|
|
2392
|
-
n.bind(), a === "blur" ? this._gaussianBlur(e, t, s) : this._radialBlur(e, t), n.unbind();
|
|
2393
|
-
}
|
|
2394
|
-
_gaussianBlur(e, t, i) {
|
|
2395
|
-
const { context: r, state: a, painter: s, pixelRatio: n } = e, { size: o } = a, { materialManager: l } = s, h = this._programDesc, c = this._quad, d = [Math.round(n * o[0]), Math.round(n * o[1])], p = this._blurFBO, _ = l.getProgram(h.gaussianBlur, [{ name: "radius", value: Math.ceil(i) }]);
|
|
2396
|
-
r.useProgram(_), r.setBlendingEnabled(!1), r.bindFramebuffer(p), r.bindTexture(t.colorTexture, 4), _.setUniform1i("u_colorTexture", 4), _.setUniform2fv("u_texSize", d), _.setUniform2fv("u_direction", gs), _.setUniform1f("u_sigma", i), c.draw(), r.bindFramebuffer(t), r.setStencilWriteMask(0), r.setStencilTestEnabled(!1), r.setDepthWriteEnabled(!1), r.setDepthTestEnabled(!1), r.bindTexture(p == null ? void 0 : p.colorTexture, 5), _.setUniform1i("u_colorTexture", 5), _.setUniform2fv("u_direction", ys), c.draw(), r.setBlendingEnabled(!0), r.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), r.setStencilTestEnabled(!0);
|
|
2397
|
-
}
|
|
2398
|
-
_radialBlur(e, t) {
|
|
2399
|
-
const { context: i, painter: r } = e, { materialManager: a } = r, s = this._programDesc, n = this._quad, o = this._blurFBO;
|
|
2400
|
-
i.bindFramebuffer(o);
|
|
2401
|
-
const l = a.getProgram(s.radialBlur);
|
|
2402
|
-
i.useProgram(l), i.setBlendingEnabled(!1), i.bindTexture(t.colorTexture, 4), l.setUniform1i("u_colorTexture", 4), n.draw(), i.bindFramebuffer(t), i.setStencilWriteMask(0), i.setStencilTestEnabled(!1), i.setDepthWriteEnabled(!1), i.setDepthTestEnabled(!1), i.setBlendingEnabled(!0);
|
|
2403
|
-
const h = a.getProgram(s.blit);
|
|
2404
|
-
i.useProgram(h), i.bindTexture(o == null ? void 0 : o.colorTexture, 5), h.setUniform1i("u_texture", 5), i.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), n.draw();
|
|
2405
|
-
}
|
|
2406
|
-
_createOrResizeResources(e) {
|
|
2407
|
-
const { context: t, state: i, pixelRatio: r } = e, { size: a } = i, s = Math.round(r * a[0]), n = Math.round(r * a[1]);
|
|
2408
|
-
if (!this._blurFBO || this._size[0] !== s || this._size[1] !== n)
|
|
2409
|
-
if (this._size[0] = s, this._size[1] = n, this._blurFBO)
|
|
2410
|
-
this._blurFBO.resize(s, n);
|
|
2411
|
-
else {
|
|
2412
|
-
const o = new R(s, n);
|
|
2413
|
-
o.internalFormat = C.RGBA, o.wrapMode = E.CLAMP_TO_EDGE, this._blurFBO = new N(t, o);
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
};
|
|
2417
|
-
class bs {
|
|
2418
|
-
constructor() {
|
|
2419
|
-
this._layerFBOTexture = null, this._size = [0, 0], this._programDesc = { vsPath: "post-processing/pp", fsPath: "post-processing/filterEffect", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) };
|
|
2420
|
-
}
|
|
2421
|
-
dispose() {
|
|
2422
|
-
this._layerFBOTexture = P(this._layerFBOTexture);
|
|
2423
|
-
}
|
|
2424
|
-
draw(e, t, i) {
|
|
2425
|
-
const { width: r, height: a } = t;
|
|
2426
|
-
this._createOrResizeResources(e, r, a);
|
|
2427
|
-
const { context: s, painter: n } = e, { materialManager: o } = n, l = this._programDesc, h = this._quad, c = i.colorMatrix;
|
|
2428
|
-
h.bind();
|
|
2429
|
-
const d = this._layerFBOTexture;
|
|
2430
|
-
s.bindFramebuffer(t), t.copyToTexture(0, 0, r, a, 0, 0, d), s.setBlendingEnabled(!1), s.setStencilTestEnabled(!1);
|
|
2431
|
-
const p = o.getProgram(l);
|
|
2432
|
-
s.useProgram(p), s.bindTexture(d, 2), p.setUniformMatrix4fv("u_coefficients", c), p.setUniform1i("u_colorTexture", 2), h.draw(), s.setBlendingEnabled(!0), s.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), s.setStencilTestEnabled(!0), h.unbind();
|
|
2433
|
-
}
|
|
2434
|
-
_createOrResizeResources(e, t, i) {
|
|
2435
|
-
const { context: r } = e;
|
|
2436
|
-
if (!this._layerFBOTexture || this._size[0] !== t || this._size[1] !== i) {
|
|
2437
|
-
if (this._size[0] = t, this._size[1] = i, this._layerFBOTexture)
|
|
2438
|
-
this._layerFBOTexture.resize(t, i);
|
|
2439
|
-
else {
|
|
2440
|
-
const a = new R();
|
|
2441
|
-
a.internalFormat = C.RGBA, a.wrapMode = E.CLAMP_TO_EDGE, a.width = t, a.height = i, this._layerFBOTexture = new X(r, a);
|
|
2442
|
-
}
|
|
2443
|
-
this._quad || (this._quad = new Q(r, [-1, -1, 1, -1, -1, 1, 1, 1]));
|
|
2444
|
-
}
|
|
2445
|
-
}
|
|
2446
|
-
}
|
|
2447
|
-
const ws = [1, 0], xs = [0, 1];
|
|
2448
|
-
class Ms {
|
|
2449
|
-
constructor() {
|
|
2450
|
-
this._layerFBOTexture = null, this._horizontalBlurFBO = null, this._verticalBlurFBO = null, this._size = [0, 0], this._quad = null, this._programDesc = { blur: { vsPath: "post-processing/pp", fsPath: "post-processing/blur/gaussianBlur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, composite: { vsPath: "post-processing/pp", fsPath: "post-processing/drop-shadow/composite", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, blit: { vsPath: "post-processing/pp", fsPath: "post-processing/blit", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) } };
|
|
2451
|
-
}
|
|
2452
|
-
dispose() {
|
|
2453
|
-
this._layerFBOTexture = P(this._layerFBOTexture), this._horizontalBlurFBO = P(this._horizontalBlurFBO), this._verticalBlurFBO = P(this._verticalBlurFBO);
|
|
2454
|
-
}
|
|
2455
|
-
draw(e, t, i) {
|
|
2456
|
-
const { context: r, state: a, painter: s } = e, { materialManager: n } = s, o = this._programDesc, l = t.width, h = t.height, c = [Math.round(l), Math.round(h)], { blurRadius: d, offsetX: p, offsetY: _, color: f } = i, g = [ie(p), ie(_)];
|
|
2457
|
-
this._createOrResizeResources(e, l, h, c);
|
|
2458
|
-
const y = this._horizontalBlurFBO, m = this._verticalBlurFBO;
|
|
2459
|
-
r.setStencilWriteMask(0), r.setStencilTestEnabled(!1), r.setDepthWriteEnabled(!1), r.setDepthTestEnabled(!1);
|
|
2460
|
-
const M = this._layerFBOTexture;
|
|
2461
|
-
t.copyToTexture(0, 0, l, h, 0, 0, M), this._quad || (this._quad = new Q(r, [-1, -1, 1, -1, -1, 1, 1, 1])), r.setViewport(0, 0, c[0], c[1]);
|
|
2462
|
-
const w = this._quad;
|
|
2463
|
-
w.bind(), r.setBlendingEnabled(!1);
|
|
2464
|
-
const x = n.getProgram(o.blur, [{ name: "radius", value: Math.ceil(d) }]);
|
|
2465
|
-
r.useProgram(x), r.bindFramebuffer(y), r.bindTexture(t.colorTexture, 4), x.setUniform1i("u_colorTexture", 4), x.setUniform2fv("u_texSize", c), x.setUniform2fv("u_direction", ws), x.setUniform1f("u_sigma", d), w.draw(), r.bindFramebuffer(m), r.bindTexture(y == null ? void 0 : y.colorTexture, 5), x.setUniform1i("u_colorTexture", 5), x.setUniform2fv("u_direction", xs), w.draw(), r.bindFramebuffer(t), r.setViewport(0, 0, l, h);
|
|
2466
|
-
const b = n.getProgram(o.composite);
|
|
2467
|
-
r.useProgram(b), r.bindTexture(m == null ? void 0 : m.colorTexture, 2), b.setUniform1i("u_blurTexture", 2), r.bindTexture(M, 3), b.setUniform1i("u_layerFBOTexture", 3), b.setUniform4fv("u_shadowColor", [f[3] * (f[0] / 255), f[3] * (f[1] / 255), f[3] * (f[2] / 255), f[3]]), b.setUniformMatrix3fv("u_displayViewMat3", a.displayMat3), b.setUniform2fv("u_shadowOffset", g), w.draw(), r.setBlendingEnabled(!0), r.setStencilTestEnabled(!0), r.setBlendFunction(v.ONE, v.ONE_MINUS_SRC_ALPHA), w.unbind();
|
|
2468
|
-
}
|
|
2469
|
-
_createOrResizeResources(e, t, i, r) {
|
|
2470
|
-
const { context: a } = e;
|
|
2471
|
-
if (!this._horizontalBlurFBO || this._size[0] !== t || this._size[1] !== i) {
|
|
2472
|
-
if (this._size[0] = t, this._size[1] = i, this._horizontalBlurFBO)
|
|
2473
|
-
this._horizontalBlurFBO.resize(r[0], r[1]);
|
|
2474
|
-
else {
|
|
2475
|
-
const s = new R(r[0], r[1]);
|
|
2476
|
-
s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, this._horizontalBlurFBO = new N(a, s);
|
|
2477
|
-
}
|
|
2478
|
-
if (this._verticalBlurFBO)
|
|
2479
|
-
this._verticalBlurFBO.resize(r[0], r[1]);
|
|
2480
|
-
else {
|
|
2481
|
-
const s = new R(r[0], r[1]);
|
|
2482
|
-
s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, this._verticalBlurFBO = new N(a, s);
|
|
2483
|
-
}
|
|
2484
|
-
if (this._layerFBOTexture)
|
|
2485
|
-
this._layerFBOTexture.resize(t, i);
|
|
2486
|
-
else {
|
|
2487
|
-
const s = new R();
|
|
2488
|
-
s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, s.width = t, s.height = i, this._layerFBOTexture = new X(a, s);
|
|
2489
|
-
}
|
|
2490
|
-
}
|
|
2491
|
-
}
|
|
2492
|
-
}
|
|
2493
|
-
class Os {
|
|
2494
|
-
constructor() {
|
|
2495
|
-
this._size = [0, 0], this._layerFBOTexture = null;
|
|
2496
|
-
}
|
|
2497
|
-
dispose() {
|
|
2498
|
-
this._layerFBOTexture = P(this._layerFBOTexture);
|
|
2499
|
-
}
|
|
2500
|
-
draw(e, t, i) {
|
|
2501
|
-
const { width: r, height: a } = t;
|
|
2502
|
-
this._createOrResizeResources(e, r, a);
|
|
2503
|
-
const { context: s, painter: n } = e, { amount: o } = i, l = s.gl, h = this._layerFBOTexture;
|
|
2504
|
-
s.bindFramebuffer(t), t.copyToTexture(0, 0, r, a, 0, 0, h), s.setBlendingEnabled(!0), s.setStencilTestEnabled(!1), s.setDepthTestEnabled(!1), s.setClearColor(0, 0, 0, 0), s.clear(l.COLOR_BUFFER_BIT), n.blitTexture(s, h, L.NEAREST, o);
|
|
2505
|
-
}
|
|
2506
|
-
_createOrResizeResources(e, t, i) {
|
|
2507
|
-
const { context: r } = e;
|
|
2508
|
-
if (!this._layerFBOTexture || this._size[0] !== t || this._size[1] !== i)
|
|
2509
|
-
if (this._size[0] = t, this._size[1] = i, this._layerFBOTexture)
|
|
2510
|
-
this._layerFBOTexture.resize(t, i);
|
|
2511
|
-
else {
|
|
2512
|
-
const a = new R();
|
|
2513
|
-
a.internalFormat = C.RGBA, a.wrapMode = E.CLAMP_TO_EDGE, a.samplingMode = L.NEAREST, a.width = t, a.height = i, this._layerFBOTexture = new X(r, a);
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
}
|
|
2517
|
-
function Ss(u) {
|
|
2518
|
-
switch (u) {
|
|
2519
|
-
case "bloom":
|
|
2520
|
-
case "blur":
|
|
2521
|
-
case "opacity":
|
|
2522
|
-
case "drop-shadow":
|
|
2523
|
-
return u;
|
|
2524
|
-
default:
|
|
2525
|
-
return "colorize";
|
|
2526
|
-
}
|
|
2527
|
-
}
|
|
2528
|
-
const Ps = { colorize: () => new bs(), blur: () => new vs(), bloom: () => new fs(), opacity: () => new Os(), "drop-shadow": () => new Ms() };
|
|
2529
|
-
class Ts {
|
|
2530
|
-
constructor() {
|
|
2531
|
-
this._effectMap = /* @__PURE__ */ new Map();
|
|
2532
|
-
}
|
|
2533
|
-
dispose() {
|
|
2534
|
-
this._effectMap.forEach((e) => e.dispose()), this._effectMap.clear();
|
|
2535
|
-
}
|
|
2536
|
-
getPostProcessingEffects(e) {
|
|
2537
|
-
if (!e || e.length === 0)
|
|
2538
|
-
return [];
|
|
2539
|
-
const t = [];
|
|
2540
|
-
for (const i of e) {
|
|
2541
|
-
const r = Ss(i.type);
|
|
2542
|
-
let a = this._effectMap.get(r);
|
|
2543
|
-
a || (a = Ps[r](), this._effectMap.set(r, a)), t.push({ postProcessingEffect: a, effect: i });
|
|
2544
|
-
}
|
|
2545
|
-
return t;
|
|
2546
|
-
}
|
|
2547
|
-
}
|
|
2548
|
-
class Cs {
|
|
2549
|
-
constructor(e, t) {
|
|
2550
|
-
this.brushes = e, this.name = t.name, this.drawPhase = t.drawPhase || D.MAP, this._targetFn = t.target, this.effects = t.effects || [], this.enableDefaultDraw = t.enableDefaultDraw ?? (() => !0), this.forceDrawByDisplayOrder = !!t.forceDrawByDisplayOrder;
|
|
2551
|
-
}
|
|
2552
|
-
render(e) {
|
|
2553
|
-
var s;
|
|
2554
|
-
const { context: t, profiler: i } = e, r = this._targetFn(), a = this.drawPhase & e.drawPhase;
|
|
2555
|
-
if (i.recordPassStart(this.name), a) {
|
|
2556
|
-
this.enableDefaultDraw() && this._doRender(e, r), i.recordPassEnd();
|
|
2557
|
-
for (const n of this.effects) {
|
|
2558
|
-
if (!n.enable())
|
|
2559
|
-
continue;
|
|
2560
|
-
const o = n.apply, l = (s = n.args) == null ? void 0 : s.call(n), h = t.getViewport(), c = t.getBoundFramebufferObject(), d = e.passOptions;
|
|
2561
|
-
this._bindEffect(e, o, l), this._doRender(e, r, o.defines), this._drawAndUnbindEffect(e, o, h, c, d, l);
|
|
2562
|
-
}
|
|
2563
|
-
}
|
|
2564
|
-
}
|
|
2565
|
-
_doRender(e, t, i) {
|
|
2566
|
-
if (t == null)
|
|
2567
|
-
return;
|
|
2568
|
-
const { profiler: r, context: a } = e;
|
|
2569
|
-
for (const s of this.brushes) {
|
|
2570
|
-
if (r.recordBrushStart(s.name), s.brushEffect != null) {
|
|
2571
|
-
const n = a.getViewport(), o = a.getBoundFramebufferObject(), l = e.passOptions;
|
|
2572
|
-
this._bindEffect(e, s.brushEffect), this._drawWithBrush(s, e, t, i), this._drawAndUnbindEffect(e, s.brushEffect, n, o, l);
|
|
2573
|
-
} else
|
|
2574
|
-
this._drawWithBrush(s, e, t, i);
|
|
2575
|
-
r.recordBrushEnd();
|
|
2576
|
-
}
|
|
2577
|
-
}
|
|
2578
|
-
_drawWithBrush(e, t, i, r) {
|
|
2579
|
-
si(i) ? (e.prepareState(t, r), e.drawMany(t, i, r)) : i.visible && (e.prepareState(t, r), e.draw(t, i, r));
|
|
2580
|
-
}
|
|
2581
|
-
_bindEffect(e, t, i) {
|
|
2582
|
-
const { profiler: r } = e;
|
|
2583
|
-
r.recordPassStart(this.name + "." + t.name), t.bind(e, i);
|
|
2584
|
-
const a = t.createOptions(e, i);
|
|
2585
|
-
e.passOptions = a;
|
|
2586
|
-
}
|
|
2587
|
-
_drawAndUnbindEffect(e, t, i, r, a, s) {
|
|
2588
|
-
const { profiler: n, context: o } = e;
|
|
2589
|
-
e.passOptions = a, n.recordBrushStart(t.name), t.draw(e, s), t.unbind(e, s), o.bindFramebuffer(r);
|
|
2590
|
-
const { x: l, y: h, width: c, height: d } = i;
|
|
2591
|
-
o.setViewport(l, h, c, d), n.recordBrushEnd(), n.recordPassEnd();
|
|
2592
|
-
}
|
|
2593
|
-
}
|
|
2594
|
-
class Ct {
|
|
2595
|
-
constructor() {
|
|
2596
|
-
this._programCache = /* @__PURE__ */ new Map();
|
|
2597
|
-
}
|
|
2598
|
-
destroy() {
|
|
2599
|
-
for (const e of this._programCache.values())
|
|
2600
|
-
e.destroy();
|
|
2601
|
-
this._programCache.clear();
|
|
2602
|
-
}
|
|
2603
|
-
getProgram(e, t, i, r, a) {
|
|
2604
|
-
const s = e.getShaderKey(t, i, r, a);
|
|
2605
|
-
let n = this._programCache.get(s);
|
|
2606
|
-
return n || (n = e.getProgram(t, i, r, a), this._programCache.set(s, n)), n;
|
|
2607
|
-
}
|
|
2608
|
-
}
|
|
2609
|
-
class Es {
|
|
2610
|
-
constructor(e, t) {
|
|
2611
|
-
this.context = e, this._currentPipelineStateNeedsUpdate = !1, this._blitRenderer = new Bt(), this._worldExtentRenderer = new rs(), this._brushCache = /* @__PURE__ */ new Map(), this._lastWidth = null, this._lastHeight = null, this._vtlMaterialManager = new Rr(), this._blendEffect = new ns(), this._stencilBuf = null, this._prevBeforeLayerFBOStack = [], this._fboPool = [], this.effects = { highlight: new hs(), hittest: new cs(), hittestVTL: new us(), integrate: new ss(), insideEffect: new Pt("inside"), outsideEffect: new Pt("outside") }, this._programCache = new Ct(), this._shaderState = { shader: null, uniforms: null, defines: null, optionalAttributes: null, useComputeBuffer: !1 }, this.materialManager = new zr(e), this.textureManager = new Yr(t), this.textureUploadManager = new ts(t), this._effectsManager = new Ts(), this._quadMesh = new Q(e, [0, 0, 1, 0, 0, 1, 1, 1]);
|
|
2612
|
-
}
|
|
2613
|
-
dispose() {
|
|
2614
|
-
if (this._programCache.destroy(), this.materialManager.dispose(), this.textureManager.dispose(), this.textureUploadManager.destroy(), this._blitRenderer = P(this._blitRenderer), this._worldExtentRenderer = P(this._worldExtentRenderer), this._quadMesh.dispose(), this._brushCache && (this._brushCache.forEach((e) => e.dispose()), this._brushCache.clear(), this._brushCache = null), this._fbos) {
|
|
2615
|
-
let e;
|
|
2616
|
-
for (e in this._fbos)
|
|
2617
|
-
this._fbos[e] && this._fbos[e].dispose();
|
|
2618
|
-
}
|
|
2619
|
-
for (const e of this._fboPool)
|
|
2620
|
-
e.dispose();
|
|
2621
|
-
if (this._fboPool.length = 0, this.effects) {
|
|
2622
|
-
let e;
|
|
2623
|
-
for (e in this.effects)
|
|
2624
|
-
this.effects[e] && this.effects[e].dispose();
|
|
2625
|
-
}
|
|
2626
|
-
this._effectsManager.dispose(), this._blendEffect.dispose(this.context), this._vtlMaterialManager = P(this._vtlMaterialManager);
|
|
2627
|
-
}
|
|
2628
|
-
clearShaderCache() {
|
|
2629
|
-
this._programCache.destroy(), this._programCache = new Ct();
|
|
2630
|
-
}
|
|
2631
|
-
get blitRenderer() {
|
|
2632
|
-
return this._blitRenderer;
|
|
2633
|
-
}
|
|
2634
|
-
get vectorTilesMaterialManager() {
|
|
2635
|
-
return this._vtlMaterialManager;
|
|
2636
|
-
}
|
|
2637
|
-
getFbos() {
|
|
2638
|
-
if (!this._fbos)
|
|
2639
|
-
throw new Error("InternalError: Painter FBOs not initialized");
|
|
2640
|
-
return this._fbos;
|
|
2641
|
-
}
|
|
2642
|
-
acquireFbo(e, t) {
|
|
2643
|
-
let i;
|
|
2644
|
-
if (this._fboPool.length > 0)
|
|
2645
|
-
i = this._fboPool.pop();
|
|
2646
|
-
else {
|
|
2647
|
-
const r = new R(e, t);
|
|
2648
|
-
r.samplingMode = L.NEAREST, r.wrapMode = E.CLAMP_TO_EDGE, i = new N(this.context, r, this._stencilBuf);
|
|
2649
|
-
}
|
|
2650
|
-
return i.width === e && i.height === t || i.resize(e, t), i;
|
|
2651
|
-
}
|
|
2652
|
-
releaseFbo(e) {
|
|
2653
|
-
this._fboPool.push(e);
|
|
2654
|
-
}
|
|
2655
|
-
getSharedStencilBuffer() {
|
|
2656
|
-
return this._stencilBuf;
|
|
2657
|
-
}
|
|
2658
|
-
beforeRenderPhases(e, t, i) {
|
|
2659
|
-
const { context: r } = e;
|
|
2660
|
-
this._worldExtentRenderer.render(e, t, i);
|
|
2661
|
-
const { width: a, height: s } = r.getViewport();
|
|
2662
|
-
if (this.updateFBOs(a, s), this._prevFBO = r.getBoundFramebufferObject(), r.bindFramebuffer(this.getFbos().output), r.setColorMask(!0, !0, !0, !0), t != null) {
|
|
2663
|
-
const { r: n, g: o, b: l, a: h } = t;
|
|
2664
|
-
r.setClearColor(h * n / 255, h * o / 255, h * l / 255, h);
|
|
2665
|
-
} else
|
|
2666
|
-
r.setClearColor(0, 0, 0, 0);
|
|
2667
|
-
r.setDepthWriteEnabled(!0), r.setClearDepth(1), r.clear(r.gl.COLOR_BUFFER_BIT | r.gl.DEPTH_BUFFER_BIT), r.setDepthWriteEnabled(!1);
|
|
2668
|
-
}
|
|
2669
|
-
afterRenderPhases(e) {
|
|
2670
|
-
const { context: t } = e;
|
|
2671
|
-
t.bindFramebuffer(this._prevFBO), t.setStencilFunction(De.EQUAL, 1, 255), t.setStencilTestEnabled(!0), t.setDepthTestEnabled(!1), this.blitTexture(t, this.getFbos().output.colorTexture, L.NEAREST);
|
|
2672
|
-
}
|
|
2673
|
-
beforeRenderLayer(e, t, i) {
|
|
2674
|
-
const { context: r, blendMode: a, effects: s, drawPhase: n, requireFBO: o } = e;
|
|
2675
|
-
if (o || Et(n, a, s, i)) {
|
|
2676
|
-
const l = r.getBoundFramebufferObject();
|
|
2677
|
-
this._prevBeforeLayerFBOStack.push(l);
|
|
2678
|
-
const { width: h, height: c } = r.getViewport(), d = this.acquireFbo(h, c);
|
|
2679
|
-
r.bindFramebuffer(d), r.setColorMask(!0, !0, !0, !0), r.setClearColor(0, 0, 0, 0), r.setDepthWriteEnabled(!0), r.setClearDepth(1), r.clear(r.gl.COLOR_BUFFER_BIT | r.gl.DEPTH_BUFFER_BIT), r.setDepthWriteEnabled(!1);
|
|
2680
|
-
}
|
|
2681
|
-
r.setDepthWriteEnabled(!1), r.setDepthTestEnabled(!1), r.setStencilTestEnabled(!0), r.setClearStencil(t), r.setStencilWriteMask(255), r.clear(r.gl.STENCIL_BUFFER_BIT);
|
|
2682
|
-
}
|
|
2683
|
-
afterRenderLayer(e, t) {
|
|
2684
|
-
const { context: i, blendMode: r, effects: a, requireFBO: s, drawPhase: n } = e;
|
|
2685
|
-
if (s || Et(n, r, a, t)) {
|
|
2686
|
-
const o = i.getBoundFramebufferObject();
|
|
2687
|
-
a != null && a.length > 0 && n === D.MAP && (i.setColorMask(!0, !0, !0, !0), this._applyEffects(e, a, o)), i.bindFramebuffer(this._prevBeforeLayerFBOStack.pop()), i.setStencilTestEnabled(!1), i.setStencilWriteMask(0), i.setBlendingEnabled(!0), i.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA), i.setColorMask(!0, !0, !0, !0);
|
|
2688
|
-
const l = r == null || n === D.HIGHLIGHT ? "normal" : r;
|
|
2689
|
-
this._blendEffect.draw(e, o.colorTexture, L.NEAREST, l, t), this.releaseFbo(o);
|
|
2690
|
-
}
|
|
2691
|
-
}
|
|
2692
|
-
renderObject(e, t, i, r) {
|
|
2693
|
-
const a = ht[i];
|
|
2694
|
-
if (!a)
|
|
2695
|
-
return;
|
|
2696
|
-
let s = this._brushCache.get(a);
|
|
2697
|
-
s === void 0 && (s = new a(), this._brushCache.set(a, s)), s.prepareState(e), s.draw(e, t, r);
|
|
2698
|
-
}
|
|
2699
|
-
renderObjects(e, t, i, r) {
|
|
2700
|
-
const a = ht[i];
|
|
2701
|
-
if (!a)
|
|
2702
|
-
return;
|
|
2703
|
-
let s = this._brushCache.get(a);
|
|
2704
|
-
s === void 0 && (s = new a(), this._brushCache.set(a, s)), s.drawMany(e, t, r);
|
|
2705
|
-
}
|
|
2706
|
-
registerRenderPass(e) {
|
|
2707
|
-
const t = e.brushes.map((i) => (this._brushCache.has(i) || this._brushCache.set(i, new i()), this._brushCache.get(i)));
|
|
2708
|
-
return new Cs(t, e);
|
|
2709
|
-
}
|
|
2710
|
-
blitTexture(e, t, i, r = 1) {
|
|
2711
|
-
e.setBlendingEnabled(!0), e.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA), e.setColorMask(!0, !0, !0, !0), this._blitRenderer.render(e, t, i, r), this._currentPipelineStateNeedsUpdate = !0;
|
|
2712
|
-
}
|
|
2713
|
-
getPostProcessingEffects(e) {
|
|
2714
|
-
return this._effectsManager.getPostProcessingEffects(e);
|
|
2715
|
-
}
|
|
2716
|
-
updateFBOs(e, t) {
|
|
2717
|
-
if (e !== this._lastWidth || t !== this._lastHeight) {
|
|
2718
|
-
if (this._lastWidth = e, this._lastHeight = t, this._fbos) {
|
|
2719
|
-
let a;
|
|
2720
|
-
for (a in this._fbos)
|
|
2721
|
-
this._fbos[a].resize(e, t);
|
|
2722
|
-
return;
|
|
2723
|
-
}
|
|
2724
|
-
const i = new R(e, t);
|
|
2725
|
-
i.samplingMode = L.NEAREST, i.wrapMode = E.CLAMP_TO_EDGE;
|
|
2726
|
-
const r = new Xe(We.DEPTH_STENCIL, e, t);
|
|
2727
|
-
this._stencilBuf = new ur(this.context, r), this._fbos = { output: new N(this.context, i, this._stencilBuf), effect0: new N(this.context, i, this._stencilBuf) };
|
|
2728
|
-
}
|
|
2729
|
-
}
|
|
2730
|
-
_applyEffects(e, t, i) {
|
|
2731
|
-
const { context: r } = e, a = this._effectsManager.getPostProcessingEffects(t);
|
|
2732
|
-
for (const { postProcessingEffect: s, effect: n } of a)
|
|
2733
|
-
r.bindFramebuffer(i), s.draw(e, i, n);
|
|
2734
|
-
this._currentPipelineStateNeedsUpdate = !0;
|
|
2735
|
-
}
|
|
2736
|
-
setShader(e) {
|
|
2737
|
-
this._shaderState.shader = e.shader, this._shaderState.uniforms = e.uniforms, this._shaderState.defines = e.defines, this._shaderState.optionalAttributes = e.optionalAttributes, this._shaderState.useComputeBuffer = e.useComputeBuffer ?? !1;
|
|
2738
|
-
}
|
|
2739
|
-
setPipelineState(e) {
|
|
2740
|
-
e !== this._currentPipelineState && (this._currentPipelineState = e, this._currentPipelineStateNeedsUpdate = !0);
|
|
2741
|
-
}
|
|
2742
|
-
submitDraw(e, t) {
|
|
2743
|
-
const { instance: i } = t, r = i.instanceId, { shader: a, uniforms: s, defines: n, optionalAttributes: o, useComputeBuffer: l } = this._shaderState, h = t.target.getMesh(r), c = { useComputeBuffer: l, locationInfo: a.locationInfo, computeAttributeMap: a.computeAttributes }, d = h.getLayout(c);
|
|
2744
|
-
if (d == null)
|
|
2745
|
-
return null;
|
|
2746
|
-
const { primitive: p, count: _, offset: f } = h.getDrawArgs(ne.TRIANGLES, t.count, t.start * Uint32Array.BYTES_PER_ELEMENT, l), g = this._programCache.getProgram(a, d, s, n ?? {}, o ?? {});
|
|
2747
|
-
g.setUniforms(s), g.bind(e), this.updatePipelineState(e), this._updateStencilRef(e, t.target);
|
|
2748
|
-
const y = h.getVAO(e, a.locationInfo, c);
|
|
2749
|
-
return e.bindVAO(y), e.drawElements(p, _, Le.UNSIGNED_INT, f), e.bindVAO(null), g.cleanupTemporaryTextures(), { vertexShader: g.vertexShader, fragmentShader: g.fragmentShader };
|
|
2750
|
-
}
|
|
2751
|
-
submitDrawQuad(e) {
|
|
2752
|
-
const { shader: t, uniforms: i, defines: r, optionalAttributes: a } = this._shaderState, s = this._programCache.getProgram(t, this._quadMesh.layout, i, r ?? {}, a ?? {});
|
|
2753
|
-
s.setUniforms(i), s.bind(e), this.updatePipelineState(e), this._updateStencilRef(e, null), this._quadMesh.draw(), e.bindVAO(null), s.cleanupTemporaryTextures();
|
|
2754
|
-
}
|
|
2755
|
-
submitDrawMesh(e, t, i) {
|
|
2756
|
-
const { shader: r, uniforms: a, defines: s, optionalAttributes: n } = this._shaderState, o = this._programCache.getProgram(r, t.layout, a, s ?? {}, n ?? {});
|
|
2757
|
-
if (o.setUniforms(a), o.bind(e), this.updatePipelineState(e), this._updateStencilRef(e, null), i)
|
|
2758
|
-
for (const l of i)
|
|
2759
|
-
t.bind(e, l), t.draw(e);
|
|
2760
|
-
else
|
|
2761
|
-
for (let l = 0; l < t.parts.length; l++)
|
|
2762
|
-
t.bind(e, l), t.draw(e);
|
|
2763
|
-
t.unbind(e), o.cleanupTemporaryTextures();
|
|
2764
|
-
}
|
|
2765
|
-
updatePipelineState(e) {
|
|
2766
|
-
this._currentPipelineStateNeedsUpdate && (this._currentPipelineStateNeedsUpdate = !1, this._updatePipelineState(e));
|
|
2767
|
-
}
|
|
2768
|
-
_updatePipelineState(e) {
|
|
2769
|
-
if (this._currentPipelineState == null)
|
|
2770
|
-
throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");
|
|
2771
|
-
const { color: t, depth: i, stencil: r } = this._currentPipelineState;
|
|
2772
|
-
if (t) {
|
|
2773
|
-
const { blendMode: a, write: s } = t;
|
|
2774
|
-
switch (e.setColorMask(...s), e.setBlendingEnabled(!0), e.setBlendEquation(ut.ADD), a) {
|
|
2775
|
-
case "composite":
|
|
2776
|
-
e.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA);
|
|
2777
|
-
break;
|
|
2778
|
-
case "additive":
|
|
2779
|
-
e.setBlendFunctionSeparate(v.ONE, v.ONE, v.ONE, v.ONE);
|
|
2780
|
-
break;
|
|
2781
|
-
case "custom": {
|
|
2782
|
-
const { blendParameters: n } = t, { dstAlpha: o, dstRGB: l, srcAlpha: h, srcRGB: c } = n;
|
|
2783
|
-
e.setBlendFunctionSeparate(c, l, h, o);
|
|
2784
|
-
break;
|
|
2785
|
-
}
|
|
2786
|
-
case "delete":
|
|
2787
|
-
e.setBlendEquation(ut.REVERSE_SUBTRACT), e.setBlendFunctionSeparate(v.ONE, v.ONE_MINUS_SRC_ALPHA, v.ONE, v.ONE_MINUS_SRC_ALPHA);
|
|
2788
|
-
}
|
|
2789
|
-
}
|
|
2790
|
-
if (i) {
|
|
2791
|
-
const { test: a, write: s } = i;
|
|
2792
|
-
s ? (e.setDepthWriteEnabled(!0), e.setDepthRange(s.zNear, s.zFar)) : e.setDepthWriteEnabled(!1), a ? (e.setDepthTestEnabled(!0), e.setDepthFunction(a)) : e.setDepthTestEnabled(!1);
|
|
2793
|
-
} else
|
|
2794
|
-
e.setDepthTestEnabled(!1), e.setDepthWriteEnabled(!1);
|
|
2795
|
-
if (r) {
|
|
2796
|
-
const { test: a, write: s } = r;
|
|
2797
|
-
if (a) {
|
|
2798
|
-
const { compare: n, mask: o, op: l, ref: h } = a;
|
|
2799
|
-
e.setStencilTestEnabled(!0), typeof h != "function" && e.setStencilFunctionSeparate(Be.FRONT_AND_BACK, n, h, o), e.setStencilOpSeparate(Be.FRONT_AND_BACK, l.fail, l.zFail, l.zPass);
|
|
2800
|
-
} else
|
|
2801
|
-
e.setStencilTestEnabled(!1);
|
|
2802
|
-
if (s) {
|
|
2803
|
-
const { mask: n } = s;
|
|
2804
|
-
e.setStencilWriteMask(n);
|
|
2805
|
-
} else
|
|
2806
|
-
e.setStencilWriteMask(0);
|
|
2807
|
-
} else
|
|
2808
|
-
e.setStencilTestEnabled(!1), e.setStencilWriteMask(0);
|
|
2809
|
-
}
|
|
2810
|
-
_updateStencilRef(e, t) {
|
|
2811
|
-
if (this._currentPipelineState == null)
|
|
2812
|
-
throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");
|
|
2813
|
-
const { stencil: i } = this._currentPipelineState;
|
|
2814
|
-
if (i) {
|
|
2815
|
-
const { test: r } = i;
|
|
2816
|
-
if (r) {
|
|
2817
|
-
const { compare: a, mask: s, ref: n } = r;
|
|
2818
|
-
typeof n == "function" && e.setStencilFunctionSeparate(Be.FRONT_AND_BACK, a, n(t), s);
|
|
2819
|
-
}
|
|
2820
|
-
}
|
|
2821
|
-
}
|
|
2822
|
-
}
|
|
2823
|
-
function Et(u, e, t, i) {
|
|
2824
|
-
return u !== D.LABEL_ALPHA && u !== D.LABEL && u !== D.HIGHLIGHT && (i !== 1 || e != null && e !== "normal" || t != null && t.length > 0);
|
|
2825
|
-
}
|
|
2826
|
-
let Rs = class {
|
|
2827
|
-
constructor() {
|
|
2828
|
-
this._candidateTiles = [];
|
|
2829
|
-
}
|
|
2830
|
-
schedule(e) {
|
|
2831
|
-
this._candidateTiles.includes(e) || this._candidateTiles.push(e);
|
|
2832
|
-
}
|
|
2833
|
-
reshuffle(e) {
|
|
2834
|
-
const t = [];
|
|
2835
|
-
for (const i of this._candidateTiles)
|
|
2836
|
-
e > 0 ? (i.reshuffle(), e--) : t.push(i);
|
|
2837
|
-
this._candidateTiles = t;
|
|
2838
|
-
}
|
|
2839
|
-
};
|
|
2840
|
-
const zs = 2e3;
|
|
2841
|
-
class xn extends Ui {
|
|
2842
|
-
constructor(e, t) {
|
|
2843
|
-
super(), this._trash = /* @__PURE__ */ new Set(), this._renderRemainingTime = 0, this._lastFrameRenderTime = 0, this._renderRequested = ai(!1), this.stage = this, this._stationary = !0, this._reshuffleManager = new Rs(), this._canvas = new vr(e), this.context = new tr(this._canvas.gl, t.contextOptions ?? {}), this.painter = new Es(this.context, this), this._cimAnalyzer = new fr(this.painter.textureManager.resourceManager), H("esri-2d-profiler") && (this._debugOutput = document.createElement("div"), this._debugOutput.setAttribute("style", "margin: 24px 64px; position: absolute; color: red;"), e.appendChild(this._debugOutput));
|
|
2844
|
-
const i = () => this._highlightGradient;
|
|
2845
|
-
this._renderParameters = { drawPhase: 0, state: this.state, pixelRatio: window.devicePixelRatio, stationary: !1, globalOpacity: 1, blendMode: null, deltaTime: -1, time: 0, inFadeTransition: !1, effects: null, context: this.context, painter: this.painter, timeline: t.timeline || new ni(), renderingOptions: t.renderingOptions, requestRender: () => this.requestRender(), allowDelayedRender: !1, requireFBO: !1, profiler: new Ki(this.context, this._debugOutput), dataUploadCounter: 0, get highlightGradient() {
|
|
2846
|
-
return i();
|
|
2847
|
-
}, reshuffleManager: this._reshuffleManager, backgroundColor: t.backgroundColor }, this._taskHandle = oi({ render: (r) => this.renderFrame(r) }), this._taskHandle.pause(), this._lostWebGLContextHandle = this._canvas.events.on("webgl-context-lost", (r) => this.emit("webgl-error", { error: new re("webgl-context-lost", r.statusMessage) })), this._bufferPool = new Hi(), dr();
|
|
2848
|
-
}
|
|
2849
|
-
destroy() {
|
|
2850
|
-
var e, t;
|
|
2851
|
-
pr(this.context), this.removeAllChildren(), this._emptyTrash(), this._taskHandle = Ze(this._taskHandle), this._lostWebGLContextHandle = Ze(this._lostWebGLContextHandle), this._canvas.destroy(), (t = (e = this._debugOutput) == null ? void 0 : e.parentNode) == null || t.removeChild(this._debugOutput), this._bufferPool.destroy(), this.painter.dispose(), this.context.dispose(), this._canvas = null;
|
|
2852
|
-
}
|
|
2853
|
-
get textureManager() {
|
|
2854
|
-
return this.painter.textureManager;
|
|
2855
|
-
}
|
|
2856
|
-
get backgroundColor() {
|
|
2857
|
-
return this._renderParameters.backgroundColor;
|
|
2858
|
-
}
|
|
2859
|
-
set backgroundColor(e) {
|
|
2860
|
-
this._renderParameters.backgroundColor = e, this.requestRender();
|
|
2861
|
-
}
|
|
2862
|
-
get bufferPool() {
|
|
2863
|
-
return this._bufferPool;
|
|
2864
|
-
}
|
|
2865
|
-
get cimAnalyzer() {
|
|
2866
|
-
return this._cimAnalyzer;
|
|
2867
|
-
}
|
|
2868
|
-
get renderingOptions() {
|
|
2869
|
-
return this._renderingOptions;
|
|
2870
|
-
}
|
|
2871
|
-
set renderingOptions(e) {
|
|
2872
|
-
this._renderingOptions = e, this.requestRender();
|
|
2873
|
-
}
|
|
2874
|
-
get renderRequested() {
|
|
2875
|
-
return this._renderRequested.value;
|
|
2876
|
-
}
|
|
2877
|
-
get state() {
|
|
2878
|
-
return this._state;
|
|
2879
|
-
}
|
|
2880
|
-
set state(e) {
|
|
2881
|
-
this._state = e, this.requestRender();
|
|
2882
|
-
}
|
|
2883
|
-
get stationary() {
|
|
2884
|
-
return this._stationary;
|
|
2885
|
-
}
|
|
2886
|
-
set stationary(e) {
|
|
2887
|
-
this._stationary !== e && (this._stationary = e, this.requestRender());
|
|
2888
|
-
}
|
|
2889
|
-
trashDisplayObject(e) {
|
|
2890
|
-
this._trash.add(e), this.requestRender();
|
|
2891
|
-
}
|
|
2892
|
-
untrashDisplayObject(e) {
|
|
2893
|
-
return this._trash.delete(e);
|
|
2894
|
-
}
|
|
2895
|
-
requestRender() {
|
|
2896
|
-
this._renderRemainingTime = zs, this.renderRequested || (this._renderRequested.value = !0, this._taskHandle.resume());
|
|
2897
|
-
}
|
|
2898
|
-
renderFrame(e) {
|
|
2899
|
-
const t = this._lastFrameRenderTime ? e.time - this._lastFrameRenderTime : 0;
|
|
2900
|
-
this._renderRemainingTime -= t, this._renderRemainingTime <= 0 && this._taskHandle.pause(), this._lastFrameRenderTime = e.time, this._renderRequested.value = !1, this._renderParameters.state = this._state, this._renderParameters.stationary = this.stationary, this._renderParameters.pixelRatio = window.devicePixelRatio, this._renderParameters.globalOpacity = 1, this._renderParameters.time = e.time, this._renderParameters.deltaTime = e.deltaTime, this._renderParameters.effects = null, this.processRender(this._renderParameters), this._emptyTrash();
|
|
2901
|
-
}
|
|
2902
|
-
_createTransforms() {
|
|
2903
|
-
return { displayViewScreenMat3: Ve() };
|
|
2904
|
-
}
|
|
2905
|
-
renderChildren(e) {
|
|
2906
|
-
for (const t of this.children)
|
|
2907
|
-
t.beforeRender(e);
|
|
2908
|
-
this._reshuffleManager.reshuffle(Di), this._canvas.render(e, () => this._renderChildren(this.children, e));
|
|
2909
|
-
for (const t of this.children)
|
|
2910
|
-
t.afterRender(e);
|
|
2911
|
-
}
|
|
2912
|
-
_renderChildren(e, t) {
|
|
2913
|
-
const i = this.context;
|
|
2914
|
-
this.painter.textureUploadManager.upload(), i.resetInfo(), t.profiler.recordStart("drawLayers"), t.dataUploadCounter = 0, this.painter.beforeRenderPhases(t, t.backgroundColor, this.state.padding), t.drawPhase = D.MAP;
|
|
2915
|
-
for (const r of e)
|
|
2916
|
-
r.processRender(t);
|
|
2917
|
-
if (this.children.some((r) => r.hasHighlight)) {
|
|
2918
|
-
t.drawPhase = D.HIGHLIGHT;
|
|
2919
|
-
for (const r of e)
|
|
2920
|
-
r.processRender(t);
|
|
2921
|
-
}
|
|
2922
|
-
if (this.children.some((r) => r.hasLabels)) {
|
|
2923
|
-
t.drawPhase = D.LABEL;
|
|
2924
|
-
for (const r of e)
|
|
2925
|
-
r.processRender(t);
|
|
2926
|
-
}
|
|
2927
|
-
if (H("esri-tiles-debug")) {
|
|
2928
|
-
t.drawPhase = D.DEBUG;
|
|
2929
|
-
for (const r of e)
|
|
2930
|
-
r.processRender(t);
|
|
2931
|
-
}
|
|
2932
|
-
this.painter.afterRenderPhases(t), t.profiler.recordEnd("drawLayers"), i.logInfo();
|
|
2933
|
-
}
|
|
2934
|
-
doRender(e) {
|
|
2935
|
-
const t = this.context, { state: i, pixelRatio: r } = e;
|
|
2936
|
-
this._canvas.resize(e), t.setViewport(0, 0, r * i.size[0], r * i.size[1]), t.setDepthWriteEnabled(!0), t.setStencilWriteMask(255), this.renderChildren(e);
|
|
2937
|
-
}
|
|
2938
|
-
async takeScreenshot(e, t, i, r) {
|
|
2939
|
-
const a = Math.round(this.state.size[0] * e.resolutionScale), s = Math.round(this.state.size[1] * e.resolutionScale), n = e.resolutionScale, o = this.context, l = this._state.clone();
|
|
2940
|
-
if (r != null) {
|
|
2941
|
-
const m = l.viewpoint;
|
|
2942
|
-
l.viewpoint.rotation = r, l.viewpoint = m;
|
|
2943
|
-
}
|
|
2944
|
-
const h = { ...this._renderParameters, drawPhase: null, globalOpacity: 1, stationary: !0, state: l, pixelRatio: n, time: performance.now(), deltaTime: 0, blendMode: null, effects: null, inFadeTransition: !1, backgroundColor: i }, c = new R(a, s);
|
|
2945
|
-
c.wrapMode = E.CLAMP_TO_EDGE, c.internalFormat = Zi.RGBA8, c.isImmutable = !0;
|
|
2946
|
-
const d = new N(o, c, new Xe(We.DEPTH_STENCIL, a, s)), p = o.getBoundFramebufferObject(), _ = o.getViewport();
|
|
2947
|
-
o.bindFramebuffer(d), o.setViewport(0, 0, a, s), this._renderChildren(t ?? this.children, h);
|
|
2948
|
-
const f = this._readbackScreenshot(d, { ...e.cropArea, y: s - (e.cropArea.y + e.cropArea.height) });
|
|
2949
|
-
o.bindFramebuffer(p), o.setViewport(_.x, _.y, _.width, _.height), this.requestRender();
|
|
2950
|
-
const g = await f;
|
|
2951
|
-
let y;
|
|
2952
|
-
return e.outputScale === 1 ? y = g : (y = new ImageData(Math.round(g.width * e.outputScale), Math.round(g.height * e.outputScale)), li(g, y, !0)), d.dispose(), y;
|
|
2953
|
-
}
|
|
2954
|
-
async _readbackScreenshot(e, t) {
|
|
2955
|
-
const i = rr(t.width, t.height, document.createElement("canvas"));
|
|
2956
|
-
return await e.readPixelsAsync(t.x, t.y, t.width, t.height, C.RGBA, qe.UNSIGNED_BYTE, new Uint8Array(i.data.buffer)), i;
|
|
2957
|
-
}
|
|
2958
|
-
_emptyTrash() {
|
|
2959
|
-
for (; this._trash.size > 0; ) {
|
|
2960
|
-
const e = Array.from(this._trash);
|
|
2961
|
-
this._trash.clear();
|
|
2962
|
-
for (const t of e)
|
|
2963
|
-
t.processDetach();
|
|
2964
|
-
}
|
|
2965
|
-
}
|
|
2966
|
-
}
|
|
2967
|
-
async function Fs(u) {
|
|
2968
|
-
const e = import("./mask-svg-30f64a7b.js"), t = import("./overlay-svg-c3941b3b.js"), i = _t((await e).default, { signal: u }), r = _t((await t).default, { signal: u }), a = { mask: await i, overlay: await r };
|
|
2969
|
-
return Ue(u), a;
|
|
2970
|
-
}
|
|
2971
|
-
class Mn extends Vi {
|
|
2972
|
-
constructor() {
|
|
2973
|
-
super(), this._handles = new hi(), this._resourcePixelRatio = 1, this.visible = !1;
|
|
2974
|
-
}
|
|
2975
|
-
destroy() {
|
|
2976
|
-
this._handles = ci(this._handles), this._disposeRenderResources(), this._resourcesTask = ui(this._resourcesTask);
|
|
2977
|
-
}
|
|
2978
|
-
get backgroundColor() {
|
|
2979
|
-
return this._backgroundColor;
|
|
2980
|
-
}
|
|
2981
|
-
set backgroundColor(e) {
|
|
2982
|
-
this._backgroundColor = e, this.requestRender();
|
|
2983
|
-
}
|
|
2984
|
-
get magnifier() {
|
|
2985
|
-
return this._magnifier;
|
|
2986
|
-
}
|
|
2987
|
-
set magnifier(e) {
|
|
2988
|
-
this._magnifier = e, this._handles.removeAll(), this._handles.add([Ee(() => e.version, () => {
|
|
2989
|
-
this.visible = e.visible && e.position != null && e.size > 0, this.requestRender();
|
|
2990
|
-
}, di), Ee(() => [e.maskUrl, e.overlayUrl], () => this._reloadResources()), Ee(() => e.size, () => {
|
|
2991
|
-
this._disposeRenderResources(), this.requestRender();
|
|
2992
|
-
})]);
|
|
2993
|
-
}
|
|
2994
|
-
_createTransforms() {
|
|
2995
|
-
return { displayViewScreenMat3: Ve() };
|
|
2996
|
-
}
|
|
2997
|
-
doRender(e) {
|
|
2998
|
-
const t = e.context;
|
|
2999
|
-
if (!this._resourcesTask)
|
|
3000
|
-
return void this._reloadResources();
|
|
3001
|
-
if (e.drawPhase !== D.MAP || !this._canRender())
|
|
3002
|
-
return;
|
|
3003
|
-
this._updateResources(e);
|
|
3004
|
-
const i = this._magnifier;
|
|
3005
|
-
if (i.position == null)
|
|
3006
|
-
return;
|
|
3007
|
-
const r = e.pixelRatio, a = i.size * r, s = 1 / i.factor, n = Math.ceil(s * a);
|
|
3008
|
-
this._readbackTexture.resize(n, n);
|
|
3009
|
-
const { size: o } = e.state, l = r * o[0], h = r * o[1], c = 0.5 * n, d = 0.5 * n, p = et(r * i.position.x, c, l - c - 1), _ = et(h - r * i.position.y, d, h - d - 1);
|
|
3010
|
-
t.setBlendingEnabled(!0);
|
|
3011
|
-
const f = p - c, g = _ - d, y = this._readbackTexture;
|
|
3012
|
-
t.bindTexture(y, 0), t.gl.copyTexImage2D(y.descriptor.target, 0, y.descriptor.pixelFormat, f, g, n, n, 0);
|
|
3013
|
-
const m = this.backgroundColor, M = m ? [m.a * m.r / 255, m.a * m.g / 255, m.a * m.b / 255, m.a] : [1, 1, 1, 1], w = (p + i.offset.x * r) / l * 2 - 1, x = (_ - i.offset.y * r) / h * 2 - 1, b = a / l * 2, T = a / h * 2, S = this._program;
|
|
3014
|
-
t.bindVAO(this._vertexArrayObject), t.bindTexture(this._overlayTexture, 6), t.bindTexture(this._maskTexture, 7), t.useProgram(S), S.setUniform4fv("u_background", M), S.setUniform1i("u_readbackTexture", 0), S.setUniform1i("u_overlayTexture", 6), S.setUniform1i("u_maskTexture", 7), S.setUniform4f("u_drawPos", w, x, b, T), S.setUniform1i("u_maskEnabled", i.maskEnabled ? 1 : 0), S.setUniform1i("u_overlayEnabled", i.overlayEnabled ? 1 : 0), t.setStencilTestEnabled(!1), t.setColorMask(!0, !0, !0, !0), t.drawArrays(ne.TRIANGLE_STRIP, 0, 4), t.bindVAO();
|
|
3015
|
-
}
|
|
3016
|
-
_canRender() {
|
|
3017
|
-
return this.mask && this.overlay && this._magnifier != null;
|
|
3018
|
-
}
|
|
3019
|
-
_reloadResources() {
|
|
3020
|
-
this._resourcesTask && this._resourcesTask.abort();
|
|
3021
|
-
const e = this._magnifier != null ? this._magnifier.maskUrl : null, t = this._magnifier != null ? this._magnifier.overlayUrl : null;
|
|
3022
|
-
this._resourcesTask = pi(async (i) => {
|
|
3023
|
-
const r = e == null || t == null ? Fs(i) : null, a = e != null ? de(e, { responseType: "image", signal: i }).then((l) => l.data) : r.then((l) => l.mask), s = t != null ? de(t, { responseType: "image", signal: i }).then((l) => l.data) : r.then((l) => l.overlay), [n, o] = await Promise.all([a, s]);
|
|
3024
|
-
this.mask = n, this.overlay = o, this._disposeRenderResources(), this.requestRender();
|
|
3025
|
-
});
|
|
3026
|
-
}
|
|
3027
|
-
_disposeRenderResources() {
|
|
3028
|
-
this._readbackTexture = P(this._readbackTexture), this._overlayTexture = P(this._overlayTexture), this._maskTexture = P(this._maskTexture), this._vertexArrayObject = P(this._vertexArrayObject), this._program = P(this._program);
|
|
3029
|
-
}
|
|
3030
|
-
_updateResources(e) {
|
|
3031
|
-
if (e.pixelRatio !== this._resourcePixelRatio && this._disposeRenderResources(), this._readbackTexture)
|
|
3032
|
-
return;
|
|
3033
|
-
const t = e.context;
|
|
3034
|
-
this._resourcePixelRatio = e.pixelRatio;
|
|
3035
|
-
const i = Math.ceil(this._magnifier.size * e.pixelRatio);
|
|
3036
|
-
this._program = Ji(t);
|
|
3037
|
-
const r = new Uint16Array([0, 1, 0, 0, 1, 1, 1, 0]), a = Qi.attributes;
|
|
3038
|
-
this._vertexArrayObject = new je(t, a, Wi, { geometry: Ge.createVertex(t, He.STATIC_DRAW, r) }), this.overlay.width = i, this.overlay.height = i;
|
|
3039
|
-
const s = new R();
|
|
3040
|
-
s.internalFormat = C.RGBA, s.wrapMode = E.CLAMP_TO_EDGE, s.samplingMode = L.NEAREST, s.flipped = !0, s.preMultiplyAlpha = !_i(this.overlay.src) || !e.context.driverTest.svgPremultipliesAlpha.result, this._overlayTexture = new X(t, s, this.overlay), this.mask.width = i, this.mask.height = i, s.pixelFormat = s.internalFormat = C.ALPHA, this._maskTexture = new X(t, s, this.mask);
|
|
3041
|
-
const n = 1 / this._magnifier.factor;
|
|
3042
|
-
s.pixelFormat = s.internalFormat = C.RGBA, s.width = s.height = Math.ceil(n * i), s.samplingMode = L.LINEAR, s.flipped = !1, this._readbackTexture = new X(t, s);
|
|
3043
|
-
}
|
|
3044
|
-
}
|
|
3045
|
-
export {
|
|
3046
|
-
zn as GraphicContainer,
|
|
3047
|
-
En as GraphicsView2D,
|
|
3048
|
-
Pn as LabelManager,
|
|
3049
|
-
Mn as MagnifierView2D,
|
|
3050
|
-
Tn as MapViewNavigation,
|
|
3051
|
-
xn as Stage
|
|
3052
|
-
};
|