@arcgis/core 5.2.0-next.40 → 5.2.0-next.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02ab09285a5c4ca98066.js +1 -0
- package/assets/esri/core/workers/chunks/0646524250bb9fe82935.js +1 -0
- package/assets/esri/core/workers/chunks/0a50efb07eee36237e21.js +1 -0
- package/assets/esri/core/workers/chunks/0a98a13418f53082ca7a.js +1 -0
- package/assets/esri/core/workers/chunks/0ae0483b72f5e8d00d55.js +1 -0
- package/assets/esri/core/workers/chunks/0ae35b02dda9b9662560.js +1 -0
- package/assets/esri/core/workers/chunks/0d1224693a62a26a0e72.js +1 -0
- package/assets/esri/core/workers/chunks/{542d8a6c415098b9857c.js → 0da4816c11b45b4a6289.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a39dd585742960d3ca2.js → 0dcfd82a2669df6eb5a0.js} +1 -1
- package/assets/esri/core/workers/chunks/0f19bc532be24ca64755.js +1 -0
- package/assets/esri/core/workers/chunks/0f674c625f24ac73e25a.js +1 -0
- package/assets/esri/core/workers/chunks/11a3aa43fb940c21f148.js +1 -0
- package/assets/esri/core/workers/chunks/11e00ca5ac1b004f4ecc.js +1 -0
- package/assets/esri/core/workers/chunks/1276df03201c1b855fee.js +1 -0
- package/assets/esri/core/workers/chunks/13c893e448bedc5c1cef.js +1 -0
- package/assets/esri/core/workers/chunks/15c2d9bec0455fc363a9.js +1 -0
- package/assets/esri/core/workers/chunks/15de305ac3d6433748e7.js +1 -0
- package/assets/esri/core/workers/chunks/18d874739ee9ffad7480.js +1 -0
- package/assets/esri/core/workers/chunks/1dc1bfb3425665f560e4.js +1 -0
- package/assets/esri/core/workers/chunks/{1cd8dff4373494b01ad4.js → 1e342d532925569daadb.js} +1 -1
- package/assets/esri/core/workers/chunks/1f118d85d8271ad7690b.js +1 -0
- package/assets/esri/core/workers/chunks/1fece9757de7c10d1e9f.js +1 -0
- package/assets/esri/core/workers/chunks/{a2e754df3215e8b00a8f.js → 2015f4def2ef201bdab8.js} +1 -1
- package/assets/esri/core/workers/chunks/23570397304969f724b3.js +1 -0
- package/assets/esri/core/workers/chunks/24c0b3586bb6500eda53.js +2 -0
- package/assets/esri/core/workers/chunks/26e7884d8639df4d994b.js +1 -0
- package/assets/esri/core/workers/chunks/26fdc8382e009672924e.js +1 -0
- package/assets/esri/core/workers/chunks/{96860b6035e0b06672dd.js → 272c8ab189217240d05f.js} +1 -1
- package/assets/esri/core/workers/chunks/2791f3fe16ca5ee2f39a.js +1 -0
- package/assets/esri/core/workers/chunks/279a9a38b04a21cdfd11.js +1 -0
- package/assets/esri/core/workers/chunks/284e88805184334396fe.js +1 -0
- package/assets/esri/core/workers/chunks/28bc5e8e82f188b30eb9.js +1 -0
- package/assets/esri/core/workers/chunks/2a4868acd546312aa6d8.js +1 -0
- package/assets/esri/core/workers/chunks/2d7cfc68a38dabd8898a.js +1 -0
- package/assets/esri/core/workers/chunks/2da337d7fd9295f6b967.js +1 -0
- package/assets/esri/core/workers/chunks/2e79fb1b8445b2091cdb.js +1 -0
- package/assets/esri/core/workers/chunks/2f29f08cddd5add9388e.js +1 -0
- package/assets/esri/core/workers/chunks/30c53a7e1ad5aa52f2f3.js +1 -0
- package/assets/esri/core/workers/chunks/31c4db1eac8f765bb93f.js +1 -0
- package/assets/esri/core/workers/chunks/321dbc60f44819c2b4de.js +1 -0
- package/assets/esri/core/workers/chunks/32fb597aef66c444758f.js +1 -0
- package/assets/esri/core/workers/chunks/34fcb776e4de1d870bbd.js +30 -0
- package/assets/esri/core/workers/chunks/354199a41de44902de84.js +1 -0
- package/assets/esri/core/workers/chunks/36781219ca9ba5d7fe52.js +1 -0
- package/assets/esri/core/workers/chunks/36999a2e383c8eb3c398.js +1 -0
- package/assets/esri/core/workers/chunks/36f8a912842181e1f0aa.js +1 -0
- package/assets/esri/core/workers/chunks/{ed1d4ebf487c7dcd5c33.js → 37a8cfec11057947b45f.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b2b042a6d6949b06127.js → 381790e1f3df05c7eb68.js} +1 -1
- package/assets/esri/core/workers/chunks/383304d33b496c5d8baa.js +1 -0
- package/assets/esri/core/workers/chunks/{4e28f49d0be20ea50fd7.js → 383392c63202ac044b6c.js} +1 -1
- package/assets/esri/core/workers/chunks/394716bd1ecfd638d708.js +2 -0
- package/assets/esri/core/workers/chunks/399e23d777a043efa9f1.js +1 -0
- package/assets/esri/core/workers/chunks/3aacb935d632834d4154.js +1 -0
- package/assets/esri/core/workers/chunks/3c8e98cf23ad8ef12fcb.js +1 -0
- package/assets/esri/core/workers/chunks/4129b27fcd4103cdc499.js +1 -0
- package/assets/esri/core/workers/chunks/44e64186318728d1be51.js +1 -0
- package/assets/esri/core/workers/chunks/474ea8c97d101e41b3f5.js +1 -0
- package/assets/esri/core/workers/chunks/475c60ed8785d07911c6.js +1 -0
- package/assets/esri/core/workers/chunks/{c7662455252b48531da1.js → 484b3e2a220c440ccbb4.js} +1 -1
- package/assets/esri/core/workers/chunks/4d4710d57c72ec75cccc.js +1 -0
- package/assets/esri/core/workers/chunks/4e1b087453fc5e20e961.js +1 -0
- package/assets/esri/core/workers/chunks/4e94793aab42ebd251ca.js +1 -0
- package/assets/esri/core/workers/chunks/4f59357f535f30a6b5cc.js +1 -0
- package/assets/esri/core/workers/chunks/509cfac9e5d86a8ee449.js +1 -0
- package/assets/esri/core/workers/chunks/510acf2e8781be9b0dba.js +1 -0
- package/assets/esri/core/workers/chunks/5133083222588799493f.js +1 -0
- package/assets/esri/core/workers/chunks/52c4b4dabcb0d162be72.js +1 -0
- package/assets/esri/core/workers/chunks/{697e0ce10d77b90d4fee.js → 538fe46dfd685a490e23.js} +1 -1
- package/assets/esri/core/workers/chunks/5441f96cdd0660229efe.js +1 -0
- package/assets/esri/core/workers/chunks/551d0c5432f7a08dea77.js +1 -0
- package/assets/esri/core/workers/chunks/55924fb0de05e727f5e3.js +1 -0
- package/assets/esri/core/workers/chunks/55af58b6dff52dc040fe.js +2 -0
- package/assets/esri/core/workers/chunks/56bbde1dff96b423fbb9.js +1 -0
- package/assets/esri/core/workers/chunks/57824ecc10b25e3ad794.js +1 -0
- package/assets/esri/core/workers/chunks/{9ba705a6ddabca0f77b1.js → 580451761cadfe308919.js} +1 -1
- package/assets/esri/core/workers/chunks/590e977f8eeb379b86c8.js +1398 -0
- package/assets/esri/core/workers/chunks/5923ebadd4f75be2c9cc.js +1 -0
- package/assets/esri/core/workers/chunks/5b18696109fe84a1010a.js +2 -0
- package/assets/esri/core/workers/chunks/{db96a0c66578b2d1b715.js → 5b30231ae0a8f4b8435f.js} +1 -1
- package/assets/esri/core/workers/chunks/{77a4f6f224d7ca4b69f4.js → 5bf4ab72b9634b06cc5d.js} +1 -1
- package/assets/esri/core/workers/chunks/5ce168ae45ab7e7a71d1.js +1 -0
- package/assets/esri/core/workers/chunks/{7b1678dcf62481469544.js → 5dc17b76c6ecc24e7b9a.js} +1 -1
- package/assets/esri/core/workers/chunks/5e35828216020f33e26b.js +1 -0
- package/assets/esri/core/workers/chunks/5f0d6c853873a7f32527.js +1 -0
- package/assets/esri/core/workers/chunks/5fe9eea35ddb428efd8b.js +1 -0
- package/assets/esri/core/workers/chunks/6010b7be978698a642d0.js +1 -0
- package/assets/esri/core/workers/chunks/613e799377bdb767c955.js +1 -0
- package/assets/esri/core/workers/chunks/6210fb6cd31844f23964.js +1 -0
- package/assets/esri/core/workers/chunks/632ab11cdd4b0d9a5cc5.js +1 -0
- package/assets/esri/core/workers/chunks/64247e439ef3e1f712e9.js +1 -0
- package/assets/esri/core/workers/chunks/661a59133ae34f172174.js +1 -0
- package/assets/esri/core/workers/chunks/67468c50ecb1fbedda87.js +1 -0
- package/assets/esri/core/workers/chunks/6b0acd1a7dd74a7367e0.js +1 -0
- package/assets/esri/core/workers/chunks/6d247ff53421d27628ce.js +1 -0
- package/assets/esri/core/workers/chunks/6e45d0db97ffa4509177.js +1 -0
- package/assets/esri/core/workers/chunks/6f408397e2c8a2ea9805.js +1 -0
- package/assets/esri/core/workers/chunks/700c08dd2e734c15e621.js +1 -0
- package/assets/esri/core/workers/chunks/705d6b108fd121cea887.js +1 -0
- package/assets/esri/core/workers/chunks/71ce1009dadcae8f8094.js +1 -0
- package/assets/esri/core/workers/chunks/72fe7fb03c156f26a589.js +1 -0
- package/assets/esri/core/workers/chunks/733b2e181683d5fc7c95.js +1 -0
- package/assets/esri/core/workers/chunks/7684f0c771d312e05bb4.js +680 -0
- package/assets/esri/core/workers/chunks/79b857bb301f9c4169d6.js +1 -0
- package/assets/esri/core/workers/chunks/79c0a966f7d11d3c217f.js +1 -0
- package/assets/esri/core/workers/chunks/7a818499c1079906c2d7.js +1 -0
- package/assets/esri/core/workers/chunks/7ac47a9ad244100bc3b1.js +1 -0
- package/assets/esri/core/workers/chunks/7b862a074816c099b9ff.js +1 -0
- package/assets/esri/core/workers/chunks/7baa363b3b0a442a63d2.js +1 -0
- package/assets/esri/core/workers/chunks/7cc729b57a6a52c8ac68.js +1 -0
- package/assets/esri/core/workers/chunks/{4abe820bbe4f7ffccc09.js → 7df795bc4fa1d433463b.js} +1 -1
- package/assets/esri/core/workers/chunks/7f7a76f5fef25049fbf8.js +1 -0
- package/assets/esri/core/workers/chunks/7fa9dc39bf0a7a6fdc1f.js +1 -0
- package/assets/esri/core/workers/chunks/821176ee3be724621bb0.js +1 -0
- package/assets/esri/core/workers/chunks/825eb845216762a1ed2f.js +1 -0
- package/assets/esri/core/workers/chunks/82f4aa0533db009b11d8.js +2 -0
- package/assets/esri/core/workers/chunks/{2a344bca6837ca3b5c41.js.LICENSE.txt → 82f4aa0533db009b11d8.js.LICENSE.txt} +0 -6
- package/assets/esri/core/workers/chunks/830d1a7dee43422507ab.js +1 -0
- package/assets/esri/core/workers/chunks/835643f716f7058a2722.js +1 -0
- package/assets/esri/core/workers/chunks/84fa102a93b2144c28fb.js +1 -0
- package/assets/esri/core/workers/chunks/85ce7673d42526a79fd2.js +1 -0
- package/assets/esri/core/workers/chunks/893ffc38e1a43de5b63d.js +1 -0
- package/assets/esri/core/workers/chunks/{93df864c2e829f0fd5ce.js → 8a1970e68bc1e833cb7f.js} +1 -1
- package/assets/esri/core/workers/chunks/{684c9b4bd9590d2db12f.js → 8a410edcdf74ba957159.js} +1 -1
- package/assets/esri/core/workers/chunks/8b73694d5a97638a3a61.js +1 -0
- package/assets/esri/core/workers/chunks/8bb20ef549ec1c86b38e.js +1 -0
- package/assets/esri/core/workers/chunks/{6ef3b8d67b498d655a99.js → 8c5e65982c3f9295e844.js} +1 -1
- package/assets/esri/core/workers/chunks/8cb2fe91d1d8f49c14f8.js +1 -0
- package/assets/esri/core/workers/chunks/{1961b59756933e0a82f2.js → 8dcc6c19d5b3a5ac5512.js} +1 -1
- package/assets/esri/core/workers/chunks/8dee03779b569f233daf.js +1 -0
- package/assets/esri/core/workers/chunks/8ec5e470583b75fceae1.js +1 -0
- package/assets/esri/core/workers/chunks/8f2fecd8a0a972d68590.js +1 -0
- package/assets/esri/core/workers/chunks/9073b0f0ec93d6e243b9.js +1 -0
- package/assets/esri/core/workers/chunks/90ace5f9b4af1beea6bf.js +1 -0
- package/assets/esri/core/workers/chunks/934044f2ef6ce199b399.js +1 -0
- package/assets/esri/core/workers/chunks/94719ac469dadc4c05dc.js +1 -0
- package/assets/esri/core/workers/chunks/94e9cf8e729ec36de5be.js +1 -0
- package/assets/esri/core/workers/chunks/96d5fed0235558c0e348.js +1 -0
- package/assets/esri/core/workers/chunks/98b27cf8acbfa4259758.js +1 -0
- package/assets/esri/core/workers/chunks/9902fcd2070c8eb6d043.js +1 -0
- package/assets/esri/core/workers/chunks/99772ce7e628364434fa.js +1 -0
- package/assets/esri/core/workers/chunks/{b1a0eb6598309e11337f.js → 99e3aa4832ed87474ab4.js} +1 -1
- package/assets/esri/core/workers/chunks/9a6208ab670ad74e6f7d.js +1 -0
- package/assets/esri/core/workers/chunks/9a97f6cda2f36941efae.js +1 -0
- package/assets/esri/core/workers/chunks/9b1199104a6822ab7340.js +1 -0
- package/assets/esri/core/workers/chunks/9ceeae787dc7c194d60e.js +1 -0
- package/assets/esri/core/workers/chunks/9ebc98746b1f085b82b7.js +1 -0
- package/assets/esri/core/workers/chunks/9ee3741eef73f3edb18b.js +1 -0
- package/assets/esri/core/workers/chunks/9fb87a7dba62b527c0ba.js +1 -0
- package/assets/esri/core/workers/chunks/a10f63a08d976be058be.js +1 -0
- package/assets/esri/core/workers/chunks/a183b77854f5b42c1a86.js +1 -0
- package/assets/esri/core/workers/chunks/a23f4d8e7c372f5fb6d7.js +1 -0
- package/assets/esri/core/workers/chunks/a25f51d2d3ff6b9af7ca.js +1 -0
- package/assets/esri/core/workers/chunks/a27172dacdb85a774c4b.js +1 -0
- package/assets/esri/core/workers/chunks/a27cdf4c29dd50a6dab1.js +1 -0
- package/assets/esri/core/workers/chunks/a294dd12b5c708ce04af.js +1 -0
- package/assets/esri/core/workers/chunks/a3c882fe7599dc0f4f27.js +1 -0
- package/assets/esri/core/workers/chunks/a90f7b1c6c69b6033b4c.js +1 -0
- package/assets/esri/core/workers/chunks/a9c641bcdef161c754bf.js +1 -0
- package/assets/esri/core/workers/chunks/a9d391071803b1e9e8a0.js +1 -0
- package/assets/esri/core/workers/chunks/aaa66a04b882b0ba2961.js +1 -0
- package/assets/esri/core/workers/chunks/ae50b2d5e63f62c088d2.js +1 -0
- package/assets/esri/core/workers/chunks/af3ac4bed43e901b59c7.js +1 -0
- package/assets/esri/core/workers/chunks/af97e19516dbbcfb5286.js +1 -0
- package/assets/esri/core/workers/chunks/aff0e7761276036e029d.js +1 -0
- package/assets/esri/core/workers/chunks/b23d1e10fc4161d1f3eb.js +1 -0
- package/assets/esri/core/workers/chunks/b32bdf5730953c2fb16b.js +1 -0
- package/assets/esri/core/workers/chunks/b3f1a442d6b7826e917f.js +1 -0
- package/assets/esri/core/workers/chunks/b4047333265a2665aef9.js +1 -0
- package/assets/esri/core/workers/chunks/b7170816736769d3b7b0.js +1 -0
- package/assets/esri/core/workers/chunks/{5c63b38160c7d063b8af.js → b780514be87a22b49b01.js} +1 -1
- package/assets/esri/core/workers/chunks/b792857a178da2dd77d6.js +1 -0
- package/assets/esri/core/workers/chunks/b819a9187426d0c146df.js +1 -0
- package/assets/esri/core/workers/chunks/{1d92da90fbbc3f98b201.js → b8d788e110c212a879ab.js} +1 -1
- package/assets/esri/core/workers/chunks/b94cd7eac5ff4a78dd5b.js +1 -0
- package/assets/esri/core/workers/chunks/b9d6f89f9b8e9d1bc787.js +1 -0
- package/assets/esri/core/workers/chunks/b9f40681af1fa00b5bbe.js +1 -0
- package/assets/esri/core/workers/chunks/{bc547cf814d6703cef59.js → bb95922cd4631d6f17fb.js} +1 -1
- package/assets/esri/core/workers/chunks/bcb5017500d144b73908.js +1 -0
- package/assets/esri/core/workers/chunks/bd862382f72ebd446b46.js +1 -0
- package/assets/esri/core/workers/chunks/bdd19dab276d20d5381a.js +1 -0
- package/assets/esri/core/workers/chunks/bee5e738ecf8680909c4.js +1 -0
- package/assets/esri/core/workers/chunks/{9be4438ce2c7180adadf.js → bf287f0e2ecb4532dc00.js} +1 -1
- package/assets/esri/core/workers/chunks/{5115059b012ef84407cf.js → bfb6566c27c09deb0929.js} +1 -1
- package/assets/esri/core/workers/chunks/c055c16379f5bb56e930.js +1 -0
- package/assets/esri/core/workers/chunks/c13e55b9efb0b532f7ee.js +1 -0
- package/assets/esri/core/workers/chunks/c1845682cc9a5aac8703.js +261 -0
- package/assets/esri/core/workers/chunks/c369d4266f38e9ea6592.js +1 -0
- package/assets/esri/core/workers/chunks/c3fae4f4522604a9c17e.js +1 -0
- package/assets/esri/core/workers/chunks/c4c25db769a78e677e33.js +1 -0
- package/assets/esri/core/workers/chunks/c50e4e8c6188e64e7d45.js +1 -0
- package/assets/esri/core/workers/chunks/c838cc1c786368b78598.js +1 -0
- package/assets/esri/core/workers/chunks/c8db0a4fb5bc982dc9fc.js +1 -0
- package/assets/esri/core/workers/chunks/{82adfa2dbd40e1becaf4.js → c97451f75c23be979476.js} +1 -1
- package/assets/esri/core/workers/chunks/ca118c42c0f609ca7912.js +1 -0
- package/assets/esri/core/workers/chunks/ca419858910af5505d3d.js +1 -0
- package/assets/esri/core/workers/chunks/cb17cd8aaf77238c0236.js +1 -0
- package/assets/esri/core/workers/chunks/{034dd8ee5152a12412cd.js → cba3316910ff088f4d77.js} +1 -1
- package/assets/esri/core/workers/chunks/cc414fd2e313d89d524d.js +1 -0
- package/assets/esri/core/workers/chunks/{7b8466f892a38a53c600.js → cce83896093279c70449.js} +1 -1
- package/assets/esri/core/workers/chunks/cda04571d7623c17ada2.js +1 -0
- package/assets/esri/core/workers/chunks/cea4b18e7f83c02922b1.js +1 -0
- package/assets/esri/core/workers/chunks/cf03d391d50a4c7aca4f.js +1 -0
- package/assets/esri/core/workers/chunks/d03f427442bb0c287d05.js +1 -0
- package/assets/esri/core/workers/chunks/d082de5dd83bd73d209b.js +1 -0
- package/assets/esri/core/workers/chunks/d08d3c6f21e6ba8268ca.js +1 -0
- package/assets/esri/core/workers/chunks/d36f17d32c654b1ac7fa.js +1 -0
- package/assets/esri/core/workers/chunks/d36fba71c52ea4e71546.js +1 -0
- package/assets/esri/core/workers/chunks/{18f980465db5a86153d1.js → d37a72111dffc4c4db70.js} +1 -1
- package/assets/esri/core/workers/chunks/d41ab2abcfacc87809b5.js +1 -0
- package/assets/esri/core/workers/chunks/d4ed094962a41d756c95.js +1 -0
- package/assets/esri/core/workers/chunks/d5561dff043789494845.js +1 -0
- package/assets/esri/core/workers/chunks/d66d58ed5d66520ab1bf.js +1 -0
- package/assets/esri/core/workers/chunks/d79ce047afbc034f6008.js +1 -0
- package/assets/esri/core/workers/chunks/d847c3cb2043a983145b.js +1 -0
- package/assets/esri/core/workers/chunks/d849bdaf5bdfdc37531a.js +1 -0
- package/assets/esri/core/workers/chunks/da6134c7883531f21afe.js +1 -0
- package/assets/esri/core/workers/chunks/{c48dfda8dcb9551606fb.js → dad39ddf0f8dfb0bef47.js} +1 -1
- package/assets/esri/core/workers/chunks/dadefe369f49e89a2610.js +1 -0
- package/assets/esri/core/workers/chunks/dccb46c7dce68528c72b.js +1 -0
- package/assets/esri/core/workers/chunks/ddafe402f1bc9e8285ef.js +1 -0
- package/assets/esri/core/workers/chunks/de9573871f64c01e9f01.js +1 -0
- package/assets/esri/core/workers/chunks/dedf678490572c500a19.js +30 -0
- package/assets/esri/core/workers/chunks/df174346a7e9b629a392.js +1 -0
- package/assets/esri/core/workers/chunks/df30053a10d4930924d5.js +1 -0
- package/assets/esri/core/workers/chunks/dfbdc72c7ea137e3841d.js +1 -0
- package/assets/esri/core/workers/chunks/e21b3490bfce75405e55.js +1 -0
- package/assets/esri/core/workers/chunks/e2c9393bec747f7876bb.js +1 -0
- package/assets/esri/core/workers/chunks/e3e966777f18164afcd8.js +1 -0
- package/assets/esri/core/workers/chunks/e4a2eefffe16cd5bb20f.js +1 -0
- package/assets/esri/core/workers/chunks/{d0983cc19d19c19c3478.js → e4aacfc1617ccf60bd5a.js} +1 -1
- package/assets/esri/core/workers/chunks/{3a526e1d18490b99332f.js → e5bb7ee670a3ba5ba3fe.js} +1 -1
- package/assets/esri/core/workers/chunks/e5c75459de85a6dd2f14.js +1 -0
- package/assets/esri/core/workers/chunks/{757982a73174aa7ab0d1.js → e6b5c015205d38abe037.js} +1 -1
- package/assets/esri/core/workers/chunks/e798ca23f02a2dd65bd4.js +1 -0
- package/assets/esri/core/workers/chunks/e94f2d6037fba042dc6e.js +1 -0
- package/assets/esri/core/workers/chunks/e9511627418c6864148a.js +1 -0
- package/assets/esri/core/workers/chunks/ec1a2e68957fae48e60b.js +30 -0
- package/assets/esri/core/workers/chunks/ec2e0b2e31fd53b81d0a.js +1 -0
- package/assets/esri/core/workers/chunks/ed552941eca621a51f16.js +1 -0
- package/assets/esri/core/workers/chunks/ee58f4bbc0a1f7d03df0.js +1 -0
- package/assets/esri/core/workers/chunks/f04cb48fc73635d0572f.js +1 -0
- package/assets/esri/core/workers/chunks/f06f591680c9e93e69f6.js +1 -0
- package/assets/esri/core/workers/chunks/f1d3cf674b6bea89e122.js +1 -0
- package/assets/esri/core/workers/chunks/f2ab8e49c7f17f488aa8.js +1 -0
- package/assets/esri/core/workers/chunks/{6a51499c6623ddce5f00.js → f2adf1227a795604d3b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{57c003c6745d450558a7.js → f4aed2b6e92bd0474069.js} +1 -1
- package/assets/esri/core/workers/chunks/f4eda59ec1e816ecc827.js +1 -0
- package/assets/esri/core/workers/chunks/f5d7f69047e1b1116202.js +1 -0
- package/assets/esri/core/workers/chunks/f5d809d30cbb56be852d.js +1 -0
- package/assets/esri/core/workers/chunks/{2d92f0042facb55edcff.js → f65adaaa33d9f3b131f6.js} +1 -1
- package/assets/esri/core/workers/chunks/f8f0de841be17cd05c8f.js +1 -0
- package/assets/esri/core/workers/chunks/f9b654f801cb416e9e17.js +1 -0
- package/assets/esri/core/workers/chunks/fb34d6d96c8c0d53fcf6.js +1 -0
- package/assets/esri/core/workers/chunks/fb51f823b25c827c6b29.js +1 -0
- package/assets/esri/core/workers/chunks/fba8065a3a6fbd877e23.js +1 -0
- package/assets/esri/core/workers/chunks/fd47ee8598e37fea03fe.js +1 -0
- package/assets/esri/core/workers/chunks/fefbde2c2e527bb716ee.js +1 -0
- package/assets/esri/core/workers/chunks/ff089723a27859fe18d1.js +1 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/_core.scss +0 -6
- 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/CutFillMinMaxDepth.glsl.js +2 -0
- package/chunks/CutFillTotalDepth.glsl.js +2 -0
- package/chunks/EdgeShader.glsl.js +9 -9
- package/chunks/GaussianSplat.glsl.js +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/config.js +1 -1
- package/editing/geometry/coordUtils.js +1 -1
- package/geohash/geohashUtils.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/quantizationUtils.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +5 -0
- package/intl/date.js +1 -1
- package/kernel.js +1 -1
- package/layers/AnnotationFeatureLayer.d.ts +13 -3
- package/layers/DimensionFeatureLayer.d.ts +10 -3
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
- package/layers/raster/formats/Lerc.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/package.json +3 -3
- package/support/revision.js +1 -1
- package/views/2d/engine/vectorTiles/GeometryUtils.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitBlitShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DebugOverlayShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HighlightShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/WorldExtentStencilShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/BitBlitTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/DebugOverlayTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/HighlightTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/WorldExtentClipTechnique.js +2 -0
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/SceneLayerWorkerHandle.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/SphereCone.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/cameraUtilsSpherical.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/emissionFilter.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsParameters.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputation.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/PolygonIntersections2D.js +2 -0
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/AdjustProjectedPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/DiscardNonSilhouetteEdges.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/EdgeUtil.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/LineAmplitude.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/LineOffset.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/UnpackAttributes.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/BufferRange.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMinMaxDepth.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/CutFillMinMaxDepthTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/{CutFillDepth.glsl.js → CutFillTotalDepth.glsl.js} +1 -1
- package/views/3d/webgl-engine/shaders/CutFillTotalDepthTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -1
- package/views/Viewport2DMixin.js +1 -1
- package/views/input/BrowserEventSource.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/webgl/VertexAttributeLayouts.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/multipleChoiceInputUtils.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/Legend/support/relationshipRampUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/02b043a3c5fa8bcb4c5b.js +0 -1
- package/assets/esri/core/workers/chunks/03437a8ef35c200dbf17.js +0 -1
- package/assets/esri/core/workers/chunks/0603cbd938ab619c706b.js +0 -1
- package/assets/esri/core/workers/chunks/08405116b5feb2d00101.js +0 -1
- package/assets/esri/core/workers/chunks/0a6e03263ab0906d8bcf.js +0 -1
- package/assets/esri/core/workers/chunks/0af6b87a3d77bb93b893.js +0 -1
- package/assets/esri/core/workers/chunks/0edd250159ec259601b3.js +0 -1
- package/assets/esri/core/workers/chunks/0f10d7d592c36ee2d1ea.js +0 -1
- package/assets/esri/core/workers/chunks/0f8fcbd0650b6a924f75.js +0 -1
- package/assets/esri/core/workers/chunks/0f976bfb7db98c2c0e05.js +0 -1
- package/assets/esri/core/workers/chunks/1040bce57ea63a6dbca4.js +0 -2
- package/assets/esri/core/workers/chunks/10510f76f8538c2dfb84.js +0 -1
- package/assets/esri/core/workers/chunks/1079914101d69a40b3eb.js +0 -1
- package/assets/esri/core/workers/chunks/11af659688cf963ea6cd.js +0 -1
- package/assets/esri/core/workers/chunks/15081b361fc42f40b865.js +0 -1
- package/assets/esri/core/workers/chunks/1599dc5309a4e60017ce.js +0 -261
- package/assets/esri/core/workers/chunks/181e98399732f425305d.js +0 -1
- package/assets/esri/core/workers/chunks/1837f97f720d255a1694.js +0 -1
- package/assets/esri/core/workers/chunks/18c4c437ded8bfbd3305.js +0 -1
- package/assets/esri/core/workers/chunks/18f4b2099299942aaf97.js +0 -1
- package/assets/esri/core/workers/chunks/1958facb000b6c16bfe4.js +0 -1
- package/assets/esri/core/workers/chunks/196e7515a43bd0026f49.js +0 -1
- package/assets/esri/core/workers/chunks/1a0903b1d2d5101977c6.js +0 -1
- package/assets/esri/core/workers/chunks/1aa7496a7dc95aae11ac.js +0 -1
- package/assets/esri/core/workers/chunks/1bd49e8d2657c72bf3f9.js +0 -1
- package/assets/esri/core/workers/chunks/1c263ffb7144e171a64f.js +0 -1
- package/assets/esri/core/workers/chunks/1d524690c4b66289bd20.js +0 -1
- package/assets/esri/core/workers/chunks/20fa2c3d4360afa5e136.js +0 -1
- package/assets/esri/core/workers/chunks/210ffc448c73a7bf63aa.js +0 -1
- package/assets/esri/core/workers/chunks/23f81f4a3d7a983eef23.js +0 -1
- package/assets/esri/core/workers/chunks/2540beb53f1443a070d7.js +0 -1
- package/assets/esri/core/workers/chunks/25c1f5e2561986330b80.js +0 -1
- package/assets/esri/core/workers/chunks/2757c4bf0280e27f3484.js +0 -1
- package/assets/esri/core/workers/chunks/294537e1ac43e8dfeaea.js +0 -1
- package/assets/esri/core/workers/chunks/29a1d0659bbc5a039864.js +0 -1
- package/assets/esri/core/workers/chunks/29df3f829006719b2680.js +0 -1
- package/assets/esri/core/workers/chunks/2a344bca6837ca3b5c41.js +0 -2
- package/assets/esri/core/workers/chunks/2a5dbed88bbd96cfac9f.js +0 -1
- package/assets/esri/core/workers/chunks/2b044c8fab2055a8818d.js +0 -1
- package/assets/esri/core/workers/chunks/2d956dacb26d71d1c174.js +0 -1
- package/assets/esri/core/workers/chunks/2da797ae5af9d2ede42d.js +0 -1
- package/assets/esri/core/workers/chunks/2dbcdfdf000226bfe746.js +0 -1
- package/assets/esri/core/workers/chunks/2e495a28494c2351837b.js +0 -1
- package/assets/esri/core/workers/chunks/2ef80e003b4f0393ac2e.js +0 -1
- package/assets/esri/core/workers/chunks/2fc3e43b64300014dddc.js +0 -1
- package/assets/esri/core/workers/chunks/30cf84a47ebefd180bb7.js +0 -1
- package/assets/esri/core/workers/chunks/314bc1b356d43bfa72a8.js +0 -1
- package/assets/esri/core/workers/chunks/34a024eda22d228e1fbe.js +0 -1
- package/assets/esri/core/workers/chunks/37e823202424c11076cb.js +0 -1
- package/assets/esri/core/workers/chunks/38a76bc4ef5c10ab0488.js +0 -1
- package/assets/esri/core/workers/chunks/390f2beee8e3f2a302e4.js +0 -1
- package/assets/esri/core/workers/chunks/3a76fffa2016c16d7989.js +0 -1398
- package/assets/esri/core/workers/chunks/3c2eb386c0165150e039.js +0 -1
- package/assets/esri/core/workers/chunks/3e4b379a6a197b9c4e6b.js +0 -1
- package/assets/esri/core/workers/chunks/3ec91474658eae87b832.js +0 -1
- package/assets/esri/core/workers/chunks/3eee32db0e9a5086b9a8.js +0 -1
- package/assets/esri/core/workers/chunks/406c7723e8db470822bf.js +0 -1
- package/assets/esri/core/workers/chunks/41aca863324387576cf8.js +0 -1
- package/assets/esri/core/workers/chunks/442424200e7475e9a08f.js +0 -1
- package/assets/esri/core/workers/chunks/4452fd0c59431904d533.js +0 -1
- package/assets/esri/core/workers/chunks/448e0596005cba9a4225.js +0 -1
- package/assets/esri/core/workers/chunks/4545cf12ad0824ce6b41.js +0 -1
- package/assets/esri/core/workers/chunks/45530a49fa1f09d1682e.js +0 -1
- package/assets/esri/core/workers/chunks/459e89d1b94a3b204d20.js +0 -30
- package/assets/esri/core/workers/chunks/45b2e58051f42ebd236e.js +0 -1
- package/assets/esri/core/workers/chunks/4611cf051c3c396fdf96.js +0 -1
- package/assets/esri/core/workers/chunks/46e3d33e44e5398221e2.js +0 -1
- package/assets/esri/core/workers/chunks/47656ec12401e53f4bd3.js +0 -1
- package/assets/esri/core/workers/chunks/47948c72bc01bd173c20.js +0 -2
- package/assets/esri/core/workers/chunks/48f1c3a7c9f16d6896f6.js +0 -1
- package/assets/esri/core/workers/chunks/49713dfa4c8b788079d1.js +0 -1
- package/assets/esri/core/workers/chunks/4a8201e09bc3ad5cc00b.js +0 -1
- package/assets/esri/core/workers/chunks/4ad86d6b1be07c97b6f6.js +0 -1
- package/assets/esri/core/workers/chunks/4be0c64bbf2449d57ea5.js +0 -1
- package/assets/esri/core/workers/chunks/4d57c771af4137f74bfb.js +0 -1
- package/assets/esri/core/workers/chunks/4f25aac84d9eb10cac83.js +0 -1
- package/assets/esri/core/workers/chunks/50b34e246f8eef2f6e07.js +0 -1
- package/assets/esri/core/workers/chunks/514ab968c0d75062e6ab.js +0 -1
- package/assets/esri/core/workers/chunks/51838d55d8ec4ce70398.js +0 -1
- package/assets/esri/core/workers/chunks/557300ec03bae84d8afc.js +0 -1
- package/assets/esri/core/workers/chunks/57abf838fcff0f0e2c5e.js +0 -1
- package/assets/esri/core/workers/chunks/57dd017fed2943d24e3d.js +0 -1
- package/assets/esri/core/workers/chunks/59801b2ccaaf4b394e02.js +0 -1
- package/assets/esri/core/workers/chunks/5a2d2dcdfa8d958f277d.js +0 -1
- package/assets/esri/core/workers/chunks/5a62c9f64db4fcae5e52.js +0 -1
- package/assets/esri/core/workers/chunks/5aebecb5c2b3e7887127.js +0 -1
- package/assets/esri/core/workers/chunks/5e68b74fd548c7cdba36.js +0 -1
- package/assets/esri/core/workers/chunks/5f360492560ae07083a6.js +0 -1
- package/assets/esri/core/workers/chunks/6022f43ebd58e21c737a.js +0 -1
- package/assets/esri/core/workers/chunks/6048c89fc4dcd2e9988d.js +0 -1
- package/assets/esri/core/workers/chunks/61efc7f5fab1c2b1f764.js +0 -1
- package/assets/esri/core/workers/chunks/62b137a795e487fa06a1.js +0 -1
- package/assets/esri/core/workers/chunks/632de34ebd2f44b4423d.js +0 -1
- package/assets/esri/core/workers/chunks/63ca17f569407c89bde1.js +0 -30
- package/assets/esri/core/workers/chunks/643c7506f8fe8e06acd2.js +0 -1
- package/assets/esri/core/workers/chunks/6596b12bb286a0b45a68.js +0 -1
- package/assets/esri/core/workers/chunks/65cc9a48ac95523f7aa8.js +0 -1
- package/assets/esri/core/workers/chunks/661f50cb97604453f942.js +0 -1
- package/assets/esri/core/workers/chunks/686c1a1b794ebe1a0341.js +0 -1
- package/assets/esri/core/workers/chunks/6896a6dd36fa91a27151.js +0 -1
- package/assets/esri/core/workers/chunks/68bc674affe2f7269c40.js +0 -1
- package/assets/esri/core/workers/chunks/6c02493a1c1deff49c7e.js +0 -1
- package/assets/esri/core/workers/chunks/6cdf1db30793133294dd.js +0 -1
- package/assets/esri/core/workers/chunks/6ff6783f89ecd3a5e752.js +0 -1
- package/assets/esri/core/workers/chunks/70763c7b68d8abe8d5fe.js +0 -1
- package/assets/esri/core/workers/chunks/716b1f073e3cd807abd3.js +0 -1
- package/assets/esri/core/workers/chunks/71a3f05cb86ae2920f8d.js +0 -1
- package/assets/esri/core/workers/chunks/71b672259bac2befd9c7.js +0 -1
- package/assets/esri/core/workers/chunks/71c996e1ae84d9daddf2.js +0 -1
- package/assets/esri/core/workers/chunks/723bb56de2324b41df4e.js +0 -1
- package/assets/esri/core/workers/chunks/73f61107cb7e6d30bf03.js +0 -1
- package/assets/esri/core/workers/chunks/752c34cee981862add89.js +0 -1
- package/assets/esri/core/workers/chunks/75915f81caaf9e5345a9.js +0 -1
- package/assets/esri/core/workers/chunks/75baf6dff6e7658b17b3.js +0 -1
- package/assets/esri/core/workers/chunks/760dfd585b6c2c1937ce.js +0 -1
- package/assets/esri/core/workers/chunks/76449e50222111ba0eb1.js +0 -1
- package/assets/esri/core/workers/chunks/76789f46b2c65d219cf9.js +0 -1
- package/assets/esri/core/workers/chunks/76bed5497f42f23a27ed.js +0 -1
- package/assets/esri/core/workers/chunks/7849cf0352c0a604e164.js +0 -1
- package/assets/esri/core/workers/chunks/7908aed639521cf572e8.js +0 -1
- package/assets/esri/core/workers/chunks/7d65a8ec5e1f871b9321.js +0 -1
- package/assets/esri/core/workers/chunks/7e4093f42795ba2f8cfd.js +0 -1
- package/assets/esri/core/workers/chunks/7f849c8255140be6097f.js +0 -1
- package/assets/esri/core/workers/chunks/804c31973f7d116523cb.js +0 -1
- package/assets/esri/core/workers/chunks/81726d997a2d34449bb2.js +0 -1
- package/assets/esri/core/workers/chunks/81883bca8a79ee2ddb00.js +0 -1
- package/assets/esri/core/workers/chunks/832ecc1f7d45774c4726.js +0 -1
- package/assets/esri/core/workers/chunks/8461f50e9875db4ccfec.js +0 -1
- package/assets/esri/core/workers/chunks/8598997340682113a2a5.js +0 -1
- package/assets/esri/core/workers/chunks/860a0f9d20f53db1caf4.js +0 -1
- package/assets/esri/core/workers/chunks/867e39bb444947c93586.js +0 -1
- package/assets/esri/core/workers/chunks/88ec63501fa2f6fdadca.js +0 -1
- package/assets/esri/core/workers/chunks/8980767c5b626e4dc3b9.js +0 -1
- package/assets/esri/core/workers/chunks/89dd1b1acb0d69264c93.js +0 -1
- package/assets/esri/core/workers/chunks/8a66a3e8391206f7d8aa.js +0 -1
- package/assets/esri/core/workers/chunks/8a8b7ac6693bdfbebf07.js +0 -1
- package/assets/esri/core/workers/chunks/8ad5e80e911419c1685a.js +0 -1
- package/assets/esri/core/workers/chunks/8b526ca2dd6fc6a7e921.js +0 -1
- package/assets/esri/core/workers/chunks/8e80441eddef1b5be8b9.js +0 -1
- package/assets/esri/core/workers/chunks/8f16a358ed83d2264415.js +0 -1
- package/assets/esri/core/workers/chunks/8fce15ce4cfdccf407f3.js +0 -1
- package/assets/esri/core/workers/chunks/8fd63cb38036f331a803.js +0 -1
- package/assets/esri/core/workers/chunks/91c5205d1274c7f190d5.js +0 -1
- package/assets/esri/core/workers/chunks/92341f36a8b15f34bcca.js +0 -1
- package/assets/esri/core/workers/chunks/937cf55b3b9d324eea73.js +0 -1
- package/assets/esri/core/workers/chunks/93d4bda22bde33fafa57.js +0 -1
- package/assets/esri/core/workers/chunks/9639b1dd27ccc17ee21e.js +0 -1
- package/assets/esri/core/workers/chunks/966d002acec8c72be56a.js +0 -1
- package/assets/esri/core/workers/chunks/986d8c3907aeeb18c4f6.js +0 -1
- package/assets/esri/core/workers/chunks/98e489c2b85feded7776.js +0 -1
- package/assets/esri/core/workers/chunks/9aef0b87f471626abd66.js +0 -1
- package/assets/esri/core/workers/chunks/9ba9a3705623679bc305.js +0 -1
- package/assets/esri/core/workers/chunks/a188d0767825d322f96d.js +0 -1
- package/assets/esri/core/workers/chunks/a4d3cbc02dc1186a9a6d.js +0 -1
- package/assets/esri/core/workers/chunks/a638de0102c3990403d1.js +0 -1
- package/assets/esri/core/workers/chunks/a6bda5f17fb1c03f7e4b.js +0 -1
- package/assets/esri/core/workers/chunks/a6dc01847f39413f78b8.js +0 -1
- package/assets/esri/core/workers/chunks/acc733b4881c3e4e503e.js +0 -1
- package/assets/esri/core/workers/chunks/b022debf9e0bc2bff0e2.js +0 -1
- package/assets/esri/core/workers/chunks/b09935d0105d50a0971b.js +0 -1
- package/assets/esri/core/workers/chunks/b12fc1b5a9da97346684.js +0 -1
- package/assets/esri/core/workers/chunks/b4323e69e624c6b51754.js +0 -1
- package/assets/esri/core/workers/chunks/b45e91249a8ea1559a2b.js +0 -1
- package/assets/esri/core/workers/chunks/b50a42a9f96515beb929.js +0 -1
- package/assets/esri/core/workers/chunks/b5141f240ca79729686d.js +0 -1
- package/assets/esri/core/workers/chunks/b549a4d4b1a34bee8beb.js +0 -1
- package/assets/esri/core/workers/chunks/bb89b6fd93513c61b2d3.js +0 -1
- package/assets/esri/core/workers/chunks/bc553ecc8cbcc1b02717.js +0 -1
- package/assets/esri/core/workers/chunks/bcba02f61cf0abcb5600.js +0 -1
- package/assets/esri/core/workers/chunks/bccc199af4e2e49f7acd.js +0 -1
- package/assets/esri/core/workers/chunks/bd0f488e228a75fbefb3.js +0 -30
- package/assets/esri/core/workers/chunks/bd155794e9bc16dd0474.js +0 -1
- package/assets/esri/core/workers/chunks/bf6ae205fbfbfcd1a0ee.js +0 -1
- package/assets/esri/core/workers/chunks/c148ad0ea9258046ac1f.js +0 -1
- package/assets/esri/core/workers/chunks/c228b058dd91bf0e1102.js +0 -1
- package/assets/esri/core/workers/chunks/c4e44fde4bc4ff89e2bc.js +0 -1
- package/assets/esri/core/workers/chunks/c4fc85281ca83af7abaf.js +0 -1
- package/assets/esri/core/workers/chunks/c610ccbfdb1c5b06c217.js +0 -1
- package/assets/esri/core/workers/chunks/c660a5a1086870a3a6b9.js +0 -1
- package/assets/esri/core/workers/chunks/c8b7ffc5cb3f1493129e.js +0 -1
- package/assets/esri/core/workers/chunks/c9057b0ad2c2bae4a8ce.js +0 -1
- package/assets/esri/core/workers/chunks/c93a68618674b38b932e.js +0 -1
- package/assets/esri/core/workers/chunks/c961aff385e38b081204.js +0 -1
- package/assets/esri/core/workers/chunks/cc0efa716b8414a44398.js +0 -1
- package/assets/esri/core/workers/chunks/cd66bd30f654fe571e57.js +0 -1
- package/assets/esri/core/workers/chunks/cd88e6f02bc2e5b67abf.js +0 -1
- package/assets/esri/core/workers/chunks/cf826787ab8d4b27ad80.js +0 -1
- package/assets/esri/core/workers/chunks/cfbbfa5edffa57bd3a8e.js +0 -1
- package/assets/esri/core/workers/chunks/d0217187aed8bb7038f4.js +0 -1
- package/assets/esri/core/workers/chunks/d1928a8c86a8966e5582.js +0 -1
- package/assets/esri/core/workers/chunks/d2745886ba5a86fd5c4c.js +0 -680
- package/assets/esri/core/workers/chunks/d4c341b15d9244276fb9.js +0 -1
- package/assets/esri/core/workers/chunks/d5faab9799891e5da5a8.js +0 -1
- package/assets/esri/core/workers/chunks/d811924acc9c0be95bba.js +0 -1
- package/assets/esri/core/workers/chunks/db90fb8ac96579259566.js +0 -1
- package/assets/esri/core/workers/chunks/dd0acd0f8b96839b4f24.js +0 -2
- package/assets/esri/core/workers/chunks/dd785e595cd08b2d6284.js +0 -1
- package/assets/esri/core/workers/chunks/e0b47b08ae2c36c76fa2.js +0 -1
- package/assets/esri/core/workers/chunks/e1ddb8e4977b317fd40c.js +0 -1
- package/assets/esri/core/workers/chunks/e4015870412edd69453c.js +0 -1
- package/assets/esri/core/workers/chunks/e7cb1b72f0b54e845741.js +0 -1
- package/assets/esri/core/workers/chunks/e7e7c7cbfd8542bd7a46.js +0 -1
- package/assets/esri/core/workers/chunks/e80376832050a4b6d28a.js +0 -1
- package/assets/esri/core/workers/chunks/e8a885b576da3ec145d3.js +0 -1
- package/assets/esri/core/workers/chunks/e95ee94027c1934086d8.js +0 -1
- package/assets/esri/core/workers/chunks/e961c6140c39921816a8.js +0 -1
- package/assets/esri/core/workers/chunks/eb7daa0f6610983ff8db.js +0 -1
- package/assets/esri/core/workers/chunks/eb842cf470ce28a73187.js +0 -1
- package/assets/esri/core/workers/chunks/eeea5710275c967e8d51.js +0 -1
- package/assets/esri/core/workers/chunks/ef32e454012f3b0e3f77.js +0 -1
- package/assets/esri/core/workers/chunks/f31a8e76f1dde23c0900.js +0 -1
- package/assets/esri/core/workers/chunks/f50bba74ae72c07e131a.js +0 -1
- package/assets/esri/core/workers/chunks/f58ddf37dee066a5c0d8.js +0 -1
- package/assets/esri/core/workers/chunks/f80cadcc2a588da63b38.js +0 -1
- package/assets/esri/core/workers/chunks/f83e3ad67b60744afd6d.js +0 -1
- package/assets/esri/core/workers/chunks/f859c53432f258af77e3.js +0 -2
- package/assets/esri/core/workers/chunks/f8bbb52b865a0a242140.js +0 -1
- package/assets/esri/core/workers/chunks/f8f3579d0c1b65762902.js +0 -1
- package/assets/esri/core/workers/chunks/f9592bcdd9988199a7ea.js +0 -1
- package/assets/esri/core/workers/chunks/fedbeb488d5d7c07c7dc.js +0 -1
- package/assets/esri/core/workers/chunks/ff7e1eb2366d4301d288.js +0 -1
- package/assets/esri/themes/base/_colorVariables.scss +0 -1
- package/assets/esri/themes/base/widgets/_DatePicker.scss +0 -170
- package/assets/esri/themes/base/widgets/_FeatureUtilityNetworkAssociationList.scss +0 -13
- package/assets/esri/themes/base/widgets/_TimePicker.scss +0 -15
- package/chunks/CutFillDepth.glsl.js +0 -2
- package/core/PLRUCache.js +0 -2
- package/views/2d/engine/webgl/BitBlitRenderer.js +0 -2
- package/views/2d/engine/webgl/WorldExtentClipRenderer.js +0 -2
- package/views/2d/engine/webgl/effects/highlight/HighlightRenderer.js +0 -2
- package/views/2d/engine/webgl/shaders/BitBlitPrograms.js +0 -2
- package/views/2d/engine/webgl/shaders/HighlightPrograms.js +0 -2
- package/views/2d/engine/webgl/shaders/StencilPrograms.js +0 -2
- package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/CutFillDepthTechniqueConfiguration.js +0 -2
- package/views/support/euclideanAreaMeasurementUtils.js +0 -2
- package/widgets/ShadowCast/ShadowVisualizationType.js +0 -2
- /package/assets/esri/core/workers/chunks/{47948c72bc01bd173c20.js.LICENSE.txt → 24c0b3586bb6500eda53.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{f859c53432f258af77e3.js.LICENSE.txt → 394716bd1ecfd638d708.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{1040bce57ea63a6dbca4.js.LICENSE.txt → 55af58b6dff52dc040fe.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{dd0acd0f8b96839b4f24.js.LICENSE.txt → 5b18696109fe84a1010a.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,1398 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6662],{28491(e,t,r){r.d(t,{b:()=>A});var o=r(32680),a=r(49255),n=r(34711),i=r(76597),s=r(24321),l=r(2585),c=r(43519),u=r(96336),d=r(39014),h=r(53466),m=r(92700),f=r(72824),p=r(35640),v=r(40261),g=r(77695),x=r(72233),b=r(32971),y=r(98619),w=r(62602),M=r(22393),S=r(59469),T=r(32482),C=r(51406),_=r(43259),I=r(58614),P=r(27950),z=r(77949),R=r(33079),D=r(71988),F=r(20304),O=r(31821),j=r(63761),E=r(27832),B=r(43616),H=r(47630),N=r(14113),W=r(49788);function A(e){const t=new N.N5,{attributes:r,vertex:A,fragment:G,varyings:L}=t,{output:V,normalType:k,offsetBackfaces:U,spherical:$,snowCover:q,pbrMode:Z,textureAlphaPremultiplied:Y,instancedDoublePrecision:J,hasVertexColors:X,hasVertexTangents:K,hasColorTexture:Q,hasNormalTexture:ee,hasNormalTextureTransform:te,hasColorTextureTransform:re}=e;if((0,z.NB)(A,e),r.add("position","vec3"),A.inputs.add("position",()=>"position"),L.add("vpos","vec3",{invariant:!0}),t.include(_.A,e),t.include(l.B,e),t.include(p.Ge,e),t.include(C.q2,e),!(0,a._o)(V))return t.include(v.E,e),t;t.include(C.Sx,e),t.include(C.MU,e),t.include(C.O1,e),t.include(C.QM,e),(0,z.yu)(A,e),t.include(u.Y,e),t.include(i.d);const oe=0===k||1===k;return oe&&U&&t.include(o.M),t.include(g.J,e),t.include(f.Mh,e),t.include(s.v,e),L.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(d.K,e),t.include(m.c,e),A.uniforms.add(new D.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),L.add("vcolorExt","vec4"),A.include(c.WD),A.include(c.oF),t.include(J?T.QH:T.LA,e),A.main.add(O.H`
|
|
2
|
+
forwardVertexColor();
|
|
3
|
+
|
|
4
|
+
MaskedColor maskedColor =
|
|
5
|
+
applySymbolColor(applyVVColor(applyInstanceColor(createMaskedFromNaNColor(externalColor))));
|
|
6
|
+
|
|
7
|
+
vcolorExt = maskedColor.color;
|
|
8
|
+
forwardColorMixMode(maskedColor.mask);
|
|
9
|
+
|
|
10
|
+
vpos = getVertexInLocalOriginSpace();
|
|
11
|
+
vPositionLocal = vpos - view[3].xyz;
|
|
12
|
+
vpos = subtractOrigin(vpos);
|
|
13
|
+
${(0,O.If)(oe,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
|
|
14
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
15
|
+
${(0,O.If)(K,"vTangent = dpTransformVertexTangent(tangent);")}
|
|
16
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
17
|
+
${(0,O.If)(oe&&U,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
18
|
+
|
|
19
|
+
forwardTextureCoordinates();
|
|
20
|
+
forwardColorUV();
|
|
21
|
+
forwardNormalUV();
|
|
22
|
+
forwardEmissiveUV();
|
|
23
|
+
forwardOcclusionUV();
|
|
24
|
+
forwardMetallicRoughnessUV();
|
|
25
|
+
|
|
26
|
+
if (opacityMixMode != ${O.H.int(B.Um.ignore)} && vcolorExt.a < ${O.H.float(W.Q)}) {
|
|
27
|
+
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
28
|
+
}
|
|
29
|
+
forwardLinearDepthToReadShadowMap();
|
|
30
|
+
`),G.include(b.kA,e),G.include(x.n,e),t.include(I.SS,e),G.include(n.HQ,e),t.include(H.D,e),(0,z.yu)(G,e),G.uniforms.add(A.uniforms.get("localOrigin"),new R.t("ambient",e=>e.ambient),new R.t("diffuse",e=>e.diffuse),new F.m("opacity",e=>e.opacity),new F.m("layerOpacity",e=>e.layerOpacity)),Q&&G.uniforms.add(new j.N("tex",e=>e.texture)),t.include(S._,e),G.include(M.c,e),G.include(P.N),t.include(w.r,e),G.include(E.b,e),(0,b.a8)(G),(0,b.eU)(G),(0,y.O4)(G),G.main.add(O.H`
|
|
31
|
+
discardBySlice(vpos);
|
|
32
|
+
${Q?O.H`
|
|
33
|
+
vec4 texColor = texture(tex, ${re?"colorUV":"vuv0"});
|
|
34
|
+
${(0,O.If)(Y,"texColor.rgb /= texColor.a;")}
|
|
35
|
+
discardOrAdjustAlpha(texColor);`:O.H`vec4 texColor = vec4(1.0);`}
|
|
36
|
+
shadingParams.viewDirection = normalize(vpos - cameraPosition);
|
|
37
|
+
${2===k?O.H`vec3 normal = screenDerivativeNormal(vPositionLocal);`:O.H`shadingParams.normalView = vNormalWorld;
|
|
38
|
+
vec3 normal = shadingNormal(shadingParams);`}
|
|
39
|
+
applyPBRFactors();
|
|
40
|
+
float ssao = evaluateAmbientOcclusionInverse() * getBakedOcclusion();
|
|
41
|
+
|
|
42
|
+
vec3 posWorld = vpos + localOrigin;
|
|
43
|
+
|
|
44
|
+
float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
|
|
45
|
+
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
46
|
+
|
|
47
|
+
vec3 matColor = max(ambient, diffuse);
|
|
48
|
+
vec3 albedo = mixExternalColor(${(0,O.If)(X,"vColor.rgb *")} matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
49
|
+
float opacity_ = layerOpacity * mixExternalOpacity(${(0,O.If)(X,"vColor.a * ")} opacity, texColor.a, vcolorExt.a, opacityMixMode);
|
|
50
|
+
|
|
51
|
+
${ee?`mat3 tangentSpace = computeTangentSpace(${K?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${te?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
|
|
52
|
+
vec3 normalGround = ${$?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
|
|
53
|
+
|
|
54
|
+
${(0,O.If)(q,O.H`
|
|
55
|
+
float snow = getSnow(normal, normalGround);
|
|
56
|
+
albedo = mix(albedo, vec3(1), snow);
|
|
57
|
+
shadingNormal = mix(shadingNormal, normal, snow);
|
|
58
|
+
ssao = mix(ssao, 1.0, snow);`)}
|
|
59
|
+
|
|
60
|
+
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
61
|
+
|
|
62
|
+
${1===Z||2===Z?O.H`
|
|
63
|
+
float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
64
|
+
${(0,O.If)(q,"mrr = applySnowToMRR(mrr, snow);")}
|
|
65
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:O.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
66
|
+
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
67
|
+
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,O.If)(q,", snow")});
|
|
68
|
+
`),t}const G=Object.freeze(Object.defineProperty({__proto__:null,build:A},Symbol.toStringTag,{value:"Module"}));r.d(t,["D",0,G])},587(e,t,r){r.d(t,{G:()=>g,c:()=>x});var o=r(82048),a=r(92573),n=r(65261),i=r(98619),s=r(70893),l=r(34845),c=r(20304),u=r(31821),d=r(58029),h=r(12791),m=r(63761),f=r(94046),p=(r(63907),r(65786)),v=r(14113);class g extends p.Y{constructor(){super(...arguments),this.projScale=1,this.scaleGlobalIllumination=1,this.accumulatedFrames=0,this.temporalSampleFrame=0,this.rayMarchMinReach=.15,this.rayMarchMaxReach=.5,this.rayMarchWorldReach=25,this.rayMarchMinReachEmissionWeight=1,this.rayMarchMaxReachEmissionWeight=1,this.rayMarchMaxSteps=16,this.colorBleedWeight=.15}}function x(e){const t=new v.N5,r=t.fragment;return t.include(o.c),t.include(l.Ir),(0,i.Gc)(r),r.include(a.V),r.include(n.C),r.include(f.R),t.include(s.O,e),r.uniforms.add(new m.N("normalMap",e=>e.normalTexture),new m.N("depthMap",e=>e.depthTexture),new h.x("lastFrameColorTexture",e=>e.reprojection.lastFrameColor?.getTexture()),new h.x("lastFrameDepthTexture",e=>e.reprojection.lastFrameDepth?.attachment),new h.x("lastFrameGlobalIlluminationTexture",e=>e.globalIllumination?.getTexture()),new h.x("lastFrameGlobalIlluminationWeightTexture",e=>e.globalIllumination?.getTexture(36065)),new d.F("reprojectionViewMatrix",e=>e.reprojection.viewMatrix),new d.F("view",e=>e.camera.viewMatrix),new c.m("accumulatedFrames",e=>e.accumulatedFrames),new c.m("temporalSampleFrame",e=>e.temporalSampleFrame),new c.m("scaleGlobalIllumination",e=>e.scaleGlobalIllumination)),r.uniforms.add(new c.m("rayMarchMinReach",e=>e.rayMarchMinReach),new c.m("rayMarchMaxReach",e=>e.rayMarchMaxReach),new c.m("rayMarchWorldReach",e=>e.rayMarchWorldReach),new c.m("rayMarchMinReachEmissionWeight",e=>e.rayMarchMinReachEmissionWeight),new c.m("rayMarchMaxReachEmissionWeight",e=>e.rayMarchMaxReachEmissionWeight),new c.m("rayMarchMaxSteps",e=>e.rayMarchMaxSteps),new c.m("colorBleedWeight",e=>e.colorBleedWeight)),e.hasEmission&&r.uniforms.add(new h.x("lastFrameEmissionTexture",e=>e.reprojection.lastFrameEmission?.attachment)),r.code.add(u.H`
|
|
69
|
+
float computeIdleColorBlendWeight(float accumulatedFrames) {
|
|
70
|
+
float idleColorBlendProgress = clamp(
|
|
71
|
+
accumulatedFrames / ${u.H.float(40)},
|
|
72
|
+
0.0,
|
|
73
|
+
1.0
|
|
74
|
+
);
|
|
75
|
+
return mix(
|
|
76
|
+
${u.H.float(.012)},
|
|
77
|
+
${u.H.float(.008)},
|
|
78
|
+
idleColorBlendProgress
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
float computeIdleOcclusionBlendWeight(float accumulatedFrames) {
|
|
83
|
+
float idleOcclusionBlendProgress = clamp(
|
|
84
|
+
accumulatedFrames / ${u.H.float(60)},
|
|
85
|
+
0.0,
|
|
86
|
+
1.0
|
|
87
|
+
);
|
|
88
|
+
return mix(
|
|
89
|
+
${u.H.float(.095)},
|
|
90
|
+
${u.H.float(.008)},
|
|
91
|
+
pow(idleOcclusionBlendProgress, ${u.H.float(2)})
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
bool isEdgeDepth(float centerDepth, vec2 sampleUv) {
|
|
96
|
+
vec2 texelSize = 1.0 / vec2(textureSize(depthMap, 0));
|
|
97
|
+
float depthLeft = linearizeDepth(depthFromTexture(depthMap, sampleUv + vec2(-texelSize.x, 0.0)));
|
|
98
|
+
float depthRight = linearizeDepth(depthFromTexture(depthMap, sampleUv + vec2(texelSize.x, 0.0)));
|
|
99
|
+
float depthUp = linearizeDepth(depthFromTexture(depthMap, sampleUv + vec2(0.0, texelSize.y)));
|
|
100
|
+
float depthDown = linearizeDepth(depthFromTexture(depthMap, sampleUv + vec2(0.0, -texelSize.y)));
|
|
101
|
+
|
|
102
|
+
float maxDifference = max(max(abs(centerDepth - depthLeft), abs(centerDepth - depthRight)), max(abs(centerDepth - depthUp), abs(centerDepth - depthDown)));
|
|
103
|
+
|
|
104
|
+
return abs(maxDifference / centerDepth) > 0.01;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
vec3 sampleCosineHemisphere(vec2 u) {
|
|
108
|
+
float phi = 6.28318530718 * u.x;
|
|
109
|
+
float radius = sqrt(u.y);
|
|
110
|
+
float x = radius * cos(phi);
|
|
111
|
+
float y = radius * sin(phi);
|
|
112
|
+
float z = sqrt(max(0.0, 1.0 - u.y));
|
|
113
|
+
|
|
114
|
+
return vec3(x, y, z);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
mat3 basisFromNormal(vec3 n) {
|
|
118
|
+
vec3 up = abs(n.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
|
|
119
|
+
vec3 tangent = normalize(cross(up, n));
|
|
120
|
+
vec3 bitangent = cross(n, tangent);
|
|
121
|
+
|
|
122
|
+
return mat3(tangent, bitangent, n);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
float blueNoiseDitherValue(vec2 pixel, float frame, vec2 axis, float phase) {
|
|
126
|
+
float scroll = 5.588238 * mod(frame, 512.0);
|
|
127
|
+
vec2 p = pixel + vec2(scroll);
|
|
128
|
+
vec2 rotated = vec2(
|
|
129
|
+
axis.x * p.x + axis.y * p.y,
|
|
130
|
+
-axis.y * p.x + axis.x * p.y
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
return fract(52.9829189 * fract(0.06711056 * rotated.x + 0.00583715 * rotated.y + phase));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
vec4 blueNoiseDither(vec2 pixel, float frame) {
|
|
137
|
+
vec4 value = vec4(
|
|
138
|
+
blueNoiseDitherValue(pixel, frame, vec2(0.9659258, 0.25881904), 0.0),
|
|
139
|
+
blueNoiseDitherValue(pixel, frame, vec2(0.70710677, 0.70710677), 0.17),
|
|
140
|
+
blueNoiseDitherValue(pixel, frame, vec2(0.25881904, 0.9659258), 0.37),
|
|
141
|
+
blueNoiseDitherValue(pixel, frame, vec2(1.0, 0.0), 0.61)
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
return value * 2.0 - 1.0;
|
|
145
|
+
}
|
|
146
|
+
`),t.outputs.add("fragGlobalIllumination","vec4",0),t.outputs.add("fragWeight","float",1),r.main.add(u.H`
|
|
147
|
+
float depth = depthFromTexture(depthMap, uv);
|
|
148
|
+
|
|
149
|
+
// Early out if depth is out of range, such as in the sky
|
|
150
|
+
if (depth >= 1.0 || depth <= 0.0) {
|
|
151
|
+
fragGlobalIllumination = vec4(0.0, 0.0, 0.0, 1.0);
|
|
152
|
+
fragWeight = 0.0;
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Get the normal of current fragment
|
|
157
|
+
ivec2 iuv = ivec2(uv * vec2(textureSize(normalMap, 0)));
|
|
158
|
+
vec4 normal4 = texelFetch(normalMap, iuv, 0);
|
|
159
|
+
if (normal4.a != 1.0) {
|
|
160
|
+
fragGlobalIllumination = vec4(0.0, 0.0, 0.0, 1.0);
|
|
161
|
+
fragWeight = 0.0;
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
vec3 normal = normalize(normal4.xyz * 2.0 - 1.0);
|
|
165
|
+
|
|
166
|
+
// Reconstruct view space position of current fragment
|
|
167
|
+
float currentPixelDepth = linearizeDepth(depth);
|
|
168
|
+
vec3 currentPixelPos = reconstructPosition(uv * vec2(textureSize(normalMap, 0)), currentPixelDepth);
|
|
169
|
+
vec4 viewPos = vec4(currentPixelPos, 1.0);
|
|
170
|
+
|
|
171
|
+
// Reproject current view position to last frame
|
|
172
|
+
vec4 reprojectedViewPos = reprojectionViewMatrix * viewPos;
|
|
173
|
+
vec4 reprojectedCoordinate = applyProjectionMat(proj, reprojectedViewPos.xyz);
|
|
174
|
+
|
|
175
|
+
// Read last frame reprojected depth and GI history
|
|
176
|
+
float lastFrameDepthViewPos = -linearDepthFromTextureLastFrame(lastFrameDepthTexture, reprojectedCoordinate.xy);
|
|
177
|
+
vec4 lastFrameGlobalIllumination = texture(lastFrameGlobalIlluminationTexture, reprojectedCoordinate.xy);
|
|
178
|
+
float historyOcclusionBlendWeight = texture(lastFrameGlobalIlluminationWeightTexture, reprojectedCoordinate.xy).r;
|
|
179
|
+
|
|
180
|
+
int steps;
|
|
181
|
+
float occlusionBlendWeight = 1.0;
|
|
182
|
+
float colorBlendWeight = 1.0;
|
|
183
|
+
float idleColorBlendWeight = computeIdleColorBlendWeight(accumulatedFrames);
|
|
184
|
+
float idleOcclusionBlendWeight = computeIdleOcclusionBlendWeight(accumulatedFrames);
|
|
185
|
+
float reprojectionDepthMismatch = abs((lastFrameDepthViewPos + reprojectedViewPos.z) / max(lastFrameDepthViewPos, reprojectedViewPos.z));
|
|
186
|
+
bool hasReprojectionMismatch = reprojectionDepthMismatch > ${u.H.float(.01)};
|
|
187
|
+
bool isScaledGlobalIllumination = scaleGlobalIllumination < 1.0;
|
|
188
|
+
bool isLowQualityEdgePixel = isScaledGlobalIllumination && isEdgeDepth(currentPixelDepth, uv);
|
|
189
|
+
bool resetColorHistory = false;
|
|
190
|
+
|
|
191
|
+
// Heuristic to determine blending weights and number of steps for occlusion and color
|
|
192
|
+
if (hasReprojectionMismatch) {
|
|
193
|
+
if (isLowQualityEdgePixel) {
|
|
194
|
+
steps = 1;
|
|
195
|
+
occlusionBlendWeight = ${u.H.float(.008)};
|
|
196
|
+
resetColorHistory = true;
|
|
197
|
+
} else {
|
|
198
|
+
steps = 6;
|
|
199
|
+
occlusionBlendWeight = 1.0;
|
|
200
|
+
resetColorHistory = true;
|
|
201
|
+
}
|
|
202
|
+
} else {
|
|
203
|
+
steps = 1;
|
|
204
|
+
if (historyOcclusionBlendWeight > ${u.H.float(.5)}) {
|
|
205
|
+
occlusionBlendWeight = ${u.H.float(.1)};
|
|
206
|
+
colorBlendWeight = ${u.H.float(.008)};
|
|
207
|
+
} else if (historyOcclusionBlendWeight > ${u.H.float(.02)}) {
|
|
208
|
+
occlusionBlendWeight = historyOcclusionBlendWeight - 0.05;
|
|
209
|
+
colorBlendWeight = ${u.H.float(.008)};
|
|
210
|
+
} else {
|
|
211
|
+
occlusionBlendWeight = isScaledGlobalIllumination ? ${u.H.float(.008)} : idleOcclusionBlendWeight;
|
|
212
|
+
colorBlendWeight = isScaledGlobalIllumination ? ${u.H.float(.002)} : idleColorBlendWeight;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
vec4 randomDirectionSample;
|
|
217
|
+
mat3 normalBasis = basisFromNormal(normal);
|
|
218
|
+
int temporalSampleStride = min(64 / steps, 6);
|
|
219
|
+
float temporalFrameOffset = mod(temporalSampleFrame, float(64 / steps));
|
|
220
|
+
|
|
221
|
+
// For each ray determine if it hits geometry and accumulate occlusion or color
|
|
222
|
+
float stepSize = 1.0 / float(steps);
|
|
223
|
+
for (int i = 0; i < steps; ++i) {
|
|
224
|
+
float sampleIndex = float(i * temporalSampleStride + int(temporalFrameOffset));
|
|
225
|
+
randomDirectionSample = blueNoiseDither(floor(gl_FragCoord.xy), sampleIndex);
|
|
226
|
+
vec2 hemisphereSample = randomDirectionSample.rg * 0.5 + 0.5;
|
|
227
|
+
float offsetSample = randomDirectionSample.a * 0.5 + 0.5;
|
|
228
|
+
vec3 rayDirection = normalBasis * sampleCosineHemisphere(hemisphereSample);
|
|
229
|
+
float rayMarchScreenReach = rayMarchScreenReachFromWorldReach(viewPos.xyz, rayDirection, rayMarchWorldReach);
|
|
230
|
+
rayMarchScreenReach = clamp(rayMarchScreenReach, rayMarchMinReach, rayMarchMaxReach);
|
|
231
|
+
vec3 hit = screenSpaceIntersectionWithLimits(
|
|
232
|
+
rayDirection,
|
|
233
|
+
viewPos.xyz,
|
|
234
|
+
normalize(viewPos.xyz),
|
|
235
|
+
normal,
|
|
236
|
+
offsetSample,
|
|
237
|
+
rayMarchScreenReach,
|
|
238
|
+
rayMarchMaxSteps
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
if (hit.z > 0.0) {
|
|
242
|
+
${(0,u.If)(e.hasColor,u.H`
|
|
243
|
+
// Emission and color bleed - Reproject the current receiver and sampled hit to estimate bounced color
|
|
244
|
+
vec3 receiverColor = texture(lastFrameColorTexture, reprojectedCoordinate.xy).rgb;
|
|
245
|
+
|
|
246
|
+
vec2 hitReprojectedCoordinate = reprojectionCoordinate(hit);
|
|
247
|
+
vec3 sourceColor = texture(lastFrameColorTexture, hitReprojectedCoordinate).rgb;
|
|
248
|
+
vec3 sourceColorLinear = linearizeGamma(sourceColor);
|
|
249
|
+
vec3 sourceEmission = ${(0,u.If)(e.hasEmission,"texture(lastFrameEmissionTexture, hitReprojectedCoordinate).xyz","vec3(0.0)")};
|
|
250
|
+
|
|
251
|
+
float emissionWeight = mix(
|
|
252
|
+
rayMarchMinReachEmissionWeight,
|
|
253
|
+
rayMarchMaxReachEmissionWeight,
|
|
254
|
+
(rayMarchScreenReach - rayMarchMinReach) / max(rayMarchMaxReach - rayMarchMinReach, 0.00001)
|
|
255
|
+
);
|
|
256
|
+
fragGlobalIllumination.rgb += ((sourceColorLinear * colorBleedWeight) + sourceEmission * emissionWeight) * stepSize;
|
|
257
|
+
`)}
|
|
258
|
+
} else {
|
|
259
|
+
// Occlusion - heuristic modulating sky intensity based on angle to main light
|
|
260
|
+
vec4 viewMainLightDirection = view * vec4(mainLightDirection, 0.0);
|
|
261
|
+
float skyModulation = pow(max(dot(rayDirection, viewMainLightDirection.xyz), 0.0), 3.0) * 5.5;
|
|
262
|
+
float skyFacingWeight = clamp(3.5 * dot(viewMainLightDirection.xyz, normal), 0.0, 1.0);
|
|
263
|
+
skyModulation = mix(1.0, skyModulation * 0.2 + 0.8, skyFacingWeight);
|
|
264
|
+
fragGlobalIllumination.a += skyModulation * stepSize;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Rendering trick add noise to reduce accumulation artifacts
|
|
269
|
+
float accumulationDither = occlusionBlendWeight < 1.0
|
|
270
|
+
? randomDirectionSample.b * ${u.H.float(.0039)}
|
|
271
|
+
: 0.0;
|
|
272
|
+
|
|
273
|
+
${(0,u.If)(e.hasColor,u.H`
|
|
274
|
+
// Accumulate color
|
|
275
|
+
vec3 lastFrameColor = lastFrameGlobalIllumination.rgb;
|
|
276
|
+
float colorDitherScale = isScaledGlobalIllumination ? ${u.H.float(.25)} : 1.0;
|
|
277
|
+
fragGlobalIllumination.rgb = resetColorHistory
|
|
278
|
+
? vec3(0.0)
|
|
279
|
+
: mix(lastFrameColor + accumulationDither * colorDitherScale, fragGlobalIllumination.rgb, colorBlendWeight);
|
|
280
|
+
`,u.H`
|
|
281
|
+
fragGlobalIllumination.rgb = vec3(0.0);
|
|
282
|
+
`)}
|
|
283
|
+
fragGlobalIllumination.rgb = quantizeGlobalIlluminationColor(fragGlobalIllumination.rgb);
|
|
284
|
+
|
|
285
|
+
// Accumulate occlusion
|
|
286
|
+
fragGlobalIllumination.a = mix(lastFrameGlobalIllumination.a + accumulationDither, fragGlobalIllumination.a, occlusionBlendWeight);
|
|
287
|
+
|
|
288
|
+
fragWeight = occlusionBlendWeight;
|
|
289
|
+
`),t}const b=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:g,build:x,defaultColorBleedWeight:.15,defaultRayMarchMaxReach:.5,defaultRayMarchMaxReachEmissionWeight:1,defaultRayMarchMaxSteps:16,defaultRayMarchMinReach:.15,defaultRayMarchMinReachEmissionWeight:1,defaultRayMarchWorldReach:25},Symbol.toStringTag,{value:"Module"}));r.d(t,["a",0,b])},52516(e,t,r){r.d(t,{G:()=>b,b:()=>y});var o=r(48163),a=r(82048),n=r(52540),i=r(72885),s=r(34845),l=r(32976),c=r(68259),u=r(20304),d=r(31821),h=r(15976),m=r(63761),f=r(94046),p=r(58243),v=r(66211),g=r(65786),x=r(14113);class b extends g.Y{constructor(){super(...arguments),this.blurSize=(0,o.vt)()}}function y(){const e=new x.N5,t=e.fragment;e.include(a.c),e.include(s.Ir),e.include(i.Q);return t.include(n.E),t.include(p.t,w),t.include(f.R),t.uniforms.add(new l.o("hasEmission",e=>e.hasEmission),new m.N("depthMap",e=>e.depthTexture),new m.N("normalMap",e=>e.normalTexture),new h.o("globalIlluminationTexture",e=>e.texture),new h.o("globalIlluminationWeightTexture",e=>e.weightTexture),new c.t("blurSize",e=>e.blurSize),new u.m("scaleGlobalIllumination",e=>e.scaleGlobalIllumination),new u.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(d.H`
|
|
290
|
+
void accumulateBlurSample(
|
|
291
|
+
vec2 sampleUv,
|
|
292
|
+
float sampleOffset,
|
|
293
|
+
float centerDepth,
|
|
294
|
+
vec3 centerNormal,
|
|
295
|
+
float depthSharpness,
|
|
296
|
+
bool skipOcclusionBlur,
|
|
297
|
+
inout float emissionWeightSum,
|
|
298
|
+
inout vec3 emissionSum,
|
|
299
|
+
inout float occlusionWeightSum,
|
|
300
|
+
inout float occlusionSum,
|
|
301
|
+
float centerOcclusionBlendWeight
|
|
302
|
+
) {
|
|
303
|
+
vec4 sampleGlobalIllumination = texture(globalIlluminationTexture, sampleUv);
|
|
304
|
+
vec3 sampleNormal = texture(normalMap, sampleUv).rgb;
|
|
305
|
+
float sampleDepth = linearDepthFromTexture(depthMap, sampleUv);
|
|
306
|
+
|
|
307
|
+
float depthDelta = sampleDepth - centerDepth;
|
|
308
|
+
bool isScaledGlobalIllumination = scaleGlobalIllumination < 1.0;
|
|
309
|
+
float normalSimilarityWeight = globalIlluminationNormalSimilarityWeight(sampleNormal, centerNormal);
|
|
310
|
+
float depthNormalCorrection = globalIlluminationDepthNormalCorrection(sampleNormal);
|
|
311
|
+
vec3 emission = sampleGlobalIllumination.rgb;
|
|
312
|
+
float emissionSpatialWeightMultiplier = isScaledGlobalIllumination ? ${d.H.float(400)} : 1.0;
|
|
313
|
+
|
|
314
|
+
float emissionWeight = exp(
|
|
315
|
+
-sampleOffset * sampleOffset * ${d.H.float(1/24.5)} * ${d.H.float(.1)} * emissionSpatialWeightMultiplier
|
|
316
|
+
- depthDelta * depthDelta * depthSharpness * depthNormalCorrection
|
|
317
|
+
);
|
|
318
|
+
emissionWeight *= normalSimilarityWeight;
|
|
319
|
+
emissionWeightSum += emissionWeight;
|
|
320
|
+
emissionSum += emissionWeight * emission;
|
|
321
|
+
|
|
322
|
+
if (skipOcclusionBlur) {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
float occlusionSpatialKernelScale = centerOcclusionBlendWeight > ${d.H.float(.03)}
|
|
327
|
+
? ${d.H.float(.08)}
|
|
328
|
+
: ${d.H.float(1.5)};
|
|
329
|
+
float occlusionWeight = exp(-sampleOffset * sampleOffset * occlusionSpatialKernelScale - depthDelta * depthDelta * depthSharpness);
|
|
330
|
+
occlusionWeight *= normalSimilarityWeight;
|
|
331
|
+
occlusionWeightSum += occlusionWeight;
|
|
332
|
+
occlusionSum += occlusionWeight * sampleGlobalIllumination.a;
|
|
333
|
+
}
|
|
334
|
+
`),t.main.add(d.H`
|
|
335
|
+
vec3 emissionSum = vec3(0.0);
|
|
336
|
+
float emissionWeightSum = 0.0;
|
|
337
|
+
|
|
338
|
+
vec4 centerGlobalIllumination = texture(globalIlluminationTexture, uv);
|
|
339
|
+
float centerOcclusionBlendWeight = texture(globalIlluminationWeightTexture, uv).r;
|
|
340
|
+
bool isScaledGlobalIllumination = scaleGlobalIllumination < 1.0;
|
|
341
|
+
bool shouldReuseCenterOcclusion = isScaledGlobalIllumination && centerOcclusionBlendWeight <= ${d.H.float(.03)};
|
|
342
|
+
bool shouldSkipLowQualityBlur = !hasEmission && shouldReuseCenterOcclusion;
|
|
343
|
+
if (shouldSkipLowQualityBlur) {
|
|
344
|
+
fragColor = vec4(
|
|
345
|
+
quantizeGlobalIlluminationColor(centerGlobalIllumination.rgb),
|
|
346
|
+
centerGlobalIllumination.a
|
|
347
|
+
);
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
float centerDepth = linearDepthFromTexture(depthMap, uv);
|
|
352
|
+
vec3 centerNormal = texture(normalMap, uv).rgb;
|
|
353
|
+
float occlusionSum = 0.0;
|
|
354
|
+
float occlusionWeightSum = 0.0;
|
|
355
|
+
|
|
356
|
+
float depthSharpness = globalIlluminationDepthSharpness(projScale, centerDepth);
|
|
357
|
+
for (int sampleOffset = -${d.H.int(4)}; sampleOffset <= ${d.H.int(4)}; ++sampleOffset) {
|
|
358
|
+
float sampleOffsetFloat = float(sampleOffset);
|
|
359
|
+
vec2 sampleUv = uv + sampleOffsetFloat * blurSize;
|
|
360
|
+
accumulateBlurSample(
|
|
361
|
+
sampleUv,
|
|
362
|
+
sampleOffsetFloat,
|
|
363
|
+
centerDepth,
|
|
364
|
+
centerNormal,
|
|
365
|
+
depthSharpness,
|
|
366
|
+
shouldReuseCenterOcclusion,
|
|
367
|
+
emissionWeightSum,
|
|
368
|
+
emissionSum,
|
|
369
|
+
occlusionWeightSum,
|
|
370
|
+
occlusionSum,
|
|
371
|
+
centerOcclusionBlendWeight
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
float occlusion = shouldReuseCenterOcclusion ? centerGlobalIllumination.a : occlusionSum / occlusionWeightSum;
|
|
376
|
+
vec3 blurredEmission = (emissionSum / emissionWeightSum).rgb;
|
|
377
|
+
|
|
378
|
+
// Dither the blurred color to reduce quantization banding and wrong color accumulation.
|
|
379
|
+
float dither = ditherNoise(vec4(blurredEmission, occlusion)) - ${d.H.float(1/32768)};
|
|
380
|
+
blurredEmission += isScaledGlobalIllumination ? ${d.H.float(.85)} * dither : dither;
|
|
381
|
+
|
|
382
|
+
fragColor = vec4(quantizeGlobalIlluminationColor(blurredEmission), occlusion);
|
|
383
|
+
`),e}const w=new v.T;w.useFloatBlend=!1;const M=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:b,build:y},Symbol.toStringTag,{value:"Module"}));r.d(t,["a",0,M])},50704(e,t,r){r.d(t,{G:()=>f,b:()=>p});var o=r(82048),a=r(52540),n=r(72885),i=r(34845),s=r(20304),l=r(31821),c=r(15976),u=r(63761),d=r(94046),h=r(65786),m=r(14113);class f extends h.Y{}function p(){const e=new m.N5,t=e.fragment;return e.include(o.c),e.include(i.Ir),e.include(n.Q),t.include(a.E),t.include(d.R),t.uniforms.add(new u.N("depthMap",e=>e.depthTexture),new u.N("normalMap",e=>e.normalTexture),new c.o("tex",e=>e.colorTexture),new c.o("globalIlluminationWeightTexture",e=>e.weightTexture),new s.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(l.H`
|
|
384
|
+
float computeDepthWeight(float sampleDepth, float centerDepth, float depthSharpness) {
|
|
385
|
+
float depthDelta = abs(sampleDepth - centerDepth);
|
|
386
|
+
return exp(-0.08 - depthDelta * depthDelta * depthSharpness);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
vec3 normalFromTexture(sampler2D normalTexture, vec2 uv) {
|
|
390
|
+
ivec2 normalTextureSize = textureSize(normalTexture, 0);
|
|
391
|
+
ivec2 normalTexel = clamp(ivec2(uv * vec2(normalTextureSize)), ivec2(0), normalTextureSize - ivec2(1));
|
|
392
|
+
return texelFetch(normalTexture, normalTexel, 0).xyz;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
void sampleJointBilateralUpscale(vec2 sampleUv, out vec4 upscaledColor, out float upscaledWeight) {
|
|
396
|
+
float centerDepth = linearDepthFromTexture(depthMap, sampleUv);
|
|
397
|
+
vec3 centerNormal = normalFromTexture(normalMap, sampleUv);
|
|
398
|
+
float depthSharpness = ${l.H.float(100)} * globalIlluminationDepthSharpness(projScale, centerDepth, centerNormal);
|
|
399
|
+
|
|
400
|
+
vec2 lowResTextureSize = vec2(textureSize(tex, 0));
|
|
401
|
+
vec2 texelPosition = sampleUv * lowResTextureSize - 0.5;
|
|
402
|
+
vec2 texelBase = floor(texelPosition);
|
|
403
|
+
vec2 bilinearWeightsFraction = fract(texelPosition);
|
|
404
|
+
|
|
405
|
+
vec2 uv00 = (texelBase + vec2(0.5, 0.5)) / lowResTextureSize;
|
|
406
|
+
vec2 uv10 = (texelBase + vec2(1.5, 0.5)) / lowResTextureSize;
|
|
407
|
+
vec2 uv01 = (texelBase + vec2(0.5, 1.5)) / lowResTextureSize;
|
|
408
|
+
vec2 uv11 = (texelBase + vec2(1.5, 1.5)) / lowResTextureSize;
|
|
409
|
+
|
|
410
|
+
vec4 color00 = texture(tex, uv00);
|
|
411
|
+
vec4 color10 = texture(tex, uv10);
|
|
412
|
+
vec4 color01 = texture(tex, uv01);
|
|
413
|
+
vec4 color11 = texture(tex, uv11);
|
|
414
|
+
float weight00 = texture(globalIlluminationWeightTexture, uv00).r;
|
|
415
|
+
float weight10 = texture(globalIlluminationWeightTexture, uv10).r;
|
|
416
|
+
float weight01 = texture(globalIlluminationWeightTexture, uv01).r;
|
|
417
|
+
float weight11 = texture(globalIlluminationWeightTexture, uv11).r;
|
|
418
|
+
|
|
419
|
+
float depth00 = linearDepthFromTexture(depthMap, uv00);
|
|
420
|
+
float depth10 = linearDepthFromTexture(depthMap, uv10);
|
|
421
|
+
float depth01 = linearDepthFromTexture(depthMap, uv01);
|
|
422
|
+
float depth11 = linearDepthFromTexture(depthMap, uv11);
|
|
423
|
+
|
|
424
|
+
vec3 normal00 = normalFromTexture(normalMap, uv00);
|
|
425
|
+
vec3 normal10 = normalFromTexture(normalMap, uv10);
|
|
426
|
+
vec3 normal01 = normalFromTexture(normalMap, uv01);
|
|
427
|
+
vec3 normal11 = normalFromTexture(normalMap, uv11);
|
|
428
|
+
|
|
429
|
+
float bilinearWeight00 = (1.0 - bilinearWeightsFraction.x) * (1.0 - bilinearWeightsFraction.y);
|
|
430
|
+
float bilinearWeight10 = bilinearWeightsFraction.x * (1.0 - bilinearWeightsFraction.y);
|
|
431
|
+
float bilinearWeight01 = (1.0 - bilinearWeightsFraction.x) * bilinearWeightsFraction.y;
|
|
432
|
+
float bilinearWeight11 = bilinearWeightsFraction.x * bilinearWeightsFraction.y;
|
|
433
|
+
|
|
434
|
+
float jointBilateralWeight00 = bilinearWeight00 * computeDepthWeight(depth00, centerDepth, depthSharpness) * globalIlluminationNormalSimilarityWeight(normal00, centerNormal);
|
|
435
|
+
float jointBilateralWeight10 = bilinearWeight10 * computeDepthWeight(depth10, centerDepth, depthSharpness) * globalIlluminationNormalSimilarityWeight(normal10, centerNormal);
|
|
436
|
+
float jointBilateralWeight01 = bilinearWeight01 * computeDepthWeight(depth01, centerDepth, depthSharpness) * globalIlluminationNormalSimilarityWeight(normal01, centerNormal);
|
|
437
|
+
float jointBilateralWeight11 = bilinearWeight11 * computeDepthWeight(depth11, centerDepth, depthSharpness) * globalIlluminationNormalSimilarityWeight(normal11, centerNormal);
|
|
438
|
+
float jointBilateralWeightSum = jointBilateralWeight00 + jointBilateralWeight10 + jointBilateralWeight01 + jointBilateralWeight11;
|
|
439
|
+
|
|
440
|
+
if (jointBilateralWeightSum < 0.0001) {
|
|
441
|
+
// Fall back to the nearest low-resolution texel when all bilateral weights collapse.
|
|
442
|
+
vec2 nearestUv = (floor(texelPosition + 0.5) + vec2(0.5)) / lowResTextureSize;
|
|
443
|
+
upscaledColor = texture(tex, nearestUv);
|
|
444
|
+
upscaledWeight = texture(globalIlluminationWeightTexture, nearestUv).r;
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
upscaledColor = (
|
|
449
|
+
color00 * jointBilateralWeight00 +
|
|
450
|
+
color10 * jointBilateralWeight10 +
|
|
451
|
+
color01 * jointBilateralWeight01 +
|
|
452
|
+
color11 * jointBilateralWeight11
|
|
453
|
+
) / jointBilateralWeightSum;
|
|
454
|
+
|
|
455
|
+
upscaledWeight = (
|
|
456
|
+
weight00 * jointBilateralWeight00 +
|
|
457
|
+
weight10 * jointBilateralWeight10 +
|
|
458
|
+
weight01 * jointBilateralWeight01 +
|
|
459
|
+
weight11 * jointBilateralWeight11
|
|
460
|
+
) / jointBilateralWeightSum;
|
|
461
|
+
}
|
|
462
|
+
`),e.outputs.add("fragColor","vec4",0),e.outputs.add("fragWeight","float",1),t.main.add(l.H`sampleJointBilateralUpscale(uv, fragColor, fragWeight);
|
|
463
|
+
fragColor.rgb = quantizeGlobalIlluminationColor(fragColor.rgb);`),e}const v=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationUpscaleDrawParameters:f,build:p},Symbol.toStringTag,{value:"Module"}));r.d(t,["a",0,v])},57323(e,t,r){r.d(t,{b:()=>H});var o=r(32680),a=r(49255),n=r(34711),i=r(76597),s=r(24321),l=r(2585),c=r(43519),u=r(96336),d=r(39014),h=r(53466),m=r(92700),f=r(35640),p=r(40261),v=r(72233),g=r(32971),x=r(98619),b=r(22393),y=r(59469),w=r(32482),M=r(51406),S=r(43259),T=r(58614),C=r(27950),_=r(77949),I=r(33079),P=r(71988),z=r(20304),R=r(31821),D=r(63761),F=r(27832),O=r(43616),j=r(26934),E=r(47630),B=r(14113);function H(e){const t=new B.N5,{attributes:r,vertex:H,fragment:N,varyings:W}=t,{output:A,offsetBackfaces:G,pbrMode:L,snowCover:V,spherical:k}=e,U=1===L||2===L;if((0,_.NB)(H,e),r.add("position","vec3"),H.inputs.add("position",()=>"position"),W.add("vpos","vec3",{invariant:!0}),t.include(S.A,e),t.include(l.B,e),t.include(f.Ge,e),t.include(M.q2,e),!(0,a._o)(A))return t.include(p.E,e),t;t.include(M.MU,e),(0,_.yu)(t.vertex,e),t.include(u.Y,e),t.include(i.d),G&&t.include(o.M),W.add("vNormalWorld","vec3"),W.add("localvpos","vec3",{invariant:!0}),t.include(h.U,e),t.include(d.K,e),t.include(s.v,e),t.include(m.c,e),H.include(c.WD),H.include(c.oF),H.uniforms.add(new P.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),W.add("vcolorExt","vec4"),t.include(e.instancedDoublePrecision?w.QH:w.LA,e),H.include(j.Q),H.main.add(R.H`
|
|
464
|
+
forwardVertexColor();
|
|
465
|
+
|
|
466
|
+
MaskedColor maskedColorExt =
|
|
467
|
+
applySymbolColor(applyVVColor(applyInstanceColor(createMaskedFromNaNColor(externalColor))));
|
|
468
|
+
|
|
469
|
+
vcolorExt = maskedColorExt.color;
|
|
470
|
+
forwardColorMixMode(maskedColorExt.mask);
|
|
471
|
+
|
|
472
|
+
bool alphaCut = opacityMixMode != ${R.H.int(O.Um.ignore)} && vcolorExt.a < alphaCutoff;
|
|
473
|
+
vpos = getVertexInLocalOriginSpace();
|
|
474
|
+
|
|
475
|
+
localvpos = vpos - view[3].xyz;
|
|
476
|
+
vpos = subtractOrigin(vpos);
|
|
477
|
+
vNormalWorld = dpNormal(vvLocalNormal(normalModel()));
|
|
478
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
479
|
+
vec4 basePosition = transformPosition(proj, view, vpos);
|
|
480
|
+
|
|
481
|
+
forwardTextureCoordinates();
|
|
482
|
+
forwardColorUV();
|
|
483
|
+
forwardEmissiveUV();
|
|
484
|
+
forwardLinearDepthToReadShadowMap();
|
|
485
|
+
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
486
|
+
${(0,R.If)(G,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
487
|
+
`);const{hasColorTexture:$,hasColorTextureTransform:q}=e;return N.include(g.kA,e),N.include(v.n,e),t.include(T.SS,e),N.include(n.HQ,e),t.include(E.D,e),(0,_.yu)(N,e),(0,x.Gc)(N),(0,g.a8)(N),(0,g.eU)(N),N.uniforms.add(H.uniforms.get("localOrigin"),H.uniforms.get("view"),new I.t("ambient",e=>e.ambient),new I.t("diffuse",e=>e.diffuse),new z.m("opacity",e=>e.opacity),new z.m("layerOpacity",e=>e.layerOpacity)),$&&N.uniforms.add(new D.N("tex",e=>e.texture)),t.include(y._,e),N.include(b.c,e),N.include(C.N),N.include(F.b,e),(0,x.O4)(N),N.main.add(R.H`
|
|
488
|
+
discardBySlice(vpos);
|
|
489
|
+
vec4 texColor = ${$?`texture(tex, ${q?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
490
|
+
${(0,R.If)($,`${(0,R.If)(e.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
491
|
+
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
492
|
+
applyPBRFactors();
|
|
493
|
+
float ssao = evaluateAmbientOcclusionInverse();
|
|
494
|
+
ssao *= getBakedOcclusion();
|
|
495
|
+
|
|
496
|
+
float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
|
|
497
|
+
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
498
|
+
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
499
|
+
vec3 matColor = max(ambient, diffuse);
|
|
500
|
+
${e.hasVertexColors?R.H`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
501
|
+
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, opacityMixMode);`:R.H`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
502
|
+
float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, opacityMixMode);`}
|
|
503
|
+
|
|
504
|
+
vec3 shadingNormal = normalize(vNormalWorld);
|
|
505
|
+
vec3 groundNormal = ${k?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};
|
|
506
|
+
|
|
507
|
+
${(0,R.If)(V,"vec3 faceNormal = screenDerivativeNormal(vpos);\n float snow = getRealisticTreeSnow(faceNormal, shadingNormal, groundNormal);\n albedo = mix(albedo, vec3(1), snow);")}
|
|
508
|
+
|
|
509
|
+
${R.H`albedo *= 1.2;
|
|
510
|
+
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
511
|
+
float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
|
|
512
|
+
float transmittance = 1.0 - clamp(dot(viewForward, shadingNormal), 0.0, 1.0);
|
|
513
|
+
float treeRadialFalloff = vColor.r;
|
|
514
|
+
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
515
|
+
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
516
|
+
|
|
517
|
+
${U?R.H`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
518
|
+
${(0,R.If)(V,"mrr = applySnowToMRR(mrr, snow);")}
|
|
519
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, groundNormal, mrr, additionalAmbientIrradiance);`:R.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
520
|
+
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
521
|
+
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,R.If)(V,", 1.0")});`),t}const N=Object.freeze(Object.defineProperty({__proto__:null,build:H},Symbol.toStringTag,{value:"Module"}));r.d(t,["R",0,N])},15581(e,t,r){r.d(t,{b:()=>v,g:()=>g});var o=r(37585),a=r(48163),n=r(82048),i=r(52540),s=r(65261),l=r(34845),c=r(77108),u=r(47286),d=r(33094),h=r(20304),m=r(31821),f=r(63761),p=r(14113);function v(){const e=new p.N5,t=e.fragment;return e.include(n.c),e.include(l.Ir),t.include(i.E),t.include(s.C),t.uniforms.add(new d.U("radius",e=>g(e.camera))).code.add(m.H`vec3 sphere[16] = vec3[16](
|
|
522
|
+
vec3(0.186937, 0.0, 0.0),
|
|
523
|
+
vec3(0.700542, 0.0, 0.0),
|
|
524
|
+
vec3(-0.864858, -0.481795, -0.111713),
|
|
525
|
+
vec3(-0.624773, 0.102853, -0.730153),
|
|
526
|
+
vec3(-0.387172, 0.260319, 0.007229),
|
|
527
|
+
vec3(-0.222367, -0.642631, -0.707697),
|
|
528
|
+
vec3(-0.01336, -0.014956, 0.169662),
|
|
529
|
+
vec3(0.122575, 0.1544, -0.456944),
|
|
530
|
+
vec3(-0.177141, 0.85997, -0.42346),
|
|
531
|
+
vec3(-0.131631, 0.814545, 0.524355),
|
|
532
|
+
vec3(-0.779469, 0.007991, 0.624833),
|
|
533
|
+
vec3(0.308092, 0.209288,0.35969),
|
|
534
|
+
vec3(0.359331, -0.184533, -0.377458),
|
|
535
|
+
vec3(0.192633, -0.482999, -0.065284),
|
|
536
|
+
vec3(0.233538, 0.293706, -0.055139),
|
|
537
|
+
vec3(0.417709, -0.386701, 0.442449)
|
|
538
|
+
);
|
|
539
|
+
float fallOffFunction(float vv, float vn, float bias) {
|
|
540
|
+
float f = max(radius * radius - vv, 0.0);
|
|
541
|
+
return f * f * f * max(vn - bias, 0.0);
|
|
542
|
+
}`),t.code.add(m.H`float aoValueFromPositionsAndNormal(vec3 C, vec3 n_C, vec3 Q) {
|
|
543
|
+
vec3 v = Q - C;
|
|
544
|
+
float vv = dot(v, v);
|
|
545
|
+
float vn = dot(normalize(v), n_C);
|
|
546
|
+
return fallOffFunction(vv, vn, 0.1);
|
|
547
|
+
}`),e.outputs.add("fragOcclusion","float"),t.uniforms.add(new f.N("normalMap",e=>e.normalTexture),new f.N("depthMap",e=>e.depthTexture),new h.m("projScale",e=>e.projScale),new f.N("rnm",e=>e.noiseTexture),new u.G("rnmScale",(e,t)=>(0,o.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,o.hZ)(x,e.camera.fullWidth,e.camera.fullHeight))).main.add(m.H`
|
|
548
|
+
float depth = depthFromTexture(depthMap, uv);
|
|
549
|
+
|
|
550
|
+
// Early out if depth is out of range, such as in the sky
|
|
551
|
+
if (depth >= 1.0 || depth <= 0.0) {
|
|
552
|
+
fragOcclusion = 1.0;
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// get the normal of current fragment
|
|
557
|
+
ivec2 iuv = ivec2(uv * vec2(textureSize(normalMap, 0)));
|
|
558
|
+
vec4 norm4 = texelFetch(normalMap, iuv, 0);
|
|
559
|
+
if(norm4.a != 1.0) {
|
|
560
|
+
fragOcclusion = 1.0;
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
vec3 norm = normalize(norm4.xyz * 2.0 - 1.0);
|
|
564
|
+
|
|
565
|
+
float currentPixelDepth = linearizeDepth(depth);
|
|
566
|
+
vec3 currentPixelPos = reconstructPosition(gl_FragCoord.xy, currentPixelDepth);
|
|
567
|
+
|
|
568
|
+
float sum = 0.0;
|
|
569
|
+
vec3 tapPixelPos;
|
|
570
|
+
|
|
571
|
+
vec3 fres = normalize(2.0 * texture(rnm, uv * rnmScale).xyz - 1.0);
|
|
572
|
+
|
|
573
|
+
// note: the factor 2.0 should not be necessary, but makes ssao much nicer.
|
|
574
|
+
// bug or deviation from CE somewhere else?
|
|
575
|
+
float ps = projScale / (2.0 * currentPixelPos.z * zScale.x + zScale.y);
|
|
576
|
+
|
|
577
|
+
for(int i = 0; i < ${m.H.int(16)}; ++i) {
|
|
578
|
+
vec2 unitOffset = reflect(sphere[i], fres).xy;
|
|
579
|
+
vec2 offset = vec2(-unitOffset * radius * ps);
|
|
580
|
+
|
|
581
|
+
// don't use current or very nearby samples
|
|
582
|
+
if( abs(offset.x) < 2.0 || abs(offset.y) < 2.0){
|
|
583
|
+
continue;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
vec2 tc = vec2(gl_FragCoord.xy + offset);
|
|
587
|
+
if (tc.x < 0.0 || tc.y < 0.0 || tc.x > screenSize.x || tc.y > screenSize.y) continue;
|
|
588
|
+
vec2 tcTap = tc / screenSize;
|
|
589
|
+
float occluderFragmentDepth = linearDepthFromTexture(depthMap, tcTap);
|
|
590
|
+
|
|
591
|
+
tapPixelPos = reconstructPosition(tc, occluderFragmentDepth);
|
|
592
|
+
|
|
593
|
+
sum += aoValueFromPositionsAndNormal(currentPixelPos, norm, tapPixelPos);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
// output the result
|
|
597
|
+
float A = max(1.0 - sum * intensity / float(${m.H.int(16)}), 0.0);
|
|
598
|
+
|
|
599
|
+
// Anti-tone map to reduce contrast and drag dark region farther: (x^0.2 + 1.2 * x^4) / 2.2
|
|
600
|
+
A = (pow(A, 0.2) + 1.2 * pow(A, 4.0)) * INV_GAMMA;
|
|
601
|
+
|
|
602
|
+
fragOcclusion = A;
|
|
603
|
+
`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const x=(0,a.vt)(),b=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,b])},95774(e,t,r){r.d(t,{b:()=>d});var o=r(82048),a=r(52540),n=r(68259),i=r(20304),s=r(31821),l=r(15976),c=r(63761),u=r(14113);function d(){const e=new u.N5,t=e.fragment;return e.include(o.c),t.include(a.E),t.uniforms.add(new c.N("depthMap",e=>e.depthTexture),new l.o("tex",e=>e.colorTexture),new n.t("blurSize",e=>e.blurSize),new i.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(s.H`
|
|
604
|
+
void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
|
|
605
|
+
float c = texture(tex, uv).r;
|
|
606
|
+
float d = linearDepthFromTexture(depthMap, uv);
|
|
607
|
+
|
|
608
|
+
float ddiff = d - center_d;
|
|
609
|
+
|
|
610
|
+
float w = exp(-r * r * ${s.H.float(.08)} - ddiff * ddiff * sharpness);
|
|
611
|
+
wTotal += w;
|
|
612
|
+
bTotal += w * c;
|
|
613
|
+
}
|
|
614
|
+
`),e.outputs.add("fragBlur","float"),t.main.add(s.H`
|
|
615
|
+
float b = 0.0;
|
|
616
|
+
float w_total = 0.0;
|
|
617
|
+
|
|
618
|
+
float center_d = linearDepthFromTexture(depthMap, uv);
|
|
619
|
+
|
|
620
|
+
float sharpness = -0.05 * projScale / center_d;
|
|
621
|
+
for (int r = -${s.H.int(4)}; r <= ${s.H.int(4)}; ++r) {
|
|
622
|
+
float rf = float(r);
|
|
623
|
+
vec2 uvOffset = uv + rf * blurSize;
|
|
624
|
+
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
625
|
+
}
|
|
626
|
+
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:()=>n,f:()=>i,n:()=>a});var o=r(34275);function a(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,a=r){const n=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=a;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=a;else for(let o=0;o<n;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=a}function i(e,t,r,o){const a=e.typedBuffer,n=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<i;++e)a[s]=t,a[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:n,normalizeIntegerBufferView:a},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>n,b:()=>s,c:()=>a,d:()=>i,e:()=>h,f:()=>u,l:()=>c,n:()=>m,t:()=>d}),r(44208);var o=r(72727);function a(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,n=a){const i=(0,o.k)(e.length,a,3),s=(0,o.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[4],m=r[5],f=r[6],p=r[8],v=r[9],g=r[10],x=r[12],b=r[13],y=r[14];let w=0,M=0;for(let r=0;r<l;r++){const r=t[w],o=t[w+1],i=t[w+2];e[M]=c*r+h*o+p*i+x,e[M+1]=u*r+m*o+v*i+b,e[M+2]=d*r+f*o+g*i+y,w+=n,M+=a}return e}function i(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,a=3,n=a){const i=(0,o.k)(e.length,a,3),s=(0,o.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[3],m=r[4],f=r[5],p=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],o=t[x+1],i=t[x+2];e[b]=c*r+h*o+p*i,e[b+1]=u*r+m*o+v*i,e[b+2]=d*r+f*o+g*i,x+=n,b+=a}}function l(e,t,r,o=3,a=o){const n=Math.min(e.length/o,t.length/a);let i=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=a,s+=o;return e}function c(e,t,r,o){u(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,o,a=3,n=a){const i=Math.min(e.length/a,t.length/n);let s=0,l=0;const c=1/2.2;for(let u=0;u<i;u++)e[l]=o*(r*t[s])**c,e[l+1]=o*(r*t[s+1])**c,e[l+2]=o*(r*t[s+2])**c,s+=n,l+=a}function d(e,t,r,a=3,n=a){const i=(0,o.k)(e.length,a,3),s=(0,o.k)(t.length,n,3),l=Math.min(i,s);let c=0,u=0;for(let o=0;o<l;o++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=n,u+=a;return e}function h(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,o=r){const a=Math.min(e.length/r,t.length/o);let n=0,i=0;for(let s=0;s<a;s++){const a=t[n],s=t[n+1],l=t[n+2],c=a*a+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*a,e[i+1]=t*s,e[i+2]=t*l}n+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:m,normalizeView:h,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)a[c]=i[l]>>r,a[c+1]=i[l+1]>>r,a[c+2]=i[l+2]>>r,l+=s,c+=n},transformMat3:s,transformMat3View:i,transformMat4:n,transformMat4View:a,translate:d},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>a});var o=r(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(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);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,o,a=0,n=!1){return(o-=a)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),n&&o===r&&(o=t),o+a}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360));r.d(t,["ie",0,l,"uC",0,s])},46140(e,t,r){r.d(t,{A:()=>a});var o=r(49186);class a{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){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new a(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!i.test(n))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(n,10);return new a(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function a(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>a,b5:()=>o});const n=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>a,vt:()=>o});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:a,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["zK",0,n])},88340(e,t,r){function o(){return new Float32Array(2)}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function n(){return o()}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{fA:()=>a,vt:()=>o});const c=n(),u=i(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:a,ones:i,unitX:s,unitY:l,zeros:n},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,u,"uY",0,c])},48163(e,t,r){function o(){return[0,0]}function a(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function i(){return n(1,1)}function s(){return n(-1,-1)}function l(){return n(1,0)}function c(){return n(0,1)}r.d(t,{fA:()=>n,o8:()=>a,vt:()=>o});const u=i(),d=s(),h=l(),m=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:d,ONES:u,UNIT_X:h,UNIT_Y:m,ZEROS:[0,0],clone:a,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,negativeOnes:s,ones:i,unitX:l,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["IA",0,d,"Un",0,u])},91829(e,t,r){function o(){return[0,0,0,0]}function a(e,t,r,o){return[e,t,r,o]}function n(e,t,r,o){return[e,t,r,o]}function i(){return a(1,1,1,1)}function s(){return a(1,0,0,0)}function l(){return a(0,1,0,0)}function c(){return a(0,0,1,0)}function u(){return a(0,0,0,1)}r.d(t,{CN:()=>n,_Y:()=>u,fA:()=>a,vt:()=>o});const d=[0,0,0,0],h=i(),m=s(),f=l(),p=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:f,UNIT_Z:p,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:n,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,h,"uY",0,d])},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>a,Cc:()=>y,LI:()=>h,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>w,aI:()=>S,hG:()=>p,hZ:()=>n,hs:()=>m,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,r,o,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=a,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function h(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+o*o+a*a+n*n)}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return r*r+o*o+a*a+n*n}function v(e){const t=e[0],r=e[1],o=e[2],a=e[3];return Math.sqrt(t*t+r*r+o*o+a*a)}function g(e){const t=e[0],r=e[1],o=e[2],a=e[3];return t*t+r*r+o*o+a*a}function x(e,t){const r=t[0],o=t[1],a=t[2],n=t[3];let i=r*r+o*o+a*a+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=a*i,e[3]=n*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,r,o){const a=t[0],n=t[1],i=t[2],s=t[3];return e[0]=a+o*(r[0]-a),e[1]=n+o*(r[1]-n),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function w(e,t,r){const o=t[0],a=t[1],n=t[2],i=t[3];return e[0]=r[0]*o+r[4]*a+r[8]*n+r[12]*i,e[1]=r[1]*o+r[5]*a+r[9]*n+r[13]*i,e[2]=r[2]*o+r[6]*a+r[10]*n+r[14]*i,e[3]=r[3]*o+r[7]*a+r[11]*n+r[15]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function S(e,t){const r=e[0],a=e[1],n=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-l)<=d*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const T=s,C=l,_=c,I=f,P=p,z=v,R=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:a,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:I,distance:f,div:_,divide:c,dot:b,equals:S,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:z,length:v,lerp:y,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let a,n,i,s,l,c;do{a=2*r()-1,n=2*r()-1,l=a*a+n*n}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*a,e[1]=t*n,e[2]=t*i*u,e[3]=t*s*u,e},round:h,scale:m,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:n,sqrDist:P,sqrLen:R,squaredDistance:p,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:T,subtract:s,transformMat4:w,transformQuat:function(e,t,r){const o=t[0],a=t[1],n=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*n-l*a,d=c*a+l*o-i*n,h=c*n+i*a-s*o,m=-i*o-s*a-l*n;return e[0]=u*c+m*-i+d*-l-h*-s,e[1]=d*c+m*-s+h*-i-u*-l,e[2]=h*c+m*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},56512(e,t,r){function o(e){let t,r,o=[],a=!1;return function(...n){return a&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,o)||(r=e.apply(this,n),t=this,o=n,a=!0),r}}r.d(t,{B:()=>o})},69397(e,t,r){r.d(t,{Qf:()=>s,Qh:()=>n,lM:()=>a});var o=r(34275);function a(e){if(!e)return 0;let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=i(e[r],!1));return t}function n(e){if(!e)return 0;if("number"==typeof e[0])return s(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let o=0;o<t;o++)r+=i(e[o]);return r}(e);let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=i(e[r]));return t}function i(e,t=!0){switch(typeof e){case"object":return t?n(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function s(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const c=32,u=16,d=145},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),a=r(91218),n=r(9762);function i(e,t,r,o){if((0,a.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,n.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,a.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),a=r(16930),n=r(9762),i=r(65806);function s(e,t,r,a){return!(null==t||null==a||e.length<2)&&((0,o.canProjectWithoutEngine)(t,a)?(0,n.projectBuffer)(e,t,0,r,a,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,a)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:a.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},31411(e,t,r){r.d(t,{GS:()=>T,gh:()=>_});var o=r(49186),a=r(56512),n=r(65864),i=r(4305),s=r(50954),l=r(52006),c=r(49663),u=r(46068),d=r(15507);const h=1e-6,m=[0,0];function f(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class p{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:r,maxSegmentsPerCurve:o,minSegmentsPerCurve:a}){const n=r*r,i=t*t,s=1/o,l=this.interpolate(0),c=this.interpolate(1);(0,d.kb)(this.curveStart,l)>h&&e.push(l),this.initialize(l,c);const u=1/a;for(let e=a-1;e>0;e--){const t=e*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<s||(0===n||!isFinite(n)||(0,d.kb)(this.arcStart,this.arcEnd)<n)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,c)>h&&e.push([...this.curveEnd]),e}}class v extends p{constructor(e,t){const[r,o,a]=t.b;super(e,r),this._controlPointsStack=[],this._curveControlPoints=[o,a],this._arcControlPoints=[o,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:r,tStart:o,tEnd:a}=this,[n,i]=this._arcControlPoints,s=(e-o)/(a-o),l=(0,d.RS)([],t,n,s),c=(0,d.RS)(m,n,i,s),u=(0,d.RS)([],i,r,s),h=(0,d.RS)([],l,c,s),f=(0,d.RS)([],c,u,s),p=(0,d.RS)([],h,f,s);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,u]),this.tEndStack.push(e),this.arcEndStack.push(p),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:r}=this,[o,a]=this._curveControlPoints;return(0,i.B4)(t,o,a,r,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[r,o]=this._arcControlPoints;return Math.max((0,d.yE)(r,e,t),(0,d.yE)(o,e,t))}}class g extends p{constructor(e,t){const[r]=t.a;super(e,r),this._derivedEllipse=(0,u.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,u.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function x(e,t,r,{cx:o,cy:a,radius:n,thetaStart:i,thetaEnd:s,isInvalid:l},{maxDeviation:c,maxSegmentLength:u,maxSegmentsPerCurve:m,minSegmentsPerCurve:f}){if(l)return e.push([...r]),e;const p=2*n,v=[o+n*Math.cos(i),a+n*Math.sin(i)],g=[o+n*Math.cos(s),a+n*Math.sin(s)];(0,d.kb)(t,v)>h&&e.push(v);const x=Math.abs(s-i),b=u>0&&u<p?2*Math.asin(u/p):x,y=c>0&&c<=n?2*Math.acos(1-c/n):x,w=Math.min(b,y),M=Math.min(m,Math.max(f,Math.ceil(Math.abs(x/w)))),S=1/M;for(let t=1;t<M;t++){const r=t*S,l=i*(1-r)+s*r;e.push([o+n*Math.cos(l),a+n*Math.sin(l)])}return e.push(g),(0,d.kb)(r,g)>h&&e.push([...r]),e}function b(e,t,r,o){return new v(t,r).densify(e,o)}function y(e,t,r,o){const a=(0,s.pM)(t,r),[n]=r.c;return x(e,t,n,a,o)}function w(e,t,r,o){const a=(0,c.io)(t,r),[n]=r.a;return x(e,t,n,a,o)}function M(e,t,r,o){const[a,n,i,s,l,c,u]=r.a;return 0===c||0===u?(e.push([...a]),e):new g(t,r).densify(e,o)}function S(e,t,r,o){return(0,l.Xq)(r)?(e.push([...r]),e):(0,l.n1)(r)?b(e,t,r,o):(0,l.aO)(r)?y(e,t,r,o):(0,l.DA)(r)?w(e,t,r,o):M(e,t,r,o)}function T(e,t={}){if(!(0,l.Ed)(e))return e;const r=f(t),o=(0,l.FD)(e),a=[];for(const e of o){const t=[];for(let o=0;o<e.length-1;o++){const a=o+1,n=[...(0,l.yP)(e[o])];0===o&&t.push(n),S(t,n,e[a],r)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:a,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:a,spatialReference:e.spatialReference}}const C=(0,a.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function _(e,t,a){const i=new Set(t);return await async function(e,t,a){let n=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new o.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=I(e);if(a.has(t))i.spatialReference=a.get(t);else{n||(n=await Promise.all([r.e(3661),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(1550)]).then(r.bind(r,78125)));const s=n.fromSpatialReference(e),l=s?.getTolerance();if(null==l)throw new o.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=i.spatialReference.clone();c.read({xyTolerance:l}),i.spatialReference=c,a.set(t,c)}}}(e,i,a),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const r=e.spatialReference.xyTolerance;if(null==r)return e;const o=C(r);return(0,n.rS)(function(e,t,r){if(!(0,l.Ed)(e))return e;const o=new Set(t),a=f(r),n=(0,l.FD)(e),i=[];let s=!1;for(const e of n){const t=[];for(let r=0;r<e.length-1;r++){const n=r+1,i=[...(0,l.yP)(e[r])];0===r&&t.push(i);const c=e[n];(0,l.Xq)(c)?t.push([...c]):(0,l.n1)(c)&&!o.has("cubic-bezier")?b(t,i,c,a):(0,l.aO)(c)&&!o.has("circular-arc")?y(t,i,c,a):(0,l.DA)(c)&&!o.has("elliptic-arc")?w(t,i,c,a):(0,l.wY)(c)&&!o.has("elliptic-arc")?M(t,i,c,a):(t.push((0,l.tk)(c)),s=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...s?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...s?{curveRings:i}:{rings:i}}}(e,t,o))})}function I(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,r){r.d(t,{Y_:()=>R,O7:()=>P,el:()=>I});var o=r(92602),a=r(69052),n=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),h=r(28735),m=r(52006),f=r(31411),p=r(11254),v=r(60408),g=r(65864),x=r(2272),b=r(84952),y=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function M(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function T(e,t,r){const o=1e6;if(t){const t=(0,m.Ed)(e)?(0,f.GS)(e,{maxSegmentLength:o}):function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new n.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const a=e[o][0],n=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-a)*(i-a)+(s-n)*(s-n)),c=(s-n)/l,u=(i-a)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+a,s=c*o+n;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+a,i=c*e+n;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,o);e=(0,h.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function C(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function _(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const a=t.cutIndexes[o],n=t.geometries[o],i=(0,u.r8)(n);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=n.getPoint(e,r);n.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(a===r){if(M(e))for(const t of(0,u.r8)(n))e[a]=e[a].addRing(t);else if(S(e))for(const t of(0,u.r8)(n))e[a]=e[a].addPath(t)}else r=a,e[a]=n}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let n,i,c,m,f,M,S,P,z=0;const R=[],D=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,i=(0,d.Vp)(n),c=n.isWebMercator,M=c?102100:4326,m=u.j7[M].maxX,f=u.j7[M].minX,S=u.j7[M].plus180Line,P=u.j7[M].minus180Line),i)if("mesh"===t.type)D.push(t);else if("point"===t.type)D.push(C(t.clone(),m,f));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>C(e,m,f)),D.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);D.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,f)*(2*m);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:n}=e;a=Number(a.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(S)&&n!==m?(z=n>z?n:z,o=T(o,c),R.push(o),D.push("cut")):e.intersects(P)&&a!==f?(z=n*(2*m)>z?n*(2*m):z,o=T(o,c,360),R.push(o),D.push("cut")):D.push(o)}else D.push(t.clone());else D.push(t);else D.push(t);let F=(0,u.kd)(z,m),O=-90;const j=F,E=new l.A;for(;F>0;){const e=360*F-180;E.addPath([[e,O],[e,-1*O]]),O*=-1,F--}if(R.length>0&&j>0){const t=_(R,await async function(e,t,r,o){const a=(0,x.Dl)(e),n=t[0].spatialReference,i={...o,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,v.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,p.A)(a.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=n,t})}}(a,R,E,r)),o=[],n=[];for(let r=0;r<D.length;r++){const a=D[r];if("cut"!==a)n.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(o.push(a),n.push("simplify")):n.push(c?(0,h.Gh)(a):a)}}if(!o.length)return n;const i=await async function(e,t,r){const o="string"==typeof e?(0,b.An)(e):e,a=t[0].spatialReference,n=(0,v.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,y.X)(t))}},{data:s}=await(0,p.A)(o.path+"/simplify",i);return(0,y.V)(s.geometries,n,a)}(a,o,r),s=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?s.push(t):s.push(c?(0,h.Gh)(i.shift()):i.shift())}return s}const B=[];for(let e=0;e<D.length;e++){const t=D[e];if("cut"!==t)B.push(t);else{const e=R.shift();B.push(!0===c?(0,h.Gh)(e):e)}}return B}function P(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[a,n]=o.valid,i=2*n;let s=0,l=0;t>n?s=Math.ceil(Math.abs(t-n)/i):t<a&&(s=-Math.ceil(Math.abs(t-a)/i)),e>n?l=Math.ceil(Math.abs(e-n)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i));let c=e+(s-l)*i;const u=c-t;return u>n?c-=i:u<a&&(c+=i),c}function z(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new a.hr(r,o)}const R=z(c.A.WGS84);z(c.A.WebMercator)},80754(e,t,r){r.d(t,{kS:()=>c,kd:()=>l,r8:()=>u});var o=r(82799),a=r(16930),n=r(60408),i=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,i.Ed)(e))for(const r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,i.aO)(e)){const[r,o]=e.c;r[0]+=t,o[0]+=t;continue}if((0,i.FG)(e)){const[r,o]=e.a;r[0]+=t,o[0]+=t;continue}if((0,i.n1)(e)){const[r,o,a]=e.b;r[0]+=t,o[0]+=t,a[0]+=t;continue}e[0]+=t}for(const r of u(e))for(const e of r)e[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}r.d(t,["j7",0,s])},27921(e,t,r){r.d(t,{$Q:()=>y,C:()=>s,Cr:()=>u,H:()=>M,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>S,vE:()=>T,vt:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e=C){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],a=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const a=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=n*u-s*c,h=s*l-a*u,m=a*c-n*l,f=d*d+h*h+m*m,p=Math.abs(f-1)>1e-5&&f>1e-12?1/Math.sqrt(f):1;return o[0]=d*p,o[1]=h*p,o[2]=m*p,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,n=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(m,o);let s=n,l=!1;for(;s<r-1&&!l;)t(f,s),s++,l=!(0,a.t2)(m,f);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(p,s),s++,(0,a.Re)(v,m,f),(0,a.S8)(v,v),(0,a.Re)(g,f,p),(0,a.S8)(g,g),l=!(0,a.t2)(m,p)&&!(0,a.t2)(f,p)&&Math.abs((0,a.Om)(v,g))<h;return l?(u(m,f,p,e),!0):(0!==o||1!==n||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const h=.99619469809,m=(0,n.vt)(),f=(0,n.vt)(),p=(0,n.vt)(),v=(0,n.vt)(),g=(0,n.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(T(e,t.origin,t.vector,0,r))}function b(e,t){return S(e,t)>=0}function y(e,t){return function(e,t,r,o,n,i,s){const l=(0,a.Om)(e,r),c=S(e,t);if(l>-1e-6&&l<1e-6)return w(c,n,i);const u=-c/l,d=w(l,n,!1);return!(s&&!d&&!w(c,n,i))&&(d?u>o.c0&&(o.c0=u):u<o.c1&&(o.c1=u),o.c0<=o.c1)}(e,t.ray.origin,t.ray.direction,t,!1,!1,!0)}function w(e,t,r){return r?t?e>=0:e<=0:t?e>0:e<0}function M(e,t,r,o,n=!1){let i=0,s=t[r-1],l=S(e,s),c=n?l>0:l<=0;for(let u=0;u<r;u++){const r=t[u],d=S(e,r),h=n?d>0:d<=0;c!==h&&(0,a.Cc)(o[i++],s,r,l/(l-d)),h&&(0,a.C)(o[i++],r),s=r,l=d,c=h}return i}function S(e,t){return(0,a.Om)(e,t)+e[3]}function T(e,t,r,n,i){const s=(0,a.Om)(e,r),l=S(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&n&&(c=(0,o.qE)(c,0,1)),!(4&n)&&c<0||!(8&n)&&c>1?l>=0?2:3:((0,a.WQ)(i,t,(0,a.hs)(i,r,c)),l>=0?0:1)}const C=[0,0,1,0];(0,n.vt)()},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e,t){return(0,a.Om)(e,t)/(0,a.Bw)(e)}function s(e,t){const r=(0,a.Om)(e,t)/((0,a.Bw)(e)*(0,a.Bw)(t));return-(0,o.XM)(r)}(0,n.vt)(),(0,n.vt)()},32114(e,t,r){r.d(t,{Rc:()=>m,rq:()=>d,Km:()=>h}),r(44208);var o=r(26390),a=r(29242),n=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(n.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),h=u.createVec4f64(),m=(u.createMat3f64(),u.createMat4f64());u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>a});var o=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",a)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>n});var o=r(60408),a=r(65864);function n(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,a.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),a=r(60999),n=r(49186),i=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,i.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);const s=await(0,a.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),a=r(97146),n=r(63907);function i(e,t){switch(t){case n.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,a.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,a.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let a=0;a<r;a+=1)a%2==0?(o[t++]=e[a],o[t++]=e[a+1],o[t++]=e[a+2]):(o[t++]=e[a+1],o[t++]=e[a],o[t++]=e[a+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const a=e[0];let n=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=a,o[i++]=n,o[i++]=r,n=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>a,pn:()=>s,x3:()=>n});var o=r(44208);class a{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new a(e);const r=new Blob([e],{type:t});let n=URL.createObjectURL(r);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{a(),e(i)},o=e=>{a(),t(e)},a=()=>{URL.revokeObjectURL(n),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=n});try{i.src=n,await i.decode()}catch{}return URL.revokeObjectURL(n),i}},49261(e,t,r){r.d(t,{fetch:()=>Pt});var o=r(40876),a=r(61473),n=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328);function f(e,t=!1){return e<=1024?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var p=r(13030),v=r(73354),g=r(50867),x=r(43609),b=r(21015),y=r(84498),w=r(51530),M=r(88340);function S(e){if(null==e)return null;const t=null!=e.offset?e.offset:M.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:M.Un,a=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),n=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,n,l),(0,i.lw)(c,a,c),c}class T{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new T,this.numberOfVertices=0}}var _=r(11254),I=r(60999),P=r(49186),z=r(53966),R=r(69397);class D{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(const 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){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new D;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var F=r(17676),O=r(46140),j=r(97146),E=r(31217),B=r(46610),H=r(16613),N=r(18845),W=r(49255),A=r(97768),G=r(92130),L=r(65786);class V extends G.A{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,A.Gz)(this._texture),this._textureNormal=(0,A.Gz)(this._textureNormal),this._textureEmissive=(0,A.Gz)(this._textureEmissive),this._textureOcclusion=(0,A.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,A.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new U(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,A.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,F.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,A.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class k extends L.Y{constructor(e=null){super(),this.textureEmissive=e}}class U extends k{constructor(e,t,r,o,a,n,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=a,this.scale=n,this.normalTextureTransformMatrix=i}}var $=r(11725),q=r(620);class Z{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const Y=(0,m.vt)();function J(e,t,r,o,a,n){if(!e.visible)return;const i=(0,d.jb)(le,o,r),{tolerance:s}=t,l=new Z(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,q.vA)(0===e.type),K(e.boundingInfo,r,i,s,a,l,n);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,a,n,i,s,l,c){const u=t,h=ce,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,y=(v+(3-x))%3,w=u[b]/u[g],M=u[y]/u[g],S=1/u[g],T=ee,C=te,_=re,{normalRequired:I}=l;for(let t=r;t<o;++t){const r=3*t,o=i*a[r];(0,d.hZ)(h[0],n[o+0],n[o+1],n[o+2]);const l=i*a[r+1];(0,d.hZ)(h[1],n[l+0],n[l+1],n[l+2]);const u=i*a[r+2];(0,d.hZ)(h[2],n[u+0],n[u+1],n[u+2]),s&&(s.applyToVertex(h[0],h[0][0],h[0][1],h[0][2],t),s.applyToVertex(h[1],h[1][0],h[1][1],h[1][2],t),s.applyToVertex(h[2],h[2][0],h[2][1],h[2][2],t)),(0,d.jb)(T,h[0],e),(0,d.jb)(C,h[1],e),(0,d.jb)(_,h[2],e);const m=T[b]-w*T[g],f=T[y]-M*T[g],p=C[b]-w*C[g],v=C[y]-M*C[g],x=_[b]-w*_[g],P=_[y]-M*_[g],z=x*v-P*p,R=m*P-f*x,D=p*f-v*m;if((z<0||R<0||D<0)&&(z>0||R>0||D>0))continue;const F=z+R+D;if(0===F)continue;const O=z*(S*T[g])+R*(S*C[g])+D*(S*_[g]);if(O*Math.sign(F)<0)continue;const j=O/F;j>=0&&c(j,I?ae(h):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,a,l,n)}}const X=(0,h.vt)();function K(e,t,r,o,a,n,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,X);if((0,m.Ne)(Y,e.bbMin),(0,m.vI)(Y,e.bbMax),null!=a&&a.applyToAabb(Y),function(e,t,r,o){return function(e,t,r,o){const a=(e[0]-o-t[0])*r[0],n=(e[3]+o-t[0])*r[0];let i=Math.min(a,n),s=Math.max(a,n);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(Y,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>1e3){const s=e.getChildren();if(void 0!==s){for(const e of s)K(e,t,r,o,a,n,i);return}}!function(e,t,r,o,a,n,i,s,l,c,u){const d=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*a[r];let c=n[o],x=n[o+1],b=n[o+2];const y=i*a[r+1];let w=n[y],M=n[y+1],S=n[y+2];const T=i*a[r+2];let C=n[T],_=n[T+1],I=n[T+2];null!=l&&([c,x,b]=l.applyToVertex(ue,c,x,b,e),[w,M,S]=l.applyToVertex(ue,w,M,S,e),[C,_,I]=l.applyToVertex(ue,C,_,I,e));const P=w-c,z=M-x,R=S-b,D=C-c,F=_-x,O=I-b,j=p*O-F*v,E=v*D-O*f,B=f*F-D*p,H=P*j+z*E+R*B,N=H*H;if(N<=se)continue;const W=d-c,A=h-x,G=m-b,L=(W*j+A*E+G*B)*H;if(L<0||L>N)continue;const V=A*R-z*G,k=G*P-R*W,U=W*z-P*A,$=(f*V+p*k+v*U)*H;if($<0||L+$>N)continue;const q=(D*V+F*k+O*U)/H;q>=0&&u(q,g?oe(P,z,R,D,F,O,Q):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,a,n,i)}}const Q=(0,h.vt)();const ee=(0,h.vt)(),te=(0,h.vt)(),re=(0,h.vt)();function oe(e,t,r,o,a,n,i){return(0,d.hZ)(ne,e,t,r),(0,d.hZ)(ie,o,a,n),(0,d.$A)(i,ne,ie),(0,d.S8)(i,i),i}function ae(e){return(0,d.jb)(ne,e[1],e[0]),(0,d.jb)(ie,e[2],e[0]),(0,d.$A)(Q,ne,ie),(0,d.S8)(Q,Q),Q}const ne=(0,h.vt)(),ie=(0,h.vt)(),se=1e-7*1e-7,le=(0,h.vt)(),ce=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()],ue=(0,h.vt)();var de=r(75956),he=r(16396);function me(e,t,r){const{data:o,indices:a}=e,n=t.typedBuffer,i=t.typedBufferStride,s=a.length;r*=i;for(let e=0;e<s;++e){const t=2*a[e];n[r]=o[t],n[r+1]=o[t+1],r+=i}}function fe(e,t,r,o=1){const{data:a,indices:n}=e,i=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===o)for(let e=0;e<l;++e){const t=3*n[e];i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*n[e];for(let e=0;e<o;++e)i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],r+=s}}function pe(e,t,r,o,a=1){const n=t.typedBuffer,i=t.typedBufferStride;if(o*=i,1===a)for(let t=0;t<r;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=i;else for(let t=0;t<r;++t)for(let t=0;t<a;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=i}function ve(e,t,r,o,a,n){switch(e){case"position":{(0,q.vA)(3===t.size);const o=a.getField(e,p.xs);(0,q.vA)(!!o,`No buffer view for ${e}`),function(e,t,r,o,a=1){if(!t)return void fe(e,r,o,a);const{data:n,indices:i}=e,s=r.typedBuffer,c=r.typedBufferStride,u=i.length,d=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],x=t[9],b=t[10],y=t[12],w=t[13],M=t[14];o*=c;let S=0,T=0,C=0;const _=(0,l.tZ)(t)?e=>{S=n[e]+y,T=n[e+1]+w,C=n[e+2]+M}:e=>{const t=n[e],r=n[e+1],o=n[e+2];S=d*t+f*r+g*o+y,T=h*t+p*r+x*o+w,C=m*t+v*r+b*o+M};if(1===a)for(let e=0;e<u;++e)_(3*i[e]),s[o]=S,s[o+1]=T,s[o+2]=C,o+=c;else for(let e=0;e<u;++e){_(3*i[e]);for(let e=0;e<a;++e)s[o]=S,s[o+1]=T,s[o+2]=C,o+=c}}(t,r,o,n);break}case"normal":{(0,q.vA)(3===t.size);const r=a.getField(e,p.xs);(0,q.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,o,a=1){if(!t)return void fe(e,r,o,a);const{data:n,indices:i}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=i.length,h=s[0],m=s[1],f=s[2],p=s[4],v=s[5],g=s[6],x=s[8],b=s[9],y=s[10],w=!(0,l.ut)(s),M=1e-6,S=1-M;o*=u;let T=0,C=0,_=0;const I=(0,l.tZ)(s)?e=>{T=n[e],C=n[e+1],_=n[e+2]}:e=>{const t=n[e],r=n[e+1],o=n[e+2];T=h*t+p*r+x*o,C=m*t+v*r+b*o,_=f*t+g*r+y*o};if(1===a)if(w)for(let e=0;e<d;++e){I(3*i[e]);const t=T*T+C*C+_*_;if(t<S&&t>M){const e=1/Math.sqrt(t);c[o]=T*e,c[o+1]=C*e,c[o+2]=_*e}else c[o]=T,c[o+1]=C,c[o+2]=_;o+=u}else for(let e=0;e<d;++e)I(3*i[e]),c[o]=T,c[o+1]=C,c[o+2]=_,o+=u;else for(let e=0;e<d;++e){if(I(3*i[e]),w){const e=T*T+C*C+_*_;if(e<S&&e>M){const t=1/Math.sqrt(e);T*=t,C*=t,_*=t}}for(let e=0;e<a;++e)c[o]=T,c[o+1]=C,c[o+2]=_,o+=u}}(t,o,r,n);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,q.vA)(2===t.size);const r=a.getField(e,p.mJ);(0,q.vA)(!!r,`No buffer view for ${e}`),me(t,r,n);break}case"uv0":{(0,q.vA)(2===t.size);const r=a.getField(e,p.ZD)??a.getField(e,p.gH);(0,q.vA)(!!r,`No buffer view for ${e}`),me(t,r,n);break}case"uvi":{(0,q.vA)(2===t.size);const r=a.getField(e,p.mJ);(0,q.vA)(!!r,`No buffer view for ${e}`),me(t,r,n);break}case"color":case"symbolColor":{const r=a.getField(e,p.XP);(0,q.vA)(!!r,`No buffer view for ${e}`),(0,q.vA)(3===t.size||4===t.size),function(e,t,r,o,a=1){const{data:n,indices:i}=e,s=r.typedBuffer,l=r.typedBufferStride,c=i.length;if(o*=l,t===n.length&&4===t){s[o]=n[0],s[o+1]=n[1],s[o+2]=n[2],s[o+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,i=e[o/=4];o+=t;const u=c*a;for(let r=1;r<u;++r)e[o]=i,o+=t;return}if(1!==a)if(4!==t)for(let e=0;e<c;++e){const t=3*i[e];for(let e=0;e<a;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}else for(let e=0;e<c;++e){const t=4*i[e];for(let e=0;e<a;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*i[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}return}for(let e=0;e<c;++e){const t=3*i[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}}}(t,t.size,r,n);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=a.getField(e,p.Y$)??a.getField(e,p.Y$);(0,q.vA)(!!r,`No buffer view for ${e}`),(0,q.vA)(1===t.size),function(e,t,r){const{data:o,indices:a}=e,n=t.typedBuffer,i=t.typedBufferStride,s=a.length,l=o[0];r*=i;for(let e=0;e<s;++e)n[r]=l,r+=i}(t,r,n);break}case"tangent":{(0,q.vA)(4===t.size);const o=a.getField(e,p.Eq);(0,q.vA)(!!o,`No buffer view for ${e}`),function(e,t,r,o,a=1){if(!t)return void function(e,t,r,o=1){const{data:a,indices:n}=e,i=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===o)for(let e=0;e<l;++e){const t=4*n[e];i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],i[r+3]=a[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*n[e];for(let e=0;e<o;++e)i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],i[r+3]=a[t+3],r+=s}}(e,r,o,a);const{data:n,indices:i}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=i.length,h=s[0],m=s[1],f=s[2],p=s[4],v=s[5],g=s[6],x=s[8],b=s[9],y=s[10],w=!(0,l.ut)(s),M=1e-6,S=1-M;if(o*=u,1===a)for(let e=0;e<d;++e){const t=4*i[e],r=n[t],a=n[t+1],s=n[t+2],l=n[t+3];let d=h*r+p*a+x*s,T=m*r+v*a+b*s,C=f*r+g*a+y*s;if(w){const e=d*d+T*T+C*C;if(e<S&&e>M){const t=1/Math.sqrt(e);d*=t,T*=t,C*=t}}c[o]=d,c[o+1]=T,c[o+2]=C,c[o+3]=l,o+=u}else for(let e=0;e<d;++e){const t=4*i[e],r=n[t],s=n[t+1],l=n[t+2],d=n[t+3];let T=h*r+p*s+x*l,C=m*r+v*s+b*l,_=f*r+g*s+y*l;if(w){const e=T*T+C*C+_*_;if(e<S&&e>M){const t=1/Math.sqrt(e);T*=t,C*=t,_*=t}}for(let e=0;e<a;++e)c[o]=T,c[o+1]=C,c[o+2]=_,c[o+3]=d,o+=u}}(t,r,o,n);break}}}(0,h.vt)();class ge{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,a){null!=a&&function(e,t,r,o,a,n){const{buffer:i,offset:s}=n;for(const n of r.fields.keys()){const r=e.get(n),l=r?.indices;if(r&&l)ve(n,r,o,a,i,s);else if("olidColor"===n&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;pe(t,i.getField(n,p.XP),e,s)}}}}(r,o,this.layout,e,t,a)}}var xe=r(33442),be=r(47724);function ye({units:e,factor:t},r,o,a){const n=Se*e;return o+((a?1-Math.abs((0,d.Om)(r,a)):0)*t*Me+n)}const we=new be.L,Me=2e-5,Se=2e-6,Te=(0,h.vt)();var Ce=r(43616),_e=r(5482),Ie=r(91429),Pe=r(91829),ze=r(4431),Re=r(1843),De=r(72824),Fe=r(13840),Oe=r(98958),je=r(16943),Ee=r(33524),Be=r(56133);r(4576),r(66289);var He=r(69622),Ne=r(65529),We=r(32728);class Ae{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 Ge=class extends He.A{constructor(e,t){super(e),this.events=new Ne.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Ve(Le.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Ze,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Ae(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();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,q.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){const t=this._view.state;(0,q.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){const t=this._view,r=ke,o=Ue;t.localTransform.getMat(e,$e),t.globalTransform.getMat(e,qe);const a=(0,l.lw)(qe,qe,$e);(0,d.hZ)(r,a[12],a[13],a[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,a),t.model.setMat(e,o);const n=(0,We.wp)(ke,a);n.sort(),t.modelScaleFactors.set(e,0,n[1]),t.modelScaleFactors.set(e,1,n[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Ue),r.modelOrigin.getVec(e,ke),t[0]=Ue[0],t[1]=Ue[1],t[2]=Ue[2],t[3]=0,t[4]=Ue[3],t[5]=Ue[4],t[6]=Ue[5],t[7]=0,t[8]=Ue[6],t[9]=Ue[7],t[10]=Ue[8],t[11]=0,t[12]=ke[0],t[13]=ke[1],t[14]=ke[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(ke,this,e),t*=Math.max(ke[0],ke[1],ke[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(ke,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(ke[0],ke[1],ke[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){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(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){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const 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){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const 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(Ze,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Ae(this._buffer)}_findSlot(){const e=this._view.state;let 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,_e.Cg)([(0,Ie.MZ)({constructOnly:!0})],Ge.prototype,"shaderTransformation",void 0),(0,_e.Cg)([(0,Ie.MZ)()],Ge.prototype,"_size",void 0),(0,_e.Cg)([(0,Ie.MZ)({readOnly:!0})],Ge.prototype,"size",null),Ge=(0,_e.Cg)([(0,Ie.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ge);const Le=(0,Re.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Ve(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,je.E)()&&e.vec4u8("instanceOlidColor"),e}const ke=(0,h.vt)(),Ue=(0,s.vt)(),$e=(0,c.vt)(),qe=(0,c.vt)(),Ze=64,Ye=(0,Re.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Je=r(74810),Xe=r(28491),Ke=r(90644),Qe=r(49788);class et extends De.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Je.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,Pe.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=Qe.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}De.gy;let tt=class extends Oe.w{constructor(e,t){let o=(0,ze.U)(at(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,ze.U)(function(e){return Ve(Ye.clone(),e)}(t)))),super(e,t,o),this.shader=new Fe.r(Xe.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:i}=e;return(0,Ke.Ey)({blending:o?(0,Ee.Yf)(r,!1,e.emissionDimmingPass):null,culling:ot(e)?(0,Ke.Xt)(a):null,depthTest:(0,Ee.mt)(r,rt(n)),depthWrite:(0,Ee.z5)(e),colorWrite:Ke.kn,stencilWrite:i?Be.v0:null,stencilTest:i?t?Be.Ax:Be.cP:null,polygonOffset:(0,xe.s)(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 rt(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function ot(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function at(e){const t=(0,Re.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,je.E)()&&t.vec4u8("olidColor"),t}tt=(0,_e.Cg)([(0,Ie.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],tt);var nt=r(51976);class it extends be.L{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?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,_e.Cg)([(0,nt.W)({count:4})],it.prototype,"alphaDiscardMode",void 0),(0,_e.Cg)([(0,nt.W)({count:3})],it.prototype,"doubleSidedMode",void 0),(0,_e.Cg)([(0,nt.W)({count:7})],it.prototype,"pbrMode",void 0),(0,_e.Cg)([(0,nt.W)({count:3})],it.prototype,"cullFace",void 0),(0,_e.Cg)([(0,nt.W)({count:3})],it.prototype,"normalType",void 0),(0,_e.Cg)([(0,nt.W)({count:3})],it.prototype,"customDepthTest",void 0),(0,_e.Cg)([(0,nt.W)({count:8})],it.prototype,"emissionSource",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasVertexColors",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasSymbolColors",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasVerticalOffset",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasColorTexture",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasMetallicRoughnessTexture",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasOcclusionTexture",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasNormalTexture",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasScreenSizePerspective",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasVertexTangents",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasOccludees",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"instanced",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"instancedDoublePrecision",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasModelTransformation",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"offsetBackfaces",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasVVSize",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasVVColor",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"receiveShadows",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasShadowHighlights",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"receiveAmbientOcclusion",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"receiveGlobalIllumination",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"textureAlphaPremultiplied",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"instancedFeatureAttribute",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"instancedColor",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"writeDepth",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"snowCover",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasColorTextureTransform",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasEmissionTextureTransform",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasNormalTextureTransform",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasOcclusionTextureTransform",void 0),(0,_e.Cg)([(0,nt.W)()],it.prototype,"hasMetallicRoughnessTextureTransform",void 0);var st=r(57323);let lt=class extends tt{constructor(){super(...arguments),this.shader=new Fe.r(st.R,()=>r.e(2314).then(r.bind(r,39933)))}};lt=(0,_e.Cg)([(0,Ie.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],lt);class ct extends nt.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,_e.Cg)([(0,nt.W)()],ct.prototype,"receiveShadows",void 0);class ut extends $.i{constructor(e,t){super(e,ht),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,W.uw)(e)&&!this.transparent],[4,e=>(0,W.uw)(e)&&this.transparent]]),this._layout=at(this.parameters),this._configuration=new it(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Qe.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);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:a,doubleSidedType:n}=t;r.hasVertexTangents=!o&&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=o?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=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:a&&"normal"===n?1:a&&"winding-order"===n?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,W._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=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?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,o,a,n){const i=this._getMaterialVerticalOffset(t,r);null!=i&&(o=(0,d.Re)(mt,o,i),a=(0,d.Re)(ft,a,i)),n=function(e,t,r,o){we.output=t.transparent?1:0,we.polygonOffset=t.polygonOffset,we.enableOITOffset=t.enableOITOffset;const a=(0,xe.s)(we);if(!a)return e;const n=(0,d.oW)(Te,o,r);return(t,r,o)=>e(ye(a,n,t,r),r,o)}(n,this._configuration,o,a),J(e,r,o,a,(0,he.ou)(r.verticalOffset),n)}intersectScreenPolygon(e,t,r,o){return function(e,t,r){return null==e?null:(e.distance=function(e,t,r,o,a){const n=(0,xe.s)(r);return n?ye(n,(0,d.oW)(Te,a,o),e,t):e}(e.distance,e.hasNormal?e.normal:null,t,r,e.point),e)}((0,de.MJ)(e,r,t,o,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new dt(e)}createBufferWriter(){return new ge(this._layout)}get transparent(){const{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:o,texture:a,textureId:n,textureAlphaMode:i,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||o<1||(null!=a||null!=n)&&1!==i&&2!==i&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){const r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,o,a)=>(e[0]=t+r[0],e[1]=o+r[1],e[2]=a+r[2],e),applyToAabb:e=>((0,m.Ne)(e,(0,d.WQ)(yt,(0,m.pg)(e,yt),r)),(0,m.vI)(e,(0,d.WQ)(yt,(0,m.Lu)(e,yt),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;const r=t.camera;(0,d.hZ)(gt,e[12],e[13],e[14]);let o=null;switch(t.viewingMode){case 1:o=(0,d.S8)(vt,gt);break;case 2:o=(0,d.C)(vt,pt)}const a=(0,d.Re)(xt,gt,r.eye),n=(0,d.Bw)(a),i=(0,d.hs)(a,a,1/n);let s=null;this.parameters.screenSizePerspective&&(s=(0,d.Om)(o,i));const l=(0,Ce.kE)(r,n,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,d.hs)(o,o,l),(0,d.ei)(bt,o,t.transform.inverseRotation)}}class dt extends V{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const 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?lt:tt,e)}}class ht extends et{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!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 emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}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 mt=(0,h.vt)(),ft=(0,h.vt)(),pt=(0,h.fA)(0,0,1),vt=(0,h.vt)(),gt=(0,h.vt)(),xt=(0,h.vt)(),bt=(0,h.vt)(),yt=(0,h.vt)(),wt=()=>z.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class Mt{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function St(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(wt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(wt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(wt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(wt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else wt().warn("Indexed geometries must specify faces"),o=!1;break}default:wt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(wt().warn("Geometry requires material"),o=!1);const a=e.params.vertexAttributes;for(const e in a)a[e].values||(wt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function Tt(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function Ct(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function _t(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const It=new O.A(1,2,"wosr");async function Pt(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,a.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,I.Ke)((0,_.A)(e,t));if(r.ok)return r.value.data;(0,F.QP)(r.error),function(e){throw new P.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const a=e[o],n=a.images[0].data;if(!n){wt().warn("Externally referenced texture data is not yet supported");continue}const i=a.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===a.channels?a.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==Ct(l)},u=t?.disableTextures?Promise.resolve(null):(0,E.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),a={};for(const e of o)a[e.refId]=e;return a}(r.textureDefinitions??{},t);let a=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];a+=t?.image?t.image.width*t.image.height*4:0}return new Mt(r,o,a+(0,R.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,a=new Array,n=new D,i=e.resource,s=O.A.parse(i.version||"1.0","wosr");It.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!St(i))continue;const s=_t(i),l=i.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,j.tM)(x);p.push([e,new B.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,y=d&&d[b];if(y&&!f.has(b)){const{image:e,parameters:t}=y,r=new N.h(e,t);o.push(r),f.set(b,r)}const w=f.get(b),M=w?w.id:void 0,S=s.material;let T=n.get(S,b);if(null==T){const e=u[S.slice(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?Ct(y.alphaChannelUsage):void 0,o={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),T=new ut(o,t),n.set(S,b,T)}a.push(T);const C=new H.V(T,p);m+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:a,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:Tt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let M;if(t.cache)M=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(5669).then(r.bind(r,51698));M=await e(new b.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:z}=function(e,t,r){const a=e.model,s=e.meta,b=a.meta?.ESRI_proxyEllipsoid,M=s.isEsriSymbolResource&&null!=b&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;M&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const a of o.parts){const o=a.attributes.normal;if(null==o)return;const n=a.attributes.position,i=n.count,s=(0,h.vt)(),u=(0,h.vt)(),m=(0,h.vt)(),f=new Float32Array(4*i),v=new Float32Array(3*i),g=(0,l.B8)((0,c.vt)(),a.transform);let x=0,b=0;for(let l=0;l<i;l++){n.getVec(l,u),o.getVec(l,s),(0,d.Z0)(u,u,a.transform),(0,d.Re)(m,u,t.center),(0,d.Qr)(m,m,t.radius);const i=m[2],c=(0,d.Bw)(m),h=Math.min(.45+.55*c*c,1)**2.2;(0,d.Qr)(m,m,t.radius),null!==g&&(0,d.Z0)(m,m,g),(0,d.S8)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(m,m,s,i>-1?.2:Math.min(-4*i-3.8,1)),v[x]=m[0],v[x+1]=m[1],v[x+2]=m[2],x+=3,f[b]=h,f[b+1]=h,f[b+2]=h,f[b+3]=1,b+=4}a.attributes.normal=new p.xs(v.buffer),a.attributes.color=new p.Eq(f.buffer)}}}(e,b));const T=!!t.usePBR,_=s.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:M,mrrFactors:Je.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:Je.mb},I={...t.materialParameters,treeRendering:M},P=new Array,z=new Map,R=new Map,D=a.lods.length,F=(0,m.Ie)();return a.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(D>1&&0===s||D>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new ut({},t):function(e,t,r,a,n,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:h,color:m,texCoord0:f,tangent:p}=t.attributes,v=t.material+(h?"_normal":"")+(m?"_color":"")+(f?"_texCoord0":"")+(p?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const a=e.textures.get(t);if(a){const e=a.data,n=r&&!(0,w.x3)(e)?l.compressionOptions:void 0;s.set(t,new N.h((0,w.x3)(e)?e.data:e,{...a.parameters,preMultiplyAlpha:!(0,w.x3)(e)&&o,encoding:(0,w.x3)(e)?e.encoding:void 0,compressionOptions:n}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),h=(0,o.xV)(d.color[1]),m=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&g?s.get(d.colorTexture):null,p=(0,Je.Jr)(d),y=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new ut({...a,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,h,m],ambient:[r,h,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:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=n.emissiveStrengthFromSymbol?n.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Je.Bt:[d.metallicFactor,d.roughnessFactor,a.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:S(d.colorTextureTransform),normalTextureTransformMatrix:S(d.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:S(d.occlusionTextureTransform),emissiveTextureTransformMatrix:S(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:S(d.metallicRoughnessTextureTransform),...n},l))}const y=i.get(v);if(r.stageResources.materials.push(y),g){const 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 y}(a,e,c,_,I,z,R,t,M),{geometry:d,vertexCount:h}=function(e,t){const r=e.attributes.position.count,o=(0,y.x)(e.indices||r,e.primitiveType),a=f(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,v.a)(a,s,e.transform,3,l);const c=[["position",new B.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=f(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(zt,e.transform),(0,v.b)(t,a,zt,3,s),(0,n.or)(zt)&&(0,v.n)(t,t),c.push(["normal",new B.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=f(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(zt,e.transform),(0,g.t)(t,a,zt,4,s),(0,n.or)(zt)&&(0,v.n)(t,t,4),c.push(["tangent",new B.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=f(2*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.texCoord0;(0,x.a)(t,a,2,n),c.push(["uv0",new B.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const 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 B.n(t,o,4,!0)])}return{geometry:new H.V(t,c),vertexCount:r}}(e,r??new ut({},t)),b=d.boundingInfo;null!=b&&0===s&&((0,m.iT)(F,b.bbMin),(0,m.iT)(F,b.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=h)}),l||P.push(c)}),{engineResources:P,referenceBoundingBox:F}}(M,t,s.specifiedLodIndex);return{lods:T,referenceBoundingBox:z,isEsriSymbolResource:M.meta.isEsriSymbolResource,isWosr:!1}}const zt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>n,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),a=r(51850);function n(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),a=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),n=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,a,n),e}function s(e,t,r){r=r||e;const a=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),(0,o.S8)(r,r)}function l(e,t,r,n=(0,a.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const a=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(a),h=d/i*Math.sin((1-r)*a),m=d/s*Math.sin(r*a);return(0,o.hs)(c,e,h),(0,o.hs)(u,t,m),(0,o.WQ)(n,c,u)}return(0,o.Cc)(n,e,t,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),u=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>a});var o=r(31821);function a(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
|
|
627
|
+
void forwardLinearDepth(float _linearDepth) { ${(0,o.If)(t,"linearDepth = _linearDepth;")} }
|
|
628
|
+
`)}},33120(e,t,r){r.d(t,{i$:()=>i,xJ:()=>n}),r(46686),r(28682);var o=r(77108),a=r(31821);function n(e){e.vertex.uniforms.add(new o.E("nearFar",e=>e.camera.nearFar))}function i(e){e.vertex.code.add(a.H`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
629
|
+
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
630
|
+
}`)}},32680(e,t,r){r.d(t,{M:()=>a});var o=r(31821);function a(e){e.vertex.code.add(o.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
|
|
631
|
+
vec3 camToVert = posWorld - camPosWorld;
|
|
632
|
+
bool isBackface = dot(camToVert, normalWorld) > 0.0;
|
|
633
|
+
if (isBackface) {
|
|
634
|
+
posClip.z += 0.0000003 * posClip.w;
|
|
635
|
+
}
|
|
636
|
+
return posClip;
|
|
637
|
+
}`)}},49255(e,t,r){function o(e){return function(e){return c(e)||4===e}(e)||function(e){return 5===(t=e)||6===t||7===t||8===e||9===e;var t}(e)}function a(e){return 10===e||11===e}function n(e){return l(e)||a(e)}function i(e){return 1===e}function s(e){return 2===e}function l(e){return 0===e||function(e){return i(e)||s(e)}(e)}function c(e){return function(e){return l(e)||a(e)}(e)||u(e)}function u(e){return 3===e}r.d(t,{Ex:()=>a,Rb:()=>s,_$:()=>i,_o:()=>l,eh:()=>u,gr:()=>c,i3:()=>n,uw:()=>o})},76597(e,t,r){r.d(t,{d:()=>n});var o=r(33120),a=r(31821);function n(e){(0,o.i$)(e),e.vertex.code.add(a.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
|
|
638
|
+
vec4 eye = view * vec4(pos, 1.0);
|
|
639
|
+
depth = calculateLinearDepth(nearFar,eye.z);
|
|
640
|
+
return proj * eye;
|
|
641
|
+
}`),e.vertex.code.add(a.H`vec4 transformPosition(mat4 proj, mat4 view, vec3 pos) {
|
|
642
|
+
return proj * (view * vec4(pos, 1.0));
|
|
643
|
+
}`)}},24321(e,t,r){r.d(t,{v:()=>n});var o=r(43519),a=r(31821);function n(e,t){t.instancedColor?(e.attributes.add("instanceColor","vec4"),e.vertex.include(o.WD),e.vertex.include(o.Y1),e.vertex.include(o.ML),e.vertex.code.add(a.H`
|
|
644
|
+
MaskedColor applyInstanceColor(MaskedColor color) {
|
|
645
|
+
return multiplyMaskedColors( color, createMaskedFromUInt8NaNColor(${"instanceColor"}));
|
|
646
|
+
}
|
|
647
|
+
`)):e.vertex.code.add(a.H`MaskedColor applyInstanceColor(MaskedColor color) {
|
|
648
|
+
return color;
|
|
649
|
+
}`)}},2585(e,t,r){r.d(t,{B:()=>g});var o=r(77690),a=r(29242),n=r(9093),i=r(35522),s=r(51850),l=r(26425),c=r(77949),u=r(23205),d=r(31821),h=r(35644),m=r(74333);class f extends m.n{constructor(e,t,r){super(e,"mat4",1,(o,a,n)=>o.setUniformMatrix4fv(e,t(a,n),r))}}var p=r(28449);r(65786).Y;const v=(0,a.vt)();function g(e,t){const{hasModelTransformation:r,instancedDoublePrecision:a,instanced:s,output:m,hasVertexTangents:g}=t;r&&(e.vertex.uniforms.add(new f("model",e=>e.modelTransformation??n.zK)),e.vertex.uniforms.add(new h.k("normalLocalOriginFromModel",e=>((0,o.Ge)(v,e.modelTransformation??n.zK),v)))),s&&a&&(e.attributes.add("instanceModelOriginHi","vec3"),e.attributes.add("instanceModelOriginLo","vec3"),e.attributes.add("instanceModel","mat3"),e.attributes.add("instanceModelNormal","mat3"));const b=e.vertex;a&&(b.include(l.u),b.uniforms.add(new u.d("viewOriginHi",e=>(0,p.Zo)((0,i.hZ)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)),new u.d("viewOriginLo",e=>(0,p.jA)((0,i.hZ)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)))),b.code.add(d.H`
|
|
650
|
+
vec3 getVertexInLocalOriginSpace() {
|
|
651
|
+
return ${r?a?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":a?"instanceModel * localPosition().xyz":"localPosition().xyz"};
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
vec3 subtractOrigin(vec3 _pos) {
|
|
655
|
+
${a?d.H`
|
|
656
|
+
// Issue: (should be resolved now with invariant position) https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/56280
|
|
657
|
+
vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -instanceModelOriginHi, -instanceModelOriginLo);
|
|
658
|
+
return _pos - originDelta;`:"return vpos;"}
|
|
659
|
+
}
|
|
660
|
+
`),b.code.add(d.H`
|
|
661
|
+
vec3 dpNormal(vec4 _normal) {
|
|
662
|
+
return normalize(${r?a?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":a?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
|
|
663
|
+
}
|
|
664
|
+
`),4===m&&((0,c.S7)(b),b.code.add(d.H`
|
|
665
|
+
vec3 dpNormalView(vec4 _normal) {
|
|
666
|
+
return normalize((viewNormal * ${r?a?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":a?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
|
|
667
|
+
}
|
|
668
|
+
`)),g&&b.code.add(d.H`
|
|
669
|
+
vec4 dpTransformVertexTangent(vec4 _tangent) {
|
|
670
|
+
${r?a?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":a?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
|
|
671
|
+
}`)}const x=(0,s.vt)()},96336(e,t,r){r.d(t,{Y:()=>a});var o=r(31821);function a(e,t){switch(e.fragment.code.add(o.H`vec3 screenDerivativeNormal(vec3 positionView) {
|
|
672
|
+
return normalize(cross(dFdx(positionView), dFdy(positionView)));
|
|
673
|
+
}`),t.normalType){case 1:e.attributes.add("normalCompressed","vec2"),e.vertex.code.add(o.H`vec3 decompressNormal(vec2 normal) {
|
|
674
|
+
float z = 1.0 - abs(normal.x) - abs(normal.y);
|
|
675
|
+
return vec3(normal + sign(normal) * min(z, 0.0), z);
|
|
676
|
+
}
|
|
677
|
+
vec3 normalModel() {
|
|
678
|
+
return decompressNormal(normalCompressed);
|
|
679
|
+
}`);break;case 0:e.attributes.add("normal","vec3"),e.vertex.code.add(o.H`vec3 normalModel() {
|
|
680
|
+
return normal;
|
|
681
|
+
}`);break;default:t.normalType;case 2:case 3:}}},39014(e,t,r){r.d(t,{K:()=>s});var o=r(43519),a=r(31821),n=r(93588),i=r(43616);function s(e,t){e.varyings.add("colorMixMode","int"),e.varyings.add("opacityMixMode","int"),e.vertex.uniforms.add(new n.c("symbolColorMixMode",e=>i.Um[e.colorMixMode])),t.hasSymbolColors?(e.vertex.include(o.WD),e.vertex.include(o.Y1),e.vertex.include(o.ML),e.attributes.add("symbolColor","vec4"),e.vertex.code.add(a.H`
|
|
682
|
+
MaskedColor applySymbolColor(MaskedColor color) {
|
|
683
|
+
return multiplyMaskedColors(color, createMaskedFromUInt8NaNColor(${"symbolColor"}));
|
|
684
|
+
}
|
|
685
|
+
`)):e.vertex.code.add(a.H`MaskedColor applySymbolColor(MaskedColor color) {
|
|
686
|
+
return color;
|
|
687
|
+
}`),e.vertex.code.add(a.H`
|
|
688
|
+
void forwardColorMixMode(bvec4 mask) {
|
|
689
|
+
colorMixMode = mask.r ? ${a.H.int(i.Um.ignore)} : symbolColorMixMode;
|
|
690
|
+
opacityMixMode = mask.a ? ${a.H.int(i.Um.ignore)} : symbolColorMixMode;
|
|
691
|
+
}
|
|
692
|
+
`)}},53466(e,t,r){r.d(t,{U:()=>a});var o=r(31821);function a(e,t){switch(t.textureCoordinateType){case 1:return e.attributes.add("uv0","vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(o.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(o.H`void forwardTextureCoordinates() {
|
|
693
|
+
vuv0 = uv0;
|
|
694
|
+
vuvRegion = uvRegion;
|
|
695
|
+
}`);default:t.textureCoordinateType;case 0:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case 3:return}}},92700(e,t,r){r.d(t,{c:()=>a});var o=r(31821);function a(e,t){t.hasVertexColors?(e.attributes.add("color","vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(o.H`void forwardVertexColor() { vColor = color; }`)):e.vertex.code.add(o.H`void forwardVertexColor() {}`)}},72824(e,t,r){r.d(t,{Mh:()=>c,Zo:()=>u,gy:()=>d});var o=r(29242),a=r(91829),n=r(96336),i=r(28682),s=r(31821),l=r(35644);function c(e,t){const{vertex:r,varyings:o}=e;switch(t.normalType){case 0:case 1:e.include(n.Y,t),o.add("vNormalWorld","vec3"),o.add("vNormalView","vec3"),r.uniforms.add(new l.k("transformNormalViewFromGlobal",e=>e.transformNormalViewFromGlobal)),r.code.add(s.H`void forwardNormal() {
|
|
696
|
+
vNormalWorld = normalModel();
|
|
697
|
+
vNormalView = transformNormalViewFromGlobal * vNormalWorld;
|
|
698
|
+
}`);break;case 2:e.vertex.code.add(s.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class u extends i.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,o.vt)()}}class d extends i.EM{constructor(){super(...arguments),this.toMapSpace=(0,a.vt)()}}},28682(e,t,r){r.d(t,{EM:()=>l,dO:()=>s});var o=r(29242),a=r(51850),n=(r(26425),r(40710),r(33079),r(31821),r(74333));n.n,n.n,r(35644),r(58029),r(63761);var i=r(65786);class s extends i.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,a.vt)(),this.transformWorldFromViewTL=(0,a.vt)(),this.transformViewFromCameraRelativeRS=(0,o.vt)()}}class l extends i.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,o.vt)(),this.transformWorldFromModelTH=(0,a.vt)(),this.transformWorldFromModelTL=(0,a.vt)(),this.transformationDrawId=0}}},99208(e,t,r){r.d(t,{r:()=>i});var o=r(53466),a=r(31821);function n(e){e.fragment.code.add(a.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
|
|
699
|
+
vec2 atlasScale = atlasRegion.zw - atlasRegion.xy;
|
|
700
|
+
vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy;
|
|
701
|
+
float maxdUV = 0.125;
|
|
702
|
+
vec2 dUVdx = clamp(dFdx(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
703
|
+
vec2 dUVdy = clamp(dFdy(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
704
|
+
return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
|
|
705
|
+
}`)}function i(e,t){const{textureCoordinateType:r}=t;if(0===r||3===r)return;e.include(o.U,t);const i=2===r;i&&e.include(n),e.fragment.code.add(a.H`
|
|
706
|
+
vec4 textureLookup(sampler2D tex, vec2 uv) {
|
|
707
|
+
return ${i?"textureAtlasLookup(tex, uv, vuvRegion)":"texture(tex, uv)"};
|
|
708
|
+
}
|
|
709
|
+
`)}},35640(e,t,r){r.d(t,{Ge:()=>c}),r(90629);var o=r(78955),a=r(91829),n=r(52587),i=r(77949),s=r(71988),l=r(31821);function c(e,t){const r=e.vertex;t.hasVerticalOffset?(function(e){e.uniforms.add(new s.E("verticalOffset",(e,t)=>{const{minWorldLength:r,maxWorldLength:a,screenLength:n}=e.verticalOffset,i=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),s=t.camera.pixelRatio||1;return(0,o.hZ)(u,n*s,i,r,a)}))}(r),t.hasScreenSizePerspective&&(e.include(n.Y6),(0,n.OH)(r),(0,i.yu)(e.vertex,t)),r.code.add(l.H`
|
|
710
|
+
vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
711
|
+
float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);
|
|
712
|
+
${t.spherical?l.H`vec3 worldNormal = normalize(worldPos + localOrigin);`:l.H`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`}
|
|
713
|
+
${t.hasScreenSizePerspective?l.H`
|
|
714
|
+
float cosAngle = dot(worldNormal, normalize(worldPos - cameraPosition));
|
|
715
|
+
float verticalOffsetScreenHeight = screenSizePerspectiveScaleFloat(verticalOffset.x, abs(cosAngle), viewDistance, screenSizePerspectiveAlignment);`:l.H`
|
|
716
|
+
float verticalOffsetScreenHeight = verticalOffset.x;`}
|
|
717
|
+
// Screen sized offset in world space, used for example for line callouts
|
|
718
|
+
float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * viewDistance, verticalOffset.z, verticalOffset.w);
|
|
719
|
+
return worldNormal * worldOffset;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
723
|
+
return worldPos + calculateVerticalOffset(worldPos, localOrigin);
|
|
724
|
+
}
|
|
725
|
+
`)):r.code.add(l.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const u=(0,a.vt)()},40261(e,t,r){r.d(t,{E:()=>g});var o=r(33120),a=r(34711),n=r(76597),i=r(96336),s=r(36782),l=r(53466),c=r(72824),u=r(31821);function d(e,t){switch(t.output){case 5:case 6:case 7:case 8:e.fragment.code.add(u.H`float _calculateFragDepth(const in float depth) {
|
|
726
|
+
const float slope_scale = 2.0;
|
|
727
|
+
const float bias = 20.0 * .000015259;
|
|
728
|
+
float m = max(abs(dFdx(depth)), abs(dFdy(depth)));
|
|
729
|
+
return depth + slope_scale * m + bias;
|
|
730
|
+
}
|
|
731
|
+
void outputDepth(float _linearDepth){
|
|
732
|
+
float fragDepth = _calculateFragDepth(_linearDepth);
|
|
733
|
+
gl_FragDepth = fragDepth;
|
|
734
|
+
}`);break;case 9:e.fragment.code.add(u.H`void outputDepth(float _linearDepth){
|
|
735
|
+
gl_FragDepth = _linearDepth;
|
|
736
|
+
}`)}}var h=r(3871),m=r(43259),f=r(58614),p=r(77949),v=r(63761);function g(e,t){const{vertex:r,fragment:g,varyings:x}=e,{hasColorTexture:b,alphaDiscardMode:y}=t,w=b&&1!==y,{output:M,normalType:S,hasColorTextureTransform:T}=t;switch(M){case 3:(0,p.NB)(r,t),e.include(n.d),g.include(a.HQ,t),e.include(l.U,t),w&&g.uniforms.add(new v.N("tex",e=>e.texture)),r.main.add(u.H`vpos = getVertexInLocalOriginSpace();
|
|
737
|
+
vpos = subtractOrigin(vpos);
|
|
738
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
739
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
740
|
+
forwardTextureCoordinates();`),e.include(f.SS,t),g.main.add(u.H`
|
|
741
|
+
discardBySlice(vpos);
|
|
742
|
+
${(0,u.If)(w,u.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
|
|
743
|
+
discardOrAdjustAlpha(texColor);`)}`);break;case 5:case 6:case 7:case 8:case 11:(0,p.NB)(r,t),e.include(n.d),e.include(l.U,t),e.include(m.A,t),e.include(d,t),g.include(a.HQ,t),e.include(s.g,t),(0,o.xJ)(e),x.add("depth","float",{invariant:!0}),w&&g.uniforms.add(new v.N("tex",e=>e.texture)),r.main.add(u.H`vpos = getVertexInLocalOriginSpace();
|
|
744
|
+
vpos = subtractOrigin(vpos);
|
|
745
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
746
|
+
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);
|
|
747
|
+
forwardTextureCoordinates();
|
|
748
|
+
forwardObjectAndLayerIdColor();`),e.include(f.SS,t),g.main.add(u.H`
|
|
749
|
+
discardBySlice(vpos);
|
|
750
|
+
${(0,u.If)(w,u.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
|
|
751
|
+
discardOrAdjustAlpha(texColor);`)}
|
|
752
|
+
${11===M?u.H`outputObjectAndLayerIdColor();`:u.H`outputDepth(depth);`}`);break;case 4:{(0,p.NB)(r,t),e.include(n.d),e.include(i.Y,t),e.include(c.Mh,t),e.include(l.U,t),e.include(m.A,t),w&&g.uniforms.add(new v.N("tex",e=>e.texture)),2===S&&x.add("vPositionView","vec3",{invariant:!0});const o=0===S||1===S;r.main.add(u.H`
|
|
753
|
+
vpos = getVertexInLocalOriginSpace();
|
|
754
|
+
${o?u.H`vNormalWorld = dpNormalView(vvLocalNormal(normalModel()));`:u.H`vPositionView = (view * vec4(vpos, 1.0)).xyz;`}
|
|
755
|
+
vpos = subtractOrigin(vpos);
|
|
756
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
757
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
758
|
+
forwardTextureCoordinates();`),g.include(a.HQ,t),e.include(f.SS,t),g.main.add(u.H`
|
|
759
|
+
discardBySlice(vpos);
|
|
760
|
+
${(0,u.If)(w,u.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
|
|
761
|
+
discardOrAdjustAlpha(texColor);`)}
|
|
762
|
+
|
|
763
|
+
${2===S?u.H`vec3 normal = screenDerivativeNormal(vPositionView);`:u.H`vec3 normal = normalize(vNormalWorld);
|
|
764
|
+
if (gl_FrontFacing == false){
|
|
765
|
+
normal = -normal;
|
|
766
|
+
}`}
|
|
767
|
+
fragColor = vec4(0.5 + 0.5 * normal, 1.0);`);break}case 10:(0,p.NB)(r,t),e.include(n.d),e.include(l.U,t),e.include(m.A,t),w&&g.uniforms.add(new v.N("tex",e=>e.texture)),r.main.add(u.H`vpos = getVertexInLocalOriginSpace();
|
|
768
|
+
vpos = subtractOrigin(vpos);
|
|
769
|
+
vpos = addVerticalOffset(vpos, localOrigin);
|
|
770
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
771
|
+
forwardTextureCoordinates();`),g.include(a.HQ,t),e.include(f.SS,t),e.include(h.Q,t),g.main.add(u.H`
|
|
772
|
+
discardBySlice(vpos);
|
|
773
|
+
${(0,u.If)(w,u.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
|
|
774
|
+
discardOrAdjustAlpha(texColor);`)}
|
|
775
|
+
calculateOcclusionAndOutputHighlight();`)}}},22911(e,t,r){r.d(t,{NL:()=>f});var o=r(34727),a=r(49255),n=r(99208),i=r(65261),s=r(40710),l=r(33079),c=r(28421),u=r(20304),d=r(31821),h=r(15976),m=r(63761);function f(e,t){if(!(0,a._o)(t.output))return;e.fragment.include(i.C);const{emissionSource:r,hasEmissiveTextureTransform:f,bindType:p}=t,v=3===r||4===r||5===r;v&&(e.include(n.r,t),e.fragment.uniforms.add(1===p?new m.N("texEmission",e=>e.textureEmissive):new h.o("texEmission",e=>e.textureEmissive)));const g=2===r||v;g&&e.fragment.uniforms.add(1===p?new l.t("emissiveBaseColor",e=>e.emissiveBaseColor):new s.W("emissiveBaseColor",e=>e.emissiveBaseColor));const x=0!==r;if(x&&7!==r&&6!==r&&4!==r&&5!==r){const t=e=>(0,o.qE)(e??0,0,16);e.fragment.uniforms.add(1===p?new u.m("emissiveStrength",e=>t(e.emissiveStrength)):new c.J("emissiveStrength",e=>t(e.emissiveStrength)))}const b=7===r,y=5===r,w=1===r||6===r||b;e.fragment.code.add(d.H`
|
|
776
|
+
vec4 getEmissions(vec3 symbolColor) {
|
|
777
|
+
vec4 emissions = ${g?y?"emissiveSource == 0 ? vec4(emissiveBaseColor, 1.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(emissiveBaseColor, 1.0)":w?b?"emissiveSource == 0 ? vec4(0.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(linearizeGamma(symbolColor), 1.0)":"vec4(0.0)"};
|
|
778
|
+
${(0,d.If)(v,`${(0,d.If)(y,`if(emissiveSource == 0) {\n vec4 emissiveFromTex = textureLookup(texEmission, ${f?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);\n }`,`vec4 emissiveFromTex = textureLookup(texEmission, ${f?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);`)}\n emissions.a = emissions.rgb == vec3(0.0) ? 0.0: emissions.a;`)}
|
|
779
|
+
${(0,d.If)(x,`emissions.rgb *= emissiveStrength * ${d.H.float(1)};`)}
|
|
780
|
+
return emissions;
|
|
781
|
+
}
|
|
782
|
+
`)}r(66211)},52540(e,t,r){r.d(t,{E:()=>s,l:()=>l});var o=r(37585),a=r(48163),n=r(77108),i=r(31821);function s(e){e.uniforms.add(new n.E("zProjectionMap",e=>l(e.camera))),e.code.add(i.H`float linearizeDepth(float depth, vec2 zProjectionConstants) {
|
|
783
|
+
float depthNdc = depth * 2.0 - 1.0;
|
|
784
|
+
return -(zProjectionConstants[0] / (depthNdc + zProjectionConstants[1] + 1e-7));
|
|
785
|
+
}
|
|
786
|
+
float linearizeDepth(float depth) {
|
|
787
|
+
return linearizeDepth(depth, zProjectionMap);
|
|
788
|
+
}`),e.code.add(i.H`float delinearizeDepth(float linearDepth) {
|
|
789
|
+
float c1 = zProjectionMap[0];
|
|
790
|
+
float c2 = zProjectionMap[1];
|
|
791
|
+
float depthNdc = (-c1/linearDepth) - c2 - 1e-7;
|
|
792
|
+
float depthNonlinear01 = (depthNdc + 1.0 ) / 2.0;
|
|
793
|
+
return depthNonlinear01;
|
|
794
|
+
}`),e.code.add(i.H`float depthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
795
|
+
ivec2 iuv = ivec2(uv * vec2(textureSize(depthTexture, 0)));
|
|
796
|
+
return texelFetch(depthTexture, iuv, 0).r;
|
|
797
|
+
}`),e.code.add(i.H`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
798
|
+
return linearizeDepth(depthFromTexture(depthTexture, uv));
|
|
799
|
+
}`)}function l(e){const t=e.projectionMatrix;return(0,o.hZ)(c,t[14],t[10])}const c=(0,a.vt)()},92573(e,t,r){r.d(t,{V:()=>i});var o=r(52540),a=r(77108),n=r(31821);function i(e){e.include(o.E),e.uniforms.add(new a.E("zProjectionMapLastFrame",e=>(0,o.l)(e.reprojection.lastFrameCamera))),e.code.add(n.H`float linearDepthFromTextureLastFrame(sampler2D depthTexture, vec2 uv) {
|
|
800
|
+
return linearizeDepth(depthFromTexture(depthTexture, uv), zProjectionMapLastFrame);
|
|
801
|
+
}`)}},77695(e,t,r){r.d(t,{J:()=>h});var o=r(29242),a=r(48163),n=r(99208),i=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){const r=e.fragment,{hasVertexTangents:h,doubleSidedMode:m,hasNormalTexture:f,textureCoordinateType:p,bindType:v,hasNormalTextureTransform:g}=t;h?(e.attributes.add("tangent","vec4"),e.varyings.add("vTangent","vec4"),2===m?r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
802
|
+
float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
|
|
803
|
+
vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz);
|
|
804
|
+
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
805
|
+
return mat3(tangent, bitangent, normal);
|
|
806
|
+
}`):r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
807
|
+
float tangentHeadedness = vTangent.w;
|
|
808
|
+
vec3 tangent = normalize(vTangent.xyz);
|
|
809
|
+
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
810
|
+
return mat3(tangent, bitangent, normal);
|
|
811
|
+
}`)):r.code.add(l.H`mat3 computeTangentSpace(vec3 normal, vec3 pos, vec2 st) {
|
|
812
|
+
vec3 Q1 = dFdx(pos);
|
|
813
|
+
vec3 Q2 = dFdy(pos);
|
|
814
|
+
vec2 stx = dFdx(st);
|
|
815
|
+
vec2 sty = dFdy(st);
|
|
816
|
+
float det = stx.t * sty.s - sty.t * stx.s;
|
|
817
|
+
vec3 T = stx.t * Q2 - sty.t * Q1;
|
|
818
|
+
T = T - normal * dot(normal, T);
|
|
819
|
+
T *= inversesqrt(max(dot(T,T), 1.e-10));
|
|
820
|
+
vec3 B = sign(det) * cross(normal, T);
|
|
821
|
+
return mat3(T, B, normal);
|
|
822
|
+
}`),f&&0!==p&&(e.include(n.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??a.Un):new i.t("scale",e=>e.scale??a.Un)),r.uniforms.add(new c.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??o.zK))),r.code.add(l.H`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
|
|
823
|
+
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,
|
|
824
|
+
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
825
|
+
0.0, 0.0, 0.0 );
|
|
826
|
+
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(l.H`return tangentSpace * rawNormal;
|
|
827
|
+
}`))}(e,t)}},72233(e,t,r){r.d(t,{n:()=>D});var o=r(31821),a=r(12791),n=r(5482),i=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),h=r(63666),m=r(78607),f=r(15581),p=r(13840),v=r(98958),g=r(95774),x=r(90644);let b=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(g.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};b=(0,n.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],b);var y=r(48163),w=r(65786);class M extends w.Y{constructor(){super(...arguments),this.projScale=1}}class S extends M{constructor(){super(...arguments),this.intensity=1}}class T extends w.Y{}class C extends T{constructor(){super(...arguments),this.blurSize=(0,y.vt)()}}let _=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(f.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};_=(0,n.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],_),r(63907);var I=r(21231),P=r(67171);let z=class extends m.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=h.OG.AMBIENT_ILLUMINATION,this._enableTime=(0,c.l5)(0),this._passParameters=new S,this._drawParameters=new C}initialize(){const 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 P.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new I.A(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this.view.stage.renderer.hasAmbientIllumination,()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(33306);if(!r||!o)return;const a=this.techniques.getCompiled(_),n=this.techniques.getCompiled(b);if(!a||!n)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,m=u.camera,p=m.relativeElevation,v=(0,i.qE)((5e5-p)/2e5,0,1),g=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,x=g*v;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/m.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*R/(0,f.g)(m)**6*x;const y=m.fullViewport[2],w=m.fullViewport[3],M=this.fboCache.acquire(y,w,"ssao input",2);s.bindFramebuffer(M.fbo),s.setViewport(0,0,y,w),s.bindTechnique(a,u,this._passParameters,this._drawParameters),s.screen.draw();const S=Math.round(y/2),T=Math.round(w/2),C=this.fboCache.acquire(S,T,"ssao blur",0);s.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=M.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/w),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.setViewport(0,0,S,T),s.screen.draw(),M.release();const I=this.fboCache.acquire(S,T,h.OG.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(I.fbo),s.setViewport(0,0,y,w),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=C.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/y,0),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.setViewport(0,0,S,T),s.screen.draw(),s.setViewport4fv(m.fullViewport),C.release(),g<1&&this.requestRender(2),I}};(0,n.Cg)([(0,u.MZ)()],z.prototype,"consumes",void 0),(0,n.Cg)([(0,u.MZ)()],z.prototype,"produces",void 0),z=(0,n.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],z);const R=.5;function D(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new a.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(o.H`float evaluateAmbientOcclusionInverse() {
|
|
828
|
+
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
829
|
+
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
830
|
+
}
|
|
831
|
+
float evaluateAmbientOcclusion() {
|
|
832
|
+
return 1.0 - evaluateAmbientOcclusionInverse();
|
|
833
|
+
}`)):e.code.add(o.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
|
|
834
|
+
float evaluateAmbientOcclusion() { return 0.0; }`)}},32971(e,t,r){r.d(t,{kA:()=>W,a8:()=>H,eU:()=>N});var o=r(74333);class a extends o.n{constructor(e,t,r,o){super(e,"float",0,(t,a)=>t.setUniform1fv(e,r(a),o),t)}}var n=r(31821);function i(e,t){e.uniforms.add(new a("shR",9,({lighting:e})=>e.sh.r),new a("shG",9,({lighting:e})=>e.sh.g),new a("shB",9,({lighting:e})=>e.sh.b)),e.code.add(n.H`vec3 calculateAmbientIrradiance(vec3 normal) {
|
|
835
|
+
vec3 ambientLight = 0.282095 * vec3(shR[0], shG[0], shB[0]);
|
|
836
|
+
vec4 sh1 = vec4(
|
|
837
|
+
0.488603 * normal.x,
|
|
838
|
+
0.488603 * normal.z,
|
|
839
|
+
0.488603 * normal.y,
|
|
840
|
+
1.092548 * normal.x * normal.y
|
|
841
|
+
);
|
|
842
|
+
vec4 sh2 = vec4(
|
|
843
|
+
1.092548 * normal.y * normal.z,
|
|
844
|
+
0.315392 * (3.0 * normal.z * normal.z - 1.0),
|
|
845
|
+
1.092548 * normal.x * normal.z,
|
|
846
|
+
0.546274 * (normal.x * normal.x - normal.y * normal.y)
|
|
847
|
+
);
|
|
848
|
+
vec4 lightingAmbientSH_R1 = vec4(shR[1], shR[2], shR[3], shR[4]);
|
|
849
|
+
vec4 lightingAmbientSH_G1 = vec4(shG[1], shG[2], shG[3], shG[4]);
|
|
850
|
+
vec4 lightingAmbientSH_B1 = vec4(shB[1], shB[2], shB[3], shB[4]);
|
|
851
|
+
ambientLight += vec3(
|
|
852
|
+
dot(lightingAmbientSH_R1, sh1),
|
|
853
|
+
dot(lightingAmbientSH_G1, sh1),
|
|
854
|
+
dot(lightingAmbientSH_B1, sh1)
|
|
855
|
+
);
|
|
856
|
+
vec4 lightingAmbientSH_R2 = vec4(shR[5], shR[6], shR[7], shR[8]);
|
|
857
|
+
vec4 lightingAmbientSH_G2 = vec4(shG[5], shG[6], shG[7], shG[8]);
|
|
858
|
+
vec4 lightingAmbientSH_B2 = vec4(shB[5], shB[6], shB[7], shB[8]);
|
|
859
|
+
ambientLight += vec3(
|
|
860
|
+
dot(lightingAmbientSH_R2, sh2),
|
|
861
|
+
dot(lightingAmbientSH_G2, sh2),
|
|
862
|
+
dot(lightingAmbientSH_B2, sh2)
|
|
863
|
+
);
|
|
864
|
+
return ambientLight;
|
|
865
|
+
}`),1!==t.pbrMode&&2!==t.pbrMode||e.code.add(n.H`const vec3 skyTransmittance = vec3(0.9, 0.9, 1.0);
|
|
866
|
+
vec3 calculateAmbientRadiance()
|
|
867
|
+
{
|
|
868
|
+
vec3 ambientLight = 1.2 * (0.282095 * vec3(shR[0], shG[0], shB[0])) - 0.2;
|
|
869
|
+
return ambientLight *= skyTransmittance;
|
|
870
|
+
}`)}var s=r(72233),l=r(65261),c=r(98619),u=r(22393),d=r(89786),h=r(32976),m=r(12791),f=r(5482),p=r(97768),v=r(36708),g=r(91429),x=r(37585),b=r(63666),y=r(78607),w=r(587),M=r(52516),S=r(13840),T=r(98958),C=r(90644);let _=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(M.a,()=>r.e(2013).then(r.bind(r,42013)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};_=(0,f.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationBlurTechnique")],_);let I=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(w.a,()=>r.e(9794).then(r.bind(r,89794)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};I=(0,f.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationTechnique")],I);var P=r(51976);class z extends P.K{constructor(){super(...arguments),this.hasColor=!0,this.hasEmission=!1,this.rayMarchMaxReach=.5,this.rayMarchMaxSteps=16,this.useProjectedRayLength=!0,this.clampRayToScreen=!1}}(0,f.Cg)([(0,P.W)()],z.prototype,"hasColor",void 0),(0,f.Cg)([(0,P.W)()],z.prototype,"hasEmission",void 0);var R=r(50704);let D=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(R.a,()=>r.e(7891).then(r.bind(r,37891)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};D=(0,f.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationUpscaleTechnique")],D),r(63907);let F=class extends y.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=b.OG.AMBIENT_ILLUMINATION,this._passParameters=new w.G,this._drawParameters=new M.G,this._drawParametersUpscale=new R.G,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new z,this._globalIllumination=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles((0,v.wB)(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._resetAccumulatedFrames(),this._requestRender()},v.pc))}destroy(){this._globalIllumination=(0,p.Gz)(this._globalIllumination)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||this._resetAccumulatedFrames()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._globalIllumination?.retain(),this._globalIllumination;const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(33306),a=this._mode;if(!r||!o)return this._emptyOutput;if(0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const n=this.bindParameters;this._configuration.hasEmission=!!n.reprojection.lastFrameEmission;const i=this.techniques.getCompiled(I,this._configuration),s=this.techniques.getCompiled(_),l=1===a,c=l?this._lowQualityResolutionScale:1,u=l?this.techniques.getCompiled(D):null;if(!i||!s||l&&!u)return this._requestRender(),this._emptyOutput;const d=this.renderingContext,{camera:h}=n;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=c;const{fullWidth:m,fullHeight:f}=h,p=Math.max(1,Math.floor(m*c)),v=Math.max(1,Math.floor(f*c)),g=this.fboCache.acquire(p,v,"global illumination input").acquireColor(36065,0);d.bindFramebuffer(g.fbo),d.setViewport(0,0,p,v),d.bindTechnique(i,n,this._passParameters,this._drawParameters),d.screen.draw();const y=g.obtainAttachment(36065),w=Math.max(1,Math.round(p/1)),M=Math.max(1,Math.round(v/1)),S=this.fboCache.acquire(w,M,"global illumination blur horizontal");d.bindFramebuffer(S.fbo),this._drawParameters.texture=g.getTexture(),this._drawParameters.weightTexture=y.attachment,(0,x.hZ)(this._drawParameters.blurSize,0,1/v),d.bindTechnique(s,n,this._passParameters,this._drawParameters),d.setViewport(0,0,w,M),d.screen.draw(),g.release();const T=l?"global illumination blur vertical":b.OG.AMBIENT_ILLUMINATION,C=this.fboCache.acquire(w,M,T);d.bindFramebuffer(C.fbo),d.setViewport(0,0,w,M),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParameters.texture=S.getTexture(),this._drawParameters.weightTexture=y.attachment,(0,x.hZ)(this._drawParameters.blurSize,1/w,0),d.bindTechnique(s,n,this._passParameters,this._drawParameters),d.setViewport(0,0,w,M),d.screen.draw(),S.release(),C.attachColor(y,36065),y.release();let P=C;return u&&(P=this.fboCache.acquire(m,f,b.OG.AMBIENT_ILLUMINATION).acquireColor(36065,0),d.bindFramebuffer(P.fbo),d.setViewport(0,0,m,f),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParametersUpscale.colorTexture=C.getTexture(),this._drawParametersUpscale.weightTexture=C.getTexture(36065),d.bindTechnique(u,n,this._passParameters,this._drawParametersUpscale),d.screen.draw(),C.release()),d.setViewport4fv(h.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._cacheGlobalIllumination(P),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),P}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_cacheGlobalIllumination(e){this._globalIllumination!==e&&(this._globalIllumination=(0,p.Gz)(this._globalIllumination),this._globalIllumination=e,this._globalIllumination.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,o=this.fboCache.acquire(t,r,b.OG.AMBIENT_ILLUMINATION).acquireColor(36065,0);return e.bindFramebuffer(o.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),o}get _canRender(){const{reprojection:e,hasEmission:t,globalIllumination:r}=this.bindParameters;return!(!e.lastFrameColor||t&&!e.lastFrameEmission||!e.lastFrameDepth||!r||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_resetAccumulatedFrames(){this._passParameters.accumulatedFrames=0,this._globalIllumination=(0,p.Gz)(this._globalIllumination)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._resetAccumulatedFrames(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};function O(e,t){t.receiveGlobalIllumination?(e.uniforms.add(new h.o("hasGlobalIlluminationTexture",e=>null!=e.globalIllumination),new m.x("globalIlluminationTexture",e=>e.globalIllumination?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1),e.code.add(n.H`vec3 readGlobalIlluminationOcclusionInverse() {
|
|
871
|
+
if (!hasGlobalIlluminationTexture) {
|
|
872
|
+
return vec3(1.0);
|
|
873
|
+
}
|
|
874
|
+
ivec2 texel = ivec2(gl_FragCoord.xy * blurSizePixelsInverse);
|
|
875
|
+
return vec3(texelFetch(globalIlluminationTexture, texel, 0).a);
|
|
876
|
+
}
|
|
877
|
+
vec3 readGlobalIlluminationOcclusion() {
|
|
878
|
+
return 1.0 - readGlobalIlluminationOcclusionInverse();
|
|
879
|
+
}
|
|
880
|
+
vec4 readGlobalIlluminationEmissionInverse() {
|
|
881
|
+
if (!hasGlobalIlluminationTexture) {
|
|
882
|
+
return vec4(1.0);
|
|
883
|
+
}
|
|
884
|
+
ivec2 texel = ivec2(gl_FragCoord.xy * blurSizePixelsInverse);
|
|
885
|
+
return 1.0 - vec4(texelFetch(globalIlluminationTexture, texel, 0).rgb, 0.0);
|
|
886
|
+
}
|
|
887
|
+
vec4 readGlobalIlluminationEmission() {
|
|
888
|
+
return max((1.0 - readGlobalIlluminationEmissionInverse() - 0.01) / 0.99, 0.0);
|
|
889
|
+
}`)):e.code.add(n.H`vec3 readGlobalIlluminationOcclusionInverse() { return vec3(1.0); }
|
|
890
|
+
vec3 readGlobalIlluminationOcclusion() { return vec3(0.0); }
|
|
891
|
+
vec4 readGlobalIlluminationEmissionInverse() { return vec4(1.0); }
|
|
892
|
+
vec4 readGlobalIlluminationEmission() { return vec4(0.0); }`)}(0,f.Cg)([(0,g.MZ)()],F.prototype,"consumes",void 0),(0,f.Cg)([(0,g.MZ)()],F.prototype,"produces",void 0),F=(0,f.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],F);var j=r(33094);function E(e){e.code.add(n.H`float mapChannel(float x, vec2 p) {
|
|
893
|
+
if((x < p.x) && (p.x == 0.0) || !(x < p.x) && (p.x == 1.0)) {
|
|
894
|
+
return 0.0;
|
|
895
|
+
}
|
|
896
|
+
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) );
|
|
897
|
+
return max(result, 0.0);
|
|
898
|
+
}`),e.code.add(n.H`vec3 blackLevelSoftCompression(vec3 color, float averageAmbientRadiance) {
|
|
899
|
+
vec2 p = vec2(0.02, 0.0075) * averageAmbientRadiance;
|
|
900
|
+
return vec3(mapChannel(color.x, p), mapChannel(color.y, p), mapChannel(color.z, p));
|
|
901
|
+
}`)}function B(e){e.code.add(n.H`vec3 tonemapACES(vec3 x) {
|
|
902
|
+
return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
|
|
903
|
+
}`),e.code.add(n.H`vec3 tonemapKhronosNeutral(vec3 color) {
|
|
904
|
+
const float startCompression = 0.76;
|
|
905
|
+
const float desaturation = 0.15;
|
|
906
|
+
float peak = max(color.r, max(color.g, color.b));
|
|
907
|
+
if (peak < startCompression) {
|
|
908
|
+
return color;
|
|
909
|
+
}
|
|
910
|
+
float d = 1.0 - startCompression;
|
|
911
|
+
float newPeak = 1.0 - d * d / (peak + d - startCompression);
|
|
912
|
+
color *= newPeak / peak;
|
|
913
|
+
float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0 );
|
|
914
|
+
return mix(color, vec3(newPeak), g);
|
|
915
|
+
}`)}function H(e){e.constants.add("ambientBoostFactor","float",.4)}function N(e){e.uniforms.add(new j.U("lightingGlobalFactor",e=>e.lighting.globalFactor))}function W(e,t){const{pbrMode:r,spherical:o,hasColorTexture:a,receiveGlobalIllumination:m}=t;e.include(l.C),e.include(O,t),e.include(s.n,t),0!==r&&e.include(u.c,t),e.include(i,t),e.include(d.p),e.include(B,t);const f=!(2===r&&!a);f&&e.include(E),H(e),N(e),(0,c.Gc)(e),e.code.add(n.H`
|
|
916
|
+
float additionalDirectedAmbientLight(float lightAlignment) {
|
|
917
|
+
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
float additionalDirectedAmbientLight(vec3 vPosWorld) {
|
|
921
|
+
float lightAlignment = dot(${o?n.H`normalize(vPosWorld)`:n.H`vec3(0.0, 0.0, 1.0)`}, mainLightDirection);
|
|
922
|
+
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
923
|
+
}
|
|
924
|
+
`),(0,c.O4)(e),e.code.add(n.H`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
|
|
925
|
+
float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
|
|
926
|
+
return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * mainLightIntensity;
|
|
927
|
+
}`);const p=m?"globalIlluminationOcclusion":"ssao",v=m?.75:1,g=m?1.5:1;switch(r){case 0:case 4:case 3:e.include(c.Vt),e.code.add(n.H`vec3 evaluateSceneLighting(vec3 normalWorld, vec3 albedo, float shadow, float ssao, vec3 additionalLight) {
|
|
928
|
+
vec3 mainLighting = applyShading(normalWorld, shadow);
|
|
929
|
+
vec3 ambientLighting = calculateAmbientIrradiance(normalWorld) * (1.0 - ssao);
|
|
930
|
+
vec3 albedoLinear = linearizeGamma(albedo);
|
|
931
|
+
vec3 totalLight = mainLighting + ambientLighting + additionalLight;
|
|
932
|
+
totalLight = min(totalLight, vec3(PI));
|
|
933
|
+
vec3 outColor = vec3((albedoLinear / PI) * totalLight);
|
|
934
|
+
return delinearizeGamma(outColor);
|
|
935
|
+
}`);break;case 1:case 2:{const r=m?.35:.2;e.code.add(n.H`
|
|
936
|
+
const float fillLightIntensity = 0.25;
|
|
937
|
+
const float horizonLightDiffusion = 0.4;
|
|
938
|
+
const float additionalAmbientIrradianceFactor = 0.02;
|
|
939
|
+
const float groundReflectance = ${n.H.float(r)};
|
|
940
|
+
|
|
941
|
+
vec3 evaluateSceneLightingPBR(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
|
|
942
|
+
vec3 viewDirection, vec3 upDirection, vec3 mrr, float additionalAmbientIrradiance) {
|
|
943
|
+
PBRShadingInfo inputs;
|
|
944
|
+
calculatePBRInputs(inputs, normal, viewDirection, upDirection, albedo, mrr);
|
|
945
|
+
|
|
946
|
+
${(0,n.If)(m,n.H`vec3 globalIlluminationOcclusion = min(1.2 * readGlobalIlluminationOcclusion(), 1.0);`)}
|
|
947
|
+
`),t.useFillLights?e.uniforms.add(new h.o("hasFillLights",e=>e.enableFillLights)):e.constants.add("hasFillLights","bool",!1),e.code.add(n.H`
|
|
948
|
+
vec3 ambientDir = vec3(5.0 * upDirection[1] - upDirection[0] * upDirection[2], - 5.0 * upDirection[0] - upDirection[2] * upDirection[1], upDirection[1] * upDirection[1] + upDirection[0] * upDirection[0]);
|
|
949
|
+
ambientDir = ambientDir != vec3(0.0) ? normalize(ambientDir) : normalize(vec3(5.0, -1.0, 0.0));
|
|
950
|
+
|
|
951
|
+
inputs.NdotAmbDir = hasFillLights ? abs(dot(normal, ambientDir)) : 1.0;
|
|
952
|
+
|
|
953
|
+
// Calculate the irradiance components: sun, fill lights and the sky.
|
|
954
|
+
vec3 mainLightIrradianceComponent = ${n.H.float(v)} * inputs.NdotL * (1.0 - shadow) * mainLightIntensity;
|
|
955
|
+
vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity;
|
|
956
|
+
// calculate ambient irradiance for localView and additionalLight for globalView
|
|
957
|
+
vec3 ambientLightIrradianceComponent = ${n.H.float(g)} * calculateAmbientIrradiance(normal) * (1.0 - ${p}) + additionalLight;
|
|
958
|
+
|
|
959
|
+
// Assemble the overall irradiance of the sky that illuminates the surface
|
|
960
|
+
inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
961
|
+
// 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
|
|
962
|
+
inputs.groundIrradianceToSurface = groundReflectance * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
963
|
+
`),e.uniforms.add(new j.U("lightingSpecularStrength",e=>e.lighting.mainLight.specularStrength),new j.U("lightingEnvironmentStrength",e=>e.lighting.mainLight.environmentStrength)).code.add(n.H`
|
|
964
|
+
vec3 horizonRingDir = inputs.RdotUP * upDirection - inputs.reflectedView;
|
|
965
|
+
vec3 horizonRingH = normalize(horizonRingDir - viewDirection);
|
|
966
|
+
inputs.NdotH_Horizon = dot(normal, horizonRingH);
|
|
967
|
+
|
|
968
|
+
vec3 mainLightRadianceComponent = lightingSpecularStrength * normalDistribution(inputs.NdotH, inputs.roughness) * mainLightIntensity * (1.0 - shadow);
|
|
969
|
+
vec3 horizonLightRadianceComponent = lightingEnvironmentStrength * normalDistribution(inputs.NdotH_Horizon, min(inputs.roughness + horizonLightDiffusion, 1.0)) * mainLightIntensity * fillLightIntensity;
|
|
970
|
+
|
|
971
|
+
// calculateAmbientRadiance for localView and additionalLight for global view
|
|
972
|
+
vec3 ambientLightRadianceComponent = lightingEnvironmentStrength * calculateAmbientRadiance() * (1.0 - ${p}) + additionalLight;
|
|
973
|
+
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));
|
|
974
|
+
|
|
975
|
+
// Assemble the overall radiance of the sky that illuminates the surface
|
|
976
|
+
inputs.skyRadianceToSurface = (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent;
|
|
977
|
+
|
|
978
|
+
// 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
|
|
979
|
+
inputs.groundRadianceToSurface = 0.5 * groundReflectance * (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent;
|
|
980
|
+
|
|
981
|
+
// Calculate average ambient radiance - This is used in the gamut mapping process to determine the black level for compression
|
|
982
|
+
inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + groundReflectance);
|
|
983
|
+
`),e.code.add(n.H`
|
|
984
|
+
vec3 reflectedColorComponent = evaluateEnvironmentIllumination(inputs);
|
|
985
|
+
vec3 additionalMaterialReflectanceComponent = inputs.albedoLinear * additionalAmbientIrradiance;
|
|
986
|
+
vec3 outColorLinear = reflectedColorComponent + additionalMaterialReflectanceComponent;
|
|
987
|
+
|
|
988
|
+
${(0,n.If)(m,n.H`
|
|
989
|
+
vec3 globalIlluminationEmission = 2.25 * (0.75 * inputs.albedoLinear + 0.25) * readGlobalIlluminationEmission().rgb;
|
|
990
|
+
outColorLinear += globalIlluminationEmission;`)}
|
|
991
|
+
|
|
992
|
+
${f?n.H`vec3 adjustedOutColorLinear = blackLevelSoftCompression(outColorLinear, inputs.averageAmbientRadiance);`:n.H`vec3 adjustedOutColorLinear = max(vec3(0.0), outColorLinear - 0.005 * inputs.averageAmbientRadiance);`}
|
|
993
|
+
|
|
994
|
+
return delinearizeGamma(adjustedOutColorLinear);
|
|
995
|
+
}
|
|
996
|
+
`);break}case 5:case 6:{const t=m?.35:.5,r=m?.75:1,o=m?1.5:1;(0,c.Gc)(e),(0,c.O4)(e),e.code.add(n.H`
|
|
997
|
+
const float roughnessTerrain = 0.5;
|
|
998
|
+
const float specularityTerrain = ${n.H.float(t)};
|
|
999
|
+
|
|
1000
|
+
vec3 evaluatePBRSimplifiedLighting(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight, vec3 viewDirection, vec3 upDirection) {
|
|
1001
|
+
PBRShadingInfo inputs;
|
|
1002
|
+
calculateSimplifiedInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
1003
|
+
|
|
1004
|
+
${(0,n.If)(m,n.H`vec3 globalIlluminationOcclusion = min(1.2 * readGlobalIlluminationOcclusion(), 1.0);`)}
|
|
1005
|
+
|
|
1006
|
+
vec3 mainLightIrradianceComponent = ${n.H.float(r)} * (1.0 - shadow) * inputs.NdotL * mainLightIntensity;
|
|
1007
|
+
vec3 ambientLightIrradianceComponent = ${n.H.float(o)} * calculateAmbientIrradiance(normal) * (1.0 - ${p}) + additionalLight;
|
|
1008
|
+
vec3 ambientSky = ambientLightIrradianceComponent + mainLightIrradianceComponent;
|
|
1009
|
+
|
|
1010
|
+
vec3 indirectDiffuse = ((1.0 - inputs.NdotUP) * mainLightIrradianceComponent + (1.0 + inputs.NdotUP ) * ambientSky) * 0.5;
|
|
1011
|
+
vec3 outDiffColor = inputs.albedoLinear * (1.0 - inputs.f0) * indirectDiffuse / PI;
|
|
1012
|
+
|
|
1013
|
+
vec3 mainLightRadianceComponent = normalDistribution(inputs.NdotH, roughnessTerrain) * mainLightIntensity;
|
|
1014
|
+
vec2 dfg = prefilteredDFGAnalytical(roughnessTerrain, inputs.NdotV);
|
|
1015
|
+
vec3 specularColor = inputs.f0 * dfg.x + inputs.f90 * dfg.y;
|
|
1016
|
+
vec3 specularComponent = specularityTerrain * specularColor * mainLightRadianceComponent;
|
|
1017
|
+
|
|
1018
|
+
vec3 outColorLinear = outDiffColor + specularComponent;
|
|
1019
|
+
|
|
1020
|
+
${(0,n.If)(m,n.H`
|
|
1021
|
+
vec3 globalIlluminationEmission = 2.25 * (0.75 * inputs.albedoLinear + 0.25) * readGlobalIlluminationEmission().rgb;
|
|
1022
|
+
outColorLinear += globalIlluminationEmission;`)}
|
|
1023
|
+
|
|
1024
|
+
return delinearizeGamma(outColorLinear);
|
|
1025
|
+
}
|
|
1026
|
+
`);break}}}r(57226)},65261(e,t,r){r.d(t,{C:()=>n});var o=r(40876),a=r(31821);function n(e){e.constants.add("GAMMA","float",2.2).constants.add("INV_GAMMA","float",o.iw).code.add(a.H`vec3 delinearizeGamma(vec3 color) {
|
|
1027
|
+
return pow(color, vec3(INV_GAMMA));
|
|
1028
|
+
}
|
|
1029
|
+
vec4 delinearizeGamma(vec4 color) {
|
|
1030
|
+
return vec4(delinearizeGamma(color.rgb), color.a);
|
|
1031
|
+
}
|
|
1032
|
+
vec3 linearizeGamma(vec3 color) {
|
|
1033
|
+
return pow(color, vec3(GAMMA));
|
|
1034
|
+
}`)}},72885(e,t,r){r.d(t,{Q:()=>a});var o=r(31821);function a(e){e.fragment.code.add(o.H`
|
|
1035
|
+
float globalIlluminationNormalSimilarityWeight(vec3 sampleNormal, vec3 centerNormal) {
|
|
1036
|
+
return clamp(1.0 - ${o.H.float(15.3)} * length(sampleNormal - centerNormal), 0.0, 1.0);
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
float globalIlluminationDepthNormalCorrection(vec3 encodedNormal) {
|
|
1040
|
+
vec3 decodedNormal = normalize(encodedNormal * 2.0 - 1.0);
|
|
1041
|
+
return pow(max((1.0 - abs(decodedNormal.x)) * (1.0 - abs(decodedNormal.y)), 0.01), ${o.H.float(5)});
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
float globalIlluminationDepthSharpness(float projScale, float depth) {
|
|
1045
|
+
return ${o.H.float(-.05)} * projScale / depth;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
float globalIlluminationDepthSharpness(float projScale, float depth, vec3 encodedNormal) {
|
|
1049
|
+
return globalIlluminationDepthSharpness(projScale, depth) * globalIlluminationDepthNormalCorrection(encodedNormal);
|
|
1050
|
+
}
|
|
1051
|
+
`)}},98619(e,t,r){r.d(t,{Gc:()=>n,O4:()=>i,Vt:()=>s});var o=r(23205),a=r(31821);function n(e){e.uniforms.add(new o.d("mainLightDirection",e=>e.lighting.mainLight.direction))}function i(e){e.uniforms.add(new o.d("mainLightIntensity",e=>e.lighting.mainLight.intensity))}function s(e){n(e),i(e),e.code.add(a.H`vec3 applyShading(vec3 shadingNormal, float shadow) {
|
|
1052
|
+
float dotVal = clamp(dot(shadingNormal, mainLightDirection), 0.0, 1.0);
|
|
1053
|
+
return mainLightIntensity * ((1.0 - shadow) * dotVal);
|
|
1054
|
+
}`)}},62602(e,t,r){r.d(t,{r:()=>a});var o=r(31821);function a(e,t){const r=e.fragment;switch(r.code.add(o.H`struct ShadingNormalParameters {
|
|
1055
|
+
vec3 normalView;
|
|
1056
|
+
vec3 viewDirection;
|
|
1057
|
+
} shadingParams;`),t.doubleSidedMode){case 0:r.code.add(o.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
1058
|
+
return normalize(params.normalView);
|
|
1059
|
+
}`);break;case 1:r.code.add(o.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
1060
|
+
return dot(params.normalView, params.viewDirection) > 0.0 ? normalize(-params.normalView) : normalize(params.normalView);
|
|
1061
|
+
}`);break;case 2:r.code.add(o.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
1062
|
+
return gl_FrontFacing ? normalize(params.normalView) : normalize(-params.normalView);
|
|
1063
|
+
}`);break;default:t.doubleSidedMode;case 3:}}},22393(e,t,r){r.d(t,{c:()=>s});var o=r(31821);function a(e){e.code.add(o.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG) {
|
|
1064
|
+
return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5;
|
|
1065
|
+
}`),e.code.add(o.H`float integratedRadiance(float cosTheta2, float roughness) {
|
|
1066
|
+
return (cosTheta2 - 1.0) / (cosTheta2 * (1.0 - roughness * roughness) - 1.0);
|
|
1067
|
+
}`),e.code.add(o.H`vec3 evaluateSpecularIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float RdotNG, float roughness) {
|
|
1068
|
+
float cosTheta2 = 1.0 - RdotNG * RdotNG;
|
|
1069
|
+
float intRadTheta = integratedRadiance(cosTheta2, roughness);
|
|
1070
|
+
float ground = RdotNG < 0.0 ? 1.0 - intRadTheta : 1.0 + intRadTheta;
|
|
1071
|
+
float sky = 2.0 - ground;
|
|
1072
|
+
return (ground * ambientGround + sky * ambientSky) * 0.5;
|
|
1073
|
+
}`)}var n=r(65261),i=r(89786);function s(e,t){e.include(n.C),e.include(i.p),1!==t.pbrMode&&2!==t.pbrMode&&5!==t.pbrMode&&6!==t.pbrMode||(e.code.add(o.H`float normalDistribution(float NdotH, float roughness)
|
|
1074
|
+
{
|
|
1075
|
+
float a = NdotH * roughness;
|
|
1076
|
+
float b = roughness / (1.0 - NdotH * NdotH + a * a);
|
|
1077
|
+
return b * b * INV_PI;
|
|
1078
|
+
}`),e.code.add(o.H`const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);
|
|
1079
|
+
const vec4 c1 = vec4( 1.0, 0.0425, 1.040, -0.040);
|
|
1080
|
+
const vec2 c2 = vec2(-1.04, 1.04);
|
|
1081
|
+
vec2 prefilteredDFGAnalytical(float roughness, float NdotV) {
|
|
1082
|
+
vec4 r = roughness * c0 + c1;
|
|
1083
|
+
float a004 = min(r.x * r.x, exp2(-9.28 * NdotV)) * r.x + r.y;
|
|
1084
|
+
return c2 * a004 + r.zw;
|
|
1085
|
+
}`),e.code.add(o.H`struct PBRShadingInfo
|
|
1086
|
+
{
|
|
1087
|
+
float NdotV;
|
|
1088
|
+
float NdotL;
|
|
1089
|
+
float LdotH;
|
|
1090
|
+
float NdotUP;
|
|
1091
|
+
float RdotUP;
|
|
1092
|
+
float NdotAmbDir;
|
|
1093
|
+
float NdotH_Horizon;
|
|
1094
|
+
float NdotH;
|
|
1095
|
+
vec3 skyRadianceToSurface;
|
|
1096
|
+
vec3 groundRadianceToSurface;
|
|
1097
|
+
vec3 skyIrradianceToSurface;
|
|
1098
|
+
vec3 groundIrradianceToSurface;
|
|
1099
|
+
vec3 reflectedView;
|
|
1100
|
+
float averageAmbientRadiance;
|
|
1101
|
+
vec3 albedoLinear;
|
|
1102
|
+
vec3 f0;
|
|
1103
|
+
vec3 f90;
|
|
1104
|
+
vec3 diffuseColor;
|
|
1105
|
+
float metalness;
|
|
1106
|
+
float roughness;
|
|
1107
|
+
};`),e.code.add(o.H`void calculateCommonInputs(out PBRShadingInfo inputs, vec3 normal, vec3 viewDirection, vec3 upDirection, vec3 albedo) {
|
|
1108
|
+
vec3 h = normalize(mainLightDirection - viewDirection);
|
|
1109
|
+
inputs.NdotV = clamp(abs(dot(normal, -viewDirection)), 0.001, 1.0);
|
|
1110
|
+
inputs.NdotUP = clamp(dot(normal, upDirection), -1.0, 1.0);
|
|
1111
|
+
inputs.reflectedView = normalize(reflect(-viewDirection, normal));
|
|
1112
|
+
inputs.RdotUP = clamp(dot(inputs.reflectedView, upDirection), -1.0, 1.0);
|
|
1113
|
+
inputs.albedoLinear = linearizeGamma(albedo);
|
|
1114
|
+
inputs.NdotH = clamp(dot(normal, h), 0.0, 1.0);
|
|
1115
|
+
inputs.NdotL = clamp(dot(normal, mainLightDirection), 0.001, 1.0);
|
|
1116
|
+
}`)),1!==t.pbrMode&&2!==t.pbrMode||(e.include(a),e.code.add(o.H`vec3 evaluateEnvironmentIllumination(PBRShadingInfo inputs) {
|
|
1117
|
+
vec3 indirectDiffuse = evaluateDiffuseIlluminationHemisphere(inputs.groundIrradianceToSurface, inputs.skyIrradianceToSurface, inputs.NdotUP);
|
|
1118
|
+
vec3 indirectSpecular = evaluateSpecularIlluminationHemisphere(inputs.groundRadianceToSurface, inputs.skyRadianceToSurface, inputs.RdotUP, inputs.roughness);
|
|
1119
|
+
vec3 diffuseComponent = inputs.diffuseColor * indirectDiffuse * INV_PI;
|
|
1120
|
+
vec2 dfg = prefilteredDFGAnalytical(inputs.roughness, inputs.NdotV);
|
|
1121
|
+
vec3 specularColor = inputs.f0 * dfg.x + inputs.f90 * dfg.y;
|
|
1122
|
+
vec3 specularComponent = specularColor * indirectSpecular;
|
|
1123
|
+
return (diffuseComponent + specularComponent);
|
|
1124
|
+
}`),e.code.add(o.H`void calculatePBRInputs(out PBRShadingInfo inputs, vec3 normal, vec3 viewDirection, vec3 upDirection, vec3 albedo, vec3 mrr) {
|
|
1125
|
+
calculateCommonInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
1126
|
+
inputs.metalness = mrr[0];
|
|
1127
|
+
inputs.roughness = clamp(mrr[1] * mrr[1], 0.001, 0.99);
|
|
1128
|
+
inputs.f0 = (0.16 * mrr[2] * mrr[2]) * (1.0 - inputs.metalness) + inputs.albedoLinear * inputs.metalness;
|
|
1129
|
+
inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
|
|
1130
|
+
inputs.diffuseColor = inputs.albedoLinear * (vec3(1.0) - inputs.f0) * (1.0 - inputs.metalness);
|
|
1131
|
+
}`)),5!==t.pbrMode&&6!==t.pbrMode||e.code.add(o.H`const vec3 fresnelReflectionSimplified = vec3(0.04);
|
|
1132
|
+
void calculateSimplifiedInputs(out PBRShadingInfo inputs, vec3 normal, vec3 viewDirection, vec3 upDirection, vec3 albedo) {
|
|
1133
|
+
calculateCommonInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
1134
|
+
float lightness = 0.3 * inputs.albedoLinear[0] + 0.5 * inputs.albedoLinear[1] + 0.2 * inputs.albedoLinear[2];
|
|
1135
|
+
inputs.f0 = (0.85 * lightness + 0.15) * fresnelReflectionSimplified;
|
|
1136
|
+
inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
|
|
1137
|
+
}`)}},59469(e,t,r){r.d(t,{_:()=>c});var o=r(99208),a=r(40710),n=r(33079),i=r(31821),s=r(15976),l=r(63761);function c(e,t){const r=t.pbrMode,c=e.fragment;if(2!==r&&0!==r&&1!==r)return void c.code.add(i.H`void applyPBRFactors() {}`);if(0===r)return void c.code.add(i.H`void applyPBRFactors() {}
|
|
1138
|
+
float getBakedOcclusion() { return 1.0; }`);if(2===r)return void c.code.add(i.H`vec3 mrr = vec3(0.0, 0.6, 0.2);
|
|
1139
|
+
float occlusion = 1.0;
|
|
1140
|
+
void applyPBRFactors() {}
|
|
1141
|
+
float getBakedOcclusion() { return 1.0; }`);const{hasMetallicRoughnessTexture:u,hasMetallicRoughnessTextureTransform:d,hasOcclusionTexture:h,hasOcclusionTextureTransform:m,bindType:f}=t;(u||h)&&e.include(o.r,t),c.code.add(i.H`vec3 mrr;
|
|
1142
|
+
float occlusion;`),u&&c.uniforms.add(1===f?new l.N("texMetallicRoughness",e=>e.textureMetallicRoughness):new s.o("texMetallicRoughness",e=>e.textureMetallicRoughness)),h&&c.uniforms.add(1===f?new l.N("texOcclusion",e=>e.textureOcclusion):new s.o("texOcclusion",e=>e.textureOcclusion)),c.uniforms.add(1===f?new n.t("mrrFactors",e=>e.mrrFactors):new a.W("mrrFactors",e=>e.mrrFactors)),c.code.add(i.H`
|
|
1143
|
+
${(0,i.If)(u,i.H`void applyMetallicRoughness(vec2 uv) {
|
|
1144
|
+
vec3 metallicRoughness = textureLookup(texMetallicRoughness, uv).rgb;
|
|
1145
|
+
mrr[0] *= metallicRoughness.b;
|
|
1146
|
+
mrr[1] *= metallicRoughness.g;
|
|
1147
|
+
}`)}
|
|
1148
|
+
|
|
1149
|
+
${(0,i.If)(h,"void applyOcclusion(vec2 uv) { occlusion *= textureLookup(texOcclusion, uv).r; }")}
|
|
1150
|
+
|
|
1151
|
+
float getBakedOcclusion() {
|
|
1152
|
+
return ${h?"occlusion":"1.0"};
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
void applyPBRFactors() {
|
|
1156
|
+
mrr = mrrFactors;
|
|
1157
|
+
occlusion = 1.0;
|
|
1158
|
+
|
|
1159
|
+
${(0,i.If)(u,`applyMetallicRoughness(${d?"metallicRoughnessUV":"vuv0"});`)}
|
|
1160
|
+
${(0,i.If)(h,`applyOcclusion(${m?"occlusionUV":"vuv0"});`)}
|
|
1161
|
+
}
|
|
1162
|
+
`)}(r(74810),r(65786)).Y},32482(e,t,r){r.d(t,{LA:()=>M,QH:()=>w}),r(51850);var o=r(46686),a=r(49255),n=r(31821);function i(e,t){const r=(0,a._o)(t.output)&&t.receiveShadows;r&&(0,o.o)(e,!0),e.vertex.code.add(n.H`
|
|
1163
|
+
void forwardLinearDepthToReadShadowMap() { ${(0,n.If)(r,"forwardLinearDepth(gl_Position.w);")} }
|
|
1164
|
+
`)}var s=r(14314),l=r(35818),c=r(74333);class u extends c.n{constructor(e,t,r,o){super(e,"mat4",2,(r,a,n,i)=>r.setUniformMatrices4fv(e,t(a,n,i),o),r)}}class d extends c.n{constructor(e,t,r,o){super(e,"mat4",1,(r,a,n)=>r.setUniformMatrices4fv(e,t(a,n),o),r)}}var h=r(65786);function m(e){e.uniforms.add(new d("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),e.include(p)}function f(e){e.uniforms.add(new u("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),e.include(p)}function p(e){e.uniforms.add(new s.I("cascadeDistances",e=>e.shadowMap.cascadeDistances),new l.W("numCascades",e=>e.shadowMap.numCascades)),e.code.add(v)}h.Y;const v=n.H`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
|
|
1165
|
+
vec3 lightSpacePosition(vec3 _vpos, mat4 mat) {
|
|
1166
|
+
vec4 lv = mat * vec4(_vpos, 1.0);
|
|
1167
|
+
lv.xy /= lv.w;
|
|
1168
|
+
return 0.5 * lv.xyz + vec3(0.5);
|
|
1169
|
+
}
|
|
1170
|
+
vec2 cascadeCoordinates(int i, ivec2 textureSize, vec3 lvpos) {
|
|
1171
|
+
float xScale = float(textureSize.y) / float(textureSize.x);
|
|
1172
|
+
return vec2((float(i) + lvpos.x) * xScale, lvpos.y);
|
|
1173
|
+
}
|
|
1174
|
+
vec3 calculateUVZShadow(in vec3 _worldPos, in float _linearDepth, in ivec2 shadowMapSize) {
|
|
1175
|
+
int i = _linearDepth < cascadeDistances[1] ? 0 : _linearDepth < cascadeDistances[2] ? 1 : _linearDepth < cascadeDistances[3] ? 2 : 3;
|
|
1176
|
+
if (i >= numCascades) {
|
|
1177
|
+
return invalidShadowmapUVZ;
|
|
1178
|
+
}
|
|
1179
|
+
mat4 shadowMatrix = i == 0 ? shadowMapMatrix[0] : i == 1 ? shadowMapMatrix[1] : i == 2 ? shadowMapMatrix[2] : shadowMapMatrix[3];
|
|
1180
|
+
vec3 lvpos = lightSpacePosition(_worldPos, shadowMatrix);
|
|
1181
|
+
if (lvpos.z >= 1.0 || lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y > 1.0) {
|
|
1182
|
+
return invalidShadowmapUVZ;
|
|
1183
|
+
}
|
|
1184
|
+
vec2 uvShadow = cascadeCoordinates(i, shadowMapSize, lvpos);
|
|
1185
|
+
return vec3(uvShadow, lvpos.z);
|
|
1186
|
+
}`;function g(e){e.code.add(n.H`float readShadowMapUVZ(vec3 uvzShadow, sampler2DShadow _shadowMap) {
|
|
1187
|
+
return texture(_shadowMap, uvzShadow);
|
|
1188
|
+
}`)}var x=r(33094),b=r(12791);class y extends c.n{constructor(e,t){super(e,"sampler2DShadow",0,(r,o)=>r.bindTexture(e,t(o)))}}function w(e,t){t.receiveShadows&&e.fragment.include(m),S(e,t)}function M(e,t){t.receiveShadows&&e.fragment.include(f),S(e,t)}function S(e,t){e.fragment.uniforms.add(new x.U("lightingGlobalFactor",e=>e.lighting.globalFactor));const{hasShadowHighlights:r,receiveShadows:o,spherical:a}=t;e.include(i,t),o&&function(e,t){(function(e,t){e.include(g),e.uniforms.add(T()),t&&e.uniforms.add(new b.x("shadowHighlight",({shadowHighlight:e})=>e?.getTexture())),e.code.add(n.H`
|
|
1189
|
+
float readShadowMaps(const in vec3 uvzShadow) {
|
|
1190
|
+
if (uvzShadow.z < 0.0) {
|
|
1191
|
+
return 0.0;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
float shadow1 = readShadowMapUVZ(uvzShadow, shadowMap);
|
|
1195
|
+
${(0,n.If)(t,"float shadow2 = texelFetch(shadowHighlight, ivec2(gl_FragCoord.xy), 0).r;\n return shadow1 > shadow2 ? shadow1 : shadow2;","return shadow1;")}
|
|
1196
|
+
}
|
|
1197
|
+
`)})(e,t),function(e){e.code.add(n.H`float readShadowMap(const in vec3 _worldPos, float _linearDepth) {
|
|
1198
|
+
vec3 uvzShadow = calculateUVZShadow(_worldPos, _linearDepth, textureSize(shadowMap, 0));
|
|
1199
|
+
return readShadowMaps(uvzShadow);
|
|
1200
|
+
}`)}(e)}(e.fragment,r),e.fragment.code.add(n.H`
|
|
1201
|
+
float readShadow(float additionalAmbientScale, vec3 vpos) {
|
|
1202
|
+
return ${o?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":(0,n.If)(a,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
|
|
1203
|
+
}
|
|
1204
|
+
`)}function T(){return new y("shadowMap",({shadowMap:e})=>e.getOutput(5)??e.getOutput(7))}h.Y},70893(e,t,r){r.d(t,{O:()=>c});var o=r(52540),a=r(77108),n=r(33094),i=r(31821),s=r(58029),l=r(12791);function c(e,t){const r=e.fragment;r.include(o.E),r.uniforms.add(new a.E("nearFar",e=>e.camera.nearFar),new l.x("depthMap",e=>e.depth?.attachment),new s.F("proj",e=>e.camera.projectionMatrix),new n.U("invResolutionHeight",e=>1/e.camera.height),new s.F("reprojectionMatrix",e=>e.reprojection.matrix)).code.add(i.H`
|
|
1205
|
+
vec2 reprojectionCoordinate(vec3 projectionCoordinate) {
|
|
1206
|
+
vec4 clipDepthCoordinate = proj * vec4(0.0, 0.0, -projectionCoordinate.z, 1.0);
|
|
1207
|
+
vec4 reprojectedCoordinate = reprojectionMatrix * vec4(
|
|
1208
|
+
clipDepthCoordinate.w * (projectionCoordinate.xy * 2.0 - 1.0),
|
|
1209
|
+
clipDepthCoordinate.z,
|
|
1210
|
+
clipDepthCoordinate.w
|
|
1211
|
+
);
|
|
1212
|
+
reprojectedCoordinate.xy /= reprojectedCoordinate.w;
|
|
1213
|
+
return reprojectedCoordinate.xy * 0.5 + 0.5;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
vec4 applyProjectionMat(mat4 projectionMat, vec3 viewPosition) {
|
|
1217
|
+
vec4 projectedCoordinate = projectionMat * vec4(viewPosition, 1.0);
|
|
1218
|
+
projectedCoordinate.xy /= projectedCoordinate.w;
|
|
1219
|
+
projectedCoordinate.xy = projectedCoordinate.xy*0.5 + 0.5;
|
|
1220
|
+
return projectedCoordinate;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
float rayMarchScreenReachFromWorldReach(vec3 startPosition, vec3 rayDirection, float rayMarchWorldReach) {
|
|
1224
|
+
float rayDistanceWorld = max(0.0, rayMarchWorldReach);
|
|
1225
|
+
|
|
1226
|
+
// Stop rays towards camera at near plane
|
|
1227
|
+
if (rayDirection.z > 0.0) {
|
|
1228
|
+
float distanceToNearPlane = (-nearFar[0] - startPosition.z) / rayDirection.z;
|
|
1229
|
+
rayDistanceWorld = min(rayDistanceWorld, max(0.0, distanceToNearPlane));
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
vec2 projectedCoordStart = applyProjectionMat(proj, startPosition).xy;
|
|
1233
|
+
vec2 projectedCoordEnd = applyProjectionMat(proj, startPosition + rayDirection * rayDistanceWorld).xy;
|
|
1234
|
+
vec2 projectedCoordOffset = projectedCoordEnd - projectedCoordStart;
|
|
1235
|
+
|
|
1236
|
+
return ${t.useProjectedRayLength?"length(projectedCoordOffset)":"abs(projectedCoordOffset.y)"};
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
vec3 screenSpaceIntersectionWithLimits(
|
|
1240
|
+
vec3 rayDirection,
|
|
1241
|
+
vec3 startPosition,
|
|
1242
|
+
vec3 viewDirection,
|
|
1243
|
+
vec3 normal,
|
|
1244
|
+
float rayStepOffset,
|
|
1245
|
+
float rayMarchMaxReach,
|
|
1246
|
+
float rayMarchMaxSteps
|
|
1247
|
+
) {
|
|
1248
|
+
vec3 viewPosition = startPosition;
|
|
1249
|
+
|
|
1250
|
+
// Project the start position to the screen
|
|
1251
|
+
vec4 projectedCoordStart = applyProjectionMat(proj, viewPosition);
|
|
1252
|
+
vec3 homogeneousStart = viewPosition / projectedCoordStart.w;
|
|
1253
|
+
float inverseWStart = 1.0 / projectedCoordStart.w;
|
|
1254
|
+
|
|
1255
|
+
// Advance the position in the ray direction
|
|
1256
|
+
viewPosition += rayDirection;
|
|
1257
|
+
|
|
1258
|
+
vec4 projectedCoordVanishingPoint = applyProjectionMat(proj, rayDirection);
|
|
1259
|
+
|
|
1260
|
+
// Project the advanced position to the screen
|
|
1261
|
+
vec4 projectedCoordEnd = applyProjectionMat(proj, viewPosition);
|
|
1262
|
+
vec3 homogeneousEnd = viewPosition / projectedCoordEnd.w;
|
|
1263
|
+
float inverseWEnd = 1.0 / projectedCoordEnd.w;
|
|
1264
|
+
|
|
1265
|
+
// Calculate the ray direction in screen space
|
|
1266
|
+
vec2 projectedCoordDirection = (projectedCoordEnd.xy - projectedCoordStart.xy);
|
|
1267
|
+
vec2 vanishingPointScreenOffset = (projectedCoordVanishingPoint.xy - projectedCoordStart.xy);
|
|
1268
|
+
|
|
1269
|
+
float rayMarchDistance = ${t.useProjectedRayLength?"length(vanishingPointScreenOffset.xy)":"abs(vanishingPointScreenOffset.y)"};
|
|
1270
|
+
float clampedRayMarchDistance = min(rayMarchDistance, rayMarchMaxReach);
|
|
1271
|
+
|
|
1272
|
+
float projectedCoordDirectionLength = length(projectedCoordDirection);
|
|
1273
|
+
|
|
1274
|
+
// normalize the projection direction depending on maximum steps
|
|
1275
|
+
// this determines how blocky the ray march looks
|
|
1276
|
+
vec2 projectedStep = clampedRayMarchDistance * projectedCoordDirection / (rayMarchMaxSteps * projectedCoordDirectionLength);
|
|
1277
|
+
|
|
1278
|
+
// Normalize the homogeneous camera space coordinates
|
|
1279
|
+
vec3 homogeneousStep = clampedRayMarchDistance * (homogeneousEnd - homogeneousStart) / (rayMarchMaxSteps * projectedCoordDirectionLength);
|
|
1280
|
+
float inverseWStep = clampedRayMarchDistance * (inverseWEnd - inverseWStart) / (rayMarchMaxSteps * projectedCoordDirectionLength);
|
|
1281
|
+
|
|
1282
|
+
// initialize the variables for ray marching
|
|
1283
|
+
vec2 projectedPosition = projectedCoordStart.xy;
|
|
1284
|
+
vec3 homogeneousPosition = homogeneousStart;
|
|
1285
|
+
float inverseW = inverseWStart;
|
|
1286
|
+
float rayStartZ = -startPosition.z; // estimated ray start depth value
|
|
1287
|
+
float rayEndZ = -startPosition.z; // estimated ray end depth value
|
|
1288
|
+
float previousEstimatedZ = -startPosition.z;
|
|
1289
|
+
float rayDepthDelta = 0.0;
|
|
1290
|
+
float estimatedDepthDifference;
|
|
1291
|
+
float sampledDepth;
|
|
1292
|
+
|
|
1293
|
+
if (dot(normal, rayDirection) < 0.0 || dot(-viewDirection, normal) < 0.0) {
|
|
1294
|
+
return vec3(projectedPosition, 0.0);
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
float previousEstimatedDepthDifference = 0.0;
|
|
1298
|
+
|
|
1299
|
+
projectedPosition = clamp(
|
|
1300
|
+
projectedPosition + rayStepOffset * projectedStep,
|
|
1301
|
+
vec2(0.0),
|
|
1302
|
+
vec2(0.999)
|
|
1303
|
+
);
|
|
1304
|
+
homogeneousPosition.z += rayStepOffset * homogeneousStep.z;
|
|
1305
|
+
inverseW += rayStepOffset * inverseWStep;
|
|
1306
|
+
|
|
1307
|
+
int rayMarchMaxStepsInt = int(rayMarchMaxSteps);
|
|
1308
|
+
for(int stepIndex = 0; stepIndex < rayMarchMaxStepsInt - 1; ++stepIndex) {
|
|
1309
|
+
sampledDepth = -linearDepthFromTexture(depthMap, projectedPosition); // get linear depth from the depth buffer
|
|
1310
|
+
|
|
1311
|
+
// Estimate depth of the marching ray
|
|
1312
|
+
rayStartZ = previousEstimatedZ;
|
|
1313
|
+
estimatedDepthDifference = -rayStartZ - sampledDepth;
|
|
1314
|
+
rayEndZ = (homogeneousStep.z * 0.5 + homogeneousPosition.z) / (inverseWStep * 0.5 + inverseW);
|
|
1315
|
+
rayDepthDelta = rayEndZ - rayStartZ;
|
|
1316
|
+
previousEstimatedZ = rayEndZ;
|
|
1317
|
+
|
|
1318
|
+
if(-rayEndZ > nearFar[1] || -rayEndZ < nearFar[0] || projectedPosition.y < 0.0 || projectedPosition.y > 1.0 ) {
|
|
1319
|
+
return vec3(projectedPosition, 0.);
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
// If we detect a hit - return the intersection point, two conditions:
|
|
1323
|
+
// - estimatedDepthDifference > 0.0 - sampled point depth is in front of estimated depth
|
|
1324
|
+
// - if difference between estimatedDepthDifference and rayDepthDelta is not too large
|
|
1325
|
+
// - if difference between estimatedDepthDifference and 0.025/abs(inverseW) is not too large
|
|
1326
|
+
// - if the sampled depth is not behind far plane or in front of near plane
|
|
1327
|
+
|
|
1328
|
+
if(estimatedDepthDifference < 0.025 / abs(inverseW) + abs(rayDepthDelta) &&
|
|
1329
|
+
estimatedDepthDifference > 0.0 &&
|
|
1330
|
+
sampledDepth > nearFar[0] &&
|
|
1331
|
+
sampledDepth < nearFar[1] &&
|
|
1332
|
+
abs(projectedPosition.y - projectedCoordStart.y) > invResolutionHeight) {
|
|
1333
|
+
float hitInterpolationWeight = estimatedDepthDifference / (estimatedDepthDifference - previousEstimatedDepthDifference);
|
|
1334
|
+
vec2 refinedProjectedPosition = mix(projectedPosition - projectedStep, projectedPosition, 1.0 - hitInterpolationWeight);
|
|
1335
|
+
if (abs(refinedProjectedPosition.y - projectedCoordStart.y) > invResolutionHeight) {
|
|
1336
|
+
return vec3(refinedProjectedPosition, sampledDepth);
|
|
1337
|
+
}
|
|
1338
|
+
else {
|
|
1339
|
+
return vec3(projectedPosition, sampledDepth);
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
${(0,i.If)(!t.clampRayToScreen,"if (projectedPosition.x <= 0.0 || projectedPosition.x >= 1.0) {\n return vec3(projectedPosition, 0.0);\n }")}
|
|
1344
|
+
|
|
1345
|
+
// Continue with ray marching
|
|
1346
|
+
projectedPosition = projectedPosition + projectedStep;
|
|
1347
|
+
homogeneousPosition.z += homogeneousStep.z;
|
|
1348
|
+
inverseW += inverseWStep;
|
|
1349
|
+
previousEstimatedDepthDifference = estimatedDepthDifference;
|
|
1350
|
+
|
|
1351
|
+
${(0,i.If)(t.clampRayToScreen,"projectedPosition = clamp(projectedPosition, vec2(0.0), vec2(0.999));")}
|
|
1352
|
+
}
|
|
1353
|
+
return vec3(projectedPosition, 0.0);
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
vec3 screenSpaceIntersection(vec3 rayDirection, vec3 startPosition, vec3 viewDirection, vec3 normal, float rayStepOffset) {
|
|
1357
|
+
return screenSpaceIntersectionWithLimits(
|
|
1358
|
+
rayDirection,
|
|
1359
|
+
startPosition,
|
|
1360
|
+
viewDirection,
|
|
1361
|
+
normal,
|
|
1362
|
+
rayStepOffset,
|
|
1363
|
+
${i.H.float(t.rayMarchMaxReach)},
|
|
1364
|
+
${i.H.float(t.rayMarchMaxSteps)}
|
|
1365
|
+
);
|
|
1366
|
+
}
|
|
1367
|
+
`)}},51406(e,t,r){r.d(t,{MU:()=>l,O1:()=>c,QM:()=>u,Sx:()=>s,q2:()=>i});var o=r(29242),a=r(31821),n=r(35644);function i(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new n.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??o.zK)).code.add(a.H`void forwardColorUV(){
|
|
1368
|
+
colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1369
|
+
}`)):e.vertex.code.add(a.H`void forwardColorUV(){}`)}function s(e,t){t.hasNormalTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new n.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??o.zK)).code.add(a.H`void forwardNormalUV(){
|
|
1370
|
+
normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1371
|
+
}`)):e.vertex.code.add(a.H`void forwardNormalUV(){}`)}function l(e,t){t.hasEmissionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("emissiveUV","vec2"),e.vertex.uniforms.add(new n.k("emissiveTextureTransformMatrix",e=>e.emissiveTextureTransformMatrix??o.zK)).code.add(a.H`void forwardEmissiveUV(){
|
|
1372
|
+
emissiveUV = (emissiveTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1373
|
+
}`)):e.vertex.code.add(a.H`void forwardEmissiveUV(){}`)}function c(e,t){t.hasOcclusionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("occlusionUV","vec2"),e.vertex.uniforms.add(new n.k("occlusionTextureTransformMatrix",e=>e.occlusionTextureTransformMatrix??o.zK)).code.add(a.H`void forwardOcclusionUV(){
|
|
1374
|
+
occlusionUV = (occlusionTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1375
|
+
}`)):e.vertex.code.add(a.H`void forwardOcclusionUV(){}`)}function u(e,t){t.hasMetallicRoughnessTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("metallicRoughnessUV","vec2"),e.vertex.uniforms.add(new n.k("metallicRoughnessTextureTransformMatrix",e=>e.metallicRoughnessTextureTransformMatrix??o.zK)).code.add(a.H`void forwardMetallicRoughnessUV(){
|
|
1376
|
+
metallicRoughnessUV = (metallicRoughnessTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1377
|
+
}`)):e.vertex.code.add(a.H`void forwardMetallicRoughnessUV(){}`)}},34845(e,t,r){r.d(t,{Ir:()=>u});var o=r(37585),a=r(48163),n=r(78955),i=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){const t=e.projectionMatrix;return 0===t[11]?(0,n.hZ)(d,2/(e.fullWidth*t[0]),2/(e.fullHeight*t[5]),(1+t[12])/t[0],(1+t[13])/t[5]):(0,n.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,o.hZ)(h,0,1):(0,o.hZ)(h,1,0))),e.fragment.code.add(c.H`vec3 reconstructPosition(vec2 fragCoord, float depth) {
|
|
1378
|
+
return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);
|
|
1379
|
+
}`)}const d=(0,i.vt)(),h=(0,a.vt)()},58614(e,t,r){r.d(t,{SS:()=>i});var o=r(29941),a=(r(28421),r(20304)),n=r(26934);function i(e,t){!function(e,t,r){const o=e.fragment;switch(o.code.add("void discardOrAdjustAlpha(inout vec4 color) {"),t.alphaDiscardMode){case 1:o.code.add("color.a = 1.0;");break;case 0:0!==t.output&&(o.include(n.Q),o.code.add("if (color.a < alphaCutoff) discard;"));break;case 3:0!==t.output&&o.uniforms.add(r).code.add("if (color.a < textureAlphaCutoff) discard;");break;case 2:o.uniforms.add(r).code.add("\n if (color.a < textureAlphaCutoff) discard;\n color.a = 1.0;\n ");break;case 4:break;default:t.alphaDiscardMode}o.code.add("}")}(e,t,new a.m("textureAlphaCutoff",e=>e.textureAlphaCutoff))}o.v},26425(e,t,r){r.d(t,{u:()=>n});var o=r(33094),a=r(31821);function n(e){e.uniforms.add(new o.U("dpDummy",()=>1)).code.add(a.H`vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
|
|
1380
|
+
vec3 hiD = hiA + hiB;
|
|
1381
|
+
vec3 loD = loA + loB;
|
|
1382
|
+
return dpDummy * hiD + loD;
|
|
1383
|
+
}`)}},32976(e,t,r){r.d(t,{o:()=>a});var o=r(74333);class a extends o.n{constructor(e,t){super(e,"bool",0,(r,o)=>r.setUniform1b(e,t(o)))}}},40710(e,t,r){r.d(t,{W:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"vec3",2,(o,a,n,i)=>o.setUniform3fv(e,t(a,n,i),r))}}},33079(e,t,r){r.d(t,{t:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"vec3",1,(o,a,n)=>o.setUniform3fv(e,t(a,n),r))}}},28421(e,t,r){r.d(t,{J:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"float",2,(o,a,n)=>o.setUniform1f(e,t(a,n),r))}}},20304(e,t,r){r.d(t,{m:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"float",1,(o,a,n)=>o.setUniform1f(e,t(a,n),r))}}},15976(e,t,r){r.d(t,{o:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"sampler2D",2,(o,a,n)=>o.bindTexture(e,t(a,n),r?.(a,n)))}}},63761(e,t,r){r.d(t,{N:()=>a});var o=r(74333);class a extends o.n{constructor(e,t){super(e,"sampler2D",1,(r,o,a)=>r.bindTexture(e,t(o,a)))}}},31821(e,t,r){r.d(t,{If:()=>a});const o=(e,...t)=>{let r="";for(let o=0;o<t.length;o++)r+=e[o]+t[o];return r+=e[e.length-1],r};function a(e,t,r=""){return e?t:r}o.int=e=>e.toFixed(),o.uint=e=>`${Math.max(0,e).toFixed()}u`,o.hexuint=e=>`0x${Math.round(Math.max(0,e)).toString(16)}u`,o.float=e=>e.toPrecision(8),r.d(t,["H",0,o])},51976(e,t,r){r.d(t,{K:()=>s,W:()=>l});var o=r(49186),a=r(4576);class n{constructor(e){this._bits=[...e]}equals(e){return(0,a.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var i=r(65786);class s extends i.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map(()=>0)??[],this._parameterNames??=[]}get key(){return this._key??=new n(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits;this._parameterBits=[...e.bits];const 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);const a=e.count||2,n=Math.ceil(Math.log2(a)),i=t._parameterBits;let s=0;for(;i[s]+n>16;)s++,s>=i.length&&i.push(0);const l=i[s],c=(1<<n)-1<<l;i[s]+=n,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[s]&c)>>l},set(t){const a=this._parameterBits[s];if((a&c)>>l!==t){if(this._key=null,this._parameterBits[s]=a&~c|+t<<l&c,"number"!=typeof t)throw new o.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new o.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){const t=this._parameterBits[s];if(!!((t&c)>>l)!==e&&(this._key=null,this._parameterBits[s]=t&~c|+e<<l,"boolean"!=typeof e))throw new o.A("internal:invalid-shader-configurationx",`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},94046(e,t,r){r.d(t,{R:()=>a});var o=r(31821);function a(e){e.code.add(o.H`
|
|
1384
|
+
vec3 quantizeGlobalIlluminationColor(vec3 color) {
|
|
1385
|
+
vec3 clampedColor = clamp(color, vec3(0.0), vec3(1.0));
|
|
1386
|
+
return floor(clampedColor * ${o.H.float(255)} + 0.5) * ${o.H.float(1/255)};
|
|
1387
|
+
}
|
|
1388
|
+
`)}},27832(e,t,r){r.d(t,{b:()=>n});var o=r(33094),a=r(31821);function n(e,t){t.snowCover&&(e.uniforms.add(new o.U("snowCover",e=>e.snowCover)).code.add(a.H`float getSnow(vec3 normal, vec3 groundNormal) {
|
|
1389
|
+
return smoothstep(0.5, 0.55, dot(normal, groundNormal)) * snowCover;
|
|
1390
|
+
}
|
|
1391
|
+
float getRealisticTreeSnow(vec3 faceNormal, vec3 shadingNormal, vec3 groundNormal) {
|
|
1392
|
+
float snow = min(1.0, smoothstep(0.5, 0.55, dot(faceNormal, groundNormal)) +
|
|
1393
|
+
smoothstep(0.5, 0.55, dot(-faceNormal, groundNormal)) +
|
|
1394
|
+
smoothstep(0.0, 0.1, dot(shadingNormal, groundNormal)));
|
|
1395
|
+
return snow * snowCover;
|
|
1396
|
+
}`),e.code.add(a.H`vec3 applySnowToMRR(vec3 mrr, float snow) {
|
|
1397
|
+
return mix(mrr, vec3(0.0, 1.0, 0.04), snow);
|
|
1398
|
+
}`))}},74810(e,t,r){r.d(t,{Jr:()=>n});var o=r(35522),a=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:i,emissiveFactor:s,occlusionTexture:l}){return null==e&&null==t&&null==i&&(null==s||(0,o.t2)(s,a.uY))&&null==l&&(null==n||1===n)&&(null==r||1===r)}const i=(0,a.CN)(1,1,.5),s=(0,a.CN)(0,.6,.2),l=(0,a.CN)(0,1,.2);r.d(t,["Bt",0,s,"SY",0,l,"mb",0,i])},66211(e,t,r){r.d(t,{H:()=>i,T:()=>n});var o=r(5482),a=r(51976);class n extends a.K{constructor(){super(...arguments),this.useFloatBlend=!0}}function i(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,o.Cg)([(0,a.W)()],n.prototype,"useFloatBlend",void 0)},65786(e,t,r){const o=class{};new o,r.d(t,["Y",0,o])},74333(e,t,r){r.d(t,{n:()=>o});class o{constructor(e,t,r,o,a=null){if(this.name=e,this.type=t,this.arraySize=a,this.bind={0:null,1:null,2:null},o)switch(r){case void 0:break;case 0:this.bind[0]=o;break;case 1:this.bind[1]=o;break;case 2:this.bind[2]=o}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}}}]);
|