@arcgis/core 5.1.0-next.102 → 5.1.0-next.103
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/applications/Components/imageryUtils.d.ts +22 -1
- package/applications/Components/imageryUtils.js +1 -1
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/arcade.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/debug.js +1 -1
- package/arcade/deepClone.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/fieldStats.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcade/functions/stats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/functions/track.js +1 -1
- package/arcade/geometry/constructors.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/geometry/operators.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{92e7067960549733f8e6.js → 037b36d415ae27e987f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{58579c53be1a44bd08d2.js → 054ae729e7cefa2c7778.js} +1 -1
- package/assets/esri/core/workers/chunks/069459519477bb3dc91b.js +1 -0
- package/assets/esri/core/workers/chunks/{4301cb9670fa7c907460.js → 0881929a4a457f94f317.js} +1 -1
- package/assets/esri/core/workers/chunks/{abdf146b35e179b5b245.js → 0cb8bc6dbbbe3b212712.js} +1 -1
- package/assets/esri/core/workers/chunks/{b811d62284be95f4beb6.js → 0cc74bc3772be51cabc1.js} +1 -1
- package/assets/esri/core/workers/chunks/{0630ce1975c91ae362d9.js → 0e9804ece1fd2d59751b.js} +1 -1
- package/assets/esri/core/workers/chunks/{545c38789267e3487dbd.js → 10491b5b106bc5ad0b2b.js} +1 -1
- package/assets/esri/core/workers/chunks/12053c1213465d07d2f6.js +1 -0
- package/assets/esri/core/workers/chunks/{ca6c128940ddbebcaaab.js → 14b7b55c42af65ffa024.js} +1 -1
- package/assets/esri/core/workers/chunks/{702e8468836863abd81b.js → 15fa8b5b472131aaa68e.js} +1 -1
- package/assets/esri/core/workers/chunks/{852f4cd514008fee5a55.js → 176e676879666f784599.js} +1 -1
- package/assets/esri/core/workers/chunks/18201119828664373165.js +1 -0
- package/assets/esri/core/workers/chunks/1a3426276dc82a8a80f2.js +1 -0
- package/assets/esri/core/workers/chunks/{ce3e51c799a80648e46d.js → 1c0e8808d14d8e6dde2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{e86c073f0b6d395c7a38.js → 1c83e61fd9a4f8fc8372.js} +1 -1
- package/assets/esri/core/workers/chunks/1cb0c4fc315bbc2bd00b.js +1 -0
- package/assets/esri/core/workers/chunks/{5afee66e182f79a0fc46.js → 1ff61d8a8ea060e78b83.js} +1 -1
- package/assets/esri/core/workers/chunks/{4faaf61d20e20fcf6c18.js → 23119a1b1310b7dab2aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{031ea31bbdb7f1be791e.js → 276cb6a1cdd26d0e1444.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdb7851e98e8d2ba48d3.js → 286bf3be9f524bde9529.js} +1 -1
- package/assets/esri/core/workers/chunks/{55ccb8ed7325efb62091.js → 29b00d07d3e1d095c590.js} +2 -2
- package/assets/esri/core/workers/chunks/{9d8e7839772029d83c93.js → 29bbc0d6d847b065d10e.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ba37706e5d5eaabcb8e.js → 2a5f6a8d282f2c391591.js} +1 -1
- package/assets/esri/core/workers/chunks/{15a65aa6969c1b383ce2.js → 2f903bd3a2611e7f0946.js} +1 -1
- package/assets/esri/core/workers/chunks/{b803e7b0d489bb628d72.js → 2f925a424b60b4a5e8e5.js} +1 -1
- package/assets/esri/core/workers/chunks/30e191d36aa95823c018.js +1 -0
- package/assets/esri/core/workers/chunks/{4b19acf8bde5b2e80692.js → 313a89b334e3518d30a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{390717f079def83a0d9c.js → 31a8bc25aa1441c70caa.js} +1 -1
- package/assets/esri/core/workers/chunks/31c01885ee6d70a2bde2.js +1 -0
- package/assets/esri/core/workers/chunks/3292b3883f203637b5a7.js +1 -0
- package/assets/esri/core/workers/chunks/{9bb2251ba58932f85d13.js → 33329f5d88e60b4ec568.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f9117d589de7caaa02d.js → 35bbd63319d8aa9f31cc.js} +1 -1
- package/assets/esri/core/workers/chunks/35fdd62277fd06468a29.js +2 -0
- package/assets/esri/core/workers/chunks/{3996149146dd1eca7cc5.js → 38d7430d2370b69334d7.js} +1 -1
- package/assets/esri/core/workers/chunks/3aebbed6d4fd1b993a35.js +1 -0
- package/assets/esri/core/workers/chunks/3f1d533efe4300d19e6a.js +1 -0
- package/assets/esri/core/workers/chunks/{7db09c5bf024242becfa.js → 40caf5e09e4382d81104.js} +5 -5
- package/assets/esri/core/workers/chunks/4213aa844900fcf95287.js +1 -0
- package/assets/esri/core/workers/chunks/{bc6a809a965355eb425f.js → 44636ef119c6a576470b.js} +1 -1
- package/assets/esri/core/workers/chunks/453c9e8d438d061e1736.js +1 -0
- package/assets/esri/core/workers/chunks/479e34b0abc10499bd3a.js +1 -0
- package/assets/esri/core/workers/chunks/{54dad475dc806a38c287.js → 48440a071a37590846ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa9ab152ea785b5e97e0.js → 4a41f98210f1da3b5041.js} +1 -1
- package/assets/esri/core/workers/chunks/4a65bc9091d7ea7e80df.js +1 -0
- package/assets/esri/core/workers/chunks/4cdf80e2e60501dd4756.js +1 -0
- package/assets/esri/core/workers/chunks/51edfe21d4c6ee22c83d.js +1 -0
- package/assets/esri/core/workers/chunks/52219561c144e5cb4442.js +1 -0
- package/assets/esri/core/workers/chunks/{312036c89a6a09bb06c2.js → 5570d47533efab56c732.js} +1 -1
- package/assets/esri/core/workers/chunks/{5abe34bb0110694f7b42.js → 566c36032b456ec5b5d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{34207774bc371e95ba3c.js → 56b6b68d9459b1edea43.js} +1 -1
- package/assets/esri/core/workers/chunks/593772bd8b19ac664b29.js +1 -0
- package/assets/esri/core/workers/chunks/{10ce083b38ccfa88f766.js → 594e1f633527749d92d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad329226c8b579d0964c.js → 5a6523c903b11dea77d4.js} +1 -1
- package/assets/esri/core/workers/chunks/5c44638670e40e092ce3.js +1 -0
- package/assets/esri/core/workers/chunks/{af8bc56cf1404afc3028.js → 5d60253ea3d247cdb3d1.js} +1 -1
- package/assets/esri/core/workers/chunks/5dc86a3a40d16b576bb5.js +1 -0
- package/assets/esri/core/workers/chunks/601edefd8da4eb2eda28.js +1 -0
- package/assets/esri/core/workers/chunks/6182d39e2095d4460b88.js +1 -0
- package/assets/esri/core/workers/chunks/{c798a40418e7ff38042a.js → 63513e706fe55a1def15.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8d338665fe00494c826.js → 660713adb5a845dfa2ef.js} +1 -1
- package/assets/esri/core/workers/chunks/694f9571e2723d3d4b02.js +1 -0
- package/assets/esri/core/workers/chunks/69ad5930ff6040c6c561.js +1 -0
- package/assets/esri/core/workers/chunks/{f563dd6cace047108b3c.js → 6b5d2df9123dfe7e00b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{5217d676749bca59d90f.js → 6c79e8e840c1d027fbb2.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ce845c990bb4d701362.js → 6ca81e34854ce7ec6f6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{11a99ee68409a641810e.js → 6f02681bcaa9bef501fc.js} +1 -1
- package/assets/esri/core/workers/chunks/77ac243d4dcd901c2eec.js +1 -0
- package/assets/esri/core/workers/chunks/78af4b7a379c40f497a7.js +1 -0
- package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 79b64a52ff57c40c7800.js} +1 -1
- package/assets/esri/core/workers/chunks/{475409026288f0981ce2.js → 7b3642195d6d3ea9b830.js} +1 -1
- package/assets/esri/core/workers/chunks/{82b2acc6f181927de89c.js → 7bc746ea17f4e336e0b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{19fcc74d34cbbaa56a41.js → 7c86099ed17f420b0489.js} +1 -1
- package/assets/esri/core/workers/chunks/{6f96ce41c47cae82e687.js → 7d571845292b1b7769c2.js} +1 -1
- package/assets/esri/core/workers/chunks/7dafe608c224b9d48ffa.js +1 -0
- package/assets/esri/core/workers/chunks/7e203e947846d40f897e.js +1 -0
- package/assets/esri/core/workers/chunks/855bf811cd79b97c169a.js +1 -0
- package/assets/esri/core/workers/chunks/{7601278ebced0c0c31cf.js → 85bba0db8a7a5fc1be44.js} +1 -1
- package/assets/esri/core/workers/chunks/{a318cf6bb900e0ee268c.js → 881234f25c7814de8753.js} +1 -1
- package/assets/esri/core/workers/chunks/895114ccd2603830960f.js +1 -0
- package/assets/esri/core/workers/chunks/8a68884d40f6f6de1d12.js +1 -0
- package/assets/esri/core/workers/chunks/{0d81409721d29d8bc276.js → 8a7682071941c35f05c1.js} +1 -1
- package/assets/esri/core/workers/chunks/8aac1155b8ac071cd2ad.js +1 -0
- package/assets/esri/core/workers/chunks/{3e2953ea62817e75d840.js → 8cbaaea72f4ca2f023be.js} +1 -1
- package/assets/esri/core/workers/chunks/{1faa8a42d5a437fc40a3.js → 8e986167d4a393ee41ea.js} +1 -1
- package/assets/esri/core/workers/chunks/8fdd57e2a0af647f1e3e.js +1 -0
- package/assets/esri/core/workers/chunks/92db9a6d273ae2862883.js +1 -0
- package/assets/esri/core/workers/chunks/{9b23d999db902d25ba58.js → 9373daa677dc767d7cf0.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb5512ecb5300d45d46b.js → 9542ef3f6c2bc7c14d85.js} +1 -1
- package/assets/esri/core/workers/chunks/{86bff154d46f8a562887.js → 95798e3de3419fdda6ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{aad02c7417648d881129.js → 958617c3a9854ea04e06.js} +1 -1
- package/assets/esri/core/workers/chunks/{a28124bba6b43efd74cc.js → 95df6d2ebacc43ac5fa3.js} +1 -1
- package/assets/esri/core/workers/chunks/{f618ee43581e8de6ad0c.js → 970e91de5dfbbc247afb.js} +1 -1
- package/assets/esri/core/workers/chunks/978b7d10054e17161145.js +1 -0
- package/assets/esri/core/workers/chunks/{8a48a6760c33ed50b650.js → 98b4408e12684e37b395.js} +1 -1
- package/assets/esri/core/workers/chunks/9d70247d820085a2c190.js +1 -0
- package/assets/esri/core/workers/chunks/9da2f2b67837b491cfa3.js +1 -0
- package/assets/esri/core/workers/chunks/{edee616b6f1b5be8fd39.js → a0296e6d6c37b861c5fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{c19e3f6027b6526de359.js → a02ebdcb802d128c8eee.js} +1 -1
- package/assets/esri/core/workers/chunks/a0aaf14c8f9a007d88ac.js +1 -0
- package/assets/esri/core/workers/chunks/{1523883460874c352e36.js → a29cd1f5c7bb4f6a5a4f.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf826787ab8d4b27ad80.js → a53a3e5548fef65a2710.js} +1 -1
- package/assets/esri/core/workers/chunks/{91f9e0e3662d4bf9f163.js → a913a1c83a667ed0e711.js} +1 -1
- package/assets/esri/core/workers/chunks/{359465b9726edcc70c83.js → a9c9c00432ee41ec91ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3a28c4887f802e8d96d.js → aa55923ca939a0d4606c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3b086eb9aa8c7d09048.js → aea8e0577fb48d5c9577.js} +1 -1
- package/assets/esri/core/workers/chunks/af45110f07e4b5162bae.js +1 -0
- package/assets/esri/core/workers/chunks/{76589434d573111a8fb4.js → b09ae8eb5e97fb27382f.js} +1 -1
- package/assets/esri/core/workers/chunks/b0c647af49c9d563b852.js +1 -0
- package/assets/esri/core/workers/chunks/{a320998f18922a35899f.js → b32a13972cb3de652339.js} +1 -1
- package/assets/esri/core/workers/chunks/b432a5a829e309837db6.js +1 -0
- package/assets/esri/core/workers/chunks/{9103eb0b9078019d3a26.js → b5d0898406c7d6e6a717.js} +1 -1
- package/assets/esri/core/workers/chunks/b640651c7d86cfe654bf.js +1 -0
- package/assets/esri/core/workers/chunks/{503439246250d9e1cbd5.js → b75e090a7e935ff870a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{c321bcda8e8893577948.js → b8dda9e55caba0e2b4c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{59a64d72eed8c40c63cf.js → bacf0c9d5d3e084dea61.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa38dc5010f8630a80fe.js → bb04aff0b4947408592c.js} +1 -1
- package/assets/esri/core/workers/chunks/{5663df3cd1dfd4b43c73.js → bff0c4094c14cb97b18f.js} +1 -1
- package/assets/esri/core/workers/chunks/{47dd2bfecc5c4b5f10f0.js → c0d7e4afbad0b20e2502.js} +1 -1
- package/assets/esri/core/workers/chunks/c13c532fe38ddc5d7ca6.js +1 -0
- package/assets/esri/core/workers/chunks/{cc62e5095e328bed3e01.js → c1ffb879e0283fb2815f.js} +1 -1
- package/assets/esri/core/workers/chunks/{9e7c84a3a2abec4d49df.js → c476f4979048e558baa7.js} +89 -76
- package/assets/esri/core/workers/chunks/c8b96104641cb4afd4df.js +1 -0
- package/assets/esri/core/workers/chunks/{19a9a555365a8363d34b.js → c91d4f1b42cfe474df52.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ae2408ac075b974e887.js → cb26966cc205bd338c76.js} +1 -1
- package/assets/esri/core/workers/chunks/{c452c74ba9de218c3e57.js → cb3004998eff7c60930e.js} +1 -1
- package/assets/esri/core/workers/chunks/cc48354c54358777e996.js +1 -0
- package/assets/esri/core/workers/chunks/{b1b8a7c00ec4d998ab84.js → cc8d55d1830d7542c3f5.js} +1 -1
- package/assets/esri/core/workers/chunks/ce0c7070eeb723a718e7.js +1 -0
- package/assets/esri/core/workers/chunks/ce3b5b83237cf37ff523.js +1 -0
- package/assets/esri/core/workers/chunks/cf3c0bee919bb509cd4f.js +1 -0
- package/assets/esri/core/workers/chunks/cf9b0ba30a75c030ca92.js +1 -0
- package/assets/esri/core/workers/chunks/d00b9c1fd0865bf8f317.js +1 -0
- package/assets/esri/core/workers/chunks/{9a29b7f9e6281ee40c37.js → d4749eb8a47869477037.js} +1 -1
- package/assets/esri/core/workers/chunks/d5423df247be82fa085a.js +1 -0
- package/assets/esri/core/workers/chunks/d610f517fb3c6cb24365.js +1 -0
- package/assets/esri/core/workers/chunks/{47656ec12401e53f4bd3.js → d9d716bfd0aab30b6caf.js} +1 -1
- package/assets/esri/core/workers/chunks/da4f7d7099ba88f31f45.js +1 -0
- package/assets/esri/core/workers/chunks/dbb1ac41fd5da4fd849b.js +1 -0
- package/assets/esri/core/workers/chunks/{176dd195f77b98cb0b0f.js → dd58bc675b85b4d90afa.js} +1 -1
- package/assets/esri/core/workers/chunks/e2bb95d601789bbda73b.js +1 -0
- package/assets/esri/core/workers/chunks/{f018ad451ee072253a1e.js → e4b2120d7ee1c998b1fc.js} +1 -1
- package/assets/esri/core/workers/chunks/e4c350dc65aae121171d.js +1 -0
- package/assets/esri/core/workers/chunks/e8518bd3596543b387f8.js +1 -0
- package/assets/esri/core/workers/chunks/{f948e4a80a7dbda70f2e.js → e973cab79ec2541cb81b.js} +1 -1
- package/assets/esri/core/workers/chunks/{7d6299ab7b0db23ab961.js → eb1d6614eeac6d26bb9c.js} +1 -1
- package/assets/esri/core/workers/chunks/f1bb426400dac02880f1.js +1 -0
- package/assets/esri/core/workers/chunks/{ffcd4fca7f67e1f943f1.js → f239a8ecad8b692d5eaa.js} +1 -1
- package/assets/esri/core/workers/chunks/{de11ebcea2b8f9dfe65d.js → f3161c47a572194f6017.js} +1 -1
- package/assets/esri/core/workers/chunks/{f66262f8582909157f01.js → f37be7e517f0892014e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{119b84f5349f90d1dd28.js → f3a9100518b044e79501.js} +1 -1
- package/assets/esri/core/workers/chunks/f3f984c62311c20a9db8.js +1 -0
- package/assets/esri/core/workers/chunks/{85e65ced3312bf9cf162.js → f7e386ece75afb6e4be5.js} +1 -1
- package/assets/esri/core/workers/chunks/f8b884b529064df4a30a.js +1 -0
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ar.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bg.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bs.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ca.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_cs.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_da.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_de.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_el.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_es.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_et.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fi.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_he.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hu.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_id.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_it.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ja.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ko.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lt.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lv.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_nl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_no.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-BR.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-PT.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ro.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ru.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sk.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sv.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_th.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_tr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_uk.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_vi.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-CN.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-HK.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-TW.json +1 -1
- package/chunks/AtmosphereCompositing.glsl.js +1 -1
- package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
- package/chunks/Centroid-DZi-eb9F.js +1 -1
- package/chunks/Clouds.glsl.js +1 -1
- package/chunks/Compositing.glsl.js +1 -1
- package/chunks/CutFillComposition.glsl.js +1 -1
- package/chunks/CutFillDepth.glsl.js +1 -1
- package/chunks/CutFillMask.glsl.js +1 -1
- package/chunks/CutFillReduction.glsl.js +1 -1
- package/chunks/CutFillTargetDepth.glsl.js +1 -1
- package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/Envelope2D.js +1 -1
- package/chunks/FlatGeometry.js +1 -1
- package/chunks/FocusAreaColor.glsl.js +1 -1
- package/chunks/FocusAreaMask.glsl.js +1 -1
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +1 -1
- package/chunks/GaussianSplatShadow.glsl.js +1 -1
- package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
- package/chunks/GeodeticUtils.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/GeometryCleaner-BEJM7I4l.js +1 -1
- package/chunks/GlobalIllumination.glsl.js +1 -1
- package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
- package/chunks/GlobalIlluminationUpscale.glsl.js +80 -65
- package/chunks/GlowBlur.glsl.js +1 -1
- package/chunks/GlowComposition.glsl.js +1 -1
- package/chunks/HazeCompositing.glsl.js +1 -1
- package/chunks/HighlightBlur.glsl.js +1 -1
- package/chunks/HighlightDownsample.glsl.js +1 -1
- package/chunks/Magnifier.glsl.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/NoiseTextureAtlas.glsl.js +1 -1
- package/chunks/OITBlend.glsl.js +2 -2
- package/chunks/OITBlendEmission.glsl.js +1 -1
- package/chunks/OITDimOpaque.glsl.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCrosses.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDensify.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorIntegrate.js +1 -1
- package/chunks/OperatorIntersects.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorOverlaps.js +1 -1
- package/chunks/OperatorProject.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingDensify.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/OperatorTouches.js +1 -1
- package/chunks/OperatorWithin.js +1 -1
- package/chunks/OverlayCompositing.glsl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/RasterColorizer.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
- package/chunks/SimpleAtmosphere.glsl.js +1 -1
- package/chunks/SpatialReference.js +1 -1
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/Texture.glsl.js +1 -1
- package/chunks/Transformation2D.js +1 -1
- package/chunks/Viewshed.glsl.js +1 -1
- package/chunks/aiServices.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/constants.js +1 -1
- package/chunks/containsOperator.js +1 -1
- package/chunks/disjointOperator.js +1 -1
- package/chunks/distanceOperator.js +1 -1
- package/chunks/equalsOperator.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/chunks/pe.js +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/chunks/relateOperator.js +1 -1
- package/chunks/symmetricDifferenceOperator.js +1 -1
- package/chunks/unionOperator.js +1 -1
- package/chunks/vec2.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vec4.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/decorators/persistable.js +1 -1
- package/effects/FocusArea.js +1 -1
- package/geometry/coordinateFormatter.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/geodeticUtils.js +1 -1
- package/geometry/operators/gx/operatorAffineTransform.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBoundary.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
- package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorProject.js +1 -1
- package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
- package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/geographicTransformationUtils.js +1 -1
- package/geometry/operators/support/initNoPeFactory.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/operators/support/projectionTransformation.js +1 -1
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/pe.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/geometry/support/buffer/math/vec3.js +1 -1
- package/geometry/support/buffer/math/vec4.js +1 -1
- package/geometry/support/buffer/utils/vec2.js +1 -1
- package/geometry/support/coordinateSystem.js +1 -1
- package/geometry/support/meshUtils/extent.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/projection.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/geometry/support/vcsData.js +1 -1
- package/kernel.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/cypherUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.d.ts +12 -0
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/functions/rasterProjectionHelper.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/ParquetFilesData.js +1 -1
- package/layers/support/SceneFilter.js +1 -1
- package/layers/support/Sublayer.d.ts +25 -0
- package/layers/support/Sublayer.js +1 -1
- package/linkChart/LinkChartProperties.js +1 -1
- package/linkChart/utils.js +1 -1
- package/package.json +2 -2
- package/portal/PortalItem.js +1 -1
- package/renderers/UniqueValueRenderer.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/persistableUrlUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/urlUtils.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/third-party-notices.txt +184 -0
- package/views/2d/ViewStateManager.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceController.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/focusAreaUtils.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +1 -1
- package/views/3d/state/ScreenSizePerspective.js +1 -1
- package/views/3d/support/ViewSlice.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
- package/views/3d/terrain/RasterTile.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js +3 -5
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/Clouds.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/fog/FogTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscaleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMask.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/Attachments.d.ts +0 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/constants.js +1 -1
- package/widgets/Features.d.ts +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup.d.ts +2 -24
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/TableList/support/tableListUtils.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/assets/esri/core/workers/chunks/09630888267cde87654f.js +0 -1
- package/assets/esri/core/workers/chunks/0d9d33f29124d464a4cb.js +0 -1
- package/assets/esri/core/workers/chunks/0e333f1bce992508b68a.js +0 -1
- package/assets/esri/core/workers/chunks/0fa207c68dfd7ddee160.js +0 -1
- package/assets/esri/core/workers/chunks/13838b6c045425e73cf8.js +0 -1
- package/assets/esri/core/workers/chunks/15167eeb6d7dbe7e392d.js +0 -1
- package/assets/esri/core/workers/chunks/177472a6a9beb1590934.js +0 -1
- package/assets/esri/core/workers/chunks/1d0f9f147bfa00b38d48.js +0 -1
- package/assets/esri/core/workers/chunks/1d54b71c43d9d6a5f713.js +0 -1
- package/assets/esri/core/workers/chunks/1f6b7626f333809837ef.js +0 -1
- package/assets/esri/core/workers/chunks/24646a1176ce34039155.js +0 -1
- package/assets/esri/core/workers/chunks/268ed861c882740c805b.js +0 -1
- package/assets/esri/core/workers/chunks/2b52c1c01cf568ba01fb.js +0 -1
- package/assets/esri/core/workers/chunks/3116a1c2b67a296ba86e.js +0 -1
- package/assets/esri/core/workers/chunks/32c17c299c7622ae0d71.js +0 -1
- package/assets/esri/core/workers/chunks/34f79355145c8e4c59dd.js +0 -1
- package/assets/esri/core/workers/chunks/3be111488365768fd917.js +0 -1
- package/assets/esri/core/workers/chunks/3f0483cbcd893acf240c.js +0 -1
- package/assets/esri/core/workers/chunks/40d251b6b42a41d68bd2.js +0 -1
- package/assets/esri/core/workers/chunks/4a23b27bfbcfa08fd9a7.js +0 -1
- package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +0 -1
- package/assets/esri/core/workers/chunks/598271956c46e21e5c09.js +0 -1
- package/assets/esri/core/workers/chunks/5b6f2bfdcdd207d8ae42.js +0 -1
- package/assets/esri/core/workers/chunks/5bc299f7f89a07a6e6a6.js +0 -1
- package/assets/esri/core/workers/chunks/5c7ba4b8a9ec2e2e02b5.js +0 -1
- package/assets/esri/core/workers/chunks/60915a3708a34da1977e.js +0 -1
- package/assets/esri/core/workers/chunks/61c523dd9d8027922465.js +0 -1
- package/assets/esri/core/workers/chunks/65520a443e3811255bea.js +0 -1
- package/assets/esri/core/workers/chunks/671826fe25105aedcce4.js +0 -1
- package/assets/esri/core/workers/chunks/6b79c254897ece95b7a3.js +0 -1
- package/assets/esri/core/workers/chunks/6c35583707f5c339ee99.js +0 -1
- package/assets/esri/core/workers/chunks/6cb467a9517f024be72f.js +0 -1
- package/assets/esri/core/workers/chunks/71119398ec91f1b209d7.js +0 -1
- package/assets/esri/core/workers/chunks/8ac8ef856ed9592c433b.js +0 -1
- package/assets/esri/core/workers/chunks/8fedb32055ac7f771419.js +0 -1
- package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +0 -1
- package/assets/esri/core/workers/chunks/9c11e1fe785e1385fdb1.js +0 -1
- package/assets/esri/core/workers/chunks/a567d001fcfa1f1cdeea.js +0 -1
- package/assets/esri/core/workers/chunks/afdc6fc453157528cf9b.js +0 -1
- package/assets/esri/core/workers/chunks/b5ced451d331ca1ffb68.js +0 -1
- package/assets/esri/core/workers/chunks/b7f5d51ac26f37837b3b.js +0 -1
- package/assets/esri/core/workers/chunks/ba7fe21a78ea37a02b7c.js +0 -1
- package/assets/esri/core/workers/chunks/bb3ab2453ccde2f2611c.js +0 -1
- package/assets/esri/core/workers/chunks/bb81da98546c4d923e0d.js +0 -1
- package/assets/esri/core/workers/chunks/beba9f2213d8a850ddb6.js +0 -1
- package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +0 -1
- package/assets/esri/core/workers/chunks/d30790c69724258dab2b.js +0 -1
- package/assets/esri/core/workers/chunks/d35c475f004367e333eb.js +0 -1
- package/assets/esri/core/workers/chunks/d95ffd990b3a7df69e1e.js +0 -1
- package/assets/esri/core/workers/chunks/dd6efa0afe879bd11a2e.js +0 -1
- package/assets/esri/core/workers/chunks/de25311b6d13bf1c6089.js +0 -2
- package/assets/esri/core/workers/chunks/dec51409372764e7093d.js +0 -1
- package/assets/esri/core/workers/chunks/e133840540abf20262a4.js +0 -1
- package/assets/esri/core/workers/chunks/e63e24101e7e92c62d98.js +0 -1
- package/assets/esri/core/workers/chunks/e785f76c1a75cb1d1e1f.js +0 -1
- package/assets/esri/core/workers/chunks/f27397379c6c88bc6ef4.js +0 -1
- package/assets/esri/core/workers/chunks/f53805c7a84203305b2c.js +0 -1
- package/assets/esri/core/workers/chunks/f60292d97bcdbf19165b.js +0 -1
- package/assets/esri/core/workers/chunks/f6ebec8d2248c719b89f.js +0 -1
- package/assets/esri/core/workers/chunks/fd2afff07aaac8203c18.js +0 -1
- package/assets/esri/core/workers/chunks/ff7708aaa2de720e3a47.js +0 -1
- /package/assets/esri/core/workers/chunks/{55ccb8ed7325efb62091.js.LICENSE.txt → 29b00d07d3e1d095c590.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{de25311b6d13bf1c6089.js.LICENSE.txt → 35fdd62277fd06468a29.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{getMetersPerUnitForSR as n}from"../../../core/units.js";import i from"../../../geometry/Extent.js";import{P as o,a as r,g as s,h as a,j as l}from"../../../chunks/pe.js";import c from"../../../geometry/Point.js";import f from"../../../geometry/Polygon.js";import{projectWithoutEngine as u}from"../../../geometry/projectionUtils.js";import x from"../../../geometry/SpatialReference.js";import{getInfo as m}from"../../../geometry/support/spatialReferenceUtils.js";function h(){if(!T)throw new t("rasterprojectionhelper-project","projection operator is not loaded")}const p=(e,t,n,i=0)=>{if(1===n[0])return[0,0];let o=1,r=-1,s=1,a=-1;for(let g=0;g<e.length;g+=2)isNaN(e[g])||(o=o>e[g]?e[g]:o,r=r>e[g]?r:e[g],s=s>e[g+1]?e[g+1]:s,a=a>e[g+1]?a:e[g+1]);const{cols:l,rows:c}=t,f=(r-o)/l/n[0],u=(a-s)/c/n[1],x=2*i;let m=0,h=!1,p=[0,0];for(let g=0;g<l-3;g++){for(let t=0;t<c-3;t++){const n=g*c*2+2*t,i=(e[n]+e[n+4]+e[n+4*c]+e[n+4*c+4])/4,o=(e[n+1]+e[n+5]+e[n+4*c+1]+e[n+4*c+5])/4,r=Math.abs((i-e[n+2*c+2])/f),s=Math.abs((o-e[n+2*c+3])/u);if(r+s>m&&(m=r+s,p=[r,s]),x&&m>x){h=!0;break}}if(h)break}return p},g={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},y=32,d=4,w=d,M=new Map,R=new Map,S=500,P=39.37,b=96;let G,k,E,T=!1;async function N(){return G||(G=Promise.withResolvers(),k=await import("../../../geometry/operators/projectOperator.js"),E=await import("../../../geometry/operators/support/geographicTransformationUtils.js"),k.isLoaded()||await k.load(),E.isLoaded()||await E.load(),T=!0,G.resolve()),G.promise}function v(e,t,n){if(h(),n){const n=k.execute(e,t);return E.getTransformation(t,e.spatialReference,n)}return E.getTransformation(e.spatialReference,t,e)}function j(e,t,n,o){const r=e.spatialReference;if(!r||!t||r.equals(t))return e;h();const s=n.center,a=new i({xmin:s.x-e.x/2,xmax:s.x+e.x/2,ymin:s.y-e.y/2,ymax:s.y+e.y/2,spatialReference:r}),l=k.execute(a,t,{geographicTransformation:o}),c=Z(t);return null==l||null!=c&&l.width>=c?C(e,r,t):{x:l.width,y:l.height}}function C(e,t,i){const o=n(t)/n(i);return{x:e.x*o,y:e.y*o}}function _(e,i,o){const{spatialReference:r}=o;if(!r||!i||r.equals(i))return e;if(r.isGeographic&&i.isGeographic)return C(e,r,i);if(h(),!T)throw new t("raster-projection-helper:project-dataset-resolution","geometry engine is not loaded");let{x:s,y:a}=e;const l=(s+a)/2*n(r);let c=1;l>30&&(c=30/l,s*=c,a*=c);const u=256,x=s*u/2,m=a*u/2,{x:p,y:g}=o.center,y=[];for(let t=0;t<=u;t++)y.push([p-x,g-m+t*a]);for(let t=1;t<=u;t++)y.push([p-x+t*s,g+m]);for(let t=1;t<=u;t++)y.push([p+x,g+m-t*a]);for(let t=1;t<u;t++)y.push([p+x-t*s,g-m]);y.push(y[0]);const d=new f({rings:[y],spatialReference:r}),w=k.execute(d,i);if(!w)return C(e,r,i);const M=w.extent,R=Z(i);if(null==M||null!=R&&M.width>=R)return C(e,r,i);const S=he(w.rings),P=s*a*u*u,b=Math.sqrt(S/P)/c,G={x:M.width/c/u,y:M.height/c/u},E={x:s*b,y:a*b},N=G.x*G.y;return Math.abs(N-E.x*E.y)/N<.1?G:E}function z(e,t){return("number"==typeof e?e:(e.x+e.y)/2)*n(t)*b*P}function L(e,t){const{pixelSize:n,extent:i}=e;return z(_(n,t,i),t)}function W(e,t=.01){return n(e)?t/n(e):0}function I(e,t,n,i=!0){const o=e.spatialReference;if(o.equals(t))return e;h();const r=k.execute(e,t,{geographicTransformation:n});return i&&r?(O([e],[r],o,t),r):r}function O(e,t,n,i){const o=$(n,!0),r=$(i,!0),s=W(n,S),a=W(i,S);if(s&&null!=o&&null!=r)for(let l=0;l<e.length;l++){const n=t[l];if(!n)continue;const{x:i}=e[l],{x:c}=n;c>=r[1]-a&&Math.abs(i-o[0])<s?n.x-=r[1]-r[0]:c<=r[0]+a&&Math.abs(i-o[1])<s&&(n.x+=r[1]-r[0])}}function A(e){const{inSR:t,outSR:n,preferPE:i}=e;if(t.equals(n)){const{points:t}=J(e,null);return t}if(t.isWebMercator&&n.isWGS84||t.isWGS84&&n.isWebMercator)return Y(e);if(i){if(t.isGeographic)return q(e);if(null!=B(t))return q(e)}return F(e)}function F(e){const{points:t}=J(e,null),{inSR:n,outSR:i,datumTransformation:o}=e,r=t.map(e=>new c(e[0],e[1],n)),s=k.executeMany(r,i,{geographicTransformation:o});return o&&O(r,s,n,i),s.map(e=>e?[e.x,e.y]:[NaN,NaN])}function q(e){const{inSR:t,outSR:n,datumTransformation:i}=e,s=B(t),{points:c,mask:f}=J(e,s);if(!t.isGeographic){const e=t.wkid?o.coordsys(t.wkid):o.fromString(t.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,t.wkt2||t.wkt);a.projToGeog(e,c.length,c)}if(null!=i&&i.steps.length){let e;const t=179.9955;if(n.isGeographic&&(e=c.map(([e])=>e>t?1:e<-t?-1:0)),i.steps.forEach(e=>{const t=e.wkid?o.geogtran(e.wkid):o.fromString(r.PE_TYPE_GEOGTRAN,e.wkt);l.geogToGeog(t,c.length,c,null,e.isInverse?r.PE_TRANSFORM_2_TO_1:r.PE_TRANSFORM_1_TO_2)}),e)for(let n=0;n<c.length;n++){const i=e[n],o=c[n][0],r=o>t?1:o<-t?-1:0;i&&r&&i!==r&&(c[n][0]=i>0?o+360:o-360)}}if(!n.isGeographic){const e=B(n,!0),t=null!=e&&e.isEnvelope?[e.bbox[1],e.bbox[3]]:[-90,90];X(c,t);const i=n.wkid?o.coordsys(n.wkid):o.fromString(n.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,n.wkt2||n.wkt);a.geogToProj(i,c.length,c)}let u=c;if(f&&c.length!==f.length){u=[];for(let e=0,t=0;e<f.length;e++)f[e]?u.push(c[t++]):u.push([NaN,NaN])}return u}function Y(e){const{cols:t,rows:n,xres:i,yres:o,usePixelCenter:r,inSR:s,outSR:a}=e;let{xmin:l,ymax:f}=e;r&&(l+=i/2,f-=o/2);const x=[],m=[],h=Math.max(t,n);for(let g=0;g<h;g++){const e=l+i*Math.min(t,g),r=f-o*Math.min(n,g),h=u(new c({x:e,y:r,spatialReference:s}),s,a);g<=t&&x.push(h.x),g<=n&&m.push(h.y)}const p=[];for(let c=0;c<t;c++)for(let e=0;e<n;e++)p.push([x[c],m[e]]);return p}function B(e,t=!1){let n=e.wkid||e.wkt2||e.wkt;if(!n||e.isGeographic)return null;if(n=String(n),M.has(n)){const e=M.get(n);return t?e?.gcs:e?.pcs}const i=e.wkid?o.coordsys(e.wkid):o.fromString(e.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,e.wkt2||e.wkt),s=U(i,W(e,1e-4)),a=U(i,0,!0);return M.set(n,{pcs:s,gcs:a}),t?a:s}function U(e,t=0,n=!1){const i=s.generate(e),o=n?e.horizonGcsGenerate():e.horizonPcsGenerate();if(!i||!o?.length)return null;let r=!1,a=o.find(e=>1===e.getInclusive()&&1===e.getKind());if(!a){if(a=o.find(e=>1===e.getInclusive()&&0===e.getKind()),!a)return null;r=!0}const l=n?0:(2===i.getNorthPoleLocation()?1:0)|(2===i.getSouthPoleLocation()?2:0),c=i.isPannableRectangle(),f=a.getCoord();if(r)return{isEnvelope:r,isPannable:c,vertices:f,coef:null,bbox:[f[0][0]-t,f[0][1]-t,f[1][0]+t,f[1][1]+t],poleLocation:l};let u=0;const x=[];let[m,h]=f[0],[p,g]=f[0];for(let s=0,y=f.length;s<y;s++){u++,u===y&&(u=0);const[e,t]=f[s],[n,i]=f[u];if(i===t)x.push([e,n,t,i,2]);else{const o=(n-e)/(i-t||1e-4),r=e-o*t;t<i?x.push([o,r,t,i,0]):x.push([o,r,i,t,1])}m=m<e?m:e,h=h<t?h:t,p=p>e?p:e,g=g>t?g:t}return{isEnvelope:!1,isPannable:c,vertices:f,coef:x,bbox:[m,h,p,g],poleLocation:l}}function J(e,t){const n=[],{cols:i,rows:o,xres:r,yres:s,usePixelCenter:a}=e;let{xmin:l,ymax:c}=e;if(a&&(l+=r/2,c-=s/2),null==t){for(let e=0;e<i;e++)for(let t=0;t<o;t++)n.push([l+r*e,c-s*t]);return{points:n}}const f=new Uint8Array(i*o);if(t.isEnvelope){const{isPannable:e,bbox:[a,u,x,m]}=t;for(let t=0,h=0;t<i;t++){const i=l+r*t,p=e||i>=a&&i<=x;for(let e=0;e<o;e++,h++){const t=c-s*e;p&&t>=u&&t<=m&&(n.push([i,t]),f[h]=1)}}return{points:n,mask:f}}const u=t.coef,x=[];for(let m=0;m<o;m++){const e=c-s*m,t=[],n=[];for(let o=0;o<u.length;o++){const[i,r,s,a,l]=u[o];if(e===s&&s===a)t.push(i),t.push(r),n.push(2),n.push(2);else if(e>=s&&e<=a){const o=i*e+r;t.push(o),n.push(l)}}let i=t;if(t.length>2){let e=2===n[0]?0:n[0],o=t[0];i=[];for(let r=1;r<n.length;r++)2===n[r]&&r!==n.length-1||(n[r]!==e&&(i.push(0===e?Math.min(o,t[r-1]):Math.max(o,t[r-1])),e=n[r],o=t[r]),r===n.length-1&&i.push(0===n[r]?Math.min(o,t[r]):Math.max(o,t[r])));i.sort((e,t)=>e-t)}else t[0]>t[1]&&(i=[t[1],t[0]]);x.push(i)}for(let m=0,h=0;m<i;m++){const e=l+r*m;for(let t=0;t<o;t++,h++){const i=c-s*t,o=x[t];if(2===o.length)e>=o[0]&&e<=o[1]&&(n.push([e,i]),f[h]=1);else if(o.length>2){let t=!1;for(let n=0;n<o.length;n+=2)if(e>=o[n]&&e<=o[n+1]){t=!0;break}t&&(n.push([e,i]),f[h]=1)}}}return{points:n,mask:f}}function X(e,t){const[n,i]=t;for(let o=0;o<e.length;o++){const t=e[o][1];(t<n||t>i)&&(e[o]=[NaN,NaN])}}function K(e,t){const n=Z(e[0].spatialReference);if(e.length<2||null==n)return e[0];if(t=t??W(e[0].spatialReference),1===(e=e.filter(e=>e.width>t)).length)return e[0];let{xmin:o,xmax:r,ymin:s,ymax:a}=e[0];for(let i=1;i<e.length;i++){const t=e[i];r=t.xmax+n*i,s=Math.min(s,t.ymin),a=Math.max(a,t.ymax)}return new i({xmin:o,xmax:r,ymin:s,ymax:a,spatialReference:e[0].spatialReference})}function D(t,n,o=null,r=!0){const s=t.spatialReference;if(s.equals(n)||!n)return t;const a=te(t),l=Z(s,!0),c=Z(n);if(0===a||null==l||null==c){const e=V(t,n,o,r);if(e&&null==l&&null!=c&&Math.abs(e.width-c)<W(n)&&k.isLoaded()){const i=B(s);if(null!=i&&0===i.poleLocation&&t.width<(i.bbox[2]-i.bbox[0])/2)return Q(t,n)||e}return e}const f=t.clone().normalize();if(1===f.length&&t.xmax<l&&t.xmax-l/2>W(s)){const{xmin:e,xmax:n}=t;for(let o=0;o<=a;o++){const r=0===o?e:-l/2,c=o===a?n-l*o:l/2;f[o]=new i({xmin:r,xmax:c,ymin:t.ymin,ymax:t.ymax,spatialReference:s})}}const u=f.map(e=>V(e,n,o,r)).filter(e);return 0===u.length?null:K(u)}function H(e,t,n){if("extent"===e.type){const{xmin:t,ymin:n,xmax:i,ymax:o,spatialReference:r}=e;e=new f({rings:[[[t,o],[i,o],[i,n],[t,n],[t,o]]],spatialReference:r})}return e.spatialReference.equals(t)?e:(h(),k.execute(e,t,{geographicTransformation:n}))}function Q(e,t){const n=Z(t);if(null==n)return null;let{xmin:o,ymin:r,xmax:s,ymax:a}=e;const l=e.spatialReference,c=new f({spatialReference:l,rings:[[[o,r],[s,r],[s,a],[o,a],[o,r]]]}),u=k.execute(c,t);if(2!==u.rings.length||!u.rings[0].length||!u.rings[1].length)return null;const{rings:x}=u,m=W(l),h=new i({spatialReference:t});for(let i=0;i<2;i++){o=s=x[i][0][0],r=a=x[i][0][1];for(let e=0;e<x[i].length;e++)o=o>x[i][e][0]?x[i][e][0]:o,s=s<x[i][e][0]?x[i][e][0]:s,r=r>x[i][e][1]?x[i][e][1]:r,a=a<x[i][e][1]?x[i][e][1]:a;if(0===i)h.ymin=r,h.ymax=a,h.xmin=o,h.xmax=s;else if(h.ymin=Math.min(h.ymin,r),h.ymax=Math.max(h.ymax,a),Math.abs(s-n/2)<m)h.xmin=o,h.xmax=h.xmax+n;else{if(!(Math.abs(o+n/2)<m))return null;h.xmax=s+n}}return h}function V(e,t,n,i=!0,o=!0){const r=e.spatialReference;if(r.equals(t)||!t)return e;h();const s=k.execute(e,t,{geographicTransformation:n});if(o&&t.isWebMercator&&s&&(s.ymax=Math.min(20037508.342787,s.ymax),s.ymin=Math.max(-20037508.342787,s.ymin),s.ymin>=s.ymax))return null;if(!i||!s)return s;const a=$(r,!0),l=$(t,!0);if(null==a||null==l)return s;const f=W(r,.001),u=W(r,S),x=W(t,.001);if(Math.abs(s.xmin-l[0])<x&&Math.abs(s.xmax-l[1])<x){const i=Math.abs(e.xmin-a[0]),o=Math.abs(a[1]-e.xmax);if(i<f&&o>u){s.xmin=l[0];const i=[];i.push(new c(e.xmax,e.ymin,r)),i.push(new c(e.xmax,(e.ymin+e.ymax)/2,r)),i.push(new c(e.xmax,e.ymax,r));const o=i.map(e=>I(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmax=Math.max.apply(null,o)}if(o<f&&i>u){s.xmax=l[1];const i=[];i.push(new c(e.xmin,e.ymin,r)),i.push(new c(e.xmin,(e.ymin+e.ymax)/2,r)),i.push(new c(e.xmin,e.ymax,r));const o=i.map(e=>I(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmin=Math.min.apply(null,o)}}else{const e=W(t,.001);Math.abs(s.xmin-l[0])<e&&(s.xmin=l[0]),Math.abs(s.xmax-l[1])<e&&(s.xmax=l[1])}return s}function Z(e,t=!1){if(!e)return null;const n=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*n:e.wkid&&e.isGeographic?360:2*g[e.wkid]||null}function $(e,t=!1){if(e.isGeographic)return[-180,180];const n=Z(e,t);return n?[-n/2,n/2]:null}function ee(e,t,n,i){let o=(e-t)/n;return o-Math.floor(o)!==0?o=Math.floor(o):i&&(o-=1),o}function te(e,t=!1){const n=Z(e.spatialReference);if(null==n)return 0;const i=t?0:-(n/2),o=W(e.spatialReference),r=!t&&Math.abs(e.xmax-n/2)<o?n/2:e.xmax,s=!t&&Math.abs(e.xmin+n/2)<o?-n/2:e.xmin;return ee(r,i,n,!0)-ee(s,i,n,!1)}function ne(e){const t=e.storageInfo.origin.x,n=Z(e.spatialReference,!0);if(null==n)return{originX:t,halfWorldWidth:null,pyramidsInfo:null};const i=n/2,{nativePixelSize:o,storageInfo:r,extent:s}=e,{maximumPyramidLevel:a,blockWidth:l,pyramidScalingFactor:c}=r;let f=o.x;const u=[],x=null!=e.transform&&"gcs-shift"===e.transform.type,m=t+(x?0:i),h=x?n-t:i-t;for(let p=0;p<=a;p++){const e=(s.xmax-t)/f/l,n=e-Math.floor(e)===0?e:Math.ceil(e),i=h/f/l,o=i-Math.floor(i)===0?i:Math.ceil(i),r=Math.floor(m/f/l),a=Math.round(m/f)%l,x=(l-Math.round(h/f)%l)%l;u.push({resolutionX:f,blockWidth:l,datasetColumnCount:n,worldColumnCountFromOrigin:o,leftMargin:a,rightPadding:x,originColumnOffset:r}),f*=c}return{originX:t,halfWorldWidth:i,pyramidsInfo:u,hasGCSSShiftTransform:x}}function ie(e){if(!e||e.isGeographic)return e;const t=String(e.wkid||e.wkt2||e.wkt);let n;if(R.has(t))n=R.get(t);else{n=(e.wkid?o.coordsys(e.wkid):o.fromString(r.PE_TYPE_PROJCS,e.wkt2||e.wkt)).getGeogcs().getCode(),R.set(t,n)}return new x({wkid:n})}function oe(e){const t=e.isAdaptive&&null==e.spacing;let n=e.spacing||[y,y],i=re(e),o={cols:i.size[0]+1,rows:i.size[1]+1};const r=i.outofBoundPointCount>0&&i.outofBoundPointCount<i.offsets.length/2;let s=i.outofBoundPointCount===i.offsets.length/2||t&&r?[0,0]:p(i.offsets,o,n,w);const a=(s[0]+s[1])/2,l=e.projectedExtent.spatialReference,c=e.srcBufferExtent.spatialReference;if(t&&(r||a>w)&&(l.isGeographic||B(l),n=[d,d],i=re({...e,spacing:n}),o={cols:i.size[0]+1,rows:i.size[1]+1},s=p(i.offsets,o,n,w)),i.error=s,n[0]>1&&(i.coefficients=se(i.offsets,o,r)),e.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(c.isGeographic)i.gcsGrid={offsets:i.offsets,coefficients:i.coefficients,spacing:n};else{const t=B(l);if(null!=t&&!t.isEnvelope){const t=ie(l),s=D(e.projectedExtent,t),{offsets:a}=re({...e,srcBufferExtent:s,spacing:n}),c=se(a,o,r);i.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return i}function re(e){const{projectedExtent:t,srcBufferExtent:n,pixelSize:i,datumTransformation:o,rasterTransform:r}=e,s=t.spatialReference,a=n.spatialReference;h();const{xmin:l,ymin:f,xmax:u,ymax:x}=t,m=Z(a),p=null!=m&&(e.hasWrapAround||"gcs-shift"===r?.type),g=e.spacing||[y,y],w=g[0]*i.x,M=g[1]*i.y,R=1===g[0],P=Math.ceil((u-l)/w-.1/g[0])+(R?0:1),b=Math.ceil((x-f)/M-.1/g[1])+(R?0:1),G=A({cols:P,rows:b,xmin:l,ymax:x,xres:w,yres:M,inSR:s,outSR:a,datumTransformation:o,preferPE:g[0]<=d,usePixelCenter:R}),k=[];let E,T=0;const N=R?-1:NaN,{xmin:v,xmax:j,ymax:C,width:_,height:z}=n,L=W(a,S),I=null!=m&&v>0&&j>m/2,O=B(s),F=null!=O&&O.poleLocation>0;for(let h=0;h<P;h++){const e=[];for(let t=0;t<b;t++){let n=G[h*b+t];if(p&&n[0]>j&&n[0]>m/2-L?n[0]-=m:p&&0===h&&n[0]<0&&I&&!r&&(n[0]+=m),!n||isNaN(n[0])||isNaN(n[1]))k.push(N),k.push(N),e.push(null),T++;else{if(r){const e=r.inverseTransform(new c({x:n[0],y:n[1],spatialReference:a}));n=[e.x,e.y]}e.push(n),h>0&&p&&E[t]&&n[0]<E[t][0]&&(n[0]+=m,F&&n[0]>j&&n[0]>m&&(n[0]-=m)),k.push((n[0]-v)/_),k.push((C-n[1])/z)}}E=e}return{offsets:k,error:null,coefficients:null,outofBoundPointCount:T,spacing:g,size:R?[P,b]:[P-1,b-1]}}function se(e,t,n){const{cols:i,rows:o}=t,r=new Float32Array((i-1)*(o-1)*2*6),s=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let l=0;l<i-1;l++){for(let t=0;t<o-1;t++){let n=l*o*2+2*t;const c=e[n],f=e[n+1],u=e[n+2],x=e[n+3];n+=2*o;const m=e[n],h=e[n+1],p=e[n+2],g=e[n+3];let y=0,d=12*(t*(i-1)+l);for(let e=0;e<3;e++)r[d++]=s[y++]*c+s[y++]*u+s[y++]*p;y=0;for(let e=0;e<3;e++)r[d++]=s[y++]*f+s[y++]*x+s[y++]*g;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*c+a[y++]*m+a[y++]*p;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*f+a[y++]*h+a[y++]*g}if(n)for(let e=0;e<r.length;e++)isNaN(r[e])&&(r[e]=-1)}return r}function ae(e,t){const n=e.clone().normalize();return 1===n.length?n[0]:K(n,t)}function le(e){const{spatialReference:t}=e,n=m(t);if(!n)return e;const[o,r]=n.valid,s=r-o;let a=0;if(e.xmin<o){const t=o-e.xmin;a=Math.ceil(t/s)}else if(e.xmin>r){const t=e.xmin-r;a=-Math.ceil(t/s)}return new i({spatialReference:e.spatialReference,xmin:e.xmin+a*s,ymin:e.ymin,xmax:e.xmax+a*s,ymax:e.ymax})}function ce(e,t,i){const{storageInfo:o,pixelSize:r}=t;let s=0,a=!1;const{pyramidResolutions:l}=o,f="mixed"===o.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,o.tileInfo.dpi/96)):1,u=(e.x+e.y)/2/f;if(null!=l&&l.length){const e=l[l.length-1],o=(e.x+e.y)/2,f=(r.x+r.y)/2;if(u<=f)s=0;else if(u>=o)s=l.length,a=u/o>8;else{let e,t=f;for(let n=1;n<=l.length;n++){if(e=(l[n-1].x+l[n-1].y)/2,u<=e){u===e?s=n:"down"===i?(s=n-1,a=u/t>8):s="up"===i||u-t>e-u||u/t>2?n:n-1;break}t=e}}const x=0===s?r:l[s-1];if(a){Math.min(x.x,x.y)*n(t.spatialReference)>19567&&(a=!1)}return{pyramidLevel:s,pyramidResolution:new c({x:x.x,y:x.y,spatialReference:t.spatialReference}),excessiveReading:a}}const x=Math.log(e.x/r.x)/Math.LN2,m=Math.log(e.y/r.y)/Math.LN2,h=t.storageInfo.maximumPyramidLevel||0;s="down"===i?Math.floor(Math.min(x,m)):"up"===i?Math.ceil(Math.max(x,m)):Math.round((x+m)/2),s<0?s=0:s>h&&(a=s>h+3,s=h);const p=2**s;return{pyramidLevel:s,pyramidResolution:new c({x:p*t.nativePixelSize.x,y:p*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}function fe(e,t,n=!1){const{pixelSize:i,extent:o}=e,r=v(o,t,!1),s=D(ae(o,(i.x+i.y)/16),t,r);return!s||n||0===te(s)?s:V(o,t,r)}function ue(e,t,n){const i=n?.tileSize??512,o=n?.alignGlobalDatasetWithAGOL??!0,r=!!n?.limitToSrcResolution,{extent:s,pixelSize:a}=e,l=_(a,t,s);if(null==l)return{projectedPixelSize:null,scales:null,srcResolutions:null,isCustomTilingScheme:!1};const c=(l.x+l.y)/2,f=z(c,t),u=256/i,x=t.isGeographic?295828763.7958547*u:591657527.591555*u,m=(t.isGeographic?.703125:156543.03392800014)*u;let h="vector-magdir"===e.dataType||"vector-uv"===e.dataType;const p=fe(e,t,!0),g=Math.min(Math.ceil(Math.log(Math.min(e.width,e.height)/32)/Math.LN2),Math.ceil(Math.log(x/2/f)/Math.LN2));if(!h&&p&&o&&(t.isGeographic||t.isWebMercator)){const n=Z(t);if(h=te(p)>0||null!=n&&p.width>n/4,!h&&null!=n){let t=-1;if(g<3)t=2**g*c*i;else if(e.storageInfo){const{maximumPyramidLevel:n=0,pyramidScalingFactor:o=2}=e.storageInfo;t=o**n*c*i}const o=Math.ceil(n/t);h=1===o||2===o&&n/2-p.xmax<t}}let y,d=f;const w=1.001,M=Math.min(2,Math.max(1.414,e.storageInfo?.pyramidScalingFactor||2));if(h){d=x;const n=xe(e,t);y={x:n.x*m,y:n.y*m}}else{y={x:a.x,y:a.y};let e=0;for(;d<x*(w/2)&&e<g;)e++,d*=M,y.x*=M,y.y*=M;Math.max(d,x)/Math.min(d,x)<=w&&(d=x)}const R=[d],S=[{x:y.x,y:y.y}],P=70.5310735,b=Math.min(P,f)/w;for(;d>=b;)d/=M,y.x/=M,y.y/=M,R.push(d),S.push({x:y.x,y:y.y});if(r){const e=.001*a.x;let t=S.findIndex(t=>t.x>=a.x-e&&t.x<=a.x+e);t>-1?(S.length=t+1,R.length=t+1):(t=S.findIndex(t=>t.x<=a.x+e),t>0&&(S.length=t,R.length=t))}return{projectedPixelSize:l,scales:R,srcResolutions:S,isCustomTilingScheme:!h}}function xe(e,t){if(t.isWGS84||t.isWebMercator){const n=t.isGeographic?1341104507446289e-21:.29858214164761665,i=t.isGeographic?4326:3857,o=fe(e,new x({wkid:i}),!0),r=_({x:n,y:n},e.spatialReference,o);return{x:r.x/n,y:r.y/n}}const n=_(e.pixelSize,t,e.extent),i=(n.x+n.y)/2;return{x:e.pixelSize.x/i,y:e.pixelSize.y/i}}function me(e,t){const{spatialReference:n,lods:i}=t,{x:o,y:r}=xe(e,n);return i.map(({resolution:e})=>({x:e*o,y:e*r}))}function he(e){let t=0;for(const n of e){const e=n.length;let i=n[0][0]*(n[1][1]-n[e-2][1]);for(let t=1;t<e-1;t++)i+=n[t][0]*(n[t+1][1]-n[t-1][1]);t+=i/2}return Math.abs(t)}export{ue as computeProjectedScales,xe as computeSrcResolutionRatio,me as computeSrcResolutions,y as defaultGridSpacing,w as defaultProjectionToleranceInPixels,v as getDefaultDatumTransformationForDataset,A as getProjectedGridPoints,oe as getProjectionOffsetGrid,ne as getRasterDatasetAlignmentInfo,L as getSourceScale,Z as getWorldWidth,te as getWorldWrapCount,N as load,d as minimumGridSpacing,fe as projectDatasetExtent,_ as projectDatasetResolution,D as projectExtent,I as projectPoint,H as projectPolygon,j as projectResolution,le as shiftExtent,ae as snapExtent,ce as snapPyramid};
|
|
2
|
+
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{getMetersPerUnitForSR as n}from"../../../core/units.js";import i from"../../../geometry/Extent.js";import{c as o,a as r,n as s,P as a,e as l}from"../../../chunks/pe.js";import c from"../../../geometry/Point.js";import f from"../../../geometry/Polygon.js";import{projectWithoutEngine as u}from"../../../geometry/projectionUtils.js";import x from"../../../geometry/SpatialReference.js";import{getInfo as m}from"../../../geometry/support/spatialReferenceUtils.js";function h(){if(!T)throw new t("rasterprojectionhelper-project","projection operator is not loaded")}const p=(e,t,n,i=0)=>{if(1===n[0])return[0,0];let o=1,r=-1,s=1,a=-1;for(let g=0;g<e.length;g+=2)isNaN(e[g])||(o=o>e[g]?e[g]:o,r=r>e[g]?r:e[g],s=s>e[g+1]?e[g+1]:s,a=a>e[g+1]?a:e[g+1]);const{cols:l,rows:c}=t,f=(r-o)/l/n[0],u=(a-s)/c/n[1],x=2*i;let m=0,h=!1,p=[0,0];for(let g=0;g<l-3;g++){for(let t=0;t<c-3;t++){const n=g*c*2+2*t,i=(e[n]+e[n+4]+e[n+4*c]+e[n+4*c+4])/4,o=(e[n+1]+e[n+5]+e[n+4*c+1]+e[n+4*c+5])/4,r=Math.abs((i-e[n+2*c+2])/f),s=Math.abs((o-e[n+2*c+3])/u);if(r+s>m&&(m=r+s,p=[r,s]),x&&m>x){h=!0;break}}if(h)break}return p},g={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},y=32,d=4,w=d,M=new Map,R=new Map,S=500,P=39.37,b=96;let G,k,E,T=!1;async function N(){return G||(G=Promise.withResolvers(),k=await import("../../../geometry/operators/projectOperator.js"),E=await import("../../../geometry/operators/support/geographicTransformationUtils.js"),k.isLoaded()||await k.load(),E.isLoaded()||await E.load(),T=!0,G.resolve()),G.promise}function v(e,t,n){if(h(),n){const n=k.execute(e,t);return E.getTransformation(t,e.spatialReference,n)}return E.getTransformation(e.spatialReference,t,e)}function j(e,t,n,o){const r=e.spatialReference;if(!r||!t||r.equals(t))return e;h();const s=n.center,a=new i({xmin:s.x-e.x/2,xmax:s.x+e.x/2,ymin:s.y-e.y/2,ymax:s.y+e.y/2,spatialReference:r}),l=k.execute(a,t,{geographicTransformation:o}),c=Z(t);return null==l||null!=c&&l.width>=c?C(e,r,t):{x:l.width,y:l.height}}function C(e,t,i){const o=n(t)/n(i);return{x:e.x*o,y:e.y*o}}function _(e,i,o){const{spatialReference:r}=o;if(!r||!i||r.equals(i))return e;if(r.isGeographic&&i.isGeographic)return C(e,r,i);if(h(),!T)throw new t("raster-projection-helper:project-dataset-resolution","geometry engine is not loaded");let{x:s,y:a}=e;const l=(s+a)/2*n(r);let c=1;l>30&&(c=30/l,s*=c,a*=c);const u=256,x=s*u/2,m=a*u/2,{x:p,y:g}=o.center,y=[];for(let t=0;t<=u;t++)y.push([p-x,g-m+t*a]);for(let t=1;t<=u;t++)y.push([p-x+t*s,g+m]);for(let t=1;t<=u;t++)y.push([p+x,g+m-t*a]);for(let t=1;t<u;t++)y.push([p+x-t*s,g-m]);y.push(y[0]);const d=new f({rings:[y],spatialReference:r}),w=k.execute(d,i);if(!w)return C(e,r,i);const M=w.extent,R=Z(i);if(null==M||null!=R&&M.width>=R)return C(e,r,i);const S=he(w.rings),P=s*a*u*u,b=Math.sqrt(S/P)/c,G={x:M.width/c/u,y:M.height/c/u},E={x:s*b,y:a*b},N=G.x*G.y;return Math.abs(N-E.x*E.y)/N<.1?G:E}function z(e,t){return("number"==typeof e?e:(e.x+e.y)/2)*n(t)*b*P}function L(e,t){const{pixelSize:n,extent:i}=e;return z(_(n,t,i),t)}function W(e,t=.01){return n(e)?t/n(e):0}function I(e,t,n,i=!0){const o=e.spatialReference;if(o.equals(t))return e;h();const r=k.execute(e,t,{geographicTransformation:n});return i&&r?(O([e],[r],o,t),r):r}function O(e,t,n,i){const o=$(n,!0),r=$(i,!0),s=W(n,S),a=W(i,S);if(s&&null!=o&&null!=r)for(let l=0;l<e.length;l++){const n=t[l];if(!n)continue;const{x:i}=e[l],{x:c}=n;c>=r[1]-a&&Math.abs(i-o[0])<s?n.x-=r[1]-r[0]:c<=r[0]+a&&Math.abs(i-o[1])<s&&(n.x+=r[1]-r[0])}}function A(e){const{inSR:t,outSR:n,preferPE:i}=e;if(t.equals(n)){const{points:t}=J(e,null);return t}if(t.isWebMercator&&n.isWGS84||t.isWGS84&&n.isWebMercator)return Y(e);if(i){if(t.isGeographic)return q(e);if(null!=B(t))return q(e)}return F(e)}function F(e){const{points:t}=J(e,null),{inSR:n,outSR:i,datumTransformation:o}=e,r=t.map(e=>new c(e[0],e[1],n)),s=k.executeMany(r,i,{geographicTransformation:o});return o&&O(r,s,n,i),s.map(e=>e?[e.x,e.y]:[NaN,NaN])}function q(e){const{inSR:t,outSR:n,datumTransformation:i}=e,s=B(t),{points:c,mask:f}=J(e,s);if(!t.isGeographic){const e=t.wkid?o.coordsys(t.wkid):o.fromString(t.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,t.wkt2||t.wkt);a.projToGeog(e,c.length,c)}if(null!=i&&i.steps.length){let e;const t=179.9955;if(n.isGeographic&&(e=c.map(([e])=>e>t?1:e<-t?-1:0)),i.steps.forEach(e=>{const t=e.wkid?o.geogtran(e.wkid):o.fromString(r.PE_TYPE_GEOGTRAN,e.wkt);l.geogToGeog(t,c.length,c,null,e.isInverse?r.PE_TRANSFORM_2_TO_1:r.PE_TRANSFORM_1_TO_2)}),e)for(let n=0;n<c.length;n++){const i=e[n],o=c[n][0],r=o>t?1:o<-t?-1:0;i&&r&&i!==r&&(c[n][0]=i>0?o+360:o-360)}}if(!n.isGeographic){const e=B(n,!0),t=null!=e&&e.isEnvelope?[e.bbox[1],e.bbox[3]]:[-90,90];X(c,t);const i=n.wkid?o.coordsys(n.wkid):o.fromString(n.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,n.wkt2||n.wkt);a.geogToProj(i,c.length,c)}let u=c;if(f&&c.length!==f.length){u=[];for(let e=0,t=0;e<f.length;e++)f[e]?u.push(c[t++]):u.push([NaN,NaN])}return u}function Y(e){const{cols:t,rows:n,xres:i,yres:o,usePixelCenter:r,inSR:s,outSR:a}=e;let{xmin:l,ymax:f}=e;r&&(l+=i/2,f-=o/2);const x=[],m=[],h=Math.max(t,n);for(let g=0;g<h;g++){const e=l+i*Math.min(t,g),r=f-o*Math.min(n,g),h=u(new c({x:e,y:r,spatialReference:s}),s,a);g<=t&&x.push(h.x),g<=n&&m.push(h.y)}const p=[];for(let c=0;c<t;c++)for(let e=0;e<n;e++)p.push([x[c],m[e]]);return p}function B(e,t=!1){let n=e.wkid||e.wkt2||e.wkt;if(!n||e.isGeographic)return null;if(n=String(n),M.has(n)){const e=M.get(n);return t?e?.gcs:e?.pcs}const i=e.wkid?o.coordsys(e.wkid):o.fromString(e.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,e.wkt2||e.wkt),s=U(i,W(e,1e-4)),a=U(i,0,!0);return M.set(n,{pcs:s,gcs:a}),t?a:s}function U(e,t=0,n=!1){const i=s.generate(e),o=n?e.horizonGcsGenerate():e.horizonPcsGenerate();if(!i||!o?.length)return null;let r=!1,a=o.find(e=>1===e.getInclusive()&&1===e.getKind());if(!a){if(a=o.find(e=>1===e.getInclusive()&&0===e.getKind()),!a)return null;r=!0}const l=n?0:(2===i.getNorthPoleLocation()?1:0)|(2===i.getSouthPoleLocation()?2:0),c=i.isPannableRectangle(),f=a.getCoord();if(r)return{isEnvelope:r,isPannable:c,vertices:f,coef:null,bbox:[f[0][0]-t,f[0][1]-t,f[1][0]+t,f[1][1]+t],poleLocation:l};let u=0;const x=[];let[m,h]=f[0],[p,g]=f[0];for(let s=0,y=f.length;s<y;s++){u++,u===y&&(u=0);const[e,t]=f[s],[n,i]=f[u];if(i===t)x.push([e,n,t,i,2]);else{const o=(n-e)/(i-t||1e-4),r=e-o*t;t<i?x.push([o,r,t,i,0]):x.push([o,r,i,t,1])}m=m<e?m:e,h=h<t?h:t,p=p>e?p:e,g=g>t?g:t}return{isEnvelope:!1,isPannable:c,vertices:f,coef:x,bbox:[m,h,p,g],poleLocation:l}}function J(e,t){const n=[],{cols:i,rows:o,xres:r,yres:s,usePixelCenter:a}=e;let{xmin:l,ymax:c}=e;if(a&&(l+=r/2,c-=s/2),null==t){for(let e=0;e<i;e++)for(let t=0;t<o;t++)n.push([l+r*e,c-s*t]);return{points:n}}const f=new Uint8Array(i*o);if(t.isEnvelope){const{isPannable:e,bbox:[a,u,x,m]}=t;for(let t=0,h=0;t<i;t++){const i=l+r*t,p=e||i>=a&&i<=x;for(let e=0;e<o;e++,h++){const t=c-s*e;p&&t>=u&&t<=m&&(n.push([i,t]),f[h]=1)}}return{points:n,mask:f}}const u=t.coef,x=[];for(let m=0;m<o;m++){const e=c-s*m,t=[],n=[];for(let o=0;o<u.length;o++){const[i,r,s,a,l]=u[o];if(e===s&&s===a)t.push(i),t.push(r),n.push(2),n.push(2);else if(e>=s&&e<=a){const o=i*e+r;t.push(o),n.push(l)}}let i=t;if(t.length>2){let e=2===n[0]?0:n[0],o=t[0];i=[];for(let r=1;r<n.length;r++)2===n[r]&&r!==n.length-1||(n[r]!==e&&(i.push(0===e?Math.min(o,t[r-1]):Math.max(o,t[r-1])),e=n[r],o=t[r]),r===n.length-1&&i.push(0===n[r]?Math.min(o,t[r]):Math.max(o,t[r])));i.sort((e,t)=>e-t)}else t[0]>t[1]&&(i=[t[1],t[0]]);x.push(i)}for(let m=0,h=0;m<i;m++){const e=l+r*m;for(let t=0;t<o;t++,h++){const i=c-s*t,o=x[t];if(2===o.length)e>=o[0]&&e<=o[1]&&(n.push([e,i]),f[h]=1);else if(o.length>2){let t=!1;for(let n=0;n<o.length;n+=2)if(e>=o[n]&&e<=o[n+1]){t=!0;break}t&&(n.push([e,i]),f[h]=1)}}}return{points:n,mask:f}}function X(e,t){const[n,i]=t;for(let o=0;o<e.length;o++){const t=e[o][1];(t<n||t>i)&&(e[o]=[NaN,NaN])}}function K(e,t){const n=Z(e[0].spatialReference);if(e.length<2||null==n)return e[0];if(t=t??W(e[0].spatialReference),1===(e=e.filter(e=>e.width>t)).length)return e[0];let{xmin:o,xmax:r,ymin:s,ymax:a}=e[0];for(let i=1;i<e.length;i++){const t=e[i];r=t.xmax+n*i,s=Math.min(s,t.ymin),a=Math.max(a,t.ymax)}return new i({xmin:o,xmax:r,ymin:s,ymax:a,spatialReference:e[0].spatialReference})}function D(t,n,o=null,r=!0){const s=t.spatialReference;if(s.equals(n)||!n)return t;const a=te(t),l=Z(s,!0),c=Z(n);if(0===a||null==l||null==c){const e=V(t,n,o,r);if(e&&null==l&&null!=c&&Math.abs(e.width-c)<W(n)&&k.isLoaded()){const i=B(s);if(null!=i&&0===i.poleLocation&&t.width<(i.bbox[2]-i.bbox[0])/2)return Q(t,n)||e}return e}const f=t.clone().normalize();if(1===f.length&&t.xmax<l&&t.xmax-l/2>W(s)){const{xmin:e,xmax:n}=t;for(let o=0;o<=a;o++){const r=0===o?e:-l/2,c=o===a?n-l*o:l/2;f[o]=new i({xmin:r,xmax:c,ymin:t.ymin,ymax:t.ymax,spatialReference:s})}}const u=f.map(e=>V(e,n,o,r)).filter(e);return 0===u.length?null:K(u)}function H(e,t,n){if("extent"===e.type){const{xmin:t,ymin:n,xmax:i,ymax:o,spatialReference:r}=e;e=new f({rings:[[[t,o],[i,o],[i,n],[t,n],[t,o]]],spatialReference:r})}return e.spatialReference.equals(t)?e:(h(),k.execute(e,t,{geographicTransformation:n}))}function Q(e,t){const n=Z(t);if(null==n)return null;let{xmin:o,ymin:r,xmax:s,ymax:a}=e;const l=e.spatialReference,c=new f({spatialReference:l,rings:[[[o,r],[s,r],[s,a],[o,a],[o,r]]]}),u=k.execute(c,t);if(2!==u.rings.length||!u.rings[0].length||!u.rings[1].length)return null;const{rings:x}=u,m=W(l),h=new i({spatialReference:t});for(let i=0;i<2;i++){o=s=x[i][0][0],r=a=x[i][0][1];for(let e=0;e<x[i].length;e++)o=o>x[i][e][0]?x[i][e][0]:o,s=s<x[i][e][0]?x[i][e][0]:s,r=r>x[i][e][1]?x[i][e][1]:r,a=a<x[i][e][1]?x[i][e][1]:a;if(0===i)h.ymin=r,h.ymax=a,h.xmin=o,h.xmax=s;else if(h.ymin=Math.min(h.ymin,r),h.ymax=Math.max(h.ymax,a),Math.abs(s-n/2)<m)h.xmin=o,h.xmax=h.xmax+n;else{if(!(Math.abs(o+n/2)<m))return null;h.xmax=s+n}}return h}function V(e,t,n,i=!0,o=!0){const r=e.spatialReference;if(r.equals(t)||!t)return e;h();const s=k.execute(e,t,{geographicTransformation:n});if(o&&t.isWebMercator&&s&&(s.ymax=Math.min(20037508.342787,s.ymax),s.ymin=Math.max(-20037508.342787,s.ymin),s.ymin>=s.ymax))return null;if(!i||!s)return s;const a=$(r,!0),l=$(t,!0);if(null==a||null==l)return s;const f=W(r,.001),u=W(r,S),x=W(t,.001);if(Math.abs(s.xmin-l[0])<x&&Math.abs(s.xmax-l[1])<x){const i=Math.abs(e.xmin-a[0]),o=Math.abs(a[1]-e.xmax);if(i<f&&o>u){s.xmin=l[0];const i=[];i.push(new c(e.xmax,e.ymin,r)),i.push(new c(e.xmax,(e.ymin+e.ymax)/2,r)),i.push(new c(e.xmax,e.ymax,r));const o=i.map(e=>I(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmax=Math.max.apply(null,o)}if(o<f&&i>u){s.xmax=l[1];const i=[];i.push(new c(e.xmin,e.ymin,r)),i.push(new c(e.xmin,(e.ymin+e.ymax)/2,r)),i.push(new c(e.xmin,e.ymax,r));const o=i.map(e=>I(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmin=Math.min.apply(null,o)}}else{const e=W(t,.001);Math.abs(s.xmin-l[0])<e&&(s.xmin=l[0]),Math.abs(s.xmax-l[1])<e&&(s.xmax=l[1])}return s}function Z(e,t=!1){if(!e)return null;const n=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*n:e.wkid&&e.isGeographic?360:2*g[e.wkid]||null}function $(e,t=!1){if(e.isGeographic)return[-180,180];const n=Z(e,t);return n?[-n/2,n/2]:null}function ee(e,t,n,i){let o=(e-t)/n;return o-Math.floor(o)!==0?o=Math.floor(o):i&&(o-=1),o}function te(e,t=!1){const n=Z(e.spatialReference);if(null==n)return 0;const i=t?0:-(n/2),o=W(e.spatialReference),r=!t&&Math.abs(e.xmax-n/2)<o?n/2:e.xmax,s=!t&&Math.abs(e.xmin+n/2)<o?-n/2:e.xmin;return ee(r,i,n,!0)-ee(s,i,n,!1)}function ne(e){const t=e.storageInfo.origin.x,n=Z(e.spatialReference,!0);if(null==n)return{originX:t,halfWorldWidth:null,pyramidsInfo:null};const i=n/2,{nativePixelSize:o,storageInfo:r,extent:s}=e,{maximumPyramidLevel:a,blockWidth:l,pyramidScalingFactor:c}=r;let f=o.x;const u=[],x=null!=e.transform&&"gcs-shift"===e.transform.type,m=t+(x?0:i),h=x?n-t:i-t;for(let p=0;p<=a;p++){const e=(s.xmax-t)/f/l,n=e-Math.floor(e)===0?e:Math.ceil(e),i=h/f/l,o=i-Math.floor(i)===0?i:Math.ceil(i),r=Math.floor(m/f/l),a=Math.round(m/f)%l,x=(l-Math.round(h/f)%l)%l;u.push({resolutionX:f,blockWidth:l,datasetColumnCount:n,worldColumnCountFromOrigin:o,leftMargin:a,rightPadding:x,originColumnOffset:r}),f*=c}return{originX:t,halfWorldWidth:i,pyramidsInfo:u,hasGCSSShiftTransform:x}}function ie(e){if(!e||e.isGeographic)return e;const t=String(e.wkid||e.wkt2||e.wkt);let n;if(R.has(t))n=R.get(t);else{n=(e.wkid?o.coordsys(e.wkid):o.fromString(r.PE_TYPE_PROJCS,e.wkt2||e.wkt)).getGeogcs().getCode(),R.set(t,n)}return new x({wkid:n})}function oe(e){const t=e.isAdaptive&&null==e.spacing;let n=e.spacing||[y,y],i=re(e),o={cols:i.size[0]+1,rows:i.size[1]+1};const r=i.outofBoundPointCount>0&&i.outofBoundPointCount<i.offsets.length/2;let s=i.outofBoundPointCount===i.offsets.length/2||t&&r?[0,0]:p(i.offsets,o,n,w);const a=(s[0]+s[1])/2,l=e.projectedExtent.spatialReference,c=e.srcBufferExtent.spatialReference;if(t&&(r||a>w)&&(l.isGeographic||B(l),n=[d,d],i=re({...e,spacing:n}),o={cols:i.size[0]+1,rows:i.size[1]+1},s=p(i.offsets,o,n,w)),i.error=s,n[0]>1&&(i.coefficients=se(i.offsets,o,r)),e.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(c.isGeographic)i.gcsGrid={offsets:i.offsets,coefficients:i.coefficients,spacing:n};else{const t=B(l);if(null!=t&&!t.isEnvelope){const t=ie(l),s=D(e.projectedExtent,t),{offsets:a}=re({...e,srcBufferExtent:s,spacing:n}),c=se(a,o,r);i.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return i}function re(e){const{projectedExtent:t,srcBufferExtent:n,pixelSize:i,datumTransformation:o,rasterTransform:r}=e,s=t.spatialReference,a=n.spatialReference;h();const{xmin:l,ymin:f,xmax:u,ymax:x}=t,m=Z(a),p=null!=m&&(e.hasWrapAround||"gcs-shift"===r?.type),g=e.spacing||[y,y],w=g[0]*i.x,M=g[1]*i.y,R=1===g[0],P=Math.ceil((u-l)/w-.1/g[0])+(R?0:1),b=Math.ceil((x-f)/M-.1/g[1])+(R?0:1),G=A({cols:P,rows:b,xmin:l,ymax:x,xres:w,yres:M,inSR:s,outSR:a,datumTransformation:o,preferPE:g[0]<=d,usePixelCenter:R}),k=[];let E,T=0;const N=R?-1:NaN,{xmin:v,xmax:j,ymax:C,width:_,height:z}=n,L=W(a,S),I=null!=m&&v>0&&j>m/2,O=B(s),F=null!=O&&O.poleLocation>0;for(let h=0;h<P;h++){const e=[];for(let t=0;t<b;t++){let n=G[h*b+t];if(p&&n[0]>j&&n[0]>m/2-L?n[0]-=m:p&&0===h&&n[0]<0&&I&&!r&&(n[0]+=m),!n||isNaN(n[0])||isNaN(n[1]))k.push(N),k.push(N),e.push(null),T++;else{if(r){const e=r.inverseTransform(new c({x:n[0],y:n[1],spatialReference:a}));n=[e.x,e.y]}e.push(n),h>0&&p&&E[t]&&n[0]<E[t][0]&&(n[0]+=m,F&&n[0]>j&&n[0]>m&&(n[0]-=m)),k.push((n[0]-v)/_),k.push((C-n[1])/z)}}E=e}return{offsets:k,error:null,coefficients:null,outofBoundPointCount:T,spacing:g,size:R?[P,b]:[P-1,b-1]}}function se(e,t,n){const{cols:i,rows:o}=t,r=new Float32Array((i-1)*(o-1)*2*6),s=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let l=0;l<i-1;l++){for(let t=0;t<o-1;t++){let n=l*o*2+2*t;const c=e[n],f=e[n+1],u=e[n+2],x=e[n+3];n+=2*o;const m=e[n],h=e[n+1],p=e[n+2],g=e[n+3];let y=0,d=12*(t*(i-1)+l);for(let e=0;e<3;e++)r[d++]=s[y++]*c+s[y++]*u+s[y++]*p;y=0;for(let e=0;e<3;e++)r[d++]=s[y++]*f+s[y++]*x+s[y++]*g;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*c+a[y++]*m+a[y++]*p;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*f+a[y++]*h+a[y++]*g}if(n)for(let e=0;e<r.length;e++)isNaN(r[e])&&(r[e]=-1)}return r}function ae(e,t){const n=e.clone().normalize();return 1===n.length?n[0]:K(n,t)}function le(e){const{spatialReference:t}=e,n=m(t);if(!n)return e;const[o,r]=n.valid,s=r-o;let a=0;if(e.xmin<o){const t=o-e.xmin;a=Math.ceil(t/s)}else if(e.xmin>r){const t=e.xmin-r;a=-Math.ceil(t/s)}return new i({spatialReference:e.spatialReference,xmin:e.xmin+a*s,ymin:e.ymin,xmax:e.xmax+a*s,ymax:e.ymax})}function ce(e,t,i){const{storageInfo:o,pixelSize:r}=t;let s=0,a=!1;const{pyramidResolutions:l}=o,f="mixed"===o.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,o.tileInfo.dpi/96)):1,u=(e.x+e.y)/2/f;if(null!=l&&l.length){const e=l[l.length-1],o=(e.x+e.y)/2,f=(r.x+r.y)/2;if(u<=f)s=0;else if(u>=o)s=l.length,a=u/o>8;else{let e,t=f;for(let n=1;n<=l.length;n++){if(e=(l[n-1].x+l[n-1].y)/2,u<=e){u===e?s=n:"down"===i?(s=n-1,a=u/t>8):s="up"===i||u-t>e-u||u/t>2?n:n-1;break}t=e}}const x=0===s?r:l[s-1];if(a){Math.min(x.x,x.y)*n(t.spatialReference)>19567&&(a=!1)}return{pyramidLevel:s,pyramidResolution:new c({x:x.x,y:x.y,spatialReference:t.spatialReference}),excessiveReading:a}}const x=Math.log(e.x/r.x)/Math.LN2,m=Math.log(e.y/r.y)/Math.LN2,h=t.storageInfo.maximumPyramidLevel||0;s="down"===i?Math.floor(Math.min(x,m)):"up"===i?Math.ceil(Math.max(x,m)):Math.round((x+m)/2),s<0?s=0:s>h&&(a=s>h+3,s=h);const p=2**s;return{pyramidLevel:s,pyramidResolution:new c({x:p*t.nativePixelSize.x,y:p*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}function fe(e,t,n=!1){const{pixelSize:i,extent:o}=e,r=v(o,t,!1),s=D(ae(o,(i.x+i.y)/16),t,r);return!s||n||0===te(s)?s:V(o,t,r)}function ue(e,t,n){const i=n?.tileSize??512,o=n?.alignGlobalDatasetWithAGOL??!0,r=!!n?.limitToSrcResolution,{extent:s,pixelSize:a}=e,l=_(a,t,s);if(null==l)return{projectedPixelSize:null,scales:null,srcResolutions:null,isCustomTilingScheme:!1};const c=(l.x+l.y)/2,f=z(c,t),u=256/i,x=t.isGeographic?295828763.7958547*u:591657527.591555*u,m=(t.isGeographic?.703125:156543.03392800014)*u;let h="vector-magdir"===e.dataType||"vector-uv"===e.dataType;const p=fe(e,t,!0),g=Math.min(Math.ceil(Math.log(Math.min(e.width,e.height)/32)/Math.LN2),Math.ceil(Math.log(x/2/f)/Math.LN2));if(!h&&p&&o&&(t.isGeographic||t.isWebMercator)){const n=Z(t);if(h=te(p)>0||null!=n&&p.width>n/4,!h&&null!=n){let t=-1;if(g<3)t=2**g*c*i;else if(e.storageInfo){const{maximumPyramidLevel:n=0,pyramidScalingFactor:o=2}=e.storageInfo;t=o**n*c*i}const o=Math.ceil(n/t);h=1===o||2===o&&n/2-p.xmax<t}}let y,d=f;const w=1.001,M=Math.min(2,Math.max(1.414,e.storageInfo?.pyramidScalingFactor||2));if(h){d=x;const n=xe(e,t);y={x:n.x*m,y:n.y*m}}else{y={x:a.x,y:a.y};let e=0;for(;d<x*(w/2)&&e<g;)e++,d*=M,y.x*=M,y.y*=M;Math.max(d,x)/Math.min(d,x)<=w&&(d=x)}const R=[d],S=[{x:y.x,y:y.y}],P=70.5310735,b=Math.min(P,f)/w;for(;d>=b;)d/=M,y.x/=M,y.y/=M,R.push(d),S.push({x:y.x,y:y.y});if(r){const e=.001*a.x;let t=S.findIndex(t=>t.x>=a.x-e&&t.x<=a.x+e);t>-1?(S.length=t+1,R.length=t+1):(t=S.findIndex(t=>t.x<=a.x+e),t>0&&(S.length=t,R.length=t))}return{projectedPixelSize:l,scales:R,srcResolutions:S,isCustomTilingScheme:!h}}function xe(e,t){if(t.isWGS84||t.isWebMercator){const n=t.isGeographic?1341104507446289e-21:.29858214164761665,i=t.isGeographic?4326:3857,o=fe(e,new x({wkid:i}),!0),r=_({x:n,y:n},e.spatialReference,o);return{x:r.x/n,y:r.y/n}}const n=_(e.pixelSize,t,e.extent),i=(n.x+n.y)/2;return{x:e.pixelSize.x/i,y:e.pixelSize.y/i}}function me(e,t){const{spatialReference:n,lods:i}=t,{x:o,y:r}=xe(e,n);return i.map(({resolution:e})=>({x:e*o,y:e*r}))}function he(e){let t=0;for(const n of e){const e=n.length;let i=n[0][0]*(n[1][1]-n[e-2][1]);for(let t=1;t<e-1;t++)i+=n[t][0]*(n[t+1][1]-n[t-1][1]);t+=i/2}return Math.abs(t)}export{ue as computeProjectedScales,xe as computeSrcResolutionRatio,me as computeSrcResolutions,y as defaultGridSpacing,w as defaultProjectionToleranceInPixels,v as getDefaultDatumTransformationForDataset,A as getProjectedGridPoints,oe as getProjectionOffsetGrid,ne as getRasterDatasetAlignmentInfo,L as getSourceScale,Z as getWorldWidth,te as getWorldWrapCount,N as load,d as minimumGridSpacing,fe as projectDatasetExtent,_ as projectDatasetResolution,D as projectExtent,I as projectPoint,H as projectPolygon,j as projectResolution,le as shiftExtent,ae as snapExtent,ce as snapPyramid};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../request.js";import r from"../../core/Error.js";import{getImageData as o}from"../../core/imageUtils.js";import{isAbsolute as i,isDataProtocol as n,isBlobProtocol as s,dataToBlob as a,join as l}from"../../core/urlUtils.js";import{generateUUID as m}from"../../core/uuid.js";import{property as c,subclass as p}from"../../core/accessorSupport/decorators.js";import u from"./MediaElementBase.js";import{mediaElementUrlProperty as h,mediaTypeProperty as d}from"./mediaUtils.js";import{getResourceContentExtension as g}from"../../portal/support/resourceExtension.js";import{ImageElementSymbol as f}from"../../support/mediaLayerUtils.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../request.js";import r from"../../core/Error.js";import{getImageData as o}from"../../core/imageUtils.js";import{isAbsolute as i,isDataProtocol as n,isBlobProtocol as s,dataToBlob as a,join as l}from"../../core/urlUtils.js";import{generateUUID as m}from"../../core/uuid.js";import{property as c,subclass as p}from"../../core/accessorSupport/decorators.js";import u from"./MediaElementBase.js";import{mediaElementUrlProperty as h,mediaTypeProperty as d}from"./mediaUtils.js";import{getResourceContentExtension as g}from"../../portal/support/resourceExtension.js";import{ImageElementSymbol as f}from"../../support/mediaLayerUtils.js";import{a as y,c as v,i as I}from"../../chunks/persistableUrlUtils.js";import{reader as j}from"../../core/accessorSupport/decorators/reader.js";import{writer as b}from"../../core/accessorSupport/decorators/writer.js";var w;let E=class extends u{static{w=f}constructor(t){super(t),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[w]=!0,this.image=null}load(){const t=this.image;if("string"==typeof t){const e=o(t).then(t=>{this._set("content",t)});this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then(()=>{this._set("content",t)});this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new r("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(t,e,r){return y(e.url,r)}writeImage(t,e,r,o){if(null==t)return;const n=o?.portalItem,s=o?.resources;if(!n||!s)return void("string"==typeof t&&(e[r]=v(t,o)));const a=U(t)?t:null;if(a){if(null==I(a))return void(e[r]=a);const t=v(a,{...o,verifyItemRelativeUrls:o?.verifyItemRelativeUrls?{writtenUrls:o.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1);if(n&&t&&!i(t))return s.toKeep.push({resource:n.resourceFromPath(t),compress:!1}),void(e[r]=t)}e[r]="<pending>",s.pendingOperations.push(H(t).then(t=>{const o=L(t,n);e[r]=o.itemRelativeUrl,s.toAdd.push({resource:o,content:{type:"blob",blob:t},compress:!1,finish:t=>{this.image=t.url}})}))}};function U(t){return"string"==typeof t&&!n(t)&&!s(t)}async function H(t){if("string"==typeof t){if(n(t))return a(t);return(await e(t,{responseType:"blob"})).data}return new Promise(e=>P(t).toBlob(e))}function P(t){if(t instanceof HTMLCanvasElement)return t;const e=t instanceof HTMLImageElement?t.naturalWidth:t.width,r=t instanceof HTMLImageElement?t.naturalHeight:t.height,o=document.createElement("canvas"),i=o.getContext("2d");return o.width=e,o.height=r,t instanceof HTMLImageElement?i.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&i.putImageData(t,0,0),o}function L(t,e){const r=m(),o=`${l("media",r)}.${g({type:"blob",blob:t})}`;return e.resourceFromPath(o)}t([c()],E.prototype,"animationOptions",void 0),t([c({readOnly:!0})],E.prototype,"content",void 0),t([c({readOnly:!0})],E.prototype,"contentWidth",null),t([c({readOnly:!0})],E.prototype,"contentHeight",null),t([c(h)],E.prototype,"image",void 0),t([j("image",["url"])],E.prototype,"readImage",null),t([b("image")],E.prototype,"writeImage",null),t([c(d)],E.prototype,"type",void 0),E=t([p("esri.layers.support.ImageElement")],E);export{E as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as r}from"tslib";import{Clonable as o}from"../../core/Clonable.js";import s from"../../core/Collection.js";import e from"../../core/Error.js";import{JSONSupportMixin as t}from"../../core/JSONSupport.js";import{property as i}from"../../core/accessorSupport/decorators.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{
|
|
2
|
+
import{__decorate as r}from"tslib";import{Clonable as o}from"../../core/Clonable.js";import s from"../../core/Collection.js";import e from"../../core/Error.js";import{JSONSupportMixin as t}from"../../core/JSONSupport.js";import{property as i}from"../../core/accessorSupport/decorators.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{c as l}from"../../chunks/persistableUrlUtils.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";let c=class extends(t(o)){constructor(r){super(r),this.type="files",this.urls=new s}writeUrls(r,o,s,t){const i=r.toArray().map(r=>l(r,t)).filter(r=>!!r);i.length?o.urls=i:t.messages?.push(new e("parquet-layer:missing-urls","Missing or empty 'urls'",{data:this}))}};r([i({type:["files"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],c.prototype,"type",void 0),r([i({type:s.ofType(String),json:{write:{isRequired:!0}}})],c.prototype,"urls",void 0),r([a("urls")],c.prototype,"writeUrls",null),c=r([p("esri.layers.support.ParquetFilesData")],c);export{c as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../../request.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{on as s,sync as i}from"../../core/reactiveUtils.js";import{property as a,subclass as n}from"../../core/accessorSupport/decorators.js";import{persistable as l}from"../../core/accessorSupport/decorators/persistable.js";import p from"./PolygonCollection.js";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../../request.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{on as s,sync as i}from"../../core/reactiveUtils.js";import{property as a,subclass as n}from"../../core/accessorSupport/decorators.js";import{persistable as l}from"../../core/accessorSupport/decorators/persistable.js";import p from"./PolygonCollection.js";import{a as m}from"../../chunks/persistableUrlUtils.js";import{reader as c}from"../../core/accessorSupport/decorators/reader.js";var u;let g=u=class extends t{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new p,this._geometriesSource=null}initialize(){this.addHandles(s(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,i))}readGeometries(e,r,t){Array.isArray(e)?this.geometries=p.fromJSON(e,t):"web-scene"!==t.origin&&"portal-item"!==t.origin||(this._geometriesSource={url:m(e,t),context:t})}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:o,context:s}=this._geometriesSource,i=await r(o,{responseType:"json",signal:t?.signal}),a=e.toJSON(),n=i.data.map(e=>({...e,spatialReference:a}));this.geometries=p.fromJSON(n,s),this._geometriesSource=null}clone(){const e=new u({geometries:o(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};e([a({type:["disjoint","contains"],nonNullable:!0,json:{write:{isRequired:!0}}})],g.prototype,"spatialRelationship",void 0),e([a({type:p,nonNullable:!0,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),l({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],g.prototype,"geometries",void 0),e([c(["web-scene","portal-item","service"],"geometries")],g.prototype,"readGeometries",null),g=u=e([n("esri.layers.support.SceneFilter")],g);const d=g;export{d as default};
|
|
@@ -428,6 +428,31 @@ export default class Sublayer extends SublayerSuperclass {
|
|
|
428
428
|
* @since 5.0
|
|
429
429
|
*/
|
|
430
430
|
get editFieldsInfo(): EditFieldsInfo | null | undefined;
|
|
431
|
+
/**
|
|
432
|
+
* `effectiveUniqueIdFields` is a convenience property that returns either the sublayer's [uniqueIdFields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/#uniqueIdFields), if defined,
|
|
433
|
+
* or the sublayer's [objectIdField](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/#objectIdField) as an array.
|
|
434
|
+
*
|
|
435
|
+
* @since 5.1
|
|
436
|
+
* @example
|
|
437
|
+
* ```js
|
|
438
|
+
* // Create a MapImageLayer and wait for it to load.
|
|
439
|
+
* const layer = new MapImageLayer({
|
|
440
|
+
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
|
|
441
|
+
* });
|
|
442
|
+
* await layer.load();
|
|
443
|
+
*
|
|
444
|
+
* // Obtain the sublayer with an id of 0.
|
|
445
|
+
* const sublayer = layer.findSublayerById(0);
|
|
446
|
+
*
|
|
447
|
+
* // Use the effectiveUniqueIdFields property to create a query for the sublayer.
|
|
448
|
+
* const query = layer.createQuery();
|
|
449
|
+
* query.outFields = layer.effectiveUniqueIdFields;
|
|
450
|
+
*
|
|
451
|
+
* // Execute the query to obtain the features from the sublayer.
|
|
452
|
+
* const results = await sublayer.queryFeatures(query);
|
|
453
|
+
* ```
|
|
454
|
+
*/
|
|
455
|
+
get effectiveUniqueIdFields(): string[];
|
|
431
456
|
/**
|
|
432
457
|
* An array of fields in the Sublayer. Each field represents an attribute
|
|
433
458
|
* that may contain a value for each feature in the Sublayer. This property
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../../PopupTemplate.js";import t from"../../request.js";import i from"../../core/Collection.js";import o from"../../core/Error.js";import has from"../../core/has.js";import{IdentifiableMixin as s}from"../../core/Identifiable.js";import{clone as a}from"../../core/lang.js";import{Loadable as l}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{MultiOriginJSONSupportMixin as p}from"../../core/MultiOriginJSONSupport.js";import{sqlAnd as u}from"../../core/sql.js";import{objectToQuery as y}from"../../core/urlUtils.js";import{property as d,cast as c,subclass as f}from"../../core/accessorSupport/decorators.js";import{ensureInteger as h,ensureType as m,Integer as b,ensureClass as g}from"../../core/accessorSupport/ensureType.js";import{nameToId as I}from"../../core/accessorSupport/PropertyOrigin.js";import{getProperties as w}from"../../core/accessorSupport/utils.js";import S from"../../geometry/Extent.js";import v from"../../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as j}from"../../geometry/support/typeUtils.js";import F from"../../graphic/MapImageGraphicOrigin.js";import O from"../../graphic/TileGraphicOrigin.js";import D from"../graphics/sources/support/QueryTask.js";import{readOrderByInfos as x}from"../mixins/OrderedLayer.js";import q from"./EditFieldsInfo.js";import{getFeatureType as L}from"./featureLayerUtils.js";import P from"./FeatureType.js";import T from"./Field.js";import _ from"./FieldsIndex.js";import{fixRendererFields as E}from"./fieldUtils.js";import M from"./LabelClass.js";import{validateLabelingInfo as N}from"./labelingInfo.js";import A from"./LayerFloorInfo.js";import B from"./OrderByInfo.js";import k from"./Relationship.js";import{getFeatureLayerCapabilities as R}from"./serviceCapabilitiesUtils.js";import{webSceneRendererTypes as C,rendererTypes as V}from"../../renderers/support/typeUtils.js";import{parseUrl as Q}from"../../rest/utils.js";import U from"../../rest/layerSources/DynamicDataLayer.js";import J from"../../rest/layerSources/DynamicMapLayer.js";import $ from"../../rest/support/AttachmentQuery.js";import W from"../../rest/support/Query.js";import{createPopupTemplate as G}from"../../support/popupUtils.js";import{isSymbol3D as K}from"../../symbols/support/typeUtils.js";import H from"../../tables/AttributeTableTemplate.js";import{reader as z}from"../../core/accessorSupport/decorators/reader.js";import{writer as X}from"../../core/accessorSupport/decorators/writer.js";var Y;function Z(e){return"esriSMS"===e?.type}function ee(e,r,t){const i=t.minimumWritableOrigin||t.origin;return!!i&&e.originIdOf(r)>=I(i)}function re(e,r,t){const i=ee(this,r,t);return{ignoreOrigin:!0,allowNull:i,enabled:!!t&&("map-image"===t.layer?.type&&(t.writeSublayerStructure||i))}}function te(e,r,t){return{enabled:!!t&&("tile"===t.layer?.type&&(ee(this,r,t)||this._isOverridden(r)))}}function ie(e,r,t){return{ignoreOrigin:!0,enabled:t&&t.writeSublayerStructure||!1}}function oe(e,r,t){return{ignoreOrigin:!0,enabled:!!t?.writeSublayerStructure&&this.originIdOf(r)>2}}function se(e,r,t){return{ignoreOrigin:!0,enabled:!!t&&(t.writeSublayerStructure||ee(this,r,t))}}let ae=0;const le=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ne=class extends(p(s(l))){static{Y=this}constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=void 0,this.editFieldsInfo=null,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this.uniqueIdFields=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise(this.reload(e)),this}readCapabilities(e,r){r=r.layerDefinition||r;const{attachment:t,operations:{supportsQuery:i,supportsQueryAttachments:o},query:{supportsFormatPBF:s,supportsOrderBy:a,supportsPagination:l,relativeTimeBinWindow:n},data:{supportsAttachment:p},queryRelated:u}=R(r,this.url);return{attachment:{supportsOrderByFields:t?.supportsOrderByFields??!1,supportsResize:t?.supportsResize??!1,supportsTypeWildcard:t?.supportsTypeWildcard??!1},exportMap:{supportsModification:!!r.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:o},data:{supportsAttachment:p},query:{relativeTimeBinWindow:n,supportsFormatPBF:s,supportsOrderBy:a,supportsPagination:l},queryRelated:u}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:r}=this;return{minScale:e,maxScale:r}}readMaxScaleRange(e,r){return{minScale:(r=r.layerDefinition||r).minScale??0,maxScale:r.maxScale??0}}get fieldsIndex(){return new _(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,r){if((r=r.layerDefinition||r).globalIdField)return r.globalIdField;if(r.fields)for(const t of r.fields)if("esriFieldTypeGlobalID"===t.type)return t.name}get graphicOrigin(){if(!this.layer)return null;switch(this.layer.type){case"tile":return new O(this.layer,this);case"map-image":return new F(this.layer,this)}}get id(){const e=this._get("id");return e??ae++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,r){return"Table"===r.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,r,t,i){e&&e.length&&(r.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach(r=>r.layer=e)}set listMode(e){this._set("listMode",e)}get loaded(){return super.loaded}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,r){return r.minScale||r.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,r){return r.maxScale||r.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,r){if((r=r.layerDefinition||r).objectIdField)return r.objectIdField;const t=r.fields?.find(e=>"esriFieldTypeOID"===e.type);return t?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,r){const{layerDefinition:t}=r;return 1-.01*(t?.transparency??t?.drawingInfo?.transparency??0)}writeOpacity(e,r,t,i){r.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,r){this.parent&&this.parent!==this.layer?r.parentLayerId=h(this.parent.id):r.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:r,layer:t,uniqueIdFields:i,url:o}=this,{spatialReference:s}=t,a="gdbVersion"in t?t.gdbVersion:void 0,l=has("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new D({fieldsIndex:r,gdbVersion:a,pbfSupported:l,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,relativeTimeBinWindow:e?.query?.relativeTimeBinWindow??0,sourceSpatialReference:s,uniqueIdFields:i,url:o})}set renderer(e){if(E(e,this.fieldsIndex),e)for(const r of e.symbols)if(K(r)){n.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new J({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}get sublayers(){return this._get("sublayers")}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return m(i.ofType(Y),e)}writeSublayers(e,r,t){this.sublayers?.length&&(r[t]=this.sublayers.map(e=>e.id).toArray().reverse())}readTitle(e,r){return r.layerDefinition?.name??r.name}readTypeIdField(e,r){let t=(r=r.layerDefinition||r).typeIdField;if(t&&r.fields){t=t.toLowerCase();const e=r.fields.find(e=>e.name.toLowerCase()===t);e&&(t=e.name)}return t}readUniqueIdFields(e,r){return r.layerDefinition?.uniqueIdInfo?.OIDFieldContainsHashValue?r.layerDefinition.uniqueIdInfo.fields:null}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,r=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===r?.type)return`${e.path}/${r.mapLayerId}`;const t={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${y(t)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,r,t,i){r[t]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=w(this),r=new Y;return w(r).store=e.clone(le),this.commitProperty("url"),r._lastParsedUrl=this._lastParsedUrl,r}createPopupTemplate(e){return G(this,e)}createQuery(){return new W({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.sublayers)return null;const e=(await import("../FeatureLayer.js")).default,{layer:r,url:t}=this;let i;if(t&&this.originIdOf("url")>2)i=new e({url:t});else{if(!r?.parsedUrl)throw new o("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const t=r.parsedUrl;i=new e({url:t.path}),t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source)}}return null!=r?.refreshInterval&&(i.refreshInterval=r.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=a(this.floorInfo)),this.originIdOf("labelingInfo")>2&&(i.labelingInfo=a(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(i.visible=this.visible),this.originIdOf("minScale")>0&&(i.minScale=this.minScale),this.originIdOf("maxScale")>0&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(i.popupTemplate=a(this.popupTemplate)),this.originIdOf("renderer")>2&&(i.renderer=a(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(i.title=this.title),"map-image"===r?.type&&r.originIdOf("customParameters")>0&&(i.customParameters=r.customParameters),"tile"===r?.type&&r.originIdOf("customParameters")>0&&(i.customParameters=r.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return L(this.types,this.typeIdField,e)}getFieldDomain(e,r){const t=r?.feature,i=this.getFeatureType(t);if(i){const r=i.domains&&i.domains[e];if(r&&"inherited"!==r.type)return r}return this._getLayerDomain(e)}async queryAttachments(e,r){await this.load();let t=$.from(e);const i=this.capabilities;if(!i?.data?.supportsAttachment)throw new o("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:s,objectIds:a,globalIds:l,num:n,size:p,start:u,where:y}=t;if(!i?.operations?.supportsQueryAttachments){if(s?.length>0||l?.length>0||p?.length>0||n||u||y)throw new o("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t)}if(!(a?.length||l?.length||y))throw new o("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);return!i?.attachment?.supportsOrderByFields&&t.orderByFields?.length&&(t=t.clone(),t.orderByFields=null),this.queryTask.executeAttachmentQuery(t,r)}async queryFeatureCount(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryFeatureCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryFeatures(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryFeatures:not-supported","this layer has no url.");const t=await this.queryTask.execute(e,{...r,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(t?.features){const e=this.graphicOrigin;for(const r of t.features)r.sourceLayer=this,r.origin=e}return t}async queryObjectIds(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryObjectIds:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeatures(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryRelatedFeatures:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeaturesCount(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new o("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new o("queryRelatedFeaturesCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async reload(e){if("not-loaded"===this.loadStatus)return this.load(e).then(()=>{});const{layer:r,url:i}=this;if(!r&&!i)throw new o("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const s=r?await r.fetchSublayerInfo(this,e):(await t(i,{query:{f:"json"},...e})).data;s&&(this.sourceJSON={...this.sourceJSON,...s},this.read({layerDefinition:s},{origin:"service",layer:r,url:Q(i)}))}toExportImageJSON(e){const r={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},t=u(e,this.definitionExpression);null!=t&&(r.definitionExpression=t);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,r)=>(e[r]=this.originIdOf(r),e),{}),o=Object.keys(i).some(e=>i[e]>2);if(o){const e=r.drawingInfo={};if(i.renderer>2&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>2&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>2)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some(e=>!e.labelPlacement)&&n.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let r=this.labelingInfo;null!=this.geometryType&&(r=N(this.labelingInfo,j.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=r.filter(e=>e.labelPlacement).map(e=>e.toJSON({origin:"service",layer:this.layer}))}else e.showLabels=!1;i.opacity>2&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>2&&(r.orderBy=this.orderBy?.map(e=>e.toJSON())??null),r}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,r){if(e){const t=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of t)Z(e.symbol)&&r(e.symbol);"symbol"in e&&Z(e.symbol)&&r(e.symbol),"defaultSymbol"in e&&Z(e.defaultSymbol)&&r(e.defaultSymbol)}}_setAndNotifyLayer(e,r){const t=this.layer,i=this._get(e);let o,s;switch(e){case"definitionExpression":case"floorInfo":o="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":o="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":o="supportsDynamicLayers",s="supportsModification";break;case"orderBy":o="supportsSublayerOrderBy",s="supportsModification"}const a=w(this).getDefaultOrigin();if("service"!==a){if(o&&!1===this.layer?.capabilities?.exportMap?.[o])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${o}'`);if(s&&!1===this.capabilities?.exportMap[s])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${s}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,r),"service"!==a&&i!==r&&t?.emit&&t.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,r){r&&(r.forEach(e=>{e.parent=null,e.layer=null}),this.removeAllHandles()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(n.getLogger(this).error(new o("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,r){const{layer:t,declaredClass:i}=this;n.getLogger(i).error(new o("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${t?.id}'`,{reason:r,sublayer:this,layer:t}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===oe||e===ie||e===re,isTileImageLayerOverridePolicy:e=>e===te}}};e([d({type:H,json:{name:"attributeTableInfo",write:{overridePolicy:re},origins:{"web-scene":{write:!1}}}})],ne.prototype,"attributeTableTemplate",void 0),e([d({readOnly:!0})],ne.prototype,"capabilities",void 0),e([z("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ne.prototype,"readCapabilities",null),e([d()],ne.prototype,"defaultPopupTemplate",null),e([d({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:re}}})],ne.prototype,"definitionExpression",null),e([d({readOnly:!0,type:q,json:{origins:{service:{read:{source:"layerDefinition.editFieldsInfo"}}}}})],ne.prototype,"editFieldsInfo",void 0),e([d({readOnly:!0})],ne.prototype,"effectiveScaleRange",null),e([z("service","maxScaleRange",["minScale","maxScale"])],ne.prototype,"readMaxScaleRange",null),e([d({type:[T],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ne.prototype,"fields",void 0),e([d({readOnly:!0})],ne.prototype,"fieldsIndex",null),e([d({type:A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:re},origins:{"web-scene":{read:!1,write:!1}}}})],ne.prototype,"floorInfo",null),e([d({type:S,json:{read:{source:"layerDefinition.extent"}}})],ne.prototype,"fullExtent",void 0),e([d({type:j.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:j.read}}}}})],ne.prototype,"geometryType",void 0),e([d({type:String})],ne.prototype,"globalIdField",void 0),e([z("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ne.prototype,"readGlobalIdFieldFromService",null),e([d({readOnly:!0})],ne.prototype,"graphicOrigin",null),e([d({type:b,json:{write:{ignoreOrigin:!0}}})],ne.prototype,"id",null),e([d({readOnly:!0})],ne.prototype,"isTable",void 0),e([z("service","isTable",["type"])],ne.prototype,"readIsTable",null),e([d({value:null,type:[M],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:oe}}})],ne.prototype,"labelingInfo",null),e([X("labelingInfo")],ne.prototype,"writeLabelingInfo",null),e([d({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:ie}}})],ne.prototype,"labelsVisible",null),e([d({value:null})],ne.prototype,"layer",null),e([d({type:String,json:{write:{overridePolicy:te}}})],ne.prototype,"layerItemId",void 0),e([d({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:se}}})],ne.prototype,"legendEnabled",void 0),e([d({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ne.prototype,"listMode",null),e([d({type:Number,value:0,json:{write:{overridePolicy:ie}}})],ne.prototype,"minScale",null),e([z("minScale",["minScale","layerDefinition.minScale"])],ne.prototype,"readMinScale",null),e([d({type:Number,value:0,json:{write:{overridePolicy:ie}}})],ne.prototype,"maxScale",null),e([z("maxScale",["maxScale","layerDefinition.maxScale"])],ne.prototype,"readMaxScale",null),e([d()],ne.prototype,"objectIdField",void 0),e([z("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ne.prototype,"readObjectIdFieldFromService",null),e([d({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:ie}}})],ne.prototype,"opacity",null),e([z("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ne.prototype,"readOpacity",null),e([X("opacity")],ne.prototype,"writeOpacity",null),e([d({value:null,type:[B],json:{name:"layerDefinition.orderBy",read:{reader:x},write:{overridePolicy:re},origins:{"web-scene":{read:!1,write:!1}}}})],ne.prototype,"orderBy",null),e([d({json:{type:b,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:ie}}})],ne.prototype,"parent",void 0),e([X("parent")],ne.prototype,"writeParent",null),e([d({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy:se,writer(e,r,t){r[t]=!e}}}})],ne.prototype,"popupEnabled",void 0),e([d({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:se}}})],ne.prototype,"popupTemplate",void 0),e([d({readOnly:!0})],ne.prototype,"queryTask",null),e([d({type:[k],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ne.prototype,"relationships",void 0),e([d({types:V,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:oe},origins:{"web-scene":{types:C,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:oe}}}}})],ne.prototype,"renderer",null),e([d({types:{key:"type",base:null,typeMap:{"data-layer":U,"map-layer":J}},cast(e){if(e){if("mapLayerId"in e)return g(J,e);if("dataSource"in e)return g(U,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:ie}}})],ne.prototype,"source",null),e([d()],ne.prototype,"sourceJSON",void 0),e([d({type:v,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ne.prototype,"spatialReference",void 0),e([d({value:null,json:{type:[b],write:{target:"subLayerIds",allowNull:!0,overridePolicy:ie}}})],ne.prototype,"sublayers",null),e([c("sublayers")],ne.prototype,"castSublayers",null),e([X("sublayers")],ne.prototype,"writeSublayers",null),e([d({type:String,json:{name:"name",write:{overridePolicy:se}}})],ne.prototype,"title",void 0),e([z("service","title",["name","layerDefinition.name"])],ne.prototype,"readTitle",null),e([d({type:String})],ne.prototype,"typeIdField",void 0),e([d({json:{read:!1},readOnly:!0,value:"sublayer"})],ne.prototype,"type",void 0),e([z("typeIdField",["layerDefinition.typeIdField"])],ne.prototype,"readTypeIdField",null),e([d({type:[P],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ne.prototype,"types",void 0),e([d({type:[String],readOnly:!0})],ne.prototype,"uniqueIdFields",void 0),e([z("service","uniqueIdFields",["layerDefinition.uniqueIdInfo.OIDFieldContainsHashValue","layerDefinition.uniqueIdInfo.fields"])],ne.prototype,"readUniqueIdFields",null),e([d({type:String,json:{name:"layerUrl",write:{overridePolicy:te}}})],ne.prototype,"url",null),e([d({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:ie}}})],ne.prototype,"visible",null),e([X("visible")],ne.prototype,"writeVisible",null),ne=Y=e([f("esri.layers.support.Sublayer")],ne);export{ne as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../../PopupTemplate.js";import t from"../../request.js";import i from"../../core/Collection.js";import o from"../../core/Error.js";import has from"../../core/has.js";import{IdentifiableMixin as s}from"../../core/Identifiable.js";import{clone as a}from"../../core/lang.js";import{Loadable as l}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{MultiOriginJSONSupportMixin as p}from"../../core/MultiOriginJSONSupport.js";import{sqlAnd as u}from"../../core/sql.js";import{objectToQuery as y}from"../../core/urlUtils.js";import{property as d,cast as c,subclass as f}from"../../core/accessorSupport/decorators.js";import{ensureInteger as h,ensureType as m,Integer as b,ensureClass as g}from"../../core/accessorSupport/ensureType.js";import{nameToId as I}from"../../core/accessorSupport/PropertyOrigin.js";import{getProperties as w}from"../../core/accessorSupport/utils.js";import S from"../../geometry/Extent.js";import v from"../../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as j}from"../../geometry/support/typeUtils.js";import F from"../../graphic/MapImageGraphicOrigin.js";import O from"../../graphic/TileGraphicOrigin.js";import q from"../graphics/sources/support/QueryTask.js";import{readOrderByInfos as D}from"../mixins/OrderedLayer.js";import x from"./EditFieldsInfo.js";import{getFeatureType as L}from"./featureLayerUtils.js";import P from"./FeatureType.js";import T from"./Field.js";import _ from"./FieldsIndex.js";import{fixRendererFields as E}from"./fieldUtils.js";import M from"./LabelClass.js";import{validateLabelingInfo as N}from"./labelingInfo.js";import A from"./LayerFloorInfo.js";import B from"./OrderByInfo.js";import k from"./Relationship.js";import{getFeatureLayerCapabilities as R}from"./serviceCapabilitiesUtils.js";import{webSceneRendererTypes as C,rendererTypes as V}from"../../renderers/support/typeUtils.js";import{parseUrl as Q}from"../../rest/utils.js";import U from"../../rest/layerSources/DynamicDataLayer.js";import J from"../../rest/layerSources/DynamicMapLayer.js";import $ from"../../rest/support/AttachmentQuery.js";import W from"../../rest/support/Query.js";import{createPopupTemplate as G}from"../../support/popupUtils.js";import{isSymbol3D as K}from"../../symbols/support/typeUtils.js";import H from"../../tables/AttributeTableTemplate.js";import{reader as z}from"../../core/accessorSupport/decorators/reader.js";import{writer as X}from"../../core/accessorSupport/decorators/writer.js";var Y;function Z(e){return"esriSMS"===e?.type}function ee(e,r,t){const i=t.minimumWritableOrigin||t.origin;return!!i&&e.originIdOf(r)>=I(i)}function re(e,r,t){const i=ee(this,r,t);return{ignoreOrigin:!0,allowNull:i,enabled:!!t&&("map-image"===t.layer?.type&&(t.writeSublayerStructure||i))}}function te(e,r,t){return{enabled:!!t&&("tile"===t.layer?.type&&(ee(this,r,t)||this._isOverridden(r)))}}function ie(e,r,t){return{ignoreOrigin:!0,enabled:t&&t.writeSublayerStructure||!1}}function oe(e,r,t){return{ignoreOrigin:!0,enabled:!!t?.writeSublayerStructure&&this.originIdOf(r)>2}}function se(e,r,t){return{ignoreOrigin:!0,enabled:!!t&&(t.writeSublayerStructure||ee(this,r,t))}}let ae=0;const le=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ne=class extends(p(s(l))){static{Y=this}constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=void 0,this.editFieldsInfo=null,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this.uniqueIdFields=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise(this.reload(e)),this}readCapabilities(e,r){r=r.layerDefinition||r;const{attachment:t,operations:{supportsQuery:i,supportsQueryAttachments:o},query:{supportsFormatPBF:s,supportsOrderBy:a,supportsPagination:l,relativeTimeBinWindow:n},data:{supportsAttachment:p},queryRelated:u}=R(r,this.url);return{attachment:{supportsOrderByFields:t?.supportsOrderByFields??!1,supportsResize:t?.supportsResize??!1,supportsTypeWildcard:t?.supportsTypeWildcard??!1},exportMap:{supportsModification:!!r.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:o},data:{supportsAttachment:p},query:{relativeTimeBinWindow:n,supportsFormatPBF:s,supportsOrderBy:a,supportsPagination:l},queryRelated:u}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:r}=this;return{minScale:e,maxScale:r}}get effectiveUniqueIdFields(){return this.uniqueIdFields?[...this.uniqueIdFields]:this.objectIdField?[this.objectIdField]:[]}readMaxScaleRange(e,r){return{minScale:(r=r.layerDefinition||r).minScale??0,maxScale:r.maxScale??0}}get fieldsIndex(){return new _(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,r){if((r=r.layerDefinition||r).globalIdField)return r.globalIdField;if(r.fields)for(const t of r.fields)if("esriFieldTypeGlobalID"===t.type)return t.name}get graphicOrigin(){if(!this.layer)return null;switch(this.layer.type){case"tile":return new O(this.layer,this);case"map-image":return new F(this.layer,this)}}get id(){const e=this._get("id");return e??ae++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,r){return"Table"===r.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,r,t,i){e&&e.length&&(r.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach(r=>r.layer=e)}set listMode(e){this._set("listMode",e)}get loaded(){return super.loaded}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,r){return r.minScale||r.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,r){return r.maxScale||r.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,r){if((r=r.layerDefinition||r).objectIdField)return r.objectIdField;const t=r.fields?.find(e=>"esriFieldTypeOID"===e.type);return t?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,r){const{layerDefinition:t}=r;return 1-.01*(t?.transparency??t?.drawingInfo?.transparency??0)}writeOpacity(e,r,t,i){r.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,r){this.parent&&this.parent!==this.layer?r.parentLayerId=h(this.parent.id):r.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:r,layer:t,uniqueIdFields:i,url:o}=this,{spatialReference:s}=t,a="gdbVersion"in t?t.gdbVersion:void 0,l=has("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new q({fieldsIndex:r,gdbVersion:a,pbfSupported:l,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,relativeTimeBinWindow:e?.query?.relativeTimeBinWindow??0,sourceSpatialReference:s,uniqueIdFields:i,url:o})}set renderer(e){if(E(e,this.fieldsIndex),e)for(const r of e.symbols)if(K(r)){n.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new J({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}get sublayers(){return this._get("sublayers")}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return m(i.ofType(Y),e)}writeSublayers(e,r,t){this.sublayers?.length&&(r[t]=this.sublayers.map(e=>e.id).toArray().reverse())}readTitle(e,r){return r.layerDefinition?.name??r.name}readTypeIdField(e,r){let t=(r=r.layerDefinition||r).typeIdField;if(t&&r.fields){t=t.toLowerCase();const e=r.fields.find(e=>e.name.toLowerCase()===t);e&&(t=e.name)}return t}readUniqueIdFields(e,r){return r.layerDefinition?.uniqueIdInfo?.OIDFieldContainsHashValue?r.layerDefinition.uniqueIdInfo.fields:null}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,r=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===r?.type)return`${e.path}/${r.mapLayerId}`;const t={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${y(t)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,r,t,i){r[t]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=w(this),r=new Y;return w(r).store=e.clone(le),this.commitProperty("url"),r._lastParsedUrl=this._lastParsedUrl,r}createPopupTemplate(e){return G(this,e)}createQuery(){return new W({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.sublayers)return null;const e=(await import("../FeatureLayer.js")).default,{layer:r,url:t}=this;let i;if(t&&this.originIdOf("url")>2)i=new e({url:t});else{if(!r?.parsedUrl)throw new o("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const t=r.parsedUrl;i=new e({url:t.path}),t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source)}}return null!=r?.refreshInterval&&(i.refreshInterval=r.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=a(this.floorInfo)),this.originIdOf("labelingInfo")>2&&(i.labelingInfo=a(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(i.visible=this.visible),this.originIdOf("minScale")>0&&(i.minScale=this.minScale),this.originIdOf("maxScale")>0&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(i.popupTemplate=a(this.popupTemplate)),this.originIdOf("renderer")>2&&(i.renderer=a(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(i.title=this.title),"map-image"===r?.type&&r.originIdOf("customParameters")>0&&(i.customParameters=r.customParameters),"tile"===r?.type&&r.originIdOf("customParameters")>0&&(i.customParameters=r.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return L(this.types,this.typeIdField,e)}getFieldDomain(e,r){const t=r?.feature,i=this.getFeatureType(t);if(i){const r=i.domains&&i.domains[e];if(r&&"inherited"!==r.type)return r}return this._getLayerDomain(e)}async queryAttachments(e,r){await this.load();let t=$.from(e);const i=this.capabilities;if(!i?.data?.supportsAttachment)throw new o("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:s,objectIds:a,globalIds:l,num:n,size:p,start:u,where:y}=t;if(!i?.operations?.supportsQueryAttachments){if(s?.length>0||l?.length>0||p?.length>0||n||u||y)throw new o("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t)}if(!(a?.length||l?.length||y))throw new o("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);return!i?.attachment?.supportsOrderByFields&&t.orderByFields?.length&&(t=t.clone(),t.orderByFields=null),this.queryTask.executeAttachmentQuery(t,r)}async queryFeatureCount(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryFeatureCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryFeatures(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryFeatures:not-supported","this layer has no url.");const t=await this.queryTask.execute(e,{...r,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(t?.features){const e=this.graphicOrigin;for(const r of t.features)r.sourceLayer=this,r.origin=e}return t}async queryObjectIds(e=this.createQuery(),r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryObjectIds:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeatures(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new o("queryRelatedFeatures:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...r,query:{...this.layer?.customParameters,token:t}})}async queryRelatedFeaturesCount(e,r){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new o("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new o("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new o("queryRelatedFeaturesCount:not-supported","this layer has no url.");const t=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...r,query:{...this.layer?.customParameters,token:t}})}async reload(e){if("not-loaded"===this.loadStatus)return this.load(e).then(()=>{});const{layer:r,url:i}=this;if(!r&&!i)throw new o("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const s=r?await r.fetchSublayerInfo(this,e):(await t(i,{query:{f:"json"},...e})).data;s&&(this.sourceJSON={...this.sourceJSON,...s},this.read({layerDefinition:s},{origin:"service",layer:r,url:Q(i)}))}toExportImageJSON(e){const r={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},t=u(e,this.definitionExpression);null!=t&&(r.definitionExpression=t);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,r)=>(e[r]=this.originIdOf(r),e),{}),o=Object.keys(i).some(e=>i[e]>2);if(o){const e=r.drawingInfo={};if(i.renderer>2&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>2&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>2)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some(e=>!e.labelPlacement)&&n.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let r=this.labelingInfo;null!=this.geometryType&&(r=N(this.labelingInfo,j.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=r.filter(e=>e.labelPlacement).map(e=>e.toJSON({origin:"service",layer:this.layer}))}else e.showLabels=!1;i.opacity>2&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>2&&(r.orderBy=this.orderBy?.map(e=>e.toJSON())??null),r}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,r){if(e){const t=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of t)Z(e.symbol)&&r(e.symbol);"symbol"in e&&Z(e.symbol)&&r(e.symbol),"defaultSymbol"in e&&Z(e.defaultSymbol)&&r(e.defaultSymbol)}}_setAndNotifyLayer(e,r){const t=this.layer,i=this._get(e);let o,s;switch(e){case"definitionExpression":case"floorInfo":o="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":o="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":o="supportsDynamicLayers",s="supportsModification";break;case"orderBy":o="supportsSublayerOrderBy",s="supportsModification"}const a=w(this).getDefaultOrigin();if("service"!==a){if(o&&!1===this.layer?.capabilities?.exportMap?.[o])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${o}'`);if(s&&!1===this.capabilities?.exportMap[s])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${s}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,r),"service"!==a&&i!==r&&t?.emit&&t.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,r){r&&(r.forEach(e=>{e.parent=null,e.layer=null}),this.removeAllHandles()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(n.getLogger(this).error(new o("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,r){const{layer:t,declaredClass:i}=this;n.getLogger(i).error(new o("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${t?.id}'`,{reason:r,sublayer:this,layer:t}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===oe||e===ie||e===re,isTileImageLayerOverridePolicy:e=>e===te}}};e([d({type:H,json:{name:"attributeTableInfo",write:{overridePolicy:re},origins:{"web-scene":{write:!1}}}})],ne.prototype,"attributeTableTemplate",void 0),e([d({readOnly:!0})],ne.prototype,"capabilities",void 0),e([z("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ne.prototype,"readCapabilities",null),e([d()],ne.prototype,"defaultPopupTemplate",null),e([d({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:re}}})],ne.prototype,"definitionExpression",null),e([d({readOnly:!0,type:x,json:{origins:{service:{read:{source:"layerDefinition.editFieldsInfo"}}}}})],ne.prototype,"editFieldsInfo",void 0),e([d({readOnly:!0})],ne.prototype,"effectiveScaleRange",null),e([d({readOnly:!0,type:[String]})],ne.prototype,"effectiveUniqueIdFields",null),e([z("service","maxScaleRange",["minScale","maxScale"])],ne.prototype,"readMaxScaleRange",null),e([d({type:[T],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ne.prototype,"fields",void 0),e([d({readOnly:!0})],ne.prototype,"fieldsIndex",null),e([d({type:A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:re},origins:{"web-scene":{read:!1,write:!1}}}})],ne.prototype,"floorInfo",null),e([d({type:S,json:{read:{source:"layerDefinition.extent"}}})],ne.prototype,"fullExtent",void 0),e([d({type:j.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:j.read}}}}})],ne.prototype,"geometryType",void 0),e([d({type:String})],ne.prototype,"globalIdField",void 0),e([z("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ne.prototype,"readGlobalIdFieldFromService",null),e([d({readOnly:!0})],ne.prototype,"graphicOrigin",null),e([d({type:b,json:{write:{ignoreOrigin:!0}}})],ne.prototype,"id",null),e([d({readOnly:!0})],ne.prototype,"isTable",void 0),e([z("service","isTable",["type"])],ne.prototype,"readIsTable",null),e([d({value:null,type:[M],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:oe}}})],ne.prototype,"labelingInfo",null),e([X("labelingInfo")],ne.prototype,"writeLabelingInfo",null),e([d({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:ie}}})],ne.prototype,"labelsVisible",null),e([d({value:null})],ne.prototype,"layer",null),e([d({type:String,json:{write:{overridePolicy:te}}})],ne.prototype,"layerItemId",void 0),e([d({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:se}}})],ne.prototype,"legendEnabled",void 0),e([d({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ne.prototype,"listMode",null),e([d({type:Number,value:0,json:{write:{overridePolicy:ie}}})],ne.prototype,"minScale",null),e([z("minScale",["minScale","layerDefinition.minScale"])],ne.prototype,"readMinScale",null),e([d({type:Number,value:0,json:{write:{overridePolicy:ie}}})],ne.prototype,"maxScale",null),e([z("maxScale",["maxScale","layerDefinition.maxScale"])],ne.prototype,"readMaxScale",null),e([d()],ne.prototype,"objectIdField",void 0),e([z("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ne.prototype,"readObjectIdFieldFromService",null),e([d({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:ie}}})],ne.prototype,"opacity",null),e([z("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ne.prototype,"readOpacity",null),e([X("opacity")],ne.prototype,"writeOpacity",null),e([d({value:null,type:[B],json:{name:"layerDefinition.orderBy",read:{reader:D},write:{overridePolicy:re},origins:{"web-scene":{read:!1,write:!1}}}})],ne.prototype,"orderBy",null),e([d({json:{type:b,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:ie}}})],ne.prototype,"parent",void 0),e([X("parent")],ne.prototype,"writeParent",null),e([d({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy:se,writer(e,r,t){r[t]=!e}}}})],ne.prototype,"popupEnabled",void 0),e([d({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:se}}})],ne.prototype,"popupTemplate",void 0),e([d({readOnly:!0})],ne.prototype,"queryTask",null),e([d({type:[k],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ne.prototype,"relationships",void 0),e([d({types:V,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:oe},origins:{"web-scene":{types:C,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:oe}}}}})],ne.prototype,"renderer",null),e([d({types:{key:"type",base:null,typeMap:{"data-layer":U,"map-layer":J}},cast(e){if(e){if("mapLayerId"in e)return g(J,e);if("dataSource"in e)return g(U,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:ie}}})],ne.prototype,"source",null),e([d()],ne.prototype,"sourceJSON",void 0),e([d({type:v,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ne.prototype,"spatialReference",void 0),e([d({value:null,json:{type:[b],write:{target:"subLayerIds",allowNull:!0,overridePolicy:ie}}})],ne.prototype,"sublayers",null),e([c("sublayers")],ne.prototype,"castSublayers",null),e([X("sublayers")],ne.prototype,"writeSublayers",null),e([d({type:String,json:{name:"name",write:{overridePolicy:se}}})],ne.prototype,"title",void 0),e([z("service","title",["name","layerDefinition.name"])],ne.prototype,"readTitle",null),e([d({type:String})],ne.prototype,"typeIdField",void 0),e([d({json:{read:!1},readOnly:!0,value:"sublayer"})],ne.prototype,"type",void 0),e([z("typeIdField",["layerDefinition.typeIdField"])],ne.prototype,"readTypeIdField",null),e([d({type:[P],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ne.prototype,"types",void 0),e([d({type:[String],readOnly:!0})],ne.prototype,"uniqueIdFields",void 0),e([z("service","uniqueIdFields",["layerDefinition.uniqueIdInfo.OIDFieldContainsHashValue","layerDefinition.uniqueIdInfo.fields"])],ne.prototype,"readUniqueIdFields",null),e([d({type:String,json:{name:"layerUrl",write:{overridePolicy:te}}})],ne.prototype,"url",null),e([d({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:ie}}})],ne.prototype,"visible",null),e([X("visible")],ne.prototype,"writeVisible",null),ne=Y=e([f("esri.layers.support.Sublayer")],ne);export{ne as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{serializeInclusionDefinitionToEntitiesPbf as e,serializeInclusionDefinitionToRelationshipsPbf as r}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import{Clonable as i}from"../core/Clonable.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{join as s}from"../core/urlUtils.js";import{generateUUID as n}from"../core/uuid.js";import{property as l,subclass as a}from"../core/accessorSupport/decorators.js";import{nameToId as p}from"../core/accessorSupport/PropertyOrigin.js";import{getRelationshipEndNodeMap as u}from"../layers/knowledgeGraph/supportUtils.js";import{layoutTypes as c}from"./enums.js";import d from"./LayoutSettings.js";import m from"./NonspatialDataDisplay.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import{serializeInclusionDefinitionToEntitiesPbf as e,serializeInclusionDefinitionToRelationshipsPbf as r}from"../applications/KnowledgeStudio/resourceSerializationUtils.js";import{Clonable as i}from"../core/Clonable.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{join as s}from"../core/urlUtils.js";import{generateUUID as n}from"../core/uuid.js";import{property as l,subclass as a}from"../core/accessorSupport/decorators.js";import{nameToId as p}from"../core/accessorSupport/PropertyOrigin.js";import{getRelationshipEndNodeMap as u}from"../layers/knowledgeGraph/supportUtils.js";import{layoutTypes as c}from"./enums.js";import d from"./LayoutSettings.js";import m from"./NonspatialDataDisplay.js";import{areResourcesSafe as h}from"./utils.js";import{a as y,c as U}from"../chunks/persistableUrlUtils.js";import{reader as g}from"../core/accessorSupport/decorators/reader.js";import{writer as w}from"../core/accessorSupport/decorators/writer.js";let f=class extends(o(i)){constructor(t){super(t),this.aggregatedEntitiesUrl=null,this.aggregatedRelationshipsUrl=null,this.autoCollapseRelationships=!0,this.centralityIsUpToDate=!0,this.entitiesUrl=null,this.layoutSettings=null,this.layoutType="organic-standard",this.nonspatialDataDisplay=null,this.relationshipsUrl=null}readEntitiesUrl(t,e,r){return y(t,r)}writeEntitiesUrl(t,e,r,i){e[r]="<pending>",i?.resources?.pendingOperations.push(new Promise(o=>{this._writeResourceUrl(t,e,r,i,o)}))}readRelationshipsUrl(t,e,r){return y(t,r)}writeRelationshipsUrl(t,e,r,i){e[r]="<pending>",i?.resources?.pendingOperations.push(new Promise(o=>{this._writeResourceUrl(t,e,r,i,o)}))}async _writeResourceUrl(t,e,r,i,o){const s=i?.portalItem,n=i?.resources,l=p(i?.origin),a=i?.webmap?.activeLinkChartLayer,u=await h(t??"",s?.itemUrl??"");if(!s||!n||null==l||!a||!a.membershipModified&&s.id&&u)return t&&(e[r]=U(t,i)),void o();this._saveUrlAsNewResource(e,r,n,s,a,o)}_saveUrlAsNewResource(t,e,r,i,o,s){const n=(o.knowledgeGraph.dataModel.relationshipTypes??[]).map(t=>t.name).reduce((t,e)=>{if(!e)return t;const{members:r}=o.dataManager.inclusionModeDefinition.namedTypeDefinitions.get(e)||{members:void 0};if(!r)return t;for(const[i]of r)t.push({id:i,typeName:e});return t},[]);u(n,o.knowledgeGraph).then(n=>{S(o.dataManager.inclusionModeDefinition,e,o.knowledgeGraph,n).then(o=>{const n=v(i,"entitiesUrl"===e?"entitiesUrl":"relationshipsUrl");t[e]=n.itemRelativeUrl,r.toAdd.push({resource:n,content:{type:"blob",blob:o},compress:!1,finish:t=>{"entitiesUrl"===e?this.entitiesUrl=t.url:this.relationshipsUrl=t.url}}),s()})})}};t([l({type:String,json:{write:!0}})],f.prototype,"aggregatedEntitiesUrl",void 0),t([l({type:String,json:{write:!0}})],f.prototype,"aggregatedRelationshipsUrl",void 0),t([l({type:Boolean,json:{write:!0}})],f.prototype,"autoCollapseRelationships",void 0),t([l({type:Boolean,json:{write:!0}})],f.prototype,"centralityIsUpToDate",void 0),t([l({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],f.prototype,"entitiesUrl",void 0),t([g("entitiesUrl")],f.prototype,"readEntitiesUrl",null),t([w("entitiesUrl")],f.prototype,"writeEntitiesUrl",null),t([l({type:d,json:{write:!0}})],f.prototype,"layoutSettings",void 0),t([l({type:c,json:{write:!0}})],f.prototype,"layoutType",void 0),t([l({type:m,json:{write:!0}})],f.prototype,"nonspatialDataDisplay",void 0),t([l({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],f.prototype,"relationshipsUrl",void 0),t([g("relationshipsUrl")],f.prototype,"readRelationshipsUrl",null),t([w("relationshipsUrl")],f.prototype,"writeRelationshipsUrl",null),f=t([a("esri.linkChart.LinkChartProperties")],f);const j=f;function v(t,e){const r=`${e}-${n()}.dat`,i=s("linkChart",r);return t.resourceFromPath(i)}async function S(t,i,o,s){let n;return n="entitiesUrl"===i?await e(t,o,s):await r(t,o,s),new Blob([n],{type:"application/x-protobuf"})}export{j as default};
|
package/linkChart/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
function e(
|
|
2
|
+
import t from"../request.js";function e(t){return null!=t&&"object"==typeof t&&"2d"===t.type&&"linkchart"===t.view2dType}async function r(e,r){if(!e||!r||!e.includes("/resources"))return!1;const n=r+"/resources",o=e.split("/"),s=o[o.length-1];if(!s)return!1;const u=100;let a=1,f=0;for(;-1!==a;){const e=(await t(n,{query:{f:"json",start:a,num:u}})).data,r=e?.resources??[];for(const t of r)if(t.resource.includes(s))return!0;if(f+=r.length,-1===e.nextStart)break;if("number"==typeof e.nextStart&&e.nextStart>0&&e.nextStart!==a)a=e.nextStart;else{if("number"==typeof e.total&&f>=e.total)break;if(!r.length)break;a+=r.length}}return!1}export{r as areResourcesSafe,e as isLinkChartView};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.103",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@amcharts/amcharts5": "~5.17.2",
|
|
22
|
-
"@arcgis/toolkit": "^5.1.0-next.
|
|
22
|
+
"@arcgis/toolkit": "^5.1.0-next.105",
|
|
23
23
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
24
24
|
"@esri/calcite-components": "^5.1.0-next.47",
|
|
25
25
|
"@vaadin/grid": "~25.1.3",
|
package/portal/PortalItem.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import{JSONSupportMixin as r}from"../core/JSONSupport.js";import{clone as o,fixJson as s}from"../core/lang.js";import{Loadable as a}from"../core/Loadable.js";import{isDataProtocol as n,makeAbsolute as l}from"../core/urlUtils.js";import{property as p,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import u from"../geometry/Extent.js";import m from"./Portal.js";import h from"./PortalItemResource.js";import g from"./PortalRating.js";import{a as y}from"../chunks/persistableUrlUtils.js";import{reader as w}from"../core/accessorSupport/decorators/reader.js";var v;const f=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Knowledge Graph Layer","Map Service","Media Layer","Scene Service","Stream Service","Video Service","Vector Tile Service","WCS","WFS","WMS","WMTS"]),b=new Set(["KML","GeoJson","CSV"]);let k=v=class extends(r(a)){static from(e){return d(v,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.classification=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Geocoding Service"===e?i="Locator":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e?.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"Raster function template"===e?i="Raster Function Template":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e?i="Insights Report":"Excalibur Imagery Project"===e?i="Excalibur Project":"3DTiles Service"===e?i="3D tiles layer":"3DTiles Package"===e&&(i="3D tiles package"),i}readExtent(e){return e&&e.length?new u(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let s,a=!1,n=!1,l=!1,p=!1,c=!1,d=!1,u=!1,m=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=i.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.includes("Table"),l=i.includes("Route Layer"),p=i.includes("Markup"),c=i.includes("Spatiotemporal"),d=i.includes("UtilityNetwork"),s=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":d?"utilitynetwork":a?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(c=i.includes("Spatiotemporal"),u=i.includes("Relational"),s=c||u?"mapimages":a||i.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):s="scene service"===e?i.includes("Line")?"sceneweblayerline":i.includes("3DObject")?"sceneweblayermultipatch":i.includes("Point")?"sceneweblayerpoint":i.includes("IntegratedMesh")?"sceneweblayermesh":i.includes("PointCloud")?"sceneweblayerpointcloud":i.includes("Polygon")?"sceneweblayerpolygon":i.includes("Building")?"sceneweblayerbuilding":i.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.includes("Elevation 3D Layer")?"elevationlayer":i.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?i.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?i.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?i.includes("3DObject")?"3dobjecttileslayer":i.includes("IntegratedMesh")?"integratedmeshtileslayer":i.includes("GaussianSplat")?"gaussiansplatlayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?s="maps":"web scene"===e?s=i.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.includes("configurableApp")?s="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?s="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.includes("ArcGIS Pro")||"explorer map"===e&&i.indexOf("Explorer Document")?s="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?s="datafiles":"360 vr experience"===e?s="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?s="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?s="addindesktop":"pdf"===e?s="pdf":"microsoft word"===e?s="word":"microsoft excel"===e?s="excel":"microsoft powerpoint"===e?s="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&i.includes("Explorer Mapping Application")||i.includes("Document")?s="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?s="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?s="layersgray":"analysis model"===e?s="analysismodel":"scene package"===e?s="scenepackage":"3dtiles package"===e?s="3dtileslayerpackage":"3dtiles service"===e?s="3dtileslayer":"mobile scene package"===e?s="mobilescenepackage":"tile package"===e||"compact tile package"===e?s="tilepackage":"task file"===e?s="taskfile":"report template"===e?s="report-template":"statistical data collection"===e?s="statisticaldatacollection":"insights workbook"===e?s="workbook":"insights model"===e?s="insightsmodel":"insights page"===e?s="insightspage":"insights theme"===e?s="insightstheme":"hub initiative"===e?s="hubinitiative":"hub page"===e?s="hubpage":"hub site application"===e?s="hubsite":"hub event"===e?s="hubevent":"hub project"===e?s="hubproject":"relational database connection"===e?s="relationaldatabaseconnection":"big data file share"===e?s="datastorecollection":"image collection"===e?s="imagecollection":"desktop style"===e?s="desktopstyle":"style"===e?s=i.includes("Dictionary")?"dictionarystyle":"style":"dashboard"===e?s="dashboard":"raster function template"===e?s="rasterprocessingtemplate":"vector tile package"===e?s="vectortilepackage":"ortho mapping project"===e?s="orthomappingproject":"ortho mapping template"===e?s="orthomappingtemplate":"solution"===e?s="solutions":"geopackage"===e?s="geopackage":"deep learning package"===e?s="deeplearningpackage":"real time analytic"===e?s="realtimeanalytics":"reality mapping project"===e?s="realitymappingproject":"big data analytic"===e?s="bigdataanalytics":"feed"===e?s="feed":"excalibur imagery project"===e?s="excaliburimageryproject":"notebook"===e?s="notebook":"storymap"===e?s="storymap":"survey123 add in"===e?s="survey123addin":"mission"===e?s="mission":"mission report"===e?s="missionreport":"mission template"===e?s="missiontemplate":"quickcapture project"===e?s="quickcaptureproject":"pro report"===e?s="proreport":"pro report template"===e?s="proreporttemplate":"urban model"===e?s="urbanmodel":"urban project"===e?s="urbanproject":"web experience"===e?s="experiencebuilder":"web experience template"===e?s="webexperiencetemplate":"experience builder widget"===e?s="experiencebuilderwidget":"experience builder widget package"===e?s="experiencebuilderwidgetpackage":"workflow"===e?s="workflow":"kernel gateway connection"===e?s="kernelgatewayconnection":"insights script"===e?s="insightsscript":"hub initiative template"===e?s="hubinitiativetemplate":"storymap theme"===e?s="storymaptheme":"knowledge graph"===e?s="knowledgegraph":"knowledge graph layer"===e?s="knowledgegraphlayer":"knowledge studio project"===e?s="knowledgestudio":"native application"===e?s="nativeapp":"native application installer"===e?s="nativeappinstaller":"web link chart"===e?s="linkchart":"knowledge graph web investigation"===e?s="investigation":"ogcfeatureserver"===e?s="features":"pro presentation"===e?s="propresentation":"pro project"===e?s="proproject":"insights workbook package"===e?s="insightsworkbookpackage":"apache parquet"===e?s="apacheparquet":"notebook code snippet library"===e?s="notebookcodesnippets":"suitability model"===e?s="suitabilitymodel":"esri classifier definition"===e?s="classifierdefinition":"esri classification schema"===e?s="classificationschema":"insights data engineering workbook"===e?s="dataengineeringworkbook":"insights data engineering model"===e?s="dataengineeringmodel":"deep learning studio project"===e?s="deeplearningproject":"discussion"===e?s="discussion":"allsource project"===e?s="allsourceproject":"api key"===e?s="apikey":"data pipeline"===e?s="datapipelines":"group layer"===e?(m=i.includes("Map"),s=m?"layergroup2d":"layergroup"):s="media layer"===e?"onlinemedialayer":"form"===e?i.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"xr experience"===e?"xrexperience":"maps",s?t(r+s+o+".png"):null}get isLayer(){return null!=this.type&&f.has(this.type)}get itemCdnUrl(){return y(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get loaded(){return super.loaded}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.id;if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){const t=this.portal??(this.portal=m.getDefault()),i=t.load(e).then(()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{}).then(e=>{this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}},i=e instanceof g?e.rating:e;return null==i||isNaN(i)||"number"!=typeof e||(t.query.rating=i),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new g({rating:i,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),classification:o(this.classification),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new v({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");for(const t of["extent","classification"]){const i=e[t];i&&(e[t]=JSON.stringify(i))}return e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new g(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},v)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then(e=>(this.applicationProxies&&!Object.hasOwn(e,"appProxies")&&(this.applicationProxies=null),this.sourceJSON=e,this.read(e),this))}update(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e?.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then(()=>this.reload())}):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new i("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:o,folder:s,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===o,folder:"string"==typeof s?s:s?.id,includeResources:!!o,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${r}/copy`,l);return new v({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)n(t)?r.query={data:t}:r.query={url:l(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then(()=>this.reload())}):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:i}=await import("./support/resourceUtils.js");return i(this,e,t)}async addResource(e,t,i){const{addOrUpdateResources:r}=await import("./support/resourceUtils.js");return e.portalItem=this,await r(this,[{resource:e,content:t,compress:i?.compress,access:i?.access}],"add",i),e}async removeResource(e,t){const{removeResource:r}=await import("./support/resourceUtils.js");if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await import("./support/resourceUtils.js");return t(this,e)}resourceFromPath(e){return new h({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:o(this.categories),classification:o(this.classification),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return s(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new v({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([p({type:["private","shared","org","public"]})],k.prototype,"access",void 0),e([p()],k.prototype,"accessInformation",void 0),e([p({type:String})],k.prototype,"apiKey",void 0),e([p({json:{read:{source:"appProxies"}}})],k.prototype,"applicationProxies",void 0),e([p()],k.prototype,"avgRating",void 0),e([p()],k.prototype,"categories",void 0),e([p()],k.prototype,"classification",void 0),e([p({type:Date})],k.prototype,"created",void 0),e([p()],k.prototype,"culture",void 0),e([p()],k.prototype,"description",void 0),e([p({readOnly:!0})],k.prototype,"displayName",null),e([p({type:u})],k.prototype,"extent",void 0),e([w("extent")],k.prototype,"readExtent",null),e([p()],k.prototype,"groupCategories",void 0),e([p({readOnly:!0})],k.prototype,"iconUrl",null),e([p()],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"isLayer",null),e([p({type:Boolean,readOnly:!0})],k.prototype,"isOrgItem",void 0),e([p()],k.prototype,"itemControl",void 0),e([p({readOnly:!0})],k.prototype,"itemPageUrl",null),e([p({readOnly:!0})],k.prototype,"itemUrl",null),e([p()],k.prototype,"licenseInfo",void 0),e([p({type:Date})],k.prototype,"modified",void 0),e([p()],k.prototype,"name",void 0),e([p()],k.prototype,"numComments",void 0),e([p()],k.prototype,"numRatings",void 0),e([p()],k.prototype,"numViews",void 0),e([p()],k.prototype,"owner",void 0),e([p()],k.prototype,"ownerFolder",void 0),e([p({type:m})],k.prototype,"portal",void 0),e([p()],k.prototype,"screenshots",void 0),e([p()],k.prototype,"size",void 0),e([p()],k.prototype,"snippet",void 0),e([p()],k.prototype,"sourceJSON",void 0),e([p({type:String})],k.prototype,"sourceUrl",void 0),e([p({type:String})],k.prototype,"spatialReference",void 0),e([p()],k.prototype,"tags",void 0),e([p()],k.prototype,"thumbnail",void 0),e([p({readOnly:!0})],k.prototype,"thumbnailUrl",null),e([p()],k.prototype,"title",void 0),e([p()],k.prototype,"type",void 0),e([p()],k.prototype,"typeKeywords",void 0),e([p({type:String,json:{read(e,t){if(b.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],k.prototype,"url",void 0),e([p({readOnly:!0})],k.prototype,"userItemUrl",null),k=v=e([c("esri.portal.PortalItem")],k);export{k as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import{JSONSupportMixin as r}from"../core/JSONSupport.js";import{clone as o,fixJson as s}from"../core/lang.js";import{Loadable as a}from"../core/Loadable.js";import{isDataProtocol as n,makeAbsolute as l}from"../core/urlUtils.js";import{property as p,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import u from"../geometry/Extent.js";import m from"./Portal.js";import h from"./PortalItemResource.js";import g from"./PortalRating.js";import{t as y}from"../chunks/persistableUrlUtils.js";import{reader as w}from"../core/accessorSupport/decorators/reader.js";var v;const f=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Knowledge Graph Layer","Map Service","Media Layer","Scene Service","Stream Service","Video Service","Vector Tile Service","WCS","WFS","WMS","WMTS"]),b=new Set(["KML","GeoJson","CSV"]);let k=v=class extends(r(a)){static from(e){return d(v,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.classification=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Geocoding Service"===e?i="Locator":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e?.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"Raster function template"===e?i="Raster Function Template":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e?i="Insights Report":"Excalibur Imagery Project"===e?i="Excalibur Project":"3DTiles Service"===e?i="3D tiles layer":"3DTiles Package"===e&&(i="3D tiles package"),i}readExtent(e){return e&&e.length?new u(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let s,a=!1,n=!1,l=!1,p=!1,c=!1,d=!1,u=!1,m=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=i.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.includes("Table"),l=i.includes("Route Layer"),p=i.includes("Markup"),c=i.includes("Spatiotemporal"),d=i.includes("UtilityNetwork"),s=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":d?"utilitynetwork":a?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(c=i.includes("Spatiotemporal"),u=i.includes("Relational"),s=c||u?"mapimages":a||i.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):s="scene service"===e?i.includes("Line")?"sceneweblayerline":i.includes("3DObject")?"sceneweblayermultipatch":i.includes("Point")?"sceneweblayerpoint":i.includes("IntegratedMesh")?"sceneweblayermesh":i.includes("PointCloud")?"sceneweblayerpointcloud":i.includes("Polygon")?"sceneweblayerpolygon":i.includes("Building")?"sceneweblayerbuilding":i.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.includes("Elevation 3D Layer")?"elevationlayer":i.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?i.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?i.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?i.includes("3DObject")?"3dobjecttileslayer":i.includes("IntegratedMesh")?"integratedmeshtileslayer":i.includes("GaussianSplat")?"gaussiansplatlayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?s="maps":"web scene"===e?s=i.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.includes("configurableApp")?s="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?s="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.includes("ArcGIS Pro")||"explorer map"===e&&i.indexOf("Explorer Document")?s="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?s="datafiles":"360 vr experience"===e?s="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?s="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?s="addindesktop":"pdf"===e?s="pdf":"microsoft word"===e?s="word":"microsoft excel"===e?s="excel":"microsoft powerpoint"===e?s="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&i.includes("Explorer Mapping Application")||i.includes("Document")?s="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?s="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?s="layersgray":"analysis model"===e?s="analysismodel":"scene package"===e?s="scenepackage":"3dtiles package"===e?s="3dtileslayerpackage":"3dtiles service"===e?s="3dtileslayer":"mobile scene package"===e?s="mobilescenepackage":"tile package"===e||"compact tile package"===e?s="tilepackage":"task file"===e?s="taskfile":"report template"===e?s="report-template":"statistical data collection"===e?s="statisticaldatacollection":"insights workbook"===e?s="workbook":"insights model"===e?s="insightsmodel":"insights page"===e?s="insightspage":"insights theme"===e?s="insightstheme":"hub initiative"===e?s="hubinitiative":"hub page"===e?s="hubpage":"hub site application"===e?s="hubsite":"hub event"===e?s="hubevent":"hub project"===e?s="hubproject":"relational database connection"===e?s="relationaldatabaseconnection":"big data file share"===e?s="datastorecollection":"image collection"===e?s="imagecollection":"desktop style"===e?s="desktopstyle":"style"===e?s=i.includes("Dictionary")?"dictionarystyle":"style":"dashboard"===e?s="dashboard":"raster function template"===e?s="rasterprocessingtemplate":"vector tile package"===e?s="vectortilepackage":"ortho mapping project"===e?s="orthomappingproject":"ortho mapping template"===e?s="orthomappingtemplate":"solution"===e?s="solutions":"geopackage"===e?s="geopackage":"deep learning package"===e?s="deeplearningpackage":"real time analytic"===e?s="realtimeanalytics":"reality mapping project"===e?s="realitymappingproject":"big data analytic"===e?s="bigdataanalytics":"feed"===e?s="feed":"excalibur imagery project"===e?s="excaliburimageryproject":"notebook"===e?s="notebook":"storymap"===e?s="storymap":"survey123 add in"===e?s="survey123addin":"mission"===e?s="mission":"mission report"===e?s="missionreport":"mission template"===e?s="missiontemplate":"quickcapture project"===e?s="quickcaptureproject":"pro report"===e?s="proreport":"pro report template"===e?s="proreporttemplate":"urban model"===e?s="urbanmodel":"urban project"===e?s="urbanproject":"web experience"===e?s="experiencebuilder":"web experience template"===e?s="webexperiencetemplate":"experience builder widget"===e?s="experiencebuilderwidget":"experience builder widget package"===e?s="experiencebuilderwidgetpackage":"workflow"===e?s="workflow":"kernel gateway connection"===e?s="kernelgatewayconnection":"insights script"===e?s="insightsscript":"hub initiative template"===e?s="hubinitiativetemplate":"storymap theme"===e?s="storymaptheme":"knowledge graph"===e?s="knowledgegraph":"knowledge graph layer"===e?s="knowledgegraphlayer":"knowledge studio project"===e?s="knowledgestudio":"native application"===e?s="nativeapp":"native application installer"===e?s="nativeappinstaller":"web link chart"===e?s="linkchart":"knowledge graph web investigation"===e?s="investigation":"ogcfeatureserver"===e?s="features":"pro presentation"===e?s="propresentation":"pro project"===e?s="proproject":"insights workbook package"===e?s="insightsworkbookpackage":"apache parquet"===e?s="apacheparquet":"notebook code snippet library"===e?s="notebookcodesnippets":"suitability model"===e?s="suitabilitymodel":"esri classifier definition"===e?s="classifierdefinition":"esri classification schema"===e?s="classificationschema":"insights data engineering workbook"===e?s="dataengineeringworkbook":"insights data engineering model"===e?s="dataengineeringmodel":"deep learning studio project"===e?s="deeplearningproject":"discussion"===e?s="discussion":"allsource project"===e?s="allsourceproject":"api key"===e?s="apikey":"data pipeline"===e?s="datapipelines":"group layer"===e?(m=i.includes("Map"),s=m?"layergroup2d":"layergroup"):s="media layer"===e?"onlinemedialayer":"form"===e?i.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"xr experience"===e?"xrexperience":"maps",s?t(r+s+o+".png"):null}get isLayer(){return null!=this.type&&f.has(this.type)}get itemCdnUrl(){return y(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get loaded(){return super.loaded}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.id;if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){const t=this.portal??(this.portal=m.getDefault()),i=t.load(e).then(()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{}).then(e=>{this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}},i=e instanceof g?e.rating:e;return null==i||isNaN(i)||"number"!=typeof e||(t.query.rating=i),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new g({rating:i,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),classification:o(this.classification),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new v({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");for(const t of["extent","classification"]){const i=e[t];i&&(e[t]=JSON.stringify(i))}return e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new g(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},v)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then(e=>(this.applicationProxies&&!Object.hasOwn(e,"appProxies")&&(this.applicationProxies=null),this.sourceJSON=e,this.read(e),this))}update(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e?.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then(()=>this.reload())}):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new i("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:o,folder:s,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===o,folder:"string"==typeof s?s:s?.id,includeResources:!!o,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${r}/copy`,l);return new v({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)n(t)?r.query={data:t}:r.query={url:l(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then(()=>this.reload())}):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:i}=await import("./support/resourceUtils.js");return i(this,e,t)}async addResource(e,t,i){const{addOrUpdateResources:r}=await import("./support/resourceUtils.js");return e.portalItem=this,await r(this,[{resource:e,content:t,compress:i?.compress,access:i?.access}],"add",i),e}async removeResource(e,t){const{removeResource:r}=await import("./support/resourceUtils.js");if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await import("./support/resourceUtils.js");return t(this,e)}resourceFromPath(e){return new h({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:o(this.categories),classification:o(this.classification),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return s(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new v({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([p({type:["private","shared","org","public"]})],k.prototype,"access",void 0),e([p()],k.prototype,"accessInformation",void 0),e([p({type:String})],k.prototype,"apiKey",void 0),e([p({json:{read:{source:"appProxies"}}})],k.prototype,"applicationProxies",void 0),e([p()],k.prototype,"avgRating",void 0),e([p()],k.prototype,"categories",void 0),e([p()],k.prototype,"classification",void 0),e([p({type:Date})],k.prototype,"created",void 0),e([p()],k.prototype,"culture",void 0),e([p()],k.prototype,"description",void 0),e([p({readOnly:!0})],k.prototype,"displayName",null),e([p({type:u})],k.prototype,"extent",void 0),e([w("extent")],k.prototype,"readExtent",null),e([p()],k.prototype,"groupCategories",void 0),e([p({readOnly:!0})],k.prototype,"iconUrl",null),e([p()],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"isLayer",null),e([p({type:Boolean,readOnly:!0})],k.prototype,"isOrgItem",void 0),e([p()],k.prototype,"itemControl",void 0),e([p({readOnly:!0})],k.prototype,"itemPageUrl",null),e([p({readOnly:!0})],k.prototype,"itemUrl",null),e([p()],k.prototype,"licenseInfo",void 0),e([p({type:Date})],k.prototype,"modified",void 0),e([p()],k.prototype,"name",void 0),e([p()],k.prototype,"numComments",void 0),e([p()],k.prototype,"numRatings",void 0),e([p()],k.prototype,"numViews",void 0),e([p()],k.prototype,"owner",void 0),e([p()],k.prototype,"ownerFolder",void 0),e([p({type:m})],k.prototype,"portal",void 0),e([p()],k.prototype,"screenshots",void 0),e([p()],k.prototype,"size",void 0),e([p()],k.prototype,"snippet",void 0),e([p()],k.prototype,"sourceJSON",void 0),e([p({type:String})],k.prototype,"sourceUrl",void 0),e([p({type:String})],k.prototype,"spatialReference",void 0),e([p()],k.prototype,"tags",void 0),e([p()],k.prototype,"thumbnail",void 0),e([p({readOnly:!0})],k.prototype,"thumbnailUrl",null),e([p()],k.prototype,"title",void 0),e([p()],k.prototype,"type",void 0),e([p()],k.prototype,"typeKeywords",void 0),e([p({type:String,json:{read(e,t){if(b.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],k.prototype,"url",void 0),e([p({readOnly:!0})],k.prototype,"userItemUrl",null),k=v=e([c("esri.portal.PortalItem")],k);export{k as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{clone as t}from"../core/lang.js";import s from"../core/Logger.js";import{deepMerge as i}from"../core/object.js";import{watch as l}from"../core/reactiveUtils.js";import{property as o,cast as r,subclass as u}from"../core/accessorSupport/decorators.js";import{diff as n}from"../core/accessorSupport/diffUtils.js";import{ensureString as a,ensureType as p}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as f,collectField as d}from"../layers/support/fieldUtils.js";import c from"../portal/Portal.js";import h from"./Renderer.js";import{VisualVariablesMixin as m}from"./mixins/VisualVariablesMixin.js";import{rendererBackgroundFillSymbolProperty as y,rendererSymbolProperty as b}from"./support/commonProperties.js";import v from"./support/RendererLegendOptions.js";import{getScaleDependentSymbol as _}from"./support/scaleDependentSymbolUtils.js";import g from"./support/UniqueValue.js";import V from"./support/UniqueValueClass.js";import q from"./support/UniqueValueGroup.js";import I from"./support/UniqueValueInfo.js";import{loadArcade as S}from"../support/loadArcade.js";import{f as w,t as U}from"../chunks/persistableUrlUtils.js";import j from"../symbols/WebStyleSymbol.js";import{fetchStyle as F}from"../symbols/support/styleUtils.js";import{ensureType as O}from"../symbols/support/typeUtils.js";import{addPropertyUnsupportedError as G}from"../webdoc/support/unsupportedErrors.js";import{enumeration as D}from"../core/accessorSupport/decorators/enumeration.js";import{writer as x}from"../core/accessorSupport/decorators/writer.js";import{reader as E}from"../core/accessorSupport/decorators/reader.js";var M;const R="uvInfos-watcher",L="uvGroups-watcher",N=",",P=p(I);function C(e){const{field1:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueInfos:o,valueExpression:r}=e,u=!(!t||!s);return[{classes:(o??[]).map(e=>{const{alternateSymbols:o,symbol:n,label:a,value:p,description:f}=e,[d,c,h]=u?p?.toString()?.split(l||"")||[]:[p],m=[];return(t||r)&&m.push(d),s&&m.push(c),i&&m.push(h),{alternateSymbols:o,symbol:n,label:a,values:[m],description:f}})}]}function z(e){return null!=e&&""!==e&&("string"!=typeof e||""!==e.trim()&&"<null>"!==e.toLowerCase())||(e=null),e+""}let A=M=class extends(m(h)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let s=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let l=0;l<t.length;l++){const o=e.find(e=>e.value===t[l].value);o?n(o,t[l])?(i.changed.push({type:"complete",oldValue:o,newValue:t[l]}),s=!0):i.unchanged.push({oldValue:o,newValue:t[l]}):(i.added.push(t[l]),s=!0)}for(let l=0;l<e.length;l++){t.find(t=>t.value===e[l].value)||(i.removed.push(e[l]),s=!0)}return s?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:a(e)}writeField(e,t,i,l){"string"==typeof e?t[i]=e:l?.messages?G(l,"UniqueValueRenderer.field","set to a function cannot be written to JSON"):s.getLogger(this).error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,s){return s.portal||c.getDefault()}readStyleOrigin(e,t,s){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=w(t.styleUrl,s);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,s,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=U(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void s.getLogger(this).error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let i;i="object"==typeof e?P(e):new I({value:e,symbol:O(t)}),this.uniqueValueInfos?.push(i),this._valueInfoMap[z(i.value)]=i,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void s.getLogger(this).error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let s=0;s<t.length;s++){const i=t[s];if(String(i.value)===String(e)){delete this._valueInfoMap[z(e)],t.splice(s,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let s=t;return this.valueExpression&&null==t?.arcade&&(s={...s,arcade:await S()}),this._getUniqueValueInfo(e,s)}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void s.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this._getUniqueValueInfo(e,t);return _(i,t?.scale)??this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&null==s?.arcade){const e=await S(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this._getUniqueValueInfo(e,t);return _(i,t?.scale)??this.defaultSymbol}get symbols(){const e=[];if(this._isInfosSource)for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol),e.push(...t.alternateSymbols??[]);else for(const t of this.uniqueValueGroups??[])for(const s of t.classes??[])s.symbol&&e.push(s.symbol),e.push(...s.alternateSymbols??[]);return this.defaultSymbol&&e.push(this.defaultSymbol),e}clone(){const e=new M({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:t(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:t(this.visualVariables),legendOptions:t(this.legendOptions),authoringInfo:t(this.authoringInfo),backgroundFillSymbol:t(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const s=t(this.uniqueValueInfos),i=t(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(t(this.styleOrigin))),Object.freeze(s),Object.freeze(i)),e._set("uniqueValueInfos",s),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.symbols.map(s=>s.collectRequiredFields(e,t)),f(e,t,null,this.valueExpression)];d(e,t,this.field),d(e,t,this.field2),d(e,t,this.field3),await Promise.all(s)}populateFromStyle(){return F(this.styleOrigin,{portal:this.portal}).then(e=>{const t=[];return this._valueInfoMap={},e?.data&&Array.isArray(e.data.items)&&e.data.items.forEach(s=>{const i=new j({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:s.name});this.defaultSymbol||s.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const l=new I({value:s.name,symbol:i});t.push(l),this._valueInfoMap[z(s.name)]=l}),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",N)}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[z(t.value)]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(R);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const s of e)t.push(l(()=>({symbol:s.symbol,alternateSymbols:s.alternateSymbols,value:s.value,label:s.label,description:s.description}),(e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)},{sync:!0}));this.addHandles(t,R)}}_watchUniqueValueGroups(){this.removeHandles(L);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const s of e){t.push(l(()=>({classes:s.classes}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}));for(const e of s.classes??[])t.push(l(()=>({symbol:e.symbol,alternateSymbols:e.alternateSymbols,values:e.values,label:e.label,description:e.description}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}))}this.addHandles(t,L)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueGroups:o,valueExpression:r}=this;if(!t&&!r)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const u=!(!t||!s);for(const n of o)for(const t of n.classes??[]){const{alternateSymbols:o,symbol:r,label:n,values:a,description:p}=t;for(const t of a??[]){const{value:a,value2:f,value3:d}=t,c=[a];s&&c.push(f),i&&c.push(d);const h=u?c.join(l||""):c[0]??void 0;e.push(new I({alternateSymbols:o,symbol:r,label:n,value:h,description:p}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:s,valueExpression:i,fieldDelimiter:l,uniqueValueInfos:o}=this;if(!t&&!i||!o.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const r=!(!t||!s),u=o.map(e=>{const{alternateSymbols:t,symbol:s,label:i,value:o,description:u}=e,[n,a,p]=r?o?.toString()?.split(l||"")||[]:[o];return new V({alternateSymbols:t,symbol:s,label:i,description:u,values:[new g({value:n,value2:a,value3:p})]})}),n=[new q({classes:u})];e&&Object.freeze(n),this._set("uniqueValueGroups",n),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:l,arcade:o,timeZone:r}=t??{};let u=this._cache.compiledFunc;const n=o.arcadeUtils;if(!u){const e=n.createSyntaxTree(this.valueExpression);u=n.createFunction(e),this._cache.compiledFunc=u}const a=n.executeFunction(u,n.createExecContext(e,n.getViewInfo({viewingMode:s,scale:i,spatialReference:l}),r));return this._valueInfoMap[z(a)]}_getUnqiueValueInfoForFields(e){const t=this.field,s=e.attributes;let i;if(this.field2){const e=this.field2,l=this.field3,o=[];t&&o.push(s[t]),e&&o.push(s[e]),l&&o.push(s[l]),i=o.join(this.fieldDelimiter||"")}else t&&(i=s[t]);return this._valueInfoMap[z(i)]}static fromPortalStyle(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleName:e})),i._set("portal",t?.portal||c.getDefault());const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)}),l}static fromStyleUrl(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleUrl:e}));const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)}),l}};e([o({readOnly:!0})],A.prototype,"_cache",null),e([D({uniqueValue:"unique-value"})],A.prototype,"type",void 0),e([o(y)],A.prototype,"backgroundFillSymbol",void 0),e([o({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],A.prototype,"field",null),e([r("field")],A.prototype,"castField",null),e([x("field")],A.prototype,"writeField",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field2",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field3",null),e([o({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],A.prototype,"orderByClassesEnabled",void 0),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"valueExpression",null),e([o({type:String,json:{write:!0}})],A.prototype,"valueExpressionTitle",void 0),e([o({type:v,json:{write:!0}})],A.prototype,"legendOptions",void 0),e([o({type:String,json:{write:!0}})],A.prototype,"defaultLabel",void 0),e([o(i({...b},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],A.prototype,"defaultSymbol",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"fieldDelimiter",null),e([o({type:c,readOnly:!0})],A.prototype,"portal",void 0),e([E("portal",["styleName"])],A.prototype,"readPortal",null),e([o({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],A.prototype,"styleOrigin",void 0),e([E("styleOrigin",["styleName","styleUrl"])],A.prototype,"readStyleOrigin",null),e([x("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],A.prototype,"writeStyleOrigin",null),e([o({type:[q],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,s)=>(t.uniqueValueGroups||C(t)).map(e=>q.fromJSON(e,s))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],A.prototype,"uniqueValueGroups",null),e([o({type:[I],json:{read:!1,write:{isRequired:!0,overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0,isRequired:!0}}}}})],A.prototype,"uniqueValueInfos",null),A=M=e([u("esri.renderers.UniqueValueRenderer")],A);export{A as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{clone as t}from"../core/lang.js";import s from"../core/Logger.js";import{deepMerge as i}from"../core/object.js";import{watch as l}from"../core/reactiveUtils.js";import{property as o,cast as r,subclass as u}from"../core/accessorSupport/decorators.js";import{diff as n}from"../core/accessorSupport/diffUtils.js";import{ensureString as a,ensureType as p}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as f,collectField as d}from"../layers/support/fieldUtils.js";import c from"../portal/Portal.js";import h from"./Renderer.js";import{VisualVariablesMixin as m}from"./mixins/VisualVariablesMixin.js";import{rendererBackgroundFillSymbolProperty as y,rendererSymbolProperty as b}from"./support/commonProperties.js";import v from"./support/RendererLegendOptions.js";import{getScaleDependentSymbol as _}from"./support/scaleDependentSymbolUtils.js";import g from"./support/UniqueValue.js";import V from"./support/UniqueValueClass.js";import q from"./support/UniqueValueGroup.js";import I from"./support/UniqueValueInfo.js";import{loadArcade as S}from"../support/loadArcade.js";import{a as w,c as U}from"../chunks/persistableUrlUtils.js";import j from"../symbols/WebStyleSymbol.js";import{fetchStyle as F}from"../symbols/support/styleUtils.js";import{ensureType as O}from"../symbols/support/typeUtils.js";import{addPropertyUnsupportedError as G}from"../webdoc/support/unsupportedErrors.js";import{enumeration as D}from"../core/accessorSupport/decorators/enumeration.js";import{writer as x}from"../core/accessorSupport/decorators/writer.js";import{reader as E}from"../core/accessorSupport/decorators/reader.js";var M;const R="uvInfos-watcher",L="uvGroups-watcher",N=",",P=p(I);function C(e){const{field1:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueInfos:o,valueExpression:r}=e,u=!(!t||!s);return[{classes:(o??[]).map(e=>{const{alternateSymbols:o,symbol:n,label:a,value:p,description:f}=e,[d,c,h]=u?p?.toString()?.split(l||"")||[]:[p],m=[];return(t||r)&&m.push(d),s&&m.push(c),i&&m.push(h),{alternateSymbols:o,symbol:n,label:a,values:[m],description:f}})}]}function z(e){return null!=e&&""!==e&&("string"!=typeof e||""!==e.trim()&&"<null>"!==e.toLowerCase())||(e=null),e+""}let A=M=class extends(m(h)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let s=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let l=0;l<t.length;l++){const o=e.find(e=>e.value===t[l].value);o?n(o,t[l])?(i.changed.push({type:"complete",oldValue:o,newValue:t[l]}),s=!0):i.unchanged.push({oldValue:o,newValue:t[l]}):(i.added.push(t[l]),s=!0)}for(let l=0;l<e.length;l++){t.find(t=>t.value===e[l].value)||(i.removed.push(e[l]),s=!0)}return s?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:a(e)}writeField(e,t,i,l){"string"==typeof e?t[i]=e:l?.messages?G(l,"UniqueValueRenderer.field","set to a function cannot be written to JSON"):s.getLogger(this).error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,s){return s.portal||c.getDefault()}readStyleOrigin(e,t,s){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=w(t.styleUrl,s);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,s,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=U(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?s.getLogger(this).error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void s.getLogger(this).error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let i;i="object"==typeof e?P(e):new I({value:e,symbol:O(t)}),this.uniqueValueInfos?.push(i),this._valueInfoMap[z(i.value)]=i,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void s.getLogger(this).error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let s=0;s<t.length;s++){const i=t[s];if(String(i.value)===String(e)){delete this._valueInfoMap[z(e)],t.splice(s,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let s=t;return this.valueExpression&&null==t?.arcade&&(s={...s,arcade:await S()}),this._getUniqueValueInfo(e,s)}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void s.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this._getUniqueValueInfo(e,t);return _(i,t?.scale)??this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&null==s?.arcade){const e=await S(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this._getUniqueValueInfo(e,t);return _(i,t?.scale)??this.defaultSymbol}get symbols(){const e=[];if(this._isInfosSource)for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol),e.push(...t.alternateSymbols??[]);else for(const t of this.uniqueValueGroups??[])for(const s of t.classes??[])s.symbol&&e.push(s.symbol),e.push(...s.alternateSymbols??[]);return this.defaultSymbol&&e.push(this.defaultSymbol),e}clone(){const e=new M({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:t(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:t(this.visualVariables),legendOptions:t(this.legendOptions),authoringInfo:t(this.authoringInfo),backgroundFillSymbol:t(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const s=t(this.uniqueValueInfos),i=t(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(t(this.styleOrigin))),Object.freeze(s),Object.freeze(i)),e._set("uniqueValueInfos",s),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.symbols.map(s=>s.collectRequiredFields(e,t)),f(e,t,null,this.valueExpression)];d(e,t,this.field),d(e,t,this.field2),d(e,t,this.field3),await Promise.all(s)}populateFromStyle(){return F(this.styleOrigin,{portal:this.portal}).then(e=>{const t=[];return this._valueInfoMap={},e?.data&&Array.isArray(e.data.items)&&e.data.items.forEach(s=>{const i=new j({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:s.name});this.defaultSymbol||s.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const l=new I({value:s.name,symbol:i});t.push(l),this._valueInfoMap[z(s.name)]=l}),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",N)}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[z(t.value)]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(R);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const s of e)t.push(l(()=>({symbol:s.symbol,alternateSymbols:s.alternateSymbols,value:s.value,label:s.label,description:s.description}),(e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)},{sync:!0}));this.addHandles(t,R)}}_watchUniqueValueGroups(){this.removeHandles(L);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const s of e){t.push(l(()=>({classes:s.classes}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}));for(const e of s.classes??[])t.push(l(()=>({symbol:e.symbol,alternateSymbols:e.alternateSymbols,values:e.values,label:e.label,description:e.description}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}))}this.addHandles(t,L)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:s,field3:i,fieldDelimiter:l,uniqueValueGroups:o,valueExpression:r}=this;if(!t&&!r)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const u=!(!t||!s);for(const n of o)for(const t of n.classes??[]){const{alternateSymbols:o,symbol:r,label:n,values:a,description:p}=t;for(const t of a??[]){const{value:a,value2:f,value3:d}=t,c=[a];s&&c.push(f),i&&c.push(d);const h=u?c.join(l||""):c[0]??void 0;e.push(new I({alternateSymbols:o,symbol:r,label:n,value:h,description:p}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:s,valueExpression:i,fieldDelimiter:l,uniqueValueInfos:o}=this;if(!t&&!i||!o.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const r=!(!t||!s),u=o.map(e=>{const{alternateSymbols:t,symbol:s,label:i,value:o,description:u}=e,[n,a,p]=r?o?.toString()?.split(l||"")||[]:[o];return new V({alternateSymbols:t,symbol:s,label:i,description:u,values:[new g({value:n,value2:a,value3:p})]})}),n=[new q({classes:u})];e&&Object.freeze(n),this._set("uniqueValueGroups",n),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:l,arcade:o,timeZone:r}=t??{};let u=this._cache.compiledFunc;const n=o.arcadeUtils;if(!u){const e=n.createSyntaxTree(this.valueExpression);u=n.createFunction(e),this._cache.compiledFunc=u}const a=n.executeFunction(u,n.createExecContext(e,n.getViewInfo({viewingMode:s,scale:i,spatialReference:l}),r));return this._valueInfoMap[z(a)]}_getUnqiueValueInfoForFields(e){const t=this.field,s=e.attributes;let i;if(this.field2){const e=this.field2,l=this.field3,o=[];t&&o.push(s[t]),e&&o.push(s[e]),l&&o.push(s[l]),i=o.join(this.fieldDelimiter||"")}else t&&(i=s[t]);return this._valueInfoMap[z(i)]}static fromPortalStyle(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleName:e})),i._set("portal",t?.portal||c.getDefault());const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)}),l}static fromStyleUrl(e,t){const i=new M(t?.properties);i._set("styleOrigin",Object.freeze({styleUrl:e}));const l=i.populateFromStyle();return l.catch(t=>{s.getLogger(this.prototype).error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)}),l}};e([o({readOnly:!0})],A.prototype,"_cache",null),e([D({uniqueValue:"unique-value"})],A.prototype,"type",void 0),e([o(y)],A.prototype,"backgroundFillSymbol",void 0),e([o({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],A.prototype,"field",null),e([r("field")],A.prototype,"castField",null),e([x("field")],A.prototype,"writeField",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field2",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"field3",null),e([o({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],A.prototype,"orderByClassesEnabled",void 0),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"valueExpression",null),e([o({type:String,json:{write:!0}})],A.prototype,"valueExpressionTitle",void 0),e([o({type:v,json:{write:!0}})],A.prototype,"legendOptions",void 0),e([o({type:String,json:{write:!0}})],A.prototype,"defaultLabel",void 0),e([o(i({...b},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],A.prototype,"defaultSymbol",null),e([o({type:String,value:null,json:{write:!0}})],A.prototype,"fieldDelimiter",null),e([o({type:c,readOnly:!0})],A.prototype,"portal",void 0),e([E("portal",["styleName"])],A.prototype,"readPortal",null),e([o({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],A.prototype,"styleOrigin",void 0),e([E("styleOrigin",["styleName","styleUrl"])],A.prototype,"readStyleOrigin",null),e([x("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],A.prototype,"writeStyleOrigin",null),e([o({type:[q],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,s)=>(t.uniqueValueGroups||C(t)).map(e=>q.fromJSON(e,s))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],A.prototype,"uniqueValueGroups",null),e([o({type:[I],json:{read:!1,write:{isRequired:!0,overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0,isRequired:!0}}}}})],A.prototype,"uniqueValueInfos",null),A=M=e([u("esri.renderers.UniqueValueRenderer")],A);export{A as default};
|