@arcgis/core 6.0.0-next.41 → 6.0.0-next.43
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/Basemap.js +1 -1
- package/Camera.js +1 -1
- package/Graphic.js +1 -1
- package/Ground.js +1 -1
- package/WebDocument2D.js +1 -1
- package/WebScene.js +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +1 -0
- package/analysis/ElevationProfileAnalysis.d.ts +15 -0
- package/analysis/LineOfSightAnalysis.d.ts +6 -1
- package/analysis/ShadowCastAnalysis.d.ts +18 -22
- package/analysis/ShadowCastAnalysis.js +1 -1
- package/analysis/ViewshedAnalysis.d.ts +6 -1
- package/applications/Components/analysisUtils.d.ts +6 -0
- package/applications/Components/analysisUtils.js +1 -1
- package/arcade/ArcadeModuleResolver.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcgisGlobal.d.ts +0 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{2f54e4feb554c1a7b9c4.js → 02debe67e6fef9d88bdd.js} +1 -1
- package/assets/esri/core/workers/chunks/{bd046399e05e759e0bc2.js → 035204000954973b0ebc.js} +1 -1
- package/assets/esri/core/workers/chunks/05225506fdba0c827407.js +1 -0
- package/assets/esri/core/workers/chunks/075fe33152fd79fe6d72.js +1 -0
- package/assets/esri/core/workers/chunks/077b755688346e0dc8d3.js +1 -0
- package/assets/esri/core/workers/chunks/0c1d8e0c2eae21f97fc0.js +1 -0
- package/assets/esri/core/workers/chunks/105865a4d8cb4ddf8a8a.js +1 -0
- package/assets/esri/core/workers/chunks/11877d4dc97f756e4711.js +1 -0
- package/assets/esri/core/workers/chunks/{afe3e89737fb45189a99.js → 14ed0c34b910eba3434e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f67b37253d6d05d1e339.js → 14ef986665b4a1f6ccdc.js} +1 -1
- package/assets/esri/core/workers/chunks/158cbf4075d3eca83a6a.js +1 -0
- package/assets/esri/core/workers/chunks/{a03f15f2cbc3fed291c2.js → 15f2b27b8edc0d53e399.js} +1 -1
- package/assets/esri/core/workers/chunks/181d24ced5ef6b1f959b.js +1 -0
- package/assets/esri/core/workers/chunks/18dbee576b7b9dbe69fb.js +1 -0
- package/assets/esri/core/workers/chunks/1aebb8fe0692058bf2fb.js +1 -0
- package/assets/esri/core/workers/chunks/1cdb55d9a5ab1a5e3f08.js +1 -0
- package/assets/esri/core/workers/chunks/{cf2e5f827cea7d7319ce.js → 1e5c5029b0653047a769.js} +1 -1
- package/assets/esri/core/workers/chunks/20db6e844708d3e71437.js +1 -0
- package/assets/esri/core/workers/chunks/21a4c3d8265aca775616.js +1 -0
- package/assets/esri/core/workers/chunks/23fff0505e02fd364909.js +1 -0
- package/assets/esri/core/workers/chunks/{14d81280807a3d3c1b7e.js → 244ffdb91237d1cbade3.js} +1 -1
- package/assets/esri/core/workers/chunks/286e3e050b29e6158e6f.js +1 -0
- package/assets/esri/core/workers/chunks/29ef9d357e30082d267a.js +1 -0
- package/assets/esri/core/workers/chunks/29feef121b0916fb90bf.js +1 -0
- package/assets/esri/core/workers/chunks/2ef91e8da260454f46d8.js +1 -0
- package/assets/esri/core/workers/chunks/32b9bedd4bb0504f0b1d.js +1 -0
- package/assets/esri/core/workers/chunks/348f28d7ab46df878c6f.js +1 -0
- package/assets/esri/core/workers/chunks/{279089a6a3f08022c678.js → 361d620b3f91868b1490.js} +1 -1
- package/assets/esri/core/workers/chunks/37c16e20f022ca27cdae.js +1 -0
- package/assets/esri/core/workers/chunks/380aefa522dfeccb8c65.js +1 -0
- package/assets/esri/core/workers/chunks/394ae3199c78a94c6a2a.js +1 -0
- package/assets/esri/core/workers/chunks/39c23a52d7c3e1ee121c.js +1 -0
- package/assets/esri/core/workers/chunks/{fdd2b35388f9fe42b623.js → 3a90b6eafa92f1a68ac5.js} +1 -1
- package/assets/esri/core/workers/chunks/{6a65fc1a2931230fe994.js → 3bb1e06861cd0563ed9f.js} +1 -1
- package/assets/esri/core/workers/chunks/3f92afa58c895bf87e62.js +1 -0
- package/assets/esri/core/workers/chunks/422784ceae0d511868a0.js +1 -0
- package/assets/esri/core/workers/chunks/44782e8318dc47cb08a0.js +1 -0
- package/assets/esri/core/workers/chunks/{5882f349f3771868e67f.js → 4521f72ab0ea872e5d7c.js} +1 -1
- package/assets/esri/core/workers/chunks/45b5a61c4e9fbd9ca0b3.js +1 -0
- package/assets/esri/core/workers/chunks/47af220003adfca2167e.js +1 -0
- package/assets/esri/core/workers/chunks/487500443a6037d3599f.js +1 -0
- package/assets/esri/core/workers/chunks/4a4fab74442c3d914505.js +1 -0
- package/assets/esri/core/workers/chunks/4a8903fb1a5d30a68df9.js +1 -0
- package/assets/esri/core/workers/chunks/{46504fc81f357bc7465a.js → 4d62877f521cc9663535.js} +1 -1
- package/assets/esri/core/workers/chunks/4d818b231e6d1fa73cc5.js +1 -0
- package/assets/esri/core/workers/chunks/{e0cf6e1e21d0ee739009.js → 4e03aa5518d46a36661c.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a614bac5db42c6263f8.js → 4fe10650ba3cd30aa9a2.js} +1 -1
- package/assets/esri/core/workers/chunks/50b8b1cce0a5f77c8372.js +1 -0
- package/assets/esri/core/workers/chunks/5470a29a69010c8361c4.js +1 -0
- package/assets/esri/core/workers/chunks/564d7f2e58fbc16853c0.js +1 -0
- package/assets/esri/core/workers/chunks/5c2e79f2ca401741bf3e.js +1 -0
- package/assets/esri/core/workers/chunks/5c9ab86bec07264dc9f2.js +1 -0
- package/assets/esri/core/workers/chunks/{04d55ed51e8b2683c4b4.js → 5d908a823b324bafda1e.js} +1 -1
- package/assets/esri/core/workers/chunks/{54de7dc0597fc80d7a52.js → 5dea74fe52583e77f3ce.js} +1 -1
- package/assets/esri/core/workers/chunks/5e6d6676a5c47c0e132a.js +1 -0
- package/assets/esri/core/workers/chunks/5fd4d3cb3c9350131a59.js +1 -0
- package/assets/esri/core/workers/chunks/60637f38159e9bf68d4e.js +1 -0
- package/assets/esri/core/workers/chunks/69b73251257088ce7099.js +1 -0
- package/assets/esri/core/workers/chunks/6cd17c3a254a0b5c2476.js +1 -0
- package/assets/esri/core/workers/chunks/{06102715e9a8f218e07c.js → 6f3732e7ba2d031ba789.js} +1 -1
- package/assets/esri/core/workers/chunks/7191ab31fa040a7c561e.js +1 -0
- package/assets/esri/core/workers/chunks/71ba848c3352ea3ff96f.js +1 -0
- package/assets/esri/core/workers/chunks/76dc8e3264a456f33e61.js +1 -0
- package/assets/esri/core/workers/chunks/77d80b6d65d761214a7c.js +1 -0
- package/assets/esri/core/workers/chunks/{e2430bc3a1edeb5c3266.js → 78a69594c82d37aecbfb.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ec772eaa63eb6937231.js → 8140ed6e44c3d8536d3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{787c1a8bda7d745633f2.js → 81b9894e81cce3490984.js} +1 -1
- package/assets/esri/core/workers/chunks/85cd525705eec6803dd3.js +1 -0
- package/assets/esri/core/workers/chunks/863f04cacdc843d3f208.js +1 -0
- package/assets/esri/core/workers/chunks/8766832c7253557da8fe.js +1 -0
- package/assets/esri/core/workers/chunks/87992070008812f8ae6f.js +1 -0
- package/assets/esri/core/workers/chunks/892fd2c3533ce46a9258.js +1 -0
- package/assets/esri/core/workers/chunks/89b9d716d96135d4f057.js +1 -0
- package/assets/esri/core/workers/chunks/{4b2d392ad8e381bfd6b3.js → 89e9ebc8d5c1022cb265.js} +1 -1
- package/assets/esri/core/workers/chunks/8b38798ac6d774185238.js +1 -0
- package/assets/esri/core/workers/chunks/8b53369cace136ed1329.js +1 -0
- package/assets/esri/core/workers/chunks/8ba4f5e1912edf397947.js +1 -0
- package/assets/esri/core/workers/chunks/{987424121cf30b0f3c50.js → 8d3e92a3367a3ddc02bd.js} +1 -1
- package/assets/esri/core/workers/chunks/8e7a3b1b088c160f4db7.js +1 -0
- package/assets/esri/core/workers/chunks/8f4fba4d2339c91c8b3f.js +1 -0
- package/assets/esri/core/workers/chunks/{45aaefbdffe5e15dfb24.js → 919a6aedf38e9631ee09.js} +1 -1
- package/assets/esri/core/workers/chunks/{487c46d5245cfb35c4bb.js → 921917e53bac82693ec8.js} +1 -1
- package/assets/esri/core/workers/chunks/92809b209b68abcb97ee.js +1 -0
- package/assets/esri/core/workers/chunks/{beccbfff549902733c4e.js → 9869c696e6321c8db0a9.js} +1 -1
- package/assets/esri/core/workers/chunks/98957dba728c93506e50.js +1 -0
- package/assets/esri/core/workers/chunks/99ffb839407cb3c26ad8.js +1 -0
- package/assets/esri/core/workers/chunks/9b517c8d26a86dedb921.js +1 -0
- package/assets/esri/core/workers/chunks/{cb2329d1ea72ce5cc057.js → 9c3f56f22e9baa80a387.js} +1 -1
- package/assets/esri/core/workers/chunks/9d0976f5979c4f9154dc.js +1 -0
- package/assets/esri/core/workers/chunks/9fe1812aad6e566aea31.js +1 -0
- package/assets/esri/core/workers/chunks/a1602995ef96beb7df29.js +1 -0
- package/assets/esri/core/workers/chunks/{dff845574c0037a1dca6.js → a332e31165b65a6fb92e.js} +1 -1
- package/assets/esri/core/workers/chunks/a553478664a688f32488.js +1 -0
- package/assets/esri/core/workers/chunks/a7937b06f4b0860c7671.js +1 -0
- package/assets/esri/core/workers/chunks/a95186214f1206efd8ed.js +1 -0
- package/assets/esri/core/workers/chunks/{853563c66ecf58d53d36.js → ab60e8fbe0f92340616a.js} +1 -1
- package/assets/esri/core/workers/chunks/acea0946049136578354.js +1 -0
- package/assets/esri/core/workers/chunks/{342a97974a78007b25e0.js → ad94f54b4c88b3a047bc.js} +1 -1
- package/assets/esri/core/workers/chunks/ae29fec228e70a93ced1.js +1 -0
- package/assets/esri/core/workers/chunks/ae6dc159be974ca0e8da.js +1 -0
- package/assets/esri/core/workers/chunks/ae70972bf88d586fd453.js +1 -0
- package/assets/esri/core/workers/chunks/b021fa4654ede1d04279.js +1 -0
- package/assets/esri/core/workers/chunks/b03f32f02858244c6cd0.js +1 -0
- package/assets/esri/core/workers/chunks/b2d922ecc2c4899dbee1.js +1 -0
- package/assets/esri/core/workers/chunks/b42e50ec6b819f669400.js +1 -0
- package/assets/esri/core/workers/chunks/b6a82775b83d20599635.js +1 -0
- package/assets/esri/core/workers/chunks/b6d365b9198b74b05338.js +1 -0
- package/assets/esri/core/workers/chunks/bc21241bc9acb83d1b1c.js +1 -0
- package/assets/esri/core/workers/chunks/bd02d927b0b4991b61c5.js +1 -0
- package/assets/esri/core/workers/chunks/bdf1c4c038d556527483.js +1 -0
- package/assets/esri/core/workers/chunks/c1273f14a5ef3d81de0d.js +1 -0
- package/assets/esri/core/workers/chunks/c752f1e732bb019f657d.js +1 -0
- package/assets/esri/core/workers/chunks/{5504ec9bd9ee4d10af07.js → c7f49493bd548d5dc1e0.js} +1 -1
- package/assets/esri/core/workers/chunks/c86d3af148b28ded5875.js +1121 -0
- package/assets/esri/core/workers/chunks/{692f0093c444fcc752b5.js → cadd60fa4370284c7ae3.js} +1 -1
- package/assets/esri/core/workers/chunks/{947f3a1cad976bba9738.js → cb62326b6526cde429c1.js} +1 -1
- package/assets/esri/core/workers/chunks/cd8304b1db83d48c57db.js +1 -0
- package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +1 -0
- package/assets/esri/core/workers/chunks/d00dd961a5b79f563123.js +1 -0
- package/assets/esri/core/workers/chunks/d893c3bb093104d3db95.js +1 -0
- package/assets/esri/core/workers/chunks/d8fb1d9da16492574a11.js +1 -0
- package/assets/esri/core/workers/chunks/{520f499d79fa71f262c7.js → dd7e4c94a88452425750.js} +1 -1
- package/assets/esri/core/workers/chunks/ddb4689624d091922471.js +1 -0
- package/assets/esri/core/workers/chunks/df32a3fe81d60f0d7462.js +1 -0
- package/assets/esri/core/workers/chunks/dfc6b33f51dc81f3a7be.js +1 -0
- package/assets/esri/core/workers/chunks/e55934eb4a17a5b24c94.js +1 -0
- package/assets/esri/core/workers/chunks/{5473409fee59db80f87d.js → e5bdfef7c2cc5354be52.js} +1 -1
- package/assets/esri/core/workers/chunks/e8cdec961e9cff1cb73b.js +1 -0
- package/assets/esri/core/workers/chunks/{6738b3d6bce34a1e8be2.js → eaf720dfdf6ceca31249.js} +1 -1
- package/assets/esri/core/workers/chunks/ef274db3fa260eadf371.js +1 -0
- package/assets/esri/core/workers/chunks/efca82a4dc494f57380b.js +1 -0
- package/assets/esri/core/workers/chunks/f05990e6fb378e2e1a3b.js +1 -0
- package/assets/esri/core/workers/chunks/f0fc89cdf50a40913c02.js +1 -0
- package/assets/esri/core/workers/chunks/{8b5dcc4282772bf6b675.js → f11eaab5354cc6aa9569.js} +1 -1
- package/assets/esri/core/workers/chunks/f1c2f7c7ce4bd4096eb0.js +1 -0
- package/assets/esri/core/workers/chunks/f4e63c5f82b8c2bbfacb.js +1 -0
- package/assets/esri/core/workers/chunks/f86ff791a10c802879ec.js +1 -0
- package/assets/esri/core/workers/chunks/{7452b5ae971a9ff2e6e9.js → fdffefd7de540272a8a6.js} +1 -1
- package/assets/esri/core/workers/chunks/fe0248af95d3f37e099e.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/_core.scss +0 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/languageUtils.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/config.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/Collection.js +1 -1
- package/core/LRUCache.js +1 -1
- package/core/Logger.js +1 -1
- package/core/MapUtils.js +1 -1
- package/core/Version.js +1 -1
- package/core/asyncUtils.js +1 -1
- package/core/deprecate.js +1 -1
- package/core/fontUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/sql/SqlInterval.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/writeUtils.js +1 -1
- package/core/sql.js +1 -1
- package/core/types.d.ts +0 -5
- package/core/urlUtils.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
- package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
- package/geometry/Point.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/support/webMercatorUtils.js +1 -1
- package/interfaces.d.ts +0 -17
- package/kernel.js +1 -1
- package/layers/BuildingSceneLayer.js +1 -1
- package/layers/ElevationLayer.d.ts +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GeoJSONLayer.d.ts +5 -1
- package/layers/GeoRSSLayer.js +1 -1
- package/layers/GeospatialPDFLayer.js +1 -1
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.d.ts +4 -3
- package/layers/IntegratedMeshLayer.d.ts +4 -3
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/KMLLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/LineOfSightLayer.d.ts +6 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/PointCloudLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/TileLayer.js +1 -1
- package/layers/VectorTileLayer.d.ts +53 -0
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/ViewshedLayer.d.ts +6 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/WebTileLayer.js +1 -1
- package/layers/effects/jsonUtils.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/projectionSupport.js +1 -1
- package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/graphics/sources/parquet/FileProvider.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/graphics/sources/support/uploads.js +1 -1
- package/layers/knowledgeGraph/cypherUtils.js +1 -1
- package/layers/mixins/refresh.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/ogc/wfsUtils.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/parquet.js +1 -1
- package/layers/raster/datasets/BaseRaster.js +1 -1
- package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
- package/layers/raster/datasets/ImageServerRaster.js +1 -1
- package/layers/raster/datasets/RasterFactory.js +1 -1
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/layers/raster/datasets/ZarrRaster.js +2 -0
- package/layers/raster/datasets/datasetUtils.js +1 -1
- package/layers/raster/datasets/wcsCoverageParser.js +1 -1
- package/layers/raster/datasets/zarrParser.js +2 -0
- package/layers/raster/datasets/zarrUtils.js +2 -0
- package/layers/raster/formats/Lerc.js +1 -1
- package/layers/raster/formats/pixelRangeUtils.js +1 -1
- package/layers/support/ClientSideConnection.js +1 -1
- package/layers/support/ElevationSampler.js +1 -1
- package/layers/support/MultidimensionalSubset.js +1 -1
- package/layers/support/SceneModifications.d.ts +1 -3
- package/layers/support/SceneModifications.js +1 -1
- package/layers/support/SpriteSource.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/infoFor3D.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/legend/ActiveLayerInfo.js +1 -1
- package/libs/lyr3d/Lyr3DModule.js +1 -1
- package/linkChart/utils.js +1 -1
- package/networks/support/Circuit.js +1 -1
- package/networks/support/CircuitSection.js +1 -1
- package/package.json +3 -3
- package/portal/Portal.js +1 -1
- package/portal/PortalItemResource.js +1 -1
- package/portal/PortalQueryParams.js +1 -1
- package/renderers/HeatmapRenderer.js +1 -1
- package/renderers/UniqueValueRenderer.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/rest/query/operations/queryAttachments.js +1 -1
- package/support/LayersMixin.d.ts +2 -2
- package/symbols/PictureFillSymbol.js +1 -1
- package/symbols/PictureMarkerSymbol.js +1 -1
- package/symbols/SimpleFillSymbol.js +1 -1
- package/symbols/SimpleLineSymbol.js +1 -1
- package/symbols/SimpleMarkerSymbol.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/TextSymbol.js +1 -1
- package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
- package/symbols/cim/types.d.ts +15 -11
- package/symbols/support/previewSymbol3D.js +1 -1
- package/tables/support/templateUtils.js +1 -1
- package/views/2d/engine/vectorTiles/SourceLayerData.js +1 -1
- package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
- package/views/2d/engine/vectorTiles/TileManager.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileSourceData.js +2 -0
- package/views/2d/engine/vectorTiles/WorkerTile.js +1 -1
- package/views/2d/engine/vectorTiles/WorkerTileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
- package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
- package/views/2d/engine/vectorTiles/style/Filter.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +4 -4
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/support/TileStore.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/tiling/TileKey.js +1 -1
- package/views/2d/tiling/TileStrategy.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionComputation.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/images/generateTextures.js +1 -1
- package/views/3d/environment/EnvironmentView.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/MeshFastUpdateProcessor.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DLayerViewRegistration.js +2 -0
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/layers/support/createTileBVHForLayer.js +2 -0
- package/views/3d/layers/support/tileBoundingVolumeUtils.js +2 -0
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/controllers/GroundNavigationController.js +1 -1
- package/views/3d/support/GaussianSplatSortWorker.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/TextureCollection.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatSortCoordinator.js +2 -0
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFill.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/intersectWithPolygonOffset.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedMaterialConfiguration.js +2 -0
- package/views/SceneView.d.ts +2 -4
- package/views/SceneView.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/views/View.d.ts +1 -3
- package/views/View2D.d.ts +2 -2
- package/views/analysis/ElevationProfile/ElevationProfileChart.js +2 -2
- package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/support/PluginContext.js +1 -1
- package/views/interactive/options/ViewOptions.d.ts +0 -2
- package/views/interactive/sketch/normalizedPoint.js +1 -1
- package/views/interactive/tooltip/fields/TooltipFieldElevation.js +1 -1
- package/views/interactive/tooltip/fields/TooltipFieldOrientation.js +1 -1
- package/views/interactive/tooltip/fields/TooltipFieldSize.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
- package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Compass/CompassViewModel.js +1 -1
- package/widgets/CoordinateConversion/support/Format.js +1 -1
- package/widgets/CoordinateConversion/support/formatUtils.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +0 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor.d.ts +0 -1
- package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/Expand/ExpandViewModel.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
- package/widgets/Histogram/HistogramViewModel.js +1 -1
- package/widgets/Histogram.js +1 -1
- package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
- package/widgets/Home/HomeViewModel.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/card/CardView.js +1 -1
- package/widgets/Legend/styles/classic/ClassicView.js +1 -1
- package/widgets/Locate/LocateViewModel.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/NavigationToggle.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/DiscreteOptions.js +1 -1
- package/widgets/ShadowCast/DurationOptions.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/ShadowCast/ThresholdOptions.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +0 -1
- package/widgets/Sketch.d.ts +0 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/TableList/TableListViewModel.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/Zoom/ZoomViewModel.js +1 -1
- package/widgets/support/AnalysisViewModelMixin.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/00d43f02119167531d1b.js +0 -1
- package/assets/esri/core/workers/chunks/059cda6f11a91dbc9e28.js +0 -1
- package/assets/esri/core/workers/chunks/0696fa44a04b99738d7b.js +0 -1
- package/assets/esri/core/workers/chunks/073f0232135f71b6c7a5.js +0 -1
- package/assets/esri/core/workers/chunks/091ec4fe83038f3558f4.js +0 -1
- package/assets/esri/core/workers/chunks/098ac10877d92fde1006.js +0 -1
- package/assets/esri/core/workers/chunks/0a29d87b6e58a3c6df8f.js +0 -1
- package/assets/esri/core/workers/chunks/0bf43d80cb40c2b43333.js +0 -1
- package/assets/esri/core/workers/chunks/0d04353843ccb7440342.js +0 -1
- package/assets/esri/core/workers/chunks/1132e28aaa5825b10b6e.js +0 -1
- package/assets/esri/core/workers/chunks/123541f79be7adff0818.js +0 -1
- package/assets/esri/core/workers/chunks/1380cec385426673f294.js +0 -1
- package/assets/esri/core/workers/chunks/1866f832e5f52958bc97.js +0 -1
- package/assets/esri/core/workers/chunks/19e51cbb354954ddafbd.js +0 -1
- package/assets/esri/core/workers/chunks/1b24a40c0fa197014873.js +0 -1
- package/assets/esri/core/workers/chunks/1c7096eb48a3a7f27d4f.js +0 -1
- package/assets/esri/core/workers/chunks/1cc03067f8405285057c.js +0 -1
- package/assets/esri/core/workers/chunks/1deca3de77b1a9a07da4.js +0 -1
- package/assets/esri/core/workers/chunks/1f76f6dcdae9f55389cb.js +0 -1
- package/assets/esri/core/workers/chunks/1fd82fcba2758741996a.js +0 -1
- package/assets/esri/core/workers/chunks/21e1d423ee33f916547e.js +0 -1
- package/assets/esri/core/workers/chunks/23f3692c7426173e8352.js +0 -1
- package/assets/esri/core/workers/chunks/247617c0dbae2386ab3b.js +0 -1
- package/assets/esri/core/workers/chunks/25657f70c5f04a4ed978.js +0 -1
- package/assets/esri/core/workers/chunks/2853606099602f73d379.js +0 -1
- package/assets/esri/core/workers/chunks/28ed020d9995b6577be5.js +0 -1
- package/assets/esri/core/workers/chunks/2b27d3bc492e000bbe58.js +0 -1
- package/assets/esri/core/workers/chunks/2d64a13c2303e9cae613.js +0 -1
- package/assets/esri/core/workers/chunks/2dfe6af28cd1b29d5ebc.js +0 -1
- package/assets/esri/core/workers/chunks/305eeaac0b4d5b79ebde.js +0 -1
- package/assets/esri/core/workers/chunks/353976c812ebf0c98549.js +0 -1
- package/assets/esri/core/workers/chunks/3b5e9e0b180dc10491ec.js +0 -1
- package/assets/esri/core/workers/chunks/46edd6c9ed6701e6b975.js +0 -1
- package/assets/esri/core/workers/chunks/4caebb64a365da18453f.js +0 -1
- package/assets/esri/core/workers/chunks/4d8833f48348cbbcc947.js +0 -1
- package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +0 -1
- package/assets/esri/core/workers/chunks/4e4f747de424941a0bfa.js +0 -1
- package/assets/esri/core/workers/chunks/4e8e322b469657ac22e2.js +0 -1
- package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +0 -1
- package/assets/esri/core/workers/chunks/553a8bf5bc5c56d1bcaf.js +0 -1
- package/assets/esri/core/workers/chunks/55c0c074e4afe05f5d4d.js +0 -1
- package/assets/esri/core/workers/chunks/598ba405e93ebccf7b2d.js +0 -1
- package/assets/esri/core/workers/chunks/5bfb962ca192f90a2724.js +0 -1
- package/assets/esri/core/workers/chunks/60c8eedd06080edab3e3.js +0 -1
- package/assets/esri/core/workers/chunks/61d36730564c5ac5edab.js +0 -1
- package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +0 -1
- package/assets/esri/core/workers/chunks/661c6324529dd17b297e.js +0 -1
- package/assets/esri/core/workers/chunks/6699fac01ccd842851ba.js +0 -1
- package/assets/esri/core/workers/chunks/672a5390182b20d632be.js +0 -1
- package/assets/esri/core/workers/chunks/67caef2ecf0dc5f2eed3.js +0 -1
- package/assets/esri/core/workers/chunks/68dd1fd2025c7125ead1.js +0 -1
- package/assets/esri/core/workers/chunks/68fd7b314377d27aaa54.js +0 -1
- package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +0 -1
- package/assets/esri/core/workers/chunks/6f2e7e663229b223b4df.js +0 -1
- package/assets/esri/core/workers/chunks/7390af96250e89194332.js +0 -1
- package/assets/esri/core/workers/chunks/7b45ac83e279fe9516a5.js +0 -1
- package/assets/esri/core/workers/chunks/7e0ed6e8f7b77e43f628.js +0 -1
- package/assets/esri/core/workers/chunks/832c887fdc5af4c08cf2.js +0 -1
- package/assets/esri/core/workers/chunks/84fb27e3425515cd0e3f.js +0 -1
- package/assets/esri/core/workers/chunks/8502274806ea52308822.js +0 -1
- package/assets/esri/core/workers/chunks/8b0be232723424dda320.js +0 -1
- package/assets/esri/core/workers/chunks/8b0efcc30184593a0812.js +0 -1121
- package/assets/esri/core/workers/chunks/8b38fad017c4c0d9e1ec.js +0 -1
- package/assets/esri/core/workers/chunks/8c3779de09291170497f.js +0 -1
- package/assets/esri/core/workers/chunks/8e391b5b82429f39791e.js +0 -1
- package/assets/esri/core/workers/chunks/8e6276ddd8d094c61f08.js +0 -1
- package/assets/esri/core/workers/chunks/90d797ab82d4a68ba32f.js +0 -1
- package/assets/esri/core/workers/chunks/96f87c8efd4b11b37686.js +0 -1
- package/assets/esri/core/workers/chunks/9826baa3c15ea2062669.js +0 -1
- package/assets/esri/core/workers/chunks/98958203a5ca45b24d72.js +0 -1
- package/assets/esri/core/workers/chunks/9c3de54513bf8619271c.js +0 -1
- package/assets/esri/core/workers/chunks/a125650edbed802e419a.js +0 -1
- package/assets/esri/core/workers/chunks/a18c3cbe505a19d29569.js +0 -1
- package/assets/esri/core/workers/chunks/a5f17e9a025ac2b6e1bf.js +0 -1
- package/assets/esri/core/workers/chunks/a6e846361bf5dd3a11c7.js +0 -1
- package/assets/esri/core/workers/chunks/ac107079342251a984dd.js +0 -1
- package/assets/esri/core/workers/chunks/acf4737ba509cbd73cce.js +0 -1
- package/assets/esri/core/workers/chunks/af2087b75225d7d7dbd8.js +0 -1
- package/assets/esri/core/workers/chunks/b386e921c273de3ac7a5.js +0 -1
- package/assets/esri/core/workers/chunks/b3aa29589dcfb5b93106.js +0 -1
- package/assets/esri/core/workers/chunks/b7205620ca248f4efc88.js +0 -1
- package/assets/esri/core/workers/chunks/c0eb27263f608dc3684b.js +0 -1
- package/assets/esri/core/workers/chunks/c5364ff8dd1358af3603.js +0 -1
- package/assets/esri/core/workers/chunks/ca21786e519c914fc9e1.js +0 -1
- package/assets/esri/core/workers/chunks/cd46d9b4a8de644e7332.js +0 -1
- package/assets/esri/core/workers/chunks/da1e6962ba0c85c37953.js +0 -1
- package/assets/esri/core/workers/chunks/dcdf837a452dc0cac582.js +0 -1
- package/assets/esri/core/workers/chunks/e0864ca82ffa3c9a0776.js +0 -1
- package/assets/esri/core/workers/chunks/e69cd62f824ce7a22fa0.js +0 -1
- package/assets/esri/core/workers/chunks/e9457a67befc61e11095.js +0 -1
- package/assets/esri/core/workers/chunks/efc1a90742813b55602e.js +0 -1
- package/assets/esri/core/workers/chunks/f190a3124d6d03417d73.js +0 -1
- package/assets/esri/core/workers/chunks/f4135779bfdaf349352a.js +0 -1
- package/assets/esri/core/workers/chunks/f6bd7b52745b82ba73dc.js +0 -1
- package/assets/esri/core/workers/chunks/f6f5937a1308f28bb959.js +0 -1
- package/assets/esri/core/workers/chunks/fc77eb7683e708774168.js +0 -1
- package/assets/esri/core/workers/chunks/fd967a9f3cf0e2890dbb.js +0 -1
- package/assets/esri/core/workers/chunks/fe24e039385473bf77f9.js +0 -1
- package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +0 -1
- package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +0 -46
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ar.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.bg.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.bs.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ca.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.cs.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.da.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.de.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.el.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.en.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.es.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.et.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.fi.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.fr.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.he.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.hr.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.hu.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.id.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.it.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ja.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ko.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.lt.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.lv.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.nl.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.no.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.pl.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.pt-BR.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.pt-PT.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ro.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ru.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sk.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sl.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sr.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sv.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.th.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.tr.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.uk.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.vi.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.zh-CN.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.zh-HK.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.zh-TW.json +0 -1
- package/views/2d/engine/vectorTiles/style/VectorTilePbfWriter.js +0 -2
- package/views/2d/engine/vectorTiles/style/encodeVectorTileFeatures.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderVectorTileFeatureCursor.js +0 -2
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +0 -72
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +0 -2
- package/widgets/UtilityNetworkValidateTopology.d.ts +0 -130
- package/widgets/UtilityNetworkValidateTopology.js +0 -2
- /package/views/2d/engine/vectorTiles/{Feature.js → PbfFeature.js} +0 -0
|
@@ -1,1121 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4426],{28491(e,t,r){r.d(t,{b:()=>R});var i=r(32680),n=r(49255),o=r(34711),a=r(71020),s=r(72722),l=r(96336),c=r(53466),u=r(72824),d=r(54154),h=r(9169),f=r(12696),m=r(77695),p=r(68785),v=r(28390),g=r(96777),x=r(62602),_=r(20598),y=r(22393),b=r(59469),w=r(56529),M=r(51406),T=r(89435),S=r(58614),C=r(20693),A=r(33079),E=r(31821),I=r(63761),O=r(24111),P=r(84368),D=r(14113);function R(e){let t=new D.N5,{attributes:r,vertex:R,fragment:F,varyings:B}=t,{output:N,normalType:z,offsetBackfaces:L,snowCover:H,pbrMode:V,textureAlphaPremultiplied:U,instancedDoublePrecision:j,hasVertexColors:k,hasVertexTangents:G,hasColorTexture:W,hasNormalTexture:Z,hasNormalTextureTransform:$,hasColorTextureTransform:q}=e;if((0,C.N)(R,e),r.add("position","vec3"),R.inputs.add("position",()=>"position"),B.add("vpos","vec3",{invariant:!0}),t.include(T.A,e),t.include(s.B,e),t.include(d.Ge,e),t.include(M.q2,e),!(0,n._o)(N))return t.include(h.E,e),t;t.include(M.Sx,e),t.include(M.MU,e),t.include(M.O1,e),t.include(M.QM,e),(0,C.y)(R,e),t.include(l.Y,e),t.include(a.d);let Y=0===z||1===z;return Y&&L&&t.include(i.M),t.include(m.J,e),t.include(u.Mh,e),B.add("vPositionLocal","vec3"),t.include(c.U,e),t.include(f.F,e),t.include(j?w.oD:w.rA,e),R.main.add(E.H`
|
|
2
|
-
forwardDefaultMaterialExternalColor();
|
|
3
|
-
|
|
4
|
-
vpos = getVertexInLocalOriginSpace();
|
|
5
|
-
vPositionLocal = vpos - view[3].xyz;
|
|
6
|
-
vpos = subtractOrigin(vpos);
|
|
7
|
-
${(0,E.If)(Y,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
|
|
8
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
9
|
-
${(0,E.If)(G,"vTangent = dpTransformVertexTangent(tangent);")}
|
|
10
|
-
gl_Position = transformPosition(proj, view, vpos);
|
|
11
|
-
${(0,E.If)(Y&&L,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
12
|
-
|
|
13
|
-
forwardTextureCoordinates();
|
|
14
|
-
forwardColorUV();
|
|
15
|
-
forwardNormalUV();
|
|
16
|
-
forwardEmissiveUV();
|
|
17
|
-
forwardOcclusionUV();
|
|
18
|
-
forwardMetallicRoughnessUV();
|
|
19
|
-
|
|
20
|
-
if (shouldCullByOpacity()) {
|
|
21
|
-
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
22
|
-
}
|
|
23
|
-
forwardLinearDepthToReadShadow();
|
|
24
|
-
`),F.include(v.k,e),F.include(p.n,e),t.include(S.SS,e),F.include(o.zM,e),t.include(P.D,e),(0,C.y)(F,e),F.uniforms.add(R.uniforms.get("localOrigin"),new A.t("ambient",e=>e.ambient),new A.t("diffuse",e=>e.diffuse)),W&&F.uniforms.add(new I.N("tex",e=>e.texture)),t.include(b._Z,e),F.include(y.c,e),t.include(x.r,e),F.include(O.Y,e),F.include(_.n,e),(0,v.a)(F),F.uniforms.add(g.VW,g.VK).main.add(E.H`
|
|
25
|
-
discardBySlice(vpos);
|
|
26
|
-
${W?E.H`
|
|
27
|
-
vec4 texColor = texture(tex, ${q?"colorUV":"vuv0"});
|
|
28
|
-
${(0,E.If)(U,"texColor.rgb /= texColor.a;")}
|
|
29
|
-
discardOrAdjustAlpha(texColor);`:"vec4 texColor = vec4(1.0);"}
|
|
30
|
-
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
31
|
-
vec3 posWorld = vpos + localOrigin;
|
|
32
|
-
vec3 upNormal = getLocalUp(posWorld);
|
|
33
|
-
${2===z?"vec3 normal = screenDerivativeNormal(vPositionLocal);":"vec3 normal = shadingNormal(vNormalWorld, viewDirection);"}
|
|
34
|
-
applyPBRFactors();
|
|
35
|
-
float ssao = evaluateAmbientOcclusionInverse() * getBakedOcclusion();
|
|
36
|
-
|
|
37
|
-
float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
|
|
38
|
-
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
39
|
-
|
|
40
|
-
vec3 matColor = max(ambient, diffuse);
|
|
41
|
-
vec3 albedo = mixExternalColor(
|
|
42
|
-
${(0,E.If)(k,"vColor.rgb *")} matColor,
|
|
43
|
-
texColor.rgb,
|
|
44
|
-
vExternalColor.rgb,
|
|
45
|
-
int(colorMixMode)
|
|
46
|
-
);
|
|
47
|
-
float opacity_ = getDefaultMaterialOpacity(texColor.a);
|
|
48
|
-
|
|
49
|
-
${Z?`mat3 tangentSpace = computeTangentSpace(${G?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${$?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
|
|
50
|
-
|
|
51
|
-
${(0,E.If)(H,E.H`
|
|
52
|
-
float snow = applySnow(normal, upNormal, albedo, ssao);
|
|
53
|
-
shadingNormal = mix(shadingNormal, normal, snow);
|
|
54
|
-
`)}
|
|
55
|
-
|
|
56
|
-
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
57
|
-
${(0,E.If)((1===V||2===V)&&H,"applySnowToMRR(snow);")}
|
|
58
|
-
|
|
59
|
-
vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, upNormal);
|
|
60
|
-
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
61
|
-
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,E.If)(H,", snow")});
|
|
62
|
-
`),t}const F=Object.freeze(Object.defineProperty({__proto__:null,build:R},Symbol.toStringTag,{value:"Module"}));r.d(t,["D",0,F])},57323(e,t,r){r.d(t,{b:()=>O});var i=r(32680),n=r(49255),o=r(34711),a=r(71020),s=r(72722),l=r(96336),c=r(53466),u=r(54154),d=r(9169),h=r(12696),f=r(68785),m=r(28390),p=r(96777),v=r(20598),g=r(22393),x=r(59469),_=r(56529),y=r(51406),b=r(89435),w=r(58614),M=r(20693),T=r(33079),S=r(31821),C=r(63761),A=r(24111),E=r(84368),I=r(14113);function O(e){let t=new I.N5,{attributes:r,vertex:O,fragment:P,varyings:D}=t,{output:R,offsetBackfaces:F,pbrMode:B,snowCover:N}=e,z=1===B||2===B;if((0,M.N)(O,e),r.add("position","vec3"),O.inputs.add("position",()=>"position"),D.add("vpos","vec3",{invariant:!0}),t.include(b.A,e),t.include(s.B,e),t.include(u.Ge,e),t.include(y.q2,e),!(0,n._o)(R))return t.include(d.E,e),t;t.include(y.MU,e),(0,M.y)(t.vertex,e),t.include(l.Y,e),t.include(a.d),F&&t.include(i.M),D.add("vNormalWorld","vec3"),D.add("localvpos","vec3",{invariant:!0}),t.include(c.U,e),t.include(h.F,e),t.include(e.instancedDoublePrecision?_.oD:_.rA,e),O.main.add(S.H`
|
|
63
|
-
forwardDefaultMaterialExternalColor();
|
|
64
|
-
|
|
65
|
-
vpos = getVertexInLocalOriginSpace();
|
|
66
|
-
|
|
67
|
-
localvpos = vpos - view[3].xyz;
|
|
68
|
-
vpos = subtractOrigin(vpos);
|
|
69
|
-
vNormalWorld = dpNormal(vvLocalNormal(normalModel()));
|
|
70
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
71
|
-
vec4 basePosition = transformPosition(proj, view, vpos);
|
|
72
|
-
|
|
73
|
-
forwardTextureCoordinates();
|
|
74
|
-
forwardColorUV();
|
|
75
|
-
forwardEmissiveUV();
|
|
76
|
-
forwardLinearDepthToReadShadow();
|
|
77
|
-
|
|
78
|
-
gl_Position = shouldCullByOpacity() ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
79
|
-
${(0,S.If)(F,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
80
|
-
`);let{hasColorTexture:L,hasColorTextureTransform:H}=e;return P.include(m.k,e),P.include(f.n,e),t.include(w.SS,e),P.include(o.zM,e),t.include(E.D,e),(0,M.y)(P,e),(0,m.a)(P),P.uniforms.add(p.t_,p.VW,O.uniforms.get("localOrigin"),O.uniforms.get("view"),new T.t("ambient",e=>e.ambient),new T.t("diffuse",e=>e.diffuse)),L&&P.uniforms.add(new C.N("tex",e=>e.texture)),t.include(x._Z,e),P.include(g.c,e),P.include(A.Y,e),P.include(v.n,e),P.uniforms.add(p.VK).main.add(S.H`
|
|
81
|
-
discardBySlice(vpos);
|
|
82
|
-
vec4 texColor = ${L?`texture(tex, ${H?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
83
|
-
${(0,S.If)(L,`${(0,S.If)(e.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
84
|
-
applyPBRFactors();
|
|
85
|
-
float ssao = evaluateAmbientOcclusionInverse();
|
|
86
|
-
ssao *= getBakedOcclusion();
|
|
87
|
-
|
|
88
|
-
float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
|
|
89
|
-
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
90
|
-
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
91
|
-
vec3 matColor = max(ambient, diffuse);
|
|
92
|
-
vec3 albedo = mixExternalColor(
|
|
93
|
-
${(0,S.If)(e.hasVertexColors,"vColor.rgb * ")} matColor,
|
|
94
|
-
texColor.rgb,
|
|
95
|
-
vExternalColor.rgb,
|
|
96
|
-
int(colorMixMode)
|
|
97
|
-
);
|
|
98
|
-
float opacity_ = getDefaultMaterialOpacity(texColor.a);
|
|
99
|
-
|
|
100
|
-
vec3 shadingNormal = normalize(vNormalWorld);
|
|
101
|
-
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
102
|
-
vec3 upNormal = getLocalUp(vpos, localOrigin);
|
|
103
|
-
|
|
104
|
-
${(0,S.If)(N,"vec3 faceNormal = screenDerivativeNormal(vpos);\n float snow = applyRealisticTreeSnow(faceNormal, shadingNormal, upNormal, albedo, ssao);\n ")}
|
|
105
|
-
|
|
106
|
-
${S.H`albedo *= 1.2;
|
|
107
|
-
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
108
|
-
float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
|
|
109
|
-
float transmittance = 1.0 - clamp(dot(viewForward, shadingNormal), 0.0, 1.0);
|
|
110
|
-
float treeRadialFalloff = vColor.r;
|
|
111
|
-
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
112
|
-
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
113
|
-
|
|
114
|
-
${(0,S.If)(z&&N,"applySnowToMRR(snow);")}
|
|
115
|
-
|
|
116
|
-
vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, upNormal);
|
|
117
|
-
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
118
|
-
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,S.If)(N,", 1.0")});
|
|
119
|
-
`),t}const P=Object.freeze(Object.defineProperty({__proto__:null,build:O},Symbol.toStringTag,{value:"Module"}));r.d(t,["R",0,P])},15581(e,t,r){r.d(t,{b:()=>v,g:()=>g});var i=r(37585),n=r(48163),o=r(82048),a=r(83068),s=r(65261),l=r(34845),c=r(77108),u=r(47286),d=r(33094),h=r(20304),f=r(31821),m=r(63761),p=r(14113);function v(){let e=new p.N5,t=e.fragment;return e.include(o.c),e.include(l.Ir),t.include(a.E),t.include(s.C),t.uniforms.add(new d.U("radius",e=>g(e.camera))).code.add(f.H`vec3 sphere[16] = vec3[16](
|
|
120
|
-
vec3(0.186937, 0.0, 0.0),
|
|
121
|
-
vec3(0.700542, 0.0, 0.0),
|
|
122
|
-
vec3(-0.864858, -0.481795, -0.111713),
|
|
123
|
-
vec3(-0.624773, 0.102853, -0.730153),
|
|
124
|
-
vec3(-0.387172, 0.260319, 0.007229),
|
|
125
|
-
vec3(-0.222367, -0.642631, -0.707697),
|
|
126
|
-
vec3(-0.01336, -0.014956, 0.169662),
|
|
127
|
-
vec3(0.122575, 0.1544, -0.456944),
|
|
128
|
-
vec3(-0.177141, 0.85997, -0.42346),
|
|
129
|
-
vec3(-0.131631, 0.814545, 0.524355),
|
|
130
|
-
vec3(-0.779469, 0.007991, 0.624833),
|
|
131
|
-
vec3(0.308092, 0.209288,0.35969),
|
|
132
|
-
vec3(0.359331, -0.184533, -0.377458),
|
|
133
|
-
vec3(0.192633, -0.482999, -0.065284),
|
|
134
|
-
vec3(0.233538, 0.293706, -0.055139),
|
|
135
|
-
vec3(0.417709, -0.386701, 0.442449)
|
|
136
|
-
);
|
|
137
|
-
float fallOffFunction(float vv, float vn, float bias) {
|
|
138
|
-
float f = max(radius * radius - vv, 0.0);
|
|
139
|
-
return f * f * f * max(vn - bias, 0.0);
|
|
140
|
-
}`),t.code.add(f.H`float aoValueFromPositionsAndNormal(vec3 C, vec3 n_C, vec3 Q) {
|
|
141
|
-
vec3 v = Q - C;
|
|
142
|
-
float vv = dot(v, v);
|
|
143
|
-
float vn = dot(normalize(v), n_C);
|
|
144
|
-
return fallOffFunction(vv, vn, 0.1);
|
|
145
|
-
}`),e.outputs.add("fragOcclusion","float"),t.uniforms.add(new m.N("normalMap",e=>e.normalTexture),new m.N("depthMap",e=>e.depthTexture),new h.m("projScale",e=>e.projScale),new m.N("rnm",e=>e.noiseTexture),new u.G("rnmScale",(e,t)=>(0,i.hZ)(x,t.camera.fullWidth/e.noiseTexture.descriptor.width,t.camera.fullHeight/e.noiseTexture.descriptor.height)),new h.m("intensity",e=>e.intensity),new c.E("screenSize",e=>(0,i.hZ)(x,e.camera.fullWidth,e.camera.fullHeight))).main.add(f.H`
|
|
146
|
-
float depth = depthFromTexture(depthMap, uv);
|
|
147
|
-
|
|
148
|
-
// Early out if depth is out of range, such as in the sky
|
|
149
|
-
if (depth >= 1.0 || depth <= 0.0) {
|
|
150
|
-
fragOcclusion = 1.0;
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// get the normal of current fragment
|
|
155
|
-
ivec2 iuv = ivec2(uv * vec2(textureSize(normalMap, 0)));
|
|
156
|
-
vec4 norm4 = texelFetch(normalMap, iuv, 0);
|
|
157
|
-
if (norm4.a == 0.0) {
|
|
158
|
-
fragOcclusion = 1.0;
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
vec3 norm = normalize(norm4.xyz * 2.0 - 1.0);
|
|
162
|
-
|
|
163
|
-
float currentPixelDepth = linearizeDepth(depth);
|
|
164
|
-
vec3 currentPixelPos = reconstructPosition(gl_FragCoord.xy, currentPixelDepth);
|
|
165
|
-
|
|
166
|
-
float sum = 0.0;
|
|
167
|
-
vec3 tapPixelPos;
|
|
168
|
-
|
|
169
|
-
vec3 fres = normalize(2.0 * texture(rnm, uv * rnmScale).xyz - 1.0);
|
|
170
|
-
|
|
171
|
-
// note: the factor 2.0 should not be necessary, but makes ssao much nicer. bug or deviation from CE somewhere else?
|
|
172
|
-
float ps = projScale / (2.0 * currentPixelPos.z * zScale.x + zScale.y);
|
|
173
|
-
|
|
174
|
-
for(int i = 0; i < ${f.H.int(16)}; ++i) {
|
|
175
|
-
vec2 unitOffset = reflect(sphere[i], fres).xy;
|
|
176
|
-
vec2 offset = vec2(-unitOffset * radius * ps);
|
|
177
|
-
|
|
178
|
-
// don't use current or very nearby samples
|
|
179
|
-
if( abs(offset.x) < 2.0 || abs(offset.y) < 2.0){
|
|
180
|
-
continue;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
vec2 tc = vec2(gl_FragCoord.xy + offset);
|
|
184
|
-
if (tc.x < 0.0 || tc.y < 0.0 || tc.x > screenSize.x || tc.y > screenSize.y) continue;
|
|
185
|
-
vec2 tcTap = tc / screenSize;
|
|
186
|
-
float occluderFragmentDepth = linearDepthFromTexture(depthMap, tcTap);
|
|
187
|
-
|
|
188
|
-
tapPixelPos = reconstructPosition(tc, occluderFragmentDepth);
|
|
189
|
-
|
|
190
|
-
sum += aoValueFromPositionsAndNormal(currentPixelPos, norm, tapPixelPos);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// output the result
|
|
194
|
-
float A = max(1.0 - sum * intensity / float(${f.H.int(16)}), 0.0);
|
|
195
|
-
|
|
196
|
-
// Anti-tone map to reduce contrast and drag dark region farther: (x^0.2 + 1.2 * x^4) / 2.2
|
|
197
|
-
A = (pow(A, 0.2) + 1.2 * pow(A, 4.0)) * INV_GAMMA;
|
|
198
|
-
|
|
199
|
-
fragOcclusion = A;
|
|
200
|
-
`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDistance(Math.abs(4*e.relativeElevation)))}const x=(0,n.vt)(),_=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,_])},95774(e,t,r){r.d(t,{b:()=>d});var i=r(82048),n=r(83068),o=r(68259),a=r(20304),s=r(31821),l=r(15976),c=r(63761),u=r(14113);function d(){let e=new u.N5,t=e.fragment;return e.include(i.c),t.include(n.E),t.uniforms.add(new c.N("depthMap",e=>e.depthTexture),new l.o("tex",e=>e.colorTexture),new o.t("blurSize",e=>e.blurSize),new a.m("projScale",(e,t)=>{let r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(s.H`
|
|
201
|
-
void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
|
|
202
|
-
float c = texture(tex, uv).r;
|
|
203
|
-
float d = linearDepthFromTexture(depthMap, uv);
|
|
204
|
-
|
|
205
|
-
float ddiff = d - center_d;
|
|
206
|
-
|
|
207
|
-
float w = exp(-r * r * ${s.H.float(.08)} - ddiff * ddiff * sharpness);
|
|
208
|
-
wTotal += w;
|
|
209
|
-
bTotal += w * c;
|
|
210
|
-
}
|
|
211
|
-
`),e.outputs.add("fragBlur","float"),t.main.add(s.H`
|
|
212
|
-
float b = 0.0;
|
|
213
|
-
float w_total = 0.0;
|
|
214
|
-
|
|
215
|
-
float center_d = linearDepthFromTexture(depthMap, uv);
|
|
216
|
-
|
|
217
|
-
float sharpness = -0.05 * projScale / center_d;
|
|
218
|
-
for (int r = -${s.H.int(4)}; r <= ${s.H.int(4)}; ++r) {
|
|
219
|
-
float rf = float(r);
|
|
220
|
-
vec2 uvOffset = uv + rf * blurSize;
|
|
221
|
-
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
222
|
-
}
|
|
223
|
-
fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,h])},43609(e,t,r){r.d(t,{a:()=>o,f:()=>a,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){let o=t.length/2,a=0,s=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=n;return}let l=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=n;else for(let i=0;i<o;++i)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=n}function a(e,t,r,i){let n=e.typedBuffer,o=e.typedBufferStride,a=i?.count??e.count,s=(i?.dstIndex??0)*o;for(let e=0;e<a;++e)n[s]=t,n[s+1]=r,s+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>s,c:()=>n,d:()=>a,e:()=>h,f:()=>u,l:()=>c,n:()=>f,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[4],f=r[5],m=r[6],p=r[8],v=r[9],g=r[10],x=r[12],_=r[13],y=r[14],b=0,w=0;for(let r=0;r<l;r++){let r=t[b],i=t[b+1],a=t[b+2];e[w]=c*r+h*i+p*a+x,e[w+1]=u*r+f*i+v*a+_,e[w+2]=d*r+m*i+g*a+y,b+=o,w+=n}return e}function a(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,x+=o,_+=n}}function l(e,t,r,i=3,n=i){let o=Math.min(e.length/i,t.length/n),a=0,s=0;for(let l=0;l<o;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=n,s+=i;return e}function c(e,t,r,i){u(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,i,n=3,o=n){let a=Math.min(e.length/n,t.length/o),s=0,l=0,c=1/2.2;for(let u=0;u<a;u++)e[l]=i*(r*t[s])**c,e[l+1]=i*(r*t[s+1])**c,e[l+2]=i*(r*t[s+2])**c,s+=o,l+=n}function d(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=0,u=0;for(let i=0;i<l;i++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=o,u+=n;return e}function h(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,i=r){let n=Math.min(e.length/r,t.length/i),o=0,a=0;for(let s=0;s<n;s++){let n=t[o],s=t[o+1],l=t[o+2],c=n*n+s*s+l*l;if(c>0){let t=1/Math.sqrt(c);e[a]=t*n,e[a+1]=t*s,e[a+2]=t*l}o+=i,a+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:f,normalizeView:h,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){let i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0;for(let e=0;e<i;e++)n[c]=a[l]>>r,n[c+1]=a[l+1]>>r,n[c+2]=a[l+2]>>r,l+=s,c+=o},transformMat3:s,transformMat3View:a,transformMat4:o,transformMat4View:n,translate:d},Symbol.toStringTag,{value:"Module"}))},50867(e,t,r){r.d(t,{a:()=>n,b:()=>c,l:()=>l,n:()=>a,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2],s=t[x+3];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,e[_+3]=s,x+=o,_+=n}}function a(e,t){let r=Math.min(e.count,t.count),i=e.typedBuffer,n=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){let t=e*n,r=e*a,s=o[r],l=o[r+1],c=o[r+2],u=s*s+l*l+c*c;if(u>0){let e=1/Math.sqrt(u);i[t]=e*s,i[t+1]=e*l,i[t+2]=e*c}}}function s(e,t,r,i=4){let n=Math.min(e.length/i,t.count),o=t.typedBuffer,a=t.typedBufferStride,s=0,l=0;for(let t=0;t<n;t++)e[l]=r*o[s],e[l+1]=r*o[s+1],e[l+2]=r*o[s+2],e[l+3]=r*o[s+3],s+=a,l+=i}function l(e,t,r,i){c(e.typedBuffer,t,r,i,e.typedBufferStride)}function c(e,t,r,i,n=4){let o=Math.min(e.length/n,t.count),a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0,u=1/2.2;for(let t=0;t<o;t++)e[c]=i*(r*a[l])**u,e[c+1]=i*(r*a[l+1])**u,e[c+2]=i*(r*a[l+2])**u,e[c+3]=i*r*a[l+3],l+=s,c+=n}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:l,normalize:a,scale:s,scaleView:function(e,t,r){s(e.typedBuffer,t,r,e.typedBufferStride)},transformMat3:o,transformMat3View:n,transformMat4:function(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=r[9],_=r[10],y=r[11],b=r[12],w=r[13],M=r[14],T=r[15],S=0,C=0;for(let r=0;r<l;r++){let r=t[S],i=t[S+1],a=t[S+2],s=t[S+3];e[C]=c*r+f*i+g*a+b*s,e[C+1]=u*r+m*i+x*a+w*s,e[C+2]=d*r+p*i+_*a+M*s,e[C+3]=h*r+v*i+y*a+T*s,S+=o,C+=n}},transformMat4View:function(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=(0,i.k)(n.length,o,4),c=(0,i.k)(a.length,s,4),u=Math.min(l,c),d=r[0],h=r[1],f=r[2],m=r[3],p=r[4],v=r[5],g=r[6],x=r[7],_=r[8],y=r[9],b=r[10],w=r[11],M=r[12],T=r[13],S=r[14],C=r[15];for(let e=0;e<u;e++){let t=e*o,r=e*s,i=a[r],l=a[r+1],c=a[r+2],u=a[r+3];n[t]=d*i+p*l+_*c+M*u,n[t+1]=h*i+v*l+y*c+T*u,n[t+2]=f*i+g*l+b*c+S*u,n[t+3]=m*i+x*l+w*c+C*u}}},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+a(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=a(e,t-i):i>r&&(i-=a(e,i-r)),o&&i===r&&(i=t),i+n}function a(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360));r.d(t,["ie",0,l,"uC",0,s])},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){let[r,o]=e.split("."),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!o?.match||!a.test(o)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new n(parseInt(r,10),parseInt(o,10),t)}}},61473(e,t,r){function i(e){return e||=globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t||=globalThis.location.hostname,t?null!=t.match(o)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e):null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,a,/^jsapps\.esri\.com$/,s,l]},18370(e,t,r){r.d(t,{z:()=>n});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function n(e){return new i(e)}},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){let r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function a(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{fA:()=>n,vt:()=>i});const c=o(),u=a(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){let t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:a,unitX:s,unitY:l,zeros:o},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,u,"uY",0,c])},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>a,lM:()=>o,ro:()=>c,rq:()=>u});var i=r(44208),n=r(34275);function o(e){if(!e)return 0;let t=d;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let r=h;for(let i=0;i<t;i++)r+=s(e[i]);return r}(e);let t=d;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?a(e):d;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+c(t),0)}function c(e,t=16){return e?(0,n.iu)(e)?e.byteLength+m:Array.isArray(e)?u(e,t):0:0}function u(e,t){return h+e.length*t}const d=32,h=16,f=(0,i.A)("ios")||!(0,i.A)("chrome")&&!(0,i.A)("opr")?8:4,m=145;r.d(t,["JY",0,f])},65806(e,t,r){r.d(t,{g:()=>a});var i=r(51850),n=r(99917),o=r(9762);function a(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,o.projectBuffer)(s,e.spatialReference,0,t,r,0);let a=(0,n.tryProject)(e,r,i);return!!a&&(t[0]=a.x,t[1]=a.y,t[2]=a.z??0,!0)}const s=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var i=r(99917),n=r(16930),o=r(9762),a=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,lc:()=>d,my:()=>a,tM:()=>h,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r&&=0===e,n&&=e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<1024)return Array(e).fill(0);if(e>l.length){let t=Math.max(2*l.length,e);l=new Uint8Array(t)}return new Uint8Array(l.buffer,0,e)}(e.length):n?h(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function a(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}let s=f(131072),l=new Uint8Array(65536);const c=[0],u=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function d(e){if(e===c)return!0;if(!(0,i.iu)(e))return!1;let{buffer:t}=e;return t===u.buffer||t===s.buffer||t===l.buffer}function h(e){return 1===e?c:e<1024?function(e){let t=Array(e).fill(0);for(let r=0;r<e;r++)t[r]=r;return t}(e):e<u.length?new Uint16Array(u.buffer,0,e):(e>s.length&&(s=f(Math.max(2*s.length,e))),new Uint32Array(s.buffer,0,e))}function f(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;let i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},65720(e,t,r){r.d(t,{C:()=>g,vt:()=>p,Qy:()=>v,ui:()=>x,ST:()=>T,bU:()=>C,pw:()=>M,m7:()=>_,ZU:()=>y,GH:()=>w,Pi:()=>b,LJ:()=>S,c8:()=>I});var i=r(4341),n=r(58083),o=r(35522),a=r(51850),s=r(78955),l=r(91829),c=r(70328),u=r(71351);function d(e){return e?{ray:(0,u.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>d());var h=r(27921);function f(e,t,r,i){let{t0:n,t1:o}=i,a=(0,h.mN)(e,t),s=(0,h.mN)(e,r);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){let e=-a/(s-a);if(e<n)return!1;e<o&&(o=e)}else if(a>=0&&s<0){let e=a/(a-s);if(e>o)return!1;e>n&&(n=e)}return i.t0=n,i.t1=o,!0}var m=r(32114);function p(e){return e?[(0,h.vt)(e[0]),(0,h.vt)(e[1]),(0,h.vt)(e[2]),(0,h.vt)(e[3]),(0,h.vt)(e[4]),(0,h.vt)(e[5])]:[(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)()]}function v(){return[(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)()]}function g(e,t){for(let r=0;r<O;r++)(0,h.C)(e[r],t[r]);return e}function x(e,t,r,i=F){let a=(0,n.lw)(m.Rc.get(),t,e);(0,n.B8)(a,a);for(let e=0;e<P;++e){let t=(0,s.Z0)(m.Km.get(),D[e],a);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}!function(e,t){(0,h.Cr)(t[4],t[0],t[3],e[0]),(0,h.Cr)(t[1],t[5],t[6],e[1]),(0,h.Cr)(t[4],t[5],t[1],e[2]),(0,h.Cr)(t[3],t[2],t[6],e[3]),(0,h.Cr)(t[0],t[1],t[2],e[4]),(0,h.Cr)(t[5],t[4],t[7],e[5])}(r,i)}function _(e,t){return y(e,t.center,t.radius)}function y(e,t,r){for(let i=0;i<O;i++){let n=e[i];if(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]>=r)return!1}return!0}function b(e,t,r){for(let i of E)if((0,h.wE)(e[i],t,r))return!0;return!1}function w(e,t,r){let i=(0,c.gX)(t,B),n=(0,c.VL)(t)/2,a=(0,c.yr)(t)/2,s=(0,c.uJ)(t)/2;return r?function(e,t,r,i,n,a){let s=(0,o.Z0)(N,t,a);for(let t=0;t<O;t++){let o=e[t];if(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]-(Math.abs(o[0]*a[0]+o[1]*a[1]+o[2]*a[2])*r+Math.abs(o[0]*a[4]+o[1]*a[5]+o[2]*a[6])*i+Math.abs(o[0]*a[8]+o[1]*a[9]+o[2]*a[10])*n)>0)return!1}return!0}(e,i,n,a,s,r):function(e,t,r,i,n){for(let o=0;o<O;o++){let a=e[o];if(a[0]*t[0]+a[1]*t[1]+a[2]*t[2]+a[3]-(Math.abs(a[0])*r+Math.abs(a[1])*i+Math.abs(a[2])*n)>0)return!1}return!0}(e,i,n,a,s)}function M(e,t){return A(e,function(e,t=d()){return(0,u.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,R.get()))}function T(e,t,r){return A(e,function(e,t,r=d()){let i=(0,o.Bw)(e.vector);return(0,u.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,R.get()))}function S(e,t,r){return function(e,t,r,i){let n={t0:0,t1:1};for(let o of t)if(!f(e[o],r,i,n))return!1;return n.t0<n.t1}(e,E,t,r)}function C(e,t){for(let r=0;r<O;r++)if((0,h.mN)(e[r],t)>0)return!1;return!0}function A(e,t){for(let r=0;r<O;r++)if(!(0,h.$Q)(e[r],t))return!1;return!0}const E=[0,1,2,3,5],I={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},O=6,P=8,D=[(0,l.fA)(-1,-1,-1,1),(0,l.fA)(1,-1,-1,1),(0,l.fA)(1,1,-1,1),(0,l.fA)(-1,1,-1,1),(0,l.fA)(-1,-1,1,1),(0,l.fA)(1,-1,1,1),(0,l.fA)(1,1,1,1),(0,l.fA)(-1,1,1,1)],R=new i.I(d),F=v(),B=(0,a.vt)(),N=(0,a.vt)()},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>c,_I:()=>d,vt:()=>l});var i=r(34727),n=r(4341),o=r(35522),a=r(51850),s=r(32114);function l(e){return e?{origin:(0,a.o8)(e.origin),vector:(0,a.o8)(e.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function c(e,t){let r=h.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,o.C)(r.origin,e),(0,o.Re)(r.vector,t,e),r}function d(e,t,r){return function(e,t,r,n,a){let{vector:l,origin:c}=e,u=(0,o.Re)(s.rq.get(),t,c),d=(0,o.Om)(l,u)/(0,o.m3)(l);return(0,o.hs)(a,l,(0,i.qE)(d,0,1)),(0,o.WQ)(a,a,e.origin)}(e,t,0,0,r)}(0,a.vt)(),(0,a.vt)();const h=new n.I(()=>l())},52039(e,t,r){r.d(t,{O7:()=>h,el:()=>c});var i=r(69052),n=(r(49186),r(18370)),o=r(17676),a=(r(5443),r(39829)),s=(r(82799),r(16930)),l=(r(80754),r(21325));async function c(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let i=null;for(let t of e)i??=t?.spatialReference;if(!i)return e;let n=(0,l.Vp)(i);if(!n)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(n);return["xmin"in t?t:new a.A(t)]}let[s,c]=n.valid,h=!1;for(let t of e){if(!t)continue;if("point"===t.type){h||=t.x>=c,h||=t.x<=s;continue}let{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=c,h||=e.xmin<=s,h||=e.xmax>=c,h||=e.xmax<=s}if(!h)return e;let[{foldInto360Range:f},m]=await(0,o.qr)(Promise.all([u.getImportPromise(),d.getImportPromise()]),r),p=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=m.fromGeometry(e),r=m.toGeometry(f(t,p),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const u=(0,n.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),d=(0,n.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function h(e,t,r){let i=(0,l.Vp)(r);if(null==i)return e;let[n,o]=i.valid,a=2*o,s=0,c=0;t>o?s=Math.ceil(Math.abs(t-o)/a):t<n&&(s=-Math.ceil(Math.abs(t-n)/a)),e>o?c=Math.ceil(Math.abs(e-o)/a):e<n&&(c=-Math.ceil(Math.abs(e-n)/a));let u=e+(s-c)*a,d=u-t;return d>o?u-=a:d<n&&(u+=a),u}function f(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,n]=t.valid;return new i.hr(r,n)}const m=f(s.A.WGS84);f(s.A.WebMercator),r.d(t,["Y_",0,m])},48295(e,t,r){r.d(t,{BU:()=>u,Ui:()=>s,cq:()=>c,k3:()=>d,rb:()=>h});var i=r(4341),n=r(35522),o=r(51850),a=r(11964);function s(e,t,r){let{direction:i,origin:o}=t,{p0:a,p1:s,p2:l}=e,c=s[0]-a[0],u=s[1]-a[1],d=s[2]-a[2],h=l[0]-a[0],f=l[1]-a[1],m=l[2]-a[2],p=i[1]*m-f*i[2],v=i[2]*h-m*i[0],g=i[0]*f-h*i[1],x=c*p+u*v+d*g;if(x>-1e-5&&x<1e-5)return!1;let _=1/x,y=o[0]-a[0],b=o[1]-a[1],w=o[2]-a[2],M=_*(y*p+b*v+w*g);if(M<0||M>1)return!1;let T=b*d-u*w,S=w*c-d*y,C=y*u-c*b,A=_*(i[0]*T+i[1]*S+i[2]*C);if(A<0||M+A>1)return!1;if(r){let e=_*(h*T+f*S+m*C);(0,n.hs)(r,i,e),(0,n.WQ)(r,o,r)}return!0}function l(e,t,r){let[i,n]=e,[o,a]=t,[s,l]=r;return.5*((o-i)*(l-n)-(a-n)*(s-i))}function c(e,t,r,i,n=0){let o=l(i,e,t),a=l(i,t,r),s=l(i,r,e);return!((o<-n||a<-n||s<-n)&&(o>n||a>n||s>n))}function u(e,t,r){return(0,n.Re)(f,t,e),(0,n.Re)(m,r,e),.5*(0,n.Bw)((0,n.$A)(f,f,m))}function d(e,t,r,i,o){(0,n.jb)(f,i,r),(0,n.jb)(p,o,r),(0,n.jb)(m,t,r);let a=(0,n.Om)(f,m),s=(0,n.Om)(p,m);if(a<=0&&s<=0)return void(0,n.C)(e,r);(0,n.jb)(m,t,i);let l=(0,n.Om)(f,m),c=(0,n.Om)(p,m);if(l>=0&&c<=l)return void(0,n.C)(e,i);let u=a*c-l*s;if(u<=0&&a>=0&&l<=0)return void(0,n.Ln)(e,r,f,a/(a-l));(0,n.jb)(m,t,o);let d=(0,n.Om)(f,m),h=(0,n.Om)(p,m);if(h>=0&&d<=h)return void(0,n.C)(e,o);let v=d*s-a*h;if(v<=0&&s>=0&&h<=0)return void(0,n.Ln)(e,r,p,s/(s-h));let g=l*h-d*c;if(g<=0&&c-l>=0&&d-h>=0)return(0,n.jb)(m,o,i),void(0,n.Ln)(e,i,m,(c-l)/(c-l+(d-h)));let x=1/(g+v+u);(0,n.C)(e,r),(0,n.Ln)(e,e,f,v*x),(0,n.Ln)(e,e,p,u*x)}function h(e,t,r,i){(0,n.jb)(f,r,t),(0,n.jb)(m,i,t),(0,n.$A)(e,f,m);let o=(0,n.Bw)(e);return 0!==o&&((0,n.hs)(e,e,1/o),!0)}r(32114),new i.I(a.vt),new i.I(()=>{return e?{p0:(0,o.o8)(e.p0),p1:(0,o.o8)(e.p1),p2:(0,o.o8)(e.p2)}:{p0:(0,o.vt)(),p1:(0,o.vt)(),p2:(0,o.vt)()};var e});const f=(0,o.vt)(),m=(0,o.vt)(),p=(0,o.vt)()},21015(e,t,r){r.d(t,{R:()=>l});var i=r(56507),n=r(60999),o=r(49186),a=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,a.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);let s=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,a.QP)(s.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>a});var i=r(34275),n=r(97146),o=r(63907);function a(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return[];let r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array;let r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}let n=e[0],o=e[1],a=0;for(let t=0;t<r;++t){let r=e[t+2];i[a++]=n,i[a++]=o,i[a++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>a,Xi:()=>n,pn:()=>s,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function a(e){let t=await new Blob([e]).text();return JSON.parse(t)}async function s(e,t){if("image/ktx2"===t)return new n(e);let r=new Blob([e],{type:t}),o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}let a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{let r=()=>{n(),e(a)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),a.removeEventListener("load",r),a.removeEventListener("error",i)};a.addEventListener("load",r),a.addEventListener("error",i),a.src=o});try{a.src=o,await a.decode()}catch{}return URL.revokeObjectURL(o),a}},24426(e,t,r){r.d(t,{fetch:()=>Tr});var i=r(40876),n=r(61473),o=r(34727),a=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),f=r(70328);function m(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Float32Array(e)}var p=r(13030),v=r(73354),g=r(50867),x=r(43609),_=r(21015),y=r(84498),b=r(51530),w=r(88340);function M(e){if(null==e)return null;let t=null==e.offset?w.uY:e.offset,r=null==e.rotation?0:e.rotation,i=null==e.scale?w.Un:e.scale,n=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(i[0],0,0,0,i[1],0,0,0,1),c=(0,s.vt)();return(0,a.lw)(c,o,l),(0,a.lw)(c,n,c),c}class T{constructor(){this.geometries=[],this.materials=[],this.textures=[]}}class S{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new T,this.numberOfVertices=0}}var C=r(56507),A=r(60999),E=r(49186),I=r(53966),O=r(69397);class P{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(let t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){let i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){let r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){let r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(let e of this._outer)yield e}*values(){for(let e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(let[e,t]of this._outer)for(let[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}clone(){let e=new P;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var D=r(17676),R=r(46140),F=r(97146),B=r(31217),N=r(46610),z=r(34275);function L(e){if(e.length<1024)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,z.LW)(e)?Float16Array.from(e):(0,z.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return(0,z.vZ)(e)?Float32Array.from(e):Uint32Array.from(e);default:return Float64Array.from(e)}}var H=r(15142),V=r(28540),U=r(620);class j{constructor(e,t,r,i){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this._readPosition=r,this._notifyMemoryChange=i,this._children=void 0,(0,U.vA)(e.length>=1);let n=e.length;Z.clear();let o=(0,f.Ie)();for(let i=0;i<n;++i){let n=t*e[i];for(let e=0;e<t;++e){let t=n+e;Z.push(t),(0,f.iT)(o,r(k,t))}}this.box=o;let a=new V.i,s=(0,f.gX)(o,a.center),l=.5*Math.max((0,f.VL)(o),(0,f.yr)(o),(0,f.uJ)(o)),c=l*l;for(let e=0;e<Z.length;++e){let t=r(k,Z.at(e)),i=(0,d.Re)(t,t,s),n=(0,d.uE)(i);if(n<=c)continue;let o=Math.sqrt(n),a=.5*(o-l);l+=a,c=l*l;let u=a/o;(0,d.Ln)(s,s,i,u)}a.radius=l,this.sphere=a,Z.clear()}get usedMemory(){let e=88+(0,O.rq)(this.box,8)+32+16+(0,O.rq)(this.sphere.center,8)+function(e){return(0,z.iu)(e)?145+((0,F.lc)(e)?0:e.byteLength):(0,F.lc)(e)?0:(0,O.rq)(e,O.JY)}(this.primitiveIndices),t=this._children;if(t){e+=(0,O.rq)(t,8);for(let r of t)e+=r.usedMemory}return e}get children(){if(this._children)return this._children;let e=this.box;if((0,f.TF)(e)<=1)return;let{_readPosition:t,_numIndexPerPrimitive:r,primitiveIndices:i}=this,n=(0,f.gX)(e,k),o=i.length,a=new Uint8Array(o),s=[0,0,0,0,0,0,0,0];for(let e=0;e<o;++e){let o=r*i[e],l=t(G,o);for(let e=1;e<r;++e)(0,d.jk)(l,l,t(W,o+e));let c=+(l[0]<n[0])|(l[1]<n[1]?2:0)|(l[2]<n[2]?4:0);a[e]=c,++s[c]}let l=0;for(let e=0;e<8;++e)s[e]>0&&++l;if(l<2)return;let c=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let e=0;e<8;++e)s[e]>0&&(c[e]=new Uint32Array(s[e]));s.fill(0);for(let e=0;e<o;++e){let t=a[e];c[t][s[t]++]=i[e]}let u=[];for(let e=0;e<8;++e){let i=c[e];void 0!==i&&u.push(new j(i,r,t,this._notifyMemoryChange))}return this._children=u,this._notifyMemoryChange?.((0,O.rq)(u,8)+u.reduce((e,t)=>e+t.usedMemory,0)),u}static prune(){Z.prune()}}const k=(0,h.vt)(),G=(0,h.vt)(),W=(0,h.vt)(),Z=new H.A({deallocator:null});var $=r(24326);class q{constructor(e){this.id=(0,$.c)(),this.type=0,this._attributes=new Map;for(let[t,r]of e)this._attributes.set(t,{...r,indices:(0,F.Dg)(r.indices)})}get attributes(){return this._attributes}}class Y{constructor(){this.uid=(0,$.c)()}}class X extends Y{constructor(e){super(),this.highlightName=e,this.channel=0}}var J=r(94656);class K extends q{get usedMemoryExcludingBuffers(){return this._usedMemory+this._primitivePositionIndicesMemory+(this._boundingInfo?.usedMemory??0)}get _primitivePositionIndicesMemory(){let e=this._vertexPositionIndicesCache;return e&&e!==this.positionAttribute?.indices?(0,O.ro)(e,O.JY):0}computeBufferMemory(e){let t=e.arrayMemory(this.mapPositions)+e.arrayMemory(this.drawIndices,O.JY,!0);for(let r of this.attributes.values())t+=e.arrayMemory(r.data)+e.arrayMemory(r.indices,O.JY,!0);return t}constructor(e,t,r=null,i=-1,n,o){super(t),this.material=e,this.mapPositions=r,this.edgeIndicesLength=i,this.baseGeometry=n,this.drawIndices=o,this._usedMemory=0,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,(0,U.vA)((e?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=function(e,t){let{data:r,indices:i,size:n,stride:o}=e;return(0,U.vA)(2===n||3===n||4===n,"Position attribute must have 2, 3 or 4 components"),2===n?null==t?(e,t)=>{let n=i[t]*o;return e[0]=r[n],e[1]=r[n+1],e[2]=-2,e}:(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=-2,e}:null==t?function(e,t,r){return(i,n)=>{let o=t[n]*r;return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i}}(r,i,o):(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=r[a+2],e}}(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(e={}){let t=new K(e.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:L(t.data)},this._attributes.set(e,t),"position"===e&&this._invalidateReadPrimitivePosition()),t}setAttributeData(e,t){let r=this._attributes.get(e);r?(this._attributes.set(e,{...r,exclusive:!0,data:t}),"position"===e&&this._invalidateReadPrimitivePosition()):(0,J.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;this._vertexPositionIndicesCache=this._computePrimitivePositionIndices();let e=this._primitivePositionIndicesMemory;return e&&this.notifyMemoryChange?.(e),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){let{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){let r=Array(e.length).fill(0);for(let i=0;i<e.length;i++)r[i]=t.indices[e[i]];return r}return t?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){return(this.drawIndices??this.positionAttribute?.indices)?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo||(this._boundingInfo=this._calculateBoundingInfo(),this._boundingInfo&&this.notifyMemoryChange?.(this._boundingInfo.usedMemory)),this._boundingInfo}computeAttachmentOrigin(e){return!!this.material.computeAttachmentOrigin(e,this.readPrimitivePosition,this.indexCount)&&(null!=this._transformation&&(0,d.Z0)(e,e,this._transformation),!0)}invalidateBoundingInfo(){let e=this._primitivePositionIndicesMemory+(this._boundingInfo?.usedMemory??0);this._boundingInfo=null,this._vertexPositionIndicesCache=void 0,e&&this.notifyMemoryChange?.(-e)}_calculateBoundingInfo(){let e=this.positionAttribute,t=this.indexCount;if(!e||0===t)return null;let r=this.material.primitiveVertexCount;(0,U.vA)(t%r===0,"Indexing error: "+t+" not divisible by "+r);let i=(0,F.tM)(t/r);return new j(i,r,this.readPrimitivePosition,e=>this.notifyMemoryChange?.(e))}get transformation(){return this._transformation??c.zK}set transformation(e){this._transformation=e&&e!==c.zK?(0,c.o8)(e):null}get highlights(){return this._highlights||Q}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){let t=new X(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);let{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){let{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const Q=new Set;var ee=r(76200),te=r(49255),re=r(97768);class ie{constructor(e){this._material=e.material,this._techniques=e.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}var ne=r(65786);class oe extends ie{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,re.Gz)(this._texture),this._textureNormal=(0,re.Gz)(this._textureNormal),this._textureEmissive=(0,re.Gz)(this._textureEmissive),this._textureOcclusion=(0,re.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,re.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new se(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){(null==this._texture||e!==this._texture.id)&&(this._texture=(0,re.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);let r=this._textures.acquire(e);(0,D.$X)(r)?(++this._numLoading,r.then(e=>{this._disposed?((0,re.Gz)(e),t(null)):t(e)}).finally(()=>--this._numLoading)):t(r)}}class ae extends ne.Y{constructor(e=null){super(),this.textureEmissive=e}}class se extends ae{constructor(e,t,r,i,n,o,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=a}}var le=r(48295);const ce=(0,h.vt)(),ue=(0,h.vt)(),de=(0,h.vt)(),he=(0,h.vt)();var fe=r(19245);class me{constructor(e,t){this.id=(0,$.c)(),this.supportsEdges=!1,this.primitiveVertexCount=3,this._renderPriority=0,this._parameters=new t,(0,fe.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,fe.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,te._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value,this._configuration.emissionDimmingPass=e.transparentWithoutDepthEmissionDimmingPass&&(0,te._o)(e.output)}computeAttachmentOrigin(e,t,r){return function(e,t,r){if(r<=0)return!1;(0,d.hZ)(e,0,0,0),(0,d.hZ)(he,0,0,0);let i=0,n=0;for(let o=0;o<r;++o){let r=3*o;t(ce,r),t(ue,r+1),t(de,r+2);let a=(0,le.BU)(ce,ue,de);a?((0,d.WQ)(ce,ce,ue),(0,d.WQ)(ce,ce,de),(0,d.hs)(ce,ce,1/3*a),(0,d.WQ)(e,e,ce),i+=a):((0,d.WQ)(he,he,ce),(0,d.WQ)(he,he,ue),(0,d.WQ)(he,he,de),n+=3)}return!(0===n&&0===i||(0===i?0===n||((0,d.hs)(e,he,1/n),0):((0,d.hs)(e,e,1/i),0)))}(e,t,r/3)}}ne.Y;var pe=r(58682),ve=r(90629),ge=r(65720),xe=r(27921),_e=r(19419),ye=r(11964);function be(e,t){return e.isRectangle?(0,_e.Uc)(e.bounds,t):function(e,t){return Me(e[0],e[1],t)}(t,e.points)}function we(e,t,r,i){let n=Math.min(t[0],r[0],i[0]),o=Math.min(t[1],r[1],i[1]),a=Math.max(t[0],r[0],i[0]),s=Math.max(t[1],r[1],i[1]);if(!function(e,t){if(!(0,_e.HY)(e.bounds,t))return!1;if(e.isRectangle)return!0;for(let r of e.points)if((0,_e.Uc)(t,r))return!0;if(function(e,t){let r=e[0],i=e[1],n=e[2],o=e[3];return Me(r,i,t)||Me(n,i,t)||Me(n,o,t)||Me(r,o,t)}(t,e.points))return!0;for(let r=0;r<e.points.length;r++)if(Te(e.points[r],r===e.points.length-1?e.points[0]:e.points[r+1],t))return!0;return!1}(e,(0,_e.fA)(n,o,a,s,Oe)))return!1;if(be(e,t)||be(e,r)||be(e,i))return!0;for(let n of e.points)if((0,le.cq)(t,r,i,n,Pe))return!0;for(let n=0;n<e.points.length;n++){let o=e.points[n],a=e.points[(n+1)%e.points.length];if(Ce(t,r,o,a)||Ce(r,i,o,a)||Ce(i,t,o,a))return!0}return!1}function Me(e,t,r){let i=!1;for(let n=0,o=r.length-1;n<r.length;o=n++){let a=r[n],s=r[o];a[1]>t!=s[1]>t&&e<(s[0]-a[0])*(t-a[1])/(s[1]-a[1])+a[0]&&(i=!i)}return i}function Te(e,t,r){let i=r[0],n=r[1],o=r[2],a=r[3],s=e[0],l=e[1],c=t[0],u=t[1];return!(s<i&&c<i||s>o&&c>o||l<n&&u<n||l>a&&u>a)&&(!(!(0,_e.Rj)(r,s,l)&&!(0,_e.Rj)(r,c,u))||Se(e,t,i,n,o,n)||Se(e,t,o,n,o,a)||Se(e,t,o,a,i,a)||Se(e,t,i,a,i,n))}function Se(e,t,r,i,n,o){let a=Ae(e[0],e[1],t[0],t[1],r,i),s=Ae(e[0],e[1],t[0],t[1],n,o),l=Ae(r,i,n,o,e[0],e[1]),c=Ae(r,i,n,o,t[0],t[1]);return a!==s&&l!==c||0===a&&Ee(e,t,r,i)||0===s&&Ee(e,t,n,o)||0===l&&Ie(r,i,n,o,e[0],e[1])||0===c&&Ie(r,i,n,o,t[0],t[1])}function Ce(e,t,r,i){return Se(e,t,r[0],r[1],i[0],i[1])}function Ae(e,t,r,i,n,o){let a=(i-t)*(n-r)-(r-e)*(o-i);return Math.abs(a)<=Pe?0:Math.sign(a)}function Ee(e,t,r,i){return Ie(e[0],e[1],t[0],t[1],r,i)}function Ie(e,t,r,i,n,o){return n>=Math.min(e,r)-Pe&&n<=Math.max(e,r)+Pe&&o>=Math.min(t,i)-Pe&&o<=Math.max(t,i)+Pe}const Oe=(0,_e.vt)(),Pe=((0,ve.r_)(),(0,ve.r_)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,ye.vt)(),1e-9);class De{constructor(e){this.type=e,this.distance=1/0,this.renderDistance=1/0,this.primitiveIndex=0,this.hasNormal=!1,this.point=(0,h.vt)(),this.normal=(0,h.vt)()}reset(){this.distance=1/0,this.renderDistance=1/0,this.hasNormal=!1}update(e,t,r,i,n=e){this.distance=e,this.renderDistance=n,this.primitiveIndex=t,(0,d.C)(this.point,r),this.hasNormal=null!=i,null!=i&&(0,d.C)(this.normal,i)}updateIfCloserFromValues(e,t,r,i,n=e){n<this.renderDistance&&this.update(e,t,r,i,n)}updateIfCloser(e){let{distance:t,renderDistance:r,primitiveIndex:i,point:n,normal:o}=e;this.updateIfCloserFromValues(t,i,n,e.hasNormal?o:null,r)}get valid(){return Number.isFinite(this.distance)}}function Re(e,t,r,i,n){if(!e.visible)return null;let o,a=new De(4);o=e.boundingInfo?Be(e.readPrimitivePosition,e.boundingInfo,t,r,i,n):Fe(t,r,i,0,e.faceCount,e.readPrimitivePosition,n,null,0);for(let e of o)a.updateIfCloser(e);return a.valid?a:null}function*Fe(e,t,r,i,n,o,a,s=null,l=0){if(null==e.camera)return;let{camera:c,screenPolygonPrimitiveProcessor:u}=e;for(let e=i;e<n;++e){let i=(s?.[e]??e)+l,n=null==s?i:e,h=3*i;Ne(Ve[0],o,h+0,a,n,t),Ne(Ve[1],o,h+1,a,n,t),Ne(Ve[2],o,h+2,a,n,t);let f,m=Ze;qe.reset();let p=Ue;for(let e of u.processTriangle(Ve))ze(r,e,c,p)&&(Le(c.eye,p,We),f??=(0,le.rb)(Ze,Ve[0],Ve[1],Ve[2]),qe.updateIfCloserFromValues((0,d.Io)(c.eye,We),i,We,f?m:null));qe.valid&&(yield qe)}}function*Be(e,t,r,i,n,o){let a;if(null==o?a=(0,ge.GH)(n.broadPhaseFrustum,t.box,i):((0,f.C)(He,t.box),o.applyToAabb(He),a=(0,ge.GH)(n.broadPhaseFrustum,He,i)),!a)return;let{primitiveIndices:s}=t,l=s.length;if(l>1e3){let a=t.children;if(void 0!==a){for(let t of a)yield*Be(e,t,r,i,n,o);return}}yield*Fe(r,i,n,0,l,e,o,s,0)}function Ne(e,t,r,i,n,o){let[a,s,l]=t(e,r);null==i?(0,d.hZ)(e,a,s,l):i.applyToVertex(e,a,s,l,n),o&&(0,d.Z0)(e,e,o)}function ze(e,t,r,i){if(i.length=0,(0,xe.H)(r.frustum[4],t,()=>i.pushNew()),i.length<3)return!1;let n=je,o=ke,a=Ge;r.projectToScreen(i.data[0],n),r.projectToScreen(i.data[1],o);for(let t=2;t<i.length;t++){if(r.projectToScreen(i.data[t],a),we(e,n,o,a))return!0;let s=o;o=a,a=s}return!1}function Le(e,t,r){let i=1/0,n=t.at(0);for(let o=1;o<t.length-1;o++){(0,le.k3)($e,e,n,t.at(o),t.at(o+1));let a=(0,d.hG)(e,$e);a<i&&(i=a,(0,d.C)(r,$e))}}const He=(0,f.vt)(),Ve=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()],Ue=new H.A({allocator:e=>e??(0,h.vt)()}),je=(0,ve.gs)(),ke=(0,ve.gs)(),Ge=(0,ve.gs)(),We=(0,h.vt)(),Ze=(0,h.vt)(),$e=(0,h.vt)(),qe=new De(4);var Ye=r(16396);function Xe(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length;r*=a;for(let e=0;e<s;++e){let t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=a}}function Je(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=3*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}else for(let e=0;e<l;++e){let t=3*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}}function Ke(e,t,r,i,n=1){let{data:o,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===o.length&&4===t){s[i]=o[0],s[i+1]=o[1],s[i+2]=o[2],s[i+3]=o[3];let e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;let u=c*n;for(let r=1;r<u;++r)e[i]=a,i+=t}else if(1===n){if(4===t){for(let e=0;e<c;++e){let t=4*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}return}for(let e=0;e<c;++e){let t=3*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}else if(4===t)for(let e=0;e<c;++e){let t=4*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}else for(let e=0;e<c;++e){let t=3*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}function Qe(e,t,r,i,n,o){switch(e){case"position":{(0,U.vA)(3===t.size);let i=n.getField(e,p.xs);(0,U.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Je(e,r,i,n);let{data:o,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,u=a.length,d=t[0],h=t[1],f=t[2],m=t[4],p=t[5],v=t[6],g=t[8],x=t[9],_=t[10],y=t[12],b=t[13],w=t[14];i*=c;let M=0,T=0,S=0,C=(0,l.tZ)(t)?e=>{M=o[e]+y,T=o[e+1]+b,S=o[e+2]+w}:e=>{let t=o[e],r=o[e+1],i=o[e+2];M=d*t+m*r+g*i+y,T=h*t+p*r+x*i+b,S=f*t+v*r+_*i+w};if(1===n)for(let e=0;e<u;++e)C(3*a[e]),s[i]=M,s[i+1]=T,s[i+2]=S,i+=c;else for(let e=0;e<u;++e){C(3*a[e]);for(let e=0;e<n;++e)s[i]=M,s[i+1]=T,s[i+2]=S,i+=c}}(t,r,i,o);break}case"normal":{(0,U.vA)(3===t.size);let r=n.getField(e,p.xs);(0,U.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Je(e,r,i,n);let{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=s[0],f=s[1],m=s[2],p=s[4],v=s[5],g=s[6],x=s[8],_=s[9],y=s[10],b=!(0,l.ut)(s),w=1e-6,M=.999999;i*=u;let T=0,S=0,C=0,A=(0,l.tZ)(s)?e=>{T=o[e],S=o[e+1],C=o[e+2]}:e=>{let t=o[e],r=o[e+1],i=o[e+2];T=h*t+p*r+x*i,S=f*t+v*r+_*i,C=m*t+g*r+y*i};if(1===n)if(b)for(let e=0;e<d;++e){A(3*a[e]);let t=T*T+S*S+C*C;if(t<M&&t>w){let e=1/Math.sqrt(t);c[i]=T*e,c[i+1]=S*e,c[i+2]=C*e}else c[i]=T,c[i+1]=S,c[i+2]=C;i+=u}else for(let e=0;e<d;++e)A(3*a[e]),c[i]=T,c[i+1]=S,c[i+2]=C,i+=u;else for(let e=0;e<d;++e){if(A(3*a[e]),b){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,U.vA)(2===t.size);let r=n.getField(e,p.mJ);(0,U.vA)(!!r,`No buffer view for ${e}`),Xe(t,r,o);break}case"uv0":{(0,U.vA)(2===t.size);let r=n.getField(e,p.ZD)??n.getField(e,p.gH);(0,U.vA)(!!r,`No buffer view for ${e}`),Xe(t,r,o);break}case"uvi":{(0,U.vA)(2===t.size);let r=n.getField(e,p.mJ);(0,U.vA)(!!r,`No buffer view for ${e}`),Xe(t,r,o);break}case"color":case"symbolColor":{let r=n.getField(e,p.XP);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(3===t.size||4===t.size),Ke(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{let r=n.getField(e,p.Y$)??n.getField(e,p.Y$);(0,U.vA)(!!r,`No buffer view for ${e}`),(0,U.vA)(1===t.size),function(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length,l=i[0];r*=a;for(let e=0;e<s;++e)o[r]=l,r+=a}(t,r,o);break}case"tangent":{(0,U.vA)(4===t.size);let i=n.getField(e,p.Eq);(0,U.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void function(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=4*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}else for(let e=0;e<l;++e){let t=4*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}}(e,r,i,n);let{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=s[0],f=s[1],m=s[2],p=s[4],v=s[5],g=s[6],x=s[8],_=s[9],y=s[10],b=!(0,l.ut)(s),w=1e-6,M=.999999;if(i*=u,1===n)for(let e=0;e<d;++e){let t=4*a[e],r=o[t],n=o[t+1],s=o[t+2],l=o[t+3],d=h*r+p*n+x*s,T=f*r+v*n+_*s,S=m*r+g*n+y*s;if(b){let e=d*d+T*T+S*S;if(e<M&&e>w){let t=1/Math.sqrt(e);d*=t,T*=t,S*=t}}c[i]=d,c[i+1]=T,c[i+2]=S,c[i+3]=l,i+=u}else for(let e=0;e<d;++e){let t=4*a[e],r=o[t],s=o[t+1],l=o[t+2],d=o[t+3],T=h*r+p*s+x*l,S=f*r+v*s+_*l,C=m*r+g*s+y*l;if(b){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,c[i+3]=d,i+=u}}(t,r,i,o);break}case"olidColor":(0,U.vA)(4===t.size),Ke(t,4,n.getField(e,p.XP),o)}}(0,h.vt)();class et{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i){null!=i&&function(e,t,r,i,n){let{buffer:o,offset:a}=n;for(let n of t.fields.keys()){let t=e.get(n),s=t?.indices;t&&s&&Qe(n,t,r,i,o,a)}}(r,this.layout,e,t,i)}}const tt=st(-1),rt=st(1),it=tt,nt=[];nt[0]=null,nt[1]=rt,nt[2]=tt,nt[3]=st(-2),nt[4]=st(-3);const ot=nt.map(e=>function(e,t){return t?{factor:e.factor+t.factor,units:e.units+t.units}:e}(it,e));function at({output:e,enableOITOffset:t,polygonOffset:r}){return(0,te._$)(e)&&t?ot[r]:nt[r]}function st(e){return{factor:1*e,units:2*e}}nt[1]=rt;var lt=r(32198),ct=r(51976),ut=r(34711);class dt extends ut.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,lt.Cg)([(0,ct.W)()],dt.prototype,"hasHighlightMixTexture",void 0),(0,lt.Cg)([(0,ct.W)()],dt.prototype,"emissionDimmingPass",void 0);class ht extends dt{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}function ft(e){return pt.output=+!!e.transparent,pt.polygonOffset=e.polygonOffset,pt.enableOITOffset=e.enableOITOffset,at(pt)}function mt({units:e,factor:t},r,i,n){let o=gt*e;return i+((n?1-Math.abs((0,d.Om)(r,n)):0)*t*vt+o)}(0,lt.Cg)([(0,ct.W)({count:5})],ht.prototype,"polygonOffset",void 0),(0,lt.Cg)([(0,ct.W)()],ht.prototype,"transparent",void 0),(0,lt.Cg)([(0,ct.W)()],ht.prototype,"enableOITOffset",void 0);const pt=new ht,vt=2e-5,gt=2e-6,xt=(0,h.vt)();var _t=r(91429),yt=r(91829),bt=r(4431),wt=r(1843),Mt=r(72824),Tt=r(13840),St=r(42958),Ct=r(16943),At=r(90644);const Et=(0,At.p3)(1,0,1,771);function It(e,t=!1,r=!1){if(r)return At.uR;switch(e){case 0:return t?At.RC:At.T8;case 1:return Et;default:return null}}function Ot(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?At.Uy:null;case 1:return null}}function Pt(e,t=513){return{func:(0,te._$)(e)?515:t}}(0,yt._Y)();const Dt={mask:255},Rt=(0,At.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),Ft=(0,At.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681});(0,At.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),(0,At.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680}),r(4576),r(66289);var Bt=r(69622),Nt=r(65529),zt=r(32728);class Lt{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",p.Eq),this.color=e.getField("instanceColor",p.XP),this.olidColor=e.getField("instanceOlidColor",p.XP),this.state=e.getField("state",p.SL),this.lodLevel=e.getField("lodLevel",p.SL)}}let Ht=class extends Bt.A{constructor(e,t){super(e),this.events=new Nt.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Ut(Vt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Zt,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Lt(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();let e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){let t=this._view.state;(0,U.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){let t=this._view.state;(0,U.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){let t=this._view,r=jt,i=kt;t.localTransform.getMat(e,Gt),t.globalTransform.getMat(e,Wt);let n=(0,l.lw)(Wt,Wt,Gt);(0,d.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,a.z0)(i,n),t.model.setMat(e,i);let o=(0,zt.wp)(jt,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,a.B8)(i,i),(0,a.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){let r=this._view;r.model.getMat(e,kt),r.modelOrigin.getVec(e,jt),t[0]=kt[0],t[1]=kt[1],t[2]=kt[2],t[3]=0,t[4]=kt[3],t[5]=kt[4],t[6]=kt[5],t[7]=0,t[8]=kt[6],t[9]=kt[7],t[10]=kt[8],t[11]=0,t[12]=jt[0],t[13]=jt[1],t[14]=jt[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(jt,this,e),t*=Math.max(jt[0],jt[1],jt[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(jt,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(jt[0],jt[1],jt[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){let{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){let t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){let t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){let r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){let r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Zt,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Lt(this._buffer)}_findSlot(){let e=this._view.state,t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,lt.Cg)([(0,_t.MZ)({constructOnly:!0})],Ht.prototype,"shaderTransformation",void 0),(0,lt.Cg)([(0,_t.MZ)()],Ht.prototype,"_size",void 0),(0,lt.Cg)([(0,_t.MZ)({readOnly:!0})],Ht.prototype,"size",null),Ht=(0,lt.Cg)([(0,_t.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ht);const Vt=(0,wt.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Ut(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Ct.E)()&&e.vec4u8("instanceOlidColor"),e}const jt=(0,h.vt)(),kt=(0,s.vt)(),Gt=(0,c.vt)(),Wt=(0,c.vt)(),Zt=64,$t=(0,wt.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var qt=r(74810),Yt=r(28491),Xt=r(49788);class Jt extends Mt.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=qt.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,yt.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Xt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Mt.gy;let Kt=class extends St.w{constructor(e,t){let i=(0,bt.U)(tr(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,bt.U)(function(e){return Ut($t.clone(),e)}(t)))),super(e,t,i),this.shader=new Tt.r(Yt.D,()=>r.e(5141).then(()=>r(5141))),this.ignoreUnused=!0}_makePipeline(e,t){let{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:a}=e;return(0,At.Ey)({blending:i?It(r,!1,e.emissionDimmingPass):null,culling:er(e)?(0,At.Xt)(n):null,depthTest:Pt(r,Qt(o)),depthWrite:Ot(e),colorWrite:At.kn,stencilWrite:a?Dt:null,stencilTest:a?t?Ft:Rt:null,polygonOffset:at(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function Qt(e){switch(e){case 1:return 515;case 0:case 4:return 513;case 2:return 516;case 3:return 514}}function er(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function tr(e){let t=(0,wt.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Ct.E)()&&t.vec4u8("olidColor"),t}Kt=(0,lt.Cg)([(0,_t.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Kt);class rr extends ht{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return+!!this.hasTextures}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,lt.Cg)([(0,ct.W)({count:4})],rr.prototype,"alphaDiscardMode",void 0),(0,lt.Cg)([(0,ct.W)({count:3})],rr.prototype,"doubleSidedMode",void 0),(0,lt.Cg)([(0,ct.W)({count:8})],rr.prototype,"pbrMode",void 0),(0,lt.Cg)([(0,ct.W)({count:3})],rr.prototype,"cullFace",void 0),(0,lt.Cg)([(0,ct.W)({count:3})],rr.prototype,"normalType",void 0),(0,lt.Cg)([(0,ct.W)({count:4})],rr.prototype,"customDepthTest",void 0),(0,lt.Cg)([(0,ct.W)({count:8})],rr.prototype,"emissionSource",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVertexColors",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasSymbolColors",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVerticalOffset",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasColorTexture",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasMetallicRoughnessTexture",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasOcclusionTexture",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasNormalTexture",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasScreenSizePerspective",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVertexTangents",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasOccludees",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"instanced",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"instancedDoublePrecision",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasModelTransformation",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"offsetBackfaces",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVVSize",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasVVColor",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"receiveShadows",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasShadowHighlights",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"receiveAmbientOcclusion",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"receiveGlobalIllumination",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"textureAlphaPremultiplied",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"instancedFeatureAttribute",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"instancedColor",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"writeDepth",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"snowCover",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasColorTextureTransform",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasEmissionTextureTransform",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasNormalTextureTransform",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasOcclusionTextureTransform",void 0),(0,lt.Cg)([(0,ct.W)()],rr.prototype,"hasMetallicRoughnessTextureTransform",void 0);var ir=r(57323);let nr=class extends Kt{constructor(){super(...arguments),this.shader=new Tt.r(ir.R,()=>r.e(9933).then(()=>r(39933)))}};nr=(0,lt.Cg)([(0,_t.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],nr);class or extends ct.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,lt.Cg)([(0,ct.W)()],or.prototype,"receiveShadows",void 0);class ar extends me{constructor(e,t){super(e,lr),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,te.uw)(e)&&!this.transparent],[4,e=>(0,te.uw)(e)&&this.transparent]]),this._layout=tr(this.parameters),this._configuration=new rr(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){let{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=Xt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);let{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;let{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=!i&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,te._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=r.receiveGlobalIllumination=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,i,n,o){let a=this._getMaterialVerticalOffset(t,r);null!=a&&(i=(0,d.Re)(cr,i,a),n=(0,d.Re)(ur,n,a)),o=function(e,t,r,i){let n=ft(t);if(!n)return e;let o=(0,d.oW)(xt,i,r);return(t,r,i,a)=>e(t,mt(n,o,r,i),i,a)}(o,this._configuration,i,n),(0,pe.Uy)(e,r,i,n,(0,Ye.ou)(r.verticalOffset),o)}intersectScreenPolygon(e,t,r,i){return function(e,t,r){return null==e?null:(e.renderDistance=function(e,t,r,i,n){let o=ft(r);return o?mt(o,(0,d.oW)(xt,n,i),e,t):e}(e.renderDistance,e.hasNormal?e.normal:null,t,r,e.point),e)}(Re(e,r,t,i,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new sr(e)}createBufferWriter(){return new et(this._layout)}get transparent(){let{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:i,texture:n,textureId:o,textureAlphaMode:a,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||i<1||(null!=n||null!=o)&&1!==a&&2!==a&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){let r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,i,n)=>(e[0]=t+r[0],e[1]=i+r[1],e[2]=n+r[2],e),applyToAabb:e=>((0,f.Ne)(e,(0,d.WQ)(vr,(0,f.pg)(e,vr),r)),(0,f.vI)(e,(0,d.WQ)(vr,(0,f.Lu)(e,vr),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;let r=t.camera;(0,d.hZ)(fr,e[12],e[13],e[14]);let i=null;switch(t.viewingMode){case 1:i=(0,d.S8)(hr,fr);break;case 2:i=(0,d.C)(hr,dr)}let n=(0,d.Re)(mr,fr,r.eye),o=(0,d.Bw)(n),a=(0,d.hs)(n,n,1/o),s=null;this.parameters.screenSizePerspective&&(s=(0,d.Om)(i,a));let l=(0,fe.kE)(r,o,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,d.hs)(i,i,l),(0,d.ei)(pr,i,t.transform.inverseRotation)}}class sr extends oe{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});let t=this._material.parameters;this.updateTexture(t.textureId);let r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?nr:Kt,e)}}class lr extends Jt{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const cr=(0,h.vt)(),ur=(0,h.vt)(),dr=(0,h.fA)(0,0,1),hr=(0,h.vt)(),fr=(0,h.vt)(),mr=(0,h.vt)(),pr=(0,h.vt)(),vr=(0,h.vt)(),gr=()=>I.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class xr{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function _r(e){let t=e.params,r=t.topology,i=!0;switch(t.vertexAttributes||(gr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{let e=t.faces;if(e){if(t.vertexAttributes)for(let r in t.vertexAttributes){let t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(gr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(gr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(gr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else gr().warn("Indexed geometries must specify faces"),i=!1;break}default:gr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(gr().warn("Geometry requires material"),i=!1);let n=e.params.vertexAttributes;for(let e in n)n[e].values||(gr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function yr(e){let t=(0,f.Ie)();return e.forEach(e=>{let r=e.boundingInfo;null!=r&&(0,f.RF)(t,r.box)}),t}function br(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function wr(e){let t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Mr=new R.A(1,2,"wosr");async function Tr(e,t){let o,a=function(e){let t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null==t[4]?null:Number(t[4])}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===a.fileType){let e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){let r=await async function(e,t){let r=await(0,A.Ke)((0,C.A)(e,t));if(r.ok)return r.value.data;(0,D.QP)(r.error),function(e){throw new E.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){let r=[];for(let i in e){let n=e[i],o=n.images[0].data;if(!o){gr().warn("Externally referenced texture data is not yet supported");continue}let a=n.encoding+";base64,"+o,s="/textureDefinitions/"+i,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==br(l)},u=t?.disableTextures?Promise.resolve(null):(0,B.D)(a,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}let i=await Promise.all(r),n={};for(let e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t),n=0;for(let e in i)if(i.hasOwnProperty(e)){let t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new xr(r,i,n+(0,O.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){let r=[],i=[],n=[],o=new P,a=e.resource,s=R.A.parse(a.version||"1.0","wosr");Mr.validate(s);let l=a.model.name,c=a.model.geometries,u=a.materialDefinitions??{},d=e.textures,f=0,m=new Map;for(let e=0;e<c.length;e++){let a=c[e];if(!_r(a))continue;let s=wr(a),l=a.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===a.params.topology)return null;let t=a.params.faces;for(let r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(let e in l){let t=l[e],r=t.values,i=v(e)??(0,F.tM)(x);p.push([e,new N.n(r,i,t.valuesPerElement,!0)])}let _=s.texture,y=d&&d[_];if(y&&!m.has(_)){let{image:e,parameters:t}=y,r=new ee.h(e,t);i.push(r),m.set(_,r)}let b=m.get(_),w=b?b.id:void 0,M=s.material,T=o.get(M,_);if(null==T){let e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);let r=y?br(y.alphaChannelUsage):void 0,i={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:w,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),T=new ar(i,t),o.set(M,_,T)}n.push(T);let S=new K(T,p);f+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:l,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:yr(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}if(t.cache)o=await t.cache.loadGLTF(a.url,t,!!t.usePBR,!!t.useEmissive);else{let{loadGLTF:e}=await r.e(1698).then(()=>r(51698));o=await e(new _.R,a.url,t,t.usePBR,t.useEmissive)}let{engineResources:s,referenceBoundingBox:m}=function(e,t,r){let n=e.model,o=e.meta,a=n.meta?.ESRI_proxyEllipsoid,s=o.isEsriSymbolResource&&null!=a&&"EsriRealisticTreesStyle"===o.ESRI_webstyle;s&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){let i=e.model.lods[r];for(let n of i.parts){let i=n.attributes.normal;if(null==i)return;let o=n.attributes.position,a=o.count,s=(0,h.vt)(),u=(0,h.vt)(),f=(0,h.vt)(),m=new Float32Array(4*a),v=new Float32Array(3*a),g=(0,l.B8)((0,c.vt)(),n.transform),x=0,_=0;for(let l=0;l<a;l++){o.getVec(l,u),i.getVec(l,s),(0,d.Z0)(u,u,n.transform),(0,d.Re)(f,u,t.center),(0,d.Qr)(f,f,t.radius);let a=f[2],c=(0,d.Bw)(f),h=Math.min(.45+.55*c*c,1)**2.2;(0,d.Qr)(f,f,t.radius),null!==g&&(0,d.Z0)(f,f,g),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(a>-1?(0,d.Cc)(f,f,s,.2):(0,d.Cc)(f,f,s,Math.min(-4*a-3.8,1))),v[x]=f[0],v[x+1]=f[1],v[x+2]=f[2],x+=3,m[_]=h,m[_+1]=h,m[_+2]=h,m[_+3]=1,_+=4}n.attributes.normal=new p.xs(v.buffer),n.attributes.color=new p.Eq(m.buffer)}}}(e,a));let m=!!t.usePBR,v=o.isEsriSymbolResource?{usePBR:m,isSchematic:!1,treeRendering:s,mrrFactors:qt.SY}:{usePBR:m,isSchematic:!1,treeRendering:!1,mrrFactors:qt.mb},g={...t.materialParameters,treeRendering:s},x=[],_=new Map,y=new Map,w=n.lods.length,T=(0,f.Ie)();return n.lods.forEach((e,o)=>{let a=!0===t.skipHighLods&&(w>1&&0===o||w>3&&1===o)||!1===t.skipHighLods&&null!=r&&o!==r;if(a&&0!==o)return;let l=new S(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{let r=a?new ar({},t):function(e,t,r,n,o,a,s,l,c){let d=e.materials.get(t.material);if(null==d)return null;let{normal:f,color:m,texCoord0:p,tangent:v}=t.attributes,g=t.material+(f?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(v?"_tangent":""),x=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,y=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!a.has(g)){if(x){let t=(t,r=!1,i=!1)=>{if(null!=t&&!s.has(t)){let n=e.textures.get(t);if(n){let e=n.data,o=r&&!(0,b.x3)(e)?l.compressionOptions:void 0;s.set(t,new ee.h((0,b.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,b.x3)(e)&&i,encoding:(0,b.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==y&&!c;t(d.colorTexture,r,1!==y),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}let r=(0,i.xV)(d.color[0]),f=(0,i.xV)(d.color[1]),m=(0,i.xV)(d.color[2]),p=null!=d.colorTexture&&x?s.get(d.colorTexture):null,v=(0,qt.Jr)(d),w=null==d.normalTextureTransform?.scale?u.Un:d.normalTextureTransform?.scale;a.set(g,new ar({...n,customDepthTest:1,textureAlphaMode:y,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,f,m],ambient:[r,f,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,unlit:d.unlit,textureId:p?.id,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&x?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&x?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&x&&!d.unlit?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&x?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:d.unlit?h.uY:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null==d.emissiveStrengthKHR?1:d.emissiveStrengthKHR,emissiveStrengthFromSymbol:null==o.emissiveStrengthFromSymbol?void 0:o.emissiveStrengthFromSymbol,mrrFactors:v?qt.Bt:[d.metallicFactor,d.roughnessFactor,n.mrrFactors[2]],isSchematic:v,colorTextureTransformMatrix:M(d.colorTextureTransform),normalTextureTransformMatrix:M(d.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:M(d.occlusionTextureTransform),emissiveTextureTransformMatrix:M(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(d.metallicRoughnessTextureTransform),...o},l))}let w=a.get(g);if(r.stageResources.materials.push(w),x){let e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return w}(n,e,l,v,g,_,y,t,s),{geometry:c,vertexCount:d}=Sr(e,r??new ar({},t)),m=c.boundingInfo;null!=m&&0===o&&(0,f.RF)(T,m.box),null!=r&&(l.stageResources.geometries.push(c),l.numberOfVertices+=d)}),a||x.push(l)}),{engineResources:x,referenceBoundingBox:T}}(o,t,a.specifiedLodIndex);return{lods:s,referenceBoundingBox:m,isEsriSymbolResource:o.meta.isEsriSymbolResource,isWosr:!1}}function Sr(e,t){let r=e.attributes.position.count,i=(0,y.x)(e.indices||r,e.primitiveType),n=m(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,v.t)(n,s,e.transform,3,l);let c=[["position",new N.n(n,i,3,!0)]];if(null!=e.attributes.normal){let t=m(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.normal;(0,a.Ge)(Cr,e.transform),(0,v.b)(t,n,Cr,3,s),(0,o.or)(Cr)&&(0,v.n)(t,t),c.push(["normal",new N.n(t,i,3,!0)])}if(null!=e.attributes.tangent){let t=m(4*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.tangent;(0,a.z0)(Cr,e.transform),(0,g.t)(t,n,Cr,4,s),(0,o.or)(Cr)&&(0,v.n)(t,t,4),c.push(["tangent",new N.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){let t=m(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),c.push(["uv0",new N.n(t,i,2,!0)])}let u=e.attributes.color;if(null!=u){let t=new Uint8Array(4*r);4===u.elementCount?u instanceof p.Eq?(0,g.b)(t,u,1,255):(u instanceof p.XP||u instanceof p.Uz)&&(0,g.b)(t,u,1/255,255):(t.fill(255),u instanceof p.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof p.eI||e.attributes.color instanceof p.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new N.n(t,i,4,!0)])}return{geometry:new K(t,c),vertexCount:r}}const Cr=(0,s.vt)()},26857(e,t,r){var i=r(32198),n=r(69622),o=r(91429);let a=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.UPDATING=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],a.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"UPDATING",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),a=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],a);const s=new a;r.d(t,["b",0,s])},46686(e,t,r){r.d(t,{A7:()=>o,Y0:()=>n});var i=r(29941);class n extends i.v{constructor(e){super(),this.spherical=e,this.draped=!1}}function o(e){(function(e){e.varyings.add("linearDepth","float",{invariant:!0})})(e),e.vertex.code.add("void forwardLinearDepth(float _linearDepth) { linearDepth = _linearDepth; }")}},32680(e,t,r){r.d(t,{M:()=>n});var i=r(31821);function n(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
|
|
224
|
-
vec3 camToVert = posWorld - camPosWorld;
|
|
225
|
-
bool isBackface = dot(camToVert, normalWorld) > 0.0;
|
|
226
|
-
if (isBackface) {
|
|
227
|
-
posClip.z += 0.0000003 * posClip.w;
|
|
228
|
-
}
|
|
229
|
-
return posClip;
|
|
230
|
-
}`)}},82048(e,t,r){r.d(t,{c:()=>n});var i=r(31821);function n(e,t=!0){e.attributes.add("position","vec2"),t&&e.varyings.add("uv","vec2"),e.vertex.main.add(i.H`
|
|
231
|
-
gl_Position = vec4(position, 0.0, 1.0);
|
|
232
|
-
${t?i.H`uv = position * 0.5 + vec2(0.5);`:""}
|
|
233
|
-
`)}},49255(e,t,r){function i(e){return function(e){return function(e){return function(e){return a(e)||function(e){return 10===e||11===e}(e)}(e)||function(e){return 3===e}(e)}(e)||function(e){return 4===e}(e)}(e)||function(e){return 5===(t=e)||6===t||7===t||8===e||9===e;var t}(e)}function n(e){return 1===e}function o(e){return 2===e}function a(e){return 0===e||function(e){return n(e)||o(e)}(e)}r.d(t,{Rb:()=>o,_$:()=>n,_o:()=>a,uw:()=>i})},29941(e,t,r){r.d(t,{v:()=>o});var i=r(32198),n=r(51976);class o extends n.K{constructor(){super(...arguments),this.output=0,this.hasEmission=!1,this.useFloatBlend=!0}}(0,i.Cg)([(0,n.W)({count:12})],o.prototype,"output",void 0),(0,i.Cg)([(0,n.W)()],o.prototype,"hasEmission",void 0),(0,i.Cg)([(0,n.W)()],o.prototype,"useFloatBlend",void 0)},34711(e,t,r){r.d(t,{Hz:()=>m,zM:()=>p});var i=r(32198),n=r(58083),o=r(9093),a=r(35522),s=r(51850),l=r(29941);class c extends l.v{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}var u=r(40710),d=(r(33079),r(31821)),h=r(51976),f=r(65786);class m extends c{constructor(){super(...arguments),this.hasSlicePlane=!1,this.hasSliceTranslatedView=!1}}function p(e,t){!function(e,t,...r){e.constants.add("groundSliceOpacity","float",.2),function(e,t,...r){t.hasSlicePlane?(e.uniforms.add(...r),e.code.add(d.H`struct SliceFactors {
|
|
234
|
-
float front;
|
|
235
|
-
float side0;
|
|
236
|
-
float side1;
|
|
237
|
-
float side2;
|
|
238
|
-
float side3;
|
|
239
|
-
};
|
|
240
|
-
SliceFactors calculateSliceFactors(vec3 pos) {
|
|
241
|
-
vec3 rel = pos - slicePlaneOrigin;
|
|
242
|
-
vec3 slicePlaneNormal = -cross(slicePlaneBasis1, slicePlaneBasis2);
|
|
243
|
-
float slicePlaneW = -dot(slicePlaneNormal, slicePlaneOrigin);
|
|
244
|
-
float basis1Len2 = dot(slicePlaneBasis1, slicePlaneBasis1);
|
|
245
|
-
float basis2Len2 = dot(slicePlaneBasis2, slicePlaneBasis2);
|
|
246
|
-
float basis1Dot = dot(slicePlaneBasis1, rel);
|
|
247
|
-
float basis2Dot = dot(slicePlaneBasis2, rel);
|
|
248
|
-
return SliceFactors(
|
|
249
|
-
dot(slicePlaneNormal, pos) + slicePlaneW,
|
|
250
|
-
-basis1Dot - basis1Len2,
|
|
251
|
-
basis1Dot - basis1Len2,
|
|
252
|
-
-basis2Dot - basis2Len2,
|
|
253
|
-
basis2Dot - basis2Len2
|
|
254
|
-
);
|
|
255
|
-
}
|
|
256
|
-
bool sliceByFactors(SliceFactors factors) {
|
|
257
|
-
return factors.front < 0.0
|
|
258
|
-
&& factors.side0 < 0.0
|
|
259
|
-
&& factors.side1 < 0.0
|
|
260
|
-
&& factors.side2 < 0.0
|
|
261
|
-
&& factors.side3 < 0.0;
|
|
262
|
-
}
|
|
263
|
-
bool sliceEnabled() {
|
|
264
|
-
return dot(slicePlaneBasis1, slicePlaneBasis1) != 0.0;
|
|
265
|
-
}
|
|
266
|
-
bool rejectBySlice(vec3 pos) {
|
|
267
|
-
return sliceEnabled() && sliceByFactors(calculateSliceFactors(pos));
|
|
268
|
-
}`)):e.code.add("bool rejectBySlice(vec3 pos) { return false; }")}(e,t,...r),t.hasSlicePlane?e.code.add("\n void discardBySlice(vec3 pos) {\n if (rejectBySlice(pos)) {\n discard;\n }\n }\n\n vec4 applySliceOutline(vec4 color, vec3 pos) {\n SliceFactors factors = calculateSliceFactors(pos);\n\n factors.front /= 2.0 * fwidth(factors.front);\n factors.side0 /= 2.0 * fwidth(factors.side0);\n factors.side1 /= 2.0 * fwidth(factors.side1);\n factors.side2 /= 2.0 * fwidth(factors.side2);\n factors.side3 /= 2.0 * fwidth(factors.side3);\n\n // return after calling fwidth, to avoid aliasing caused by discontinuities in the input to fwidth\n if (sliceByFactors(factors)) {\n return color;\n }\n\n float outlineFactor = (1.0 - step(0.5, factors.front))\n * (1.0 - step(0.5, factors.side0))\n * (1.0 - step(0.5, factors.side1))\n * (1.0 - step(0.5, factors.side2))\n * (1.0 - step(0.5, factors.side3));\n\n return mix(color, vec4(vec3(0.0), color.a), outlineFactor * 0.3);\n }\n\n vec4 applySlice(vec4 color, vec3 pos) {\n return sliceEnabled() ? applySliceOutline(color, pos) : color;\n }\n "):e.code.add(d.H`void discardBySlice(vec3 pos) { }
|
|
269
|
-
vec4 applySlice(vec4 color, vec3 pos) { return color; }`)}(e,t,...function(e){return[new u.W("slicePlaneOrigin",(t,r)=>function(e,t,r){if(null==r.slicePlane)return s.uY;let i=v(e,t,r),n=g(i,r.slicePlane),o=x(e,i,r);return null==o?n:(0,a.Z0)(b,n,o)}(e,t,r)),new u.W("slicePlaneBasis1",(t,r)=>_(e,t,r,r.slicePlane?.basis1)),new u.W("slicePlaneBasis2",(t,r)=>_(e,t,r,r.slicePlane?.basis2))]}(t))}function v(e,t,r){return e.instancedDoublePrecision?(0,a.hZ)(y,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]):t.slicePlaneLocalOrigin}function g(e,t){return null==e?t.origin:(0,a.Re)(b,t.origin,e)}function x(e,t,r){return e.hasSliceTranslatedView?null==t?r.camera.viewMatrix:(0,n.Tl)(M,r.camera.viewMatrix,t):null}function _(e,t,r,i){if(null==i||null==r.slicePlane)return s.uY;let n=v(e,t,r),o=g(n,r.slicePlane),l=x(e,n,r);return null==l?i:((0,a.WQ)(w,i,o),(0,a.Z0)(b,o,l),(0,a.Z0)(w,w,l),(0,a.Re)(w,w,b))}(0,i.Cg)([(0,h.W)()],m.prototype,"hasSlicePlane",void 0),f.Y;const y=(0,s.vt)(),b=(0,s.vt)(),w=(0,s.vt)(),M=(0,o.vt)()},71020(e,t,r){r.d(t,{d:()=>n}),r(46686),r(41095),r(45324);var i=r(31821);function n(e){e.vertex.code.add(i.H`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
270
|
-
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
271
|
-
}`),e.vertex.code.add(i.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
|
|
272
|
-
vec4 eye = view * vec4(pos, 1.0);
|
|
273
|
-
depth = calculateLinearDepth(nearFar,eye.z);
|
|
274
|
-
return proj * eye;
|
|
275
|
-
}`),e.vertex.code.add(i.H`vec4 transformPosition(mat4 proj, mat4 view, vec3 pos) {
|
|
276
|
-
return proj * (view * vec4(pos, 1.0));
|
|
277
|
-
}`)}},72722(e,t,r){r.d(t,{B:()=>y});var i=r(77690),n=r(29242),o=r(9093),a=r(35522),s=r(51850),l=r(45324),c=r(26425),u=r(23205),d=r(31821),h=r(35644),f=r(74333);class m extends f.n{constructor(e,t,r){super(e,"mat4",1,(i,n,o)=>i.setUniformMatrix4fv(e,t(n,o),r))}}var p=r(46606);function v(e,t){let r=e.length;for(let i=0;i<r;++i)x[0]=e[i],t[i]=x[0];return t}function g(e,t){let r=e.length;for(let i=0;i<r;++i)x[0]=e[i],x[1]=e[i]-x[0],t[i]=x[1];return t}const x=new Float32Array(2);p.S;const _=(0,n.vt)();function y(e,t){let{hasModelTransformation:r,instancedDoublePrecision:n,instanced:s,output:f,hasVertexTangents:p}=t;r&&e.vertex.uniforms.add(new m("model",e=>e.modelTransformation??o.zK),new h.k("normalLocalOriginFromModel",e=>((0,i.Ge)(_,e.modelTransformation??o.zK),_))),s&&n&&(e.attributes.add("instanceModelOriginHi","vec3"),e.attributes.add("instanceModelOriginLo","vec3"),e.attributes.add("instanceModel","mat3"),e.attributes.add("instanceModelNormal","mat3"));let x=e.vertex;n&&(x.include(c.u),x.uniforms.add(new u.d("viewOriginHi",e=>v((0,a.hZ)(b,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),b)),new u.d("viewOriginLo",e=>g((0,a.hZ)(b,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),b)))),x.code.add(d.H`
|
|
278
|
-
vec3 getVertexInLocalOriginSpace() {
|
|
279
|
-
return ${r?n?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":n?"instanceModel * localPosition().xyz":"localPosition().xyz"};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
vec3 subtractOrigin(vec3 _pos) {
|
|
283
|
-
${n?d.H`
|
|
284
|
-
// Issue: (should be resolved now with invariant position) https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/56280
|
|
285
|
-
vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -instanceModelOriginHi, -instanceModelOriginLo);
|
|
286
|
-
return _pos - originDelta;`:"return vpos;"}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
vec3 dpNormal(vec4 _normal) {
|
|
290
|
-
return normalize(${r?n?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":n?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
|
|
291
|
-
}
|
|
292
|
-
`),4===f&&x.uniforms.add(l.HO).code.add(d.H`
|
|
293
|
-
vec3 dpNormalView(vec4 _normal) {
|
|
294
|
-
return normalize((viewNormal * ${r?n?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":n?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
|
|
295
|
-
}
|
|
296
|
-
`),p&&x.code.add(d.H`
|
|
297
|
-
vec4 dpTransformVertexTangent(vec4 _tangent) {
|
|
298
|
-
${r?n?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":n?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
|
|
299
|
-
}`)}const b=(0,s.vt)()},43519(e,t,r){r.d(t,{ML:()=>a,WD:()=>n,Y1:()=>o,oF:()=>s});var i=r(31821);function n(e){e.code.add(i.H`struct MaskedColor {
|
|
300
|
-
vec4 color;
|
|
301
|
-
bvec4 mask;
|
|
302
|
-
};`)}function o(e){e.include(n),e.code.add(i.H`
|
|
303
|
-
MaskedColor createMaskedFromUInt8NaNColor(vec4 color) {
|
|
304
|
-
return MaskedColor(color * ${i.H.float(1/254)}, equal(color, vec4(255)));
|
|
305
|
-
}
|
|
306
|
-
`)}function a(e){e.include(n),e.code.add(i.H`vec4 maskedColorSelectOrOne(MaskedColor color) {
|
|
307
|
-
return vec4(
|
|
308
|
-
color.mask.r ? 1.0 : color.color.r,
|
|
309
|
-
color.mask.g ? 1.0 : color.color.g,
|
|
310
|
-
color.mask.b ? 1.0 : color.color.b,
|
|
311
|
-
color.mask.a ? 1.0 : color.color.a
|
|
312
|
-
);
|
|
313
|
-
}
|
|
314
|
-
MaskedColor multiplyMaskedColors(MaskedColor color1, MaskedColor color2) {
|
|
315
|
-
vec4 masked1 = maskedColorSelectOrOne(color1);
|
|
316
|
-
vec4 masked2 = maskedColorSelectOrOne(color2);
|
|
317
|
-
return MaskedColor(masked1 * masked2, bvec4(ivec4(color1.mask) & ivec4(color2.mask)));
|
|
318
|
-
}`)}function s(e){e.include(n),e.code.add(i.H`MaskedColor createMaskedFromNaNColor(vec4 color) {
|
|
319
|
-
return MaskedColor(color, isnan(color));
|
|
320
|
-
}`)}},96336(e,t,r){r.d(t,{Y:()=>n});var i=r(31821);function n(e,t){switch(e.fragment.code.add(i.H`vec3 screenDerivativeNormal(vec3 positionView) {
|
|
321
|
-
return normalize(cross(dFdx(positionView), dFdy(positionView)));
|
|
322
|
-
}`),t.normalType){case 1:e.attributes.add("normalCompressed","vec2"),e.vertex.code.add(i.H`vec3 decompressNormal(vec2 normal) {
|
|
323
|
-
float z = 1.0 - abs(normal.x) - abs(normal.y);
|
|
324
|
-
return vec3(normal + sign(normal) * min(z, 0.0), z);
|
|
325
|
-
}
|
|
326
|
-
vec3 normalModel() {
|
|
327
|
-
return decompressNormal(normalCompressed);
|
|
328
|
-
}`);break;case 0:e.attributes.add("normal","vec3"),e.vertex.code.add(i.H`vec3 normalModel() {
|
|
329
|
-
return normal;
|
|
330
|
-
}`);break;default:t.normalType;case 2:case 3:}}},53466(e,t,r){r.d(t,{U:()=>n});var i=r(31821);function n(e,t){switch(t.textureCoordinateType){case 1:return e.attributes.add("uv0","vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(i.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case 2:return e.attributes.add("uv0","vec2"),e.attributes.add("uvRegion","vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(i.H`void forwardTextureCoordinates() {
|
|
331
|
-
vuv0 = uv0;
|
|
332
|
-
vuvRegion = uvRegion;
|
|
333
|
-
}`);default:t.textureCoordinateType;case 0:return void e.vertex.code.add(i.H`void forwardTextureCoordinates() {}`);case 3:return}}},72824(e,t,r){r.d(t,{Mh:()=>c,Zo:()=>u,gy:()=>d});var i=r(29242),n=r(91829),o=r(96336),a=r(41095),s=r(31821),l=r(35644);function c(e,t){let{vertex:r,varyings:i}=e;switch(t.normalType){case 0:case 1:e.include(o.Y,t),i.add("vNormalWorld","vec3"),i.add("vNormalView","vec3"),r.uniforms.add(new l.k("transformNormalViewFromGlobal",e=>e.transformNormalViewFromGlobal)),r.code.add(s.H`void forwardNormal() {
|
|
334
|
-
vNormalWorld = normalModel();
|
|
335
|
-
vNormalView = transformNormalViewFromGlobal * vNormalWorld;
|
|
336
|
-
}`);break;case 2:e.vertex.code.add(s.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class u extends a.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,i.vt)()}}class d extends a.EM{constructor(){super(...arguments),this.toMapSpace=(0,n.vt)()}}},41095(e,t,r){r.d(t,{EM:()=>l,dO:()=>s});var i=r(29242),n=r(51850),o=(r(45324),r(26425),r(40710),r(33079),r(31821),r(74333));o.n,o.n,r(35644),r(63761),r(51976).K;var a=r(65786);class s extends a.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,n.vt)(),this.transformWorldFromViewTL=(0,n.vt)(),this.transformViewFromCameraRelativeRS=(0,i.vt)()}}class l extends a.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,i.vt)(),this.transformWorldFromModelTH=(0,n.vt)(),this.transformWorldFromModelTL=(0,n.vt)(),this.transformationDrawId=0}}},99208(e,t,r){r.d(t,{r:()=>a});var i=r(53466),n=r(31821);function o(e){e.fragment.code.add(n.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
|
|
337
|
-
vec2 atlasScale = atlasRegion.zw - atlasRegion.xy;
|
|
338
|
-
vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy;
|
|
339
|
-
float maxdUV = 0.125;
|
|
340
|
-
vec2 dUVdx = clamp(dFdx(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
341
|
-
vec2 dUVdy = clamp(dFdy(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
342
|
-
return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
|
|
343
|
-
}`)}function a(e,t){let{textureCoordinateType:r}=t;if(0===r||3===r)return;e.include(i.U,t);let a=2===r;a&&e.include(o),e.fragment.code.add(n.H`
|
|
344
|
-
vec4 textureLookup(sampler2D tex, vec2 uv) {
|
|
345
|
-
return ${a?"textureAtlasLookup(tex, uv, vuvRegion)":"texture(tex, uv)"};
|
|
346
|
-
}
|
|
347
|
-
`)}},54154(e,t,r){r.d(t,{Ge:()=>m}),r(90629);var i=r(78955),n=r(91829),o=r(7290),a=r(35522),s=r(51850),l=r(33079),c=r(31821);function u(e){e.vertex.code.add(c.H`float screenSizePerspectiveViewAngleDependentFactor(float absCosAngle) {
|
|
348
|
-
return absCosAngle * absCosAngle * absCosAngle;
|
|
349
|
-
}`),e.vertex.code.add(c.H`vec3 screenSizePerspectiveScaleFactor(float absCosAngle, float distanceToCamera, vec3 params) {
|
|
350
|
-
return vec3(
|
|
351
|
-
min(params.x / (distanceToCamera - params.y), 1.0),
|
|
352
|
-
screenSizePerspectiveViewAngleDependentFactor(absCosAngle),
|
|
353
|
-
params.z
|
|
354
|
-
);
|
|
355
|
-
}`),e.vertex.code.add(c.H`float applyScreenSizePerspectiveScaleFactorFloat(float size, vec3 factor) {
|
|
356
|
-
return size * clamp(mix(factor.x, 1.0, factor.y), factor.z, 1.0);
|
|
357
|
-
}`),e.vertex.code.add(c.H`float screenSizePerspectiveScaleFloat(float size, float absCosAngle, float distanceToCamera, vec3 params) {
|
|
358
|
-
return applyScreenSizePerspectiveScaleFactorFloat(
|
|
359
|
-
size,
|
|
360
|
-
screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)
|
|
361
|
-
);
|
|
362
|
-
}`),e.vertex.code.add(c.H`vec2 applyScreenSizePerspectiveScaleFactorVec2(vec2 size, vec3 factor) {
|
|
363
|
-
return size * clamp(mix(factor.x, 1.0, factor.y), factor.z, 1.0);
|
|
364
|
-
}`),e.vertex.code.add(c.H`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec3 params) {
|
|
365
|
-
return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params));
|
|
366
|
-
}`)}const d=(0,s.vt)();var h=r(20693),f=r(71988);function m(e,t){let r=e.vertex;t.hasVerticalOffset?(r.include(o.j,t),function(e){e.uniforms.add(new f.E("verticalOffset",(e,t)=>{let{minWorldLength:r,maxWorldLength:n,screenLength:o}=e.verticalOffset,a=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),s=t.camera.pixelRatio||1;return(0,i.hZ)(p,o*s,a,r,n)}))}(r),t.hasScreenSizePerspective&&(e.include(u),function(e){e.uniforms.add(new l.t("screenSizePerspectiveAlignment",e=>function(e,t){let r=null!=t&&null!=e?Math.min(e.minPixelSize/t,1):0;return e?(0,a.hZ)(d,e.divisor,e.offset,r):(0,a.hZ)(d,0,0,0)}(e.screenSizePerspectiveAlignment||e.screenSizePerspective,e.screenSizePerspectiveAlignment?null:e.screenSizePerspectiveMinPixelReferenceSize)))}(r),(0,h.y)(e.vertex,t)),r.code.add(c.H`
|
|
367
|
-
vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
368
|
-
float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);
|
|
369
|
-
vec3 worldNormal = getLocalUp(worldPos, localOrigin);
|
|
370
|
-
${t.hasScreenSizePerspective?c.H`
|
|
371
|
-
float cosAngle = dot(worldNormal, normalize(worldPos - cameraPosition));
|
|
372
|
-
float verticalOffsetScreenHeight = screenSizePerspectiveScaleFloat(verticalOffset.x, abs(cosAngle), viewDistance, screenSizePerspectiveAlignment);`:c.H`
|
|
373
|
-
float verticalOffsetScreenHeight = verticalOffset.x;`}
|
|
374
|
-
// Screen sized offset in world space, used for example for line callouts
|
|
375
|
-
float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * viewDistance, verticalOffset.z, verticalOffset.w);
|
|
376
|
-
return worldNormal * worldOffset;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
380
|
-
return worldPos + calculateVerticalOffset(worldPos, localOrigin);
|
|
381
|
-
}
|
|
382
|
-
`)):r.code.add(c.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const p=(0,n.vt)()},72657(e,t,r){var i=r(12791);new i.x("depthMap",e=>e.depth?.attachment);const n=new i.x("mainDepth",e=>e.mainDepth),o=(new i.x("waterNormals",e=>e.overlay?.getTexture(3)),new i.x("shadowHighlight",e=>e.shadowHighlight?.getTexture()));r.d(t,["Xb",0,n,"ri",0,o])},9169(e,t,r){r.d(t,{E:()=>x});var i=r(34711),n=r(71020),o=r(96336),a=r(31821);function s(e,t){if(11!==t.output)return e.vertex.code.add(a.H`void forwardObjectAndLayerIdColor() {}`),void e.fragment.code.add(a.H`void outputObjectAndLayerIdColor() {}`);let r=t.instanced;e.varyings.add("objectAndLayerIdColorVarying","vec4");let i=r?"instanceOlidColor":"olidColor";e.attributes.add(i,"vec4"),e.vertex.code.add(a.H`
|
|
383
|
-
void forwardObjectAndLayerIdColor() {
|
|
384
|
-
objectAndLayerIdColorVarying = ${i} * 0.003921568627451;
|
|
385
|
-
}`),e.fragment.code.add(a.H`void outputObjectAndLayerIdColor() {
|
|
386
|
-
fragColor = objectAndLayerIdColorVarying;
|
|
387
|
-
}`)}var l=r(53466),c=r(72824),u=r(12696);function d(e,t){switch(t.output){case 5:case 6:case 7:case 8:e.fragment.code.add(a.H`void outputDepth(float _linearDepth){
|
|
388
|
-
const float slope_scale = 2.0;
|
|
389
|
-
const float bias = 20.0 * .000015259;
|
|
390
|
-
float m = max(abs(dFdx(_linearDepth)), abs(dFdy(_linearDepth)));
|
|
391
|
-
gl_FragDepth = _linearDepth + slope_scale * m + bias;
|
|
392
|
-
}`)}}var h=r(42593),f=r(89435),m=r(45324),p=r(58614),v=r(20693),g=r(63761);function x(e,t){let{vertex:r,fragment:x,varyings:_}=e,{hasColorTexture:y,alphaDiscardMode:b}=t,w=y&&1!==b,{output:M,normalType:T,hasColorTextureTransform:S}=t;switch(M){case 3:(0,v.N)(r,t),e.include(n.d),x.include(i.zM,t),e.include(l.U,t),w&&x.uniforms.add(new g.N("tex",e=>e.texture)),r.main.add(a.H`vpos = getVertexInLocalOriginSpace();
|
|
393
|
-
vpos = subtractOrigin(vpos);
|
|
394
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
395
|
-
gl_Position = transformPosition(proj, view, vpos);
|
|
396
|
-
forwardTextureCoordinates();`),e.include(p.SS,t),x.main.add(a.H`
|
|
397
|
-
discardBySlice(vpos);
|
|
398
|
-
${(0,a.If)(w,a.H`vec4 texColor = texture(tex, ${S?"colorUV":"vuv0"});
|
|
399
|
-
discardOrAdjustAlpha(texColor);`)}`);break;case 5:case 6:case 7:case 8:case 11:(0,v.N)(r,t),e.include(n.d),e.include(l.U,t),e.include(f.A,t),e.include(d,t),x.include(i.zM,t),e.include(s,t),_.add("depth","float",{invariant:!0}),w&&x.uniforms.add(new g.N("tex",e=>e.texture)),r.uniforms.add(m.Y$).main.add(a.H`vpos = getVertexInLocalOriginSpace();
|
|
400
|
-
vpos = subtractOrigin(vpos);
|
|
401
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
402
|
-
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);
|
|
403
|
-
forwardTextureCoordinates();
|
|
404
|
-
forwardObjectAndLayerIdColor();`),e.include(p.SS,t),x.main.add(a.H`
|
|
405
|
-
discardBySlice(vpos);
|
|
406
|
-
${(0,a.If)(w,a.H`vec4 texColor = texture(tex, ${S?"colorUV":"vuv0"});
|
|
407
|
-
discardOrAdjustAlpha(texColor);`)}
|
|
408
|
-
${11===M?a.H`outputObjectAndLayerIdColor();`:a.H`outputDepth(depth);`}`);break;case 4:{(0,v.N)(r,t),e.include(n.d),e.include(o.Y,t),e.include(c.Mh,t),e.include(l.U,t),e.include(f.A,t),e.include(u.F,t),w&&x.uniforms.add(new g.N("tex",e=>e.texture)),2===T&&_.add("vPositionView","vec3",{invariant:!0});let s=0===T||1===T;r.main.add(a.H`
|
|
409
|
-
forwardDefaultMaterialExternalColor();
|
|
410
|
-
|
|
411
|
-
if (shouldCullByOpacity()) {
|
|
412
|
-
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
vpos = getVertexInLocalOriginSpace();
|
|
417
|
-
${s?a.H`vNormalWorld = dpNormalView(vvLocalNormal(normalModel()));`:a.H`vPositionView = (view * vec4(vpos, 1.0)).xyz;`}
|
|
418
|
-
vpos = subtractOrigin(vpos);
|
|
419
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
420
|
-
gl_Position = transformPosition(proj, view, vpos);
|
|
421
|
-
forwardTextureCoordinates();`),x.include(i.zM,t),e.include(p.SS,t),x.main.add(a.H`
|
|
422
|
-
discardBySlice(vpos);
|
|
423
|
-
${(0,a.If)(w,a.H`vec4 texColor = texture(tex, ${S?"colorUV":"vuv0"});
|
|
424
|
-
discardOrAdjustAlpha(texColor);`,a.H`vec4 texColor = vec4(1.0);`)}
|
|
425
|
-
float opacity = getDefaultMaterialOpacity(texColor.a);
|
|
426
|
-
|
|
427
|
-
${2===T?a.H`vec3 normal = screenDerivativeNormal(vPositionView);`:a.H`vec3 normal = normalize(vNormalWorld);
|
|
428
|
-
if (gl_FrontFacing == false){
|
|
429
|
-
normal = -normal;
|
|
430
|
-
}`}
|
|
431
|
-
fragColor = vec4(0.5 + 0.5 * normal, opacity);`);break}case 10:(0,v.N)(r,t),e.include(n.d),e.include(l.U,t),e.include(f.A,t),w&&x.uniforms.add(new g.N("tex",e=>e.texture)),r.main.add(a.H`vpos = getVertexInLocalOriginSpace();
|
|
432
|
-
vpos = subtractOrigin(vpos);
|
|
433
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
434
|
-
gl_Position = transformPosition(proj, view, vpos);
|
|
435
|
-
forwardTextureCoordinates();`),x.include(i.zM,t),e.include(p.SS,t),e.include(h.Q,t),x.main.add(a.H`
|
|
436
|
-
discardBySlice(vpos);
|
|
437
|
-
${(0,a.If)(w,a.H`vec4 texColor = texture(tex, ${S?"colorUV":"vuv0"});
|
|
438
|
-
discardOrAdjustAlpha(texColor);`)}
|
|
439
|
-
calculateOcclusionAndOutputHighlight();`)}}},12696(e,t,r){r.d(t,{F:()=>v});var i=r(43519),n=r(31821);function o(e,t){t.instancedColor?(e.attributes.add("instanceColor","vec4"),e.vertex.include(i.WD),e.vertex.include(i.Y1),e.vertex.include(i.ML),e.vertex.code.add(n.H`
|
|
440
|
-
MaskedColor applyInstanceColor(MaskedColor color) {
|
|
441
|
-
return multiplyMaskedColors( color, createMaskedFromUInt8NaNColor(${"instanceColor"}));
|
|
442
|
-
}
|
|
443
|
-
`)):e.vertex.code.add(n.H`MaskedColor applyInstanceColor(MaskedColor color) {
|
|
444
|
-
return color;
|
|
445
|
-
}`)}var a=r(74333);class s extends a.n{constructor(e,t){super(e,"int",1,(r,i,n)=>r.setUniform1i(e,t(i,n)))}}var l=r(19245);function c(e,t){e.varyings.add("colorMixMode","float"),e.varyings.add("opacityMixMode","float"),e.vertex.uniforms.add(new s("symbolColorMixMode",e=>l.Um[e.colorMixMode])),t.hasSymbolColors?(e.vertex.include(i.WD),e.vertex.include(i.Y1),e.vertex.include(i.ML),e.attributes.add("symbolColor","vec4"),e.vertex.code.add(n.H`
|
|
446
|
-
MaskedColor applySymbolColor(MaskedColor color) {
|
|
447
|
-
return multiplyMaskedColors(color, createMaskedFromUInt8NaNColor(${"symbolColor"}));
|
|
448
|
-
}
|
|
449
|
-
`)):e.vertex.code.add(n.H`MaskedColor applySymbolColor(MaskedColor color) {
|
|
450
|
-
return color;
|
|
451
|
-
}`),e.vertex.code.add(n.H`
|
|
452
|
-
void forwardColorMixMode(bvec4 mask) {
|
|
453
|
-
colorMixMode = float(mask.r ? ${n.H.int(l.Um.ignore)} : symbolColorMixMode) + 0.5;
|
|
454
|
-
opacityMixMode = float(mask.a ? ${n.H.int(l.Um.ignore)} : symbolColorMixMode) + 0.5;
|
|
455
|
-
}
|
|
456
|
-
`)}function u(e,t){t.hasVertexColors?(e.attributes.add("color","vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(n.H`void forwardVertexColor() { vColor = color; }`)):e.vertex.code.add(n.H`void forwardVertexColor() {}`)}var d=r(63365);function h(e){e.include(d.a),e.code.add(n.H`
|
|
457
|
-
vec3 mixExternalColor(vec3 internalColor, vec3 textureColor, vec3 externalColor, int mode) {
|
|
458
|
-
if (mode == ${n.H.int(3)}) {
|
|
459
|
-
return externalColor;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
vec3 internalMixed = internalColor * textureColor;
|
|
463
|
-
if (mode == ${n.H.int(2)}) {
|
|
464
|
-
return internalMixed;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
if (mode == ${n.H.int(1)}) {
|
|
468
|
-
return internalMixed * externalColor;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
// tint (or something invalid)
|
|
472
|
-
float vIn = rgb2v(internalMixed);
|
|
473
|
-
vec3 hsvTint = rgb2hsv(externalColor);
|
|
474
|
-
vec3 hsvOut = vec3(hsvTint.x, hsvTint.y, vIn * hsvTint.z);
|
|
475
|
-
return hsv2rgb(hsvOut);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
float mixExternalOpacity(float internalOpacity, float textureOpacity, float externalOpacity, int mode) {
|
|
479
|
-
if (mode == ${n.H.int(3)}) {
|
|
480
|
-
return externalOpacity;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
float internalMixed = internalOpacity * textureOpacity;
|
|
484
|
-
if (mode == ${n.H.int(2)}) {
|
|
485
|
-
return internalMixed;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
// multiply or tint (or something invalid)
|
|
489
|
-
return internalMixed * externalOpacity;
|
|
490
|
-
}
|
|
491
|
-
`)}var f=r(71988),m=r(20304),p=r(26934);function v(e,t){let{vertex:r,fragment:a,varyings:s}=e;e.include(o,t),e.include(c,t),e.include(u,t),r.include(i.WD),r.include(i.oF),r.include(p.Q),r.uniforms.add(new f.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),s.add("vExternalColor","vec4"),r.code.add(n.H`
|
|
492
|
-
void forwardDefaultMaterialExternalColor() {
|
|
493
|
-
forwardVertexColor();
|
|
494
|
-
|
|
495
|
-
MaskedColor maskedColor =
|
|
496
|
-
applySymbolColor(applyVVColor(applyInstanceColor(createMaskedFromNaNColor(externalColor))));
|
|
497
|
-
|
|
498
|
-
vExternalColor = maskedColor.color;
|
|
499
|
-
forwardColorMixMode(maskedColor.mask);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
bool shouldCullByOpacity() {
|
|
503
|
-
return int(opacityMixMode) != ${n.H.int(l.Um.ignore)} && vExternalColor.a < alphaCutoff;
|
|
504
|
-
}
|
|
505
|
-
`),a.include(h),a.uniforms.add(new m.m("opacity",e=>e.opacity),new m.m("layerOpacity",e=>e.layerOpacity)),a.code.add(n.H`
|
|
506
|
-
float getDefaultMaterialOpacity(float textureOpacity) {
|
|
507
|
-
return layerOpacity * mixExternalOpacity(
|
|
508
|
-
${(0,n.If)(t.hasVertexColors,"vColor.a * ")} opacity,
|
|
509
|
-
textureOpacity,
|
|
510
|
-
vExternalColor.a,
|
|
511
|
-
int(opacityMixMode)
|
|
512
|
-
);
|
|
513
|
-
}
|
|
514
|
-
`)}},42593(e,t,r){r.d(t,{Q:()=>u});var i=r(72657),n=r(31821);function o(e){let{fragment:t}=e;t.code.add(n.H`uint readChannelBits(uint channel, int highlightLevel) {
|
|
515
|
-
int llc = (highlightLevel & 3) << 1;
|
|
516
|
-
return (channel >> llc) & 3u;
|
|
517
|
-
}
|
|
518
|
-
uint readChannel(uvec2 texel, int highlightLevel) {
|
|
519
|
-
int lic = (highlightLevel >> 2) & 1;
|
|
520
|
-
return texel[lic];
|
|
521
|
-
}
|
|
522
|
-
uint readLevelBits(uvec2 texel, int highlightLevel) {
|
|
523
|
-
return readChannelBits(readChannel(texel, highlightLevel), highlightLevel);
|
|
524
|
-
}`)}var a=r(74333);class s extends a.n{constructor(e,t){super(e,"ivec2",0,(r,i)=>r.setUniform2iv(e,t(i)))}}var l=r(35818);class c extends a.n{constructor(e,t){super(e,"usampler2D",0,(r,i)=>r.bindTexture(e,t(i)))}}function u(e,t){let{fragment:r}=e,{output:a,draped:u,hasHighlightMixTexture:d}=t;10===a?(r.uniforms.add(new l.W("highlightLevel",e=>e.highlightLevel??0),new s("highlightMixOrigin",e=>e.highlightMixOrigin)),e.outputs.add("fragHighlight","uvec2",0),e.include(o),d?r.uniforms.add(new c("highlightMixTexture",e=>e.highlightMixTexture)).code.add(n.H`uvec2 getAccumulatedHighlight() {
|
|
525
|
-
return texelFetch(highlightMixTexture, ivec2(gl_FragCoord.xy) - highlightMixOrigin, 0).rg;
|
|
526
|
-
}
|
|
527
|
-
void outputHighlight(bool occluded) {
|
|
528
|
-
if (highlightLevel == 0) {
|
|
529
|
-
uint bits = occluded ? 3u : 1u;
|
|
530
|
-
fragHighlight = uvec2(bits, 0);
|
|
531
|
-
} else {
|
|
532
|
-
int ll = (highlightLevel & 3) << 1;
|
|
533
|
-
int li = (highlightLevel >> 2) & 3;
|
|
534
|
-
uint bits;
|
|
535
|
-
if (occluded) {
|
|
536
|
-
bits = 3u << ll;
|
|
537
|
-
} else {
|
|
538
|
-
bits = 1u << ll;
|
|
539
|
-
}
|
|
540
|
-
uvec2 combinedHighlight = getAccumulatedHighlight();
|
|
541
|
-
combinedHighlight[li] |= bits;
|
|
542
|
-
fragHighlight = combinedHighlight;
|
|
543
|
-
}
|
|
544
|
-
}`):r.code.add(n.H`void outputHighlight(bool occluded) {
|
|
545
|
-
uint bits = occluded ? 3u : 1u;
|
|
546
|
-
fragHighlight = uvec2(bits, 0);
|
|
547
|
-
}`),u?r.code.add(n.H`bool isHighlightOccluded() {
|
|
548
|
-
return false;
|
|
549
|
-
}`):r.uniforms.add(i.Xb).code.add(n.H`bool isHighlightOccluded() {
|
|
550
|
-
float sceneDepth = texelFetch(mainDepth, ivec2(gl_FragCoord.xy), 0).x;
|
|
551
|
-
return gl_FragCoord.z > sceneDepth + 5e-7;
|
|
552
|
-
}`),r.code.add(n.H`void calculateOcclusionAndOutputHighlight() {
|
|
553
|
-
outputHighlight(isHighlightOccluded());
|
|
554
|
-
}`)):r.code.add(n.H`void calculateOcclusionAndOutputHighlight() {}`)}},83068(e,t,r){r.d(t,{E:()=>c});var i=r(37585),n=r(48163),o=r(77108),a=r(31821);function s(e){e.uniforms.add(new o.E("zProjectionMap",e=>function(e){let t=e.projectionMatrix;return(0,i.hZ)(l,t[14],t[10])}(e.camera))),e.code.add(a.H`float linearizeDepth(float depth, vec2 zProjectionConstants) {
|
|
555
|
-
float depthNdc = depth * 2.0 - 1.0;
|
|
556
|
-
return -(zProjectionConstants[0] / (depthNdc + zProjectionConstants[1] + 1e-7));
|
|
557
|
-
}
|
|
558
|
-
float linearizeDepth(float depth) {
|
|
559
|
-
return linearizeDepth(depth, zProjectionMap);
|
|
560
|
-
}`),e.code.add(a.H`float delinearizeDepth(float linearDepth) {
|
|
561
|
-
float c1 = zProjectionMap[0];
|
|
562
|
-
float c2 = zProjectionMap[1];
|
|
563
|
-
float depthNdc = (-c1/linearDepth) - c2 - 1e-7;
|
|
564
|
-
float depthNonlinear01 = (depthNdc + 1.0 ) / 2.0;
|
|
565
|
-
return depthNonlinear01;
|
|
566
|
-
}`)}const l=(0,n.vt)();function c(e){e.include(s),e.code.add(a.H`float depthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
567
|
-
ivec2 iuv = ivec2(uv * vec2(textureSize(depthTexture, 0)));
|
|
568
|
-
return texelFetch(depthTexture, iuv, 0).r;
|
|
569
|
-
}`),e.code.add(a.H`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
570
|
-
return linearizeDepth(depthFromTexture(depthTexture, uv));
|
|
571
|
-
}`)}},47187(e,t,r){r.d(t,{zp:()=>x});var i=r(32198),n=r(34727),o=r(49255),a=r(29941),s=r(99208),l=r(65261),c=r(40710),u=r(33079),d=r(28421),h=r(20304),f=r(31821),m=r(15976),p=r(63761),v=r(51976);r(72458);class g extends a.v{constructor(){super(...arguments),this.emissionSource=0}}function x(e,t){let{hasEmission:r,emissionSource:i,hasEmissiveTextureTransform:a,bindType:v}=t;if(!(0,o._o)(t.output)||!r)return;let g=e.fragment;if(g.include(l.C),0===i)return void g.code.add("vec4 getEmissions(vec3 symbolColor) { return vec4(0.0);}");let x=3===i||4===i||5===i;x&&(e.include(s.r,t),g.uniforms.add(1===v?new p.N("texEmission",e=>e.textureEmissive):new m.o("texEmission",e=>e.textureEmissive)));let _=2===i||x;if(_&&g.uniforms.add(1===v?new u.t("emissiveBaseColor",e=>e.emissiveBaseColor):new c.W("emissiveBaseColor",e=>e.emissiveBaseColor)),function({emissionSource:e}){return 0===e||1===e||2===e||3===e}(t)){let e=e=>(0,n.qE)(e??0,0,16);g.uniforms.add(1===v?new h.m("emissiveStrength",t=>e(t.emissiveStrength)):new d.J("emissiveStrength",t=>e(t.emissiveStrength)))}let y=7===i,b=5===i,w=1===i||6===i||y;g.code.add(f.H`vec4 getEmissions(vec3 symbolColor) {
|
|
572
|
-
vec4 emissions =`),_?b?g.code.add("emissiveSource < 0.5 ? vec4(emissiveBaseColor, 1.0): vec4(linearizeGamma(symbolColor), 1.0)"):g.code.add("vec4(emissiveBaseColor, 1.0)"):w?y?g.code.add("emissiveSource < 0.5 ? vec4(0.0): vec4(linearizeGamma(symbolColor), 1.0)"):g.code.add("vec4(linearizeGamma(symbolColor), 1.0)"):g.code.add("vec4(0.0)"),g.code.add(";"),x&&(b?g.code.add(f.H`
|
|
573
|
-
if(emissiveSource < 0.5) {
|
|
574
|
-
vec4 emissiveFromTex = textureLookup(texEmission, ${a?"emissiveUV":"vuv0"});
|
|
575
|
-
emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);
|
|
576
|
-
}
|
|
577
|
-
`):g.code.add(`vec4 emissiveFromTex = textureLookup(texEmission, ${a?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);`),g.code.add("emissions.a = emissions.rgb == vec3(0.0) ? 0.0: emissions.a;")),g.code.add("\n emissions.rgb *= emissiveStrength;\n return emissions;\n }\n ")}(0,i.Cg)([(0,v.W)({count:8})],g.prototype,"emissionSource",void 0),(0,i.Cg)([(0,v.W)()],g.prototype,"hasEmissiveTextureTransform",void 0)},77695(e,t,r){r.d(t,{J:()=>h});var i=r(29242),n=r(48163),o=r(99208),a=r(68259),s=r(47286),l=r(31821),c=r(35644),u=r(15976),d=r(63761);function h(e,t){return function(e,t){let r=e.fragment,{hasVertexTangents:h,doubleSidedMode:f,hasNormalTexture:m,textureCoordinateType:p,bindType:v,hasNormalTextureTransform:g}=t;h?(e.attributes.add("tangent","vec4"),e.varyings.add("vTangent","vec4"),2===f?r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
578
|
-
float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
|
|
579
|
-
vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz);
|
|
580
|
-
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
581
|
-
return mat3(tangent, bitangent, normal);
|
|
582
|
-
}`):r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
583
|
-
float tangentHeadedness = vTangent.w;
|
|
584
|
-
vec3 tangent = normalize(vTangent.xyz);
|
|
585
|
-
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
586
|
-
return mat3(tangent, bitangent, normal);
|
|
587
|
-
}`)):r.code.add(l.H`mat3 computeTangentSpace(vec3 normal, vec3 pos, vec2 st) {
|
|
588
|
-
vec3 Q1 = dFdx(pos);
|
|
589
|
-
vec3 Q2 = dFdy(pos);
|
|
590
|
-
vec2 stx = dFdx(st);
|
|
591
|
-
vec2 sty = dFdy(st);
|
|
592
|
-
float det = stx.t * sty.s - sty.t * stx.s;
|
|
593
|
-
vec3 T = stx.t * Q2 - sty.t * Q1;
|
|
594
|
-
T = T - normal * dot(normal, T);
|
|
595
|
-
T *= inversesqrt(max(dot(T,T), 1.e-10));
|
|
596
|
-
vec3 B = sign(det) * cross(normal, T);
|
|
597
|
-
return mat3(T, B, normal);
|
|
598
|
-
}`),m&&0!==p&&(e.include(o.r,t),r.uniforms.add(1===v?new d.N("normalTexture",e=>e.textureNormal):new u.o("normalTexture",e=>e.textureNormal)),g&&(r.uniforms.add(1===v?new s.G("scale",e=>e.scale??n.Un):new a.t("scale",e=>e.scale??n.Un)),r.uniforms.add(new c.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??i.zK))),r.code.add(l.H`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
|
|
599
|
-
vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),g&&r.code.add(l.H`mat3 normalRotation = mat3(normalTextureTransformMatrix[0][0]/scale[0], normalTextureTransformMatrix[0][1]/scale[1], 0.0,
|
|
600
|
-
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
601
|
-
0.0, 0.0, 0.0 );
|
|
602
|
-
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(l.H`return tangentSpace * rawNormal;
|
|
603
|
-
}`))}(e,t)}},68785(e,t,r){r.d(t,{n:()=>zt});var i=r(31821),n=r(12791),o=r(32198),a=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),h=r(69540);let f=class extends h.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"rows",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"columns",void 0),f=(0,o.Cg)([(0,u.$K)("esri.CameraLayout")],f);const m=f;var p=r(69052),v=r(25482),g=r(78888),x=r(86738),_=r(43937),y=r(36005);let b=class extends((0,h.OU)(v.o)){constructor(e){super(e),this.position=new x.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new m}normalizeCtorArgs(e){return e&&"object"==typeof e&&("x"in e||Array.isArray(e))?{position:e}:e}writePosition(e,t,r,i){let n=e.clone();n.x=(0,g.GB)(e.x||0),n.y=(0,g.GB)(e.y||0),n.z=e.hasZ?(0,g.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){let r=new x.A;return r.read(e,t),r.x=(0,g.GB)(r.x||0),r.y=(0,g.GB)(r.y||0),r.z=r.hasZ?(0,g.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,u.MZ)({type:x.A,json:{write:{isRequired:!0}}})],b.prototype,"position",void 0),(0,o.Cg)([(0,_.K)("position")],b.prototype,"writePosition",null),(0,o.Cg)([(0,y.w)("position")],b.prototype,"readPosition",null),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>p.ie.normalize((0,g.GB)(e)))],b.prototype,"heading",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>(0,a.qE)((0,g.GB)(e),-180,180))],b.prototype,"tilt",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,u.wg)(e=>(0,a.qE)((0,g.GB)(e,55),1,170))],b.prototype,"fov",void 0),(0,o.Cg)([(0,u.MZ)({type:m,nonNullable:!0,json:{read:!1,write:!1}})],b.prototype,"layout",void 0),b=(0,o.Cg)([(0,u.$K)("esri.Camera")],b);var w=r(9093),M=r(35522),T=r(51850),S=r(16930),C=(r(48353),r(9762),r(65806)),A=r(27993),E=r(73941),I=(r(19419),r(58083)),O=r(65720),P=r(71351),D=r(69622),R=r(53966),F=r(90629),B=r(48163),N=r(78955),z=r(91829),L=r(44280);function H(e,t,r){e.worldUpAtPosition(t,V),(0,M.Re)(U,r,t);let i=(0,M.Bw)(U);return 0===i?0:(0,a.XM)((0,M.Om)(U,V)/i)}const V=(0,T.vt)(),U=(0,T.vt)();var j;let k=j=class extends D.A{constructor(e){super(e),this._ray=(0,P.vt)(),this._viewport=(0,z.fA)(0,0,1,1),this._padding=(0,z.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,B.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,w.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,w.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,w.vt)(),this._frustumDirty=!0,this._frustum=(0,O.vt)(),this._fullViewport=(0,z.vt)(),this._fullViewportDirty=!0,this._pixelRatio=1,this.pixelScale=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,T.vt)(),this._up=(0,T.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin,"eye")}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,M.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,I.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get inverseViewMatrix(){return(0,I.Qw)((0,w.vt)(),this.viewMatrix)||this._get("inverseViewMatrix")||(0,w.vt)()}get viewForward(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;let e=(0,N.hs)((0,z.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,N.aI)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;let e=(0,N.hs)((0,z.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,N.aI)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewportDirty&&=(this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this._viewport[2]+this._padding[1]+this._padding[3],this._fullViewport[3]=this._viewport[3]+this._padding[0]+this._padding[2],!1),this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,N.t2)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,N.C)(this._padding,e),this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&=((0,I.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,I.B8)((0,w.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,w.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,M.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,I.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,I.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){let{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get renderPixelSizePerDistance(){return Math.tan(this.fovX/2)/(this.width/2)}get screenPixelSizePerDistance(){return this.renderPixelSizePerDistance*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){let e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,a=-i/2+this.column*o,s=a+o,l=-r/2+this.row*n,c=l+n,u=(0,I.$h)((0,w.vt)(),a*(1+2*this._padding[3]/e),s*(1+2*this._padding[1]/e),l*(1+2*this._padding[2]/t),c*(1+2*this._padding[0]/t),this.near,this.far),d=this._get("projectionMatrix");return d&&(0,I.t2)(d,u)?d:u}copyFrom(e){(0,M.C)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,N.C)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,N.C)(this._padding,e.padding),this.notifyChange("_padding"),this._fullViewportDirty=!0,(0,d.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;let t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,I.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||=((0,O.C)(this._frustum,e.frustum),!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,I.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this.pixelRatio=e.pixelRatio,this.pixelScale=e.pixelScale,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new j).copyFrom(this)}equals(e){return(0,M.t2)(this.eye,e.eye)&&(0,M.t2)(this.center,e.center)&&(0,M.t2)(this.up,e.up)&&(0,N.t2)(this._viewport,e.viewport)&&(0,N.t2)(this._padding,e.padding)&&(0,d.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}equalsView(e){return(0,M.t2)(this.eye,e.eye)&&(0,M.t2)(this.center,e.center)&&(0,M.t2)(this.up,e.up)&&this._fov===e.fov}almostEquals(e){let t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,N.hG)(e.screenPadding,this.screenPadding)>=t||(0,N.hG)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,M.jb)(Z,e.eye,e.center),(0,M.jb)($,this.eye,this.center);let r=(0,M.Om)(Z,$),i=(0,M.uE)(Z),n=(0,M.uE)($),o=5e-4;return r*r>=.9999999999*i*n&&(0,M.lo)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDistance(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDistance(e){return e*this.renderPixelSizePerDistance}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDistance(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,L.gr)(this.viewForward,(0,M.Re)(Z,e,this.eye)))}computeScreenPixelSizeAtDistance(e){return e*this.screenPixelSizePerDistance}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,F.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){let t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==G&&(0,M.C)(G,e),G[3]=1,(0,N.Z0)(G,G,this.projectionMatrix);let r=Math.abs(G[3]);(0,M.hs)(G,G,1/r);let i=this.fullViewport;t[0]=(0,a.Cc)(0,i[0]+i[2],.5+.5*G[0]),t[1]=(0,a.Cc)(0,i[1]+i[3],.5+.5*G[1]),t[2]=.5*(G[2]+1),t[3]=r}unapplyProjection(e,t){let r=this.fullViewport;G[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],G[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],G[2]=(2*e[2]-1)*e[3],G[3]=e[3],null!=this.inverseProjectionMatrix&&((0,N.Z0)(G,G,this.inverseProjectionMatrix),t[0]=G[0],t[1]=G[1],t[2]=G[2])}projectToScreen(e,t){return null==this.projectToRenderScreen(e,q)?null:(this.renderToScreen(q,t),t)}projectToRenderScreen(e,t){if(G[0]=e[0],G[1]=e[1],G[2]=e[2],G[3]=1,(0,N.Z0)(G,G,this.viewProjectionMatrix),0===G[3])return null;let r=G;(0,M.hs)(r,r,1/Math.abs(G[3]));let i=this.fullViewport,n=(0,a.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,a.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,q),t)}unprojectFromRenderScreen(e,t){if((0,I.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,I.B8)(W,W))return null;let r=this.fullViewport;return G[0]=2*(e[0]-r[0])/r[2]-1,G[1]=2*(e[1]-r[1])/r[3]-1,G[2]=2*e[2]-1,G[3]=1,(0,N.Z0)(G,G,W),0===G[3]?null:(t[0]=G[0]/G[3],t[1]=G[1]/G[3],t[2]=G[2]/G[3],t)}constrainWindowSize(e,t,r,i){let n=e*this.pixelRatio,o=t*this.pixelRatio,a=Math.max(n-r/2,0),s=Math.max(this.fullHeight-o-i/2,0),l=-Math.min(n-r/2,0),c=-Math.min(this.fullHeight-o-i/2,0),u=r-l- -Math.min(this.fullWidth-n-r/2,0),d=i-c- -Math.min(o-i/2,0);return[Math.round(a),Math.round(s),Math.round(u),Math.round(d)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){let r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){let r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){let{center:r,eye:i,distance:n,fovY:o}=this,a=Math.abs(Math.PI/2-H(t,r,i));return e.frustumCoverage(a,n,o)}_computeUpGlobal(){(0,M.Re)(Z,this.center,this.eye);let e=(0,M.Bw)(this.center);e<1?(0,M.t2)(this._up,T.Cb)&&((0,M.C)(this._up,T.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,M.Om)(Z,this.center))>.9999*(0,M.Bw)(Z)*e||((0,M.$A)($,Z,this.center),(0,M.$A)($,$,Z),(0,M.S8)($,$),(0,M.t2)(this._up,$)||((0,M.C)(this._up,$),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,M.oW)(Z,this.eye,this.center),Math.abs(Z[2])<=.9999&&((0,M.hs)(Z,Z,Z[2]),(0,M.hZ)(Z,-Z[0],-Z[1],1-Z[2]),(0,M.S8)(Z,Z),(0,M.t2)(this._up,Z)||((0,M.C)(this._up,Z),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,M.t2)(e,t)||((0,M.C)(t,e),this._markViewDirty(),this.notifyChange(r)):R.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&=((0,O.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),!1)}_ensureViewClean(){this._viewDirty&&((0,I.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,u.MZ)()],k.prototype,"_viewport",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_padding",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_fov",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_nearFar",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"pixelRatio",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"pixelScale",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_rows",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"rows",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_columns",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"columns",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"eye",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"center",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_center",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"up",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"_up",void 0),(0,o.Cg)([(0,u.MZ)()],k.prototype,"viewMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"inverseViewMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"viewForward",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"viewUp",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"viewRight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"nearFar",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"near",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"far",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"viewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"screenViewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"screenPadding",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"x",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"y",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"width",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"height",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fullWidth",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fullHeight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"_aspect",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"padding",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"projectionMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fov",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fovX",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"fovY",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,u.MZ)()],k.prototype,"relativeElevation",void 0),k=j=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl.RenderCamera")],k);const G=(0,z.vt)(),W=(0,w.vt)(),Z=(0,T.vt)(),$=(0,T.vt)(),q=(0,F.r_)();r(49718),r(6867),r(16396),(0,w.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)();var Y=r(5443),X=r(39829),J=r(95108);function K(e,t,r,i){let n=function(e,t){let r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=+(0===r);return(e,t,a)=>{if(t[r]<i&&a[r]<i)return 1===n?0:1;if(t[r]>i&&a[r]>i)return+(1===n);let s=(a[o]-t[o])/(a[r]-t[r]),l=t[o]+s*(i-t[r]);return e[r]=i,e[o]=l,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(ee,t[0],t[0])&&Q(e,t[0]);for(let r=0;r<t.length;r++){let i=t[r===t.length-1?0:r+1];switch(n(ee,t[r],i)){case 1:Q(e,i);break;case 3:Q(e,(0,B.o8)(ee));break;case 2:Q(e,(0,B.o8)(ee)),Q(e,i)}}}}function Q(e,t){0!==e.length&&(0,d.aI)(e.at(-1),t)||e.push(t)}const ee=(0,B.vt)();var te=r(11964),re=r(27921);const ie=(0,T.vt)(),ne=(0,T.vt)();function oe(){return{direction:(0,T.vt)(),up:(0,T.vt)()}}function ae(e,t,r,i,n){let o=(0,M.S8)(ie,e),s=(0,M.Om)(o,i),l=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,M.Om)(t,i)),s<.99?((0,M.C)(o,t),l&&(0,M.hs)(o,o,-1)):o=null);let c=0;if(o){(0,M.hs)(ne,i,(0,M.Om)(i,o)),(0,M.Re)(o,o,ne);let e=(0,M.Om)(o,n)/((0,M.Bw)(o)*(0,M.Bw)(n));(0,M.$A)(ne,o,n),c=((0,M.Om)(ne,i)>0?1:-1)*(0,a.KJ)((0,a.XM)(e))}let u=(0,a.KJ)((0,a.XM)(-(0,M.Om)(i,e)/(0,M.Bw)(e)));return r?(r.heading=c,r.tilt=u,r):{heading:c,tilt:u}}function se(e,t,r,i){(0,M.Re)(le,r,t),!(0,re.T7)(i,(0,te.LV)(t,le),e)&&e!==r&&(0,M.C)(e,r)}const le=(0,T.vt)(),ce=(0,T.fA)(0,1,0),ue=(0,T.fA)(0,0,1),de=(0,w.vt)(),he=(0,T.vt)(),fe=(0,T.vt)();function me(e,t,r,i=oe()){let{direction:n,up:o}=i;return(0,I.N9)(de,-(0,a.kU)(t)),(0,I.eL)(de,de,(0,a.kU)(r)),(0,M.Z0)(n,ue,de),(0,M.hs)(n,n,-1),(0,M.Z0)(o,ce,de),i}function pe(e,t,r,i,n){let o=t.lines[11].direction,a=(n-r.getAltitude(i))/o[2];(0,M.Ln)(e,i,o,a)}const ve=(0,T.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return ae(t,r,i,ue,ce)},eyeForCenterWithHeadingTilt:function(e,t,r,i){let n=me(0,r,i),o=(0,T.vt)();return(0,M.hs)(o,n.direction,-t),(0,M.WQ)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,a.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,a.KJ)(e)},toArea:function(e,t){let r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,a=e.state.camera.eye,s=[],l=r.planes[5];for(let e=0;e<4;e++){let t=r.lines[e];i.intersectInfiniteManifold((0,P.LV)(t.origin,t.direction),n,ve)||pe(ve,r,i,t.endpoint,n),se(ve,a,ve,l),s.push((0,B.fA)(ve[0],ve[1]))}return function(e,t,r){let i=e.map(e=>((0,M.hZ)(ve,e[0],e[1],0),t.fromRenderCoords(ve,ve,r),[ve[0],ve[1]]));return i.length<=2?new X.A({spatialReference:r}):(i.push(i[0].slice()),(0,J.$3)(i)||i.reverse(),new X.A({rings:[i],spatialReference:r}))}(function(e,t){let r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(s,i.extent),i,o)},toExtent:function(e,t,r,i,n){let o=e.renderSpatialReference,a=e.spatialReference??t.spatialReference;return(0,C.g)(t,he,o),(0,C.g)(t,fe,o),he[0]-=r/2,fe[0]+=r/2,he[1]-=i/2,fe[1]+=i/2,(0,A.F)(he,o,he,a),(0,A.F)(fe,o,fe,a),n?(n.xmin=he[0],n.ymin=he[1],n.xmax=fe[0],n.ymax=fe[1],n.spatialReference=a):n=new Y.A({xmin:he[0],ymin:he[1],xmax:fe[0],ymax:fe[1],spatialReference:a}),n}},Symbol.toStringTag,{value:"Module"}));var ge=r(34304),xe=r(52039),_e=r(28540),ye=r(28735);class be{get planes(){return this.frustum}get points(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,O.vt)(),this._points=(0,O.Qy)(),this.lines=Array(12),this._origin=(0,T.vt)(),this._direction=(0,T.vt)(),this._boundingSphere=new _e.i,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,T.vt)(),endpoint:null}}update(e){(0,O.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,M.C)(this._origin,e.eye),(0,M.C)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}get altitude(){return this._altitude}intersectsSphere(e){return(0,O.m7)(this.frustum,e)}isConvexHullOutsideViewPyramid(e,t){return(0,O.Pi)(this.frustum,e,t)}intersectsRay(e){return(0,O.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,O.ST)(this.frustum,e,t)}lineSegmentIntersectsViewPyramid(e,t){return(0,O.LJ)(this.frustum,e,t)}intersectsPoint(e){return(0,O.bU)(this.frustum,e)}_updateLines(){let e=this._points;for(let t=0;t<4;t++){let r=t+4;we(this.lines[t],e[t],e[r]),we(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),we(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){let{origin:e}=this,t=Te;(0,M.S8)(t,this.direction);let r=Me;(0,M.jb)(r,this.points[4],e);let i=.5*(0,M.Om)(r,r)/(0,M.Om)(t,r),n=this._boundingSphere;n.center=(0,M.Ln)(Se,e,t,i),n.radius=i}static{this.planePointIndices=O.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function we(e,t,r){e.origin=t,e.endpoint=r,(0,M.oW)(e.direction,t,r)}const Me=(0,T.vt)(),Te=(0,T.vt)(),Se=(0,T.vt)();r(86211);const Ce=(0,T.fA)(5802e-9,13558e-9,331e-7),Ae=(0,T.fA)(195e-8,5643e-9,255e-9);(0,T.fA)(Ce[0]+Ae[0],Ce[1]+Ae[1],Ce[2]+Ae[2]);class Ee{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Ee(0,0)}static{this.Infinite=new Ee}}(0,T.vt)(),(0,T.vt)(),new _e.i,(0,P.vt)(),new Y.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var Ie=r(32728);const Oe=(0,T.fA)(0,0,1),Pe=(0,M.S8)((0,T.vt)(),(0,T.fA)(1,1,1)),De=(0,w.vt)(),Re=(0,T.vt)(),Fe=(0,T.vt)();function Be(e,t,r,i=oe()){(0,M.$A)(Re,e,Oe),0===(0,M.Om)(Re,Re)&&(0,M.$A)(Re,e,Pe),(0,I.$0)(De,-(0,a.kU)(t),e),(0,I.e$)(De,De,-(0,a.kU)(r),Re);let{up:n,direction:o}=i;return(0,M.$A)(n,Re,e),(0,M.S8)(n,n),(0,M.Z0)(n,n,De),(0,M.S8)(o,e),(0,M.ze)(o,o),(0,M.Z0)(o,o,De),i}function Ne(e){let t=e[1];e[1]=-e[2],e[2]=t}function ze(e,t){return e.up=Be(t,e.heading,e.tilt).up,e}function Le(e,t){let{renderCoordsHelper:r,state:i}=e;if(1!==i.viewingMode)return 1;let n=r.getAltitude(t),o=r.referenceEllipsoid.radius,s=1+(0,M.Io)(i.camera.eye,t)/(o+n),l=Math.sqrt(s*s-1),{minCurvature:c,maxCurvature:u,minSamples:d,maxSamples:h}=Ve,f=(0,a.qE)((l-c)/(u-c),0,1);return Math.round((0,a.Cc)(d,h,f))}function He(e,t){let r=[],i=[],n=(0,ge.FD)();for(let o=0;o<e.length;o++){let a=e[o],s=o===e.length-1?e[0]:e[o+1],l=(0,te.Cr)(a,s,$e),c=(0,re.vE)(t,l.origin,l.vector,0,We);switch(c){case 2:r.push(a);break;case 3:i.push(a);break;case 0:case 1:{let[e,o,s]=0===c?[1,r,i]:[-1,i,r],l=(0,re.Qj)(t),u=(0,M.Ln)((0,T.vt)(),We,l,e*n),d=(0,M.Ln)((0,T.vt)(),We,l,e*-n);o.push(a),o.push(u),s.push(d)}}}let o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Ve={minCurvature:(0,a.kU)(5),maxCurvature:(0,a.kU)(50),minSamples:1,maxSamples:6},Ue=(0,T.fA)(1,0,0),je=(0,T.fA)(0,1,0),ke=(0,T.vt)(),Ge=(0,T.vt)(),We=(0,T.vt)(),Ze=new _e.i,$e=(0,te.vt)(),qe=(0,z.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){let n=Re,o=Fe;return(0,M.S8)(n,e),(0,M.$A)(Fe,n,Oe),0===(0,M.Om)(Fe,Fe)&&(0,M.$A)(Fe,n,Pe),(0,M.$A)(o,Fe,n),ae(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){let n={eye:(0,T.vt)(),up:null,tilt:i,heading:r},o=Re;o[0]=e[0],o[1]=e[2],o[2]=-e[1];let s,l=t,c=(0,a.kU)(r),u=(0,a.kU)(i),d=Math.sin(c),h=Math.cos(c),f=Math.sin(u),m=Math.cos(u),p=(0,M.Bw)(o);if(Math.abs(u)<1e-8)s=l+p;else{let e=p/f,t=(0,a.YN)(l/e),r=Math.PI-u-t;s=e*Math.sin(r)}let v=m*l,g=l*l*(f*f),x=h*h*g,_=s-v,y=_*_,b=x*(x+y-o[1]*o[1]);if(b<0)return(0,M.hs)(n.eye,o,s/p),n.tilt=0,ze(n,e);let w,S=Math.sqrt(b),C=o[1]*_,A=x+y;if(w=h>0?-S+C:S+C,Math.abs(A)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=l):(0,M.hs)(n.eye,o,s/p),n.tilt=0,Ne(n.eye),ze(n,e);n.eye[1]=w/A;let E=d*d*g,I=f*l,O=h*I*n.eye[1],P=n.eye[1]*n.eye[1],D=1-P,R=Math.sqrt(D),F=x*P+E-2*O*R*_+D*y;return Math.abs(F)<1e-8?((0,M.hs)(n.eye,o,s/p),n.tilt=0,Ne(n.eye),ze(n,e)):(n.eye[0]=(D*(s*o[0]-v*o[0])-I*R*(o[0]*n.eye[1]*h+o[2]*d))/F,n.eye[2]=(D*(s*o[2]-v*o[2])-I*R*(o[2]*n.eye[1]*h-o[0]*d))/F,(0,M.hs)(n.eye,n.eye,s),Ne(n.eye),ze(n,e))},eyeTiltToLookAtTilt:function(e,t,r){let i=(0,a.kU)(e),n=(0,M.Bw)(t);return(0,a.YN)(r/(n/Math.sin(i)))+i},getCurvatureSamples:Le,headingTiltToDirectionUp:Be,lookAtTiltToEyeTilt:function(e,t,r){let i=(0,M.Bw)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,a.YN)(r/(n/Math.sin(e)));return(0,a.KJ)(e-o)},toArea:function(e,t){let{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new be(r);i.near=2,n.update(i);let o=r.getAltitude(t),s=e.spatialReference,l=i.eye,c=function(e){let{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return Ze.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(Ze,t)}(e),u=Le(e,t),d=i.aboveGround,h=n.planes[5],f=[],m=(0,re.O_)(T.uY,Ue,(0,re.vt)()),p=(0,re.O_)(T.uY,je,(0,re.vt)());(0,N.hZ)(qe,0,0,0,0);for(let e=0;e<4;e++){let t=1===e&&!d||3===e&&d?1-c:0,i=1===e&&d||3===e&&!d?c:1,s=n.lines[e],v=n.lines[3===e?0:e+1];for(let n=0;n<u;n++){let c=n/u,d=1===e?1-(1-c)**2:3===e?c**2:c,g=0===n?0:(0,a.Cc)(t,i,d),x=(0,M.Cc)(Ge,s.origin,v.origin,g),_=(0,Ie.nu)(s.direction,v.direction,g,ke);r.intersectManifoldClosestSilhouette((0,P.LV)(x,_),o,We),se(We,l,We,h),f.push((0,T.o8)(We)),0!==f.length&&(0,M.lo)(f.at(-1),We);let y=+!!(0,re.BX)(m,We)|((0,re.BX)(p,We)?2:0);qe[y]=1}}f.length>2&&(0,M.lo)(f[0],f.at(-1));let v=function(e,t,r){let i=2*(0,ge.FD)();return e.map(e=>{let n=[],o=!1;for(let a of e)t.fromRenderCoords(a,We,r),Math.abs(a[0])<i&&Math.abs(a[1])<i?(n.push([null,We[1]]),n.push([null,We[1]]),o=!0):n.push([We[0],We[1]]);if(o)for(let e=0;e<n.length;e++){let t=n[e];if(null!=t[0])continue;let r=n[e+1];t[0]=n.at(0===e?-1:e-1)[0],e++,r[0]=n.at(e===n.length-1?0:e+1)[0]}return n.push(n[0]),(0,J.$3)(n)||n.reverse(),n})}((0,N.m3)(qe)>1?function(e,t){let r=[];for(let i of e)r.push(...He(i,t));return r}(He(f,m),p):[f],r,s);return new X.A({rings:v,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,l,c,u=t.latitude,d=(0,E.tO)(e.spatialReference).radius,h=t.longitude,f=function(e,t,r){let i=t/r,n=(0,a.kU)(e),o=Math.sin(i/2),s=Math.cos(n),l=2*(0,a.YN)(Math.sqrt(o*o/(s*s)));return(0,a.KJ)(l)}(u,r,d)/2;o=h-f,s=h+f;let m=(0,a.kU)(u),v=(1+Math.sin(m))/(1-Math.sin(m)),g=(v+1)*Math.tan(i/d/2),x=g*g;function _(e){let t=Math.PI/2;return(e=p.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(g+Math.sqrt(4*v+x))),c=l+i/d,l=_(l),c=_(c),c<l){let e=c;c=l,l=e}if(l=Math.max((0,a.KJ)(l),-90),c=Math.min((0,a.KJ)(c),90),s=xe.Y_.monotonic(o,s),s-o>180){let e=(s-o-180)/2;o+=e,s-=e}let y=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:S.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=s,n.ymax=c,n.spatialReference=y):n=new Y.A({xmin:o,ymin:l,xmax:s,ymax:c,spatialReference:y}),e.spatialReference&&e.spatialReference.isWebMercator&&(0,ye.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Ye="composite-color",Xe=["final-color",Ye,"opaque-color","transparent-color"],Je={ANTIALIASING:"antialiasing",CUTFILL:"cutfill",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA:"focusarea",FOCUSAREA_MASK:"focusarea-mask",GAUSSIAN_SPLAT:"gaussian",GAUSSIAN_SPLAT_DEPTH:"gaussian-depth",GROUND_DEPTH:"ground-depth",HIGHLIGHT:"highlight",LASERLINES:"laserlines",TRANSPARENT_NO_DEPTH:"transparent-no-depth",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",TRANSPARENT_ENVIRONMENT:"transparent-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_ACCUMULATION:"shadow-accumulation",SHADOWMAP:"shadowmap",SHADOW_HIGHLIGHT:"shadow-highlight",VOXEL:"voxel",VIEWSHED:"viewshed",OBJECT_AND_LAYER_ID_COLOR:"olid"};Array.from(Object.values(Je)).concat(Xe),(0,T.vt)();var Ke=r(49186),Qe=r(10107),et=r(64108),tt=r(44208),rt=(r(17676),r(94656)),it=r(63907);r(93637),r(4576),"layout.centroid.smooth.case.mat2x2.mat2x3.mat2x4.mat3x2.mat3x3.mat3x4.mat4x2.mat4x3.mat4x4.uint.uvec2.uvec3.uvec4.samplerCubeShadow.sampler2DArray.sampler2DArrayShadow.isampler2D.isampler3D.isamplerCube.isampler2DArray.usampler2D.usampler3D.usamplerCube.usampler2DArray.coherent.restrict.readonly.writeonly.resource.atomic_uint.noperspective.patch.sample.subroutine.common.partition.active.filter.image1D.image2D.image3D.imageCube.iimage1D.iimage2D.iimage3D.iimageCube.uimage1D.uimage2D.uimage3D.uimageCube.image1DArray.image2DArray.iimage1DArray.iimage2DArray.uimage1DArray.uimage2DArray.image1DShadow.image2DShadow.image1DArrayShadow.image2DArrayShadow.imageBuffer.iimageBuffer.uimageBuffer.sampler1DArray.sampler1DArrayShadow.isampler1D.isampler1DArray.usampler1D.usampler1DArray.isampler2DRect.usampler2DRect.samplerBuffer.isamplerBuffer.usamplerBuffer.sampler2DMS.isampler2DMS.usampler2DMS.sampler2DMSArray.isampler2DMSArray.usampler2DMSArray.trunc.round.roundEven.isnan.isinf.floatBitsToInt.floatBitsToUint.intBitsToFloat.uintBitsToFloat.packSnorm2x16.unpackSnorm2x16.packUnorm2x16.unpackUnorm2x16.packHalf2x16.unpackHalf2x16.outerProduct.transpose.determinant.inverse.texture.textureSize.textureProj.textureLod.textureOffset.texelFetch.texelFetchOffset.textureProjOffset.textureLodOffset.textureProjLod.textureProjLodOffset.textureGrad.textureGradOffset.textureProjGrad.textureProjGradOffset".split("."),"precision.highp.mediump.lowp.attribute.const.uniform.varying.break.continue.do.for.while.if.else.in.out.inout.float.int.void.bool.true.false.discard.return.mat2.mat3.mat4.vec2.vec3.vec4.ivec2.ivec3.ivec4.uvec2.uvec3.uvec4.bvec2.bvec3.bvec4.sampler1D.sampler2D.sampler3D.usampler1D.usampler2D.usampler3D.samplerCube.sampler1DShadow.sampler2DShadow.struct.asm.class.union.enum.typedef.template.this.packed.goto.switch.default.inline.noinline.volatile.public.static.extern.external.interface.long.short.double.half.fixed.unsigned.input.output.hvec2.hvec3.hvec4.dvec2.dvec3.dvec4.fvec2.fvec3.fvec4.sampler2DRect.sampler3DRect.sampler2DRectShadow.sizeof.cast.namespace.using".split("."),"<<= >>= ++ -- << >> <= >= == != && || += -= *= /= %= &= ^^ ^= |= ( ) [ ] . ! ~ * / % + - < > & ^ | ? : = , ; { }".split(" "),"abs.acos.all.any.asin.atan.ceil.clamp.cos.cross.dFdx.dFdy.degrees.distance.dot.equal.exp.exp2.faceforward.floor.fract.gl_BackColor.gl_BackLightModelProduct.gl_BackLightProduct.gl_BackMaterial.gl_BackSecondaryColor.gl_ClipPlane.gl_ClipVertex.gl_Color.gl_DepthRange.gl_DepthRangeParameters.gl_EyePlaneQ.gl_EyePlaneR.gl_EyePlaneS.gl_EyePlaneT.gl_Fog.gl_FogCoord.gl_FogFragCoord.gl_FogParameters.gl_FragColor.gl_FragCoord.gl_FragData.gl_FragDepth.gl_FragDepthEXT.gl_FrontColor.gl_FrontFacing.gl_FrontLightModelProduct.gl_FrontLightProduct.gl_FrontMaterial.gl_FrontSecondaryColor.gl_LightModel.gl_LightModelParameters.gl_LightModelProducts.gl_LightProducts.gl_LightSource.gl_LightSourceParameters.gl_MaterialParameters.gl_MaxClipPlanes.gl_MaxCombinedTextureImageUnits.gl_MaxDrawBuffers.gl_MaxFragmentUniformComponents.gl_MaxLights.gl_MaxTextureCoords.gl_MaxTextureImageUnits.gl_MaxTextureUnits.gl_MaxVaryingFloats.gl_MaxVertexAttribs.gl_MaxVertexTextureImageUnits.gl_MaxVertexUniformComponents.gl_ModelViewMatrix.gl_ModelViewMatrixInverse.gl_ModelViewMatrixInverseTranspose.gl_ModelViewMatrixTranspose.gl_ModelViewProjectionMatrix.gl_ModelViewProjectionMatrixInverse.gl_ModelViewProjectionMatrixInverseTranspose.gl_ModelViewProjectionMatrixTranspose.gl_MultiTexCoord0.gl_MultiTexCoord1.gl_MultiTexCoord2.gl_MultiTexCoord3.gl_MultiTexCoord4.gl_MultiTexCoord5.gl_MultiTexCoord6.gl_MultiTexCoord7.gl_Normal.gl_NormalMatrix.gl_NormalScale.gl_ObjectPlaneQ.gl_ObjectPlaneR.gl_ObjectPlaneS.gl_ObjectPlaneT.gl_Point.gl_PointCoord.gl_PointParameters.gl_PointSize.gl_Position.gl_ProjectionMatrix.gl_ProjectionMatrixInverse.gl_ProjectionMatrixInverseTranspose.gl_ProjectionMatrixTranspose.gl_SecondaryColor.gl_TexCoord.gl_TextureEnvColor.gl_TextureMatrix.gl_TextureMatrixInverse.gl_TextureMatrixInverseTranspose.gl_TextureMatrixTranspose.gl_Vertex.greaterThan.greaterThanEqual.inversesqrt.length.lessThan.lessThanEqual.log.log2.matrixCompMult.max.min.mix.mod.normalize.not.notEqual.pow.radians.reflect.refract.sign.sin.smoothstep.sqrt.step.tan.texture2D.texture2DLod.texture2DProj.texture2DProjLod.textureCube.textureCubeLod.texture2DLodEXT.texture2DProjLodEXT.textureCubeLodEXT.texture2DGradEXT.texture2DProjGradEXT.textureCubeGradEXT.textureSize.texelFetch".split("."),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,tt.A)("esri-tests-disable-gpu-memory-measurements"),(0,rt.en)();(0,rt.en)();var nt=r(90644),ot=r(21231),at=r(48852),st=r(42293);const lt=!!(0,tt.A)("esri-tests-disable-gpu-memory-measurements");class ct{constructor(e,t){this._context=e,this._descriptor=t,this.type=2,this._context.instanceCounter.increment(it.vt.Renderbuffer,this);let r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);let{width:i,height:n,internalFormat:o,multisampled:a}=t;a?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,o,i,n):r.renderbufferStorage(r.RENDERBUFFER,o,i,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){let e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return lt?0:(e=this._descriptor).width<=0||e.height<=0||null==e.internalFormat?0:e.width*e.height*(0,st.MW)(e.internalFormat);var e}resize(e,t){let r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;let i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&=(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(it.vt.Renderbuffer,this),null)}}class ut{constructor(e,t,r){if(this._context=e,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,e.instanceCounter.increment(it.vt.FramebufferObject,this),null!=t){let r=function(e,t){return dt(t)||ht(t)?t:ft(t)?new ot.g(e,t):function(e){return 3===mt(e)||null!=e&&"samples"in e}(t)?new ct(e,t):null}(e,t);null!=r&&(this._colorAttachments.set(36064,r),dt(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(36064)}if(null!=r)if(function(e){return dt(e)||ft(e)}(r))this._depthStencilTexture=dt(r)?r:new ot.g(e,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{let t=ht(r)?r:new ct(e,r);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}get glName(){return this._glName}get colorTexture(){let e=this._colorAttachments.get(36064);return dt(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){return(this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.width??0}get height(){return(this._colorAttachments.get(36064)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((e,t)=>e+t.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(e){this._level!==e&&(this._level=e,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){let t=this._colorAttachments.get(e);return t&&dt(t)?t:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=36064){if(!e)return;this._validateColorAttachmentPoint(t);let{descriptor:r}=e;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=36064){let t=this._colorAttachments.get(e);if(!t)return;let r=dt(t);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(r)this._framebufferTexture2D(null,e);else{let t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),r?t:void 0}detachColorTextures(...e){if(0!==e.length){if(this._glName){let t=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{e.forEach(e=>{dt(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=36064,r=0){let i=this._colorAttachments.get(t);i&&(35866===e?this._framebufferTextureLayer(i.glName,t,36160,r):this._framebufferTexture2D(i.glName,t,e,36160))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;let{descriptor:t}=e,{pixelFormat:r,dataType:i}=t;34041!==r&&6402!==r?console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"):34041===r&&i!==it.ld.UNSIGNED_INT_24_8?console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):6402===r&&i!==it.ld.UNSIGNED_INT&&i!==it.ld.UNSIGNED_SHORT?console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,gt(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e)}detachDepthStencilTexture(){let e=this._depthStencilTexture;return e&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,gt(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;let t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);let{gl:r}=this._context,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){let e=this._depthStencilBuffer;if(e&&this._glName){let{_context:t}=this,r=t.boundFramebuffer;t.bindFramebuffer(this);let{gl:i}=t,n=this._getGLAttachmentPoint(e.descriptor);i.framebufferRenderbuffer(36160,n,i.RENDERBUFFER,null),t.bindFramebuffer(r)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){let{_context:t}=this;t.temporaryBindFramebuffer(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,r,i,n,o,a){(e<0||t<0||n<0||o<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");let s=a.descriptor;3553!==a.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==s?.width||null==s?.height||e+r>this.width||t+i>this.height||n+r>s.width||o+i>s.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");let l=this._context,c=l.bindTexture(a,ot.g.TEXTURE_UNIT_FOR_UPDATES);l.setActiveTexture(ot.g.TEXTURE_UNIT_FOR_UPDATES),l.bindFramebuffer(this),l.gl.copyTexSubImage2D(3553,0,n,o,e,t,r,i),l.bindTexture(c,ot.g.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,n,o,a){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),a||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,n,o,a)}async readPixelsAsync(e,t,r,i,n,o,a,s){let{gl:l}=this._context,c=at.g.createPixelPack(this._context,35041,a.byteLength);try{this._context.bindBuffer(c);let u=this._context.boundFramebuffer;try{this._context.bindFramebuffer(this),l.readPixels(e,t,r,i,n,o,0)}finally{this._context.unbindBuffer(35051),this._context.bindFramebuffer(u)}await c.getSubDataAsync(a,void 0,void 0,void 0,s)}finally{c.dispose()}}resize(e,t){if(this.width===e&&this.height===t)return;let r={width:e,height:t};if(pt(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._glName&&(pt(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),(0,rt.en)())){let{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(e=36160){let{gl:t}=this._context;this._glName?t.bindFramebuffer(e,this._glName):(this._glName&&t.deleteFramebuffer(this._glName),this._glName=t.createFramebuffer(),t.bindFramebuffer(e,this._glName),this._initializeAttachments(e))}_initializeAttachments(e=36160){let{gl:t}=this._context;if(this._colorAttachments.forEach((t,r)=>{if(dt(t)){let i=vt(t);35866===i?this._framebufferTextureLayer(t.glName,r,e):this._framebufferTexture2D(t.glName,r,i,e)}else if(ht(t)){let i=this._context.gl;i.framebufferRenderbuffer(e,r,i.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){let r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){let t=gt(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,vt(this._depthStencilTexture),e)}(0,rt.en)()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}_framebufferTexture2D(e,t=36064,r=3553,i=36160){this._context.gl.framebufferTexture2D(i,t,r,e,this._level)}_framebufferTextureLayer(e,t=36064,r=36160,i=0){this._context.gl.framebufferTextureLayer(r,t,e,this._level,i)}_disposeDepthStencilAttachments(){let e=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);let t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=(0,s.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&=(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,gt(this._depthStencilTexture.descriptor.pixelFormat))),(0,s.WD)(this._depthStencilTexture))}_validateTextureDescriptor(e){3553!==e.target&&34067!==e.target&&35866!==e.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),pt(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){pt(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width!==e.width||this.height!==e.height)&&console.error("Attachment size must match framebuffer size!")}_getGLAttachmentPoint(e){switch(e.internalFormat){case it.SB.DEPTH_COMPONENT16:case it.SB.DEPTH_COMPONENT24:case it.SB.DEPTH_COMPONENT32F:return 36096;case it.iE.DEPTH24_STENCIL8:case it.iE.DEPTH32F_STENCIL8:return 33306;case 36168:return 36128;default:return 36064}}_validateColorAttachmentPoint(e){if(-1===ut._MAX_COLOR_ATTACHMENTS){let{gl:e}=this._context;ut._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}let t=e-36064;t+1>ut._MAX_COLOR_ATTACHMENTS&&R.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${ut._MAX_COLOR_ATTACHMENTS} color attachments`)}}function dt(e){return 1===mt(e)}function ht(e){return 2===mt(e)}function ft(e){return 0===mt(e)}function mt(e){return null!=e&&"type"in e?e.type:null}function pt(e,t){let r=Math.max(e.width,e.height);if(r>t){R.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);let i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function vt(e){return 34067===e.descriptor.target?34069:35866===e.descriptor.target?35866:3553}function gt(e){return 6402===e?36096:33306}var xt=r(67171),_t=(r(21818),r(69397),r(85079));const yt=[new(r(74038)._)("position",2,it.pe.UNSIGNED_SHORT,0,4)];(0,_t.Xk)(yt),r(66289);const bt=new Image;bt.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",bt.width=5,bt.height=5,bt.decode();let wt=class extends D.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=Ye,this._dirty=!0}initialize(){this.addHandles([(0,l.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},l.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new Ke.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){let e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return this._bind(t),t}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:e}){e.initializeAndBind(),this.gl.drawBuffers(function(e){return e?e.colorAttachments.length>0?e.colorAttachments:[0]:[1029]}(e))}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}queryDepthRange(e){return null}get input(){return this._frameBuffer}};(0,o.Cg)([(0,Qe.MZ)({constructOnly:!0})],wt.prototype,"view",void 0),(0,o.Cg)([(0,Qe.MZ)({constructOnly:!0})],wt.prototype,"consumes",void 0),(0,o.Cg)([(0,Qe.MZ)()],wt.prototype,"produces",void 0),(0,o.Cg)([(0,Qe.MZ)({readOnly:!0})],wt.prototype,"techniques",null),wt=(0,o.Cg)([(0,et.$)("esri.views.3d.webgl.RenderNode")],wt);let Mt=class extends wt{constructor(){super(...arguments),this.consumes={required:["normals"]},this.produces="disabled"}get enabled(){return!this.destroying&&!this.destroyed&&this.produces===Je.AMBIENT_ILLUMINATION}get _belowMaxElevation(){return(this.view.state.camera.relativeElevation??1/0)<5e5}get _useGlobalIllumination(){return this._belowMaxElevation&&this.view.stage.renderer.isFeatureEnabled(11)}get _useSSAO(){return this._belowMaxElevation&&this.view.stage.renderer.isFeatureEnabled(3)}_enable(){this.produces=Je.AMBIENT_ILLUMINATION,this.requestRender(1)}_disable(){this.produces="disabled",this.requestRender(1)}};(0,o.Cg)([(0,u.MZ)()],Mt.prototype,"consumes",void 0),(0,o.Cg)([(0,u.MZ)()],Mt.prototype,"produces",void 0),Mt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.AmbientIllumination")],Mt);var Tt=r(15581),St=r(13840),Ct=r(42958),At=r(95774);let Et=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(At.S,()=>r.e(1285).then(()=>r(91285)))}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}};Et=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],Et);var It=r(65786);class Ot extends It.Y{constructor(){super(...arguments),this.projScale=1}}class Pt extends Ot{constructor(){super(...arguments),this.intensity=1}}class Dt extends It.Y{}class Rt extends Dt{constructor(){super(...arguments),this.blurSize=(0,B.vt)()}}let Ft=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(Tt.S,()=>r.e(6122).then(()=>r(86122)))}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}};Ft=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],Ft);let Bt=class extends Mt{constructor(e){super(e),this._enableTime=(0,c.l5)(0),this._passParameters=new Pt,this._drawParameters=new Rt}initialize(){let e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new xt.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new ot.g(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this._useSSAO,e=>{this._enableTime=(0,c.l5)(0),e?this._enable():this._disable()},l.pc))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){let t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(33306);if(!r||!i)return;let n=this.techniques.getCompiled(Ft),o=this.techniques.getCompiled(Et);if(!n||!o)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));let s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,h=u.camera,f=h.relativeElevation,m=(0,a.qE)((5e5-f)/2e5,0,1),p=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,v=p*m;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDistance(1),this._passParameters.intensity=4*Nt/(0,Tt.g)(h)**6*v;let g=h.fullViewport[2],x=h.fullViewport[3],_=this.fboCache.acquire(g,x,"ssao input",2);s.bindFramebuffer(_.fbo),s.setViewport(0,0,g,x),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.screen.draw();let y=Math.round(g/2),b=Math.round(x/2),w=this.fboCache.acquire(y,b,"ssao blur",0);s.bindFramebuffer(w.fbo),this._drawParameters.colorTexture=_.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/x),s.bindTechnique(o,u,this._passParameters,this._drawParameters),s.setViewport(0,0,y,b),s.screen.draw(),_.release();let M=this.fboCache.acquire(y,b,Je.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(M.fbo),s.setViewport(0,0,g,x),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=w.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/g,0),s.bindTechnique(o,u,this._passParameters,this._drawParameters),s.setViewport(0,0,y,b),s.screen.draw(),s.setViewport4fv(h.fullViewport),w.release(),p<1&&this.requestRender(2),M}};Bt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Bt);const Nt=.5;function zt(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
604
|
-
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
605
|
-
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
606
|
-
}
|
|
607
|
-
float evaluateAmbientOcclusion() {
|
|
608
|
-
return 1.0 - evaluateAmbientOcclusionInverse();
|
|
609
|
-
}`)):e.code.add(i.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
|
|
610
|
-
float evaluateAmbientOcclusion() { return 0.0; }`)}},28390(e,t,r){r.d(t,{k:()=>w,a:()=>b});var i=r(74333);class n extends i.n{constructor(e,t,r,i){super(e,"float",0,(t,n)=>t.setUniform1fv(e,r(n),i),t)}}var o=r(31821);function a(e){e.uniforms.add(new n("shR",9,({lighting:e})=>e.sh.r),new n("shG",9,({lighting:e})=>e.sh.g),new n("shB",9,({lighting:e})=>e.sh.b)),e.code.add(o.H`vec3 calculateAmbientIrradiance(vec3 normal) {
|
|
611
|
-
vec3 ambientLight = 0.282095 * vec3(shR[0], shG[0], shB[0]);
|
|
612
|
-
vec4 sh1 = vec4(
|
|
613
|
-
0.488603 * normal.x,
|
|
614
|
-
0.488603 * normal.z,
|
|
615
|
-
0.488603 * normal.y,
|
|
616
|
-
1.092548 * normal.x * normal.y
|
|
617
|
-
);
|
|
618
|
-
vec4 sh2 = vec4(
|
|
619
|
-
1.092548 * normal.y * normal.z,
|
|
620
|
-
0.315392 * (3.0 * normal.z * normal.z - 1.0),
|
|
621
|
-
1.092548 * normal.x * normal.z,
|
|
622
|
-
0.546274 * (normal.x * normal.x - normal.y * normal.y)
|
|
623
|
-
);
|
|
624
|
-
vec4 lightingAmbientSH_R1 = vec4(shR[1], shR[2], shR[3], shR[4]);
|
|
625
|
-
vec4 lightingAmbientSH_G1 = vec4(shG[1], shG[2], shG[3], shG[4]);
|
|
626
|
-
vec4 lightingAmbientSH_B1 = vec4(shB[1], shB[2], shB[3], shB[4]);
|
|
627
|
-
ambientLight += vec3(
|
|
628
|
-
dot(lightingAmbientSH_R1, sh1),
|
|
629
|
-
dot(lightingAmbientSH_G1, sh1),
|
|
630
|
-
dot(lightingAmbientSH_B1, sh1)
|
|
631
|
-
);
|
|
632
|
-
vec4 lightingAmbientSH_R2 = vec4(shR[5], shR[6], shR[7], shR[8]);
|
|
633
|
-
vec4 lightingAmbientSH_G2 = vec4(shG[5], shG[6], shG[7], shG[8]);
|
|
634
|
-
vec4 lightingAmbientSH_B2 = vec4(shB[5], shB[6], shB[7], shB[8]);
|
|
635
|
-
ambientLight += vec3(
|
|
636
|
-
dot(lightingAmbientSH_R2, sh2),
|
|
637
|
-
dot(lightingAmbientSH_G2, sh2),
|
|
638
|
-
dot(lightingAmbientSH_B2, sh2)
|
|
639
|
-
);
|
|
640
|
-
return ambientLight;
|
|
641
|
-
}`),e.code.add(o.H`const vec3 skyTransmittance = vec3(0.9, 0.9, 1.0);
|
|
642
|
-
vec3 calculateAmbientRadiance()
|
|
643
|
-
{
|
|
644
|
-
vec3 ambientLight = 1.2 * (0.282095 * vec3(shR[0], shG[0], shB[0])) - 0.2;
|
|
645
|
-
return ambientLight *= skyTransmittance;
|
|
646
|
-
}`)}var s=r(68785),l=r(65261),c=r(7290),u=r(96777);function d(e){e.uniforms.add(u.t_,u.VK).code.add(o.H`vec3 applyShading(vec3 shadingNormal, float shadow) {
|
|
647
|
-
float dotVal = clamp(dot(shadingNormal, mainLightDirection), 0.0, 1.0);
|
|
648
|
-
return mainLightIntensity * ((1.0 - shadow) * dotVal);
|
|
649
|
-
}`)}var h=r(22393),f=r(89786);class m extends i.n{constructor(e,t){super(e,"bool",0,(r,i)=>r.setUniform1b(e,t(i)))}}var p=r(12791);function v(e,t){t.receiveGlobalIllumination?(e.uniforms.add(new m("hasGlobalIlluminationTexture",e=>null!=e.globalIllumination),new p.x("globalIlluminationTexture",e=>e.globalIllumination?.getTexture())),e.constants.add("globalIlluminationEmissionNoiseThreshold","float",.01),e.code.add(o.H`vec3 readGlobalIlluminationOcclusionInverse() {
|
|
650
|
-
if (!hasGlobalIlluminationTexture) {
|
|
651
|
-
return vec3(1.0);
|
|
652
|
-
}
|
|
653
|
-
ivec2 texel = ivec2(gl_FragCoord.xy);
|
|
654
|
-
return vec3(texelFetch(globalIlluminationTexture, texel, 0).a);
|
|
655
|
-
}
|
|
656
|
-
vec3 readGlobalIlluminationOcclusion() {
|
|
657
|
-
return 1.0 - readGlobalIlluminationOcclusionInverse();
|
|
658
|
-
}
|
|
659
|
-
vec3 suppressBlackNoise(vec3 color) {
|
|
660
|
-
float peak = max(color.r, max(color.g, color.b));
|
|
661
|
-
if (peak <= globalIlluminationEmissionNoiseThreshold) {
|
|
662
|
-
return vec3(0.0);
|
|
663
|
-
}
|
|
664
|
-
float correctedPeak = (peak - globalIlluminationEmissionNoiseThreshold) / (1.0 - globalIlluminationEmissionNoiseThreshold);
|
|
665
|
-
return color * (correctedPeak / peak);
|
|
666
|
-
}
|
|
667
|
-
vec4 readGlobalIlluminationEmission() {
|
|
668
|
-
if (!hasGlobalIlluminationTexture) {
|
|
669
|
-
return vec4(0.0);
|
|
670
|
-
}
|
|
671
|
-
ivec2 texel = ivec2(gl_FragCoord.xy);
|
|
672
|
-
vec3 color = texelFetch(globalIlluminationTexture, texel, 0).rgb;
|
|
673
|
-
return vec4(suppressBlackNoise(color), 0.0);
|
|
674
|
-
}`)):e.code.add(o.H`vec3 readGlobalIlluminationOcclusionInverse() { return vec3(1.0); }
|
|
675
|
-
vec3 readGlobalIlluminationOcclusion() { return vec3(0.0); }
|
|
676
|
-
vec4 readGlobalIlluminationEmission() { return vec4(0.0); }`)}r(34727),r(35522);var g=r(51850);const x={create:()=>[0,0,0,0,0,0,0,0,0],copy(e,t){e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8]}};function _(e){e.code.add(o.H`float mapChannel(float x, vec2 p) {
|
|
677
|
-
if((x < p.x) && (p.x == 0.0) || !(x < p.x) && (p.x == 1.0)) {
|
|
678
|
-
return 0.0;
|
|
679
|
-
}
|
|
680
|
-
float result = (x < p.x) ? mix(0.0, p.y, x/p.x) : mix(p.y, 1.0, (x - p.x) / (1.0 - p.x) );
|
|
681
|
-
return max(result, 0.0);
|
|
682
|
-
}`),e.code.add(o.H`vec3 blackLevelSoftCompression(vec3 color, float averageAmbientRadiance) {
|
|
683
|
-
vec2 p = vec2(0.02, 0.0075) * averageAmbientRadiance;
|
|
684
|
-
return vec3(mapChannel(color.x, p), mapChannel(color.y, p), mapChannel(color.z, p));
|
|
685
|
-
}`)}function y(e){e.code.add(o.H`vec3 tonemapACES(vec3 x) {
|
|
686
|
-
return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
|
|
687
|
-
}`),e.code.add(o.H`vec3 tonemapKhronosNeutral(vec3 color) {
|
|
688
|
-
const float startCompression = 0.76;
|
|
689
|
-
const float desaturation = 0.15;
|
|
690
|
-
float peak = max(color.r, max(color.g, color.b));
|
|
691
|
-
if (peak < startCompression) {
|
|
692
|
-
return color;
|
|
693
|
-
}
|
|
694
|
-
float d = 1.0 - startCompression;
|
|
695
|
-
float newPeak = 1.0 - d * d / (peak + d - startCompression);
|
|
696
|
-
color *= newPeak / peak;
|
|
697
|
-
float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0 );
|
|
698
|
-
return mix(color, vec3(newPeak), g);
|
|
699
|
-
}`)}function b(e){e.constants.add("ambientBoostFactor","float",.4)}function w(e,t){let{pbrMode:r,hasColorTexture:i,receiveGlobalIllumination:n}=t;e.include(c.j,t),e.include(l.C),e.include(v,t),e.include(s.n,t),0!==r&&e.include(h.c,t),e.include(a),e.include(f.p),e.include(y,t);let p=!(2===r&&!i);p&&e.include(_),b(e),e.uniforms.add(u.t_,u.VW).code.add(o.H`float additionalDirectedAmbientLight(float lightAlignment) {
|
|
700
|
-
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
701
|
-
}
|
|
702
|
-
float additionalDirectedAmbientLight(vec3 vPosWorld) {
|
|
703
|
-
float lightAlignment = dot(getLocalUp(vPosWorld), mainLightDirection);
|
|
704
|
-
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
705
|
-
}`),e.uniforms.add(u.VK).code.add(o.H`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
|
|
706
|
-
float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
|
|
707
|
-
return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * mainLightIntensity;
|
|
708
|
-
}`);let g=n?"globalIlluminationOcclusion":"ssao";switch(e.constants.add("globalIlluminationDirectFactor","float",n?.55:0),e.constants.add("globalIlluminationAmbientFactor","float",n?.85:1),e.constants.add("mainLightIrradianceScale","float",n?.75:1),e.constants.add("ambientIrradianceScale","float",n?1.5:1),n?(e.constants.add("globalIlluminationOcclusionBoost","float",1.2),e.constants.add("globalIlluminationEmissionBoost","float",2.25),e.constants.add("globalIlluminationEmissionCompressionWeight","float",.75),e.code.add(o.H`vec3 evaluateGlobalIlluminationOcclusion() {
|
|
709
|
-
return min(globalIlluminationOcclusionBoost * readGlobalIlluminationOcclusion(), 1.0);
|
|
710
|
-
}
|
|
711
|
-
vec3 evaluateGlobalIlluminationEmission(vec3 albedoLinear) {
|
|
712
|
-
vec3 emission = globalIlluminationEmissionBoost * (0.75 * albedoLinear + 0.25) * readGlobalIlluminationEmission().rgb;
|
|
713
|
-
vec3 compressedEmission = emission / (emission + 1.0);
|
|
714
|
-
return mix(emission, compressedEmission, globalIlluminationEmissionCompressionWeight);
|
|
715
|
-
}`)):(e.constants.add("factorDirect","float",0),e.constants.add("factorAmbient","float",1)),r){case 0:case 4:case 3:e.include(d),e.code.add(o.H`
|
|
716
|
-
vec3 evaluateSceneLighting(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
|
|
717
|
-
vec3 viewDirection, vec3 upDirection) {
|
|
718
|
-
${(0,o.If)(n,"vec3 globalIlluminationOcclusion = evaluateGlobalIlluminationOcclusion();")}
|
|
719
|
-
|
|
720
|
-
vec3 mainLighting = mainLightIrradianceScale * applyShading(normal, shadow);
|
|
721
|
-
vec3 ambientLighting = ambientIrradianceScale * calculateAmbientIrradiance(normal) * (1.0 - ${g});
|
|
722
|
-
vec3 albedoLinear = linearizeGamma(albedo);
|
|
723
|
-
|
|
724
|
-
vec3 totalLight = mainLighting + ambientLighting + additionalLight;
|
|
725
|
-
totalLight = min(totalLight, vec3(PI));
|
|
726
|
-
vec3 linearColor = vec3((albedoLinear / PI) * totalLight);
|
|
727
|
-
${(0,o.If)(n,"linearColor += evaluateGlobalIlluminationEmission(albedoLinear);")}
|
|
728
|
-
return delinearizeGamma(linearColor);
|
|
729
|
-
}
|
|
730
|
-
`);break;case 1:case 2:e.constants.add("groundReflectance","float",n?.35:.2),e.code.add(o.H`
|
|
731
|
-
const float fillLightIntensity = 0.25;
|
|
732
|
-
const float horizonLightDiffusion = 0.4;
|
|
733
|
-
|
|
734
|
-
vec3 evaluateSceneLighting(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
|
|
735
|
-
vec3 viewDirection, vec3 upDirection) {
|
|
736
|
-
PBRShadingInfo inputs;
|
|
737
|
-
calculatePBRInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
738
|
-
${(0,o.If)(n,"vec3 globalIlluminationOcclusion = evaluateGlobalIlluminationOcclusion();")}
|
|
739
|
-
`),t.useFillLights?e.uniforms.add(new m("hasFillLights",e=>e.enableFillLights)):e.constants.add("hasFillLights","bool",!1),e.code.add(o.H`
|
|
740
|
-
vec3 ambientDir = vec3( 5.0 * upDirection[1] - upDirection[0] * upDirection[2],
|
|
741
|
-
-5.0 * upDirection[0] - upDirection[2] * upDirection[1],
|
|
742
|
-
upDirection[1] * upDirection[1] + upDirection[0] * upDirection[0]);
|
|
743
|
-
ambientDir = ambientDir == vec3(0.0) ? normalize(vec3(5.0, -1.0, 0.0)) : normalize(ambientDir);
|
|
744
|
-
|
|
745
|
-
inputs.NdotAmbDir = hasFillLights ? abs(dot(normal, ambientDir)) : 1.0;
|
|
746
|
-
|
|
747
|
-
// Calculate the irradiance components: sun, fill lights and the sky.
|
|
748
|
-
// Applying AO to both direct and ambient lighting enhances depth perception.
|
|
749
|
-
// This is an artistic choice; physically, AO should only attenuate ambient lighting.
|
|
750
|
-
vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), globalIlluminationDirectFactor);
|
|
751
|
-
vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), globalIlluminationAmbientFactor);
|
|
752
|
-
vec3 mainLightIrradianceComponent = mainLightIrradianceScale * inputs.NdotL * (1.0 - shadow) * mainLightIntensity * directOcclusionFactor;
|
|
753
|
-
vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity * directOcclusionFactor;
|
|
754
|
-
// calculate ambient irradiance for localView and additionalLight for globalView
|
|
755
|
-
vec3 ambientLightIrradianceComponent = ambientIrradianceScale * calculateAmbientIrradiance(normal) * ambientOcclusionFactor + additionalLight;
|
|
756
|
-
|
|
757
|
-
// Assemble the overall irradiance of the sky that illuminates the surface
|
|
758
|
-
inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
759
|
-
// Assemble the overall irradiance of the ground that illuminates the surface. for this we use the simple model that changes only the sky irradiance by the groundReflectance
|
|
760
|
-
inputs.groundIrradianceToSurface = groundReflectance * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
761
|
-
`),e.uniforms.add(u.vV,u.f4).code.add(o.H`
|
|
762
|
-
vec3 horizonRingDir = inputs.RdotUP * upDirection - inputs.reflectedView;
|
|
763
|
-
vec3 horizonRingH = normalize(horizonRingDir - viewDirection);
|
|
764
|
-
inputs.NdotH_Horizon = dot(normal, horizonRingH);
|
|
765
|
-
|
|
766
|
-
vec3 mainLightRadianceComponent = lightingSpecularStrength * normalDistribution(inputs.NdotH, inputs.roughness) * mainLightIntensity * (1.0 - shadow);
|
|
767
|
-
vec3 horizonLightRadianceComponent = lightingEnvironmentStrength * normalDistribution(inputs.NdotH_Horizon, min(inputs.roughness + horizonLightDiffusion, 1.0)) * mainLightIntensity * fillLightIntensity;
|
|
768
|
-
|
|
769
|
-
// calculateAmbientRadiance for localView and additionalLight for global view
|
|
770
|
-
vec3 ambientLightRadianceComponent = lightingEnvironmentStrength * calculateAmbientRadiance() * (1.0 - ${g}) + additionalLight;
|
|
771
|
-
float normalDirectionModifier = mix(1., min(mix(0.1, 2.0, (inputs.NdotUP + 1.) * 0.5), 1.0), clamp(inputs.roughness * 5.0, 0.0 , 1.0));
|
|
772
|
-
|
|
773
|
-
// Assemble the overall radiance of the sky that illuminates the surface
|
|
774
|
-
inputs.skyRadianceToSurface = (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent;
|
|
775
|
-
|
|
776
|
-
// Assemble the overall radiance of the ground that illuminates the surface. for this we use the simple model that changes only the sky radiance by the groundReflectance
|
|
777
|
-
inputs.groundRadianceToSurface = 0.5 * groundReflectance * (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent;
|
|
778
|
-
|
|
779
|
-
// Calculate average ambient radiance - This is used in the gamut mapping process to determine the black level for compression
|
|
780
|
-
inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + groundReflectance);
|
|
781
|
-
`),e.constants.add("additionalAmbientIrradianceFactor","float",.02),e.code.add(o.H`
|
|
782
|
-
vec3 reflectedColorComponent = evaluateEnvironmentIllumination(inputs);
|
|
783
|
-
float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
784
|
-
vec3 additionalMaterialReflectanceComponent = inputs.albedoLinear * additionalAmbientIrradiance;
|
|
785
|
-
vec3 linearColor = reflectedColorComponent + additionalMaterialReflectanceComponent;
|
|
786
|
-
|
|
787
|
-
${(0,o.If)(n,"linearColor += evaluateGlobalIlluminationEmission(inputs.albedoLinear);")}
|
|
788
|
-
|
|
789
|
-
${p?"linearColor = blackLevelSoftCompression(linearColor, inputs.averageAmbientRadiance);":"linearColor = max(vec3(0.0), linearColor - 0.005 * inputs.averageAmbientRadiance);"}
|
|
790
|
-
|
|
791
|
-
return delinearizeGamma(linearColor);
|
|
792
|
-
}
|
|
793
|
-
`);break;case 5:case 6:e.constants.add("terrainSpecularity","float",n?.35:.5),e.uniforms.add(u.t_,u.VK).code.add(o.H`
|
|
794
|
-
const float roughnessTerrain = 0.5;
|
|
795
|
-
|
|
796
|
-
vec3 evaluateSceneLighting(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
|
|
797
|
-
vec3 viewDirection, vec3 upDirection) {
|
|
798
|
-
PBRShadingInfo inputs;
|
|
799
|
-
calculateSimplifiedInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
800
|
-
|
|
801
|
-
${(0,o.If)(n,"vec3 globalIlluminationOcclusion = evaluateGlobalIlluminationOcclusion();")}
|
|
802
|
-
|
|
803
|
-
// Applying AO to both direct and ambient lighting enhances depth perception.
|
|
804
|
-
// This is an artistic choice; physically, AO should only attenuate ambient lighting.
|
|
805
|
-
vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), globalIlluminationDirectFactor);
|
|
806
|
-
vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${g}), globalIlluminationAmbientFactor);
|
|
807
|
-
vec3 mainLightIrradianceComponent = mainLightIrradianceScale * (1.0 - shadow) * inputs.NdotL * mainLightIntensity * directOcclusionFactor;
|
|
808
|
-
vec3 ambientLightIrradianceComponent = ambientIrradianceScale * calculateAmbientIrradiance(normal) * ambientOcclusionFactor + additionalLight;
|
|
809
|
-
vec3 ambientSky = ambientLightIrradianceComponent + mainLightIrradianceComponent;
|
|
810
|
-
|
|
811
|
-
vec3 indirectDiffuse = ((1.0 - inputs.NdotUP) * mainLightIrradianceComponent + (1.0 + inputs.NdotUP ) * ambientSky) * 0.5;
|
|
812
|
-
vec3 diffuseColor = inputs.albedoLinear * (1.0 - inputs.f0) * indirectDiffuse / PI;
|
|
813
|
-
|
|
814
|
-
vec3 mainLightRadianceComponent = normalDistribution(inputs.NdotH, roughnessTerrain) * mainLightIntensity;
|
|
815
|
-
vec2 dfg = prefilteredDFGAnalytical(roughnessTerrain, inputs.NdotV);
|
|
816
|
-
vec3 specularColor = inputs.f0 * dfg.x + inputs.f90 * dfg.y;
|
|
817
|
-
vec3 specularComponent = terrainSpecularity * specularColor * mainLightRadianceComponent;
|
|
818
|
-
|
|
819
|
-
vec3 linearColor = diffuseColor + specularComponent;
|
|
820
|
-
|
|
821
|
-
${(0,o.If)(n,"linearColor += evaluateGlobalIlluminationEmission(inputs.albedoLinear);")}
|
|
822
|
-
|
|
823
|
-
return delinearizeGamma(linearColor);
|
|
824
|
-
}
|
|
825
|
-
`);break;case 7:e.code.add(o.H`vec3 evaluateSceneLighting(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
|
|
826
|
-
vec3 viewDirection, vec3 upDirection) {
|
|
827
|
-
return albedo;
|
|
828
|
-
}`)}}x.create(),x.create(),(0,g.vt)(),(0,g.vt)()},65261(e,t,r){r.d(t,{C:()=>o});var i=r(40876),n=r(31821);function o(e){e.constants.add("GAMMA","float",2.2).constants.add("INV_GAMMA","float",i.iw).code.add(n.H`vec3 delinearizeGamma(vec3 color) {
|
|
829
|
-
return pow(color, vec3(INV_GAMMA));
|
|
830
|
-
}
|
|
831
|
-
vec4 delinearizeGamma(vec4 color) {
|
|
832
|
-
return vec4(delinearizeGamma(color.rgb), color.a);
|
|
833
|
-
}
|
|
834
|
-
vec3 linearizeGamma(vec3 color) {
|
|
835
|
-
return pow(color, vec3(GAMMA));
|
|
836
|
-
}`)}},20598(e,t,r){r.d(t,{n:()=>o});var i=r(7290),n=r(31821);function o(e,t){e.include(i.j,t),t.spherical?e.code.add(n.H`mat3 getTBNMatrix(in vec3 n) {
|
|
837
|
-
vec3 t = normalize(cross(vec3(0.0, 0.0, 1.0), n));
|
|
838
|
-
vec3 b = normalize(cross(n, t));
|
|
839
|
-
return mat3(t, b, n);
|
|
840
|
-
}`):e.code.add(n.H`mat3 getTBNMatrix(in vec3 n) {
|
|
841
|
-
vec3 t = vec3(1.0, 0.0, 0.0);
|
|
842
|
-
vec3 b = normalize(cross(n, t));
|
|
843
|
-
return mat3(t, b, n);
|
|
844
|
-
}`)}},62602(e,t,r){r.d(t,{r:()=>n});var i=r(31821);function n(e,t){let r=e.fragment;switch(t.doubleSidedMode){case 0:r.code.add("vec3 shadingNormal(vec3 normalView, vec3 viewDirection) { return normalize(normalView); }");break;case 1:r.code.add(i.H`vec3 shadingNormal(vec3 normalView, vec3 viewDirection) {
|
|
845
|
-
return dot(normalView, viewDirection) > 0.0 ? normalize(-normalView) : normalize(normalView);
|
|
846
|
-
}`);break;case 2:r.code.add(i.H`vec3 shadingNormal(vec3 normalView, vec3 viewDirection) {
|
|
847
|
-
return gl_FrontFacing ? normalize(normalView) : normalize(-normalView);
|
|
848
|
-
}`);break;default:t.doubleSidedMode;case 3:}}},22393(e,t,r){r.d(t,{c:()=>c});var i=r(31821);function n(e){e.code.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG) {
|
|
849
|
-
return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5;
|
|
850
|
-
}`),e.code.add(i.H`float integratedRadiance(float cosTheta2, float roughness) {
|
|
851
|
-
return (cosTheta2 - 1.0) / (cosTheta2 * (1.0 - roughness * roughness) - 1.0);
|
|
852
|
-
}`),e.code.add(i.H`vec3 evaluateSpecularIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float RdotNG, float roughness) {
|
|
853
|
-
float cosTheta2 = 1.0 - RdotNG * RdotNG;
|
|
854
|
-
float intRadTheta = integratedRadiance(cosTheta2, roughness);
|
|
855
|
-
float ground = RdotNG < 0.0 ? 1.0 - intRadTheta : 1.0 + intRadTheta;
|
|
856
|
-
float sky = 2.0 - ground;
|
|
857
|
-
return (ground * ambientGround + sky * ambientSky) * 0.5;
|
|
858
|
-
}`)}var o=r(65261),a=r(23292),s=r(48806),l=r(89786);function c(e,t){e.include(o.C),e.include(l.p),e.include(s.f),e.include(a.d),(1===t.pbrMode||2===t.pbrMode||5===t.pbrMode||6===t.pbrMode)&&(e.code.add(i.H`float normalDistribution(float NdotH, float roughness)
|
|
859
|
-
{
|
|
860
|
-
float a = NdotH * roughness;
|
|
861
|
-
float b = roughness / (1.0 - NdotH * NdotH + a * a);
|
|
862
|
-
return b * b * INV_PI;
|
|
863
|
-
}`),e.code.add(i.H`const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);
|
|
864
|
-
const vec4 c1 = vec4( 1.0, 0.0425, 1.040, -0.040);
|
|
865
|
-
const vec2 c2 = vec2(-1.04, 1.04);
|
|
866
|
-
vec2 prefilteredDFGAnalytical(float roughness, float NdotV) {
|
|
867
|
-
vec4 r = roughness * c0 + c1;
|
|
868
|
-
float a004 = min(r.x * r.x, exp2(-9.28 * NdotV)) * r.x + r.y;
|
|
869
|
-
return c2 * a004 + r.zw;
|
|
870
|
-
}`)),(1===t.pbrMode||2===t.pbrMode)&&(e.include(n),e.code.add(i.H`vec3 evaluateEnvironmentIllumination(PBRShadingInfo inputs) {
|
|
871
|
-
vec3 indirectDiffuse = evaluateDiffuseIlluminationHemisphere(inputs.groundIrradianceToSurface, inputs.skyIrradianceToSurface, inputs.NdotUP);
|
|
872
|
-
vec3 indirectSpecular = evaluateSpecularIlluminationHemisphere(inputs.groundRadianceToSurface, inputs.skyRadianceToSurface, inputs.RdotUP, inputs.roughness);
|
|
873
|
-
vec3 diffuseComponent = inputs.diffuseColor * indirectDiffuse * INV_PI;
|
|
874
|
-
vec2 dfg = prefilteredDFGAnalytical(inputs.roughness, inputs.NdotV);
|
|
875
|
-
vec3 specularColor = inputs.f0 * dfg.x + inputs.f90 * dfg.y;
|
|
876
|
-
vec3 specularComponent = specularColor * indirectSpecular;
|
|
877
|
-
return (diffuseComponent + specularComponent);
|
|
878
|
-
}`)),(5===t.pbrMode||6===t.pbrMode)&&e.code.add(i.H`const vec3 fresnelReflectionSimplified = vec3(0.04);
|
|
879
|
-
void calculateSimplifiedInputs(out PBRShadingInfo inputs, vec3 normal, vec3 viewDirection, vec3 upDirection, vec3 albedo) {
|
|
880
|
-
calculateCommonInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
881
|
-
float lightness = 0.3 * inputs.albedoLinear[0] + 0.5 * inputs.albedoLinear[1] + 0.2 * inputs.albedoLinear[2];
|
|
882
|
-
inputs.f0 = (0.85 * lightness + 0.15) * fresnelReflectionSimplified;
|
|
883
|
-
inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
|
|
884
|
-
}`)}},59469(e,t,r){r.d(t,{_Z:()=>h});var i=r(99208),n=r(23292),o=r(40710),a=r(33079),s=r(31821),l=r(15976),c=r(63761),u=r(51976),d=(r(74810),r(65786));function h(e,t){let r=t.pbrMode,u=e.fragment;switch(r){case 5:case 3:case 4:case 6:return void u.code.add(s.H`void applyPBRFactors() {}`);case 0:case 7:return void u.code.add(s.H`void applyPBRFactors() {}
|
|
885
|
-
float getBakedOcclusion() { return 1.0; }`);case 2:return void u.code.add(s.H`float occlusion = 1.0;
|
|
886
|
-
void applyPBRFactors() {}
|
|
887
|
-
float getBakedOcclusion() { return 1.0; }`);case 1:{let{hasMetallicRoughnessTexture:r,hasMetallicRoughnessTextureTransform:d,hasOcclusionTexture:h,hasOcclusionTextureTransform:f,bindType:m}=t;(r||h)&&e.include(i.r,t),u.code.add("float occlusion;"),r&&u.uniforms.add(1===m?new c.N("texMetallicRoughness",e=>e.textureMetallicRoughness):new l.o("texMetallicRoughness",e=>e.textureMetallicRoughness)),h&&u.uniforms.add(1===m?new c.N("texOcclusion",e=>e.textureOcclusion):new l.o("texOcclusion",e=>e.textureOcclusion)),u.uniforms.add(1===m?new a.t("mrrFactors",e=>e.mrrFactors):new o.W("mrrFactors",e=>e.mrrFactors)),u.include(n.d),r&&u.code.add(s.H`void applyMetallicRoughness(vec2 uv) {
|
|
888
|
-
vec3 metallicRoughness = textureLookup(texMetallicRoughness, uv).rgb;
|
|
889
|
-
mrr[0] *= metallicRoughness.b;
|
|
890
|
-
mrr[1] *= metallicRoughness.g;
|
|
891
|
-
}`),h&&u.code.add("void applyOcclusion(vec2 uv) { occlusion *= textureLookup(texOcclusion, uv).r; }"),u.code.add(s.H`
|
|
892
|
-
float getBakedOcclusion() {
|
|
893
|
-
return ${h?"occlusion":"1.0"};
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
void applyPBRFactors() {
|
|
897
|
-
mrr = mrrFactors;
|
|
898
|
-
occlusion = 1.0;
|
|
899
|
-
|
|
900
|
-
${(0,s.If)(r,`applyMetallicRoughness(${d?"metallicRoughnessUV":"vuv0"});`)}
|
|
901
|
-
${(0,s.If)(h,`applyOcclusion(${f?"occlusionUV":"vuv0"});`)}
|
|
902
|
-
}`)}}}u.K,d.Y},89786(e,t,r){function i(e){let t=.3183098861837907;e.constants.add("PI","float",3.141592653589793),e.constants.add("LIGHT_NORMALIZATION","float",t),e.constants.add("INV_PI","float",t),e.constants.add("ONE_QUATER_PI","float",.78539816339745),e.constants.add("HALF_PI","float",1.570796326794897),e.constants.add("THREE_QUATER_PI","float",2.35619449019234),e.constants.add("TWO_PI","float",6.28318530717958),e.constants.add("PI_SQUARED","float",9.86960440108936)}r.d(t,{p:()=>i})},51406(e,t,r){r.d(t,{MU:()=>l,O1:()=>c,QM:()=>u,Sx:()=>s,q2:()=>a});var i=r(29242),n=r(31821),o=r(35644);function a(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new o.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??i.zK)).code.add(n.H`void forwardColorUV(){
|
|
903
|
-
colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
904
|
-
}`)):e.vertex.code.add(n.H`void forwardColorUV(){}`)}function s(e,t){t.hasNormalTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new o.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??i.zK)).code.add(n.H`void forwardNormalUV(){
|
|
905
|
-
normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
906
|
-
}`)):e.vertex.code.add(n.H`void forwardNormalUV(){}`)}function l(e,t){t.hasEmissionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("emissiveUV","vec2"),e.vertex.uniforms.add(new o.k("emissiveTextureTransformMatrix",e=>e.emissiveTextureTransformMatrix??i.zK)).code.add(n.H`void forwardEmissiveUV(){
|
|
907
|
-
emissiveUV = (emissiveTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
908
|
-
}`)):e.vertex.code.add(n.H`void forwardEmissiveUV(){}`)}function c(e,t){t.hasOcclusionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("occlusionUV","vec2"),e.vertex.uniforms.add(new o.k("occlusionTextureTransformMatrix",e=>e.occlusionTextureTransformMatrix??i.zK)).code.add(n.H`void forwardOcclusionUV(){
|
|
909
|
-
occlusionUV = (occlusionTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
910
|
-
}`)):e.vertex.code.add(n.H`void forwardOcclusionUV(){}`)}function u(e,t){t.hasMetallicRoughnessTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("metallicRoughnessUV","vec2"),e.vertex.uniforms.add(new o.k("metallicRoughnessTextureTransformMatrix",e=>e.metallicRoughnessTextureTransformMatrix??i.zK)).code.add(n.H`void forwardMetallicRoughnessUV(){
|
|
911
|
-
metallicRoughnessUV = (metallicRoughnessTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
912
|
-
}`)):e.vertex.code.add(n.H`void forwardMetallicRoughnessUV(){}`)}},89435(e,t,r){r.d(t,{A:()=>h});var i=r(43519),n=r(33079),o=r(71988),a=r(74333);class s extends a.n{constructor(e,t,r,i){super(e,"vec4",1,(t,n,o)=>t.setUniform4fv(e,r(n,o),i),t)}}class l extends a.n{constructor(e,t,r,i){super(e,"float",1,(t,n,o)=>t.setUniform1fv(e,r(n,o),i),t)}}var c=r(31821),u=r(35644),d=r(46606);function h(e,t){let{vertex:r,attributes:a}=e;t.hasVVInstancing&&(t.hasVVSize||t.hasVVColor)&&a.add("instanceFeatureAttribute","vec4"),t.hasVVSize?(r.uniforms.add(new n.t("vvSizeMinSize",e=>e.vvSize.minSize)),r.uniforms.add(new n.t("vvSizeMaxSize",e=>e.vvSize.maxSize)),r.uniforms.add(new n.t("vvSizeOffset",e=>e.vvSize.offset)),r.uniforms.add(new n.t("vvSizeFactor",e=>e.vvSize.factor)),r.uniforms.add(new n.t("vvSizeFallback",e=>e.vvSize.fallback)),r.uniforms.add(new u.k("vvSymbolRotationMatrix",e=>e.vvSize.symbolRotationMatrix)),r.uniforms.add(new n.t("vvSymbolAnchor",e=>e.vvSize.symbolAnchor)),r.code.add(c.H`vec3 vvScale(vec4 _featureAttribute) {
|
|
913
|
-
if (isnan(_featureAttribute.x)) {
|
|
914
|
-
return vvSizeFallback;
|
|
915
|
-
}
|
|
916
|
-
return clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize);
|
|
917
|
-
}
|
|
918
|
-
vec4 vvTransformPosition(vec3 position, vec4 _featureAttribute) {
|
|
919
|
-
return vec4(vvSymbolRotationMatrix * ( vvScale(_featureAttribute) * (position + vvSymbolAnchor)), 1.0);
|
|
920
|
-
}`),r.code.add(c.H`
|
|
921
|
-
const float eps = 1.192092896e-07;
|
|
922
|
-
vec4 vvTransformNormal(vec3 _normal, vec4 _featureAttribute) {
|
|
923
|
-
vec3 scale = max(vvScale(_featureAttribute), eps);
|
|
924
|
-
return vec4(vvSymbolRotationMatrix * _normal / scale, 1.0);
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
${t.hasVVInstancing?c.H`
|
|
928
|
-
vec4 vvLocalNormal(vec3 _normal) {
|
|
929
|
-
return vvTransformNormal(_normal, instanceFeatureAttribute);
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
vec4 localPosition() {
|
|
933
|
-
return vvTransformPosition(${r.inputs.get("position")}, instanceFeatureAttribute);
|
|
934
|
-
}`:""}
|
|
935
|
-
`)):r.code.add(c.H`
|
|
936
|
-
vec4 localPosition() { return vec4(${r.inputs.get("position")}, 1.0); }
|
|
937
|
-
vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }
|
|
938
|
-
`),e.vertex.include(i.WD),t.hasVVColor?(r.constants.add("vvColorNumber","int",d.p),r.uniforms.add(new l("vvColorValues",d.p,e=>e.vvColor.values),new s("vvColorColors",d.p,e=>e.vvColor.colors),new o.E("vvColorFallback",e=>e.vvColor.fallback,{supportsNaN:!0})),t.hasVVInstancing&&(e.vertex.include(i.ML),e.vertex.include(i.oF)),r.code.add(c.H`
|
|
939
|
-
vec4 interpolateVVColor(float value) {
|
|
940
|
-
if (isnan(value)) {
|
|
941
|
-
return vvColorFallback;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
if (value <= vvColorValues[0]) {
|
|
945
|
-
return vvColorColors[0];
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
for (int i = 1; i < vvColorNumber; ++i) {
|
|
949
|
-
if (vvColorValues[i] >= value) {
|
|
950
|
-
float f = (value - vvColorValues[i-1]) / (vvColorValues[i] - vvColorValues[i-1]);
|
|
951
|
-
return mix(vvColorColors[i-1], vvColorColors[i], f);
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
return vvColorColors[vvColorNumber - 1];
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
vec4 vvGetColor(vec4 featureAttribute) {
|
|
958
|
-
return interpolateVVColor(featureAttribute.y);
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
${t.hasVVInstancing?c.H`
|
|
962
|
-
vec4 vvColor() {
|
|
963
|
-
return vvGetColor(instanceFeatureAttribute);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
MaskedColor applyVVColor(MaskedColor color) {
|
|
967
|
-
return multiplyMaskedColors(color, createMaskedFromNaNColor(vvColor()));
|
|
968
|
-
}
|
|
969
|
-
`:c.H`
|
|
970
|
-
vec4 vvColor() {
|
|
971
|
-
return vec4(1.0);
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
MaskedColor applyVVColor(MaskedColor color) {
|
|
975
|
-
return color;
|
|
976
|
-
}
|
|
977
|
-
`}
|
|
978
|
-
`)):r.code.add(c.H`vec4 vvColor() {
|
|
979
|
-
return vec4(1.0);
|
|
980
|
-
}
|
|
981
|
-
MaskedColor applyVVColor(MaskedColor color) {
|
|
982
|
-
return color;
|
|
983
|
-
}`)}},7290(e,t,r){function i(e,{spherical:t}){e.code.add(t?"vec3 getLocalUp(in vec3 pos, in vec3 origin) { return normalize(pos + origin); }\n vec3 getLocalUp(in vec3 pos) { return normalize(pos); }":"vec3 getLocalUp(in vec3 pos, in vec3 origin) { return vec3(0.0, 0.0, 1.0); }\n vec3 getLocalUp(in vec3 pos) { return vec3(0.0, 0.0, 1.0); }")}r.d(t,{j:()=>i})},96777(e,t,r){var i=r(23205),n=r(33094);const o=new i.d("mainLightDirection",e=>e.lighting.mainLight.direction),a=new i.d("mainLightIntensity",e=>e.lighting.mainLight.intensity),s=new n.U("lightingGlobalFactor",e=>e.lighting.globalFactor),l=new n.U("lightingSpecularStrength",e=>e.lighting.mainLight.specularStrength),c=new n.U("lightingEnvironmentStrength",e=>e.lighting.mainLight.environmentStrength);r.d(t,["VK",0,a,"VW",0,s,"f4",0,c,"t_",0,o,"vV",0,l])},23292(e,t,r){r.d(t,{d:()=>s});var i=r(65261),n=r(96777),o=r(48806),a=r(31821);function s(e){e.include(o.f),e.include(i.C),e.uniforms.add(n.t_).code.add(a.H`void calculateCommonInputs(out PBRShadingInfo inputs, vec3 normal, vec3 viewDirection, vec3 upDirection, vec3 albedo) {
|
|
984
|
-
vec3 h = normalize(mainLightDirection - viewDirection);
|
|
985
|
-
inputs.NdotV = clamp(abs(dot(normal, -viewDirection)), 0.001, 1.0);
|
|
986
|
-
inputs.NdotUP = clamp(dot(normal, upDirection), -1.0, 1.0);
|
|
987
|
-
inputs.reflectedView = normalize(reflect(-viewDirection, normal));
|
|
988
|
-
inputs.RdotUP = clamp(dot(inputs.reflectedView, upDirection), -1.0, 1.0);
|
|
989
|
-
inputs.albedoLinear = linearizeGamma(albedo);
|
|
990
|
-
inputs.NdotH = clamp(dot(normal, h), 0.0, 1.0);
|
|
991
|
-
inputs.NdotL = clamp(dot(normal, mainLightDirection), 0.001, 1.0);
|
|
992
|
-
}`),e.code.add(a.H`vec3 mrr = vec3(0.0, 0.6, 0.2);
|
|
993
|
-
void calculatePBRInputs(out PBRShadingInfo inputs, vec3 normal, vec3 viewDirection, vec3 upDirection, vec3 albedo) {
|
|
994
|
-
calculateCommonInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
995
|
-
inputs.metalness = mrr[0];
|
|
996
|
-
inputs.roughness = clamp(mrr[1] * mrr[1], 0.001, 0.99);
|
|
997
|
-
inputs.f0 = (0.16 * mrr[2] * mrr[2]) * (1.0 - inputs.metalness) + inputs.albedoLinear * inputs.metalness;
|
|
998
|
-
inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
|
|
999
|
-
inputs.diffuseColor = inputs.albedoLinear * (vec3(1.0) - inputs.f0) * (1.0 - inputs.metalness);
|
|
1000
|
-
}`)}},48806(e,t,r){r.d(t,{f:()=>n});var i=r(31821);function n(e){e.code.add(i.H`struct PBRShadingInfo
|
|
1001
|
-
{
|
|
1002
|
-
float NdotV;
|
|
1003
|
-
float NdotL;
|
|
1004
|
-
float LdotH;
|
|
1005
|
-
float NdotUP;
|
|
1006
|
-
float RdotUP;
|
|
1007
|
-
float NdotAmbDir;
|
|
1008
|
-
float NdotH_Horizon;
|
|
1009
|
-
float NdotH;
|
|
1010
|
-
vec3 skyRadianceToSurface;
|
|
1011
|
-
vec3 groundRadianceToSurface;
|
|
1012
|
-
vec3 skyIrradianceToSurface;
|
|
1013
|
-
vec3 groundIrradianceToSurface;
|
|
1014
|
-
vec3 reflectedView;
|
|
1015
|
-
float averageAmbientRadiance;
|
|
1016
|
-
vec3 albedoLinear;
|
|
1017
|
-
vec3 f0;
|
|
1018
|
-
vec3 f90;
|
|
1019
|
-
vec3 diffuseColor;
|
|
1020
|
-
float metalness;
|
|
1021
|
-
float roughness;
|
|
1022
|
-
};`)}},56529(e,t,r){r.d(t,{rA:()=>w,oD:()=>b});var i=r(32198),n=r(72657),o=r(46686),a=r(49255),s=r(31821);function l(e,t){let r=(0,a._o)(t.output)&&t.receiveShadows;r&&(0,o.A7)(e),e.vertex.code.add(s.H`
|
|
1023
|
-
void forwardLinearDepthToReadShadow() { ${(0,s.If)(r,"forwardLinearDepth(gl_Position.w);")} }
|
|
1024
|
-
`)}r(51850);var c=r(14314),u=r(35818),d=r(74333);class h extends d.n{constructor(e,t,r,i){super(e,"mat4",2,(r,n,o,a)=>r.setUniformMatrices4fv(e,t(n,o,a),i),r)}}class f extends d.n{constructor(e,t,r,i){super(e,"mat4",1,(r,n,o)=>r.setUniformMatrices4fv(e,t(n,o),i),r)}}function m(e){e.uniforms.add(new f("shadowMapMatrix",({origin:e},t)=>t.shadowMap.getShadowMapMatrices(e),4)),e.include(v)}function p(e){e.uniforms.add(new h("shadowMapMatrix",({origin:e},t)=>t.shadowMap.getShadowMapMatrices(e),4)),e.include(v)}function v(e){e.uniforms.add(new c.I("cascadeDistances",e=>e.shadowMap.cascadeDistances),new u.W("numCascades",e=>e.shadowMap.numCascades)).code.add(s.H`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
|
|
1025
|
-
vec3 lightSpacePosition(vec3 _vpos, mat4 mat) {
|
|
1026
|
-
vec4 lv = mat * vec4(_vpos, 1.0);
|
|
1027
|
-
lv.xy /= lv.w;
|
|
1028
|
-
return 0.5 * lv.xyz + vec3(0.5);
|
|
1029
|
-
}
|
|
1030
|
-
vec2 cascadeCoordinates(int i, ivec2 textureSize, vec3 lvpos) {
|
|
1031
|
-
float xScale = float(textureSize.y) / float(textureSize.x);
|
|
1032
|
-
return vec2((float(i) + lvpos.x) * xScale, lvpos.y);
|
|
1033
|
-
}
|
|
1034
|
-
vec3 calculateUVZShadow(in vec3 _worldPos, in float _linearDepth, in ivec2 shadowMapSize) {
|
|
1035
|
-
int i = _linearDepth < cascadeDistances[1] ? 0 :
|
|
1036
|
-
_linearDepth < cascadeDistances[2] ? 1 :
|
|
1037
|
-
_linearDepth < cascadeDistances[3] ? 2 : 3;
|
|
1038
|
-
if (i >= numCascades) {
|
|
1039
|
-
return invalidShadowmapUVZ;
|
|
1040
|
-
}
|
|
1041
|
-
vec3 lvpos = lightSpacePosition(_worldPos, shadowMapMatrix[i]);
|
|
1042
|
-
if (lvpos.z >= 1.0 || lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y > 1.0) {
|
|
1043
|
-
return invalidShadowmapUVZ;
|
|
1044
|
-
}
|
|
1045
|
-
vec2 uvShadow = cascadeCoordinates(i, shadowMapSize, lvpos);
|
|
1046
|
-
return vec3(uvShadow, lvpos.z);
|
|
1047
|
-
}`)}r(65786).Y;var g=r(96777);class x extends d.n{constructor(e,t){super(e,"sampler2DShadow",0,(r,i)=>r.bindTexture(e,t(i)))}}var _=r(51976);class y extends o.Y0{constructor(){super(...arguments),this.hasShadowHighlights=!1,this.receiveShadows=!0}}function b(e,t){t.receiveShadows&&e.fragment.include(m),M(e,t)}function w(e,t){t.receiveShadows&&e.fragment.include(p),M(e,t)}function M(e,t){e.include(l,t);let{hasShadowHighlights:r,receiveShadows:i,spherical:o}=t;i&&(function(e,t,r="gl_FragCoord.xy"){t&&e.uniforms.add(n.ri),e.uniforms.add(new x("shadowMap",({shadowMap:e})=>e.getOutput(5)??e.getOutput(7))).code.add(s.H`
|
|
1048
|
-
float readShadowMaps(const in vec3 uvzShadow) {
|
|
1049
|
-
if (uvzShadow.z < 0.0) {
|
|
1050
|
-
return 0.0;
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
float shadow1 = texture(shadowMap, uvzShadow);
|
|
1054
|
-
${(0,s.If)(t,`float shadow2 = texelFetch(shadowHighlight, ivec2(${r}), 0).r;\n return shadow1 > shadow2 ? shadow1 : shadow2;`,"return shadow1;")}
|
|
1055
|
-
}
|
|
1056
|
-
`)}(e.fragment,r),e.fragment.code.add(s.H`float readShadowMap(const in vec3 _worldPos, float _linearDepth) {
|
|
1057
|
-
vec3 uvzShadow = calculateUVZShadow(_worldPos, _linearDepth, textureSize(shadowMap, 0));
|
|
1058
|
-
return readShadowMaps(uvzShadow);
|
|
1059
|
-
}
|
|
1060
|
-
float readShadowMap(const in vec3 _worldPos ) { return readShadowMap(_worldPos, linearDepth); }`)),e.fragment.uniforms.add(g.VW).code.add(s.H`
|
|
1061
|
-
float getShadow(float additionalAmbientScale, float shadow) {
|
|
1062
|
-
float ambient = ${(0,s.If)(o,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
|
|
1063
|
-
return max(ambient, shadow);
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
float readShadow(float additionalAmbientScale, vec3 vpos) {
|
|
1067
|
-
return getShadow(additionalAmbientScale, ${(0,s.If)(i,"readShadowMap(vpos)","0.0")});
|
|
1068
|
-
}
|
|
1069
|
-
`)}(0,i.Cg)([(0,_.W)()],y.prototype,"hasShadowHighlights",void 0),(0,i.Cg)([(0,_.W)()],y.prototype,"receiveShadows",void 0)},34845(e,t,r){r.d(t,{Ir:()=>u});var i=r(37585),n=r(48163),o=r(78955),a=r(91829),s=r(77108),l=r(14314),c=r(31821);function u(e){e.fragment.uniforms.add(new l.I("projInfo",e=>function(e){let t=e.projectionMatrix;return 0===t[11]?(0,o.hZ)(d,2/(e.fullWidth*t[0]),2/(e.fullHeight*t[5]),(1+t[12])/t[0],(1+t[13])/t[5]):(0,o.hZ)(d,-2/(e.fullWidth*t[0]),-2/(e.fullHeight*t[5]),(1-t[8])/t[0],(1-t[9])/t[5])}(e.camera))),e.fragment.uniforms.add(new s.E("zScale",e=>0===e.camera.projectionMatrix[11]?(0,i.hZ)(h,0,1):(0,i.hZ)(h,1,0))),e.fragment.code.add(c.H`vec3 reconstructPosition(vec2 fragCoord, float depth) {
|
|
1070
|
-
return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);
|
|
1071
|
-
}`)}const d=(0,a.vt)(),h=(0,n.vt)()},63365(e,t,r){r.d(t,{a:()=>n});var i=r(31821);function n(e){e.code.add(i.H`vec4 premultiplyAlpha(vec4 v) {
|
|
1072
|
-
return vec4(v.rgb * v.a, v.a);
|
|
1073
|
-
}
|
|
1074
|
-
vec3 rgb2hsv(vec3 c) {
|
|
1075
|
-
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
|
1076
|
-
vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);
|
|
1077
|
-
vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);
|
|
1078
|
-
float d = q.x - min(q.w, q.y);
|
|
1079
|
-
float e = 1.0e-10;
|
|
1080
|
-
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x);
|
|
1081
|
-
}
|
|
1082
|
-
vec3 hsv2rgb(vec3 c) {
|
|
1083
|
-
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
|
1084
|
-
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
|
1085
|
-
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
|
1086
|
-
}
|
|
1087
|
-
float rgb2v(vec3 c) {
|
|
1088
|
-
return max(c.x, max(c.y, c.z));
|
|
1089
|
-
}`)}},58614(e,t,r){r.d(t,{SS:()=>a});var i=r(29941),n=(r(28421),r(20304)),o=r(26934);function a(e,t){!function(e,t,r){let i=e.fragment;switch(i.code.add("void discardOrAdjustAlpha(inout vec4 color) {"),t.alphaDiscardMode){case 1:i.code.add("color.a = 1.0;");break;case 0:0!==t.output&&(i.include(o.Q),i.code.add("if (color.a < alphaCutoff) discard;"));break;case 3:0!==t.output&&i.uniforms.add(r).code.add("if (color.a < textureAlphaCutoff) discard;");break;case 2:i.uniforms.add(r).code.add("\n if (color.a < textureAlphaCutoff) discard;\n color.a = 1.0;\n ");break;case 4:break;default:t.alphaDiscardMode}i.code.add("}")}(e,t,new n.m("textureAlphaCutoff",e=>e.textureAlphaCutoff))}i.v},26425(e,t,r){r.d(t,{u:()=>o});var i=r(33094),n=r(31821);function o(e){e.uniforms.add(new i.U("dpDummy",()=>1)).code.add(n.H`vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
|
|
1090
|
-
vec3 hiD = hiA + hiB;
|
|
1091
|
-
vec3 loD = loA + loB;
|
|
1092
|
-
return dpDummy * hiD + loD;
|
|
1093
|
-
}`)}},20693(e,t,r){r.d(t,{y:()=>f,N:()=>m});var i=r(58083),n=r(9093),o=r(35522),a=r(51850),s=r(45324),l=r(23205),c=r(40710),u=r(58029),d=r(74333);class h extends d.n{constructor(e,t,r){super(e,"mat4",2,(i,n,o)=>i.setUniformMatrix4fv(e,t(n,o),r))}}function f(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new c.W("cameraPosition",({origin:e},{camera:t})=>(0,o.hZ)(g,t.viewInverseTransposeMatrix[3]-e[0],t.viewInverseTransposeMatrix[7]-e[1],t.viewInverseTransposeMatrix[11]-e[2])))}function m(e,t){t.instancedDoublePrecision?e.uniforms.add(s.rS,new u.F("view",e=>(0,i.Tl)(v,e.camera.viewMatrix,p(e))),new l.d("localOrigin",e=>p(e))):e.uniforms.add(s.rS,new h("view",(e,t)=>(0,i.Tl)(v,t.camera.viewMatrix,e.origin)),new c.W("localOrigin",e=>e.origin))}function p({camera:e}){return(0,o.hZ)(g,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11])}const v=(0,n.vt)(),g=(0,a.vt)()},45324(e,t,r){var i=r(37585),n=r(48163),o=r(35522),a=r(51850),s=r(77108),l=r(23205),c=r(14314),u=r(33094),d=r(58029);new d.F("view",({camera:e})=>e.viewMatrix),new d.F("inverseViewMatrix",({camera:e})=>e.inverseViewMatrix);const h=new d.F("proj",({camera:e})=>e.projectionMatrix),f=(new d.F("inverseProjectionMatrix",({camera:e})=>e.inverseProjectionMatrix),new l.d("cameraPosition",({camera:e})=>e.eye),new d.F("viewNormal",({camera:e})=>e.viewInverseTransposeMatrix)),m=(new l.d("localUpView",({camera:e})=>{let t=e.viewInverseTransposeMatrix;return(0,o.S8)(v,(0,o.hZ)(v,t[8],t[9],t[10]))}),new s.E("nearFar",({camera:e})=>e.nearFar)),p=(new c.I("viewport",({camera:e})=>e.fullViewport),new u.U("pixelRatio",e=>e.camera.pixelRatio/e.overlayStretch),new u.U("screenPixelSizePerDistance",({camera:e})=>e.screenPixelSizePerDistance),new u.U("worldToScreenPerDistanceRatio",({camera:e})=>1/e.screenPixelSizePerDistance),new u.U("renderPixelSizePerDistance",({camera:e})=>e.renderPixelSizePerDistance),new u.U("metersPerRenderUnit",e=>e.metersPerRenderUnit),new s.E("inverseScreenSize",({camera:e})=>(0,i.hZ)(p,1/e.fullWidth,1/e.fullHeight)),new s.E("pixelToNDC",({camera:e})=>(0,i.hZ)(p,2/e.fullViewport[2],2/e.fullViewport[3])),(0,n.vt)()),v=(0,a.vt)();r.d(t,["HO",0,f,"Y$",0,m,"rS",0,h])},77108(e,t,r){r.d(t,{E:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",0,(i,n)=>i.setUniform2fv(e,t(n),r))}}},68259(e,t,r){r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",2,(i,n,o,a)=>i.setUniform2fv(e,t(n,o,a),r))}}},47286(e,t,r){r.d(t,{G:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,n,o)=>i.setUniform2fv(e,t(n,o),r))}}},23205(e,t,r){r.d(t,{d:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",0,(i,n)=>i.setUniform3fv(e,t(n),r))}}},40710(e,t,r){r.d(t,{W:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",2,(i,n,o,a)=>i.setUniform3fv(e,t(n,o,a),r))}}},33079(e,t,r){r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",1,(i,n,o)=>i.setUniform3fv(e,t(n,o),r))}}},14314(e,t,r){r.d(t,{I:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",0,(i,n)=>i.setUniform4fv(e,t(n),r))}}},71988(e,t,r){r.d(t,{E:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",1,(i,n,o)=>i.setUniform4fv(e,t(n,o),r))}}},33094(e,t,r){r.d(t,{U:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",0,(i,n)=>i.setUniform1f(e,t(n),r))}}},28421(e,t,r){r.d(t,{J:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",2,(i,n,o)=>i.setUniform1f(e,t(n,o),r))}}},20304(e,t,r){r.d(t,{m:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",1,(i,n,o)=>i.setUniform1f(e,t(n,o),r))}}},35818(e,t,r){r.d(t,{W:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"int",0,(r,i)=>r.setUniform1i(e,t(i)))}}},35644(e,t,r){r.d(t,{k:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"mat3",1,(i,n,o)=>i.setUniformMatrix3fv(e,t(n,o),r))}}},58029(e,t,r){r.d(t,{F:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"mat4",0,(i,n)=>i.setUniformMatrix4fv(e,t(n),r))}}},12791(e,t,r){r.d(t,{x:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",0,(r,i)=>r.bindTexture(e,t(i)))}}},15976(e,t,r){r.d(t,{o:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"sampler2D",2,(i,n,o)=>i.bindTexture(e,t(n,o),r?.(n,o)))}}},63761(e,t,r){r.d(t,{N:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",1,(r,i,n)=>r.bindTexture(e,t(i,n)))}}},31821(e,t,r){r.d(t,{If:()=>n});const i=(e,...t)=>{let r="";for(let i=0;i<t.length;i++)r+=e[i]+t[i];return r+=e[e.length-1],r};function n(e,t,r=""){return e?t:r}i.int=e=>e.toFixed(),i.uint=e=>`${Math.max(0,e).toFixed()}u`,i.hexuint=e=>`0x${Math.round(Math.max(0,e)).toString(16)}u`,i.float=e=>e.toPrecision(8),r.d(t,["H",0,i])},13840(e,t,r){r.d(t,{r:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},42958(e,t,r){r.d(t,{w:()=>p});var i=r(32198),n=r(69622),o=r(53966),a=r(91429),s=r(63907),l=r(85079),c=r(74038);new c._("position",3,s.pe.FLOAT,0,12);const u=[new c._("position",2,s.pe.FLOAT,0,8)];(0,l.Xk)(u),new c._("position",2,s.pe.FLOAT,0,12),new c._("uv0",2,s.pe.HALF_FLOAT,8,12),r(44208);var d=r(26857),h=r(94656);class f{constructor(e,t,r){this._context=e,this.locations=r,this._textures=new Map,this.source=(0,h.en)()?t:null,t.attributeNames.forEach(e=>{r.has(e)||o.A.getLogger("esri.views.3d.webgl-engine.lib.Program").error(`Missing VertexAttributeLocation for ${e} used in shader`)}),this._glProgram=e.programCache.get(t.generate("vertex",!0),t.generate("fragment",!0),r),this._glProgram.stop=()=>{throw Error("Wrapped _glProgram used directly")},this.bind=t.generateBind(this),this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this)}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,+!!t)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t,r){this._glProgram.setUniform1f(e,t,r)}setUniform2fv(e,t,r){this._glProgram.setUniform2fv(e,t,r)}setUniform3fv(e,t,r){this._glProgram.setUniform3fv(e,t,r)}setUniform4fv(e,t,r){this._glProgram.setUniform4fv(e,t,r)}setUniformMatrix3fv(e,t,r){this._glProgram.setUniformMatrix3fv(e,t,!1,r)}setUniformMatrix4fv(e,t,r){this._glProgram.setUniformMatrix4fv(e,t,!1,r)}setUniformMatrices4fv(e,t,r){this._glProgram.setUniformMatrices4fv(e,t,!1,r)}setUniform1fv(e,t,r){this._glProgram.setUniform1fv(e,t,r)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e,t){if(d.b.ENABLE_OPTIMIZATIONS)return;let r=e.locations;if(t){let e=new Map(r);t.forEach((t,i)=>e.set(i,r.size+t)),r=e}r.size!==this.locations.size&&console.error(`VertexAttributeLocations are incompatible: ${Array.from(r.keys())} vs ${Array.from(this.locations.keys())}`),this.locations.forEach((e,t)=>{r.get(t)!==e&&console.error(`VertexAttributeLocations are incompatible: Program has ${t} at position ${e}, VAO has it at position ${r.get(t)}.`)})}stop(){this._textures.clear()}bindTexture(e,t,r){if(!t?.glName){let r=`Texture sampler ${e} in ${this._context.debugBoundTechnique} has no given Texture in ${Error().stack}`;(0,h.en)()&&console.error(r),t=this._context.emptyTexture}let i=this._ensureTextureUnit(e,t);this._context.useProgram(this);let n=i.unit;this.setUniform1i(e,n),this._context.bindTexture(t,n,!1,r)}_ensureTextureUnit(e,t){let r=this._textures.get(e);return null==r?(r={texture:t,unit:this._textures.size},this._textures.set(e,r)):r.texture=t,r}}var m=r(90644);let p=class extends n.A{constructor(e,t,r){super({}),this._context=e,this._configuration=t,this.primitiveType=s.WR.TRIANGLES,this._unused=!0,this.ignoreUnused=!1,this.key=t.key,this.locations=(0,l.Xk)(r??u),this._pipeline=this.initializePipeline(t),this.reload=async r=>{if(r&&await this.shader.reload(),!this.key.equals(t.key))return void o.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);let i=this.shader.get().build(t);i.debugName=this.declaredClass,this._program=new f(e.rctx,i,this.locations),this._pipeline=this.initializePipeline(t)}}initialize(){let e=this.shader.get().build(this._configuration);e.debugName=this.declaredClass,this._program=new f(this._context.rctx,e,this.locations)}get program(){return this._unused=!1,this._program}get compiled(){return this._unused=!1,this.program.compiled}get unused(){return this._unused}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t,r){return this._pipeline}initializePipeline(e){return(0,m.Ey)({blending:m.RC,colorWrite:m.kn})}};p=(0,i.Cg)([(0,a.$K)("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],p)},51976(e,t,r){r.d(t,{K:()=>s,W:()=>l});var i=r(49186),n=r(4576);class o{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var a=r(65786);class s extends a.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map(()=>0)??[],this._parameterNames??=[]}get key(){return this._key??=new o(this._parameterBits),this._key}decode(e=this.key){let t=this._parameterBits;this._parameterBits=[...e.bits];let r=this._parameterNames.map(e=>` ${e}: ${this[e]}`).join("\n");return this._parameterBits=t,r}}function l(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);let n=e.count||2,o=Math.ceil(Math.log2(n)),a=t._parameterBits,s=0;for(;a[s]+o>16;)s++,s>=a.length&&a.push(0);let l=a[s],c=(1<<o)-1<<l;a[s]+=o,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[s]&c)>>l},set(t){let n=this._parameterBits[s];if((n&c)>>l!==t){if(this._key=null,this._parameterBits[s]=n&~c|+t<<l&c,"number"!=typeof t)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[s]&c)>>l)},set(e){let t=this._parameterBits[s];if(!!((t&c)>>l)!==e&&(this._key=null,this._parameterBits[s]=t&~c|+e<<l,"boolean"!=typeof e))throw new i.A("internal:invalid-shader-configurationx",`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},16943(e,t,r){r.d(t,{E:()=>n});var i=r(44208);function n(){return!!(0,i.A)("enable-feature:objectAndLayerId-rendering")}},24111(e,t,r){r.d(t,{Y:()=>s});var i=r(65261),n=r(23292),o=r(33094),a=r(31821);function s(e,t){t.snowCover&&(e.include(i.C),e.uniforms.add(new o.U("snowCover",e=>e.snowCover)).code.add(a.H`float applySnow(vec3 normal, vec3 groundNormal, inout vec3 albedo, inout float ssao) {
|
|
1094
|
-
float snow = smoothstep(0.5, 0.55, dot(normal, groundNormal)) * snowCover;
|
|
1095
|
-
albedo = delinearizeGamma(mix(linearizeGamma(albedo), vec3(1), snow));
|
|
1096
|
-
ssao = mix(ssao, 0.5 + 0.5 * ssao, snow);
|
|
1097
|
-
return snow;
|
|
1098
|
-
}
|
|
1099
|
-
float applyRealisticTreeSnow(vec3 faceNormal, vec3 shadingNormal, vec3 groundNormal, inout vec3 albedo, inout float ssao) {
|
|
1100
|
-
float snow = min(1.0, smoothstep(0.5, 0.55, dot(faceNormal, groundNormal)) +
|
|
1101
|
-
smoothstep(0.5, 0.55, dot(-faceNormal, groundNormal)) +
|
|
1102
|
-
smoothstep(0.0, 0.1, dot(shadingNormal, groundNormal))) *
|
|
1103
|
-
snowCover;
|
|
1104
|
-
albedo = delinearizeGamma(mix(linearizeGamma(albedo), vec3(1), snow));
|
|
1105
|
-
ssao = mix(ssao, 0.5 + 0.5 * ssao, snow);
|
|
1106
|
-
return snow;
|
|
1107
|
-
}`),e.include(n.d),e.code.add(a.H`void applySnowToMRR(float snow) {
|
|
1108
|
-
mrr = mix(mrr, vec3(0.0, 1.0, 0.04), snow);
|
|
1109
|
-
}`))}},49718(e,t,r){r(51850),r(6867).w_},6867(e,t,r){r.d(t,{w_:()=>d});var i=r(58083),n=r(9093),o=r(35522),a=r(51850),s=r(78955),l=r(91829),c=r(71351);class u{constructor(){this.intersector=4}get distance(){return this._distance}get renderDistance(){return this._renderDistance}_init(){this._distance=this._renderDistance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4}_setBase(e,t,r,i=null,n=null,o=null){this.intersector=e,this._distance=r,this._renderDistance=i,this.target=t,this.drapedLayerOrder=n,this.renderPriority=o}}class d extends u{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,o.hs)(f,this.ray.direction,this.distance),(0,o.Bw)(f))}withinDistance(e){return!!h(this)&&null!=this.distanceInRenderSpace&&this.distanceInRenderSpace<=e}getIntersectionPoint(e){return!!h(this)&&((0,o.hs)(f,this.ray.direction,this.distance),(0,o.WQ)(e,this.ray.origin,f),!0)}getTransformedNormal(e){return(0,o.C)(m,this.normal),m[3]=0,(0,s.Z0)(m,m,this.transformation),(0,o.C)(e,m),(0,o.S8)(e,e)}constructor(e){super(),this.normal=(0,a.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,c.vt)(),this.init(e)}init(e){super._init(),e&&(0,c.C)(e,this._ray)}set(e,t,r,s,l,c,u,d){this._setBase(e,t,r,s,u,d),(0,o.C)(this.normal,l??a.Cb),(0,i.C)(this.transformation,c??n.zK)}copy(e){this._setBase(e.intersector,e.target,e.distance,e.renderDistance,e.drapedLayerOrder,e.renderPriority),(0,c.C)(e.ray,this._ray),(0,o.C)(this.normal,e.normal),(0,i.C)(this.transformation,e.transformation)}}function h(e){return null!=e?.distance&&null!=e?.renderDistance}const f=(0,a.vt)(),m=(0,l.vt)()},16396(e,t,r){r.d(t,{ou:()=>l}),r(77690),r(29242),r(58083),r(9093);var i=r(35522),n=r(51850),o=r(28540),a=r(57005);const s=new class{constructor(e=0){this.offset=e,this._tmpSphere=new o.i}applyToVertex(e,t,r,n){let o=this.objectTransform.transform,a=(0,i.hZ)(c,t,r,n),s=(0,i.Z0)(a,a,o),l=this.offset/(0,i.Bw)(s);(0,i.Ln)(s,s,s,l);let u=this.objectTransform.inverse;return(0,i.Z0)(e,s,u),e}applyToMinMax(e,t){let r=this.offset/(0,i.Bw)(e);(0,i.Ln)(e,e,e,r);let n=this.offset/(0,i.Bw)(t);(0,i.Ln)(t,t,t,n)}applyToAabb(e){let t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;let r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){let t=e.center,r=(0,i.Bw)(t),n=this.offset/r;return(0,i.Ln)(this._tmpSphere.center,t,t,n),this._tmpSphere.radius=e.radius+e.radius*this.offset/r,this._tmpSphere}};function l(e){return null==e?null:(s.offset=e,s)}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpMbs=new o.i,this._tmpObb=new a.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.Bw)(e)}applyToVertex(e,t,r,n){let o=(0,i.hZ)(c,t,r,n),a=(0,i.hZ)(u,t,r,n+this.componentLocalOriginLength),s=this._totalOffset/(0,i.Bw)(a);return(0,i.Ln)(e,o,a,s),e}applyToAabb(e){let t=this.componentLocalOriginLength,r=e[0],i=e[1],n=e[2]+t,o=e[3],a=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),u=Math.abs(n),d=Math.abs(o),h=Math.abs(a),f=Math.abs(s),m=.5*(1+Math.sign(r*o))*Math.min(l,d),p=.5*(1+Math.sign(i*a))*Math.min(c,h),v=.5*(1+Math.sign(n*s))*Math.min(u,f),g=Math.sqrt(m*m+p*p+v*v),x=Math.sign(l+r),_=Math.sign(c+i),y=Math.sign(u+n),b=Math.sign(d+o),w=Math.sign(h+a),M=Math.sign(f+s),T=this._totalOffset;if(g<T)return e[0]-=(1-x)*T,e[1]-=(1-_)*T,e[2]-=(1-y)*T,e[3]+=b*T,e[4]+=w*T,e[5]+=M*T,e;let S=Math.max(l,d),C=Math.max(c,h),A=Math.max(u,f),E=T/Math.sqrt(S*S+C*C+A*A),I=T/g,O=I-E,P=-O;return e[0]+=r*(x*P+I),e[1]+=i*(_*P+I),e[2]+=n*(y*P+I),e[3]+=o*(b*O+E),e[4]+=a*(w*O+E),e[5]+=s*(M*O+E),e}applyToMbs(e){let t=e.center,r=(0,i.Bw)(t),n=this._totalOffset/r;return(0,i.Ln)(this._tmpMbs.center,t,t,n),this._tmpMbs.radius=e.radius+e.radius*this._totalOffset/r,this._tmpMbs}applyToObb(e){return(0,a.gm)(e,this._totalOffset,this._totalOffset,1,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this._tmpVertex=(0,n.vt)()}applyToVertex(e,t,r,n){let o=(0,i.hZ)(c,t,r,n),a=(0,i.WQ)(u,o,this.localOrigin),s=this.offset/(0,i.Bw)(a);return(0,i.Ln)(e,o,a,s),e}applyToAabb(e){let t=d,r=h,i=f;for(let n=0;n<3;++n)t[n]=e[0+n]+this.localOrigin[n],r[n]=e[3+n]+this.localOrigin[n],i[n]=t[n];let n=this.applyToVertex(this._tmpVertex,t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=n[t],e[t+3]=n[t];let o=t=>{let r=this.applyToVertex(this._tmpVertex,t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let n=0;n<3;++n)i[n]=e&1<<n?r[n]:t[n];o(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(0===(a&e)){for(let n=0;n<3;++n)i[n]=a&1<<n?0:e&1<<n?t[n]:r[n];o(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const c=(0,n.vt)(),u=(0,n.vt)(),d=(0,n.vt)(),h=(0,n.vt)(),f=(0,n.vt)()},46606(e,t,r){r.d(t,{S:()=>s,p:()=>l}),r(34727),r(77690),r(29242),r(58083);var i=r(9093),n=(r(35522),r(51850)),o=(r(78955),r(91829),r(31756),r(26857),r(16943),r(65786));class a extends o.Y{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}(0,i.vt)(),(0,n.vt)(),(0,i.vt)();class s extends a{constructor(){super(...arguments),this.renderOccluded=1,this.emissiveStrength=0,this.testsTransparentRenderOrder=0,this.isDecoration=!1}}const l=8},19245(e,t,r){r.d(t,{Um:()=>l,MB:()=>s,kE:()=>o});var i=r(4576),n=r(34727);r(44208);function o(e,t,r,i,o,a){let s=r.screenLength*e.pixelRatio;null!=o&&(c.update(i,t,o,a),s=c.apply(s));let l=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,n.qE)(l*t,r.minWorldLength,r.maxWorldLength)}const a=(0,i.VO)();function s(e,t){let r=!1;for(let i in t){let n=t[i];void 0!==n&&(Array.isArray(n)?Array.isArray(e[i])&&a(n,e[i])||(e[i]=n.slice(),r=!0):e[i]!==n&&(r=!0,e[i]=n))}return r}const l={multiply:1,ignore:2,replace:3,tint:4},c=new class{constructor(){this._scale=0,this._angleFactor=0,this._minScale=0}update(e,t,r,i){r?(this._scale=Math.min(r.divisor/(t-r.offset),1),this._angleFactor=function(e){return Math.abs(e)**3}(e),this._minScale=null==i?0:Math.min(r.minPixelSize/i,1)):(this._scale=1,this._minScale=1,this._angleFactor=1)}apply(e){let{_scale:t,_angleFactor:r,_minScale:i}=this;return e*(0,n.qE)((0,n.Cc)(t,1,r),i,1)}applyVec2(e,t){e[0]=this.apply(t[0]),e[1]=this.apply(t[1])}}},84368(e,t,r){r.d(t,{D:()=>h});var i=r(49255),n=r(47187),o=r(42593),a=r(63365);function s(e){e.code.add("\n vec3 emissionFilter(in vec3 srcColor, float srcAlpha) {\n vec3 color = min(srcColor + vec3(1.0 - srcAlpha), 1.0);\n float m = max(color.r, max(color.g, color.b));\n return m > 0.0 ? color / m : vec3(1.0);\n }\n ")}var l=r(31821),c=r(26934);function u(e,t){t.useFloatBlend?e.code.add("float ditherNoise(vec4 color) { return 0.0; }"):e.code.add("\n float ditherNoise(vec4 color) {\n vec2 seed = color.rg + color.ba + gl_FragCoord.xy + gl_FragCoord.z;\n return (fract(52.9829189 * fract(dot(seed, vec2(0.06711056, 0.00583715)))) - 0.5) / 255.0;\n }")}var d=r(72458);function h(e,t){e.include(o.Q,t),e.include(n.zp,t);let{fragment:r,outputs:h}=e;r.include(a.a);let{output:f,hasEmission:m,oitPremultipliedAlpha:p,snowCover:v,emissionDimmingPass:g,renderOccluded:x}=t,_=11===f,y=(0,i._$)(f),b=(0,i.Rb)(f),w=(0,i._o)(f)&&!y,M=0!==f||x,T=0;(w||y)&&h.add("fragColor","vec4",T++),y&&h.add("fragAlpha","float",T++),m&&h.add("fragEmission","vec4",T++),r.include(a.a),r.include(c.Q),r.include(d.O,t),r.include(u,t),g&&r.include(s),r.code.add(l.H`
|
|
1110
|
-
void outputColorHighlightOLID(vec4 finalColor, vec3 emissiveSymbolColor ${(0,l.If)(v,", float snow")}) {
|
|
1111
|
-
${(0,l.If)(_,"finalColor.a = 1.0;")}
|
|
1112
|
-
${(0,l.If)(M,"if (finalColor.a < alphaCutoff) discard;")}
|
|
1113
|
-
|
|
1114
|
-
${(0,l.If)(y,`float noise = ditherNoise(finalColor);\n fragColor = ${(0,l.If)(p,"finalColor","premultiplyAlpha(finalColor)")};\n fragColor.rgb = fragColor.rgb * floatBlendOutputScale + noise;\n fragAlpha = finalColor.a * floatBlendOutputScale + noise;\n `)}
|
|
1115
|
-
${(0,l.If)(b&&p,"finalColor.rgb /= finalColor.a;")}
|
|
1116
|
-
${(0,l.If)(w,"fragColor = finalColor;")}
|
|
1117
|
-
${(0,l.If)(m,g?"fragEmission = vec4(emissionFilter(premultiplyAlpha(finalColor).rgb, finalColor.a), 0.0);":`fragEmission = ${(0,l.If)(v,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}\n float emissionNoise = ditherNoise(fragEmission);\n fragEmission.rgb = fragEmission.rgb * floatBlendOutputScale + emissionNoise;\n fragEmission.a = finalColor.a;\n fragEmission = premultiplyAlpha(fragEmission);\n `)}
|
|
1118
|
-
calculateOcclusionAndOutputHighlight();
|
|
1119
|
-
${(0,l.If)(_,"outputObjectAndLayerIdColor();")}
|
|
1120
|
-
}
|
|
1121
|
-
`)}},26934(e,t,r){r.d(t,{Q:()=>n});var i=r(49788);function n(e){e.constants.add("alphaCutoff","float",i.Q),e.constants.add("opacityCutoff","float",i.v)}},72458(e,t,r){r.d(t,{O:()=>a});var i=r(32198),n=r(51976);class o extends n.K{constructor(){super(...arguments),this.useFloatBlend=!0}}function a(e,t){t.useFloatBlend?(e.constants.add("floatBlendOutputScale","float",1),e.constants.add("floatBlendInputScale","float",1)):(e.constants.add("floatBlendOutputScale","float",1/16),e.constants.add("floatBlendInputScale","float",16)),e.constants.add("maxEmissiveStrength","float",16)}(0,i.Cg)([(0,n.W)()],o.prototype,"useFloatBlend",void 0)},48852(e,t,r){r.d(t,{g:()=>f});var i=r(4576),n=r(44208),o=r(53966),a=r(17676),s=r(78659),l=r(34275),c=r(94656),u=r(63907);const d=()=>o.A.getLogger("esri.views.webgl.BufferObject"),h=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class f{static createIndex(e,t,r){return new f(e,34963,t,r)}static createUniform(e,t,r){return new f(e,35345,t,r)}static createPixelPack(e,t=35041,r){let i=new f(e,35051,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=35040,r){return new f(e,35052,t,r)}static createTransformFeedback(e,t=35044,r){let i=new f(e,35982,t);return i.setSize(r),i}constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,e.instanceCounter.increment(u.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,c.Y2)(this._context.gl),i&&this.setData(i)}get glName(){return this._glName}get size(){if(34963===this.bufferType)switch(this._indexType){case u.pe.UNSIGNED_INT:return this._sizeBytes/4;case u.pe.UNSIGNED_SHORT:return this._sizeBytes/2;case u.pe.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return h?0:this.sizeBytes}get _isVAOAware(){return 34963===this.bufferType||34962===this.bufferType}dispose(){this._context?.gl?(this._glName&&=(this._context.gl.deleteBuffer(this._glName),null),this._context.instanceCounter.decrement(u.vt.BufferObject,this),this._context=null):this._glName&&d().warn("Leaked WebGL buffer object")}setSize(e,t=null){if(34963===this.bufferType&&null!=t)switch(this._indexType=t,t){case u.pe.UNSIGNED_SHORT:e*=2;break;case u.pe.UNSIGNED_INT:e*=4;case u.pe.UNSIGNED_BYTE:}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;34963===this.bufferType&&((0,l.mg)(e)?this._indexType=u.pe.UNSIGNED_BYTE:(0,l.jq)(e)?this._indexType=u.pe.UNSIGNED_SHORT:(0,l.XJ)(e)&&(this._indexType=u.pe.UNSIGNED_INT)),this._setBufferData(t,e)}setIndexType(e){34963===this.bufferType&&(this._indexType=e)}_setBufferData(e,t=null){this._sizeBytes=e;let r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let i=this._context.gl;null==t?i.bufferData(this.bufferType,e,this.usage):i.bufferData(this.bufferType,t,this.usage),(0,c.Y2)(i),this._isVAOAware&&this._context.bindVAO(r)}setSubData(e,t,r,i){if(!e)return;let n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let{gl:o}=this._context;o.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r),(0,c.Y2)(o),this._isVAOAware&&this._context.bindVAO(n)}getSubData(e,t=0,r,n){if(r<0||n<0)return;let o=function(e){return(0,i.Xj)(e)}(e)?e.BYTES_PER_ELEMENT:1;if(o*((r??0)+(n??0))>e.byteLength)return;t+o*(n??0)>this.usedMemory&&d().warn("Potential problem getting subdata: requested data exceeds buffer size!");let a=this._context.gl,s=35982===this.bufferType?35982:36662;this._context.bindBuffer(this,s);try{a.getBufferSubData(s,t,e,r,n)}finally{this._context.unbindBuffer(s)}}async getSubDataAsync(e,t=0,r,i,n){if(await this._context.clientWaitAsync((0,s.l5)(10),n),!this._context||!this._glName)throw(0,a.NK)();this.getSubData(e,t,r,i)}}},65786(e,t,r){const i=class{};new i,r.d(t,["Y",0,i])},14113(e,t,r){r.d(t,{N5:()=>s});var i=r(49186),n=(r(44208),r(53966));const o=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class a{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class s extends a{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new f,this.varyings=new m,this.outputs=new p}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){let r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,o=n.uniforms.generateSource(),a=n.code.generateSource(),s=n.main.generateSource(t),l=this.debugName?`// ${this.debugName}\n`:"",c="vertex"===e?x:g,u=n.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es\n${l}\n${c}\n${u.join("\n")}\n${o.join("\n")}\n${r.join("\n")}\n${i.join("\n")}\n${d.join("\n")}\n${a.join("\n")}\n${s.join("\n")}`}generateBind(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{let r=e.bind[0];r&&t.set(e.name,r)});let r=Array.from(t.values()),i=r.length;return t=>{for(let n=0;n<i;++n)r[n](e,t)}}generateBindPass(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{let r=e.bind[1];r&&t.set(e.name,r)});let r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let o=0;o<i;++o)r[o](e,n,t)}}generateBindDraw(e){let t=new Map;this.vertex.uniforms.entries.forEach(e=>{let r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{let r=e.bind[2];r&&t.set(e.name,r)});let r=Array.from(t.values()),i=r.length;return(t,n,o)=>{for(let a=0;a<i;++a)r[a](e,o,t,n)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(let t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null==e)o().error(`Trying to add null Uniform from ${Error().stack}.`);else{if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null==t?`uniform ${r} ${e};`:`uniform ${r} ${e}[${t}];`)}get entries(){return Array.from(this._entries.values())}}class c{constructor(){this._entries=new Map}add(e,t){if(this._entries.has(e))throw new i.A("shaderbuilder:duplicate-input",`Duplicate input for ${e}`);this._entries.set(e,t)}get(e){let t=this._entries.get(e);if(null==t)throw new i.A("shaderbuilder:input-resolver-error",`No resolver for input ${e} found.`);return t()}}class u{constructor(e){this._stage=e,this._bodies=[]}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0){let e=[];for(let t of this._bodies)"string"==typeof t?e.push(t):e.push(...t());return[`void main() {\n ${e.join("\n")||""} \n}`]}if(e)throw new i.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class d{constructor(e){this._stage=e,this._entries=[]}add(e){return this._entries.push(e),this._stage}generateSource(){let e=[];for(let t of this._entries)"string"==typeof t?e.push(t):e.push(...t());return e}}class h extends a{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new u(this),this.code=new d(this),this.constants=new v(this),this.inputs=new c}get builder(){return this}}class f{constructor(){this._entries=[]}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?o().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,flat:r?.flat??!1,invariant:r?.invariant??!1})}generateSource(e){let t=[];return this._entries.forEach((r,i)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+(r.flat?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`)),t}}class p{constructor(){this._entries=new Map}add(e,t,r=0){let i=this._entries.get(r);i?.name===e&&i?.type===t?o().warn(`Fragment shader output location ${r} occupied`):this._entries.set(r,{name:e,type:t})}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});let t=[];return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class v{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=v._numberToFloatStr(r);break;case"int":i=v._numberToIntStr(r);break;case"uint":i=v._numberToUintStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])}, ${v._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])}, ${v._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${v._numberToUintStr(r[0])}, ${v._numberToUintStr(r[1])})`;break;case"uvec3":i=`uvec3(${v._numberToUintStr(r[0])}, ${v._numberToUintStr(r[1])}, ${v._numberToUintStr(r[2])})`;break;case"uvec4":i=`uvec4(${v._numberToUintStr(r[0])}, ${v._numberToUintStr(r[1])}, ${v._numberToUintStr(r[2])}, ${v._numberToUintStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,e=>v._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const g="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",x="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},74333(e,t,r){r.d(t,{n:()=>i});class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={0:null,1:null,2:null},i)switch(r){case void 0:break;case 0:this.bind[0]=i;break;case 1:this.bind[1]=i;break;case 2:this.bind[2]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},66289(e,t,r){r.d(t,{R:()=>n});var i=r(48852);class n extends i.g{constructor(e,t,r,i=35044){super(e,34962,i,r),this.layout=t}}},90644(e,t,r){function i(e,t,r=32774,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function n(e,t,r,i,n=32774,o=32774,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}r.d(t,{Ey:()=>y,nk:()=>d,p3:()=>n}),r(4718);const o=i(0,771),a=(i(1,0),i(1,1),i(1,771)),s=(i(773,1),n(770,1,771,771)),l=n(0,0,768,0),c={face:1029,mode:2305},u={face:1028,mode:2305};function d(e,t,r){return{ref:e,readMask:t,stencilFront:r,stencilBack:r}}function h(e){return M.intern(e)}function f(e){return S.intern(e)}function m(e){return A.intern(e)}function p(e){return I.intern(e)}function v(e){return P.intern(e)}function g(e){return R.intern(e)}function x(e){return B.intern(e)}function _(e){return z.intern(e)}function y(e){return H.intern(e)}class b{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;let t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function w(e){return"["+e.join(",")+"]"}const M=new b(T,e=>({__tag:"Blending",...e}));function T(e){return e?w([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const S=new b(C,e=>({__tag:"Culling",...e}));function C(e){return e?w([e.face,e.mode]):null}const A=new b(E,e=>({__tag:"PolygonOffset",...e}));function E(e){return e?w([e.factor,e.units]):null}const I=new b(O,e=>({__tag:"DepthTest",...e}));function O(e){return e?w([e.func]):null}const P=new b(D,e=>({__tag:"StencilTest",...e}));function D(e){return e?w([e.ref,e.readMask,e.stencilFront.compare,e.stencilFront.fail,e.stencilFront.zFail,e.stencilFront.zPass,e.stencilBack.compare,e.stencilBack.fail,e.stencilBack.zFail,e.stencilBack.zPass]):null}const R=new b(F,e=>({__tag:"DepthWrite",...e}));function F(e){return e?w([e.zNear,e.zFar]):null}const B=new b(N,e=>({__tag:"ColorWrite",...e}));function N(e){return e?w([e.r,e.g,e.b,e.a]):null}const z=new b(L,e=>({__tag:"StencilWrite",...e}));function L(e){return e?w([e.mask]):null}const H=new b(function(e){return e?w([T(e.blending),C(e.culling),E(e.polygonOffset),O(e.depthTest),D(e.stencilTest),F(e.depthWrite),N(e.colorWrite),L(e.stencilWrite)]):null},e=>({blending:h(e.blending),culling:f(e.culling),polygonOffset:m(e.polygonOffset),depthTest:p(e.depthTest),stencilTest:v(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:_(e.stencilWrite)}));r.d(t,["RC",0,a,"T8",0,s,"Uy",0,{zNear:0,zFar:1},"Xt",0,e=>2===e?c:1===e?u:null,"iD",0,o,"kn",0,{r:!0,g:!0,b:!0,a:!0},"uR",0,l])}}]);
|