@arcgis/core 4.24.0-next.20220521 → 4.24.0-next.20220525
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/WebScene.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0ad179f4332d5242cc5f.js +1 -0
- package/assets/esri/core/workers/chunks/{d63f736b3560c577a8a4.js → 112b851bc61ae59fb558.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d738aab0d907cd09a9d.js → 1f4ba2fd71425b875eb4.js} +1 -1
- package/assets/esri/core/workers/chunks/{8cd8dad8bcd5c0ef445e.js → 222d51ad2b897188363c.js} +1 -1
- package/assets/esri/core/workers/chunks/4e982d988c343d71c35e.js +1 -0
- package/assets/esri/core/workers/chunks/{ab2a0480dc2b608deda3.js → 51b0bcd367a563512cbb.js} +1 -1
- package/assets/esri/core/workers/chunks/{18b4f015e1d6be7a8965.js → 5242c9badca17ba2ab25.js} +1 -1
- package/assets/esri/core/workers/chunks/525b24097af208a100da.js +1 -0
- package/assets/esri/core/workers/chunks/533d190f63c31246f3fb.js +1 -0
- package/assets/esri/core/workers/chunks/58b39f18cd0c6579e2fd.js +1 -0
- package/assets/esri/core/workers/chunks/5bfd11944c4bd19f50fb.js +1 -0
- package/assets/esri/core/workers/chunks/660abe7152e55e2bf39c.js +1 -0
- package/assets/esri/core/workers/chunks/{7391422fc51acb96a25d.js → 7727b55b4198eb5d5037.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c8c020d9e723888352b.js → 7f4c1c67551584bb9f0f.js} +1 -1
- package/assets/esri/core/workers/chunks/8bc3129cd2bd85dfd7e3.js +1 -0
- package/assets/esri/core/workers/chunks/{b597c04a4abb98e29d1c.js → 9391126baab105086d1d.js} +1 -1
- package/assets/esri/core/workers/chunks/9b4159f2e4150414b594.js +1 -0
- package/assets/esri/core/workers/chunks/a595e1026c3f7b905b00.js +1 -0
- package/assets/esri/core/workers/chunks/{b362d1ae9a87397ce2c5.js → aa40e324e59038c2f123.js} +1 -1
- package/assets/esri/core/workers/chunks/b86c18b188955aa7f48f.js +1 -0
- package/assets/esri/core/workers/chunks/be78dd8dbb8d8149d27a.js +1 -0
- package/assets/esri/core/workers/chunks/{7cf3cff7b28ff007dbad.js → d29751b88b6bd05e9c9b.js} +1 -1
- package/assets/esri/core/workers/chunks/d8a355386a75adb29980.js +1 -0
- package/assets/esri/core/workers/chunks/ddf3cbca19a02d085b1d.js +1 -0
- package/assets/esri/core/workers/chunks/e47d24c5b9ff34393dbf.js +1 -0
- package/assets/esri/core/workers/chunks/eb20148c756ff919bbbf.js +1 -0
- package/assets/esri/core/workers/chunks/{2f4a8eff11d263fa798a.js → f5d10ea7b8888f822b0c.js} +1 -1
- package/assets/esri/themes/base/_core.scss +0 -2
- package/assets/esri/themes/base/widgets/_Editor.scss +4 -3
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ar.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bg.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ca.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_cs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_da.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_de.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_el.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_en.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_es.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_et.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_he.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hu.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_id.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_it.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ja.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ko.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lt.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nb.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-BR.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-PT.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ro.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ru.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_th.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_tr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_uk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_vi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-CN.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-HK.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-TW.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nb.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ar.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_bg.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_bs.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ca.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_cs.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_da.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_de.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_el.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_en.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_es.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_et.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_fi.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_fr.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_he.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_hr.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_hu.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_id.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_it.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ja.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ko.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_lt.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_lv.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_nb.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_nl.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_pl.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_pt-BR.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_pt-PT.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ro.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ru.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_sk.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_sl.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_sr.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_sv.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_th.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_tr.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_uk.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_vi.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_zh-CN.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_zh-HK.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nb.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
- package/chunks/Heatmap.glsl.js +7 -11
- package/chunks/HeatmapDensity.glsl.js +7 -20
- package/chunks/Terrain.glsl.js +38 -41
- package/chunks/geometryEngineBase.js +1 -1
- package/core/Identifiable.js +1 -1
- package/core/accessorSupport/originUtils.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/has.js +1 -1
- package/core/lang.js +1 -1
- package/core/maybe.js +1 -1
- package/core/scheduling.js +1 -1
- package/core/watchUtils.js +1 -1
- package/geometry/projection.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/interfaces.d.ts +762 -234
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/TileLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/WebTileLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/controllers/StreamController.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/LocalMediaElementSource.js +1 -1
- package/layers/support/VideoElement.d.ts +4 -0
- package/layers/support/VideoElement.js +5 -0
- package/layers/support/imageryRendererUtils.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/renderers/HeatmapRenderer.js +1 -1
- package/renderers/support/HeatmapColorStop.js +1 -1
- package/renderers/support/heatmapUtils.js +1 -1
- package/renderers/support/types.js +1 -1
- package/smartMapping/renderers/heatmap.js +1 -1
- package/smartMapping/statistics/heatmapStatistics.js +1 -1
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/PaddedViewState.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushHeatmap.js +1 -1
- package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
- package/views/2d/engine/webgl/enums.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/techniques/heatmap/TechniqueHeatmap.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/support/pixelBuffering.js +1 -1
- package/views/2d/layers/features/support/rendererUtils.js +1 -1
- package/views/2d/layers/features/tileRenderers/HeatmapTileRenderer.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/HeatmapSource.js +1 -1
- package/views/2d/magnifier/MagnifierView2D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/Dimensioning/DimensioningTool.js +1 -1
- package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/CloudyWeather.js +1 -1
- package/views/3d/environment/FoggyWeather.js +1 -1
- package/views/3d/environment/RainyWeather.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/SnowyWeather.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/environment/SunLighting.js +1 -1
- package/views/3d/environment/SunnyWeather.js +1 -1
- package/views/3d/environment/VirtualLighting.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/SegmentLabels3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
- package/views/3d/interactive/editingTools/originGraphicVisualElementUtils.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/terrain/GeometryState.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/PatchGeometryLUT.js +5 -0
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/PlanarPatch.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainConst.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBlendInput.js +5 -0
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/sketch/SketchLabelOptions.d.ts +4 -0
- package/views/interactive/sketch/SketchLabelOptions.js +5 -0
- package/views/interactive/sketch/SketchTooltipOptions.d.ts +4 -0
- package/views/interactive/sketch/SketchTooltipOptions.js +5 -0
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/SceneSnappingManagerPool.js +5 -0
- package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/SnappingOperation.js +5 -0
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/support/viewUtils.js +1 -1
- package/views/interactive/tooltip/DrawTooltipInfos.js +1 -1
- package/views/interactive/tooltip/ExtentTooltipInfos.js +1 -1
- package/views/interactive/tooltip/ReshapeTooltipInfos.js +1 -1
- package/views/interactive/tooltip/SketchTooltipInfo.js +5 -0
- package/views/interactive/tooltip/Tooltip.js +1 -1
- package/views/interactive/tooltip/TransformTooltipInfos.js +1 -1
- package/views/interactive/tooltip/TranslateTooltipInfos.js +5 -0
- package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentMoveZ.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentReshapeMoveGraphic.js +5 -0
- package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
- package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
- package/views/overlay/TextOverlayItem.js +1 -1
- package/views/support/lengthMeasurementUtils.js +1 -1
- package/webscene/Environment.js +1 -1
- package/webscene/Slide.js +1 -1
- package/webscene/SunLighting.d.ts +4 -0
- package/webscene/SunLighting.js +5 -0
- package/webscene/VirtualLighting.d.ts +4 -0
- package/webscene/VirtualLighting.js +5 -0
- package/webscene/lightingTypes.js +5 -0
- package/webscene/support/SlideEnvironment.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates/TemplateItem.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Measurement.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print/FileLink.js +1 -1
- package/widgets/ScaleBar.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Swipe/SwipeViewModel.js +1 -1
- package/widgets/TableList/TableListViewModel.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/widgets/support/tests.js +5 -0
- package/assets/esri/core/workers/chunks/1d109cd048170e2d529a.js +0 -1
- package/assets/esri/core/workers/chunks/38a752f8bd456c8912a8.js +0 -1
- package/assets/esri/core/workers/chunks/4487fb2d274e49bdb2b0.js +0 -1
- package/assets/esri/core/workers/chunks/55b2b80b9e3684feaa8e.js +0 -1
- package/assets/esri/core/workers/chunks/605202e3c29250650492.js +0 -1
- package/assets/esri/core/workers/chunks/7ea06c86adfc827fda08.js +0 -1
- package/assets/esri/core/workers/chunks/816ae3f0513ecf856f8f.js +0 -1
- package/assets/esri/core/workers/chunks/8417b3d5821b306a0fc4.js +0 -1
- package/assets/esri/core/workers/chunks/8793070d288878d6f49b.js +0 -1
- package/assets/esri/core/workers/chunks/88912dbc2b60623bc6a3.js +0 -1
- package/assets/esri/core/workers/chunks/b97a34d2e7cceef1ac41.js +0 -1
- package/assets/esri/core/workers/chunks/cd04bae81e5fc27ec97b.js +0 -1
- package/assets/esri/core/workers/chunks/f6aaee4db0bd5096164c.js +0 -1
- package/assets/esri/core/workers/chunks/f9d83a48b69c5728feba.js +0 -1
- package/assets/esri/core/workers/chunks/fc9b5f40c5179a8c90de.js +0 -1
- package/assets/esri/core/workers/chunks/fe18d2d251a5ad80eb54.js +0 -1
- package/assets/esri/images/search/search-symbol-32.svg +0 -1
- package/assets/esri/themes/base/widgets/_NumericalFeedbackControls.scss +0 -23
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ar.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_bg.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_bs.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ca.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_cs.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_da.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_de.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_el.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_en.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_es.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_et.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_fi.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_fr.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_he.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_hr.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_hu.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_id.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_it.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ja.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ko.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_lt.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_lv.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_nb.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_nl.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pl.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pt-BR.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pt-PT.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ro.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ru.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sk.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sl.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sr.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sv.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_th.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_tr.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_uk.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_vi.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-CN.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-HK.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-TW.json +0 -1
- package/views/interactive/tooltip/NumericalFeedbackOptions.d.ts +0 -4
- package/views/interactive/tooltip/NumericalFeedbackOptions.js +0 -5
- package/views/interactive/tooltip/SegmentLabelOptions.js +0 -5
- package/views/interactive/tooltip/TooltipOptions.js +0 -5
- package/views/interactive/tooltip/content/TooltipContentExtentMoveXY.js +0 -5
- package/webscene/Lighting.d.ts +0 -4
- package/webscene/Lighting.js +0 -5
- package/widgets/support/NumericalFeedbackControls/NumericalFeedbackControlsViewModel.js +0 -5
- package/widgets/support/NumericalFeedbackControls/VisibleElements.js +0 -5
- package/widgets/support/NumericalFeedbackControls/css.js +0 -5
- package/widgets/support/NumericalFeedbackControls.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4133,7873],{65845:(e,t,r)=>{r.d(t,{D:()=>a});var i=r(81153);function a(e){e&&e.writtenProperties&&e.writtenProperties.forEach((e=>{const t=e.target;e.newOrigin&&e.oldOrigin!==e.newOrigin&&(0,i.l)(t)&&t.updateOrigin(e.propName,e.newOrigin)}))}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},41123:(e,t,r)=>{r.d(t,{D:()=>a});const i="randomUUID"in crypto;function a(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16);return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),a=r(5600),s=(r(67676),r(80442),r(75215),r(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,a.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,s.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>p});var i=r(43697),a=r(92604),s=r(70586),o=r(5600),n=(r(67676),r(80442),r(75215),r(52011)),l=r(66677);const p=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if((0,s.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,a.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,o.Cb)()],t.prototype,"title",null),(0,i._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>I});var i=r(43697),a=r(40330),s=r(3172),o=r(66643),n=r(20102),l=r(92604),p=r(70586),u=r(95330),c=r(17452),d=r(5600),h=(r(67676),r(80442),r(75215),r(71715)),y=r(52011),m=r(30556),f=r(65587),g=r(15235),v=r(86082);const w=l.Z.getLogger("esri.layers.mixins.PortalLayer"),I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,u.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||w.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,u.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?a.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,(0,p.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=a.id.findServerInfo(this.url);if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=f.Z.getDefault();if(n&&n.loaded&&(0,c.Fv)(n.restUrl)===(0,c.Fv)(i))return n.user;const l=`${i}/community/self`,u=(0,p.pC)(e)?e.signal:null,d=await(0,o.q6)((0,s.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?v.default.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return r&&i&&!(0,c.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new n.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},32271:(e,t,r)=>{r.d(t,{xp:()=>q,Vt:()=>E});var i=r(43697),a=r(3172),s=r(20102),o=(r(80442),r(92604)),n=r(70586),l=r(95330),p=r(17452),u=r(5600),c=(r(67676),r(75215),r(71715)),d=r(52011),h=r(30556),y=r(65845),m=r(6570),f=r(79235),g=r(82971),v=r(66677),w=r(21506),I=r(61064),S=r(65587),_=r(15235),b=r(66643),x=r(41123),P=r(97873);async function R(e,t,r){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const a=new Set(t.resources.toKeep.map((e=>e.resource.path))),o=new Set,n=[];a.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const s of t.resources.toUpdate)if(i.delete(s.resource.path),a.has(s.resource.path)||o.has(s.resource.path)){const{resource:t,content:i,finish:a,error:o}=s,l=(0,P.getSiblingOfSameTypeI)(t,(0,x.D)());e.paths.push(l.path),n.push(U({resource:l,content:i,finish:a,error:o},r))}else e.paths.push(s.resource.path),n.push(O(s,r)),o.add(s.resource.path);for(const i of t.resources.toAdd)n.push(U(i,r)),e.paths.push(i.resource.path);if(i.forEach((e=>{const r=t.portalItem.resourceFromPath(e);n.push(r.portalItem.removeResource(r).catch((()=>{})))})),0===n.length)return;const p=await(0,l.as)(n);(0,l.k_)(r);const u=p.filter((e=>"error"in e)).map((e=>e.error));if(u.length>0)throw new s.Z("save:resources","Failed to save one or more resources",{errors:u})}async function U(e,t){const r=await(0,b.q6)(e.resource.portalItem.addResource(e.resource,e.content,t));if(!0!==r.ok)throw e.error&&e.error(r.error),r.error;e.finish&&e.finish(e.resource)}async function O(e,t){const r=await(0,b.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error(r.error),r.error;e.finish(e.resource)}const C=o.Z.getLogger("esri.layers.mixins.SceneService"),E=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,l.Ds)((async(e,t,r)=>{switch(e){case q.SAVE:return this._save(t);case q.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return g.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new g.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return m.Z.fromJSON(i,r)}const i=t.store,a=this._readSpatialReference(t);return null==a||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<T))?null:new m.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:a})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,v.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,v.Qc)(this.url);(0,n.pC)(e)&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,v.ld)(i)}set url(e){const t=(0,v.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:C});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,v.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url");if(!e)return null;const t=(0,p.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,I.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,C,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new s.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<T||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,a=r.obb.center[2],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=a-o,this.fullExtent.zmax=a+o}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<T)return;const r=t[2],i=t[3];this.fullExtent.zmin=r-i,this.fullExtent.zmax=r+i}}async _fetchService(e){if(null==this.url)throw new s.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,a.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,a.default)(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,{origin:"service",url:this.parsedUrl}),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,a.default)(this.parsedUrl.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl}),this.validateLayer(t)}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===N.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...Z,...t};let i=_.default.from(e);i||(C.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new s.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const a=i.portal||S.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=j,i.portal=a;const o={origin:"portal-item",url:null,messages:[],portal:a,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},n={layers:[this.write({},o)]};return await Promise.all(o.resources.pendingOperations),await this._validateAgainstJSONSchema(n,o,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,N.newItem),await a._signIn(),await a.user.addItem({item:i,folder:r&&r.folder,data:n}),await R(this.resourceReferences,o,null),this.portalItem=i,(0,y.D)(o),o.portalItem=i,i}async _save(e){const t={...Z,...e};this.portalItem||(C.error("_save(): requires the .portalItem property to be set"),await Promise.reject(new s.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService"))),this.portalItem.type!==j&&(C.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+j),await Promise.reject(new s.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${j}"`))),await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,p.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||S.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,N.existingItem),await this.portalItem.update({data:i}),await R(this.resourceReferences,r,null),(0,y.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,i){let a=t.messages.filter((e=>"error"===e.type)).map((e=>new s.Z(e.name,e.message,e.details)));if(i&&i.validationOptions.ignoreUnsupported&&(a=a.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name))),i.validationOptions.enabled||A){const t=(await r.e(7572).then(r.bind(r,87572))).validate(e,i.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(C.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===i.validationOptions.failPolicy){const e=t.map((e=>new s.Z("sceneservice:schema-validation",e))).concat(a);throw new s.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(a.length>0)throw new s.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:a})}};return(0,i._)([(0,u.Cb)(w.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:g.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,c.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.Cb)({type:m.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,c.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,u.Cb)({readOnly:!0,type:f.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,c.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,u.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,c.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,c.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,u.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,u.Cb)(w.HQ)],t.prototype,"url",null),(0,i._)([(0,h.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,u.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,d.j)("esri.layers.mixins.SceneService")],t),t},T=-1e38,A=!1;var N,K;(K=N||(N={}))[K.existingItem=0]="existingItem",K[K.newItem=1]="newItem";const j="Scene Service",Z={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var q;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(q||(q={}))},61064:(e,t,r)=>{r.d(t,{T:()=>o});var i=r(3172),a=r(20102),s=r(70586);async function o(e,t,r,o,n,l){let p=null;if((0,s.pC)(r)){const t=`${e}/nodepages/`,a=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.default)(a,{query:{f:"json",token:o},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){(0,s.pC)(n)&&n.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",a,e),p=e}}if(!t)return null;const u=`${e}/nodes/`,c=u+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.default)(c,{query:{f:"json",token:o},responseType:"json",signal:l})).data,urlPrefix:u}}catch(e){throw new a.Z("sceneservice:root-node-missing","Root node missing.",{pageError:p,nodeError:e,url:c})}}},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>l,contentToBlob:()=>h,fetchResources:()=>n,getSiblingOfSameType:()=>y,getSiblingOfSameTypeI:()=>m,removeAllResources:()=>u,removeResource:()=>p,splitPrefixFileNameAndExtension:()=>d});var i=r(3172),a=r(20102),s=r(70586),o=r(17452);async function n(e,t={},r){await e.load(r);const i=(0,o.v_)(e.itemUrl,"resources"),{start:a=1,num:n=10,sortOrder:l="asc",sortField:p="created"}=t,u={query:{start:a,num:n,sortOrder:l,sortField:p,token:e.apiKey},signal:(0,s.U2)(r,"signal")},c=await e.portal._request(i,u);return{total:c.total,nextStart:c.nextStart,resources:c.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function l(e,t,r,i){if(!e.hasPath())throw new a.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const n=e.portalItem;await n.load(i);const l=(0,o.v_)(n.userItemUrl,"add"===t?"addResources":"updateResources"),[p,u]=c(e.path),d=await h(r),y=new FormData;return p&&"."!==p&&y.append("resourcesPrefix",p),y.append("fileName",u),y.append("file",d,u),y.append("f","json"),(0,s.pC)(i)&&i.access&&y.append("access",i.access),await n.portal._request(l,{method:"post",body:y,signal:(0,s.U2)(i,"signal")}),e}async function p(e,t,r){if(!t.hasPath())throw new a.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,o.v_)(e.userItemUrl,"removeResources");await e.portal._request(i,{method:"post",query:{resource:t.path},signal:(0,s.U2)(r,"signal")}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,o.v_)(e.userItemUrl,"removeResources");return e.portal._request(r,{method:"post",query:{deleteAll:!0},signal:(0,s.U2)(t,"signal")})}function c(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function d(e){const[t,r]=function(e){const t=(0,o.Ml)(e);return(0,s.Wi)(t)?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,a]=c(t);return[i,a,r]}async function h(e){return e instanceof Blob?e:(await(0,i.default)(e.url,{responseType:"blob"})).data}function y(e,t){if(!e.hasPath())return null;const[r,,i]=d(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+i))}function m(e,t){if(!e.hasPath())return null;const[r,,i]=d(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+i))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3301,4889],{78346:(e,t,r)=>{r.d(t,{bA:()=>Z});var i=r(20102),s=r(80442),n=r(95330),a=r(80903),o=r(25045),l=r(40330),c=r(92604),u=r(70586),h=r(94362),f=r(99880),d=r(68773),m=(r(2587),r(17452));const p={};function g(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=p.baseUrl),p.packages?.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(t.packages,e)})),t}var y=r(41213);class x{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new x,this._workerPostMessage({type:h.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,y.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,y.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,h.QM)(e);if(t&&t.type===h.Cs.OPEN){const{modulePath:e,jobId:r}=t;let i=await o.default.loadWorker(e);i||(i=await import(e));const s=o.default.connect(i);this._workerPostMessage({type:h.Cs.OPENED,jobId:r,data:s})}}}var b=r(70171),I=r(17202);const v=c.Z.getLogger("esri.core.workers"),{HANDSHAKE:_}=h.Cs;let C,S;const k="Failed to create Worker. Fallback to execute module in main thread";async function R(e){return new Promise((t=>{function r(s){const n=(0,h.QM)(s);n&&n.type===_&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),v.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)}))}let T=0;const P=c.Z.getLogger("esri.core.workers"),{ABORT:M,INVOKE:E,OPEN:D,OPENED:O,RESPONSE:F}=h.Cs;class N{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),P.error(e)}))}static async create(e){const t=await async function(){if(!(0,s.Z)("esri-workers")||((0,s.Z)("mozilla"),0))return R(new w);if(!C&&!S)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=d.Z.default){const t={...d.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(d.Z));e.assetsPath=(0,m.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,b.Kd)(),e.has={"esri-csp-restrictions":(0,s.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,s.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,s.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,s.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,s.Z)("esri-atomics"),"esri-shared-array-buffer":(0,s.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,m.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,m.hF)(e.workers.workerPath):e.workers.workerPath=(0,m.hF)((0,f.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=d.Z.workers.loaderConfig,r=g({baseUrl:t?.baseUrl,locale:(0,b.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),i={version:l.i8,buildDate:I.r,revision:I.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}()}'`);C=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){S=e||{}}let e;if(C)try{e=new Worker(C,{name:"esri-worker-"+T++})}catch(t){v.warn(k,S),e=new w}else v.warn(k,S),e=new w;return R(e)}();return new N(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,i=(0,h.jt)();return new Promise(((t,s)=>{const a={resolve:t,reject:s,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(i),this._post({type:M,jobId:i})}))};this._outJobs.set(i,a),this._post({type:D,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,h.QM)(e);if(t)switch(t.type){case O:this._onOpenedMessage(t);break;case F:this._onResponseMessage(t);break;case M:this._onAbortMessage(t);break;case E:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);i&&(i.controller&&i.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:s}=e,a=s?new AbortController:null,o=this._inJobs,c=l.Nv[t];let u;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);u=c.call(null,i,{signal:a?a.signal:null})}catch(e){return void this._post({type:F,jobId:r,error:(0,h.AB)(e)})}(0,n.y8)(u)?(o.set(r,{controller:a,promise:u}),u.then((e=>{o.has(r)&&(o.delete(r),this._post({type:F,jobId:r},e))}),(e=>{o.has(r)&&(o.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:F,jobId:r,error:(0,h.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:F,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,u.hw)(i.abortHandle),i.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:s}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,u.hw)(n.abortHandle),r?n.reject(i.Z.fromJSON(JSON.parse(r))):n.resolve(s))}_post(e,t,r){return(0,h.oi)(this.worker,e,t,r)}}let B=(0,s.Z)("esri-workers-debug")?1:(0,s.Z)("host-browser")?navigator.hardwareConcurrency-1:0;B||(B=(0,s.Z)("safari")&&(0,s.Z)("mac")||(0,s.Z)("trident")?7:2);let L=0;const z=[];async function A(e,t){const r=new a.Z;return await r.open(e,t),r}async function Z(e,t={}){if("string"!=typeof e)throw new i.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.Z)("host-webworker")&&!(0,s.Z)("esri-workers")&&(r="local"),"local"===r){let r=await o.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const i=t.client||r;return A([o.default.connect(r)],{...t,client:i})}if(await async function(){if(W)return W;H=new AbortController;const e=[];for(let t=0;t<B;t++){const r=N.create(t).then((e=>(z[t]=e,e)));e.push(r)}return W=Promise.all(e),W}(),(0,n.k_)(t.signal),"dedicated"===r){const r=L++%B;return A([await z[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,B);if(r<B){const i=new Array(r);for(let s=0;s<r;++s){const r=L++%B;i[s]=z[r].open(e,t)}return A(i,t)}}return A(z.map((r=>r.open(e,t))),t)}let H,W=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var i=r(94443),s=r(3172),n=r(20102),a=r(70586);async function o(e){if((0,a.pC)(c.fetchBundleAsset))return c.fetchBundleAsset(e);const t=await(0,s.default)(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let i;i="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=i,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const a=t.exec(r);if(!a)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",c=a[2],u=(0,i.Su)(s),h=`${l}${c}.json`,f=u?`${l}${c}_${u}.json`:h;let d;try{d=await o(e(f))}catch(t){if(f===h)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{d=await o(e(h))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return d}(this.getAssetUrl,this.matcher,e,t)}}const c={};var u,h=r(99880);(0,i.tz)((u={pattern:"esri/",location:h.V},new l(u)))},940:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(92604),s=r(78286),n=r(19153),a=r(90344),o=r(18848);const l=i.Z.getLogger("esri.intl");function c(e,t,r={}){const{format:i={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let i,n;const a=e.indexOf(":");if(-1===a?i=e.trim():(i=e.slice(0,a).trim(),n=e.slice(a+1).trim()),!i)return"";const o=(0,s.hS)(i,t);if(null==o)return"";const l=r[n]||r[i];return l?u(o,l):n?h(o,n):f(o)}(e,t,i)))}function u(e,t){switch(t.type){case"date":return(0,a.p6)(e,t.intlOptions);case"number":return(0,o.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),f(e)}}function h(e,t){switch(t.toLowerCase()){case"dateformat":return(0,a.p6)(e);case"numberformat":return(0,o.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,a.p6)(e):/^numberformat/i.test(t)?(0,o.uf)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,o.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,a.p6)(e):""}}},69971:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Xe});var i=r(43697),s=r(51773),n=r(30030),a=r(20102),o=r(70586),l=r(16453),c=r(95330),u=r(17445),h=r(5600),f=(r(67676),r(80442),r(75215)),d=r(36030),m=r(71715),p=r(52011),g=r(87085),y=r(71612),x=r(17017),w=(r(66577),r(3172)),b=r(92604),I=r(44422),v=r(8744),_=r(66677),C=r(21506),S=r(35956),k=r(88281),R=r(11145);function T(e,t,r){const i=t.shift();if(0===r.length){const e=[];r.push({sliceId:-1,multidimensionalDefinition:e})}const s=r.length;for(let t=0;t<s;t++){const t=r.shift().multidimensionalDefinition;i.values.forEach((s=>{r.push({sliceId:-1,multidimensionalDefinition:[...t,{variableName:e,dimensionName:i.name,values:[s]}]})}))}t.length&&T(e,t,r)}function P(e,t){const r=[];let i=0;return(t?e.variables.filter((e=>e.name.toLowerCase()===t.toLowerCase())):[...e.variables].sort(((e,t)=>e.name>t.name?1:-1))).forEach((e=>{const t=[],s=[...e.dimensions].sort(((e,t)=>e.name>t.name?-1:1));T(e.name,s,t),t.forEach((e=>{r.push({...e,sliceId:i++})}))})),r}function M(e){return!((0,o.Wi)(e)||!e.length)&&e.some((e=>{if(null==e.values)return!0;const t=e.values.length;return 0===t||t>1||!e.isSlice&&Array.isArray(e.values[0])}))}var E=r(80676),D=r(67058),O=r(91219),F=r(23808),N=r(6570),B=r(82971);const L=b.Z.getLogger("esri.layers.mixins.ImageryTileMixin"),z=e=>{let t=class extends e{constructor(){super(...arguments),this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.fullExtent=null,this.interpolation="nearest",this.multidimensionalDefinition=null,this.raster=null,this.rasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.tileInfo=null,this.symbolizer=null}set url(e){this._set("url",(0,_.Nm)(e,L))}set renderer(e){this._set("renderer",e),this.updateRenderer()}async convertVectorFieldData(e,t){if((0,o.Wi)(e))return null;const r=this._rasterJobHandler.instance,i=this.rasterInfo.dataType;return r?r.convertVectorFieldData({pixelBlock:e,dataType:i},t):(0,E.KC)(e,i)}async createFlowMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(e,t):(0,F.GE)(e.meshType,e.simulationSettings,e.flowData,(0,o.pC)(t.signal)?t.signal:(new AbortController).signal)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.rasterInfo;if((0,o.Wi)(t))return e;let r=e.multidimensionalDefinition||this.multidimensionalDefinition;!(0,o.Wi)(r)&&r.length||(r=this._getDefaultSlice());const i=e.timeExtent||this.timeExtent;if((0,o.pC)(r)&&(0,o.pC)(i)&&((0,o.pC)(i.start)||(0,o.pC)(i.end))){r=r.map((e=>e.clone()));const s=t.variables.find((({name:e})=>e===r[0].variableName))?.dimensions?.find((({name:e})=>"StdTime"===e)),n=r.find((({dimensionName:e})=>"StdTime"===e));if(!s||!n)return{...e,multidimensionalDefinition:null};const{start:a,end:l}=i,c=(0,o.Wi)(a)?null:a.getTime(),u=(0,o.Wi)(l)?null:l.getTime(),h=c??u,f=u??c;if((0,o.pC)(s.values)){const e=s.values.filter((e=>{if(Array.isArray(e)){if(h===f)return e[0]<=h&&e[1]>=h;const t=e[0]<=h&&e[1]>h||e[0]<f&&e[1]>=f,r=e[0]>=h&&e[1]<=f||e[0]<h&&e[1]>f;return t||r}return h===f?e===h:e>=h&&e<=f}));if(e.length){const t=e.sort(((e,t)=>h===f?(e[0]??e)-(t[0]??t):Math.abs((e[1]??e)-f)-Math.abs((t[1]??t)-f)))[0];n.values=[t]}else r=null}else if(s.hasRegularIntervals&&s.extent){const[e,t]=s.extent;h>t||f<e?r=null:n.values=h===f?[h]:[Math.max(e,h),Math.min(t,f)]}}return{...e,multidimensionalDefinition:r}}async updateRenderer(){if(!this.loaded)return;if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(this.renderer))return;const e=this._rasterJobHandler.instance;e&&(this.symbolizer.rendererJSON=(0,D.ol)(this.renderer.toJSON()),this.symbolizer.bind(),await e.updateSymbolizer(this.symbolizer),this._cachedRendererJson=this.renderer.toJSON())}async applyRenderer(e,t){const r=e&&e.pixelBlock;if(!((0,o.pC)(r)&&r.pixels&&r.pixels.length>0))return null;let i;await this.updateRenderer();const s=this._rasterJobHandler.instance,{bandIds:n}=this;return i=s?await s.symbolize({...e,simpleStretchParams:t,bandIds:n}):this.symbolizer.symbolize({...e,simpleStretchParams:t,bandIds:n}),i}getTileUrl(e,t,r){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${r}`:""}getCompatibleTileInfo(e,t,r=!1){if(!this.loaded||(0,o.Wi)(t))return null;if(r&&e.equals(this.spatialReference))return this.tileInfo;const i=(0,v.C5)(e);return R.Z.create({size:256,spatialReference:e,origin:i?{x:i.origin[0],y:i.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent&&this._compatibleFullExtent.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,r,i={}){if(i.requestAsImageElement){const s=this.getTileUrl(e,t,r);return(0,w.default)(s,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:i.signal}).then((e=>e.data))}if((0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(i=this.normalizeRasterFetchOptions(i),(0,o.Wi)(i.multidimensionalDefinition))){const s=i.tileInfo||this.rasterInfo.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,r,s),pixelBlock:null}}return await this._initJobHandler(),"raster-shaded-relief"===this.renderer.type&&(i={...i,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,r,i)}async fetchPixels(e,t,r,i={}){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(i=this.normalizeRasterFetchOptions(i),(0,o.Wi)(i.multidimensionalDefinition))?{extent:e,pixelBlock:null}:(await this._initJobHandler(),this.raster.fetchPixels(e,t,r,i))}async identify(e,t={}){return!(0,o.pC)(this.rasterInfo.multidimensionalInfo)||this.rasterInfo.hasMultidimensionalTranspose&&(M(t.multidimensionalDefinition)||t.transposedVariableName||t.timeExtent)||(t=this.normalizeRasterFetchOptions(t),!(0,o.Wi)(t.multidimensionalDefinition))?this.raster.identify(e,t):{location:e,value:null}}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){const e=this.rasterInfo.multidimensionalInfo;if((0,o.Wi)(e)||"standard-time"!==this.rasterInfo.dataType)return!1;const t=this.multidimensionalDefinition[0]?.variableName;return e.variables.some((e=>e.name===t&&e.dimensions.some((e=>"StdTime"===e.name))))}getStandardTimeValue(e){return new Date(24*(e-25569)*3600*1e3).toString()}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=this._getDefaultSlice()),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new k.Z;return this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e,this.raster.rasterJobHandler=e,this.renderer&&this.updateRenderer()})).catch((()=>null)),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this.raster.rasterJobHandler=null}_configDefaultInterpolation(){if(null==this.interpolation){const e=(0,D.In)(this.rasterInfo,this.raster.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",e)}}_getDefaultSlice(){const{multidimensionalInfo:e}=this.raster.rasterInfo;if((0,o.Wi)(e))return null;const t=e.variables[0];return t.dimensions.map((e=>new S.Z({variableName:t.name,dimensionName:e.name,values:[e.values?.[0]??e.extent[0]],isSlice:!0})))}_configDefaultRenderer(){const e=this.raster.rasterInfo;this.bandIds||(this.bandIds=(0,D.YD)(e)),this.renderer||(this.renderer=(0,D.Ob)(e,{bandIds:this.bandIds,variableName:(0,o.pC)(this.multidimensionalDefinition)?this.multidimensionalDefinition[0]?.variableName:null})),this.symbolizer?(this.symbolizer.rendererJSON=(0,D.ol)(this.renderer.toJSON()),this.symbolizer.rasterInfo=e):this.symbolizer=new O.Z({rendererJSON:this.renderer.toJSON(),rasterInfo:e});const t=this.symbolizer.bind();t.success||L.warn("imagery-tile-mixin",t.error||"The given renderer is not supported by the layer.")}};return(0,i._)([(0,h.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"_compatibleFullExtent",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"bandIds",void 0),(0,i._)([(0,h.Cb)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,i._)([(0,h.Cb)({type:N.Z,json:{read:!1}}),(0,I.B)("rasterInfo.extent")],t.prototype,"fullExtent",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"interpolation",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"ioConfig",void 0),(0,i._)([(0,h.Cb)({type:[S.Z]})],t.prototype,"multidimensionalDefinition",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"raster",void 0),(0,i._)([(0,h.Cb)({readOnly:!0}),(0,I.B)("raster.rasterInfo")],t.prototype,"rasterInfo",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"sourceJSON",void 0),(0,i._)([(0,h.Cb)({type:B.Z,json:{read:!1}}),(0,I.B)("rasterInfo.spatialReference")],t.prototype,"spatialReference",void 0),(0,i._)([(0,h.Cb)({type:R.Z,json:{read:!1}}),(0,I.B)("rasterInfo.storageInfo.tileInfo")],t.prototype,"tileInfo",void 0),(0,i._)([(0,h.Cb)(C.HQ)],t.prototype,"url",null),(0,i._)([(0,h.Cb)({types:n.dr})],t.prototype,"renderer",null),(0,i._)([(0,h.Cb)()],t.prototype,"symbolizer",void 0),t=(0,i._)([(0,p.j)("esri.layers.ImageryTileMixin")],t),t};var A=r(38009),Z=r(16859),H=r(34760),W=r(72965),J=r(28294),j=r(1231),U=r(69608),q=r(48526),G=r(36679),$=r(96674),V=r(609),Y=r(73506),K=r(13473);const X=new Map,Q=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const r=e+"/"+t,i=this._cachedBlocks;if(i.has(r)){const e=i.get(r);return e.refCount--,e.refCount<=0&&(i.delete(r),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const r=e+"/"+t,i=this._cachedBlocks;if(i.has(r)){const e=i.get(r);return e.ts=Date.now(),e.refCount++,i.delete(r),i.set(r,e),e.block}return null}putBlock(e,t,r,i=null){const s=this._cachedBlocks,n=e+"/"+t;if(s.has(n)){const e=s.get(n);e.ts=Date.now(),e.refCount++}else s.set(n,{block:r,ts:Date.now(),refCount:1,controller:i});this._trim(),this._updateTimer()}deleteBlock(e,t){const r=this._cachedBlocks,i=e+"/"+t;r.has(i)&&r.delete(i)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),r=Date.now();for(let i=0;i<t.length&&t[i][1].ts<=r-this._duration;i++)e.delete(t[i][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let r=0;r<t.length-this._size;r++)e.delete(t[r][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function ee(e,t){return null==t?e:`${e}?sliceId=${t}`}function te(e,t,r){if(!X.has(e))return null==t?Q.getBlock(e,r):null;const i=X.get(e);if(null==i[t]){for(let e=0;e<i.length;e++)if(i[e]&&i[e].cache.has(r)){const t=i[e].cache.get(r);return t.refCount++,t.block}return Q.getBlock(e,r)}const s=i[t].cache;if(s.has(r)){const e=s.get(r);return e.refCount++,e.block}for(let e=0;e<i.length;e++)if(e!==t&&i[e]&&i[e]&&i[e].cache.has(r)){const t=i[e].cache.get(r);return t.refCount++,s.set(r,t),t.block}return null}function re(e,t,r,i,s=null){if(!X.has(e))return void(null==t&&Q.putBlock(e,r,i,s));const n=X.get(e);if(null==n[t])return void Q.putBlock(e,r,i,s);const a={refCount:1,block:i,isResolved:!1,isRejected:!1,controller:s};i.then((()=>a.isResolved=!0)).catch((()=>a.isRejected=!0)),n[t].cache.set(r,a)}var ie=r(75993),se=r(55914);let ne=class extends((0,V.v)($.wq)){constructor(){super(...arguments),this.rasterJobHandler=null,this.datasetName=null,this.datasetFormat=null,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}async init(){const e=(0,Y.zD)();this.addResolvingPromise(e),await this.when()}normalizeCtorArgs(e){return e&&e.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:R.Z.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,Y.ut)(e.spatialReference);return(0,o.pC)(t)&&e.extent.width>=t/2}set url(e){this._set("url",(0,_.Nm)(e,b.Z.getLogger(this.declaredClass)))}async open(e){throw new a.Z("BaseRaster:open-not-implemented","open() is not implemented")}async fetchTile(e,t,r,i={}){const s=i.tileInfo||this.rasterInfo.storageInfo.tileInfo,n=this.getTileExtentFromTileInfo(e,t,r,s);return this.fetchPixels(n,s.size[0],s.size[1],i)}async identify(e,t={}){const{multidimensionalDefinition:r,timeExtent:i}=t,{hasMultidimensionalTranspose:s,multidimensionalInfo:n}=this.rasterInfo;let{transposedVariableName:a}=t;const l=(0,o.pC)(n)&&s&&(null!=i||M(r));l&&!a&&(a=(0,o.pC)(r)&&r.length>0?r[0].variableName:n.variables[0].name,t={...t,transposedVariableName:a}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=this.rasterInfo,{datumTransformation:h}=t;let f=(0,Y.nF)(e,c,h);if(!u.intersects(f))return{location:f,value:null};if((0,o.pC)(this.rasterInfo.transform)){const e=this.rasterInfo.transform.inverseTransform(f);if(!this.rasterInfo.nativeExtent.intersects(e))return{location:e,value:null};f=e}let d=0;const m=a&&(0,o.pC)(n)&&this.rasterInfo.hasMultidimensionalTranspose;if(!m)if(t.srcResolution)d=(0,Y.kr)(t.srcResolution,this.rasterInfo,this.ioConfig.sampling).pyramidLevel;else if(d=await this.computeBestPyramidLevelForLocation(e,t),null==d)return{location:f,value:null};const p=this.identifyPixelLocation(f,d,null,m);if(null===p)return{location:f,value:null};const{row:g,col:y,rowOffset:x,colOffset:w,blockWidth:b}=p,I=a??(0,o.Wg)(t.sliceId),v=ee(this.url,I),_=`${d}/${g}/${y}`;let C=te(v,null,_);(0,o.Wi)(C)&&(C=this.fetchRawTile(d,g,y,t),re(v,null,_,C));const S=await C;if((0,o.Wi)(S)||!S.pixels?.length)return{location:f,value:null};const k=x*b+w;return this._processIdentifyResult(S,{srcLocation:f,position:k,pyramidLevel:d,useTransposedTile:m,requestSomeSlices:l,identifyOptions:t})}async fetchPixels(e,t,r,i={}){if(e=(0,Y.kZ)(e),(i=this._getRequestOptionsWithSliceId(i)).requestRawData)return this._fetchPixels(e,t,r,i);const s=(0,Y.ut)(e.spatialReference),n=(0,Y.Hq)(e);if((0,o.Wi)(s)||0===n||1===n&&this._isGlobalWrappableSource)return this._fetchPixels(e,t,r,i);if(n>=3)return{extent:e,pixelBlock:null};const a=[],{xmin:l,xmax:c}=e,u=Math.round(s/(c-l)*t),h=u-Math.round((s/2-l)/(c-l)*t);let f=0;const d=[];for(let o=0;o<=n;o++){const m=new N.Z({xmin:0===o?l:-s/2,xmax:o===n?c-s*o:s/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),p=0===o?u-h:o===n?t-f:u;f+=p,d.push(p);const g=i.disableWrapAround&&o>0?null:this._fetchPixels(m,p,r,i);a.push(g)}const m=(await Promise.all(a)).map((e=>e?.pixelBlock));let p=null;const g={width:t,height:r};return p=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:g,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:d},i)).pixelBlock:(0,se.us)(m,g,{blockWidths:d}),{extent:e,srcExtent:(0,Y.tB)(e,this.rasterInfo.spatialReference,i.datumTransformation),pixelBlock:p}}async fetchRawPixels(e,t,r,i={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const s=await this._fetchRawTiles(e,t,r,i),{nativeExtent:n,nativePixelSize:a,storageInfo:l}=this.rasterInfo,c=2**e,u=a.x*c,h=a.y*c,f=new N.Z({xmin:n.xmin+u*t.x,xmax:n.xmin+u*(t.x+r.width-1),ymin:n.ymax-h*(t.y+r.height-1),ymax:n.ymax-h*t.y,spatialReference:n.spatialReference});if(!s)return{extent:f,srcExtent:f,pixelBlock:null};const{pixelBlocks:d,mosaicSize:m}=s;if(1===d.length&&(0,o.pC)(d[0])&&d[0].width===r.width&&d[0].height===r.height)return{extent:f,srcExtent:f,pixelBlock:s.pixelBlocks[0]};const p=e>0?l.pyramidBlockWidth:l.blockWidth,g=e>0?l.pyramidBlockHeight:l.blockHeight,y={x:t.x%p,y:t.y%g};let x;return x=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:m,destDimension:r,clipOffset:y,clipSize:r,coefs:null,sampleSpacing:null,interpolation:i.interpolation,alignmentInfo:null,blockWidths:null},i)).pixelBlock:(0,se.us)(d,m,{clipOffset:y,clipSize:r}),{extent:f,srcExtent:f,pixelBlock:x}}fetchRawTile(e,t,r,i){throw new a.Z("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,Y.tB)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,ie.J)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,r){const{customFetchParameters:i}=this.ioConfig,{range:s,query:n,headers:a}=t;r=r??t.retryCount??this.ioConfig.retryCount;const o=s?{Range:`bytes=${s.from}-${s.to}`}:null;try{return await(0,w.default)(e,{...t,query:{...n,...i},headers:{...a,...o}})}catch(i){if(r>0)return r--,this.request(e,t,r);throw i}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;if((0,o.Wi)(t))return null;if((0,o.Wi)(e)||0===e.length)return null;let r=0;const i=e[0].variableName;for(let s=0;s<t.variables.length;s++){const n=t.variables[s],a=n.dimensions;if(n.name!==i){r+=a.map((e=>this._getDimensionValuesCount(e))).reduce(((e,t)=>e+t));break}const o=a.map((e=>this._getDimensionValuesCount(e))),l=a.length;for(let t=0;t<l;t++){const i=e.find((e=>e.dimensionName===a[t].name));if(null==i)return null;const s=Array.isArray(i.values[0])?i.values[0][0]:i.values[0],n=this._getIndexFromDimensions(s,a[t]);if(-1===n)return null;o.shift(),r+=t===l-1?n:n*o.reduce(((e,t)=>e+t))}}return r}getTileExtentFromTileInfo(e,t,r,i){const s=i.lodAt(e);return this.getTileExtent({x:s.resolution,y:s.resolution},t,r,i.origin,i.spatialReference,i.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:r,pixelSize:i}=this.rasterInfo;if(!e.tileInfo){const s=[],n=e.maximumPyramidLevel||0;let a=Math.max(i.x,i.y),o=1/.0254*96*a;for(let e=0;e<=n;e++)s.push({level:n-e,resolution:a,scale:o}),a*=2,o*=2;const l=new K.Z({x:r.xmin,y:r.ymax,spatialReference:t});e.tileInfo=new R.Z({origin:l,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:s}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,r=512,i){const{width:s,height:n,nativeExtent:a,pixelSize:o,spatialReference:l}=e,c=new K.Z({x:a.xmin,y:a.ymax,spatialReference:l});null==i&&(i=Math.max(0,Math.round(Math.log(Math.max(s,n))/Math.LN2-8)));const u=this.computeBlockBoundary(a,512,512,{x:a.xmin,y:a.ymax},[o],i);e.storageInfo=new G.Z({blockWidth:t,blockHeight:r,pyramidBlockWidth:t,pyramidBlockHeight:r,origin:c,firstPyramidLevel:1,maximumPyramidLevel:i,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,r,i,s,n=0,a=2){if(1===s.length&&n>0){s=[...s];let{x:e,y:t}=s[0];for(let r=0;r<n;r++)e*=a,t*=a,s.push({x:e,y:t})}const o=[],{x:l,y:c}=i;for(let i=0;i<s.length;i++){const{x:n,y:a}=s[i];o.push({minCol:Math.floor((e.xmin-l+.1*n)/t/n),maxCol:Math.floor((e.xmax-l-.1*n)/t/n),minRow:Math.floor((c-e.ymax+.1*a)/r/a),maxRow:Math.floor((c-e.ymin-.1*a)/r/a)})}return o}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:r,pyramidScalingFactor:i}=this.rasterInfo.storageInfo;if(0===e)return t;if((0,o.pC)(r)&&r.length)return r[e-1];const s=i**e;return{x:t.x*s,y:t.y*s}}identifyPixelLocation(e,t,r,i){const{spatialReference:s,nativeExtent:n,storageInfo:a}=this.rasterInfo,{maximumPyramidLevel:l,origin:c,transposeInfo:u}=a,h=i&&(0,o.pC)(u)?u.tileSize[0]:a.blockWidth,f=i&&(0,o.pC)(u)?u.tileSize[1]:a.blockHeight,d=(0,Y.nF)(e,s,r);if(!n.intersects(d))return null;if(t<0||t>l)return null;const m=this.getPyramidPixelSize(t),{x:p,y:g}=m,y=(c.y-d.y)/g/f,x=(d.x-c.x)/p/h,w=Math.min(f-1,Math.floor((y-Math.floor(y))*f)),b=Math.min(h-1,Math.floor((x-Math.floor(x))*h));return{pyramidLevel:t,row:Math.floor(y),col:Math.floor(x),rowOffset:w,colOffset:b,blockWidth:h,srcLocation:d}}getTileExtent(e,t,r,i,s,n){const[a,o]=n,l=i.x+r*a*e.x,c=l+a*e.x,u=i.y-t*o*e.y,h=u-o*e.y;return new N.Z({xmin:l,xmax:c,ymin:h,ymax:u,spatialReference:s})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,r){const i=this.rasterInfo.storageInfo.blockBoundary[e];return!i||i.maxRow<t||i.maxCol<r||i.minRow>t||i.minCol>r}async _fetchPixels(e,t,r,i={}){let s=(0,Y.Hq)(e);if(s>=2)return{extent:e,pixelBlock:null};const n=this._getSourceDataInfo(e,t,r,i),{pyramidLevel:a,pyramidResolution:l,srcResolution:c,srcExtent:u,srcWidth:h,srcHeight:f}=n;if(0===h||0===f)return{extent:e,srcExtent:u,pixelBlock:null};const d=(0,o.Wg)(this.rasterInfo.transform),m="gcs-shift"===d?.type,p=(0,o.pC)((0,Y.ut)(e.spatialReference));!m&&p||(s=(0,Y.Hq)(n.srcExtent,m));const g=this.rasterInfo.storageInfo,y={x:Math.floor((u.xmin-g.origin.x)/l.x+.1),y:Math.floor((g.origin.y-u.ymax)/l.y+.1)},x=await this._fetchRawTiles(a,y,{width:h,height:f,wrapCount:s},i);if(!x)return{extent:e,srcExtent:u,pixelBlock:null};const w=a>0?g.pyramidBlockWidth:g.blockWidth,b=a>0?g.pyramidBlockHeight:g.blockHeight,I=w===h&&b===f&&y.x%w==0&&y.y%b==0,v=new K.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference}),_=!e.spatialReference.equals(this.rasterInfo.spatialReference),{datumTransformation:C}=i;if(!_&&I&&1===x.pixelBlocks.length&&w===t&&b===r&&c.x===v.x&&c.y===v.y)return{extent:e,srcExtent:u,pixelBlock:x.pixelBlocks[0]};const S=p&&(0,o.pC)((0,Y.ut)(u.spatialReference)),k=i.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");k&&!this.rasterJobHandler&&await(0,Y.zD)();const R=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:v.toJSON(),datumTransformation:C,rasterTransform:d,hasWrapAround:s>0||S,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:k},i):(0,Y.Qp)({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:v,datumTransformation:C,rasterTransform:d,hasWrapAround:s>0||S,isAdaptive:!1,includeGCSGrid:k});let T;const P=!i.requestRawData,M={rows:R.spacing[0],cols:R.spacing[1]},D=(0,o.Wg)(this._getRasterTileAlignmentInfo(a,x.extent.xmin)),{pixelBlocks:O,mosaicSize:F,isPartiallyFilled:N}=x;let B=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:O,srcMosaicSize:F,destDimension:P?{width:t,height:r}:null,coefs:P?R.coefficients:null,sampleSpacing:P?M:null,projectDirections:k,gcsGrid:k?R.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:i.interpolation,alignmentInfo:D,blockWidths:null},i);({pixelBlock:T,localNorthDirections:B}=e)}else{const e=(0,se.us)(O,F,{alignmentInfo:D});T=P?(0,se.Uk)(e,{width:t,height:r},R.coefficients,M,i.interpolation):e,k&&R.gcsGrid&&(B=(0,se.Qh)({width:t,height:r},R.gcsGrid),T=(0,E.xQ)(T,this.rasterInfo.dataType,B))}return i.requestRawData||k?{srcExtent:u,pixelBlock:T,transformGrid:R,localNorthDirections:B,extent:e,isPartiallyFilled:N}:{srcExtent:u,extent:e,pixelBlock:T}}async _fetchRawTiles(e,t,r,i){const{origin:s,blockBoundary:n}=this.rasterInfo.storageInfo,{blockWidth:a,blockHeight:l}=this.getBlockWidthHeight(e);let{x:c,y:u}=t,{width:h,height:f,wrapCount:d}=r;const m=this._getRasterTileAlignmentInfo(e,0);i.buffer&&(c-=i.buffer.cols,u-=i.buffer.rows,h+=2*i.buffer.cols,f+=2*i.buffer.rows);let p=0,g=0,y=0;d&&(0,o.pC)(m)&&(({worldColumnCountFromOrigin:g,originColumnOffset:y,rightPadding:p}=m),g*m.blockWidth-p>=c+h&&(p=0));const x=Math.floor(c/a),w=Math.floor(u/l),b=Math.floor((c+h+p-1)/a),I=Math.floor((u+f+p-1)/l),v=n[e];if(!v)return null;const{minRow:_,minCol:C,maxCol:S,maxRow:k}=v;if(0===d&&(I<_||b<C||w>k||x>S))return null;const R=new Array;let T=!1;const P=null==this.ioConfig.allowPartialFill?i.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=w;t<=I;t++)for(let r=x;r<=b;r++){let s=r;if(!i.disableWrapAround&&d&&(0,o.pC)(m)&&g<=r&&(s=r-g-y),t>=_&&s>=C&&k>=t&&S>=s){const r=this._fetchRawTile(e,t,s,i);P?R.push(new Promise((e=>{r.then((t=>e(t))).catch((()=>{T=!0,e(null)}))}))):R.push(r)}else R.push(null)}if(0===R.length)return null;const M=await Promise.all(R),E={height:(I-w+1)*l,width:(b-x+1)*a},{spatialReference:D}=this.rasterInfo,O=this.getPyramidPixelSize(e),{x:F,y:B}=O;return{extent:new N.Z({xmin:s.x+x*a*F,xmax:s.x+(b+1)*a*F,ymin:s.y-(I+1)*l*B,ymax:s.y-w*l*B,spatialReference:D}),pixelBlocks:M,mosaicSize:E,isPartiallyFilled:T}}_fetchRawTile(e,t,r,i){const s=this.rasterInfo.storageInfo.blockBoundary[e];if(!s)return Promise.resolve(null);const{minRow:n,minCol:a,maxCol:l,maxRow:u}=s;if(t<n||r<a||t>u||r>l)return Promise.resolve(null);const h=ee(this.url,i.sliceId),f=`${e}/${t}/${r}`;let d=te(h,i.registryId,f);if((0,o.Wi)(d)){const s=new AbortController;d=this.fetchRawTile(e,t,r,{...i,signal:s.signal}),re(h,i.registryId,f,d,s),d.catch((()=>function(e,t,r){if(!X.has(e))return void(null==t&&Q.deleteBlock(e,r));const i=X.get(e);null!=i[t]?i[t].cache.delete(r):Q.deleteBlock(e,r)}(h,i.registryId,f)))}return i.signal&&(0,c.fu)(i,(()=>{!function(e,t,r){if(!X.has(e))return null==t?Q.decreaseRefCount(e,r):0;const i=X.get(e);if(null==i[t])return Q.decreaseRefCount(e,r);const s=i[t].cache;if(s.has(r)){const e=s.get(r);if(e.refCount--,0===e.refCount){s.delete(r);for(let e=0;e<i.length;e++)i[e]&&i[e].cache.has(r)&&i[e].cache.delete(r);e.controller&&e.controller.abort()}e.refCount}}(h,i.registryId,f)})),d}_computeMagDirValues(e){const{bandCount:t,dataType:r}=this.rasterInfo;if((2!==t||"vector-magdir"!==r)&&"vector-uv"!==r||2!==e?.length||!e[0]?.length)return null;const i=e[0].length;if("vector-magdir"===r){const t=e[1].map((e=>(e+360)%360));return[e[0],t]}const[s,n]=e,a=[],o=[];for(let e=0;e<i;e++){const[t,r]=(0,E.Tg)([s[e],n[e]]);a.push(t),o.push(r)}return[a,o]}_getIndexFromDimensions(e,t){const{extent:r,interval:i,unit:s,values:n}=t;if(n?.length)return Array.isArray(n[0])?n.findIndex((t=>t[0]<=e&&t[1]>=e)):n.indexOf(e);if(e>r[1])return-1;const a=r[0];let o=-1;if("ISO8601"===s){switch(t.intervalUnit?.toLowerCase()||"seconds"){case"seconds":o=Math.round((e-a)/1e3/i);break;case"minutes":o=Math.round((e-a)/6e4/i);break;case"hours":o=Math.round((e-a)/36e5/i);break;case"days":o=Math.round((e-a)/864e5/i);break;case"years":o=Math.round((new Date(e).getUTCFullYear()-new Date(a).getUTCFullYear())/i);break;case"decades":o=Math.round((new Date(e).getUTCFullYear()-new Date(a).getUTCFullYear())/10/i)}return o}return Math.round((e-a)/i)}_getDimensionValuesCount(e){const{extent:t,interval:r,unit:i,values:s}=e;let n=s?.length||0;if(n)return n;const a=t[0];if(0===n&&"ISO8601"===i){switch(e.intervalUnit?.toLowerCase()||"seconds"){case"seconds":n=Math.round((t[1]-t[0])/1e3/r);break;case"minutes":n=Math.round((t[1]-t[0])/6e4/r);break;case"hours":n=Math.round((t[1]-t[0])/36e5/r);break;case"days":n=Math.round((t[1]-t[0])/864e5/r);break;case"years":n=Math.round((new Date(t[1]).getUTCFullYear()-new Date(a).getUTCFullYear())/r);break;case"decades":n=Math.round((new Date(t[1]).getUTCFullYear()-new Date(a).getUTCFullYear())/10/r)}return n}return Math.round((t[1]-t[0])/r)}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlighmentInfo&&(this._rasterTileAlighmentInfo=(0,Y.P_)(this.rasterInfo)),(0,o.Wi)(this._rasterTileAlighmentInfo.pyramidsInfo)?null:{startX:t,halfWorldWidth:this._rasterTileAlighmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlighmentInfo.hasGCSSShiftTransform,...this._rasterTileAlighmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,r,i={}){const s={datumTransformation:i.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0};i.srcResolution&&(s.srcResolution=i.srcResolution,this._updateSourceDataInfo(e,s));const n=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:a,srcHeight:o,pyramidLevel:l}=s,c=a/t,u=o/r,h=l<n&&c*u>=16;if(h||l===n&&(c>8||u>8)||0===a||0===o){const a=new K.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference});let o=(0,Y.VO)(a,this.rasterInfo.spatialReference,e,s.datumTransformation);const f=!o||i.srcResolution&&o.x+o.y<i.srcResolution.x+i.srcResolution.y;if(h&&i.srcResolution&&f){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(n-l+3>=e){const t=2**e;o={x:i.srcResolution.x*t,y:i.srcResolution.y*t}}}o&&(s.srcResolution=o,this._updateSourceDataInfo(e,s))}return(s.srcWidth/t>8||s.srcHeight/r>8)&&(s.srcWidth=0,s.srcHeight=0),s}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const r=this.rasterInfo.spatialReference,{srcResolution:i,datumTransformation:s}=t,{pyramidLevel:n,pyramidResolution:a,excessiveReading:l}=(0,Y.kr)(i,this.rasterInfo,this.ioConfig.sampling);if(l)return;let c=t.srcExtent||(0,Y.tB)(e,r,s);if(null==c)return;const u=(0,o.Wg)(this.rasterInfo.transform);u&&(c=u.inverseTransform(c)),t.srcExtent=c;const h=Math.ceil((c.xmax-c.xmin)/a.x-.1),f=Math.ceil((c.ymax-c.ymin)/a.y-.1);t.pyramidLevel=n,t.pyramidResolution=a,t.srcWidth=h,t.srcHeight=f}_getRequestOptionsWithSliceId(e){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:r,position:i,pyramidLevel:s,useTransposedTile:n}=t,a=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[i])return{location:r,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if((0,o.Wi)(l)||!n){const t=e.pixels.map((e=>e[i])),n={location:r,value:t,pyramidLevel:s},a=this._computeMagDirValues(t.map((e=>[e])));return a?.length&&(n.magdirValue=a.map((e=>e[0]))),n}let c=e.pixels.map((e=>Array.prototype.slice.call(e,i*a,i*a+a))),u=this._computeMagDirValues(c);const{requestSomeSlices:h,identifyOptions:f}=t;let d=P(l,f.transposedVariableName);if(h){const e=function(e,t,r){let i=e;if(t&&(t=[...t].sort(((e,t)=>e.dimensionName<t.dimensionName?-1:1))).forEach((({dimensionName:e,values:t,isSlice:r})=>{t.length&&(i=i.filter((i=>{const s=i.multidimensionalDefinition.find((t=>t.dimensionName===e));if(null==s)return!1;const n=s.values[0];return"number"==typeof n?"number"==typeof t[0]?t.includes(n):t.some((e=>e[0]<=n&&e[1]>=n)):"number"==typeof t[0]?t.some((e=>n[0]<=e&&n[1]>=e)):r?t.some((e=>e[0]===n[0]&&e[0]===n[1])):t.some((e=>e[0]>=n[0]&&e[0]<=n[1]||e[1]>=n[0]&&e[1]<=n[1]||e[0]<n[0]&&e[1]>n[1]))})))})),i.length&&r&&(0,o.pC)(r.start)&&(0,o.pC)(r.end)){const e=r.start.getTime(),t=r.end.getTime(),s=i[0].multidimensionalDefinition.findIndex((e=>"StdTime"===e.dimensionName));s>-1&&(i=i.filter((r=>{const i=r.multidimensionalDefinition[s].values[0];return e<=i&&t>=i})))}return i.map((e=>e.sliceId))}(d,(0,o.Wg)(f.multidimensionalDefinition),(0,o.Wg)(f.timeExtent));c=c.map((t=>e.map((e=>t[e])))),u=u?.map((t=>e.map((e=>t[e])))),d=e.map((e=>d[e]))}return{location:r,value:null,dataSeries:d.map(((e,t)=>{const r={value:c.map((e=>e[t])),multidimensionalDefinition:e.multidimensionalDefinition,variableName:e.multidimensionalDefinition[0].variableName,dimensionValues:{}};return u?.length&&(r.magdirValue=[u[0][t],u[1][t]]),e.multidimensionalDefinition.forEach((e=>r.dimensionValues[e.dimensionName]=e.values[0])),r})),pyramidLevel:s}}};(0,i._)([(0,h.Cb)()],ne.prototype,"_rasterTileAlighmentInfo",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],ne.prototype,"_isGlobalWrappableSource",null),(0,i._)([(0,h.Cb)(C.HQ)],ne.prototype,"url",null),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],ne.prototype,"datasetName",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],ne.prototype,"datasetFormat",void 0),(0,i._)([(0,h.Cb)()],ne.prototype,"rasterInfo",void 0),(0,i._)([(0,h.Cb)()],ne.prototype,"ioConfig",void 0),(0,i._)([(0,h.Cb)()],ne.prototype,"sourceJSON",void 0),ne=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.BaseRaster")],ne);const ae=ne;var oe=r(20095);function le(e){const t=e.fields,r=e.records,i=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",s=[{name:i,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),n=s.map((e=>e.name)),a=[];let o=0,l=0;return r.forEach((e=>{const t={};for(t[i]=o++,l=1;l<n.length;l++)t[n[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:s,features:a}}var ce=r(87521),ue=r(74889);const he=new Map;he.set("int16","esriFieldTypeSmallInteger"),he.set("int32","esriFieldTypeInteger"),he.set("int64","esriFieldTypeInteger"),he.set("float32","esriFieldTypeSingle"),he.set("float64","esriFieldTypeDouble"),he.set("text","esriFieldTypeString");let fe=class extends ae{constructor(){super(...arguments),this.storageInfo=null,this.datasetFormat="CRF"}async open(e){await this.init();const{data:t}=await this.request(this.url+"/conf.json",{signal:e?.signal});if(!this._validateHeader(t))throw new a.Z("cloudraster:open","Invalid or unsupported conf.json.");this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{storageInfo:r,rasterInfo:i}=this._parseHeader(t);if("thematic"===i.dataType){const e=await this._fetchAuxiliaryInformation();i.attributeTable=e}this._set("storageInfo",r),this._set("rasterInfo",i),this.ioConfig.retryCount=this.ioConfig.retryCount||0}async fetchRawTile(e,t,r,i={}){const{transposeInfo:s}=this.rasterInfo.storageInfo,{transposedVariableName:n}=i,a=!(!s||!n),o=a?0:this.rasterInfo.storageInfo.maximumPyramidLevel-e;if(o<0)return null;const l=this._buildCacheFilePath(o,t,r,i.multidimensionalDefinition,n),c=this._getIndexRecordFromBundle(t,r,a),u=await this.request(l,{range:{from:0,to:this.storageInfo.headerSize-1},responseType:"array-buffer",signal:i.signal});if(!u)return null;const h=new Uint8Array(u.data),f=this._getTileEndAndContentType(h,c);if(0===f.recordSize)return null;const d=await this.request(l,{range:{from:f.position,to:f.position+f.recordSize},responseType:"array-buffer",signal:i.signal});if(!d)return null;const[m,p]=this._getTileSize(a);return this.decodePixelBlock(d.data,{width:m,height:p,planes:null,pixelType:null,returnPixelInterleavedDims:a})}_validateHeader(e){return e&&"RasterInfo"===e.type&&!["origin","extent","geodataXform","LODInfos","blockWidth","blockHeight","bandCount","pixelType","pixelSizeX","pixelSizeY","format","packetSize"].some((t=>!e[t]))}_parseHeader(e){const t=["u1","u2","u4","u8","s8","u16","s16","u32","s32","f32","f64"][e.pixelType],{bandCount:r,histograms:i,colormap:s,blockWidth:n,blockHeight:a,firstPyramidLevel:o,maximumPyramidLevel:l}=e,c=e.statistics&&e.statistics.map((e=>({min:e.min,max:e.max,avg:e.mean,stddev:e.standardDeviation,median:e.median,mode:e.mode}))),u=e.extent.spatialReference,h=e.geodataXform?.spatialReference,f=new B.Z(u?.wkid||u?.wkt?u:h);let d=new N.Z({xmin:e.extent.xmin,ymin:e.extent.ymin,xmax:e.extent.xmax,ymax:e.extent.ymax,spatialReference:f});const m=new K.Z({x:e.pixelSizeX,y:e.pixelSizeY,spatialReference:f}),p=Math.round((d.xmax-d.xmin)/m.x),g=Math.round((d.ymax-d.ymin)/m.y),y=this._parseTransform(e.geodataXform),x=y?d:null;y&&(d=y.forwardTransform(d),m.x=(d.xmax-d.xmin)/p,m.y=(d.ymax-d.ymin)/g);const w=e.properties??{},b=e.format.toLowerCase().replace("cache/",""),I=new K.Z(e.origin.x,e.origin.y,f);let v,_,C,S;if(s&&s.colors)for(v=[],_=0;_<s.colors.length;_++)C=s.colors[_],S=s.values?s.values[_]:_,v.push([S,255&C,C<<16>>>24,C<<8>>>24,C>>>24]);const k=e.LODInfos,T=[];for(_=0;_<k.levels.length;_++)T.push({level:k.levels[_],resolution:k.resolutions[_],scale:96/.0254*k.resolutions[_]});const P=new R.Z({dpi:96,lods:T,format:b,origin:I,size:[n,a],spatialReference:f}),M={recordSize:8,packetSize:e.packetSize,headerSize:e.packetSize*e.packetSize*8+64},E=[{maxCol:Math.ceil(p/n)-1,maxRow:Math.ceil(g/a)-1,minCol:0,minRow:0}];let D=2;if(l>0)for(_=0;_<l;_++)E.push({maxCol:Math.ceil(p/D/n)-1,maxRow:Math.ceil(g/D/a)-1,minCol:0,minRow:0}),D*=2;const O=e.mdInfo;let F=null;if(O&&w._yxs){const e=w._yxs;F={packetSize:e.PacketSize,tileSize:[e.TileXSize,e.TileYSize]}}return{storageInfo:M,rasterInfo:new q.Z({width:p,height:g,pixelType:t,bandCount:r,extent:d,nativeExtent:x,transform:y,spatialReference:f,pixelSize:m,keyProperties:w,statistics:c,histograms:i,multidimensionalInfo:O,colormap:v,storageInfo:new G.Z({blockWidth:n,blockHeight:a,pyramidBlockWidth:n,pyramidBlockHeight:a,origin:I,tileInfo:P,transposeInfo:F,firstPyramidLevel:o,maximumPyramidLevel:l,blockBoundary:E})})}}_parseTransform(e){if(!(0,ce.j)(e))throw new a.Z("cloudraster:open","the data contains unsupported geodata transform types");const t=(0,ce.c)(e);if("identity"===t.type)return null;if("polynomial"!==t.type||!t.forwardCoefficients?.length||!t.inverseCoefficients?.length)throw new a.Z("cloudraster:open","the data contains unsupported geodata transforms - both forward and inverse coefficients are required currently");return t}async _fetchAuxiliaryInformation(e){const t=this.request(this.url+"/conf.vat.json",{signal:e}).then((e=>e.data)).catch((()=>null)),r=this.request(this.url+"/conf.vat.dbf",{responseType:"array-buffer",signal:e}).then((e=>e.data)).catch((()=>null)),i=await Promise.all([t,r]);let s;if(i[0]){let e=i[0].fields;const t=i[0].values;if(e&&t){e=e.map((e=>({type:"OID"===e.name?"esriFieldTypeOID":he.get(e.type),name:e.name,alias:e.alias||e.name})));const r=t.map((e=>({attributes:e})));e&&t&&(s={fields:e,features:r})}}return!s&&i[1]&&(s=class{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),r=3&t.getUint8(0);if(3!==r)return{header:{version:r},recordSet:null};const i=t.getUint32(4,!0),s=t.getUint16(8,!0),n=t.getUint16(10,!0),a={version:r,recordCount:i,headerByteCount:s,recordByteCount:n};let o=32;const l=[],c=[];let u;if(3===r){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,oe.f)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<i&&e.byteLength-o>n;){const r=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)r.push((0,oe.f)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)r.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)r.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const i=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();r.push(new Date(parseInt(i.substring(0,4),10),parseInt(i.substring(4,6),10)-1,parseInt(i.substring(6,8),10)))}o+=t.length})),c.push(r)):o+=n}}return{header:a,fields:l,records:c,recordSet:le({fields:l,records:c})}}}.parse(i[1]).recordSet),ue.default.fromJSON(s)}_buildCacheFilePath(e,t,r,i,s){const n=this._getPackageSize(!!s),a=Math.floor(t/n)*n,l=Math.floor(r/n)*n,c="R"+this._toHexString4(a)+"C"+this._toHexString4(l);let u="L";u+=e>=10?e.toString():"0"+e.toString();const{multidimensionalInfo:h}=this.rasterInfo,f=i?.[0];if((0,o.Wi)(h)||!f)return`${this.url}/_alllayers/${u}/${c}.bundle`;let d="_yxs";if(!s){d=h.variables.find((e=>e.name===f.variableName)).dimensions[0].values.indexOf(f.values[0]).toString(16);const e=4-d.length;for(let t=0;t<e;t++)d="0"+d;d="S"+d}const m=this._getVariableFolderName(s||f.variableName);return`${this.url}/_alllayers/${m}/${d}/${u}/${c}.bundle`}_getPackageSize(e=!1){const{transposeInfo:t}=this.rasterInfo.storageInfo;return e&&(0,o.pC)(t)?t.packetSize:this.storageInfo.packetSize}_getTileSize(e=!1){const{storageInfo:t}=this.rasterInfo,{transposeInfo:r}=t;return e&&(0,o.pC)(r)?r.tileSize:t.tileInfo.size}_getVariableFolderName(e){return""===(e=e.trim())?"_v":e.replace(/[\{|\}\-]/g,"_").replace("\\*","_v")}_getIndexRecordFromBundle(e,t,r=!1){const i=this._getPackageSize(r),s=i*(e%i)+t%i;if(s<0)throw"Invalid level / row / col";return 20+s*this.storageInfo.recordSize+44}_getTileEndAndContentType(e,t){const r=e.subarray(t,t+8);let i,s=0;for(i=0;i<5;i++)s|=(255&r[i])<<8*i;const n=0xffffffffff&s;for(s=0,i=5;i<8;i++)s|=(255&r[i])<<8*(i-5);return{position:n,recordSize:0xffffffffff&s}}_toHexString4(e){let t=e.toString(16);if(4!==t.length){let e=4-t.length;for(;e-- >0;)t="0"+t}return t}};(0,i._)([(0,h.Cb)({readOnly:!0})],fe.prototype,"storageInfo",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],fe.prototype,"datasetFormat",void 0),fe=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.CloudRaster")],fe);const de=fe;var me=r(15612);let pe=class extends ae{constructor(){super(...arguments),this.datasetFormat="MEMORY"}async open(e){await this.init();const{pixelBlock:t,statistics:r,histograms:i,name:s,keyProperties:n,nativeExtent:a,transform:o}=this.data,{width:l,height:c,pixelType:u}=t,h=this.data.extent||new N.Z({xmin:-.5,ymin:.5,xmax:l-.5,ymax:c-.5,spatialReference:new B.Z({wkid:3857})}),f=this.data.isPseudoSpatialReference??!this.data.extent,d={x:h.width/l,y:h.height/c},m=new q.Z({width:l,height:c,pixelType:u,extent:h,nativeExtent:a,transform:o,pixelSize:d,spatialReference:h.spatialReference,bandCount:3,keyProperties:n||{},statistics:r,isPseudoSpatialReference:f,histograms:i});this.createRemoteDatasetStorageInfo(m,512,512),this._set("rasterInfo",m),this.updateTileInfo(),await this._buildInMemoryRaster(t,{width:512,height:512},e),this.datasetName=s,this.url="/InMemory/"+s}fetchRawTile(e,t,r,i={}){const s=this._pixelBlockTiles.get(`${e}/${t}/${r}`);return Promise.resolve(s)}async _buildInMemoryRaster(e,t,r){const i=this.rasterInfo.storageInfo.maximumPyramidLevel,s=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:i},r):Promise.resolve((0,se.Vl)(e,t,i)),n=(0,o.pC)(this.rasterInfo.statistics),l=(0,o.pC)(this.rasterInfo.histograms),u=n&&l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},r):Promise.resolve((0,me.Hv)(e)),h=await(0,c.as)([s,u]);if(!h[0].value&&h[1].value)throw new a.Z("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,n||(this.rasterInfo.statistics=h[1].value?.statistics),l&&(this.rasterInfo.histograms=h[1].value?.histograms)}};(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),(0,i._)([(0,h.Cb)()],pe.prototype,"data",void 0),pe=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.InMemoryRaster")],pe);const ge=pe;function ye(e,t){if(!e||!t)return[];let r=t;t.includes("/")?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const i=[];if(t){const s=ye(e,r);for(let e=0;e<s.length;e++)ye(s[e],t).forEach((e=>i.push(e)));return i}const s=e.getElementsByTagNameNS("*",r);if(!s||0===s.length)return[];for(let e=0;e<s.length;e++)i.push(s[e]||s.item[e]);return i}function xe(e,t){if(!e||!t)return null;let r=t;t.includes("/")?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const i=ye(e,r);return i.length>0?t?xe(i[0],t):i[0]:null}function we(e,t=null){const r=t?xe(e,t):e;let i;return r?(i=r.textContent||r.nodeValue,i?i.trim():null):null}function be(e,t){return function(e,t){const r=ye(e,t),i=[];let s;for(let e=0;e<r.length;e++)s=r[e].textContent||r[e].nodeValue,s&&(s=s.trim(),""!==s&&i.push(s));return i}(e,t).map((e=>Number(e)))}function Ie(e,t){const r=we(e,t);return Number(r)}function ve(e,t){const r=e?.nodeName?.toLowerCase(),i=t.toLowerCase();return r.slice(r.lastIndexOf(":")+1)===i}var _e=r(87390);function Ce(e,t){if(!e||!t)return null;const r=[];for(let i=0;i<e.length;i++)r.push(e[i]),r.push(t[i]);return r}function Se(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new B.Z({wkid:t});if((e=String(e)).startsWith("COMPD_CS")){if(!e.includes("VERTCS")||!e.includes("GEOGCS")&&!e.startsWith("PROJCS"))return null;const r=e.indexOf("VERTCS"),i=e.indexOf("PROJCS"),s=i>-1?i:e.indexOf("GEOGCS");if(-1===s)return null;const n=e.slice(s,e.lastIndexOf("]",r)+1).trim(),a=e.slice(r,e.lastIndexOf("]")).trim();t=ke(n);const o=new B.Z(t?{wkid:t}:{wkt:n}),l=ke(a);return l&&(o.vcsWkid=l),o}return e.startsWith("GEOGCS")||e.startsWith("PROJCS")?(t=ke(e),new B.Z(0!==t?{wkid:t}:{wkt:e})):null}function ke(e){const t=e.replace(/\]/g,"[").replace(/\"/g,"").split("[").map((e=>e.trim())).filter((e=>""!==e)),r=t[t.length-1].split(","),i=r[0]?.toLowerCase();if(("epsg"===i||"esri"===i)&&e.endsWith('"]]')){const e=Number(r[1]);if(!isNaN(e)&&0!==e)return e}return 0}function Re(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if(ve(e,"SRS")){if(!t.spatialReference){const r=we(e);t.spatialReference=Se(r)}}else if(ve(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:r,transform:i}=function(e){const t=xe(e,"GeodataXform"),r=Se(Ie(t,"SpatialReference/WKID")||we(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:r,transform:null};const i=Ie(t,"PolynomialOrder")??1,s=be(t,"CoeffX/Double"),n=be(t,"CoeffY/Double"),a=be(t,"InverseCoeffX/Double"),o=be(t,"InverseCoeffY/Double"),l=Ce(s,n),c=Ce(a,o);return{spatialReference:r,transform:new _e.Z({spatialReference:r,polynomialOrder:i,forwardCoefficients:l,inverseCoefficients:c})}}(e);t.transform=i,t.spatialReference||(t.spatialReference=r)}else ye(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=we(e)));else if(ve(e,"PAMRasterBand")){const r=function(e){const t=Ie(e,"NoDataValue"),r=xe(e,"Histograms/HistItem"),i=Ie(r,"HistMin"),s=Ie(r,"HistMax"),n=Ie(r,"BucketCount"),a=we(r,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;ye(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const h=Ie(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=o&&null!=l?{min:i,max:s,size:n||a.length,counts:a}:null,sourceBandIndex:h,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=r.sourceBandIndex&&null==t.rasterBands[r.sourceBandIndex]?t.rasterBands[r.sourceBandIndex]=r:t.rasterBands.push(r)}}));const r=t.rasterBands;if(r){const e=!!r[0].statistics;t.statistics=e?r.map((e=>e.statistics)):null;const i=!!r[0].histogram;t.histograms=i?r.map((e=>e.histogram)):null}return t}let Te=class extends ae{async open(e){await this.init();const t=await this._fetchData(e);let{spatialReference:r,statistics:i,histograms:s,transform:n}=await this._fetchAuxiliaryData(e);const a=!r;a&&(r=new B.Z({wkid:3857})),s?.length&&null==i&&(i=(0,me.Oh)(s));const{width:o,height:l}=t;let c=new N.Z({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:r});const u=n?n.forwardTransform(c):c;let h=!0;if(n){const e=n.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(n=null,c=u)}const f=new ge({data:{extent:u,nativeExtent:c,transform:n,pixelBlock:t,statistics:i,histograms:s,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a}});await f.open(),this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}fetchRawTile(e,t,r,i={}){return this._inMemoryRaster.fetchRawTile(e,t,r,i)}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),r=(0,ie.y)(t).toUpperCase();if("JPG"!==r&&"PNG"!==r&&"GIF"!==r&&"BMP"!==r)throw new a.Z("image-aux-raster:open","the data is not a supported format");return this._set("datasetFormat",r),await this.decodePixelBlock(t,{format:"jpg",width:1,height:1,useCanvas:!0})}async _fetchAuxiliaryData(e){const t=(0,o.Wg)(e?.signal),r=this.ioConfig.skipExtensions??[],i=r.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),s=this.datasetFormat,n="JPG"===s?"jgw":"PNG"===s?"pgw":"BMP"===s?"bpw":null,a=r.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,c.as)([i,a]);if(t?.aborted)throw(0,c.zE)();const u=Re(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new _e.Z({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],Te.prototype,"datasetFormat",void 0),Te=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.ImageAuxRaster")],Te);const Pe=Te;var Me=r(17452),Ee=r(45322),De=r(56608),Oe=r(29680),Fe=r(26059);let Ne=class extends ae{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer"}async open(e){await this.init();const t=e&&e.signal,r=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});r.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const i=r.data;if(this.sourceJSON=i,!i)throw new a.Z("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!i.tileInfo)throw new a.Z("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=i.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===i.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=i.name.slice(i.name.indexOf("/")+1);const s=await this._fetchRasterInfo({signal:t});if(!(0,o.pC)(s))throw new a.Z("image-server-raster:open","cannot initialize image service");{const e="Map"===this.tileType?(0,Ee.d)(i.tileInfo,i):R.Z.fromJSON(i.tileInfo),{extent:t,pixelSize:r}=s,n=.5/s.width*r.x;let a,o;const l=e.lodAt(Math.max.apply(null,e.lods.map((e=>e.level))));"Map"!==this.tileType&&0!==i.maxScale&&("Raster"===this.tileType?(a=e.lods.find((e=>e.resolution===r.x)),a||(a=e.lods[e.lods.length-1])):(a=e.lods.find((e=>Math.abs(e.scale-i.maxScale)<n)),a||(a=e.lods.filter((e=>e.scale>i.maxScale)).sort(((e,t)=>e.scale>t.scale?1:-1))[0])),r.x=r.y=a.resolution,s.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),s.height=Math.ceil((t.ymax-t.ymin)/r.y-.1)),a||(a=l);const c=e.lodAt(Math.min.apply(null,e.lods.map((e=>e.level))));"Map"===this.tileType?this._levelOffset=e.lods[0].level:0!==i.minScale&&"Elevation"===this.tileType&&(o=e.lods.find((e=>Math.abs(e.scale-i.minScale)<n)),this._levelOffset=o.level-c.level),o||(o=c);const u=Math.max(r.x,r.y);(Math.abs(r.x-r.y)>n||!e.lods.some((e=>Math.abs(e.resolution-u)<n)))&&(r.x=r.y=a.resolution,s.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),s.height=Math.ceil((t.ymax-t.ymin)/r.y-.1));const h=a.level-o.level,[f,d]=e.size,m=[];e.lods.forEach((e=>{e.level>=o.level&&e.level<=a.level&&m.push({x:e.resolution,y:e.resolution})})),m.sort(((e,t)=>e.x-t.x));const p=this.computeBlockBoundary(t,f,d,e.origin,m,h),g=m.length>1?m.slice(1):null;let y;i.transposeInfo&&(y={tileSize:[i.transposeInfo.rows,i.transposeInfo.cols],packetSize:s.keyProperties?._yxs.PacketSize??0}),s.storageInfo=new G.Z({blockWidth:e.size[0],blockHeight:e.size[1],pyramidBlockWidth:e.size[0],pyramidBlockHeight:e.size[1],pyramidResolutions:g,compression:e.format,origin:e.origin,firstPyramidLevel:1,maximumPyramidLevel:h,tileInfo:e,transposeInfo:y,blockBoundary:p}),this._fixGCSShift(s),this._set("rasterInfo",s)}if(i.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:s.storageInfo.tileInfo,parsedUrl:(0,Me.mN)(this.url),url:this.url,tileServers:[],type:"tile"};this._tilemapCache=new De.y({layer:e})}}async fetchRawTile(e,t,r,i={}){const{storageInfo:s,extent:n}=this.rasterInfo,{transposeInfo:a}=s,l=(0,o.pC)(a)&&!!i.transposedVariableName;if(this._slices&&!l&&null==i.sliceId)return null;const c=l?0:s.maximumPyramidLevel-e+this._levelOffset,u=`${this.url}/tile/${c}/${t}/${r}`,h=this._slices?l?{variable:i.transposedVariableName}:{sliceId:i.sliceId||0}:null,{data:f}=await this.request(u,{query:h,responseType:"array-buffer",signal:i.signal});if(!f)return null;const d=l?a.tileSize:s.tileInfo.size,m=await this.decodePixelBlock(f,{width:d[0],height:d[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnPixelInterleavedDims:l}),p=s.blockBoundary[e];if("jpg"!==s.compression||r>p.minCol&&r<p.maxCol&&t>p.minRow&&t<p.maxRow)return m;const{origin:g,blockWidth:y,blockHeight:x}=s,{x:w,y:b}=this.getPyramidPixelSize(e),I=Math.round((n.xmin-g.x)/w)%y,v=Math.round((n.xmax-g.x)/w)%y||y,_=Math.round((g.y-n.ymax)/b)%x,C=Math.round((g.y-n.ymin)/b)%x||x,S=r===p.minCol?I:0,k=t===p.minRow?_:0,R=r===p.maxCol?v:y,T=t===p.maxRow?C:x;return(0,se.pW)(m,{x:S,y:k},{width:R-S,height:T-k}),m}getSliceIndex(e){if(!this._slices||(0,o.Wi)(e)||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const r=this._slices[e].multidimensionalDefinition;if(r.length===t.length&&!r.some((e=>{const r=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!r||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(r.values[0])?`${r.values[0][0]}-${r.values[0][1]}`:r.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const r=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),i=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([r,i]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let r=this.identifyPixelLocation(e,0,(0,o.Wg)(t.datumTransformation));if(null===r)return null;let i=0;const{maximumPyramidLevel:s}=this.rasterInfo.storageInfo;let n=s-i+this._levelOffset;const a=r.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,r.row,r.col,t))break}catch{}if(n--,i++,r=this.identifyPixelLocation(a,i,(0,o.Wg)(t.datumTransformation)),null===r)return null}return-1===n||null==r?null:i}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=Math.ceil((t.extent.xmax-t.extent.xmin)/t.pixelSizeX-.1),r=Math.ceil((t.extent.ymax-t.extent.ymin)/t.pixelSizeY-.1),i=B.Z.fromJSON(t.spatialReference||t.extent.spatialReference),s=new K.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:i});return new q.Z({width:e,height:r,bandCount:3,extent:N.Z.fromJSON(t.extent),spatialReference:i,pixelSize:s,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:r}=e,i=(0,Fe.g)(this.url,this.sourceJSON,{signal:r,query:this.ioConfig.customFetchParameters}),s=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:r}).then((e=>e.data&&e.data.slices)).catch((()=>null)):null,n=await Promise.all([i,s]);return this._slices=n[1],n[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_fixGCSShift(e){const{extent:t,spatialReference:r}=e;0===t.xmin&&360===t.xmax&&r.wkid&&r.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Oe.Z,e.extent=e.transform.forwardTransform(t))}};(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],Ne.prototype,"datasetFormat",void 0),(0,i._)([(0,h.Cb)()],Ne.prototype,"tileType",void 0),Ne=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.ImageServerRaster")],Ne);const Be=Ne;var Le=r(54163),ze=r(48279);const Ae=new Map;Ae.set("Int8","s8"),Ae.set("UInt8","u8"),Ae.set("Int16","s16"),Ae.set("UInt16","u16"),Ae.set("Int32","s32"),Ae.set("UInt32","u32"),Ae.set("Float32","f32"),Ae.set("Float64","f32"),Ae.set("Double64","f32");const Ze=new Map;Ze.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Ze.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Ze.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Ze.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let He=class extends ae{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async open(e){await this.init(),this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?(0,o.Wg)(e.signal):null,r=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:i,files:s}=this._parseHeader(r.data);if(-1===this.ioConfig.skipExtensions?.indexOf("aux.xml")){const t=await this._fetchAuxiliaryData(e);null!=t&&(i.statistics=t.statistics??i.statistics,i.histograms=t.histograms,t.histograms&&(0,o.Wi)(i.statistics)&&(i.statistics=(0,me.Oh)(t.histograms)))}this._set("rasterInfo",i),this._files=s;const n=await this.request(s.index,{responseType:"array-buffer",signal:t});this._storageIndex=this._parseIndex(n.data);const{blockWidth:a,blockHeight:l}=this.rasterInfo.storageInfo,c=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:u,height:h}=this.rasterInfo,f=[],d=this._getBandSegmentCount();let m=0,p=-1;for(;m<this._storageIndex.length;){p++;const e=Math.ceil(u/a/c**p)-1,t=Math.ceil(h/l/c**p)-1;m+=(e+1)*(t+1)*d*4,f.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=f,p>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=p),this.updateTileInfo()}async fetchRawTile(e,t,r,i={}){const{blockWidth:s,blockHeight:n,blockBoundary:a}=this.rasterInfo.storageInfo,l=a[e];if(!l||l.maxRow<t||l.maxCol<r||l.minRow>t||l.minCol>r)return null;const{bandCount:c,pixelType:u}=this.rasterInfo,{ranges:h,actualTileWidth:f,actualTileHeight:d}=this._getTileLocation(e,t,r);if(!h||0===h.length)return null;if(0===h[0].from&&0===h[0].to){const e=new Uint8Array(s*n);return new Le.Z({width:s,height:n,pixels:null,mask:e,validPixelCount:0})}const{bandIds:m}=this.ioConfig,p=this._getBandSegmentCount(),g=[];let y=0;for(y=0;y<p;y++)(!m||m.indexOf[y]>-1)&&g.push(this.request(this._files.data,{range:{from:h[y].from,to:h[y].to},responseType:"array-buffer",signal:i.signal}));const x=await Promise.all(g),w=x.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),b=new Uint8Array(w);let I=0;for(y=0;y<p;y++)b.set(new Uint8Array(x[y].data),I),I+=x[y].data.byteLength;const v=Ze.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(b.buffer,{width:s,height:n,format:v,planes:m?.length||c,pixelType:u});if((0,o.pC)(this.rasterInfo.noDataValue)&&"lerc"!==v&&!_.mask){const e=this.rasterInfo.noDataValue[0];if(null!=e){const t=_.width*_.height,r=new Uint8Array(t);if(Math.abs(e)>1e24)for(y=0;y<t;y++)Math.abs((_.pixels[0][y]-e)/e)>1e-6&&(r[y]=1);else for(y=0;y<t;y++)_.pixels[0][y]!==e&&(r[y]=1);_.mask=r}}let C=0,S=0;if(f!==s||d!==n){let e=_.mask;if(e)for(y=0;y<n;y++)if(S=y*s,y<d)for(C=f;C<s;C++)e[S+C]=0;else for(C=0;C<s;C++)e[S+C]=0;else for(e=new Uint8Array(s*n),_.mask=e,y=0;y<d;y++)for(S=y*s,C=0;C<f;C++)e[S+C]=1}return _}_parseIndex(e){if(e.byteLength%16>0)throw"invalid array buffer must be multiples of 16";let t,r,i,s,n,a;if(ze.f){for(r=new Uint8Array(e),s=new ArrayBuffer(e.byteLength),i=new Uint8Array(s),n=0;n<e.byteLength/4;n++)for(a=0;a<4;a++)i[4*n+a]=r[4*n+3-a];t=new Uint32Array(s)}else t=new Uint32Array(e);return t}_getBandSegmentCount(){return Ze.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,r){const{blockWidth:i,blockHeight:s,pyramidScalingFactor:n}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,h,f=0,d=0;for(h=0;h<e;h++)d=n**h,c=Math.ceil(a/i/d),u=Math.ceil(o/s/d),f+=c*u;d=n**e,c=Math.ceil(a/i/d),u=Math.ceil(o/s/d),f+=t*c+r,f*=4*l;const m=this._storageIndex.subarray(f,f+4*l);let p=0,g=0;const y=[];for(let e=0;e<l;e++)p=m[4*e+0]*2**32+m[4*e+1],g=p+m[4*e+2]*2**32+m[4*e+3],y.push({from:p,to:g});return{ranges:y,actualTileWidth:r<c-1?i:Math.ceil(a/d)-i*(c-1),actualTileHeight:t<u-1?s:Math.ceil(o/d)-s*(u-1)}}_parseHeader(e){const t=xe(e,"MRF_META/Raster");if(!t)throw new a.Z("mrf:open","not a valid MRF format");const r=xe(t,"Size"),i=parseInt(r.getAttribute("x"),10),s=parseInt(r.getAttribute("y"),10),n=parseInt(r.getAttribute("c"),10),o=(we(t,"Compression")||"none").toLowerCase();if(!Ze.has(o))throw new a.Z("mrf:open","currently does not support compression "+o);const l=we(t,"DataType")||"UInt8",c=Ae.get(l);if(null==c)throw new a.Z("mrf:open","currently does not support pixel type "+l);const u=xe(t,"PageSize"),h=parseInt(u.getAttribute("x"),10),f=parseInt(u.getAttribute("y"),10),d=xe(t,"DataValues");let m,p;if(d&&(p=d.getAttribute("NoData"),null!=p&&(m=p.trim().split(" ").map((e=>parseFloat(e))))),xe(e,"MRF_META/CachedSource"))throw new a.Z("mrf:open","currently does not support MRF referencing other data files");const g=xe(e,"MRF_META/GeoTags"),y=xe(g,"BoundingBox");let x,w=!1;if(null!=y){const e=parseFloat(y.getAttribute("minx")),t=parseFloat(y.getAttribute("miny")),r=parseFloat(y.getAttribute("maxx")),i=parseFloat(y.getAttribute("maxy")),s=we(g,"Projection")||"";let n;if("LOCAL_CS[]"!==s)if(s.toLowerCase().startsWith("epsg:")){const e=Number(s.slice(5));isNaN(e)||0===e||(n=new B.Z({wkid:e}))}else n=Se(s);else w=!0,n=new B.Z({wkid:3857});x=new N.Z(e,t,r,i),x.spatialReference=n}else w=!0,x=new N.Z({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:new B.Z({wkid:3857})});const b=xe(e,"MRF_META/Rsets"),I=parseInt(b&&b.getAttribute("scale")||"2",10),v=x.spatialReference,_=new G.Z({origin:new K.Z({x:x.xmin,y:x.ymax,spatialReference:v}),blockWidth:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:o,pyramidScalingFactor:I}),C=new K.Z({x:x.width/i,y:x.height/s,spatialReference:v}),S=new q.Z({width:i,height:s,extent:x,isPseudoSpatialReference:w,spatialReference:v,bandCount:n,pixelType:c,pixelSize:C,noDataValue:m,storageInfo:_}),k=we(e,"datafile"),R=we(e,"IndexFile");return{rasterInfo:S,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:k||this.url.replace(".mrf",Ze.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return Re(t)}catch{return null}}};(0,i._)([(0,h.Cb)()],He.prototype,"_files",void 0),(0,i._)([(0,h.Cb)()],He.prototype,"_storageIndex",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],He.prototype,"datasetFormat",void 0),He=(0,i._)([(0,p.j)("esri.layers.support.rasterIO.MRFRaster")],He);const We=He;var Je=r(94793),je=r(9832);const Ue=(e,t)=>{const r=e.get(t);return r&&r.values},qe=(e,t)=>{const r=e.get(t);return r&&r.values[0]};let Ge=class extends ae{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async open(e){await this.init();const t=e?(0,o.Wg)(e.signal):null,{data:r}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!r)throw new a.Z("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{littleEndian:i,firstIFD:s,isBigTiff:n}=(0,Je.cK)(r),l=[];await this._readIFDs(l,r,i,s,0,n?8:4,t);const c=(0,Je.FI)(l),{width:u,height:h,tileWidth:f,tileHeight:d,planes:m,pixelType:p,compression:g,firstPyramidLevel:y,maximumPyramidLevel:x,pyramidBlockWidth:w,pyramidBlockHeight:b,tileBoundary:I,affine:v,metadata:_}=c;let C=Se(c.extent.spatialReference?.wkt||c.extent.spatialReference?.wkid),S=!1;null==C&&(S=!0,C=new B.Z({wkid:3857}));const k=new N.Z({...c.extent,spatialReference:C}),R=new K.Z(k?{x:k.xmin,y:k.ymax,spatialReference:C}:{x:0,y:0}),T=new G.Z({blockWidth:f,blockHeight:d,pyramidBlockWidth:w,pyramidBlockHeight:b,compression:g,origin:R,firstPyramidLevel:y,maximumPyramidLevel:x,blockBoundary:I}),P=new K.Z({x:(k.xmax-k.xmin)/u,y:(k.ymax-k.ymin)/h,spatialReference:C}),M=_?{BandProperties:_.bandProperties,DataType:_.dataType}:{},E=new q.Z({width:u,height:h,bandCount:m,pixelType:p,compression:g,pixelSize:P,storageInfo:T,spatialReference:C,isPseudoSpatialReference:S,keyProperties:M,extent:k,statistics:_?_.statistics:null});if(v?.length&&(E.nativeExtent=new N.Z({xmin:-.5,ymin:.5-h,xmax:u-.5,ymax:.5,spatialReference:C}),E.transform=new _e.Z({polynomialOrder:1,forwardCoefficients:[v[2]+v[0]/2,v[5]-v[3]/2,v[0],v[3],-v[1],-v[4]]}),E.extent=E.transform.forwardTransform(E.nativeExtent),E.pixelSize=new K.Z({x:(k.xmax-k.xmin)/u,y:(k.ymax-k.ymin)/h,spatialReference:C}),T.origin.x=-.5,T.origin.y=.5),!this.ioConfig.skipExtensions?.includes("aux.xml")){const t=await this._fetchAuxiliaryData(e);if(null!=t){if(E.statistics=t.statistics??E.statistics,E.histograms=t.histograms,t.histograms&&(0,o.Wi)(E.statistics)&&(E.statistics=(0,me.Oh)(t.histograms)),t.transform&&!v){E.transform=t.transform,E.nativeExtent=E.extent;const e=E.transform.forwardTransform(E.nativeExtent);E.pixelSize=new K.Z({x:(e.xmax-e.xmin)/u,y:(e.ymax-e.ymin)/h,spatialReference:C}),E.extent=e}E.spatialReference||(E.spatialReference=t.spatialReference)}}if(this._set("rasterInfo",E),this._headerInfo={littleEndian:i,isBigTiff:n,ifds:l,...c},!this._headerInfo.isSupported)throw new a.Z("tiffraster:open","this tiff is not supported: "+this._headerInfo.message);this.updateTileInfo()}async fetchRawTile(e,t,r,i={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,r))return null;const s=this._getTileLocation(e,t,r);if(!s)return null;const{ranges:n,actualTileWidth:a,actualTileHeight:o,ifd:l}=s,c=n.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:i.signal}))),u=await Promise.all(c),h=u.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),f=1===u.length?u[0].data:new ArrayBuffer(h),d=[0],m=[0];if(u.length>1){const e=new Uint8Array(f);for(let t=0,r=0;t<u.length;t++){const i=u[t].data;e.set(new Uint8Array(i),r),d[t]=r,r+=i.byteLength,m[t]=i.byteLength}}const{blockWidth:p,blockHeight:g}=this.getBlockWidthHeight(e),y=await this.decodePixelBlock(f,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:l,offsets:d,sizes:m},width:p,height:g,planes:null,pixelType:null});let x,w,b;if(a!==p||o!==g){let e=y.mask;if(e)for(x=0;x<g;x++)if(b=x*p,x<o)for(w=a;w<p;w++)e[b+w]=0;else for(w=0;w<p;w++)e[b+w]=0;else for(e=new Uint8Array(p*g),y.mask=e,x=0;x<o;x++)for(b=x*p,w=0;w<a;w++)e[b+w]=1}return y}async _readIFDs(e,t,r,i,s,n=4,a){if(!i)return null;(i>=t.byteLength||i<0)&&(t=(await this.request(this.url,{range:{from:i+s,to:i+s+this._bufferSize},responseType:"array-buffer",signal:a})).data,s=i+s,i=0);const o=await this._readIFD(t,r,i,s,je.Z.TIFF_TAGS,n,a);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,r,o.nextIFD-s,s,n,a)}async _readIFD(e,t,r,i,s=je.Z.TIFF_TAGS,n=4,a){if(!e)return null;const o=(0,Je.vr)(e,t,r,i,s,n);if(o.success){const r=[];if(o.ifd.forEach((e=>{e.values||r.push(e)})),r.length>0){const s=r.map((e=>e.offlineOffsetSize)),n=Math.min.apply(null,s.map((e=>e[0])));if(Math.min.apply(null,s.map((e=>e[0]+e[1])))-n<=this._bufferSize){const{data:s}=await this.request(this.url,{range:{from:n,to:n+this._bufferSize},responseType:"array-buffer",signal:a});e=s,i=n,r.forEach((r=>(0,Je.Dq)(e,t,r,i)))}}if(o.ifd.has("GEOKEYDIRECTORY")){const r=o.ifd.get("GEOKEYDIRECTORY"),s=r.values;if(s&&s.length>4){const n=s[0]+"."+s[1]+"."+s[2],o=await this._readIFD(e,t,r.valueOffset+6-i,i,je.Z.GEO_KEYS,2,a);r.data=o.ifd,r.data&&r.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const r=await this.request(this.url,{range:{from:i,to:i+o.requiredBufferSize+4},responseType:"array-buffer",signal:a});return(e=r.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,i,je.Z.TIFF_TAGS,4,a)}}_getTileLocation(e,t,r){const{firstPyramidLevel:i,blockBoundary:s}=this.rasterInfo.storageInfo,n=0===e?0:e-(i-1),a=this._headerInfo.ifds[n];if(!a)return null;const o=(0,Je.If)(a,this._headerInfo),l=Ue(a,"TILEOFFSETS");if(void 0===l)return null;const c=Ue(a,"TILEBYTECOUNTS"),{minRow:u,minCol:h,maxRow:f,maxCol:d}=s[n];if(t>f||r>d||t<u||r<h)return null;const m=qe(a,"IMAGEWIDTH"),p=qe(a,"IMAGELENGTH"),g=qe(a,"TILEWIDTH"),y=qe(a,"TILELENGTH"),x=o?this.rasterInfo.bandCount:1,w=x*t*(d+1)+r,b=[{from:l[w],to:l[w+x-1]+c[w+x-1]-1}];if(o){let e=!0;for(let t=0;t<x;t++)if(l[w+t]+c[w+t]!==l[w+t+1]){e=!1;break}if(!e)for(let e=0;e<x;e++)b[e]={from:l[w+e],to:l[w+e]+c[w+e]-1}}const I=l[w],v=c[w];return null==I||null==v?null:{ranges:b,ifd:a,actualTileWidth:r===d?m%g:g,actualTileHeight:t===f?p%y:y}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return Re(t)}catch{return null}}};(0,i._)([(0,h.Cb)()],Ge.prototype,"_files",void 0),(0,i._)([(0,h.Cb)()],Ge.prototype,"_headerInfo",void 0),(0,i._)([(0,h.Cb)()],Ge.prototype,"_bufferSize",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],Ge.prototype,"datasetFormat",void 0),Ge=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.TIFFRaster")],Ge);const $e=Ge,Ve=new Map;Ve.set("CRF",{desc:"Cloud Raster Format",constructor:de}),Ve.set("MRF",{desc:"Meta Raster Format",constructor:We}),Ve.set("TIFF",{desc:"GeoTIFF",constructor:$e}),Ve.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Be}),Ve.set("JPG",{desc:"JPG Raster Format",constructor:Pe}),Ve.set("PNG",{desc:"PNG Raster Format",constructor:Pe}),Ve.set("GIF",{desc:"GIF Raster Format",constructor:Pe}),Ve.set("BMP",{desc:"BMP Raster Format",constructor:Pe});var Ye=r(32163);let Ke=class extends((0,y.h)((0,W.M)((0,A.q)((0,Z.I)((0,x.N)(z((0,J.n)((0,H.Q)((0,l.R)(g.Z)))))))))){constructor(...e){super(...e),this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.title=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,o.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.r9).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[new j.Z({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"})];const t=this.rasterInfo?.attributeTable?.fields;if(t){const r=t.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const t=e.clone();return t.name="Raster."+e.name,t}));e=e.concat(r)}const r=this.rasterInfo.dataType;if(("vector-magdir"===r||"vector-uv"===r)&&(0,o.pC)(this.rasterInfo.multidimensionalInfo)){const t=this.rasterInfo.multidimensionalInfo.variables[0].unit?.trim(),r="Magnitude"+(t?` (${t})`:"");e.push(new j.Z({name:"Raster.Magnitude",alias:r,domain:null,editable:!1,type:"double"})),e.push(new j.Z({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}set renderer(e){this._set("renderer",e),this.updateRenderer()}readRenderer(e,t,r){const i=t&&t.layerDefinition&&t.layerDefinition.drawingInfo&&t.layerDefinition.drawingInfo.renderer,s=(0,n.ij)(i,r)||void 0;if(null!=s)return s}createPopupTemplate(e){return(0,Ye.eZ)({fields:this.rasterFields,title:this.title},e)}write(e,t){const{raster:r}=this;if(this.loaded?"RasterTileServer"===r.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t&&t.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){this.raster?(this.raster.rasterInfo||await this.raster.open(),this.url=this.raster.url):this.raster=await class{static get supportedFormats(){const e=new Set;return Ve.forEach(((t,r)=>e.add(r))),e}static async open(e){const{url:t,ioConfig:r,sourceJSON:i}=e;let s=e.datasetFormat;null==s&&t.lastIndexOf(".")&&(s=t.slice(t.lastIndexOf(".")+1).toUpperCase()),"OVR"===s||"TIF"===s?s="TIFF":"JPG"!==s&&"JPEG"!==s&&"JFIF"!==s||(s="JPG"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(s="RasterTileServer");const n={url:t,sourceJSON:i,datasetFormat:s,ioConfig:r||{bandIds:null,sampling:null}};let o,l;if(this.supportedFormats.has(s))return o=Ve.get(s).constructor,l=new o(n),await l.open({signal:e.signal}),l;if(s)throw new a.Z("rasterfactory:open","not a supported format "+s);const c=Array.from(Ve.keys());let u=0;const h=()=>(s=c[u++],s?(o=Ve.get(s).constructor,l=new o(n),l.open({signal:e.signal}).then((()=>l)).catch((()=>h()))):null);return h()}static register(e,t,r){Ve.has(e.toUpperCase())||Ve.set(e.toUpperCase(),{desc:t,constructor:r})}}.open({url:this.url,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e});const{rasterInfo:t}=this.raster;if(!t)throw new a.Z("imagery-tile-layer:load","cannot load resources on "+this.url);if(this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}null==this.title&&(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.own((0,u.YP)((()=>this.customParameters),(e=>{this.raster.ioConfig.customFetchParameters=e})))}};(0,i._)([(0,h.Cb)({type:[f.z8],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],Ke.prototype,"bandIds",void 0),(0,i._)([(0,h.Cb)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,d.J)(U.c)],Ke.prototype,"interpolation",void 0),(0,i._)([(0,h.Cb)({json:{write:!0}})],Ke.prototype,"multidimensionalDefinition",void 0),(0,i._)([(0,h.Cb)(C.rn)],Ke.prototype,"legendEnabled",void 0),(0,i._)([(0,h.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ke.prototype,"isReference",void 0),(0,i._)([(0,h.Cb)({type:["show","hide"]})],Ke.prototype,"listMode",void 0),(0,i._)([(0,h.Cb)()],Ke.prototype,"sourceJSON",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],Ke.prototype,"version",void 0),(0,i._)([(0,h.Cb)()],Ke.prototype,"title",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],Ke.prototype,"type",void 0),(0,i._)([(0,h.Cb)({type:["ArcGISTiledImageServiceLayer"]})],Ke.prototype,"operationalLayerType",void 0),(0,i._)([(0,h.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],Ke.prototype,"popupEnabled",void 0),(0,i._)([(0,h.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],Ke.prototype,"popupTemplate",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],Ke.prototype,"defaultPopupTemplate",null),(0,i._)([(0,h.Cb)({readOnly:!0,type:[j.Z]})],Ke.prototype,"fields",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,type:[j.Z]})],Ke.prototype,"rasterFields",null),(0,i._)([(0,h.Cb)({types:n.dr,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:n.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],Ke.prototype,"renderer",null),(0,i._)([(0,m.r)("renderer")],Ke.prototype,"readRenderer",null),Ke=(0,i._)([(0,p.j)("esri.layers.ImageryTileLayer")],Ke);const Xe=Ke},74889:(e,t,r)=>{r.r(t),r.d(t,{default:()=>b});var i,s=r(43697),n=r(66577),a=r(38171),o=r(35454),l=r(96674),c=r(22974),u=r(70586),h=r(5600),f=(r(75215),r(71715)),d=r(52011),m=r(30556),p=r(82971),g=r(33955),y=r(1231);const x=new o.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=p.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],n=a.Z.fromJSON(s),o=s.geometry&&s.geometry.spatialReference;(0,u.pC)(n.geometry)&&!o&&(n.geometry.spatialReference=r);const l=s.aggregateGeometries,c=n.aggregateGeometries;if(l&&(0,u.pC)(c))for(const e in c){const t=c[e],i=l[e]?.spatialReference;(0,u.pC)(t)&&!i&&(t.spatialReference=r)}i.push(n)}return i}writeGeometryType(e,t,r,i){if(e)return void x.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&(0,u.pC)(e.geometry))return void x.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,g.im)(e);return!r&&t.spatialReference&&(i.spatialReference=p.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,c.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)a((0,u.Wg)(n[e].geometry))||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,a]}=r,o=this._getHydrationFunction(e,(e=>e*n+i),(e=>s-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&o(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const n=[];for(let a=0,o=e.length;a<o;a++){const o=e[a];if(a>0){const e=t(o[0]),a=r(o[1]);e===i&&a===s||(n.push([e-i,a-s]),i=e,s=a)}else i=t(o[0]),s=r(o[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,g.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],a=this._quantizePoints(n,t,r);a&&s.push(a)}return s.length>0?((0,g.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const i=(0,g.oU)(e)?e.rings:e.paths;let s,n;for(let e=0,a=i.length;e<a;e++){const a=i[e];for(let e=0,i=a.length;e<i;e++){const i=a[e];e>0?(s+=i[0],n+=i[1]):(s=i[0],n=i[1]),i[0]=t(s),i[1]=r(n)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const i=e.points;let s,n;for(let e=0,a=i.length;e<a;e++){const a=i[e];e>0?(s+=a[0],n+=a[1]):(s=a[0],n=a[1]),a[0]=t(s),a[1]=r(n)}}:void 0}};(0,s._)([(0,h.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,s._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,h.Cb)({type:[a.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,s._)([(0,f.r)("features")],w.prototype,"readFeatures",null),(0,s._)([(0,h.Cb)({type:[y.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,s._)([(0,h.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:x.read}}})],w.prototype,"geometryType",void 0),(0,s._)([(0,m.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,s._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,s._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,s._)([(0,h.Cb)({types:n.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,s._)([(0,f.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,s._)([(0,h.Cb)({type:p.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,s._)([(0,m.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,s._)([(0,h.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,s._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7799],{46521:(t,e,n)=>{function o(){return[1,0,0,0,1,0,0,0,1]}function i(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>i,c:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,create:o,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},fromValues:function(t,e,n,o,i,r,s,c,a){return[t,e,n,o,i,r,s,c,a]},createView:i},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function r(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>s,a:()=>r,b:()=>i,c:()=>o});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,create:o,clone:i,fromValues:function(t,e,n,o,i,r,s,c,a,u,d,h,l,_,f,T){return[t,e,n,o,i,r,s,c,a,u,d,h,l,_,f,T]},createView:r,IDENTITY:s},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function o(){return[0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3]]}function r(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>s,a:()=>o,b:()=>i,c:()=>r});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,create:o,clone:i,fromValues:function(t,e,n,o){return[t,e,n,o]},createView:r,IDENTITY:s},Symbol.toStringTag,{value:"Module"}))},2643:(t,e,n)=>{n.d(e,{b:()=>m,c:()=>g,d:()=>p,g:()=>O,i:()=>N,m:()=>x}),n(80442);var o,i,r=n(92604),s=n(22021),c=n(70586),a=n(52138),u=n(17896),d=n(65617),h=n(98766),l=n(88669);(i=o||(o={}))[i.X=0]="X",i[i.Y=1]="Y",i[i.Z=2]="Z";var _=n(78341);(0,d.c)(),(0,d.c)();var f=n(12981);const T=r.Z.getLogger("esri.geometry.support.sphere");function g(){return(0,l.c)()}function m(t,e=g()){return(0,h.c)(e,t)}function p(t){return t[3]}function O(t){return t}function b(t,e,n){if((0,c.Wi)(e))return!1;const{origin:o,direction:i}=e,r=E;r[0]=o[0]-t[0],r[1]=o[1]-t[1],r[2]=o[2]-t[2];const s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2],a=2*(i[0]*r[0]+i[1]*r[1]+i[2]*r[2]),u=a*a-4*s*(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]-t[3]*t[3]);if(u<0)return!1;const d=Math.sqrt(u);let h=(-a-d)/(2*s);const l=(-a+d)/(2*s);return(h<0||l<h&&l>0)&&(h=l),!(h<0||(n&&(n[0]=o[0]+i[0]*h,n[1]=o[1]+i[1]*h,n[2]=o[2]+i[2]*h),0))}const E=(0,d.c)();function N(t,e){return b(t,e,null)}function R(t,e,n){const o=f.WM.get(),i=f.MP.get();(0,u.f)(o,e.origin,e.direction);const r=p(t);(0,u.f)(n,o,e.origin),(0,u.g)(n,n,1/(0,u.l)(n)*r);const c=A(t,e.origin),d=function(t,e){const n=(0,u.e)(t,e)/((0,u.l)(t)*(0,u.l)(e));return-(0,s.ZF)(n)}(e.origin,n);return(0,a.d)(i,d+c,o),(0,u.m)(n,n,i),n}function M(t,e,n){const o=(0,u.b)(f.WM.get(),e,t),i=(0,u.g)(f.WM.get(),o,t[3]/(0,u.l)(o));return(0,u.a)(n,i,t)}function A(t,e){const n=(0,u.b)(f.WM.get(),e,t),o=(0,u.l)(n),i=p(t),r=i+Math.abs(i-o);return(0,s.ZF)(i/r)}const F=(0,d.c)();function I(t,e,n,i){const r=(0,u.b)(F,e,t);switch(n){case o.X:{const t=(0,s.jE)(r,F)[2];return(0,u.s)(i,-Math.sin(t),Math.cos(t),0)}case o.Y:{const t=(0,s.jE)(r,F),e=t[1],n=t[2],o=Math.sin(e);return(0,u.s)(i,-o*Math.cos(n),-o*Math.sin(n),Math.cos(e))}case o.Z:return(0,u.n)(i,r);default:return}}function S(t,e){const n=(0,u.b)(j,e,t);return(0,u.l)(n)-t[3]}function x(t,e){const n=(0,u.d)(t,e),o=p(t);return n<=o*o}const j=(0,d.c)(),P=g();Object.freeze(Object.defineProperty({__proto__:null,create:g,copy:m,fromCenterAndRadius:function(t,e){return(0,l.f)(t[0],t[1],t[2],e)},wrap:function(t){return t},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},getRadius:p,getCenter:O,fromValues:function(t,e,n,o){return(0,l.f)(t,e,n,o)},elevate:function(t,e,n){return t!==n&&(0,u.c)(n,t),n[3]=t[3]+e,n},setExtent:function(t,e,n){return T.error("sphere.setExtent is not yet supported"),t===n?n:m(t,n)},intersectRay:b,intersectsRay:N,intersectRayClosestSilhouette:function(t,e,n){if(b(t,e,n))return n;const o=R(t,e,f.WM.get());return(0,u.a)(n,e.origin,(0,u.g)(f.WM.get(),e.direction,(0,u.i)(e.origin,o)/(0,u.l)(e.direction))),n},closestPointOnSilhouette:R,closestPoint:function(t,e,n){return b(t,e,n)?n:((0,_.JI)(e,t,n),M(t,n,n))},projectPoint:M,distanceToSilhouette:function(t,e){const n=(0,u.b)(f.WM.get(),e,t),o=(0,u.p)(n),i=t[3]*t[3];return Math.sqrt(Math.abs(o-i))},angleToSilhouette:A,axisAt:I,altitudeAt:S,setAltitudeAt:function(t,e,n,i){const r=S(t,e),s=I(t,e,o.Z,j),c=(0,u.g)(j,s,n-r);return(0,u.a)(i,e,c)},containsPoint:x,tmpSphere:P},Symbol.toStringTag,{value:"Module"}))},78341:(t,e,n)=>{n.d(e,{JI:()=>a,Ue:()=>s,re:()=>c}),n(67676);var o=n(22807),i=n(17896),r=n(65617);function s(t){return t?{origin:(0,r.a)(t.origin),direction:(0,r.a)(t.direction)}:{origin:(0,r.c)(),direction:(0,r.c)()}}function c(t,e){const n=u.get();return n.origin=t,n.direction=e,n}function a(t,e,n){const o=(0,i.e)(t.direction,(0,i.b)(n,e,t.origin));return(0,i.a)(n,t.origin,(0,i.g)(n,t.direction,o)),n}n(12981);const u=new o.x((function(){return{origin:null,direction:null}}))},11726:(t,e,n)=>{n.d(e,{hu:()=>i,yK:()=>r}),n(97323),n(98766),(0,n(88669).c)();class o{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function i(t,e){if(!t)throw e=e||"assert",console.log(new Error(e).stack),new o(e)}function r(t,e,n,o){let i,r=(n[0]-t[0])/e[0],s=(o[0]-t[0])/e[0];r>s&&(i=r,r=s,s=i);let c=(n[1]-t[1])/e[1],a=(o[1]-t[1])/e[1];if(c>a&&(i=c,c=a,a=i),r>a||c>s)return!1;c>r&&(r=c),a<s&&(s=a);let u=(n[2]-t[2])/e[2],d=(o[2]-t[2])/e[2];return u>d&&(i=u,u=d,d=i),!(r>d||u>s||(d<s&&(s=d),s<0))}},28615:(t,e,n)=>{n.r(e),n.d(e,{SceneLayerSnappingSourceWorker:()=>et,default:()=>nt});var o,i,r,s,c,a,u,d=n(43697),h=n(70586),l=n(95330),_=(n(92604),n(75215),n(67676),n(80442),n(37697),n(52011)),f=n(17896),T=n(65617),g=n(16996),m=n(2643),p=n(98370),O=n(71143),b=n(44553),E=n(22807),N=(n(52138),n(98766),n(88669)),R=n(78341);function M(t,e){for(let n=0;n<a.NUM;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}n(12981),new E.x((()=>({c0:0,c1:0,ray:null}))),n(22021),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(i=o||(o={}))[i.NONE=0]="NONE",i[i.CLAMP=1]="CLAMP",i[i.INFINITE_MIN=4]="INFINITE_MIN",i[i.INFINITE_MAX=8]="INFINITE_MAX",o.INFINITE_MIN,o.INFINITE_MAX,o.INFINITE_MAX,(c=r||(r={}))[c.LEFT=0]="LEFT",c[c.RIGHT=1]="RIGHT",c[c.BOTTOM=2]="BOTTOM",c[c.TOP=3]="TOP",c[c.NEAR=4]="NEAR",c[c.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(s||(s={})),s.FAR_BOTTOM_RIGHT,s.NEAR_BOTTOM_RIGHT,s.NEAR_BOTTOM_LEFT,s.FAR_BOTTOM_LEFT,s.NEAR_BOTTOM_LEFT,s.NEAR_BOTTOM_RIGHT,s.NEAR_TOP_RIGHT,s.NEAR_TOP_LEFT,s.FAR_BOTTOM_RIGHT,s.FAR_BOTTOM_LEFT,s.FAR_TOP_LEFT,s.FAR_TOP_RIGHT,s.NEAR_BOTTOM_RIGHT,s.FAR_BOTTOM_RIGHT,s.FAR_TOP_RIGHT,s.NEAR_TOP_RIGHT,s.FAR_BOTTOM_LEFT,s.NEAR_BOTTOM_LEFT,s.NEAR_TOP_LEFT,s.FAR_TOP_LEFT,s.FAR_TOP_LEFT,s.NEAR_TOP_LEFT,s.NEAR_TOP_RIGHT,s.FAR_TOP_RIGHT,function(t){t[t.NUM=6]="NUM"}(a||(a={})),function(t){t[t.NUM=8]="NUM"}(u||(u={})),(0,N.f)(-1,-1,-1,1),(0,N.f)(1,-1,-1,1),(0,N.f)(1,1,-1,1),(0,N.f)(-1,1,-1,1),(0,N.f)(-1,-1,1,1),(0,N.f)(1,-1,1,1),(0,N.f)(1,1,1,1),(0,N.f)(-1,1,1,1),new E.x((function(t){return t?{ray:(0,R.Ue)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,R.Ue)(),c0:0,c1:Number.MAX_VALUE}})),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)(),(0,T.c)();var A,F,I=n(11726);class S{constructor(t,e){this._objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new x,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}destroy(){this._degenerateObjects.clear(),x.clearPool(),G[0]=null,q.prune(),J.prune()}add(t,e=t.length){this._objectCount+=e,this._grow(t,e);const n=x.acquire();for(let o=0;o<e;o++){const e=t[o];this._isDegenerate(e)?this._degenerateObjects.add(e):(n.init(this._root),this._add(e,n))}x.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=x.acquire();for(const o of t){const t=(0,h.pC)(e)?e:(0,m.b)(this._objectToBoundingSphere(o),Z);C(t[3])?(n.init(this._root),this._remove(o,t,n)):this._degenerateObjects.delete(o)}x.release(n),this._shrink()}update(t,e){if(!C(e[3])&&this._isDegenerate(t))return;const n=function(t){return G[0]=t,G}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,R.re)(t,e);this._forEachNode(this._root,(t=>{if(!this._intersectsNode(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const i=(0,R.re)(t,e);this._forEachNode(this._root,(t=>{if(!this._intersectsNodeWithOffset(i,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(i,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(i,t,o)&&n(t)})),!0}))}forEach(t){this._forEachNode(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=(()=>!0),i=1/0){let r=1/0,s=1/0,c=null;const a=B(t,e),u=a=>{if(--i,!o(a))return;const u=this._objectToBoundingSphere(a);if(!M(n,u))return;const d=w(t,e,(0,m.g)(u)),h=d-u[3],l=d+u[3];h<r&&(r=h,s=l,c=a)};return this._forEachNodeDepthOrdered(this._root,(o=>{if(i<=0||!M(n,o.bounds))return!1;if((0,f.g)(V,a,o.halfSize),(0,f.a)(V,V,o.bounds),w(t,e,V)>s)return!1;const r=o.node;return r.terminals.forAll((t=>u(t))),null!==r.residents&&r.residents.forAll((t=>u(t))),!0}),t,e),c}forEachInDepthRange(t,e,n,o,i,r,s){let c=-1/0,a=1/0;const u={setRange:t=>{n===S.DepthOrder.FRONT_TO_BACK?(c=Math.max(c,t.near),a=Math.min(a,t.far)):(c=Math.max(c,-t.far),a=Math.min(a,-t.near))}};u.setRange(o);const d=w(e,n,t),h=B(e,n),l=B(e,-n),_=t=>{if(!s(t))return;const o=this._objectToBoundingSphere(t),h=(0,m.g)(o),l=w(e,n,h)-d,_=l-o[3],f=l+o[3];_>a||f<c||!M(r,o)||i(t,u)};this._forEachNodeDepthOrdered(this._root,(t=>{if(!M(r,t.bounds))return!1;if((0,f.g)(V,h,t.halfSize),(0,f.a)(V,V,t.bounds),w(e,n,V)-d>a)return!1;if((0,f.g)(V,l,t.halfSize),(0,f.a)(V,V,t.bounds),w(e,n,V)-d<c)return!1;const o=t.node;return o.terminals.forAll((t=>_(t))),null!==o.residents&&o.residents.forAll((t=>_(t))),!0}),e,n)}forEachNode(t){this._forEachNode(this._root,(e=>t(e.node,e.bounds,e.halfSize)))}forEachNeighbor(t,e){const n=(0,m.d)(e),o=(0,m.g)(e),i=e=>{const i=this._objectToBoundingSphere(e),r=(0,m.d)(i),s=n+r;(0,f.d)((0,m.g)(i),o)-s*s<=0&&t(e)};this._forEachNode(this._root,(t=>{const e=(0,m.d)(t.bounds),r=n+e;if((0,f.d)((0,m.g)(t.bounds),o)-r*r>0)return!1;const s=t.node;return s.terminals.forAll((t=>i(t))),null!==s.residents&&s.residents.forAll((t=>i(t))),!0})),this.forEachDegenerateObject(i)}_intersectsNode(t,e){return y(e.bounds,2*-e.halfSize,k),y(e.bounds,2*e.halfSize,W),(0,I.yK)(t.origin,t.direction,k,W)}_intersectsNodeWithOffset(t,e,n){return y(e.bounds,2*-e.halfSize,k),y(e.bounds,2*e.halfSize,W),n.applyToMinMax(k,W),(0,I.yK)(t.origin,t.direction,k,W)}_intersectsObject(t,e){const n=this._objectToBoundingSphere(e);return!(n[3]>0)||(0,m.i)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this._objectToBoundingSphere(e);return!(o[3]>0)||(0,m.i)(n.applyToBoundingSphere(o),t)}_forEachNode(t,e){let n=x.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(x.acquire().init(n).advance(t));x.release(n)}}_forEachNodeDepthOrdered(t,e,n,o=S.DepthOrder.FRONT_TO_BACK){let i=x.acquire().init(t);const r=[i];for(function(t,e,n){if(!J.length)for(let t=0;t<8;++t)J.push({index:0,distance:0});for(let n=0;n<8;++n){const o=v[n];J.data[n].index=n,J.data[n].distance=w(t,e,o)}J.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=J.data[t].index}(n,o,$);0!==r.length;){if(i=r.pop(),e(i)&&!i.isLeaf())for(let t=7;t>=0;--t){const e=$[t];i.node.children[e]&&r.push(x.acquire().init(i).advance(e))}x.release(i)}}_remove(t,e,n){q.clear();const o=n.advanceTo(e,((t,e)=>{q.push(t.node),q.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=q.length-2;t>=0;t-=2){const e=q.data[t],n=q.data[t+1];if(!this._purge(e,n))break}}_nodeIsEmpty(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}_purge(t,e){return e>=0&&(t.children[e]=null),!!this._nodeIsEmpty(t)&&(null===t.residents&&(t.residents=new b.Z({shrink:!0})),!0)}_add(t,e){e.advanceTo(this._objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=x.acquire().init(t);this._add(e.getItemAt(n),o),x.release(o)}}_grow(t,e){if(0!==e&&(L(t,e,(t=>this._objectToBoundingSphere(t)),U),C(U[3])&&!this._fitsInsideTree(U)))if(this._nodeIsEmpty(this._root.node))(0,m.b)(U,this._root.bounds),this._root.halfSize=1.25*U[3];else{const t=this._rootBoundsForRootAsSubNode(U);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(U,t):this._growRootAsSubNode(t),x.release(t)}}_rebuildTree(t,e){(0,f.c)(K,e.bounds),K[3]=e.halfSize,L([t,K],2,(t=>t),X);const n=x.acquire().init(this._root);this._root.initFrom(null,X,1.25*X[3]),this._forEachNode(n,(t=>(this.add(t.node.terminals.data,t.node.terminals.length),null!==t.node.residents&&this.add(t.node.residents.data,t.node.residents.length),!0))),x.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return this._forEachNode(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const i=this._root.bounds,r=this._root.halfSize;for(let t=0;t<3;t++){const s=i[t]-r-(n[t]-e),c=n[t]+e-(i[t]+r),a=Math.max(0,Math.ceil(s/(2*r))),u=Math.max(0,Math.ceil(c/(2*r)))+1,d=2**Math.ceil(Math.log(a+u)*Math.LOG2E);o=Math.max(o,d),Y[t].min=a,Y[t].max=u}for(let t=0;t<3;t++){let e=Y[t].min,n=Y[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const c=i[t]-r-e*r*2;H[t]=c+(n+e)*r}return H[3]=o*r*D,x.acquire().initFrom(null,H,o*r,0)}_growRootAsSubNode(t){const e=this._root.node;(0,f.c)(U,this._root.bounds),U[3]=this._root.halfSize,this._root.init(t),t.advanceTo(U,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!C(this._objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}}class x{constructor(){this.bounds=(0,m.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=(0,h.pC)(t)?t:x.createEmptyNode(),(0,h.pC)(e)&&(0,m.b)(e,this.bounds),this.halfSize=n,this.depth=o,this}advance(t){let e=this.node.children[t];e||(e=x.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=v[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.bounds[3]=this.halfSize*D,this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new b.Z({shrink:!0}),residents:new b.Z({shrink:!0})}}static acquire(){return x._pool.acquire()}static release(t){x._pool.release(t)}static clearPool(){x._pool.prune()}}function j(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function P(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function y(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function L(t,e,n,o){if(1===e){const e=n(t[0]);(0,m.b)(e,o)}else{k[0]=1/0,k[1]=1/0,k[2]=1/0,W[0]=-1/0,W[1]=-1/0,W[2]=-1/0;for(let o=0;o<e;o++){const e=n(t[o]);C(e[3])&&(j(k,e),P(W,e))}(0,f.h)(o,k,W,.5),o[3]=Math.max(W[0]-k[0],W[1]-k[1],W[2]-k[2])/2}}function B(t,e){let n=1/0,o=null;for(let i=0;i<8;++i){const r=w(t,e,z[i]);r<n&&(n=r,o=z[i])}return o}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function C(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}x._pool=new O.Z(x),A=S||(S={}),(F=A.DepthOrder||(A.DepthOrder={}))[F.FRONT_TO_BACK=1]="FRONT_TO_BACK",F[F.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const v=[(0,T.f)(-1,-1,-1),(0,T.f)(1,-1,-1),(0,T.f)(-1,1,-1),(0,T.f)(1,1,-1),(0,T.f)(-1,-1,1),(0,T.f)(1,-1,1),(0,T.f)(-1,1,1),(0,T.f)(1,1,1)],z=[(0,T.f)(-1,-1,-1),(0,T.f)(-1,-1,1),(0,T.f)(-1,1,-1),(0,T.f)(-1,1,1),(0,T.f)(1,-1,-1),(0,T.f)(1,-1,1),(0,T.f)(1,1,-1),(0,T.f)(1,1,1)],D=Math.sqrt(3),G=[null],H=(0,m.c)(),V=(0,T.c)(),k=(0,T.c)(),W=(0,T.c)(),q=new b.Z,Z=(0,m.c)(),U=(0,m.c)(),K=(0,m.c)(),X=(0,m.c)(),Y=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],J=new b.Z,$=[0,0,0,0,0,0,0,0],Q=S;var tt=n(18936);let et=class{constructor(){this._idToComponent=new Map,this._components=new Q((t=>t.bounds)),this._edges=new Q((t=>t.bounds)),this._tmpLineSegment=(0,g.Ue)(),this._tmpP1=(0,T.c)(),this._tmpP2=(0,T.c)(),this._tmpP3=(0,T.c)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,l.k_)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>this._addCandidates(t,e,n)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if((0,h.Wi)(t.info)){const{id:e,uid:o}=t;n.push({id:e,uid:o})}}),t.bounds),!n.length)return;const o={components:n},i=await this.remoteClient.invoke("fetchAllEdgeLocations",o,(0,h.Pt)(e,{}));for(const t of i.components)this._setFetchEdgeLocations(t)}async add(t){const e=new ot(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>{n.component===e&&t.push(n)}),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if((0,h.Wi)(e)||t.uid!==e.uid)return;const n=tt.extractComponentsEdgeLocationsLayout.createView(t.locations),o=new Array(n.count),i=(0,T.c)(),r=(0,T.c)();for(let s=0;s<n.count;s++){const c=(0,m.c)(),a=(0,m.g)(c);n.position0.getVec(s,i),n.position1.getVec(s,r),(0,f.F)(a,a,i,.5),(0,f.F)(a,a,i,.5),(0,f.a)(a,a,t.origin),c[3]=(0,f.i)(a,i);const u=new it(e,s,c);o[s]=u}this._edges.add(o);const{objectIds:s,origin:c}=t;e.info={locations:n,objectIds:s,origin:c}}_addCandidates(t,e,n){const{locations:o,origin:i,objectIds:r}=e.component.info,s=o.position0.getVec(e.index,this._tmpP1),c=o.position1.getVec(e.index,this._tmpP2);(0,f.a)(s,s,i),(0,f.a)(c,c,i);const a=r[o.componentIndex.get(e.index)];this._addEdgeCandidate(t,a,s,c,n),this._addVertexCandidate(t,a,s,n),this._addVertexCandidate(t,a,c,n)}_addEdgeCandidate(t,e,n,o,i){if(!(t.types&p.r.EDGE))return;const r=(0,m.g)(t.bounds),s=(0,g.zk)(n,o,this._tmpLineSegment),c=(0,g.nF)(s,r,this._tmpP3);if(!(0,m.m)(t.bounds,c))return null;i.push({type:"edge",objectId:e,target:(0,T.a)(c),distance:(0,f.i)(r,c),start:(0,T.a)(n),end:(0,T.a)(o)})}_addVertexCandidate(t,e,n,o){if(!(t.types&p.r.VERTEX))return;const i=(0,m.g)(t.bounds);if(!(0,m.m)(t.bounds,n))return null;o.push({type:"vertex",objectId:e,target:(0,T.a)(n),distance:(0,f.i)(i,n)})}};function nt(){return new et}et=(0,d._)([(0,_.j)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],et);class ot{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++ot.uid}}ot.uid=0;class it{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}}}]);
|