@arcgis/core 5.2.0-next.112 → 5.2.0-next.114
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/Ground.js +1 -1
- package/arcgisGlobal.d.ts +6 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +1 -0
- package/assets/esri/core/workers/chunks/{f5a988bb850f7a7af143.js → 05b373a663cb5d4d722f.js} +1 -1
- package/assets/esri/core/workers/chunks/{36f8caeb574dcd5c0ed5.js → 0b727d7bf3e36e146725.js} +1 -1
- package/assets/esri/core/workers/chunks/0c65862e3dd810015491.js +1 -0
- package/assets/esri/core/workers/chunks/0e3e58ba8e2d358121a5.js +1 -0
- package/assets/esri/core/workers/chunks/0edebc6c516f0b9dac7b.js +1 -0
- package/assets/esri/core/workers/chunks/1004e77593dfa506cd5d.js +1 -0
- package/assets/esri/core/workers/chunks/184942ea601237c8241a.js +1 -0
- package/assets/esri/core/workers/chunks/20de0ea9fa08a6545978.js +1 -0
- package/assets/esri/core/workers/chunks/214d63813d268afc265d.js +1 -0
- package/assets/esri/core/workers/chunks/22e85819e23202a8ba90.js +1 -0
- package/assets/esri/core/workers/chunks/{6e677505d257e0848075.js → 23f9ab77e4e263f82636.js} +1 -1
- package/assets/esri/core/workers/chunks/28a04887ecaee5445d14.js +1 -0
- package/assets/esri/core/workers/chunks/{2fc5c1504691badc7792.js → 2ac2d0a7623dd060c144.js} +1 -1
- package/assets/esri/core/workers/chunks/2afce71e8b6ae86e0792.js +1 -0
- package/assets/esri/core/workers/chunks/36792b8a85e88044cb49.js +1 -0
- package/assets/esri/core/workers/chunks/36a7e19f43517aa94577.js +1 -0
- package/assets/esri/core/workers/chunks/{6e6cdff4bbe1ff2f44ac.js → 3ab25279aaa30f035038.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6dae16208f6978b59e0.js → 3b499cfc89c8f87cdb20.js} +1 -1
- package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +1 -0
- package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 4bf2cc4d092601ff2b86.js} +1 -1
- package/assets/esri/core/workers/chunks/{d45483dd0dc2853b18b7.js → 4bfd63f3cf9208eb839b.js} +33 -33
- package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +1 -0
- package/assets/esri/core/workers/chunks/510a190a6f0a60ae38c3.js +1 -0
- package/assets/esri/core/workers/chunks/{89a785f8b61263e2d592.js → 552c92b01a5f02a115c5.js} +1 -1
- package/assets/esri/core/workers/chunks/564fdf0d663b773806cc.js +1 -0
- package/assets/esri/core/workers/chunks/{d9270f4935eb0d044db3.js → 57328c206f1e699ac06f.js} +1 -1
- package/assets/esri/core/workers/chunks/{50951fb13013b11b8a24.js → 58e62c8ce1292f4d3b06.js} +1 -1
- package/assets/esri/core/workers/chunks/5aee7739afb5160d4ace.js +1 -0
- package/assets/esri/core/workers/chunks/5b9925f23d4b10a7087e.js +1 -0
- package/assets/esri/core/workers/chunks/5f79ba5639067f734791.js +1 -0
- package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 60c61f34733063730386.js} +1 -1
- package/assets/esri/core/workers/chunks/62b1f94f4fa978d4da48.js +1 -0
- package/assets/esri/core/workers/chunks/6b264006b96cbf93d8ed.js +1 -0
- package/assets/esri/core/workers/chunks/6b9d29ca568590358478.js +1 -0
- package/assets/esri/core/workers/chunks/{7c5310e0104c22da0261.js → 6c7cb7974969e3167f2b.js} +1 -1
- package/assets/esri/core/workers/chunks/6c82cbcd504c711a7450.js +1 -0
- package/assets/esri/core/workers/chunks/{e98b785e8f4edc8bd3ff.js → 6eceeca33fac8e900d9d.js} +1 -1
- package/assets/esri/core/workers/chunks/7232fc11b23777b6be94.js +1 -0
- package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +1 -0
- package/assets/esri/core/workers/chunks/785206da3962ba23de16.js +1 -0
- package/assets/esri/core/workers/chunks/{1c70620f40be02f532b5.js → 7b169eabafcc03bfaee6.js} +1 -1
- package/assets/esri/core/workers/chunks/7bbc3d22383388d11345.js +1 -0
- package/assets/esri/core/workers/chunks/{082069f80eee0407b828.js → 7edf57e31ff07af9032b.js} +1 -1
- package/assets/esri/core/workers/chunks/83ed38468e316302b157.js +1 -0
- package/assets/esri/core/workers/chunks/85c876ee9e63d5732937.js +1 -0
- package/assets/esri/core/workers/chunks/8f0ecf4d06ec7b67d4ed.js +1 -0
- package/assets/esri/core/workers/chunks/8f1c5f5e70d4b33d021d.js +1 -0
- package/assets/esri/core/workers/chunks/{a1916bca1af5c65be4b0.js → 90ab3c47138875070a53.js} +1 -1
- package/assets/esri/core/workers/chunks/{10389c87d9c6a43363ce.js → 917dec9c004218c58950.js} +1 -1
- package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +1 -0
- package/assets/esri/core/workers/chunks/943d0026ca4d49eb3ac2.js +1 -0
- package/assets/esri/core/workers/chunks/982a396bd4fffa62e911.js +1 -0
- package/assets/esri/core/workers/chunks/98a5327fd96d9542b39f.js +1 -0
- package/assets/esri/core/workers/chunks/9b9a60f1e0c48aa701f0.js +1 -0
- package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +1 -0
- package/assets/esri/core/workers/chunks/9df379041e8860fe7f01.js +1 -0
- package/assets/esri/core/workers/chunks/{1e8ceb4a4b28625236e3.js → a42505b978d54d36d3b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{bfbe6ff786435fe1e7cf.js → a86a4e550a92f770d6d5.js} +1 -1
- package/assets/esri/core/workers/chunks/{a34eee4c9d4c1c2b8c49.js → ab60f3bc18b5ea504f70.js} +1 -1
- package/assets/esri/core/workers/chunks/{18b9ec6ba7a6c0fa2ac6.js → b1880d9f5eafd50ce84b.js} +1 -1
- package/assets/esri/core/workers/chunks/{777fc163530448eea13e.js → b4222152efaf73b37b53.js} +1 -1
- package/assets/esri/core/workers/chunks/b6ca73c1384f07b30b74.js +1 -0
- package/assets/esri/core/workers/chunks/bb4cbf6b7c35e8c78cc7.js +1 -0
- package/assets/esri/core/workers/chunks/bb831d23422acfb00ae2.js +1 -0
- package/assets/esri/core/workers/chunks/c0855be20ffcd52c7026.js +1 -0
- package/assets/esri/core/workers/chunks/{a0f742fd947104662d37.js → c6277236ec47586dca00.js} +1 -1
- package/assets/esri/core/workers/chunks/{3be33a129d3ae7dc4f06.js → caf38cf4d8542fb11c46.js} +1 -1
- package/assets/esri/core/workers/chunks/{2728eda8178e02fbca47.js → cd0f5cd0fefe7f49e3d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{48a53bfeef11c32dadcc.js → d25fb32a233d2128afbe.js} +1 -1
- package/assets/esri/core/workers/chunks/d629708bf23da24ee523.js +1 -0
- package/assets/esri/core/workers/chunks/db141122060d8d9b38da.js +1 -0
- package/assets/esri/core/workers/chunks/dc1944a7601b518a9c48.js +1 -0
- package/assets/esri/core/workers/chunks/{573ee2e59d26bc75201e.js → dc8670f32bb0b93c1473.js} +1 -1
- package/assets/esri/core/workers/chunks/e164acd876bbd42ed658.js +1 -0
- package/assets/esri/core/workers/chunks/e1f2b07be33e33117313.js +1 -0
- package/assets/esri/core/workers/chunks/e52f30dfb7c82491a7f2.js +1 -0
- package/assets/esri/core/workers/chunks/e5906b28b981199fd489.js +1 -0
- package/assets/esri/core/workers/chunks/{b3293ee9f221423a6825.js → e611e452f04a9ce64cf8.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f20c458f873564faff2.js → ec4f887153c24ab83f2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{707b4ae689c4329cad3b.js → f40ceb5e03c699605302.js} +1 -1
- package/assets/esri/core/workers/chunks/{547a073c789fdfb78310.js → f42243c62dd0b6993816.js} +1 -1
- package/assets/esri/core/workers/chunks/f91cab9904020cf25d50.js +1 -0
- package/assets/esri/core/workers/chunks/fdf5ceffec9d5185953d.js +1 -0
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bg.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ca.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.cs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.da.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.de.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.el.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.es.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.et.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.he.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hu.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.id.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.it.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ja.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ko.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lt.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.nl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.no.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ro.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ru.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.th.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.tr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.uk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.vi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/messages.ja.json +1 -1
- package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/Expand/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Features/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Features/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/support/GridControls/t9n/messages.pt-BR.json +1 -1
- package/chunks/DeepSky.glsl.js +2 -2
- package/chunks/FocusArea.glsl.js +1 -1
- package/chunks/GaussianSplatDepth.glsl.js +3 -3
- package/chunks/RibbonLine.glsl.js +15 -13
- package/config.js +1 -1
- package/core/Evented.d.ts +1 -1
- package/form/elements/AttachmentElement.d.ts +5 -5
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +1 -1
- package/geometry/Extent.js +1 -1
- package/geometry/operators/affineTransformOperator.d.ts +9 -3
- package/geometry/operators/affineTransformOperator.js +1 -1
- package/geometry/operators/alphaShapeOperator.d.ts +14 -4
- package/geometry/operators/alphaShapeOperator.js +1 -1
- package/geometry/operators/areaOperator.d.ts +11 -3
- package/geometry/operators/areaOperator.js +1 -1
- package/geometry/operators/autoCompleteOperator.d.ts +6 -2
- package/geometry/operators/autoCompleteOperator.js +1 -1
- package/geometry/operators/boundaryOperator.d.ts +9 -3
- package/geometry/operators/boundaryOperator.js +1 -1
- package/geometry/operators/bufferOperator.d.ts +19 -5
- package/geometry/operators/bufferOperator.js +1 -1
- package/geometry/operators/centroidOperator.d.ts +6 -2
- package/geometry/operators/centroidOperator.js +1 -1
- package/geometry/operators/clipOperator.d.ts +9 -3
- package/geometry/operators/clipOperator.js +1 -1
- package/geometry/operators/containsOperator.d.ts +9 -3
- package/geometry/operators/containsOperator.js +1 -1
- package/geometry/operators/convexHullOperator.d.ts +17 -5
- package/geometry/operators/convexHullOperator.js +1 -1
- package/geometry/operators/crossesOperator.d.ts +9 -3
- package/geometry/operators/crossesOperator.js +1 -1
- package/geometry/operators/cutOperator.d.ts +6 -2
- package/geometry/operators/cutOperator.js +1 -1
- package/geometry/operators/densifyOperator.d.ts +14 -4
- package/geometry/operators/densifyOperator.js +1 -1
- package/geometry/operators/differenceOperator.d.ts +9 -3
- package/geometry/operators/differenceOperator.js +1 -1
- package/geometry/operators/disjointOperator.d.ts +9 -3
- package/geometry/operators/disjointOperator.js +1 -1
- package/geometry/operators/distanceOperator.d.ts +11 -3
- package/geometry/operators/distanceOperator.js +1 -1
- package/geometry/operators/equalsOperator.d.ts +9 -3
- package/geometry/operators/equalsOperator.js +1 -1
- package/geometry/operators/extendOperator.d.ts +11 -3
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/generalizeOperator.d.ts +14 -4
- package/geometry/operators/generalizeOperator.js +1 -1
- package/geometry/operators/geodesicBufferOperator.d.ts +25 -7
- package/geometry/operators/geodesicBufferOperator.js +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +28 -8
- package/geometry/operators/geodesicProximityOperator.js +1 -1
- package/geometry/operators/geodeticAreaOperator.d.ts +17 -5
- package/geometry/operators/geodeticAreaOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.d.ts +20 -6
- package/geometry/operators/geodeticDensifyOperator.js +1 -1
- package/geometry/operators/geodeticDistanceOperator.d.ts +17 -5
- package/geometry/operators/geodeticDistanceOperator.js +1 -1
- package/geometry/operators/geodeticLengthOperator.d.ts +17 -5
- package/geometry/operators/geodeticLengthOperator.js +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +17 -5
- package/geometry/operators/geodeticUtilsOperator.js +1 -1
- package/geometry/operators/graphicBufferOperator.d.ts +11 -3
- package/geometry/operators/graphicBufferOperator.js +1 -1
- package/geometry/operators/integrateOperator.d.ts +6 -2
- package/geometry/operators/integrateOperator.js +1 -1
- package/geometry/operators/intersectionOperator.d.ts +12 -4
- package/geometry/operators/intersectionOperator.js +1 -1
- package/geometry/operators/intersectsOperator.d.ts +9 -3
- package/geometry/operators/intersectsOperator.js +1 -1
- package/geometry/operators/isNearOperator.d.ts +11 -3
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/bufferOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/convexHullOperator.js +1 -1
- package/geometry/operators/json/crossesOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/json/generalizeOperator.js +1 -1
- package/geometry/operators/json/geodesicBufferOperator.js +1 -1
- package/geometry/operators/json/graphicBufferOperator.js +1 -1
- package/geometry/operators/json/intersectionOperator.js +1 -1
- package/geometry/operators/json/intersectsOperator.js +1 -1
- package/geometry/operators/json/lengthOperator.js +1 -1
- package/geometry/operators/json/offsetOperator.js +1 -1
- package/geometry/operators/json/overlapsOperator.js +1 -1
- package/geometry/operators/json/projectOperator.js +1 -1
- package/geometry/operators/json/simplifyOperator.js +1 -1
- package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
- package/geometry/operators/json/touchesOperator.js +1 -1
- package/geometry/operators/json/unionOperator.js +1 -1
- package/geometry/operators/json/withinOperator.js +1 -1
- package/geometry/operators/labelPointOperator.d.ts +9 -3
- package/geometry/operators/labelPointOperator.js +1 -1
- package/geometry/operators/lengthOperator.d.ts +11 -3
- package/geometry/operators/lengthOperator.js +1 -1
- package/geometry/operators/linesToPolygonsOperator.d.ts +6 -2
- package/geometry/operators/linesToPolygonsOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.d.ts +6 -2
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +14 -4
- package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +11 -3
- package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
- package/geometry/operators/offsetOperator.d.ts +14 -4
- package/geometry/operators/offsetOperator.js +1 -1
- package/geometry/operators/overlapsOperator.d.ts +9 -3
- package/geometry/operators/overlapsOperator.js +1 -1
- package/geometry/operators/polygonOverlayOperator.d.ts +11 -3
- package/geometry/operators/polygonOverlayOperator.js +1 -1
- package/geometry/operators/polygonSlicerOperator.d.ts +22 -6
- package/geometry/operators/polygonSlicerOperator.js +1 -1
- package/geometry/operators/projectOperator.d.ts +15 -5
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/proximityOperator.d.ts +22 -6
- package/geometry/operators/proximityOperator.js +1 -1
- package/geometry/operators/relateOperator.d.ts +12 -4
- package/geometry/operators/relateOperator.js +1 -1
- package/geometry/operators/reshapeOperator.d.ts +6 -2
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.d.ts +20 -6
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +3 -1
- package/geometry/operators/simplifyOGCOperator.js +1 -1
- package/geometry/operators/simplifyOperator.d.ts +12 -4
- package/geometry/operators/simplifyOperator.js +1 -1
- package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
- package/geometry/operators/support/deprecatedOperator.js +2 -0
- package/geometry/operators/symmetricDifferenceOperator.d.ts +9 -3
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/touchesOperator.d.ts +9 -3
- package/geometry/operators/touchesOperator.js +1 -1
- package/geometry/operators/unionOperator.d.ts +9 -3
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/operators/withinOperator.d.ts +9 -3
- package/geometry/operators/withinOperator.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/list/BasemapItemCollection.d.ts +40 -14
- package/layers/list/BasemapItemCollection.js +1 -1
- package/layers/list/CatalogItemCollection.d.ts +29 -11
- package/layers/list/CatalogItemCollection.js +1 -1
- package/layers/list/Item.d.ts +66 -122
- package/layers/list/Item.js +1 -1
- package/layers/list/ItemPanel.d.ts +23 -34
- package/layers/list/LayerItemCollection.d.ts +33 -43
- package/layers/list/LayerItemCollection.js +1 -1
- package/layers/list/TableItem.d.ts +42 -53
- package/layers/list/TableItem.js +1 -1
- package/layers/list/TableItemCollection.d.ts +25 -55
- package/layers/list/TableItemCollection.js +1 -1
- package/layers/list/TableItemPanel.d.ts +25 -23
- package/layers/list/support/layerListUtils.js +1 -1
- package/layers/list/types.d.ts +158 -37
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/FeatureFilter.d.ts +2 -1
- package/layers/support/FeatureFilter.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +2 -2
- package/layers/support/FeatureReductionCluster.d.ts +2 -2
- package/layers/support/SubtypeSublayer.d.ts +1 -1
- package/package.json +3 -3
- package/popup/FeatureContent.d.ts +7 -7
- package/portal/schemas/definitions.js +1 -1
- package/portal/types.d.ts +1 -1
- package/renderers/DotDensityRenderer.d.ts +2 -2
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +0 -1
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +1 -1
- package/rest/knowledgeGraphService.d.ts +2 -2
- package/rest/support/Query.d.ts +1 -3
- package/rest/support/RelationshipQuery.d.ts +1 -1
- package/support/revision.js +1 -1
- package/symbols/LineSymbol3D.js +1 -1
- package/symbols/LineSymbol3DLayer.d.ts +9 -3
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/OverrideHelper.js +1 -1
- package/symbols/cim/Rasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/dashUtils.js +2 -0
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/fromCIMFontStyle.js +2 -0
- package/symbols/cim/richTextUtils.js +1 -1
- package/symbols/cim/types.d.ts +32 -0
- package/symbols/cim/utils.js +1 -1
- package/symbols/patterns/LinePattern3D.d.ts +10 -4
- package/symbols/patterns/LinePattern3D.js +1 -1
- package/symbols/patterns/LineTemplatePattern3D.d.ts +48 -0
- package/symbols/patterns/LineTemplatePattern3D.js +2 -0
- package/symbols/patterns/utils.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/decorGlyphRect.js +2 -0
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/MultiHighlightGradient.js +1 -1
- package/views/2d/engine/webgl/hashMosaic.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHighlight.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/AggregateStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/bins/BinLevelState.js +1 -1
- package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +1 -1
- package/views/2d/layers/features/processor/tracks/TrackLevelState.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
- package/views/2d/layers/support/FilterSchema.js +2 -0
- package/views/2d/layers/support/HighlightRegistry.js +2 -0
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/2d/layers/support/util.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/navigation/Navigation3D.d.ts +16 -0
- package/views/3d/navigation/Navigation3D.js +2 -0
- package/views/3d/navigation/modes/DefaultNavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/DefaultNavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/GroundNavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/NavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/NavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/NavigationMode3DUnion.d.ts +5 -0
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/effects/AmbientIllumination.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/BlurEmission.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +12 -8
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/BreakpointsOwner.d.ts +2 -2
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/SelectionManager.d.ts +24 -24
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/interactive/support/types.d.ts +0 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/widgets/Attachments/support/attachmentUtils.d.ts +8 -0
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +5 -1
- package/widgets/BasemapLayerList/types.d.ts +15 -2
- package/widgets/BasemapLayerList.d.ts +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +14 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +29 -2
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.d.ts +1 -5
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -2
- package/widgets/Editor.d.ts +2 -2
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +6 -6
- package/widgets/FeatureTable/support/FeatureStore.d.ts +2 -2
- package/widgets/FeatureTable.d.ts +5 -5
- package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/LayerListVisibleElements.d.ts +4 -1
- package/widgets/LayerList/ListItem.d.ts +4 -0
- package/widgets/LayerList/ListItemPanel.d.ts +3 -0
- package/widgets/OrientedImageryViewer/types.d.ts +2 -2
- package/widgets/OrientedImageryViewer.d.ts +20 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/03601be8b0763f82e88f.js +0 -1
- package/assets/esri/core/workers/chunks/0bff8d589312be6588fe.js +0 -1
- package/assets/esri/core/workers/chunks/0de90b1ad8118457fd5a.js +0 -1
- package/assets/esri/core/workers/chunks/0e1a067ab243900d0371.js +0 -1
- package/assets/esri/core/workers/chunks/0ee6109e6578395a7900.js +0 -1
- package/assets/esri/core/workers/chunks/0ee7376c29e0fd8f676c.js +0 -1
- package/assets/esri/core/workers/chunks/13551987fbeaae154df8.js +0 -1
- package/assets/esri/core/workers/chunks/186350d720352bd5ff33.js +0 -1
- package/assets/esri/core/workers/chunks/25ecf94d776c3b6db0f3.js +0 -1
- package/assets/esri/core/workers/chunks/262052dfaec3af8a58b9.js +0 -1
- package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +0 -1
- package/assets/esri/core/workers/chunks/307297e025eed110095f.js +0 -1
- package/assets/esri/core/workers/chunks/33422dca6f4bcaa0ea74.js +0 -1
- package/assets/esri/core/workers/chunks/33e583166ab3943ecf0e.js +0 -1
- package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +0 -1
- package/assets/esri/core/workers/chunks/3daddcb106a7009c5a70.js +0 -1
- package/assets/esri/core/workers/chunks/3de6e54b6ed0feae1940.js +0 -1
- package/assets/esri/core/workers/chunks/448f068a14f24f2f8a43.js +0 -1
- package/assets/esri/core/workers/chunks/4c088c26d5d546c95c90.js +0 -1
- package/assets/esri/core/workers/chunks/5134241be1f1bf25231a.js +0 -1
- package/assets/esri/core/workers/chunks/56163189fbe63aa11e94.js +0 -1
- package/assets/esri/core/workers/chunks/571cf99c3eab8e517542.js +0 -1
- package/assets/esri/core/workers/chunks/5762746cfb02a4119d82.js +0 -1
- package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +0 -1
- package/assets/esri/core/workers/chunks/58e4aecabca047f1d229.js +0 -1
- package/assets/esri/core/workers/chunks/5c8f423812a23c02c1fd.js +0 -1
- package/assets/esri/core/workers/chunks/5eb726317b6602f1e206.js +0 -1
- package/assets/esri/core/workers/chunks/6e2075bd4832ff0db68c.js +0 -1
- package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +0 -1
- package/assets/esri/core/workers/chunks/7610dd0b46948b7bd840.js +0 -1
- package/assets/esri/core/workers/chunks/7737ab739eba6d81282d.js +0 -1
- package/assets/esri/core/workers/chunks/7be56ac60e580c806a5d.js +0 -1
- package/assets/esri/core/workers/chunks/7d9468e38f3bf006f86e.js +0 -1
- package/assets/esri/core/workers/chunks/7efc51324cfc8e08c756.js +0 -1
- package/assets/esri/core/workers/chunks/84dc2afd89263a311b81.js +0 -1
- package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +0 -1
- package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +0 -1
- package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +0 -1
- package/assets/esri/core/workers/chunks/be69e2dda75b079362b2.js +0 -1
- package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +0 -1
- package/assets/esri/core/workers/chunks/c18de0f6cbeecee4ce34.js +0 -1
- package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +0 -1
- package/assets/esri/core/workers/chunks/d33d08cb6856cd2eb35e.js +0 -1
- package/assets/esri/core/workers/chunks/e688e6e816824b53a25e.js +0 -1
- package/assets/esri/core/workers/chunks/ea068c797e3e462f4518.js +0 -1
- package/assets/esri/core/workers/chunks/eaf1d38f09744b7e84f5.js +0 -1
- package/assets/esri/core/workers/chunks/eff99e45d818e58fd443.js +0 -1
- package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +0 -1
- package/assets/esri/core/workers/chunks/f60d5ce49c173d5381ec.js +0 -1
- package/assets/esri/core/workers/chunks/f72f4413fc7461e11a2a.js +0 -1
- package/assets/esri/core/workers/chunks/f834aa732c3f06525089.js +0 -1
- package/assets/esri/core/workers/chunks/fae14e30fa7d81bf706e.js +0 -1
- package/assets/esri/core/workers/chunks/fb6f1b562ee0983c8c6e.js +0 -1
- package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +0 -1
- package/graphic/graphicOrigins.js +0 -2
- package/views/2d/engine/webgl/Utils.js +0 -2
- package/views/2d/layers/support/HighlightCounter.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../config.js";import t from"../../../../request.js";import i from"../../../../core/Error.js";import r from"../../../../core/Logger.js";import{throwIfAborted as s,isAbortError as a}from"../../../../core/promiseUtils.js";import{QueueProcessor as n}from"../../../../core/QueueProcessor.js";import{pt2px as o}from"../../../../core/screenUtils.js";import{numericHash as c}from"../../../../core/string.js";import l from"../../../../symbols/cim/CIMResourceManager.js";import{CIMSymbolHelper as h}from"../../../../symbols/cim/CIMSymbolHelper.js";import u from"../../../../symbols/cim/Rasterizer.js";import{normalizeDashTemplate as m}from"../../../../symbols/cim/utils.js";import{svgSdfTextureInnerSize as p,textureBindingGlyphAtlas as d,textureBindingSpriteAtlas as g}from"./definitions.js";import{GlyphMosaic as f}from"./GlyphMosaic.js";import y from"./Rect.js";import M from"./SDFConverter.js";import _ from"./SpriteMosaic.js";import{discardUrlIfHasUrlHash as I}from"./urlUtils.js";import{getCIMMarkerPlacementHash as w,isSVGImage as S}from"./Utils.js";import{AnimatableTextureResource as z}from"./animatedFormats/AnimatableTextureResource.js";import{AnimationStore as T}from"./animations/store/AnimationStore.js";const C=()=>r.getLogger("esri.views.MapView"),R=(e,t,r)=>C().error(new i(e,t,r));class P{static fromMosaic(e,t){return new P(e,t.page,t.sdf,t.samplingMode)}constructor(e,t,i,r){this.mosaicType=e,this.page=t,this.sdf=i,this.samplingMode=r}}class b{constructor(r){this._requestRender=r,this._resourceManager=new l,this._sdfConverter=new M(p),this._hashToBindingInfo=new Map,this._ongoingRasterizations=new Map,this._imageRequestQueue=new n({concurrency:10,process:async(e,r)=>{s(r);try{return await t(e,{responseType:"image",signal:r})}catch(n){if(!a(n))throw new i("mapview-invalid-resource",`Could not fetch requested resource at ${e}`,n);throw n}}}),this.animationStore=new T,this._spriteMosaic=new _(2048,2048,500),this._glyphMosaic=new f(1024,1024,!1,e=>this._setTextureBinding(1,e)),this._rasterizer=new u(this.resourceManager),this._baseUrl=`${e.fontsUrl}/{fontstack}/{range}.pbf`}dispose(){this._spriteMosaic.dispose(),this._glyphMosaic.dispose(),this._rasterizer.dispose(),this._sdfConverter.dispose(),this._spriteMosaic=null,this._glyphMosaic=null,this._sdfConverter=null,this._hashToBindingInfo.clear(),this._hashToBindingInfo=null,this._ongoingRasterizations.clear(),this._ongoingRasterizations=null,this._imageRequestQueue.clear(),this._imageRequestQueue=null,this._resourceManager.destroy(),this.animationStore.destroy()}get sprites(){return this._spriteMosaic}get glyphs(){return this._glyphMosaic}get resourceManager(){return this._resourceManager}openMessagePorts(){return this._glyphMosaic.openMessagePorts()}async rasterizeItem(e,t){if(null==e)return R("mapview-null-resource","Unable to rasterize null resource"),null;if("animation-info"===e.type){const{resource:t}=e,i=this.animationStore.add(t),{location:r}=i;return{rect:new y(r.column,r.row,t.length,1),page:r.page,textureBinding:1,type:"sprite",width:t.length,height:1,rasterizationScale:1,sdfPaddingRatio:.5,samplingMode:"Linear",sdfDecodeCoeff:1,simplePattern:!1}}if("cim-rasterization-info"!==e.type)return R("mapview-unexpected-resource","Unable to rasterize resource"),null;const{resource:i}=e;if("text"===i.type){const e=await this._rasterizeText(i,t);return this._forEachGlyphItem(e,e=>this._setTextureBinding(1,e.mosaicItem)),e}const r=await this._rasterizeSprite(i,t);return r&&this._setTextureBinding(0,r),r}getBindingInfo(e,t,i){const{context:r}=e,s=this._hashToBindingInfo.get(t);if(!s)return R("mapview-texture-manager",`Could not find binding info for textureKey ${t}!`),{mosaicInfo:{size:[0,0]},mosaicTexture:null};const a=s.page,n="Nearest"===s.samplingMode?9728:i?9987:9729;let o,c,l;if(0===s.mosaicType)c=this._spriteMosaic.getTexture(e,a),l=g,o=this._spriteMosaic.getSize(a);else{if(1!==s.mosaicType)return R("mapview-texture-manager",`Cannot handle unknown type ${s.mosaicType}`),{mosaicInfo:{size:[0,0]},mosaicTexture:null};c=this._glyphMosaic.getTexture(r,a),l=d,o=[this.glyphs.width,this.glyphs.height],this._glyphMosaic.bind(r,n,a,d)}return c.setSamplingMode(n),{mosaicInfo:{size:o},mosaicTexture:{texture:c,unit:l}}}_setTextureBinding(e,t){const{sdf:i,samplingMode:r,page:s}=t,a=F(e,s,!!i,r);if(!this._hashToBindingInfo.has(a)){const i=P.fromMosaic(e,t);this._hashToBindingInfo.set(a,i)}return t.textureBinding=a,a}async _rasterizeText(e,t){return this._glyphMosaic.rasterizeText(this._baseUrl,e,t)}_forEachGlyphItem(e,t){if(e)if("glyphs"!==e.type)for(const i of e.runs)i.glyphs.glyphs.forEach(t);else e.glyphs.forEach(t)}_hashSpriteResource(e){switch(e.type){case"path":return`path:${e.path}.${e.asFill?1:0}`;case"CIMPictureMarker":return`${e.type}:${e.url}:${e.size}:${w(e.markerPlacement)}`;case"CIMPictureFill":return`${e.type}:${e.url}:${e.height}`;case"CIMPictureStroke":return`${e.type}:${e.url}:${e.width}`;case"dash":return`dash:${e.capStyle}.${m(e.dashTemplate).join("")}`;case"sdf":return`sdf:${JSON.stringify(e.geometry)}.${e.sdfTextureSize}.${e.asFill?1:0}`;case"fill-style":return`fill_style:${e.style}`;case"animated":return JSON.stringify(I(e));case"CIMGradientFill":case"CIMGradientStroke":return`gradient:${JSON.stringify(e.colorRamp)}.${e.gradientType}.${e.interval}`;case"CIMHatchFill":case"CIMVectorMarker":case"cim-point-symbol-halo":return JSON.stringify(e)}}async _rasterizeSprite(e,t){if(!e)return null;const i=c(this._hashSpriteResource(e));if(this._spriteMosaic.has(i))return this._spriteMosaic.getSpriteItem(i);if("url"in e&&e.url&&"animated"!==e.type||"CIMPictureFill"===e.type||"CIMPictureStroke"===e.type||"CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type||"cim-point-symbol-halo"===e.type){const t="cim-point-symbol-halo"===e.type?e.symbol:{type:"CIMPointSymbol",symbolLayers:[e]};await h.normalizeSymbolAndFetchResources(t,this._resourceManager)}switch(e.type){case"CIMPictureMarker":return"CIMMarkerPlacementInsidePolygon"===e.markerPlacement?.type?this._rasterizeJSONResource(i,e):this._handleAsyncResource(i,e,t);case"animated":case"CIMPictureFill":case"CIMPictureStroke":case"path":return this._handleAsyncResource(i,e,t);case"CIMGradientFill":case"CIMGradientStroke":case"CIMHatchFill":case"CIMVectorMarker":case"cim-point-symbol-halo":case"dash":case"fill-style":case"sdf":return this._rasterizeJSONResource(i,e)}}_rasterizeJSONResource(e,t){const i=this._rasterizer.rasterizeJSONResource(t);if(i){const{size:r,image:s,sdf:a,simplePattern:n,rasterizationScale:o,samplingMode:c,sdfPaddingRatio:l,sdfDecodeCoeff:h}=i;return this._addItemToMosaic(e,r,{type:"static",data:s},$(t),a,n,o,c,l,h)}return null}async _handleAsyncResource(e,t,i){if(this._ongoingRasterizations.has(e))return this._ongoingRasterizations.get(e);let r;return r="path"===t.type?this._handleSVG(t,e,i):this._handleImage(t,e,i),this._ongoingRasterizations.set(e,r),r.finally(()=>this._ongoingRasterizations.delete(e)),r}async _handleSVG(e,t,i){const r=[p,p],{asFill:s}=e,a=await this._sdfConverter.draw(e.path,s,i);return this._addItemToMosaic(t,r,{type:"static",data:new Uint32Array(a.buffer)},!1,!0,!0)}_handleGIFOrPNG(e,t,i){const r=e.url,s=this.resourceManager.getResource(r);if(null==s)return null;const{width:a,height:n}=s;if(s instanceof HTMLImageElement){if("animated"===e.type)return R("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;const i="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:r,sdf:o,image:c}=this._rasterizer.rasterizeImageResource(a,n,s,i);return this._addItemToMosaic(t,r,{type:"static",data:c},$(e),o,!1)}let o,c,l;"animated"===e.type?(o=!1,c={type:"CIMAnimatedSymbolProperties",playAnimation:e.playAnimation,reverseAnimation:e.reverseAnimation,randomizeStartTime:e.randomizeStartTime,randomizeStartSeed:e.randomizeStartSeed,startTimeOffset:e.startTimeOffset,duration:e.duration,repeatType:e.repeatType,repeatDelay:e.repeatDelay},l=e.startGroup||0):(o=$(e),c={type:"CIMAnimatedSymbolProperties",playAnimation:!0},l=0);const h=new z(s,this._requestRender,c,l);return this._addItemToMosaic(t,[h.width,h.height],{type:"animated",data:h},o,!1,!1)}async _handleImage(e,t,r){const s=e.url;if(j(s)||v(s))return this._handleGIFOrPNG(e,t,r);if("animated"===e.type)return R("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;try{let i;const a=this.resourceManager.getResource(s);if(null!=a&&a instanceof HTMLImageElement)i=a;else{const{data:e}=await this._imageRequestQueue.push(s,{...r});i=e}if(S(s))if("width"in e&&"height"in e)i.width=o(e.width),i.height=o(e.height);else if("cim"in e){const t=e;i.width=o(t.width??t.scaleX*t.size),i.height=o(t.size)}if(!i.width||!i.height)return null;const n=i.width,c=i.height,l="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:h,sdf:u,image:m}=this._rasterizer.rasterizeImageResource(n,c,i,l);return this._addItemToMosaic(t,h,{type:"static",data:m},$(e),u,!1)}catch(R){if(!a(R))throw new i("mapview-invalid-resource",`Could not fetch requested resource at ${s}. ${R.message}`);throw R}}_addItemToMosaic(e,t,i,r,s,a,n,o,c,l){return this._spriteMosaic.addSpriteItem(e,t,i,r,s,a,n,o,c,l)}}function $(e){switch(e.type){case"CIMVectorMarker":case"CIMPictureMarker":return A(e);case"cim-point-symbol-halo":return!1;default:return!0}}const x=e=>null!=e&&e.startsWith("data:image/gif"),j=e=>e&&(e.includes(".gif")||x(e)),k=e=>null!=e&&e.startsWith("data:image/png"),v=e=>e&&(e.includes(".png")||k(e)),A=e=>e&&"markerPlacement"in e&&e.markerPlacement&&"CIMMarkerPlacementInsidePolygon"===e.markerPlacement.type;function F(e,t,i,r){return 1|e<<1|(i?1:0)<<2|("Nearest"===r?1:0)<<3|t<<4}export{b as TextureManager,F as hashMosaic};
|
|
2
|
+
import e from"../../../../config.js";import t from"../../../../request.js";import i from"../../../../core/Error.js";import r from"../../../../core/Logger.js";import{throwIfAborted as s,isAbortError as a}from"../../../../core/promiseUtils.js";import{QueueProcessor as n}from"../../../../core/QueueProcessor.js";import{pt2px as o}from"../../../../core/screenUtils.js";import{numericHash as c}from"../../../../core/string.js";import l from"../../../../symbols/cim/CIMResourceManager.js";import{CIMSymbolHelper as u}from"../../../../symbols/cim/CIMSymbolHelper.js";import{normalizeDashTemplate as m}from"../../../../symbols/cim/dashUtils.js";import h from"../../../../symbols/cim/Rasterizer.js";import{svgSdfTextureInnerSize as p,textureBindingGlyphAtlas as d,textureBindingSpriteAtlas as g}from"./definitions.js";import{GlyphMosaic as f}from"./GlyphMosaic.js";import{hashMosaic as y}from"./hashMosaic.js";import M from"./Rect.js";import _ from"./SDFConverter.js";import I from"./SpriteMosaic.js";import{discardUrlIfHasUrlHash as $}from"./urlUtils.js";import{AnimatableTextureResource as w}from"./animatedFormats/AnimatableTextureResource.js";import{AnimationStore as S}from"./animations/store/AnimationStore.js";const z=()=>r.getLogger("esri.views.MapView"),C=(e,t,r)=>z().error(new i(e,t,r));class P{static fromMosaic(e,t){return new P(e,t.page,t.sdf,t.samplingMode)}constructor(e,t,i,r){this.mosaicType=e,this.page=t,this.sdf=i,this.samplingMode=r}}class T{constructor(r){this._requestRender=r,this._resourceManager=new l,this._sdfConverter=new _(p),this._hashToBindingInfo=new Map,this._ongoingRasterizations=new Map,this._imageRequestQueue=new n({concurrency:10,process:async(e,r)=>{s(r);try{return await t(e,{responseType:"image",signal:r})}catch(n){if(!a(n))throw new i("mapview-invalid-resource",`Could not fetch requested resource at ${e}`,n);throw n}}}),this.animationStore=new S,this._spriteMosaic=new I(2048,2048,500),this._glyphMosaic=new f(1024,1024,!1,e=>this._setTextureBinding(1,e)),this._rasterizer=new h(this.resourceManager),this._baseUrl=`${e.fontsUrl}/{fontstack}/{range}.pbf`}dispose(){this._spriteMosaic.dispose(),this._glyphMosaic.dispose(),this._rasterizer.dispose(),this._sdfConverter.dispose(),this._spriteMosaic=null,this._glyphMosaic=null,this._sdfConverter=null,this._hashToBindingInfo.clear(),this._hashToBindingInfo=null,this._ongoingRasterizations.clear(),this._ongoingRasterizations=null,this._imageRequestQueue.clear(),this._imageRequestQueue=null,this._resourceManager.destroy(),this.animationStore.destroy()}get sprites(){return this._spriteMosaic}get glyphs(){return this._glyphMosaic}get resourceManager(){return this._resourceManager}openMessagePorts(){return this._glyphMosaic.openMessagePorts()}async rasterizeItem(e,t){if(null==e)return C("mapview-null-resource","Unable to rasterize null resource"),null;if("animation-info"===e.type){const{resource:t}=e,i=this.animationStore.add(t),{location:r}=i;return{rect:new M(r.column,r.row,t.length,1),page:r.page,textureBinding:1,type:"sprite",width:t.length,height:1,rasterizationScale:1,sdfPaddingRatio:.5,samplingMode:"Linear",sdfDecodeCoeff:1,simplePattern:!1}}if("cim-rasterization-info"!==e.type)return C("mapview-unexpected-resource","Unable to rasterize resource"),null;const{resource:i}=e;if("text"===i.type){const e=await this._rasterizeText(i,t);return this._forEachGlyphItem(e,e=>this._setTextureBinding(1,e.mosaicItem)),e}const r=await this._rasterizeSprite(i,t);return r&&this._setTextureBinding(0,r),r}getBindingInfo(e,t,i){const{context:r}=e,s=this._hashToBindingInfo.get(t);if(!s)return C("mapview-texture-manager",`Could not find binding info for textureKey ${t}!`),{mosaicInfo:{size:[0,0]},mosaicTexture:null};const a=s.page,n="Nearest"===s.samplingMode?9728:i?9987:9729;let o,c,l;if(0===s.mosaicType)c=this._spriteMosaic.getTexture(e,a),l=g,o=this._spriteMosaic.getSize(a);else{if(1!==s.mosaicType)return C("mapview-texture-manager",`Cannot handle unknown type ${s.mosaicType}`),{mosaicInfo:{size:[0,0]},mosaicTexture:null};c=this._glyphMosaic.getTexture(r,a),l=d,o=[this.glyphs.width,this.glyphs.height],this._glyphMosaic.bind(r,n,a,d)}return c.setSamplingMode(n),{mosaicInfo:{size:o},mosaicTexture:{texture:c,unit:l}}}_setTextureBinding(e,t){const{sdf:i,samplingMode:r,page:s}=t,a=y(e,s,!!i,r);if(!this._hashToBindingInfo.has(a)){const i=P.fromMosaic(e,t);this._hashToBindingInfo.set(a,i)}return t.textureBinding=a,a}async _rasterizeText(e,t){return this._glyphMosaic.rasterizeText(this._baseUrl,e,t)}_forEachGlyphItem(e,t){if(e)if("glyphs"!==e.type)for(const i of e.runs)i.glyphs.glyphs.forEach(t);else e.glyphs.forEach(t)}_hashSpriteResource(e){switch(e.type){case"path":return`path:${e.path}.${e.asFill?1:0}`;case"CIMPictureMarker":return`${e.type}:${e.url}:${e.size}:${k(e.markerPlacement)}`;case"CIMPictureFill":return`${e.type}:${e.url}:${e.height}`;case"CIMPictureStroke":return`${e.type}:${e.url}:${e.width}`;case"dash":return`dash:${e.capStyle}.${m(e.dashTemplate).join("")}`;case"sdf":return`sdf:${JSON.stringify(e.geometry)}.${e.sdfTextureSize}.${e.asFill?1:0}`;case"fill-style":return`fill_style:${e.style}`;case"animated":return JSON.stringify($(e));case"CIMGradientFill":case"CIMGradientStroke":return`gradient:${JSON.stringify(e.colorRamp)}.${e.gradientType}.${e.interval}`;case"CIMHatchFill":case"CIMVectorMarker":case"cim-point-symbol-halo":return JSON.stringify(e)}}async _rasterizeSprite(e,t){if(!e)return null;const i=c(this._hashSpriteResource(e));if(this._spriteMosaic.has(i))return this._spriteMosaic.getSpriteItem(i);if("url"in e&&e.url&&"animated"!==e.type||"CIMPictureFill"===e.type||"CIMPictureStroke"===e.type||"CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type||"cim-point-symbol-halo"===e.type){const t="cim-point-symbol-halo"===e.type?e.symbol:{type:"CIMPointSymbol",symbolLayers:[e]};await u.normalizeSymbolAndFetchResources(t,this._resourceManager)}switch(e.type){case"CIMPictureMarker":return"CIMMarkerPlacementInsidePolygon"===e.markerPlacement?.type?this._rasterizeJSONResource(i,e):this._handleAsyncResource(i,e,t);case"animated":case"CIMPictureFill":case"CIMPictureStroke":case"path":return this._handleAsyncResource(i,e,t);case"CIMGradientFill":case"CIMGradientStroke":case"CIMHatchFill":case"CIMVectorMarker":case"cim-point-symbol-halo":case"dash":case"fill-style":case"sdf":return this._rasterizeJSONResource(i,e)}}_rasterizeJSONResource(e,t){const i=this._rasterizer.rasterizeJSONResource(t);if(i){const{size:r,image:s,sdf:a,simplePattern:n,rasterizationScale:o,samplingMode:c,sdfPaddingRatio:l,sdfDecodeCoeff:u}=i;return this._addItemToMosaic(e,r,{type:"static",data:s},b(t),a,n,o,c,l,u)}return null}async _handleAsyncResource(e,t,i){if(this._ongoingRasterizations.has(e))return this._ongoingRasterizations.get(e);let r;return r="path"===t.type?this._handleSVG(t,e,i):this._handleImage(t,e,i),this._ongoingRasterizations.set(e,r),r.finally(()=>this._ongoingRasterizations.delete(e)),r}async _handleSVG(e,t,i){const r=[p,p],{asFill:s}=e,a=await this._sdfConverter.draw(e.path,s,i);return this._addItemToMosaic(t,r,{type:"static",data:new Uint32Array(a.buffer)},!1,!0,!0)}_handleGIFOrPNG(e,t,i){const r=e.url,s=this.resourceManager.getResource(r);if(null==s)return null;const{width:a,height:n}=s;if(s instanceof HTMLImageElement){if("animated"===e.type)return C("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;const i="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:r,sdf:o,image:c}=this._rasterizer.rasterizeImageResource(a,n,s,i);return this._addItemToMosaic(t,r,{type:"static",data:c},b(e),o,!1)}let o,c,l;"animated"===e.type?(o=!1,c={type:"CIMAnimatedSymbolProperties",playAnimation:e.playAnimation,reverseAnimation:e.reverseAnimation,randomizeStartTime:e.randomizeStartTime,randomizeStartSeed:e.randomizeStartSeed,startTimeOffset:e.startTimeOffset,duration:e.duration,repeatType:e.repeatType,repeatDelay:e.repeatDelay},l=e.startGroup||0):(o=b(e),c={type:"CIMAnimatedSymbolProperties",playAnimation:!0},l=0);const u=new w(s,this._requestRender,c,l);return this._addItemToMosaic(t,[u.width,u.height],{type:"animated",data:u},o,!1,!1)}async _handleImage(e,t,r){const s=e.url;if(v(s)||j(s))return this._handleGIFOrPNG(e,t,r);if("animated"===e.type)return C("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;try{let i;const a=this.resourceManager.getResource(s);if(null!=a&&a instanceof HTMLImageElement)i=a;else{const{data:e}=await this._imageRequestQueue.push(s,{...r});i=e}if(R(s))if("width"in e&&"height"in e)i.width=o(e.width),i.height=o(e.height);else if("cim"in e){const t=e;i.width=o(t.width??t.scaleX*t.size),i.height=o(t.size)}if(!i.width||!i.height)return null;const n=i.width,c=i.height,l="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:u,sdf:m,image:h}=this._rasterizer.rasterizeImageResource(n,c,i,l);return this._addItemToMosaic(t,u,{type:"static",data:h},b(e),m,!1)}catch(C){if(!a(C))throw new i("mapview-invalid-resource",`Could not fetch requested resource at ${s}. ${C.message}`);throw C}}_addItemToMosaic(e,t,i,r,s,a,n,o,c,l){return this._spriteMosaic.addSpriteItem(e,t,i,r,s,a,n,o,c,l)}}function R(e){return e.includes("data:image/svg+xml")}function k(e){if(null==e)return"";const{type:t}=e;switch(t){case"CIMMarkerPlacementAlongLineRandomSize":return`${t}-${e.seed}-${e.randomization}`;case"CIMMarkerPlacementAlongLineVariableSize":return`${t}-${e.maxRandomOffset}-${e.numberOfSizes}-${e.seed}-${e.variationMethod}`;case"CIMMarkerPlacementAtExtremities":return`${t}-${e.extremityPlacement}-${e.offsetAlongLine}`;case"CIMMarkerPlacementAtRatioPositions":return`${t}-${e.beginPosition}-${e.endPosition}-${e.flipFirst}-${JSON.stringify(e.positionArray)}`;case"CIMMarkerPlacementAtMeasuredUnits":return`${t}-${e.interval}-${e.skipMarkerRate}-${e.placeAtExtremities}`;case"CIMMarkerPlacementInsidePolygon":return`${t}-${e.stepX}-${e.stepY}-${e.randomness}-${e.gridType}-${e.seed}-${e.shiftOddRows}`;case"CIMMarkerPlacementOnLine":return`${t}-${e.relativeTo}-${e.startPointOffset}`;case"CIMMarkerPlacementOnVertices":return`${t}-${e.placeOnControlPoints}-${e.placeOnEndPoints}-${e.placeOnRegularVertices}`;case"CIMMarkerPlacementPolygonCenter":return`${t}-${e.method}`;default:return`${t}`}}function b(e){switch(e.type){case"CIMVectorMarker":case"CIMPictureMarker":return O(e);case"cim-point-symbol-halo":return!1;default:return!0}}const x=e=>null!=e&&e.startsWith("data:image/gif"),v=e=>e&&(e.includes(".gif")||x(e)),A=e=>null!=e&&e.startsWith("data:image/png"),j=e=>e&&(e.includes(".png")||A(e)),O=e=>e&&"markerPlacement"in e&&e.markerPlacement&&"CIMMarkerPlacementInsidePolygon"===e.markerPlacement.type;export{T as TextureManager};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const t=8,e=t-2,c=1e-30,h=64,i=4294967295,o=512,a=256,d=256/360,n=128,p=16777216,r=!1,s=128,f=8,g=10,l=29,m=.25,v=4,w=10,x=1,b=16,j=16,k=o/s,q=8,u=50,y=10,z=24,A=3,B=24,C=8,D=3,E=24,F=8,G=4,H={metrics:{width:15,height:17,left:0,top:-7,advance:14}},I=1024,J=0,K=0,L=0,M=1,N=2,O=3,P=4,Q=5,R=6,S=11,T=12,U=13,V=5,W=6,X=5,Y=6,Z=6,$=1
|
|
2
|
+
const t=8,e=t-2,c=1e-30,h=64,i=4294967295,o=512,a=256,d=256/360,n=128,p=16777216,r=!1,s=128,f=8,g=10,l=29,m=.25,v=4,w=10,x=1,b=16,j=16,k=o/s,q=8,u=50,y=10,z=24,A=3,B=24,C=8,D=3,E=24,F=8,G=4,H={metrics:{width:15,height:17,left:0,top:-7,advance:14}},I=1024,J=0,K=0,L=0,M=1,N=2,O=3,P=4,Q=5,R=6,S=11,T=12,U=13,V=5,W=6,X=5,Y=6,Z=6,$=Z+1,_=1<<Z,tt=1<<$,et=!1,ct=1.05,ht=3,it=1,ot=3,at=3,dt=512,nt=5,pt=6,rt=1.15,st=2,ft=4,gt=128,lt=256,mt=lt-2*ft,vt=2,wt=128,xt=1,bt=8,jt=500,kt=4,qt=128,ut=1024,yt=2,zt=0,At=1,Bt=4,Ct=8,Dt=16,Et=4,Ft=1,Gt=4,Ht=8,It=32,Jt=64,Kt=128,Lt=4,Mt=1,Nt=1<<20,Ot=.75,Pt=10,Qt=.75,Rt=12,St=256,Tt=32,Ut=512,Vt=0,Wt=1;export{Mt as MAX_TILE_RESHUFFLES_PER_FRAME,Pt as RESHUFFLING_EXEMPT_DRAW_CALLS,Nt as RESHUFFLING_EXEMPT_MEMORY_BYTES,Qt as RESHUFFLING_TARGET_DRAW_EFFICIENCY,Ot as RESHUFFLING_TARGET_MEMORY_EFFICIENCY,N as animationUnit,St as attributeStoreInitialSize,I as attributeStoreTextureSize,H as averageGlyphMosaicItem,Wt as backbufferStencilClipped,Vt as backbufferStencilVisible,It as bitsetFillHasPatternHeightPrecisionFactor,Jt as bitsetFillHasPatternWidthPrecisionFactor,Ht as bitsetFillHasUnresolvedReplacementColor,Gt as bitsetFillRandomPatternOffset,Dt as bitsetGenericConsiderAlphaOnly,yt as bitsetGenericLockColor,Et as bitsetLineScaleDash,At as bitsetMarkerAlignmentMap,zt as bitsetMarkerAlignmentScreen,Bt as bitsetMarkerOutlineAllowColorOverride,Ct as bitsetMarkerScaleSymbolsProportionally,Ft as bitsetTypeFillOutline,qt as bufferDataMinimumSize,kt as bufferDataPoolSize,g as chartMaxFields,j as collisionBoxPadding,s as collisionBucketSize,b as collisionEarlyRejectBucketSize,x as collisionMaxZoomDelta,q as collisionPlacementPadding,k as collisionTileBoxSize,n as compressionFactorForU16,P as dataDrivenUnit0,Q as dataDrivenUnit1,R as dataDrivenUnit2,r as debugLabels,gt as defaultSdfTextureSize,bt as displayRecordIntPerElement,f as dotDensityMaxFields,$ as effectBitIndex,tt as effectFlag0,et as enableEarlyLabelDiscard,h as extrudeScale,_ as filterFlag0,M as filterFlagsUnit,z as glyphSize,T as gpgpuUnit,xt as gradientTextureExternalPadding,y as heuristicGlyphsPerFeature,u as heuristicGlyphsPerLine,dt as hittestMaskTextureSize,S as hittestMaskTextureUnit,at as hittestSmallSymbolThreshold,it as hittestToleranceDesktop,ht as hittestToleranceMobile,ot as hittestToleranceSmallSymbol,G as labelPlacementOffsetPadding,w as labelU16ZoomPrecisionFactor,U as localTimeOriginUnit,l as magicLabelLineHeight,Rt as maxGeohashLevel,st as maxGpuUploadsPerFrame,Z as maxHighlightGroups,v as maxLineHeightRatio,p as maxRepresentableInt,Ut as maxTextLineWidth,m as minLineHeightRatio,Tt as minTextLineWidth,c as nanMagicNumber,d as packDegreesU8,jt as patchPixelBufferAllocSize,vt as patternFillRasterizationScale,i as pictureFillColor,ut as randomInsidePolygonTextureSize,a as rasterTileSize,wt as rasterizedVectorMarkerMinSize,D as sdfBufferGlyphSDFCreator,A as sdfBufferServer,F as sdfRadiusComplex,C as sdfRadiusSimple,E as sdfSizeComplex,B as sdfSizeSimple,ft as spritePadding,mt as svgSdfTextureInnerSize,lt as svgSdfTextureSize,L as textureBindingBitmap,K as textureBindingGlyphAtlas,V as textureBindingHighlight0,W as textureBindingHighlight1,X as textureBindingRenderer0,Y as textureBindingRenderer1,J as textureBindingSpriteAtlas,Lt as textureUploadManagerBudget,Kt as textureUploadManagerChunkSize,ct as thinLineHalfWidthThreshold,o as tileSize,O as visualVariableUnit,rt as vtlHighResCutoff,pt as vtlTextureBindingUnitGlyphs,nt as vtlTextureBindingUnitSprites,e as webglMaxInnerStops,t as webglMaxStops};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import o from"../../../../../../core/Logger.js";import{
|
|
2
|
+
import o from"../../../../../../core/Logger.js";import{maxHighlightGroups as i}from"../../definitions.js";import{shadeTextureSize as t,sigma as e}from"./parameters.js";import l from"../../../../../support/HighlightOptions.js";import r from"../../../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../../../webgl/TextureDescriptor.js";const n=()=>o.getLogger("esri.views.2d.engine.webgl.painter.highlight.HighlightGradient");function s(o,i){i.fillColor[0]=o.color.r/255,i.fillColor[1]=o.color.g/255,i.fillColor[2]=o.color.b/255,i.fillColor[3]=o.color.a,o.haloColor?(i.outlineColor[0]=o.haloColor.r/255,i.outlineColor[1]=o.haloColor.g/255,i.outlineColor[2]=o.haloColor.b/255,i.outlineColor[3]=o.haloColor.a):(i.outlineColor[0]=i.fillColor[0],i.outlineColor[1]=i.fillColor[1],i.outlineColor[2]=i.fillColor[2],i.outlineColor[3]=i.fillColor[3]),i.fillColor[3]*=o.fillOpacity,i.outlineColor[3]*=o.haloOpacity,i.fillColor[0]*=i.fillColor[3],i.fillColor[1]*=i.fillColor[3],i.fillColor[2]*=i.fillColor[3],i.outlineColor[0]*=i.outlineColor[3],i.outlineColor[1]*=i.outlineColor[3],i.outlineColor[2]*=i.outlineColor[3],i.outlineWidth=(1-o.haloBlur)*o.haloWidth,i.outerHaloWidth=o.haloBlur*o.haloWidth/2,i.innerHaloWidth=o.haloBlur*o.haloWidth/2,i.outlinePosition=0}const a=[0,0,0,0];class u{constructor(){this.type="single",this._highlightOptions=new l,this._convertedHighlightOptions={fillColor:[0,0,0,0],outlineColor:[0,0,0,0],outlinePosition:0,outlineWidth:0,innerHaloWidth:0,outerHaloWidth:0},this._optionsShadeTexKey="",this._texelData=new Uint8Array(4*t),this._minMaxDistance=[0,0]}setHighlightOptions(o){this._highlightOptions=o}getProgramState(o){return this._updateGradientTexture(o),{minMaxDistance:this._minMaxDistance,shadeTexture:this._shadeTex}}destroy(){this._shadeTex?.dispose(),this._shadeTex=null}getGroupsWithGradients(){return[{activeGroups:(1<<i)-1,activeGradient:this}]}_updateGradientTexture(o){const i=d(this._highlightOptions);if(i===this._optionsShadeTexKey)return;this._optionsShadeTexKey=i,s(this._highlightOptions,this._convertedHighlightOptions);const l=this._convertedHighlightOptions,u=l.outlinePosition-l.outlineWidth/2-l.outerHaloWidth,g=l.outlinePosition-l.outlineWidth/2,f=l.outlinePosition+l.outlineWidth/2,C=l.outlinePosition+l.outlineWidth/2+l.innerHaloWidth,p=Math.sqrt(Math.PI/2)*e,c=Math.abs(u)>p?Math.round(10*(Math.abs(u)-p))/10:0,m=Math.abs(C)>p?Math.round(10*(Math.abs(C)-p))/10:0;let x;c&&!m?n().error("The outer rim of the highlight is "+c+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards positive values (inwards)."):!c&&m?n().error("The inner rim of the highlight is "+m+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards negative values (outwards)."):c&&m&&n().error("The highlight is "+Math.max(c,m)+"px away from the edge of the feature; consider reducing some width values.");const _=[void 0,void 0,void 0,void 0];function w(o,i,t){_[0]=(1-t)*o[0]+t*i[0],_[1]=(1-t)*o[1]+t*i[1],_[2]=(1-t)*o[2]+t*i[2],_[3]=(1-t)*o[3]+t*i[3]}const{_texelData:v}=this;for(let e=0;e<t;++e)x=u+e/(t-1)*(C-u),x<u?(_[0]=0,_[1]=0,_[2]=0,_[3]=0):x<g?w(a,l.outlineColor,(x-u)/(g-u)):x<f?[_[0],_[1],_[2],_[3]]=l.outlineColor:x<C?w(l.outlineColor,l.fillColor,(x-f)/(C-f)):[_[0],_[1],_[2],_[3]]=l.fillColor,v[4*e]=255*_[0],v[4*e+1]=255*_[1],v[4*e+2]=255*_[2],v[4*e+3]=255*_[3];if(this._minMaxDistance[0]=u,this._minMaxDistance[1]=C,!this._shadeTex){const i=new h(t,1);i.wrapMode=33071,this._shadeTex=new r(o,i)}this._shadeTex.updateData(0,0,0,t,1,this._texelData)}}function d(o){return`${o.color};${o.haloColor};${o.haloOpacity};${o.fillOpacity};${o.haloWidth};${o.haloBlur}`}export{u as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"./HighlightGradient.js";class s{constructor(){this.type="multi",this.gradients=[]}setHighlightOptions(s){for(let
|
|
2
|
+
import t from"./HighlightGradient.js";class s{constructor(){this.type="multi",this.gradients=[]}setHighlightOptions(s){for(let i=0;i<s.length;i++)this.gradients[i]||(this.gradients[i]=new t),this.gradients[i].setHighlightOptions(s[i]);for(let t=s.length+1;t<this.gradients.length;t++)this.gradients[t].destroy();this.gradients.length=s.length}destroy(){for(const t of this.gradients)t.destroy()}getGroupsWithGradients(){let t=1;const s=[];for(let i=0;i<this.gradients.length;i++){const e=this.gradients[i];s.push({activeGroups:t,activeGradient:e}),t<<=1}return s}}export{s as MultiHighlightGradient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{maxRepresentableInt as t,hittestMaskTextureUnit as e,tileSize as n}from"../../definitions.js";const i={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},s={color:{write:[!0,!0,!0,!0],blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1},blendEquation:32776,blendMode:"custom"},depth:!1,stencil:!1},o={...i,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function r(t){return"highlight"===t.passOptions?.type}function l(t){return"hittest"===t.passOptions?.type}function c(t){if(!l(t))return null;const{target:e,distance:n,smallSymbolDistance:i,smallSymbolSizeThreshold:s,hittestType:o}=t.passOptions,r=[e[0],e[1]],c=4===e.length?e:[-1,-1,-1,-1],u="point"===o?0:"rect"===o?1:2;return{position:r,distance:n,smallSymbolDistance:i,smallSymbolSizeThreshold:s,viewSize:t.state.size,rect:c,hittestType:u}}function u(t){if(!r(t))return null;const{
|
|
2
|
+
import{maxRepresentableInt as t,hittestMaskTextureUnit as e,tileSize as n}from"../../definitions.js";const i={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},s={color:{write:[!0,!0,!0,!0],blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1},blendEquation:32776,blendMode:"custom"},depth:!1,stencil:!1},o={...i,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function r(t){return"highlight"===t.passOptions?.type}function l(t){return"hittest"===t.passOptions?.type}function c(t){if(!l(t))return null;const{target:e,distance:n,smallSymbolDistance:i,smallSymbolSizeThreshold:s,hittestType:o}=t.passOptions,r=[e[0],e[1]],c=4===e.length?e:[-1,-1,-1,-1],u="point"===o?0:"rect"===o?1:2;return{position:r,distance:n,smallSymbolDistance:i,smallSymbolSizeThreshold:s,viewSize:t.state.size,rect:c,hittestType:u}}function u(t){if(!r(t))return null;const{activeGroups:e,highlightAll:n}=t.passOptions;return{activeGroups:e,highlightAll:n?1:0}}function a(t,e,n){const i={};for(const s in n)"function"!=typeof n[s]?i[s]=n[s]:i[s]=n[s](t,e);return i}function p(t){return{storage:t.attributeView.getUniforms(),hittestRequest:c(t),highlight:u(t)}}function h(t){if(!l(t)||"polygon"!==t.passOptions.hittestType)return null;const n=t.painter.effects.hittest.getHittestMaskTexture();return n?{texture:n,unit:e}:null}function f(t){return t.attributeView.getTextures(t.context)}function d(t){return{storageTextures:f(t),hittestMaskTexture:h(t)}}function g(t){return{inside:2===t.selection,outside:3===t.selection}}function m(t){return l(t)?s:r(t)&&"clear"===t.passOptions.stepType?o:i}function y(e){const{row:i,col:s}=e.key,o=s*n,r=i*n;return{tileOffsetFromLocalOrigin:[o%t,r%t],maxIntsToLocalOrigin:[Math.floor(o/t),Math.floor(r/t)]}}export{h as getFeatureHittestTexture,m as getFeaturePipelineState,f as getFeatureStorageTextures,d as getFeatureTextures,p as getFeatureUniforms,y as getLocalTileOffset,g as getSelectionDefines,r as isHighlight,l as isHittest,a as resolveDynamicUniforms};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import{maxHighlightGroups as e}from"../../../definitions.js";import{location as i,define as o,option as r,uniform as s,texture as l,VertexInput as a,ComputeVertexInput as h,GraphShaderModule as n,FragmentOutput as g,FragmentInput as u}from"../../GraphShaderModule.js";import{Vec3 as p,Float as d,Vec2 as m,Sampler2D as c,float as y,step as w,Vec4 as b,equal as f,ifElse as x,or as v}from"../../graph/glsl.js";import{trueHit as T,candidateHit as V,noHit as C}from"./constants.js";import{EntityStorage as H,EntityStorageTextures as D}from"./EntityStorage.js";import{ShaderHighlight as j}from"./ShaderHighlight.js";import{ShaderHittest as A}from"./ShaderHittest.js";import{Tile as _}from"./Tile.js";import{TileInfo as S}from"./TileInfo.js";import{getFilterBit as F,getHighlightBit as R,getBit as k,uvToClip as P}from"./utils.js";import{ViewInfo as I}from"./ViewInfo.js";class O extends a{}t([i(0,p)],O.prototype,"id",void 0),t([i(1,d)],O.prototype,"bitset",void 0),t([i(2,m)],O.prototype,"pos",void 0);class z extends h{}t([i(14,m)],z.prototype,"nextPos1",void 0),t([i(15,m)],z.prototype,"nextPos2",void 0);class q extends u{}class B extends n{clip(t,e){let i=new d(0);const o=this.getFilterFlags(t);if(i=i.add(y(2).multiply(y(1).subtract(F(o,0)))),this.inside?i=i.add(y(2).multiply(y(1).subtract(F(o,1)))):this.outside?i=i.add(y(2).multiply(F(o,1))):this.highlight&&(i=i.add(y(2).multiply(y(1).subtract(this._checkHighlight(o))))),null!=e){const t=new d(1).subtract(w(e.x,this.tileInfo.currentZoom)),o=w(e.y,this.tileInfo.currentZoom);i=i.add(new d(2).multiply(t.add(o)))}return i}getFragmentOutput(t,e,i=new d(1/255)){const o=new g;return o.fragColor=this._maybeWriteHittest(e)??this._maybeHighlight(t,i)??t,o}_maybeHighlight(t,e){return this.highlight?new b(t.rgb,w(e,t.a)):null}_checkHighlight(t){let i=this._checkHighlightBit(t,0);for(let o=1;o<e;o++)i=i.add(this._checkHighlightBit(t,o));return w(new d(.1),i.add(this.highlight.highlightAll))}_checkHighlightBit(t,e){return R(t,e).multiply(k(this.highlight.activeGroups,e))}computeHittestTriangle(t,e,i){const o=this.tile.getViewScreenMat3(this.view),{nextPos1:r,nextPos2:s}=e;return{pos0:o.multiply(new p(t.pos,1)).xy,pos1:o.multiply(new p(r,1)).xy,pos2:o.multiply(new p(s,1)).xy}}maybeRunHittest(t,e,i){if(null==this.hittestRequest)return null;const o=this.hittest(t,e,i),r=f(o,new d(T)),s=f(o,new d(V)),l=x(s,()=>new b(new d(1/255),0,0,0),x(r,()=>new b(new d(2/255),0,0,0),new b(C)));let a=x(v(r,s),new d(0),new d(2));const h=this.getAttributeDataCoords(t.id),n=P(h);return a=a.add(this.clip(t.id,t.zoomRange)),{glPointSize:new d(1),glPosition:new b(n,a,1),color:l}}_maybeWriteHittest(t){return null!=this.hittestRequest?t.color:null}getAttributeDataCoords(t){return this.storage.getAttributeDataCoords(t)}getVVData(t){return this.storageTextures.getVVData(this.getAttributeDataCoords(t))}getFilterFlags(t){return this.storageTextures.getFilterFlags(this.getAttributeDataCoords(t))}getLocalTimeOrigin(t){return this.storageTextures.getLocalTimeOrigin(this.getAttributeDataCoords(t))}getSizeValue(t){return this.storageTextures.getSizeValue(this.getAttributeDataCoords(t))}getColorValue(t){return this.storageTextures.getColorValue(this.getAttributeDataCoords(t))}getOpacityValue(t){return this.storageTextures.getOpacityValue(this.getAttributeDataCoords(t))}getRotationValue(t){return this.storageTextures.getRotationValue(this.getAttributeDataCoords(t))}}t([o],B.prototype,"inside",void 0),t([o],B.prototype,"outside",void 0),t([r(j)],B.prototype,"highlight",void 0),t([s(H)],B.prototype,"storage",void 0),t([l(D)],B.prototype,"storageTextures",void 0),t([l(c)],B.prototype,"hittestMaskTexture",void 0),t([s(I)],B.prototype,"view",void 0),t([s(S)],B.prototype,"tileInfo",void 0),t([s(_)],B.prototype,"tile",void 0),t([r(A)],B.prototype,"hittestRequest",void 0);export{B as AFeatureShader,z as BaseHittestVertexInput,q as FeatureFragmentInput,O as FeatureVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import{uniform as r,UniformGroup as t}from"../../GraphShaderModule.js";import{Float as p}from"../../graph/glsl.js";class
|
|
2
|
+
import{__decorate as o}from"tslib";import{uniform as r,UniformGroup as t}from"../../GraphShaderModule.js";import{Float as p}from"../../graph/glsl.js";class i extends t{}o([r(p)],i.prototype,"activeGroups",void 0),o([r(p)],i.prototype,"highlightAll",void 0);export{i as ShaderHighlight};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{maxHighlightGroups as t}from"../../../definitions.js";import{Float as n,float as r,vec3 as u,mod as c,floor as i,equal as o,vec4 as e,dot as f,vec2 as s,fract as l,sin as a,greaterThan as m,max as p,Vec4 as b,divide as d}from"../../graph/glsl.js";import{nanMagicNumber as y}from"./constants.js";function w(t){const n=r(12.9898),u=r(78.233),i=r(43758.5453),o=f(t,s(n,u)),e=c(o,r(3.14));return l(a(e).multiply(i))}function x(t){return o(t,r(y))}function j(t){return d(t,r(255))}function z(t,n){return t.x.multiply(n.y).subtract(n.x.multiply(t.y))}function g(t){return t.multiply(2).subtract(1)}function v(t){return t.multiply(.5).add(.5)}function h(t,n){const u=r(2**n);return c(i(t.divide(u)),r(2))}function k(t,n){return m(h(t,n),r(.5))}function q(n,r){return h(n,r+t)}function A(t,n){return h(t,n)}function B(t){const n=h(t.z,7),c=r(1).subtract(n),i=t.xyz.subtract(u(0,0,r(128)));return c.multiply(t).add(n.multiply(i))}function C(t){const n=e(255/256,255/65536,255/16777216,255/4294967296);return f(t,n)}function D(t){return p(p(p(t.x,t.y),t.z),t.w)}function E(t){return new n(1).subtract(t)}function F(t){return t.subtract(new n(1))}function G(t){return new n(1).divide(t)}function H(t,r){return new n(t).subtract(r)}function I(t,r){return t.subtract(new n(r))}function J(t,n,r,u){let c=new b(0);const i=new b(0);return c=K(c,t,i),c=K(c,n,i),c=K(c,r,i),c=K(c,u,i),c}function K(t,n,r){const u=n.subtract(r),c=t.add(u);return r=c.subtract(t).subtract(u),c}export{v as clipToUv,z as cross2,h as getBit,k as getBitBool,q as getFilterBit,A as getHighlightBit,x as isNan,K as kahanSummation,D as max4,F as minusOne,I as minusScalar,j as norm,E as oneMinus,G as oneOver,w as rand,C as rgba2float,H as scalarMinus,J as sum4,B as unpackDisplayIdTexel,g as uvToClip};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../AggregateGraphic.js";import r from"../../../Graphic.js";import s from"../../../TrackGraphic.js";import{isSome as i}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{makeHandle as n,handlesGroup as l}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import u from"../../../core/Logger.js";import{destroyMaybe as h}from"../../../core/maybe.js";import{notDeepEqual as c}from"../../../core/object.js";import{createAbortError as p,ignoreAbortErrors as d,throwIfNotAbortError as y,isAbortError as m}from"../../../core/promiseUtils.js";import{watch as g,sync as f}from"../../../core/reactiveUtils.js";import{sqlAnd as w}from"../../../core/sql.js";import{getMetersPerUnitForSR as v}from"../../../core/units.js";import{property as _,subclass as b}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as S}from"../../../core/support/UpdatingHandles.js";import A from"../../../geometry/Extent.js";import{fromJSON as F}from"../../../geometry/support/jsonUtils.js";import j from"../../../geometry/support/rotate.js";import{isCurvedGeometry as x}from"../../../geometry/support/curves/curveUtils.js";import{densifyCurvedGeometry as R}from"../../../geometry/support/curves/densifyCurvedGeometry.js";import E from"../../../layers/effects/FeatureEffectView.js";import{convertFromFeature as I}from"../../../layers/graphics/featureConversionUtils.js";import k from"../../../layers/support/FeatureFilter.js";import{checkServiceCurrentUserSupport as O}from"../../../layers/support/featureLayerUtils.js";import{packFields as U}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as V}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as C}from"../../../layers/support/timeSupport.js";import Q from"../../../rest/support/AggregateFeatureSet.js";import q from"../../../rest/support/AttributeBinsFeatureSet.js";import M from"../../../rest/support/AttributeBinsQuery.js";import P from"../../../rest/support/FeatureSet.js";import H from"../../../rest/support/Query.js";import{HittestDrawHelper as L}from"../../../symbols/cim/CIMSymbolDrawHelper.js";import{symbolToCIM as T}from"../../../symbols/cim/CIMSymbolHelper.js";import{getDisplayedSymbol as W}from"../../../symbols/support/symbolUtils.js";import{LayerView2D as D}from"./LayerView2D.js";import{FeatureContainer as G}from"./features/FeatureContainer.js";import{createFeaturePipelineWorkerProxy as N}from"./features/FeaturePipelineWorkerProxy.js";import{FeatureSourceEventLog as J}from"./features/FeatureSourceEventLog.js";import{AnnotationLayerAdapter as z}from"./features/layerAdapters/AnnotationLayerAdapter.js";import{CatalogFootprintLayerAdapter as B}from"./features/layerAdapters/CatalogFootprintLayerAdapter.js";import{DimensionLayerAdapter as Z}from"./features/layerAdapters/DimensionLayerAdapter.js";import{FeatureLayerAdapter as K}from"./features/layerAdapters/FeatureLayerAdapter.js";import{createFeatureIdInfo as $}from"./features/layerAdapters/featureServiceUtils.js";import{InMemoryLayerAdapter as X}from"./features/layerAdapters/InMemoryLayerAdapter.js";import{KnowledgeGraphSublayerAdapter as Y}from"./features/layerAdapters/KnowledgeGraphSublayerAdapter.js";import{OGCFeatureLayerAdapter as ee}from"./features/layerAdapters/OGCFeatureLayerAdapter.js";import{OrientedImageryLayerAdapter as te}from"./features/layerAdapters/OrientedImageryLayerAdapter.js";import{ParquetLayerAdapter as re}from"./features/layerAdapters/ParquetLayerAdapter.js";import{StreamLayerAdapter as se}from"./features/layerAdapters/StreamLayerAdapter.js";import{SubtypeGroupLayerAdapter as ie}from"./features/layerAdapters/SubtypeGroupLayerAdapter.js";import{createComplexSymbolInstances as ae}from"./features/schema/processor/symbols/ComplexSymbolSchema.js";import{DebouncedFeatureOverride as oe}from"./support/DebouncedFeatureOverride.js";import{FeatureCommandQueue as ne}from"./support/FeatureCommandQueue.js";import{handleNoEngineError as le}from"./support/handleNoEngineError.js";import{toJSONGeometryType as ue}from"./support/util.js";import{getMapPointsFromScreen as he,getHittestType as ce}from"../support/hitTestUtils.js";import{FeatureTileSubscriptionManager as pe}from"../tiling/FeatureTileSubscriptionManager.js";import{RefreshableLayerView as de}from"../../layers/RefreshableLayerView.js";import{getHighlightName as ye}from"../../support/highlightOptionsUtils.js";function me(e,t){const r=new Set;return e&&e.forEach(e=>r.add(e)),t&&t.forEach(e=>r.add(e)),r.has("*")?["*"]:Array.from(r)}const ge=4294967294;function fe(e,t){return l(e.map(e=>g(()=>{const t=e();return t&&"object"==typeof t?"getTime"in t&&"function"==typeof t.getTime?t.getTime():JSON.stringify(t):t},t,f)))}function we(e){if(!e.geometry)return e;if(!x(e.geometry))return e;const t=.001/v(e.geometry.spatialReference),r=100;return{geometry:R(e.geometry,{maxSegmentsPerCurve:12e3,maxSegmentLength:r*t,maxDeviation:0}),attributes:e.attributes}}const ve=l=>{const f=de(D(l));let v=class extends f{constructor(){super(...arguments),this._commandsQueue=new ne({process:e=>{switch(e.type){case"override-batch":return this._doOverride(e);case"update":return this._doUpdate();case"highlight":return this._updateHighlights()}}}),this._visibilityOverrides=new Set,this._lastAvailableFields=[],this._lastTargetState=null,this._stationaryRotation=0,this.eventLog=new J,this._sourceRefreshVersion=1,this._displayRefreshVersion=1,this._pipelineUpdating=!1,this._editUpdatingHandles=new S,this._fields=null,this._hittestDrawHelper=null,this._sourceUpdating=!1,this.featureEffectView=new E}destroy(){this._editUpdatingHandles.destroy(),this._workerProxy?.destroy(),this._workerAttached.reject(p()),this._commandsQueue.destroy(),this._hittestDrawHelper?.destroy()}initialize(){this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this.addResolvingPromise(this._initProxy()),this.featureEffectView.featureEffect=this.featureEffect,this.featureEffectView.endTransition()}async _initProxy(){const e=this.layer;if("isTable"in e&&e.isTable)throw new o("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e});if(("feature"===e.type||"subtype-group"===e.type)&&!1===V(e)?.operations.supportsQuery)throw new o("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e});this._workerProxy&&this._workerProxy.destroy();const t=this._createClientOptions();this._workerProxy=await N(t)}async _attachProxy(){const e=j(this.view.extent,this.view.rotation,this.view.center),t={tileInfoJSON:this.view?.featuresTilingScheme?.tileInfo?.toJSON(),initialViewExtent:e.toJSON()};try{await this._workerProxy.pipeline.onAttach(t),this._workerAttached.resolve()}catch(r){this._workerAttached.reject(p()),y(r)}}async _detachProxy(){return this._workerProxy.pipeline.onDetach()}async getWorker(){return await this._workerAttached.promise,this._workerProxy}get dataUpdating(){return this._sourceUpdating||this._editUpdatingHandles.updating}get hasAllFeatures(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryAllFeatures}get hasAllFeaturesInView(){const e=this.effectiveDisplayFilter?.where||null,t=!this.eventLog.willQueryAllFeatures&&null!=e&&"1=1"!==e;return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&!t}get hasFullGeometries(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryFullResolutionGeometry}get layerAdapter(){switch(this.layer.type){case"annotation-feature":return new z(this.layer);case"dimension-feature":return new Z(this.layer);case"feature":return"memory"===this.layer.source.type?new X(this.layer):new K(this.layer);case"geojson":case"csv":case"wfs":return new X(this.layer);case"parquet":return new re(this.layer);case"subtype-group":return new ie(this.layer);case"ogc-feature":return new ee(this.layer);case"stream":return new se(this.layer);case"oriented-imagery":return new te(this.layer);case"knowledge-graph-sublayer":return new Y(this.layer);case"catalog-footprint":return new B(this.layer);default:this.layer}return null}get timeExtent(){return C(this.layerAdapter.timeOptions,this.view?.timeExtent,this._get("timeExtent"))}get usedMemory(){return this.container.usedMemory+this.eventLog.pipelineStatistics.usedMemory}getDisplayStatistics(e,t){return this.featureContainer?.getDisplayStatistics(e,t)}highlight(e,t){let s;e instanceof r?s=[e.getObjectId()]:"number"==typeof e||"string"==typeof e?s=[e]:a.isCollection(e)&&e.length>0?s=e.map(e=>e?.getObjectId()).toArray():Array.isArray(e)&&e.length>0&&(s="number"==typeof e[0]||"string"==typeof e[0]?e:e.map(e=>e?.getObjectId()));const o=s?.filter(i);if(!o?.length)return n();const l=ye(t);return this._addHighlights(o,l),n(()=>!this.destroyed&&this._removeHighlights(o,l))}async hitTest(e,i,a){const o=ce(i);if(!o)return null;const n="point"===o,{trueHitIds:l,candidateHitIds:u}=await this.featureContainer.hitTest(i,a??null),h=await this.getWorker(),[c,p]=await Promise.all([h.pipeline.getDisplayFeatures(u),h.pipeline.getDisplayFeatures(l)]),{features:d,aggregates:y,tracks:g}=c,{features:f,aggregates:w,tracks:v}=p,_=[];if(!n&&this.hasRenderer()){const e=new Map,t=new r;for(const r of d){t.attributes=r.attributes,t.geometry=F(r.geometry),t.symbol=null;const s=this.layerAdapter.getRenderer(t);if(!s){_.push(r);continue}const i=await W(t,{renderer:s,scale:this.view.scale,resolution:this.view.resolution,spatialReference:this.view.spatialReference,viewingMode:"2d",timeZone:this.view.timeZone});if(!i)continue;let a=null;const o=T(i);if("web-style"===o.type)try{const e=T(await o.fetchSymbol({acceptedFormats:["cim","web"]}));a="web-style"===e.type?null:e}catch(R){m(R),0;continue}else a=o;const n=a?.symbol;if(!n)continue;const l=this.view.stage.cimAnalyzer.analyzeSymbolReference(a,!1).some(e=>"alignment"in e&&0===e.alignment);e.set(r,{cimSymbol:n,isScreenAligned:l})}e.size>0&&!this._hittestDrawHelper&&(this._hittestDrawHelper=new L(this.view.stage.painter.textureManager.resourceManager));const{resolution:s,rotation:a}=this.view.state,n=he(this.view,i);for(const[r,{cimSymbol:i,isScreenAligned:l}]of e){if(!r)continue;const e={hittestType:o,textInfo:null,mapRotation:a,resolution:s,searchDist:0,isScreenAligned:l};this._hittestDrawHelper.hitTest(n,i,r.geometry,e)&&_.push(r)}}else _.push(...d);const b=[...f,..._],S=[...w,...y],A=[...v,...g],j=this.featureContainer.getSortKeys(b.map(e=>e.displayId)),x=({displayId:e},{displayId:t})=>j.has(e)&&j.has(t)?j.get(e)-j.get(t):e-t;return b.sort(x).reverse(),S.sort(x).reverse(),[...S.map(r=>this._createAggregateGraphicHit(e,t.fromJSON(r))),...A.map(t=>this._createTrackGraphicHit(e,s.fromJSON(t))),...b.map(t=>this._createFeatureGraphicHit(n?e:null,r.fromJSON(t)))]}async queryAggregateSummaryStatistics(e,t,r){const s={...t,scale:this.view.scale},i=(await this.getWorker()).aggregates.executeQueryForSummaryStatistics(this._cleanUpAggregateQuery(e),s,r);return le(i,{})}async queryUniqueValues(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForUniqueValues(this._cleanUpQuery(e),i,r);return le(a,{uniqueValueInfos:[]})}async queryAggregateUniqueValues(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForUniqueValues(this._cleanUpAggregateQuery(e),i,r);return le(a,{uniqueValueInfos:[]})}async queryAggregateClassBreaks(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForClassBreaks(this._cleanUpAggregateQuery(e),i,r);return le(a,{classBreakInfos:[]})}async queryHistogram(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForHistogram(this._cleanUpQuery(e),i,r);return le(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateCount(e,t){const r=(await this.getWorker()).aggregates.executeQueryForCount(this._cleanUpAggregateQuery(e),t);return le(r,0)}async queryAggregateHistogram(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForHistogram(this._cleanUpAggregateQuery(e),i,r);return le(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateIds(e,t){const r=(await this.getWorker()).aggregates.executeQueryForIds(this._cleanUpAggregateQuery(e),t);return le(r,[])}async queryAggregateJSON(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t);return le(r,{features:[]})}async queryAttributeBins(e,t){const r=(await this.getWorker()).features.executeAttributeBinsQuery(this._cleanUpAttributeBinsQuery(e),t),s=await le(r,{features:[]});return q.fromJSON(s)}async queryAggregates(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t),s=await le(r,{features:[]}),i=Q.fromJSON(s);return i.features.forEach(e=>this.layerAdapter.setAggregateGraphicOrigin?.(e)),i}async queryClassBreaks(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForClassBreaks(this._cleanUpQuery(e),i,r);return le(a,{classBreakInfos:[]})}async queryExtent(e,t){const r=(await this.getWorker()).features.executeQueryForExtent(this._cleanUpQuery(e),t),s=await le(r,{count:0,extent:null});return{count:s.count,extent:A.fromJSON(s.extent)}}async queryFeatureCount(e,t){const r=(await this.getWorker()).features.executeQueryForCount(this._cleanUpQuery(e),t);return le(r,0)}queryFeatures(e,t){return this.queryFeaturesJSON(e,t).then(e=>{const t=P.fromJSON(e);return t.features.forEach(e=>this._setOriginForFeature(e)),t})}async queryFeaturesJSON(e,t){const r=(await this.getWorker()).features.executeQuery(this._cleanUpQuery(e),t);return le(r,{features:[]})}async queryHeatmapStatistics(e){return(await this.getWorker()).pipeline.queryHeatmapStatistics(e)}async queryObjectIds(e,t){const r=(await this.getWorker()).features.executeQueryForIds(this._cleanUpQuery(e),t);return le(r,[])}async queryStatistics(){const e=await this.getWorker();return le(e.pipeline.queryStatistics(),{featureCount:0,ringCount:0,vertexCount:0})}async querySummaryStatistics(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForSummaryStatistics(this._cleanUpQuery(e),i,r);return le(a,{})}async queryVisibleFeatures(e,t){const r=(await this.getWorker()).pipeline.queryVisibleFeatures(this._cleanUpQuery(e),t),s=await le(r,{features:[]}),i=P.fromJSON(s);return i.features.forEach(e=>this._setOriginForFeature(e)),i}async getSampleFeatures(e){return(await this.getWorker()).pipeline.getSampleFeatures(e)}setVisibility(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}update(e){if(!this._subscriptions)return;this.view.animation&&!this._lastTargetState&&(this._lastTargetState=e.state.clone()),!this.view.animation&&this._lastTargetState&&(this._lastTargetState=null);const t=this.featureContainer.getPresenting(),r=this._subscriptions.update(e.targetState,this._lastTargetState,t);r&&(this.featureContainer.updateSubscriptions(r),d(this._updatingHandles.addPromise(this.getWorker().then(e=>e.pipeline.updateSubscriptions(r))))),this._subscriptions.coverage&&this.featureContainer.setCoverage(this._subscriptions.coverage)}attach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.attach"),d(this._updatingHandles.addPromise(this._workerAttached.promise)),d(this._attachProxy()),this.featureContainer=new G(this),this.container.addChild(this.featureContainer),this.view.timeline.record(`${this.layer.title} (FeatureLayer) Attach`),this._subscriptions=new pe(this.view.featuresTilingScheme),this._stationaryRotation=this.view.rotation,this.requestUpdate(),this.addAttachHandles([fe([()=>this._displayRefreshVersion,()=>"displayFilterInfo"in this.layer&&this.layer.displayFilterInfo,()=>this.timeExtent,()=>this.clips,()=>this.filter,()=>this.effectiveDisplayFilterClause,()=>this.featureEffect,()=>this._sourceRefreshVersion,()=>this.view.timeZone,()=>this.view.timeExtent,...this.layerAdapter.getUpdateHashProperties(this.view)],()=>this._update()),g(()=>this.updateSuspended,e=>{e||this._subscriptions.resume(this.featureContainer.getPresenting())}),g(()=>this.view.stationary,e=>{if(!e)return;const t=this.view.rotation;t!==this._stationaryRotation&&(this._stationaryRotation=t,this._update()),this.getWorker().then(e=>{if(this.destroyed)return;const t=j(this.view.extent,this.view.rotation,this.view.center);return e.pipeline.updateStationaryExtent(t.toJSON(),this.featureContainer.requiresRefresh)}).catch(()=>{})})]),this._update(),"stream"!==this.layer.type&&"parquet"!==this.layer.type&&"catalog-footprint"!==this.layer.type&&this.addAttachHandles(this.layer.on("edits",e=>this._editUpdatingHandles.addPromise(this._edit(e))))}detach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.detach"),this._detachProxy(),this._fields=null,this.featureContainer.destroy(),this.featureContainer=null,this._commandsQueue.clear(),this.container.removeAllChildren(),this._subscriptions=h(this._subscriptions),this._workerProxy.pipeline.onDetach(),this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this._lastAvailableFields=[],this._lastSchema=null}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}addOverrides(e){return this._commandsQueue.push({type:"override",options:{...e,release:[]}})}removeOverrides(e){for(const r of e)if(null==r)throw new o("featurelayerview:bad-override","Tried to remove an override for an invalid objectId",{objectId:r});const t={added:[],updated:[],removed:[],release:e,isWeak:!1,historicMoment:null};return this._commandsQueue.push({type:"override",options:t})}onProxyClientEvent(e){}hasRenderer(){return"renderer"in this.layer&&null!=this.layer.renderer}isUpdating(){const e=this.hasRenderer(),t=this._commandsQueue.updateTracking.updating,r=null!=this._updatingRequiredPromise,s=this.featureContainer.updating;return this.updateRequested||e&&(t||r)||s||this._pipelineUpdating||this.dataUpdating}_createClientOptions(){const e=this;return{updateSchemaStart:()=>e.updateSchemaStart(),updateSchemaEnd:t=>e.updateSchemaEnd(t),openMemoryPorts:async()=>{if(this.layerAdapter?.openMessagePorts){const e=await this.layerAdapter.openMessagePorts();return{result:e,transferList:e}}throw new Error("InternalError: Layer adapter does not support opening message ports")},openGlyphPorts:async()=>{const t=await e.container.stage.textureManager.openMessagePorts();return{result:t,transferList:t}},get container(){return e.featureContainer},setUpdating:e=>{this._set("_pipelineUpdating",e.pipeline),this._set("_sourceUpdating",e.source)},emitEvent:e=>{this.onProxyClientEvent(e)},get eventLog(){return e.eventLog},fetch:async t=>{if(has("esri-2d-stabilize-glyphs")){const r=[];for(const s of t)r.push(await e.view.stage.painter.textureManager.rasterizeItem(s));return r}return Promise.all(t.map(t=>e.view.stage.painter.textureManager.rasterizeItem(t)))},fetchDictionary:e=>Promise.all(e.map(e=>this._fetchDictionaryRequest(e))),fetchMesh:e=>Promise.all(e.map(e=>this._fetchMeshRequest(e)))}}async _fetchDictionaryRequest(e){try{if(!("renderer"in this.layer)||!this.layer.renderer||"dictionary"!==this.layer.renderer.type)throw new Error("InternalError: Expected renderer to be of type 'dictionary'");const t=this.layer.renderer,r=this._lastSchema.processor.mesh.factory.symbology;if("dictionary"!==r.type)throw new Error("InternalError: Expected schema to be of type 'dictionary'");const s={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:r.scaleExpression,viewRotation:this._stationaryRotation};this._fields||(this._fields=this.layer.fields.map(e=>e.toJSON()));const i=r.visualVariableUniforms,a=ue(this.layer.geometryType),o=await t.getSymbolForControlString(e.controlString,a,!1);if(!o||!o.data)return{type:"dictionary-response",meshes:[]};return{type:"dictionary-response",meshes:await ae({...o.data,hasTextStringTemplates:!0},{uniforms:i,path:"renderer",schemaOptions:s})}}catch(t){return{type:"dictionary-response",meshes:[]}}}async _fetchMeshRequest(e){const{layer:t}=this;try{const r={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:null,viewRotation:this._stationaryRotation};this._fields||(this._fields=t.fields.map(e=>e.toJSON()));return{type:"mesh-response",meshes:await ae({...e.symbolReference,hasTextStringTemplates:!0},{path:"anno-like",schemaOptions:r,uniforms:{visualVariableColor:null,visualVariableOpacity:null,visualVariableRotation:null,visualVariableSizeStops:null,visualVariableSizeScaleStops:null,visualVariableSizeOutlineScaleStops:null,visualVariableSizeUnitValue:null,visualVariableSizeMinMaxValue:null}})}}catch(r){return{type:"mesh-response",meshes:[]}}}_cleanUpQuery(e){const t=H.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),"returnZ"in this.layer&&(t.returnZ??=this.layer.returnZ),"returnM"in this.layer&&(t.returnM??=this.layer.returnM),t.toJSON()}_cleanUpAttributeBinsQuery(e){const t=M.from(e);return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAggregateQuery(e){const t=H.from(e)||this.createAggregateQuery();t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference);const r=t.objectIds??[];for(const s of t.aggregateIds??[])r.push(s);return t.objectIds=r,t.aggregateIds=[],t.toJSON()}async _update(){return this._commandsQueue.push({type:"update"})}_edit(e){return this._commandsQueue.push({type:"edit",event:e})}async doRefresh(e){this.attached&&(this.updateSuspended&&e||(e?this.incrementSourceRefreshVersion():this.incrementDisplayRefreshVersion()))}incrementSourceRefreshVersion(){this._sourceRefreshVersion=(this._sourceRefreshVersion+1)%ge+1}incrementDisplayRefreshVersion(){this._displayRefreshVersion=(this._displayRefreshVersion+1)%ge+1}async _resolveIdenifiers(e){const t=[],r=[];for(const a of e)null==a.objectId||-1===a.objectId?null==a.globalId?u.getLogger(this).warn("mapview-apply-edits","A feature identifier must contain either a GlobalId or ObjectId. Ignoring",{identifier:a}):r.push(a.globalId):t.push(a.objectId);const s="globalIdField"in this.layer&&this.layer.globalIdField,i=s&&this.availableFields.includes(s);if(r.length&&!i)return u.getLogger(this).error(new o("mapview-apply-edits",`Editing the specified service requires the layer's globalIdField, ${s} to be included the layer's outFields for updates to be reflected on the map`)),t;if(r.length){const e=await this._workerProxy.pipeline.getObjectIdsFromGlobalIds(r);for(const r of e)t.push(r)}return t}_resolveOverrides(e){const t=!1,r=!1,s=ue(this.layer.geometryType),i=$(this.layer),a=[];for(const n of e.added){const e=I(we(n),s,t,r,i);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.updated){const e=I(we(n),s,t,r,i);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.removed)if(null==n)throw new o("featurelayerview:bad-override","Tried to remove an invalid objectId",{objectId:n});return{type:"override",updates:a,removed:e.removed,release:e.release,isWeak:e.isWeak??!1,historicMoment:e.historicMoment??null}}async _resolveEdit(e){const t=this.layer,r=e.historicMoment?.getTime()??null,s="layerId"in t&&e.editedFeatures?.find(e=>e.layerId===t.layerId);if(s&&this._canEditByFeature(s)){const{adds:e,deletes:t,updates:i}=s.editedFeatures,a=this.layer.objectIdField,o=i.map(e=>e.current),n=t.map(e=>"attributes"in e?{objectId:a?e.attributes[a]:null}:e),l=await this._resolveIdenifiers(n);return this._resolveOverrides({added:e,updated:o,removed:l,historicMoment:r,isWeak:!0,release:[]})}const[i,a,o]=await Promise.all([this._resolveIdenifiers(e.addedFeatures),this._resolveIdenifiers(e.updatedFeatures),this._resolveIdenifiers(e.deletedFeatures)]);return{type:"override-by-id",updates:[...i,...a],removed:o,historicMoment:r,isWeak:!0}}_canEditByFeature(e){const{adds:t,updates:r}=e.editedFeatures;return t.every(e=>this.view.spatialReference.equals(e.geometry?.spatialReference))&&r.every(e=>this.view.spatialReference.equals(e.current.geometry?.spatialReference))}async updateSchemaStart(){const e=this.layer;"featureReduction"in e&&e.featureReduction&&e.featureReduction!==this._lastFeatureReduction&&(e.featureReduction=e.featureReduction?.clone(),this._lastFeatureReduction=e.featureReduction);try{if(await Promise.allSettled([this._handleChange(),O(e)]),this.destroyed||!this.layerAdapter?.hasRequiredSupport||!this._subscriptions)return null;const t=this.featureContainer.updateStart("subtype-group"===e.type);this._lastFeatureEffect=this.featureEffect;const r={store:t,cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,scaleExpression:void 0,viewRotation:this._stationaryRotation},s=await this._createViewSchemaConfig(),i={source:await this.layerAdapter.createSourceSchema(s,this._sourceRefreshVersion),processor:await this.layerAdapter.createProcessorSchema(r,s,this._displayRefreshVersion)};return c(this._lastSchema?.source.strategy,i.source.strategy)||c(this._lastSchema?.processor,i.processor)?(this._lastSchema=i,this._fields=null,i):null}catch(t){}return null}async updateSchemaEnd(e){try{this.featureEffectView.featureEffect=this._lastFeatureEffect,e&&this.featureEffectView.endTransition(),await this.featureContainer.updateEnd(this._lastSchema.processor,this.layerAdapter.getLabelingDeconflictionInfo(),e),has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.updateEnd")}catch(t){}}async _doUpdate(){const e=Math.round(performance.now()),t=await this.getWorker();await t.pipeline.updateSchema(e),this.requestUpdate()}async _doOverride(e){const t=await this.getWorker();try{let r=new oe;for(const s of e.messages)switch(s.type){case"edit":r.tryAdd(await this._resolveEdit(s.event))||(await t.pipeline.onOverride(r.toMessage()),r=new oe,r.tryAdd(await this._resolveEdit(s.event)));break;case"override":r.tryAdd(this._resolveOverrides(s.options))||(await t.pipeline.onOverride(r.toMessage()),r=new oe,r.tryAdd(this._resolveOverrides(s.options)));break}await t.pipeline.onOverride(r.toMessage())}catch(r){m(r),0}}_getEffectiveAvailableFields(e){const t=me(this._lastAvailableFields,e);return this._lastAvailableFields=t,U(this.layer.fieldsIndex,t)}async _createViewSchemaConfig(){const e=this.requiresCurrentUser?await this.signedInUser:null,t=[x(this.view,this.layerAdapter,this.timeExtent,this._visibilityOverrides,this.filter,this.effectiveDisplayFilterClause),this.featureEffect?.filter?.toJSON()??null];return{availableFields:this._getEffectiveAvailableFields(this.availableFields),displayFilterEnabled:this.displayFilterEnabled,filters:t,scale:this.view.scale,timeZone:this.view.timeZone,timeExtent:this.view.timeExtent,currentUser:e,spatialReference:this.view.spatialReference,extent:this.view.extent,returnZ:this.hasZ,returnM:this.hasM}}_processHighlight(){this._commandsQueue.push({type:"highlight"})}async _updateHighlights(){const e=this._getHighlights(),t=await this.getWorker();if(this.destroyed)return;const r=t.pipeline.updateHighlight({highlights:e}).catch(e=>{m(e)||u.getLogger(this).error(e)});this._updatingHandles.consumePromise(r)}_setOriginForFeature(e){e.layer=e.sourceLayer=this.layer,this.layerAdapter.setGraphicOrigin(e)}_createFeatureGraphicHit(e,t){return this._setOriginForFeature(t),this._createGraphicHit(e,t)}_createTrackGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setTrackGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createAggregateGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setAggregateGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createGraphicHit(e,t){return null!=t.geometry&&(t.geometry.spatialReference=this.view.spatialReference),{type:"graphic",graphic:t,layer:this.layer,mapPoint:e}}};function x(e,t,r,s,i,a){i&&(i=i.clone());const o=null!=i?i.timeExtent:null,n=null!=r&&null!=o?r.intersection(o):r||o;n&&(i??=new k,i.timeExtent=n),i=t.addFilters?.(i,e)??i,a&&(i??=new k,i.where=w(i.where,a));let l=i?.toJSON()??null;return s.size&&(l??=(new k).toJSON(),l.hiddenIds=Array.from(s)),l}return e([_()],v.prototype,"_commandsQueue",void 0),e([_()],v.prototype,"_sourceRefreshVersion",void 0),e([_()],v.prototype,"_displayRefreshVersion",void 0),e([_({readOnly:!0})],v.prototype,"_pipelineUpdating",void 0),e([_()],v.prototype,"_sourceUpdating",void 0),e([_({readOnly:!0})],v.prototype,"dataUpdating",null),e([_({readOnly:!0})],v.prototype,"hasAllFeatures",null),e([_({readOnly:!0})],v.prototype,"hasAllFeaturesInView",null),e([_({readOnly:!0})],v.prototype,"hasFullGeometries",null),e([_()],v.prototype,"featureEffectView",void 0),e([_()],v.prototype,"layerAdapter",null),e([_({readOnly:!0})],v.prototype,"timeExtent",null),v=e([b("esri.views.2d.layers.FeatureLikeLayerView2D")],v),v};export{ve as FeatureLikeLayerView2D};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../AggregateGraphic.js";import r from"../../../Graphic.js";import s from"../../../TrackGraphic.js";import{isSome as i}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{makeHandle as n,handlesGroup as l}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import u from"../../../core/Logger.js";import{destroyMaybe as h}from"../../../core/maybe.js";import{notDeepEqual as c}from"../../../core/object.js";import{createAbortError as p,ignoreAbortErrors as d,throwIfNotAbortError as y,isAbortError as m}from"../../../core/promiseUtils.js";import{watch as f,sync as g}from"../../../core/reactiveUtils.js";import{sqlAnd as w}from"../../../core/sql.js";import{getMetersPerUnitForSR as v}from"../../../core/units.js";import{property as _,subclass as b}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as S}from"../../../core/support/UpdatingHandles.js";import A from"../../../geometry/Extent.js";import{fromJSON as F}from"../../../geometry/support/jsonUtils.js";import j from"../../../geometry/support/rotate.js";import{isCurvedGeometry as x}from"../../../geometry/support/curves/curveUtils.js";import{densifyCurvedGeometry as R}from"../../../geometry/support/curves/densifyCurvedGeometry.js";import I from"../../../layers/effects/FeatureEffectView.js";import{convertFromFeature as E}from"../../../layers/graphics/featureConversionUtils.js";import O from"../../../layers/support/FeatureFilter.js";import{checkServiceCurrentUserSupport as k}from"../../../layers/support/featureLayerUtils.js";import{packFields as U}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as C}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as V}from"../../../layers/support/timeSupport.js";import Q from"../../../rest/support/AggregateFeatureSet.js";import q from"../../../rest/support/AttributeBinsFeatureSet.js";import M from"../../../rest/support/AttributeBinsQuery.js";import P from"../../../rest/support/FeatureSet.js";import L from"../../../rest/support/Query.js";import{HittestDrawHelper as H}from"../../../symbols/cim/CIMSymbolDrawHelper.js";import{symbolToCIM as T}from"../../../symbols/cim/CIMSymbolHelper.js";import{getDisplayedSymbol as D}from"../../../symbols/support/symbolUtils.js";import{LayerView2D as W}from"./LayerView2D.js";import{FeatureContainer as G}from"./features/FeatureContainer.js";import{createFeaturePipelineWorkerProxy as N}from"./features/FeaturePipelineWorkerProxy.js";import{FeatureSourceEventLog as J}from"./features/FeatureSourceEventLog.js";import{AnnotationLayerAdapter as z}from"./features/layerAdapters/AnnotationLayerAdapter.js";import{CatalogFootprintLayerAdapter as B}from"./features/layerAdapters/CatalogFootprintLayerAdapter.js";import{DimensionLayerAdapter as Z}from"./features/layerAdapters/DimensionLayerAdapter.js";import{FeatureLayerAdapter as K}from"./features/layerAdapters/FeatureLayerAdapter.js";import{createFeatureIdInfo as $}from"./features/layerAdapters/featureServiceUtils.js";import{InMemoryLayerAdapter as X}from"./features/layerAdapters/InMemoryLayerAdapter.js";import{KnowledgeGraphSublayerAdapter as Y}from"./features/layerAdapters/KnowledgeGraphSublayerAdapter.js";import{OGCFeatureLayerAdapter as ee}from"./features/layerAdapters/OGCFeatureLayerAdapter.js";import{OrientedImageryLayerAdapter as te}from"./features/layerAdapters/OrientedImageryLayerAdapter.js";import{ParquetLayerAdapter as re}from"./features/layerAdapters/ParquetLayerAdapter.js";import{StreamLayerAdapter as se}from"./features/layerAdapters/StreamLayerAdapter.js";import{SubtypeGroupLayerAdapter as ie}from"./features/layerAdapters/SubtypeGroupLayerAdapter.js";import{createComplexSymbolInstances as ae}from"./features/schema/processor/symbols/ComplexSymbolSchema.js";import{DebouncedFeatureOverride as oe}from"./support/DebouncedFeatureOverride.js";import{FeatureCommandQueue as ne}from"./support/FeatureCommandQueue.js";import{createFilterSchemas as le}from"./support/FilterSchema.js";import{handleNoEngineError as ue}from"./support/handleNoEngineError.js";import{toJSONGeometryType as he}from"./support/util.js";import{getMapPointsFromScreen as ce,getHittestType as pe}from"../support/hitTestUtils.js";import{FeatureTileSubscriptionManager as de}from"../tiling/FeatureTileSubscriptionManager.js";import{RefreshableLayerView as ye}from"../../layers/RefreshableLayerView.js";import{getHighlightName as me}from"../../support/highlightOptionsUtils.js";function fe(e,t){const r=new Set;return e&&e.forEach(e=>r.add(e)),t&&t.forEach(e=>r.add(e)),r.has("*")?["*"]:Array.from(r)}const ge=4294967294;function we(e,t){return l(e.map(e=>f(()=>{const t=e();return t&&"object"==typeof t?"getTime"in t&&"function"==typeof t.getTime?t.getTime():JSON.stringify(t):t},t,g)))}function ve(e){if(!e.geometry)return e;if(!x(e.geometry))return e;const t=.001/v(e.geometry.spatialReference),r=100;return{geometry:R(e.geometry,{maxSegmentsPerCurve:12e3,maxSegmentLength:r*t,maxDeviation:0}),attributes:e.attributes}}const _e=l=>{const g=ye(W(l));let v=class extends g{constructor(){super(...arguments),this._commandsQueue=new ne({process:e=>{switch(e.type){case"override-batch":return this._doOverride(e);case"update":return this._doUpdate()}}}),this._visibilityOverrides=new Set,this._lastAvailableFields=[],this._lastTargetState=null,this._stationaryRotation=0,this.eventLog=new J,this._sourceRefreshVersion=1,this._displayRefreshVersion=1,this._pipelineUpdating=!1,this._editUpdatingHandles=new S,this._fields=null,this._hittestDrawHelper=null,this._sourceUpdating=!1,this.featureEffectView=new I}destroy(){this._editUpdatingHandles.destroy(),this._workerProxy?.destroy(),this._workerAttached.reject(p()),this._commandsQueue.destroy(),this._hittestDrawHelper?.destroy()}initialize(){this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this.addResolvingPromise(this._initProxy()),this.featureEffectView.featureEffect=this.featureEffect,this.featureEffectView.endTransition()}async _initProxy(){const e=this.layer;if("isTable"in e&&e.isTable)throw new o("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e});if(("feature"===e.type||"subtype-group"===e.type)&&!1===C(e)?.operations.supportsQuery)throw new o("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e});this._workerProxy&&this._workerProxy.destroy();const t=this._createClientOptions();this._workerProxy=await N(t)}async _attachProxy(){const e=j(this.view.extent,this.view.rotation,this.view.center),t={tileInfoJSON:this.view?.featuresTilingScheme?.tileInfo?.toJSON(),initialViewExtent:e.toJSON()};try{await this._workerProxy.pipeline.onAttach(t),this._workerAttached.resolve()}catch(r){this._workerAttached.reject(p()),y(r)}}async _detachProxy(){return this._workerProxy.pipeline.onDetach()}async getWorker(){return await this._workerAttached.promise,this._workerProxy}get dataUpdating(){return this._sourceUpdating||this._editUpdatingHandles.updating}get hasAllFeatures(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryAllFeatures}get hasAllFeaturesInView(){const e=this.effectiveDisplayFilter?.where||null,t=!this.eventLog.willQueryAllFeatures&&null!=e&&"1=1"!==e;return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&!t}get hasFullGeometries(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryFullResolutionGeometry}get layerAdapter(){switch(this.layer.type){case"annotation-feature":return new z(this.layer);case"dimension-feature":return new Z(this.layer);case"feature":return"memory"===this.layer.source.type?new X(this.layer):new K(this.layer);case"geojson":case"csv":case"wfs":return new X(this.layer);case"parquet":return new re(this.layer);case"subtype-group":return new ie(this.layer);case"ogc-feature":return new ee(this.layer);case"stream":return new se(this.layer);case"oriented-imagery":return new te(this.layer);case"knowledge-graph-sublayer":return new Y(this.layer);case"catalog-footprint":return new B(this.layer);default:this.layer}return null}get timeExtent(){return V(this.layerAdapter.timeOptions,this.view?.timeExtent,this._get("timeExtent"))}get usedMemory(){return this.container.usedMemory+this.eventLog.pipelineStatistics.usedMemory}getDisplayStatistics(e,t){return this.featureContainer?.getDisplayStatistics(e,t)}highlight(e,t){const s=me(t);let o;if(e instanceof O)o=e;else{let t;e instanceof r?t=[e.getObjectId()]:"number"==typeof e||"string"==typeof e?t=[e]:a.isCollection(e)&&e.length>0?t=e.map(e=>e?.getObjectId()).toArray():Array.isArray(e)&&e.length>0&&(t="number"==typeof e[0]||"string"==typeof e[0]?e:e.map(e=>e?.getObjectId()));const s=t?.filter(i);if(!s?.length)return n();o=new O({objectIds:s})}const l=this._addHighlightFilter(o,s);return n(()=>!this.destroyed&&this._removeHighlight(l))}async hitTest(e,i,a){const o=pe(i);if(!o)return null;const n="point"===o,{trueHitIds:l,candidateHitIds:u}=await this.featureContainer.hitTest(i,a??null),h=await this.getWorker(),[c,p]=await Promise.all([h.pipeline.getDisplayFeatures(u),h.pipeline.getDisplayFeatures(l)]),{features:d,aggregates:y,tracks:f}=c,{features:g,aggregates:w,tracks:v}=p,_=[];if(!n&&this.hasRenderer()){const e=new Map,t=new r;for(const r of d){t.attributes=r.attributes,t.geometry=F(r.geometry),t.symbol=null;const s=this.layerAdapter.getRenderer(t);if(!s){_.push(r);continue}const i=await D(t,{renderer:s,scale:this.view.scale,resolution:this.view.resolution,spatialReference:this.view.spatialReference,viewingMode:"2d",timeZone:this.view.timeZone});if(!i)continue;let a=null;const o=T(i);if("web-style"===o.type)try{const e=T(await o.fetchSymbol({acceptedFormats:["cim","web"]}));a="web-style"===e.type?null:e}catch(R){m(R),0;continue}else a=o;const n=a?.symbol;if(!n)continue;const l=this.view.stage.cimAnalyzer.analyzeSymbolReference(a,!1).some(e=>"alignment"in e&&0===e.alignment);e.set(r,{cimSymbol:n,isScreenAligned:l})}e.size>0&&!this._hittestDrawHelper&&(this._hittestDrawHelper=new H(this.view.stage.painter.textureManager.resourceManager));const{resolution:s,rotation:a}=this.view.state,n=ce(this.view,i);for(const[r,{cimSymbol:i,isScreenAligned:l}]of e){if(!r)continue;const e={hittestType:o,textInfo:null,mapRotation:a,resolution:s,searchDist:0,isScreenAligned:l};this._hittestDrawHelper.hitTest(n,i,r.geometry,e)&&_.push(r)}}else _.push(...d);const b=[...g,..._],S=[...w,...y],A=[...v,...f],j=this.featureContainer.getSortKeys(b.map(e=>e.displayId)),x=({displayId:e},{displayId:t})=>j.has(e)&&j.has(t)?j.get(e)-j.get(t):e-t;return b.sort(x).reverse(),S.sort(x).reverse(),[...S.map(r=>this._createAggregateGraphicHit(e,t.fromJSON(r))),...A.map(t=>this._createTrackGraphicHit(e,s.fromJSON(t))),...b.map(t=>this._createFeatureGraphicHit(n?e:null,r.fromJSON(t)))]}async queryAggregateSummaryStatistics(e,t,r){const s={...t,scale:this.view.scale},i=(await this.getWorker()).aggregates.executeQueryForSummaryStatistics(this._cleanUpAggregateQuery(e),s,r);return ue(i,{})}async queryUniqueValues(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForUniqueValues(this._cleanUpQuery(e),i,r);return ue(a,{uniqueValueInfos:[]})}async queryAggregateUniqueValues(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForUniqueValues(this._cleanUpAggregateQuery(e),i,r);return ue(a,{uniqueValueInfos:[]})}async queryAggregateClassBreaks(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForClassBreaks(this._cleanUpAggregateQuery(e),i,r);return ue(a,{classBreakInfos:[]})}async queryHistogram(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForHistogram(this._cleanUpQuery(e),i,r);return ue(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateCount(e,t){const r=(await this.getWorker()).aggregates.executeQueryForCount(this._cleanUpAggregateQuery(e),t);return ue(r,0)}async queryAggregateHistogram(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForHistogram(this._cleanUpAggregateQuery(e),i,r);return ue(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateIds(e,t){const r=(await this.getWorker()).aggregates.executeQueryForIds(this._cleanUpAggregateQuery(e),t);return ue(r,[])}async queryAggregateJSON(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t);return ue(r,{features:[]})}async queryAttributeBins(e,t){const r=(await this.getWorker()).features.executeAttributeBinsQuery(this._cleanUpAttributeBinsQuery(e),t),s=await ue(r,{features:[]});return q.fromJSON(s)}async queryAggregates(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t),s=await ue(r,{features:[]}),i=Q.fromJSON(s);return i.features.forEach(e=>this.layerAdapter.setAggregateGraphicOrigin?.(e)),i}async queryClassBreaks(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForClassBreaks(this._cleanUpQuery(e),i,r);return ue(a,{classBreakInfos:[]})}async queryExtent(e,t){const r=(await this.getWorker()).features.executeQueryForExtent(this._cleanUpQuery(e),t),s=await ue(r,{count:0,extent:null});return{count:s.count,extent:A.fromJSON(s.extent)}}async queryFeatureCount(e,t){const r=(await this.getWorker()).features.executeQueryForCount(this._cleanUpQuery(e),t);return ue(r,0)}queryFeatures(e,t){return this.queryFeaturesJSON(e,t).then(e=>{const t=P.fromJSON(e);return t.features.forEach(e=>this._setOriginForFeature(e)),t})}async queryFeaturesJSON(e,t){const r=(await this.getWorker()).features.executeQuery(this._cleanUpQuery(e),t);return ue(r,{features:[]})}async queryHeatmapStatistics(e){return(await this.getWorker()).pipeline.queryHeatmapStatistics(e)}async queryObjectIds(e,t){const r=(await this.getWorker()).features.executeQueryForIds(this._cleanUpQuery(e),t);return ue(r,[])}async queryStatistics(){const e=await this.getWorker();return ue(e.pipeline.queryStatistics(),{featureCount:0,ringCount:0,vertexCount:0})}async querySummaryStatistics(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForSummaryStatistics(this._cleanUpQuery(e),i,r);return ue(a,{})}async queryVisibleFeatures(e,t){const r=(await this.getWorker()).pipeline.queryVisibleFeatures(this._cleanUpQuery(e),t),s=await ue(r,{features:[]}),i=P.fromJSON(s);return i.features.forEach(e=>this._setOriginForFeature(e)),i}async getSampleFeatures(e){return(await this.getWorker()).pipeline.getSampleFeatures(e)}setVisibility(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}update(e){if(!this._subscriptions)return;this.view.animation&&!this._lastTargetState&&(this._lastTargetState=e.state.clone()),!this.view.animation&&this._lastTargetState&&(this._lastTargetState=null);const t=this.featureContainer.getPresenting(),r=this._subscriptions.update(e.targetState,this._lastTargetState,t);r&&(this.featureContainer.updateSubscriptions(r),d(this._updatingHandles.addPromise(this.getWorker().then(e=>e.pipeline.updateSubscriptions(r))))),this._subscriptions.coverage&&this.featureContainer.setCoverage(this._subscriptions.coverage)}attach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.attach"),d(this._updatingHandles.addPromise(this._workerAttached.promise)),d(this._attachProxy()),this.featureContainer=new G(this),this.container.addChild(this.featureContainer),this.view.timeline.record(`${this.layer.title} (FeatureLayer) Attach`),this._subscriptions=new de(this.view.featuresTilingScheme),this._stationaryRotation=this.view.rotation,this.requestUpdate(),this.addAttachHandles([we([()=>this._displayRefreshVersion,()=>"displayFilterInfo"in this.layer&&this.layer.displayFilterInfo,()=>this.timeExtent,()=>this.clips,()=>this.filter,()=>this.effectiveDisplayFilterClause,()=>this.featureEffect,()=>this._sourceRefreshVersion,()=>this.view.timeZone,()=>this.view.timeExtent,...this.layerAdapter.getUpdateHashProperties(this.view)],()=>this._update()),f(()=>this.updateSuspended,e=>{e||this._subscriptions.resume(this.featureContainer.getPresenting())}),f(()=>this.view.stationary,e=>{if(!e)return;const t=this.view.rotation;t!==this._stationaryRotation&&(this._stationaryRotation=t,this._update()),this.getWorker().then(e=>{if(this.destroyed)return;const t=j(this.view.extent,this.view.rotation,this.view.center);return e.pipeline.updateStationaryExtent(t.toJSON(),this.featureContainer.requiresRefresh)}).catch(()=>{})})]),this._update(),"stream"!==this.layer.type&&"parquet"!==this.layer.type&&"catalog-footprint"!==this.layer.type&&this.addAttachHandles(this.layer.on("edits",e=>this._editUpdatingHandles.addPromise(this._edit(e))))}emitFirstDraw(e){this.emit("first-draw",{timestamp:e})}detach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.detach"),this._detachProxy(),this._fields=null,this.featureContainer.destroy(),this.featureContainer=null,this._commandsQueue.clear(),this.container.removeAllChildren(),this._subscriptions=h(this._subscriptions),this._workerProxy.pipeline.onDetach(),this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this._lastAvailableFields=[],this._lastSchema=null}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}addOverrides(e){return this._commandsQueue.push({type:"override",options:{...e,release:[]}})}removeOverrides(e){for(const r of e)if(null==r)throw new o("featurelayerview:bad-override","Tried to remove an override for an invalid objectId",{objectId:r});const t={added:[],updated:[],removed:[],release:e,isWeak:!1,historicMoment:null};return this._commandsQueue.push({type:"override",options:t})}onProxyClientEvent(e){}hasRenderer(){return"renderer"in this.layer&&null!=this.layer.renderer}isUpdating(){const e=this.hasRenderer(),t=this._commandsQueue.updateTracking.updating,r=null!=this._updatingRequiredPromise,s=this.featureContainer.updating;return this.updateRequested||e&&(t||r)||s||this._pipelineUpdating||this.dataUpdating}_createClientOptions(){const e=this;return{updateSchemaStart:()=>e.updateSchemaStart(),updateSchemaEnd:t=>e.updateSchemaEnd(t),openMemoryPorts:async()=>{if(this.layerAdapter?.openMessagePorts){const e=await this.layerAdapter.openMessagePorts();return{result:e,transferList:e}}throw new Error("InternalError: Layer adapter does not support opening message ports")},openGlyphPorts:async()=>{const t=await e.container.stage.textureManager.openMessagePorts();return{result:t,transferList:t}},get container(){return e.featureContainer},setUpdating:e=>{this._set("_pipelineUpdating",e.pipeline),this._set("_sourceUpdating",e.source)},emitEvent:e=>{this.onProxyClientEvent(e)},get eventLog(){return e.eventLog},fetch:async t=>{if(has("esri-2d-stabilize-glyphs")){const r=[];for(const s of t)r.push(await e.view.stage.painter.textureManager.rasterizeItem(s));return r}return Promise.all(t.map(t=>e.view.stage.painter.textureManager.rasterizeItem(t)))},fetchDictionary:e=>Promise.all(e.map(e=>this._fetchDictionaryRequest(e))),fetchMesh:e=>Promise.all(e.map(e=>this._fetchMeshRequest(e)))}}async _fetchDictionaryRequest(e){try{if(!("renderer"in this.layer)||!this.layer.renderer||"dictionary"!==this.layer.renderer.type)throw new Error("InternalError: Expected renderer to be of type 'dictionary'");const t=this.layer.renderer,r=this._lastSchema.processor.mesh.factory.symbology;if("dictionary"!==r.type)throw new Error("InternalError: Expected schema to be of type 'dictionary'");const s={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:r.scaleExpression,viewRotation:this._stationaryRotation};this._fields||(this._fields=this.layer.fields.map(e=>e.toJSON()));const i=r.visualVariableUniforms,a=he(this.layer.geometryType),o=await t.getSymbolForControlString(e.controlString,a,!1);if(!o||!o.data)return{type:"dictionary-response",meshes:[]};return{type:"dictionary-response",meshes:await ae({...o.data,hasTextStringTemplates:!0},{uniforms:i,path:"renderer",schemaOptions:s})}}catch(t){return{type:"dictionary-response",meshes:[]}}}async _fetchMeshRequest(e){const{layer:t}=this;try{const r={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:null,viewRotation:this._stationaryRotation};this._fields||(this._fields=t.fields.map(e=>e.toJSON()));return{type:"mesh-response",meshes:await ae({...e.symbolReference,hasTextStringTemplates:!0},{path:"anno-like",schemaOptions:r,uniforms:{visualVariableColor:null,visualVariableOpacity:null,visualVariableRotation:null,visualVariableSizeStops:null,visualVariableSizeScaleStops:null,visualVariableSizeOutlineScaleStops:null,visualVariableSizeUnitValue:null,visualVariableSizeMinMaxValue:null}})}}catch(r){return{type:"mesh-response",meshes:[]}}}_cleanUpQuery(e){const t=L.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),"returnZ"in this.layer&&(t.returnZ??=this.layer.returnZ),"returnM"in this.layer&&(t.returnM??=this.layer.returnM),t.toJSON()}_cleanUpAttributeBinsQuery(e){const t=M.from(e);return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAggregateQuery(e){const t=L.from(e)||this.createAggregateQuery();t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference);const r=t.objectIds??[];for(const s of t.aggregateIds??[])r.push(s);return t.objectIds=r,t.aggregateIds=[],t.toJSON()}async _update(){return this._commandsQueue.push({type:"update"})}_edit(e){return this._commandsQueue.push({type:"edit",event:e})}async doRefresh(e){this.attached&&(this.updateSuspended&&e||(e?this.incrementSourceRefreshVersion():this.incrementDisplayRefreshVersion()))}incrementSourceRefreshVersion(){this._sourceRefreshVersion=(this._sourceRefreshVersion+1)%ge+1}incrementDisplayRefreshVersion(){this._displayRefreshVersion=(this._displayRefreshVersion+1)%ge+1}async _resolveIdenifiers(e){const t=[],r=[];for(const a of e)null==a.objectId||-1===a.objectId?null==a.globalId?u.getLogger(this).warn("mapview-apply-edits","A feature identifier must contain either a GlobalId or ObjectId. Ignoring",{identifier:a}):r.push(a.globalId):t.push(a.objectId);const s="globalIdField"in this.layer&&this.layer.globalIdField,i=s&&this.availableFields.includes(s);if(r.length&&!i)return u.getLogger(this).error(new o("mapview-apply-edits",`Editing the specified service requires the layer's globalIdField, ${s} to be included the layer's outFields for updates to be reflected on the map`)),t;if(r.length){const e=await this._workerProxy.pipeline.getObjectIdsFromGlobalIds(r);for(const r of e)t.push(r)}return t}_resolveOverrides(e){const t=!1,r=!1,s=he(this.layer.geometryType),i=$(this.layer),a=[];for(const n of e.added){const e=E(ve(n),s,t,r,i);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.updated){const e=E(ve(n),s,t,r,i);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.removed)if(null==n)throw new o("featurelayerview:bad-override","Tried to remove an invalid objectId",{objectId:n});return{type:"override",updates:a,removed:e.removed,release:e.release,isWeak:e.isWeak??!1,historicMoment:e.historicMoment??null}}async _resolveEdit(e){const t=this.layer,r=e.historicMoment?.getTime()??null,s="layerId"in t&&e.editedFeatures?.find(e=>e.layerId===t.layerId);if(s&&this._canEditByFeature(s)){const{adds:e,deletes:t,updates:i}=s.editedFeatures,a=this.layer.objectIdField,o=i.map(e=>e.current),n=t.map(e=>"attributes"in e?{objectId:a?e.attributes[a]:null}:e),l=await this._resolveIdenifiers(n);return this._resolveOverrides({added:e,updated:o,removed:l,historicMoment:r,isWeak:!0,release:[]})}const[i,a,o]=await Promise.all([this._resolveIdenifiers(e.addedFeatures),this._resolveIdenifiers(e.updatedFeatures),this._resolveIdenifiers(e.deletedFeatures)]);return{type:"override-by-id",updates:[...i,...a],removed:o,historicMoment:r,isWeak:!0}}_canEditByFeature(e){const{adds:t,updates:r}=e.editedFeatures;return t.every(e=>this.view.spatialReference.equals(e.geometry?.spatialReference))&&r.every(e=>this.view.spatialReference.equals(e.current.geometry?.spatialReference))}async updateSchemaStart(){const e=this.layer;"featureReduction"in e&&e.featureReduction&&e.featureReduction!==this._lastFeatureReduction&&(e.featureReduction=e.featureReduction?.clone(),this._lastFeatureReduction=e.featureReduction);try{if(await Promise.allSettled([this._handleChange(),k(e)]),this.destroyed||!this.layerAdapter?.hasRequiredSupport||!this._subscriptions)return null;const t=this.featureContainer.updateStart("subtype-group"===e.type);this._lastFeatureEffect=this.featureEffect;const r={store:t,cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,scaleExpression:void 0,viewRotation:this._stationaryRotation},s=await this._createViewSchemaConfig(),i={source:await this.layerAdapter.createSourceSchema(s,this._sourceRefreshVersion),processor:await this.layerAdapter.createProcessorSchema(r,s,this._displayRefreshVersion)};return c(this._lastSchema?.source.strategy,i.source.strategy)||c(this._lastSchema?.processor,i.processor)?(this._lastSchema=i,this._fields=null,i):null}catch(t){}return null}async updateSchemaEnd(e){try{this.featureEffectView.featureEffect=this._lastFeatureEffect,e&&this.featureEffectView.endTransition(),await this.featureContainer.updateEnd(this._lastSchema.processor,this.layerAdapter.getLabelingDeconflictionInfo(),e),has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.updateEnd")}catch(t){}}async _doUpdate(){const e=Math.round(performance.now()),t=await this.getWorker();await t.pipeline.updateSchema(e),this.requestUpdate()}async _doOverride(e){const t=await this.getWorker();try{let r=new oe;for(const s of e.messages)switch(s.type){case"edit":r.tryAdd(await this._resolveEdit(s.event))||(await t.pipeline.onOverride(r.toMessage()),r=new oe,r.tryAdd(await this._resolveEdit(s.event)));break;case"override":r.tryAdd(this._resolveOverrides(s.options))||(await t.pipeline.onOverride(r.toMessage()),r=new oe,r.tryAdd(this._resolveOverrides(s.options)));break}await t.pipeline.onOverride(r.toMessage())}catch(r){m(r),0}}_getEffectiveAvailableFields(e){const t=fe(this._lastAvailableFields,e);return this._lastAvailableFields=t,U(this.layer.fieldsIndex,t)}async _createViewSchemaConfig(){const e=this.requiresCurrentUser?await this.signedInUser:null,t=x(this.view,this.layerAdapter,this.timeExtent,this._visibilityOverrides,this.filter,this.effectiveDisplayFilterClause),r=this.featureEffect?.filter?.toJSON()??null,s=this._getHighlightFilterGroups().map(({order:e,filters:t})=>({order:e,filters:t.map(e=>e.toJSON())})),i=le({layerFilter:t,effectFilter:r,highlightFilters:s});return{availableFields:this._getEffectiveAvailableFields(this.availableFields),displayFilterEnabled:this.displayFilterEnabled,filters:i,scale:this.view.scale,timeZone:this.view.timeZone,timeExtent:this.view.timeExtent,currentUser:e,spatialReference:this.view.spatialReference,extent:this.view.extent,returnZ:this.hasZ,returnM:this.hasM}}_onHighlightChange(){this._commandsQueue.push({type:"update"})}_setOriginForFeature(e){e.layer=e.sourceLayer=this.layer,this.layerAdapter.setGraphicOrigin(e)}_createFeatureGraphicHit(e,t){return this._setOriginForFeature(t),this._createGraphicHit(e,t)}_createTrackGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setTrackGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createAggregateGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setAggregateGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createGraphicHit(e,t){return null!=t.geometry&&(t.geometry.spatialReference=this.view.spatialReference),{type:"graphic",graphic:t,layer:this.layer,mapPoint:e}}};function x(e,t,r,s,i,a){i&&(i=i.clone());const o=null!=i?i.timeExtent:null,n=null!=r&&null!=o?r.intersection(o):r||o;n&&(i??=new O,i.timeExtent=n),i=t.addFilters?.(i,e)??i,a&&(i??=new O,i.where=w(i.where,a));let l=i?.toJSON()??null;return s.size&&(l??=(new O).toJSON(),l.hiddenIds=Array.from(s)),l}return e([_()],v.prototype,"_commandsQueue",void 0),e([_()],v.prototype,"_sourceRefreshVersion",void 0),e([_()],v.prototype,"_displayRefreshVersion",void 0),e([_({readOnly:!0})],v.prototype,"_pipelineUpdating",void 0),e([_()],v.prototype,"_sourceUpdating",void 0),e([_({readOnly:!0})],v.prototype,"dataUpdating",null),e([_({readOnly:!0})],v.prototype,"hasAllFeatures",null),e([_({readOnly:!0})],v.prototype,"hasAllFeaturesInView",null),e([_({readOnly:!0})],v.prototype,"hasFullGeometries",null),e([_()],v.prototype,"featureEffectView",void 0),e([_()],v.prototype,"layerAdapter",null),e([_({readOnly:!0})],v.prototype,"timeExtent",null),v=e([b("esri.views.2d.layers.FeatureLikeLayerView2D")],v),v};export{_e as FeatureLikeLayerView2D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as i}from"tslib";import e from"../../../Graphic.js";import{isSome as r}from"../../../core/arrayUtils.js";import t from"../../../core/Collection.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{destroyMaybe as h}from"../../../core/maybe.js";import{when as a}from"../../../core/reactiveUtils.js";import{isScreenRect as
|
|
2
|
+
import{__decorate as i}from"tslib";import e from"../../../Graphic.js";import{isSome as r}from"../../../core/arrayUtils.js";import t from"../../../core/Collection.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{destroyMaybe as h}from"../../../core/maybe.js";import{when as a}from"../../../core/reactiveUtils.js";import{isScreenRect as o}from"../../../core/screenUtils.js";import{property as p,subclass as c}from"../../../core/accessorSupport/decorators.js";import l from"../../../layers/support/FeatureFilter.js";import{LayerView2D as n}from"./LayerView2D.js";import g from"./graphics/GraphicContainer.js";import m from"./graphics/GraphicsView2D.js";import d from"../../layers/GraphicsLayerView.js";import{getHighlightName as w}from"../../support/highlightOptionsUtils.js";let u=class extends(n(d)){attach(){this.graphicsView=new m({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:this.layer.graphics,container:new g(this.view.featuresTilingScheme),layerId:this.layer.id}),this.container.addChild(this.graphicsView.container),this.addAttachHandles([this.layer.on("graphic-update",this.graphicsView.graphicUpdateHandler),a(()=>this.layer?.visible,()=>{this.graphicsView.update({state:this.view.state}),this.graphicsView.pushUpdate()})]),this._onHighlightChange()}detach(){this.container.removeAllChildren(),this.graphicsView=h(this.graphicsView)}async hitTest(i,e){return this.graphicsView?this.graphicsView.hitTest(this.view,e).map(r=>({type:"graphic",graphic:r,mapPoint:o(e)?null:i,layer:this.layer})):null}queryGraphics(){return Promise.resolve(this.graphicsView.graphics)}update(i){this.graphicsView.processUpdate(i)}viewChange(){this.graphicsView.viewChange()}moveEnd(){}isUpdating(){return!this.graphicsView||this.graphicsView.updating}highlight(i,h){let a;"number"==typeof i?a=[i]:i instanceof e?a=[i.uid]:Array.isArray(i)&&i.length>0?a="number"==typeof i[0]?i:i.map(i=>i&&i.uid):t.isCollection(i)&&i.length>0&&(a=i.map(i=>i&&i.uid).toArray());const o=a?.filter(r);if(!o?.length)return s();const p=w(h),c=this._addHighlightFilter(new l({objectIds:o}),p);return s(()=>!this.destroyed&&this._removeHighlight(c))}_onHighlightChange(){const i=this._getHighlightFilterGroups();this.graphicsView?.setHighlightFilters(i)}};i([p()],u.prototype,"graphicsView",void 0),u=i([c("esri.views.2d.layers.GraphicsLayerView2D")],u);const y=u;export{y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import i from"../../../Graphic.js";import{isSome as e}from"../../../core/arrayUtils.js";import s from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import"../../../core/has.js";import{QueueProcessor as h}from"../../../core/QueueProcessor.js";import{watch as a,sync as o}from"../../../core/reactiveUtils.js";import{isScreenRect as n}from"../../../core/screenUtils.js";import{property as l,subclass as g}from"../../../core/accessorSupport/decorators.js";import{convertGeometryToMask as p}from"../../../layers/raster/functions/clipUtils.js";import{GraphicsCollection as
|
|
2
|
+
import{__decorate as t}from"tslib";import i from"../../../Graphic.js";import{isSome as e}from"../../../core/arrayUtils.js";import s from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import"../../../core/has.js";import{QueueProcessor as h}from"../../../core/QueueProcessor.js";import{watch as a,sync as o}from"../../../core/reactiveUtils.js";import{isScreenRect as n}from"../../../core/screenUtils.js";import{property as l,subclass as g}from"../../../core/accessorSupport/decorators.js";import{convertGeometryToMask as p}from"../../../layers/raster/functions/clipUtils.js";import c from"../../../layers/support/FeatureFilter.js";import{GraphicsCollection as d}from"../../../support/GraphicsCollection.js";import u from"../engine/flow/FlowView2D.js";import{LayerView2D as m}from"./LayerView2D.js";import w from"./graphics/GraphicsView2D.js";import y from"./graphics/HighlightGraphicContainer.js";import f from"./imagery/ImageryView2D.js";import v from"./imagery/VectorFieldView2D.js";import b from"../../layers/ImageryLayerView.js";import{RefreshableLayerView as _}from"../../layers/RefreshableLayerView.js";import{isPixelHighlightTarget as x,isEmptyPixelRanges as H}from"../../layers/support/highlightUtils.js";import{defaultColor as j}from"../../support/HighlightDefaults.js";import{getHighlightName as V}from"../../support/highlightOptionsUtils.js";let I=class extends(_(m(b))){constructor(){super(...arguments),this._exportImageVersion=-1,this._highlightGraphics=new d,this._highlightView=void 0,this._pixelHighlights=[],this.layer=null,this.subview=null}get pixelData(){const{subview:t}=this;return this.updating||!t?null:"getPixelData"in t?t.getPixelData():null}update(t){this.subview?.update(t)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.view&&(this._highlightView=new w({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new y(this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container)),this.addAttachHandles([a(()=>this.layer.exportImageServiceParameters.version,t=>{t&&this._exportImageVersion!==t&&(this._exportImageVersion=t,this.requestUpdate())},o),a(()=>this.timeExtent,t=>{const{subview:i}=this;i&&(i.timeExtent=t,"redraw"in i?this.requestUpdate():i.redrawOrRefetch())},o),this.layer.on("redraw",()=>{const{subview:t}=this;t&&("redraw"in t?t.redraw():t.redrawOrRefetch())}),a(()=>this.layer.renderer,()=>this._setSubView()),a(()=>this.view?.highlights.items.map(({name:t,color:i})=>({name:t,color:i})),()=>this._updateHighlightOptions(this.subview))])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this.container.removeAllChildren(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null,this._highlightView?.destroy(),this._exportImageVersion=-1}viewChange(){}moveEnd(){this.requestUpdate()}async hitTest(t,i){const{layer:e,subview:s}=this;if(!e.loaded||!this.attached||!s?.attached)return null;n(i)&&(t=this.view.toMap({x:i.x+i.width/2,y:i.y+i.height/2}));const r=await s.hitTest(t);return null==r?null:[{type:"raster",layer:e,mapPoint:t,...r}]}highlight(t,h){if(x(t))return H(t)?r():this._highlightPixels(t,h);if("number"==typeof t||"string"==typeof t)return this._highlightByImageIds([t],h);const a=Array.isArray(t)||s.isCollection(t)?t.at(0):t;if("number"==typeof a||"string"==typeof a)return this._highlightByImageIds(t,h);if(!(a instanceof i))return r();let o=[];Array.isArray(t)||s.isCollection(t)?o=t.map(t=>t.clone()):t instanceof i&&(o=[t.clone()]);const n=o?.filter(e);if(!n?.length)return r();const l=V(h),g=this._addHighlightGraphics(o,l);return r(()=>!this.destroyed&&this._removeHighlightGraphics(o,g))}_highlightByImageIds(t,i){const e=V(i),s=new AbortController,{signal:a}=s,o=this.layer.sourceJSON.maxRecordCount??1e3,n=Math.ceil(t.length/o),l=[],g=[],p=new h({concurrency:4,process:t=>this.layer.queryFeatures({objectIds:t.ids,returnGeometry:!0,outSpatialReference:this.view.spatialReference},{signal:a}).then(t=>g.push(...t.features)).catch(()=>{})});for(let r=0;r<n;r++)l.push(p.push({ids:t.slice(r*o,(r+1)*o)}));return Promise.allSettled(l).then(()=>{if(g.length&&!a.aborted){const t=this._addHighlightGraphics(g,e);a.addEventListener("abort",()=>{this._removeHighlightGraphics(g,t)})}}),r(()=>s.abort())}_highlightPixels(t,i){const e={target:t,options:i};return this._pixelHighlights.push(e),this._updateHighlightOptions(this.subview),r(()=>{const t=this._pixelHighlights.indexOf(e);t>-1&&(this._pixelHighlights.splice(t,1),this._updateHighlightOptions(this.subview))})}_addHighlightGraphics(t,i){return this._highlightGraphics.addMany(t),this._addHighlightFilter(new c({objectIds:t.map(t=>t.uid)}),i)}_removeHighlightGraphics(t,i){this._highlightGraphics.removeMany(t),this._removeHighlight(i)}async doRefresh(){this.requestUpdate()}isUpdating(){return!this.subview||this.subview.updating||!!this._highlightView?.updating}_onHighlightChange(){const t=this._getHighlightFilterGroups();this._highlightView?.setHighlightFilters(t)}_setSubView(){if(!this.view)return;const t=this.layer.renderer?.type;let i="imagery";if("vector-field"===t?i="imageryVF":"flow"===t&&(i="flow"),this.subview){const{type:t}=this.subview;if(t===i)return this._attachSubview(this.subview),void("flow"===t?this.subview.redrawOrRefetch():"imagery"===t&&"lerc"===this.layer.format?this.subview.redraw():this.requestUpdate());this._detachSubview(this.subview),this.subview?.destroy()}"imagery"===i?(this.subview=new f({layer:this.layer,view:this.view,timeExtent:this.timeExtent,updatingHandles:this._updatingHandles}),this._updateHighlightOptions(this.subview)):this.subview="imageryVF"===i?new v({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new u({layer:this.layer,layerView:this}),this._attachSubview(this.subview),this.requestUpdate()}_attachSubview(t){t&&!t.attached&&(t.attach(),t.attached=!0,this.container.addChildAt(t.container,0))}_detachSubview(t){t?.attached&&(this.container.removeChild(t.container),t.detach(),t.attached=!1)}_updateHighlightOptions(t){const i=this.view.highlights;this._pixelHighlights.sort((t,e)=>i.findIndex(({name:t})=>t===V(e.options))-i.findIndex(({name:i})=>i===V(t.options)));const s=this._pixelHighlights.map(({target:t,options:e})=>U(t,i,e)).filter(e);"imagery"===t?.type&&(t.pixelHighlights=s,t.attached&&("lerc"===this.layer.format?t.redraw():this.requestUpdate()))}};function U(t,i,e){const s=V(e),r=(i.find(t=>t.name===s)?.color??j).toArray(),{pixelRanges:h}=t;if(Array.isArray(h))return{ranges:h,bandId:t.bandId??0,color:r};const a="extent"===h.type?h:h.extent;if(!a)return;const o=[a.xmin,a.xmax],n=[a.ymin,a.ymax],{xBandId:l,yBandId:g}=t,c=1024,d=1024;return{xBandId:l,yBandId:g,xBandRange:o,yBandRange:n,color:r,width:c,height:d,xyMask:"polygon"===h.type?p({srcExtent:a,geometry:h,size:[c,d]}):void 0}}t([l()],I.prototype,"pixelData",null),t([l()],I.prototype,"subview",void 0),I=t([g("esri.views.2d.layers.ImageryLayerView2D")],I);const G=I;export{G as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{referenceSetter as i}from"../../../core/collectionUtils.js";import{deprecatedFunction as s}from"../../../core/deprecate.js";import r from"../../../core/Error.js";import"../../../core/has.js";import h from"../../../core/Logger.js";import{watch as o,syncAndInitial as a}from"../../../core/reactiveUtils.js";import{property as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{referenceSetter as i}from"../../../core/collectionUtils.js";import{deprecatedFunction as s}from"../../../core/deprecate.js";import r from"../../../core/Error.js";import"../../../core/has.js";import h from"../../../core/Logger.js";import{watch as o,syncAndInitial as a,sync as n}from"../../../core/reactiveUtils.js";import{property as l,subclass as p}from"../../../core/accessorSupport/decorators.js";import{isLinkChartView as c}from"../../../linkChart/guards.js";import{Container as g}from"../engine/Container.js";import{ClipMesh as d}from"../engine/webgl/ClipMesh.js";import{maxHighlightGroups as u}from"../engine/webgl/definitions.js";import{HighlightRegistry as f}from"./support/HighlightRegistry.js";import{createOrReuseHighlightGradient as m}from"./support/util.js";import y from"../../layers/support/ClipRect.js";import v from"../../layers/support/GeometryClipArea.js";import w from"../../layers/support/Path.js";import{defaultHighlightName as R}from"../../support/HighlightDefaults.js";import _ from"../../support/HighlightOptions.js";import{isInEffectiveScaleRange as S}from"../../support/layerViewUtils.js";const H=t.ofType({key:"type",base:null,typeMap:{rect:y,path:w,geometry:v}}),b=new(t.ofType(_)),j=y=>{const v=y;let w=class extends v{constructor(){super(...arguments),this._highlightRegistry=new f,this.attached=!1,this.clips=new H,this.highlights=null,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1,this._visibleAtCurrentScale=!0}initialize(){const e=this.view?.spatialReferenceLocked??!0,t=this.view?.spatialReference;t&&e&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new r("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}))):(this.container||(this.container=new g),this.container.fadeTransitionEnabled=!0,this.container.visible=!1,this.container.endTransitions(),this.addHandles([o(()=>this.suspended,e=>{this.container&&(this.container.visible=!e)},a),o(()=>this.updateSuspended,e=>{this.view&&!e&&this.updateRequested&&this.view.requestUpdate()},a),o(()=>this.layer?.opacity??1,e=>{this.container&&(this.container.opacity=e)},a),o(()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal",e=>{this.container&&(this.container.blendMode=e)},a),o(()=>this.layer&&"effect"in this.layer?this.layer.effect:null,e=>{this.container&&(this.container.effect=e)},a),o(()=>this._effectiveHighlightOptions.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{this.container.highlightGradient=m(this.container.highlightGradient,this._effectiveHighlightOptions.items)},a),o(()=>this._getHighlightFilterGroups(),()=>this._onHighlightChange(),n),o(()=>this.clips.map(e=>e.version),async()=>{if(this.container&&this.view?.spatialReference){const e=this.view.spatialReference,t=await this._updatingHandles.addPromise(Promise.all(this.clips.items.map(t=>d.create(t,e))));for(const i of this.container.clips)i.destroy();this.container.clips=t.filter(e=>!!e)}},a),o(()=>({scale:this.view?.scale,scaleRange:this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null}),({scale:e,scaleRange:t})=>{const i=S(t,e);i!==this._visibleAtCurrentScale&&(this._visibleAtCurrentScale=i)},a),o(()=>this.layer?.effectiveVisible,async e=>{this.container.requestDeclutter()})],"constructor"),this.view?.whenLayerView?this.view.whenLayerView(this.layer).then(e=>{e===this&&this.processAttach()},()=>{}):this.when().then(()=>{this.processAttach()},()=>{}))}destroy(){this.processDetach(),this.updateRequested=!1;for(const e of this.container?.clips??[])e.destroy()}get highlightOptions(){return this._logHighlightOptionsDeprecation(),this.highlights?.find(({name:e})=>e===R)}set highlightOptions(e){if(this._logHighlightOptionsDeprecation(),!this.highlights){if(!e)return;this.highlights=new t([new _])}const i=this.highlights.find(({name:e})=>e===R);e?i?.assignFrom(e):(this.highlights.remove(i),0===this.highlights.length&&(this.highlights=null))}_logHighlightOptionsDeprecation(){s(h.getLogger(this),"`LayerView.highlightOptions` is deprecated in favor of View.highlights",{replacement:"View.highlights",version:"4.34",see:"https://arcg.is/inbTa1#highlights",warnOnce:!0})}get hasHighlight(){return this._highlightRegistry.size>0}get _effectiveHighlightOptions(){if(!this.view)return b;if(!this.highlights)return this.view.highlights;const e=this.view.highlights.clone();for(const t of this.highlights){const i=e.find(e=>e.name===t.name);i&&i.assignFrom(t)}return e}get highlightIds(){return this._highlightRegistry.highlightIds}get scheduler(){return this.view.scheduler}get spatialReferenceSupported(){const e=this.view?.spatialReference;return null==e||this.supportsSpatialReference(e)}get updating(){if(!this.spatialReferenceSupported)return!1;if(!this.attached)return!0;if(this.suspended)return!1;return this.updateRequested||this.isUpdating()||this._updatingHandles?.updating||this.container.transitioning}get visibleAtCurrentScale(){return this._visibleAtCurrentScale}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.removeHandles("attach"),this.detach(),this.updateRequested=!1)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.updateSuspended||this.view.requestUpdate())}processUpdate(e){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",e),this.updateRequested&&!this.updateSuspended&&(this.updateRequested=!1,this.update(e))):this.updateRequested=!1}hitTest(e,t,i){return Promise.resolve(null)}supportsSpatialReference(e){return!0}canResume(){if(!this.spatialReferenceSupported)return!1;switch(this.layer?.type){case"link-chart":case"knowledge-graph-sublayer":case"graphics":break;default:if(c(this.view)&&!this.view.inGeographicLayout)return!1}return!!super.canResume()&&this.visibleAtCurrentScale}getSuspendInfo(){const e=super.getSuspendInfo(),t=!this.spatialReferenceSupported;return t&&(e.spatialReferenceNotSupported=t),e}addAttachHandles(e){this.addHandles(e,"attach")}_addHighlightFilter(e,t){return this._highlightRegistry.register(t,e)}_removeHighlight(e){this._highlightRegistry.unregister(e)}_onHighlightChange(){}_getHighlightFilterGroups(){const e=[];for(const{name:t,filters:i}of this._highlightRegistry.highlightGroups){const s=this._effectiveHighlightOptions.findIndex(e=>e.name===t);s<0||s>=u||e.push({order:s,filters:i})}return e}};return e([l()],w.prototype,"attached",void 0),e([l({type:H,set(e){const t=i(e,this._get("clips"),H);this._set("clips",t)}})],w.prototype,"clips",void 0),e([l()],w.prototype,"container",void 0),e([l({type:_})],w.prototype,"highlightOptions",null),e([l({type:t.ofType(_)})],w.prototype,"highlights",void 0),e([l()],w.prototype,"_effectiveHighlightOptions",null),e([l()],w.prototype,"moving",void 0),e([l({readOnly:!0})],w.prototype,"spatialReferenceSupported",null),e([l({readOnly:!0})],w.prototype,"updateParameters",void 0),e([l()],w.prototype,"updateRequested",void 0),e([l()],w.prototype,"updating",null),e([l()],w.prototype,"view",void 0),e([l()],w.prototype,"_visibleAtCurrentScale",void 0),e([l({readOnly:!0})],w.prototype,"visibleAtCurrentScale",null),w=e([p("esri.views.2d.layers.LayerView2D")],w),w};export{j as LayerView2D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{makeHandle as
|
|
2
|
+
import{__decorate as t}from"tslib";import{makeHandle as e}from"../../../core/handleUtils.js";import i from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{watch as h}from"../../../core/reactiveUtils.js";import{property as s,subclass as a}from"../../../core/accessorSupport/decorators.js";import o from"../../../layers/support/FeatureFilter.js";import{GraphicsCollection as p}from"../../../support/GraphicsCollection.js";import{BitmapContainer as g}from"../engine/BitmapContainer.js";import{LayerView2D as l}from"./LayerView2D.js";import n from"./graphics/GraphicsView2D.js";import m from"./graphics/HighlightGraphicContainer.js";import d from"./support/ExportStrategy.js";import c from"../../layers/LayerView.js";import u from"../../layers/MapImageLayerView.js";import{RefreshableLayerView as f}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as y}from"../../layers/support/highlightUtils.js";import{MapServiceLayerViewHelper as _}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as H}from"../../support/drapedUtils.js";import{getHighlightName as w}from"../../support/highlightOptionsUtils.js";let j=class extends(u(f(l(c)))){constructor(){super(...arguments),this._highlightGraphics=new p,this._updateHash=""}fetchPopupFeaturesAtTarget(t,e,i){return this._popupHighlightHelper.fetchPopupFeaturesAtTarget(e,i)}update(t){const e=`${this.exportImageVersion}/${t.state.id}/${t.pixelRatio}/${t.stationary}`;this._updateHash!==e&&(this._updateHash=e,this.strategy.update(t).catch(t=>{r(t)||i.getLogger(this).error(t)}),t.stationary&&this._popupHighlightHelper.updateHighlightedFeatures(t.state.resolution)),this._highlightView.processUpdate(t)}attach(){const{imageMaxWidth:t,imageMaxHeight:e,version:i}=this.layer,r=i>=10.3,s=i>=10;this._bitmapContainer=new g,this.container.addChild(this._bitmapContainer),this._highlightView=new n({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new m(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1}),this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new _({createFetchPopupFeaturesQueryGeometry:(t,e)=>H(t,e,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:t,property:e})=>this._highlightView.graphicUpdateHandler({graphic:t,property:e}),layerView:this,updatingHandles:this._updatingHandles}),this.strategy=new d({container:this._bitmapContainer,fetchSource:(t,e,i,r)=>this.fetchImageBitmap(t,e,i,r).then(({bitmap:t})=>t),requestUpdate:this.requestUpdate.bind(this),imageMaxWidth:t,imageMaxHeight:e,imageRotationSupported:r,imageNormalizationSupported:s,hidpi:!0}),this.addAttachHandles(h(()=>this.exportImageVersion,()=>this.requestUpdate())),this.requestUpdate()}detach(){this.strategy.destroy(),this.container.removeAllChildren(),this._bitmapContainer.removeAllChildren(),this._highlightView.destroy(),this._popupHighlightHelper.destroy()}viewChange(){}moveEnd(){this.requestUpdate()}supportsSpatialReference(t){return this.layer.serviceSupportsSpatialReference(t)}async doRefresh(){this._updateHash="",this.requestUpdate()}isUpdating(){return this.strategy.updating||this.updateRequested}fetchImage(t,e,i,r){return this.layer.fetchImage(t,e,i,{timeExtent:this.timeExtent,floors:this.floors,...r})}fetchImageBitmap(t,e,i,r){return this.layer.fetchImageBitmap(t,e,i,{timeExtent:this.timeExtent,floors:this.floors,...r})}highlight(t,i){const r=y(t);if(0===r.length)return e();const h=w(i),s=this._addHighlightGraphics(r,h);return e(()=>!this.destroyed&&this._removeHighlightGraphics(r,s))}_onHighlightChange(){const t=this._getHighlightFilterGroups();this._highlightView?.setHighlightFilters(t)}_addHighlightGraphics(t,e){return this._highlightGraphics.addMany(t),this._addHighlightFilter(new o({objectIds:t.map(t=>t.uid)}),e)}_removeHighlightGraphics(t,e){this._highlightGraphics.removeMany(t),this._removeHighlight(e)}};t([s()],j.prototype,"strategy",void 0),j=t([a("esri.views.2d.layers.MapImageLayerView2D")],j);const v=j;export{v as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import i from"../../../Graphic.js";import{isSome as s}from"../../../core/arrayUtils.js";import t from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import{watch as a,initial as o,on as h}from"../../../core/reactiveUtils.js";import{isScreenRect as n}from"../../../core/screenUtils.js";import{subclass as l}from"../../../core/accessorSupport/decorators.js";import{LayerView2D as c}from"./LayerView2D.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import i from"../../../Graphic.js";import{isSome as s}from"../../../core/arrayUtils.js";import t from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import{watch as a,initial as o,on as h}from"../../../core/reactiveUtils.js";import{isScreenRect as n}from"../../../core/screenUtils.js";import{subclass as l}from"../../../core/accessorSupport/decorators.js";import p from"../../../layers/support/FeatureFilter.js";import{LayerView2D as c}from"./LayerView2D.js";import g from"./graphics/GraphicContainer.js";import u from"./graphics/GraphicsView2D.js";import d from"../../layers/LayerView.js";import{getHighlightName as f}from"../../support/highlightOptionsUtils.js";const m="sublayers",w="layerView";let y=class extends(c(d)){*graphicsViews(){null==this._graphicsViewsFeatureCollectionMap?null==this._graphicsViews?yield*[]:yield*this._graphicsViews:yield*this._graphicsViewsFeatureCollectionMap.keys()}async hitTest(e,i){return Array.from(this.graphicsViews(),e=>{const s=e.hitTest(this.view,i);if(null!=this._graphicsViewsFeatureCollectionMap){const i=this._graphicsViewsFeatureCollectionMap.get(e);for(const e of s)!e.popupTemplate&&i.popupTemplate&&(e.popupTemplate=i.popupTemplate),e.sourceLayer=e.layer=this.layer}return s}).flat().map(s=>({type:"graphic",graphic:s,layer:this.layer,mapPoint:n(i)?null:e}))}highlight(e,a){let o;"number"==typeof e?o=[e]:e instanceof i?o=[e.uid]:Array.isArray(e)&&e.length>0?o="number"==typeof e[0]?e:e.map(e=>e&&e.uid):t.isCollection(e)&&(o=e.map(e=>e&&e.uid).toArray());const h=o?.filter(s);if(!h?.length)return r();const n=f(a),l=this._addHighlightFilter(new p({objectIds:h}),n);return r(()=>this._removeHighlight(l))}update(e){for(const i of this.graphicsViews())i.processUpdate(e)}attach(){const e=this.view,i=()=>this.requestUpdate(),s=this.layer.featureCollections;if(null!=s&&s.length){this._graphicsViewsFeatureCollectionMap=new Map;for(const t of s){const s=new g(this.view.featuresTilingScheme),r=new u({view:e,graphics:t.source,renderer:t.renderer,requestUpdateCallback:i,container:s});this._graphicsViewsFeatureCollectionMap.set(r,t),this.container.addChild(r.container),this.addHandles([a(()=>t.visible,e=>r.container.visible=e,o),a(()=>r.updating,()=>this.notifyChange("updating"),o)],w)}this._onHighlightChange()}else null!=this.layer.sublayers&&this.addHandles(h(()=>this.layer.sublayers,"change",()=>this._createGraphicsViews(),{onListenerAdd:()=>this._createGraphicsViews(),onListenerRemove:()=>this._destroyGraphicsViews()}),m)}detach(){this._destroyGraphicsViews(),this.removeHandles(m)}moveEnd(){}viewChange(){for(const e of this.graphicsViews())e.viewChange()}isUpdating(){for(const e of this.graphicsViews())if(e.updating)return!0;return!1}_destroyGraphicsViews(){this.container.removeAllChildren(),this.removeHandles(w);for(const e of this.graphicsViews())e.destroy();this._graphicsViews=null,this._graphicsViewsFeatureCollectionMap=null}_createGraphicsViews(){if(this._destroyGraphicsViews(),null==this.layer.sublayers)return;const e=[],i=this.view,s=()=>this.requestUpdate();for(const t of this.layer.sublayers){const r=new g(this.view.featuresTilingScheme);r.fadeTransitionEnabled=!0;const h=new u({view:i,graphics:t.graphics,requestUpdateCallback:s,container:r});this.addHandles([t.on("graphic-update",h.graphicUpdateHandler),a(()=>t.visible,e=>h.container.visible=e,o),a(()=>h.updating,()=>this.notifyChange("updating"),o)],w),this.container.addChild(h.container),e.push(h)}this._graphicsViews=e,this._onHighlightChange()}_onHighlightChange(){const e=this._getHighlightFilterGroups();for(const i of this._graphicsViews||[])i.setHighlightFilters(e);this._graphicsViewsFeatureCollectionMap?.forEach((i,s)=>{s.setHighlightFilters(e)})}};y=e([l("esri.views.2d.layers.MapNotesLayerView2D")],y);const V=y;export{V as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{isSome as e}from"../../../core/arrayUtils.js";import r from"../../../core/Collection.js";import i from"../../../core/CollectionFlattener.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{watch as o,syncAndInitial as a,initial as n}from"../../../core/reactiveUtils.js";import{isScreenRect as h}from"../../../core/screenUtils.js";import{property as p,subclass as c}from"../../../core/accessorSupport/decorators.js";import l from"../../../rest/support/DirectionLine.js";import
|
|
2
|
+
import{__decorate as t}from"tslib";import{isSome as e}from"../../../core/arrayUtils.js";import r from"../../../core/Collection.js";import i from"../../../core/CollectionFlattener.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{watch as o,syncAndInitial as a,initial as n}from"../../../core/reactiveUtils.js";import{isScreenRect as h}from"../../../core/screenUtils.js";import{property as p,subclass as c}from"../../../core/accessorSupport/decorators.js";import l from"../../../layers/support/FeatureFilter.js";import u from"../../../rest/support/DirectionLine.js";import d from"../../../rest/support/DirectionPoint.js";import _ from"../../../rest/support/PointBarrier.js";import m from"../../../rest/support/PolygonBarrier.js";import g from"../../../rest/support/PolylineBarrier.js";import w from"../../../rest/support/RouteInfo.js";import y from"../../../rest/support/Stop.js";import{LayerView2D as f}from"./LayerView2D.js";import v from"./graphics/GraphicContainer.js";import k from"./graphics/GraphicsView2D.js";import{RouteLayerInteractiveOptions as F}from"./support/RouteLayerInteractiveOptions.js";import M from"../../layers/LayerView.js";import{getHighlightName as j}from"../../support/highlightOptionsUtils.js";const G=["route-info","direction-line","direction-point","polygon-barrier","polyline-barrier","point-barrier","stop"],I={graphic:null,property:null,oldValue:null,newValue:null};function V(t){return t instanceof u||t instanceof d||t instanceof _||t instanceof m||t instanceof g||t instanceof w||t instanceof y}function C(t){return r.isCollection(t)&&t.length&&V(t.at(0))}function b(t){return Array.isArray(t)&&t.length>0&&V(t[0])}let P=class extends(f(M)){constructor(){super(...arguments),this._graphics=new r,this._networkFeatureMap=new Map,this._networkGraphicMap=new Map,this._interaction=null,this._loadInteractionPromise=null,this.interactive=!1,this.interactiveOptions=new F}get _routeItems(){return new i({getCollections:()=>this.layer&&!this.destroyed?[this.layer.routeInfo?new r([this.layer.routeInfo]):null,this.layer.directionLines,this.layer.directionPoints,this.layer.polygonBarriers,this.layer.polylineBarriers,this.layer.pointBarriers,this.layer.stops]:[]})}initialize(){this.addHandles(o(()=>{const{interactive:t,suspended:e}=this;return{interactive:t,suspended:e}},({interactive:t,suspended:e})=>{const r=t&&!e;r&&this._getInteractionLoadPromise().then(t=>{t.enabled=this.interactive&&!this.suspended}),this._interaction&&(this._interaction.enabled=r)},a)),this._updatingHandles.addOnCollectionChange(()=>this._routeItems,t=>this._routeItemsChanged(t),n)}destroy(){this._networkFeatureMap.clear(),this._networkGraphicMap.clear(),this._graphics.removeAll(),this._get("_routeItems")?.destroy()}attach(){this._createGraphicsView()}detach(){this._destroyGraphicsView(),this._interaction?.enabled&&(this._interaction.enabled=!1)}get selectedNetworkFeatures(){return this._interaction?.selectedNetworkFeatures??null}async create(t){return this._interaction?.create(t)}delete(){this._interaction?.delete()}async fetchPopupFeaturesAtTarget(t,e,r){return this._graphicsView.hitTest(this.view,t).filter(({popupTemplate:t})=>!!t)}highlight(t,r){let i;i=V(t)?[this._getNetworkFeatureUid(t)]:b(t)?t.map(t=>this._getNetworkFeatureUid(t)):C(t)?t.map(t=>this._getNetworkFeatureUid(t)).toArray():[t.uid];const o=i.filter(e);if(!o.length)return s();const a=j(r),n=this._addHighlightFilter(new l({objectIds:o}),a);return s(()=>this._removeHighlight(n))}async hitTest(t,r){if(this.suspended)return null;const i=this._graphicsView.hitTest(this.view,r).filter(e).map(t=>this._networkGraphicMap.get(t));if(!i.length)return null;const{layer:s}=this;return i.reverse().map(e=>({type:"route",layer:s,mapPoint:h(r)?null:t,networkFeature:e}))}isUpdating(){return this._graphicsView.updating}moveEnd(){}remove(t){this._interaction?.remove(t)}update(t){this._graphicsView.processUpdate(t)}viewChange(){this._graphicsView.viewChange()}_createGraphic(t){const e=t.toGraphic();return e.layer=this.layer,e.sourceLayer=this.layer,e}_createGraphicsView(){const t=this.view,e=()=>this.requestUpdate(),r=new v(t.featuresTilingScheme);this._graphicsView=new k({container:r,graphics:this._graphics,requestUpdateCallback:e,view:t}),this.container.addChild(r),this._onHighlightChange()}_destroyGraphicsView(){this.container.removeChild(this._graphicsView.container),this._graphicsView.destroy()}_getDrawOrder(t){const e=this._networkGraphicMap.get(t);return G.indexOf(e.type)}_getInteractionLoadPromise(){return this._loadInteractionPromise||(this._loadInteractionPromise=this._loadInteraction(),this._updatingHandles.consumePromise(this._loadInteractionPromise)),this._loadInteractionPromise}_getNetworkFeatureUid(t){return this._networkFeatureMap.has(t)?this._networkFeatureMap.get(t).uid:null}async _loadInteraction(){const{interactiveOptions:t,layer:e,view:r}=this,{RouteLayerInteraction:i}=await(import("./support/RouteLayerInteraction.js"));return this._interaction=new i({interactiveOptions:t,layer:e,view:r}),this._interaction}_routeItemsChanged(t){if(t.removed.length){this._graphics.removeMany(t.removed.map(t=>{const e=this._networkFeatureMap.get(t);return this._networkFeatureMap.delete(t),this._networkGraphicMap.delete(e),e}));for(const e of t.removed)this.removeHandles(e)}if(t.added.length){this._graphics.addMany(t.added.map(t=>{const e=this._createGraphic(t);return null==e.symbol?null:(this._networkFeatureMap.set(t,e),this._networkGraphicMap.set(e,t),e)}).filter(e));for(const e of t.added)this.addHandles([o(()=>e.geometry,(t,r)=>{this._updateGraphic(e,"geometry",t,r)}),o(()=>e.symbol,(t,r)=>{this._updateGraphic(e,"symbol",t,r)}),o(()=>e.popupTemplate,t=>{this._networkFeatureMap.has(e)&&(this._networkFeatureMap.get(e).popupTemplate=t)}),o(()=>e.toGraphic().attributes,t=>{this._networkFeatureMap.has(e)&&(this._networkFeatureMap.get(e).attributes=t)})],e);this._graphics.sort((t,e)=>this._getDrawOrder(t)-this._getDrawOrder(e))}}_updateGraphic(t,e,r,i){if(!this._networkFeatureMap.has(t)){const e=this._createGraphic(t);return this._networkFeatureMap.set(t,e),this._networkGraphicMap.set(e,t),void this._graphics.add(e)}const s=this._networkFeatureMap.get(t);s[e]=r,I.graphic=s,I.property=e,I.oldValue=i,I.newValue=r,this._graphicsView.graphicUpdateHandler(I)}_onHighlightChange(){const t=this._getHighlightFilterGroups();this._graphicsView?.setHighlightFilters(t)}};t([p()],P.prototype,"_routeItems",null),t([p()],P.prototype,"_interaction",void 0),t([p()],P.prototype,"interactive",void 0),t([p({readOnly:!0})],P.prototype,"interactiveOptions",void 0),t([p({readOnly:!0})],P.prototype,"selectedNetworkFeatures",null),P=t([c("esri.views.2d.layers.RouteLayerView2D")],P);const U=P;export{U as default};
|