@arcgis/core 5.0.0-next.11 → 5.0.0-next.12
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/PopupTemplate.js +1 -1
- package/analysis/AreaMeasurementAnalysis.js +1 -1
- package/applications/KnowledgeStudio/generalSdkInternalAccess.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/geometry/nearestVertex.js +5 -0
- package/arcade/geometry/operators.js +1 -1
- package/arcade/geometry/operatorsWorker.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{af47272aaaef0ea57e71.js → 00ea3052170e831c6bc8.js} +1 -1
- package/assets/esri/core/workers/chunks/{91dfd29e2dba200eab09.js → 0105d814fb51c366d1da.js} +1 -1
- package/assets/esri/core/workers/chunks/{125e71b0e29d1d132777.js → 02a22dd6d208a925cc5a.js} +1 -1
- package/assets/esri/core/workers/chunks/02e7359162cf974b41b6.js +1 -0
- package/assets/esri/core/workers/chunks/{ead8d0cbcebd12dbfad7.js → 04211fba145d9f06b3ec.js} +1 -1
- package/assets/esri/core/workers/chunks/0441ea7c89266a68b6f0.js +1 -0
- package/assets/esri/core/workers/chunks/07f2a75431dd8fc502ef.js +1 -0
- package/assets/esri/core/workers/chunks/{d1e97cce5047f1791e22.js → 0ac13de43438f572f59c.js} +1 -1
- package/assets/esri/core/workers/chunks/{629127877042ad784ad2.js → 0c8aeb6262e9ec7c87d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{d07f911d40bf05fc0306.js → 1008e3d64f5880e3dbf2.js} +1 -1
- package/assets/esri/core/workers/chunks/{c29486c4eeb3e72effff.js → 110429583b28c28c36ee.js} +1 -1
- package/assets/esri/core/workers/chunks/{61d970ed75c2c358b1e9.js → 14d601e0fe7a0538c7c1.js} +1 -1
- package/assets/esri/core/workers/chunks/18474c017ddacd1d3d2c.js +1 -0
- package/assets/esri/core/workers/chunks/{1257c37bf04d39c27b62.js → 1c3bee704bafb64bba70.js} +1 -1
- package/assets/esri/core/workers/chunks/1d07846bcaac47df0644.js +1 -0
- package/assets/esri/core/workers/chunks/{509392131ec473d6b988.js → 1dfca37f95f2b968aa54.js} +1 -1
- package/assets/esri/core/workers/chunks/2132ccc45da90f6208b2.js +1 -0
- package/assets/esri/core/workers/chunks/2166238a7ad63a2d43c7.js +1 -0
- package/assets/esri/core/workers/chunks/2214d3b1f11658a85d0f.js +1 -0
- package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +1 -0
- package/assets/esri/core/workers/chunks/22ca80f491e070b2a5e7.js +1 -0
- package/assets/esri/core/workers/chunks/{f80f5dbf96c343ac4df6.js → 24d8922ac9cd48621357.js} +1 -1
- package/assets/esri/core/workers/chunks/257f17b3836a623a9dbe.js +1 -0
- package/assets/esri/core/workers/chunks/2b27499fa9de22970b7a.js +1 -0
- package/assets/esri/core/workers/chunks/2e76fbd3c874300fc4a7.js +1 -0
- package/assets/esri/core/workers/chunks/31b5900119dd7cd9e7d3.js +1 -0
- package/assets/esri/core/workers/chunks/34bb4852ebef0f529c96.js +1 -0
- package/assets/esri/core/workers/chunks/{9698f36c143953a975d4.js → 353d447f3745942c88a8.js} +1 -1
- package/assets/esri/core/workers/chunks/{52282f767bd0e99ddca0.js → 3545dce74bb6b0354cb7.js} +1 -1
- package/assets/esri/core/workers/chunks/36b1f47d70b57d79df7b.js +1 -0
- package/assets/esri/core/workers/chunks/38810e3f298e8a0b64a6.js +1 -0
- package/assets/esri/core/workers/chunks/{7290e7a819eb291b1df2.js → 38fa50336983265c73a4.js} +3 -3
- package/assets/esri/core/workers/chunks/{fe49321dca22dc60d105.js → 3b1982bf7b44ff897a35.js} +1 -1
- package/assets/esri/core/workers/chunks/3bacd904cd93c8013f6a.js +1 -0
- package/assets/esri/core/workers/chunks/{588533c3abe876f20f62.js → 3d5b157bd9060b07670b.js} +1 -1
- package/assets/esri/core/workers/chunks/{06e60fc7715d08ede59d.js → 3edffdb0e282ed562ac7.js} +1 -1
- package/assets/esri/core/workers/chunks/3fa15d4ee5fab8fff76e.js +1 -0
- package/assets/esri/core/workers/chunks/487e1c592f1b6fd03a7d.js +1 -0
- package/assets/esri/core/workers/chunks/{ee5aa11750c51b220f1e.js → 4bcb83119481453dbb90.js} +1 -1
- package/assets/esri/core/workers/chunks/4ca5d58117e7a5f73e1e.js +1 -0
- package/assets/esri/core/workers/chunks/{826fa0dfb63df77bfd95.js → 4f0016111fd84c612f41.js} +1 -1
- package/assets/esri/core/workers/chunks/{24cd7b84cd0f3de4bff2.js → 4f14fed0ec885c3c33d5.js} +1 -1
- package/assets/esri/core/workers/chunks/{4baf6f6e7ddedb25f806.js → 5299ec59c86022ca37e2.js} +1 -1
- package/assets/esri/core/workers/chunks/53a9c34cb3f6ac06cd50.js +1 -0
- package/assets/esri/core/workers/chunks/5415fbcc7ed203fc5575.js +1 -0
- package/assets/esri/core/workers/chunks/54c49a768147720c3c56.js +1 -0
- package/assets/esri/core/workers/chunks/558822b700e8bd844052.js +1 -0
- package/assets/esri/core/workers/chunks/{da24ad57747714ac5eda.js → 55adbd7481f8dfb1067e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7803495f8862d9025bcd.js → 56e06c9c1120bea2c641.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc66490520f97eef15bf.js → 57806a01f33074b601e7.js} +24 -24
- package/assets/esri/core/workers/chunks/{67f03d042455cd0f7009.js → 57b410198d83bf0ab708.js} +1 -1
- package/assets/esri/core/workers/chunks/{0a5d74414dd02a2fb8e1.js → 5bc4140333d0db904949.js} +1 -1
- package/assets/esri/core/workers/chunks/5e08b19e6d7202ea38d7.js +1 -0
- package/assets/esri/core/workers/chunks/{0d5212f59e9b62c16164.js → 5f6df4a3376b52ead53f.js} +1 -1
- package/assets/esri/core/workers/chunks/{15c7c10ff9ac63f0e792.js → 5fb2edf942b1cd8d7336.js} +1 -1
- package/assets/esri/core/workers/chunks/600e2e6b51e2fb9c598c.js +1 -0
- package/assets/esri/core/workers/chunks/{dc51438b832551924a9e.js → 6238ca7541800eb2566b.js} +1 -1
- package/assets/esri/core/workers/chunks/{731f7b552dde0fb325cd.js → 62c2bd082a0c669bc857.js} +1 -1
- package/assets/esri/core/workers/chunks/{b8a3f1e60e24a13749c1.js → 631fb2e62e48f8be4051.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8e686efe344a33a0258.js → 6490bc392a4b4f9e24f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{e767f83f9e2de6650f80.js → 6581b94e796781c0ad4a.js} +1 -1
- package/assets/esri/core/workers/chunks/{53654edd766d9b4ef750.js → 658cd45b5fb304fd840a.js} +1 -1
- package/assets/esri/core/workers/chunks/67f305b0c72e77a6331a.js +1 -0
- package/assets/esri/core/workers/chunks/6922351c001fdb4cb757.js +1 -0
- package/assets/esri/core/workers/chunks/{6e22b02a9715c10578d0.js → 69cca5d3f715876c6b32.js} +1 -1
- package/assets/esri/core/workers/chunks/6c13c01c47abc1939f96.js +1 -0
- package/assets/esri/core/workers/chunks/{c37f7756d48ff9af2656.js → 736035c0069ccb03bee6.js} +1 -1
- package/assets/esri/core/workers/chunks/7c14f99e6cfff2a8ef4a.js +1 -0
- package/assets/esri/core/workers/chunks/812f2ccc01f44e3cfd41.js +1 -0
- package/assets/esri/core/workers/chunks/82338cdd56aa1de28db3.js +1 -0
- package/assets/esri/core/workers/chunks/{51ab2acac4ecc1ca9c34.js → 86830fcb5475502dac65.js} +1 -1
- package/assets/esri/core/workers/chunks/{11e96a312f1294d34c50.js → 881df4fd1dc594576457.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1ca7c3a32ce00ed8b81.js → 8be16b03caa947ac7631.js} +1 -1
- package/assets/esri/core/workers/chunks/8d9ccc9a43a315cb6b04.js +1 -0
- package/assets/esri/core/workers/chunks/{042cd64e1f4eb326c30f.js → 8fc82fe1fcbcedf35400.js} +1 -1
- package/assets/esri/core/workers/chunks/91afee11072471e4eefe.js +1 -0
- package/assets/esri/core/workers/chunks/{fbd8d2f61f8a15bcf3db.js → 9595aabbaf411eceea1e.js} +1 -1
- package/assets/esri/core/workers/chunks/{6cf391b5ed7351601a2a.js → 9978ec6c67e87dc08a1d.js} +1 -1
- package/assets/esri/core/workers/chunks/9cdd087c43a601ec331d.js +1 -0
- package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
- package/assets/esri/core/workers/chunks/{5e2ce34def5e053913b2.js → a10e533f336c035d8d40.js} +1 -1
- package/assets/esri/core/workers/chunks/{311b564e44ae637c960d.js → a3ade7e8b9ddadb5f800.js} +1 -1
- package/assets/esri/core/workers/chunks/{18c5d79d5ee1136e0a57.js → a57751f3d78524c876cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{0030d68d9edf42b4af57.js → a6a87f92f453204e9bdb.js} +1 -1
- package/assets/esri/core/workers/chunks/a6ee40dfc471d6612f3c.js +1 -0
- package/assets/esri/core/workers/chunks/a8ea050090c351e3b6d6.js +1 -0
- package/assets/esri/core/workers/chunks/adf7ccf4ef629211c7ee.js +1 -0
- package/assets/esri/core/workers/chunks/ae6066ea6cb373dc6db3.js +1 -0
- package/assets/esri/core/workers/chunks/af5fc5d6c1d072a27df1.js +1 -0
- package/assets/esri/core/workers/chunks/b328635d191f5424c047.js +1 -0
- package/assets/esri/core/workers/chunks/b59f9c3f7a149214256f.js +1 -0
- package/assets/esri/core/workers/chunks/{664ae441617afe4b17ec.js → b87bc987983b31c13f64.js} +1 -1
- package/assets/esri/core/workers/chunks/bb56717c4e36f28d4c08.js +1 -0
- package/assets/esri/core/workers/chunks/bbdfa8ffcf084cbd9938.js +1 -0
- package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +1 -0
- package/assets/esri/core/workers/chunks/bc29c29bfa5be3ebafb1.js +1 -0
- package/assets/esri/core/workers/chunks/{ddfd01bb9ba8577c3ffc.js → c3dcfe26c2c3c829762d.js} +1 -1
- package/assets/esri/core/workers/chunks/c3ddcf9148dd2640c402.js +1 -0
- package/assets/esri/core/workers/chunks/{6d9f2b113d6bde936a04.js → c4dfd897bcab20dee43b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f30a9514571c7be9978.js → c5c02ace54fe4ab9214b.js} +1 -1
- package/assets/esri/core/workers/chunks/{87921f3fa9001f5801ed.js → c68935ed44eb0702a6ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{b6853c6a25eaabc9a7f6.js → c9579d607e59bae214da.js} +1 -1
- package/assets/esri/core/workers/chunks/d39a10155317e6f7a21c.js +1 -0
- package/assets/esri/core/workers/chunks/{773f2c6c9d38db76dfed.js → d42f7e48d694b2427c0d.js} +1 -1
- package/assets/esri/core/workers/chunks/d466f3f0d3824c77da7c.js +1 -0
- package/assets/esri/core/workers/chunks/d4a91f2256e48316a8f0.js +1 -0
- package/assets/esri/core/workers/chunks/d69265ceabfa92b40bb7.js +1 -0
- package/assets/esri/core/workers/chunks/d7755c4c8d1d3059efca.js +1 -0
- package/assets/esri/core/workers/chunks/{eb9c166db0db6fa60e95.js → d7b0fcce847f563ea255.js} +1 -1
- package/assets/esri/core/workers/chunks/d87f0116ee53ec5f98e9.js +1 -0
- package/assets/esri/core/workers/chunks/d888ae5ac1810a486919.js +1 -0
- package/assets/esri/core/workers/chunks/db54552def7bc6cef9bd.js +1 -0
- package/assets/esri/core/workers/chunks/dc4d29cfce12ac599888.js +1 -0
- package/assets/esri/core/workers/chunks/dda6ca9af35518652d0f.js +1 -0
- package/assets/esri/core/workers/chunks/{7005d956c990a04ee8b2.js → dec336700cfb83abbbeb.js} +1 -1
- package/assets/esri/core/workers/chunks/{b3613a38178cad2ebc82.js → dee9867b3379e024ae96.js} +1 -1
- package/assets/esri/core/workers/chunks/df130abb76713a85b4f9.js +1 -0
- package/assets/esri/core/workers/chunks/e0aa036c56ecdfe01503.js +1 -0
- package/assets/esri/core/workers/chunks/e2e4f6b58763fae51ae5.js +1 -0
- package/assets/esri/core/workers/chunks/e8a9c56fd0e7fd2558ef.js +1 -0
- package/assets/esri/core/workers/chunks/{1d06fcae4c2f02fb1c95.js → eb7eb3b3b8800fd73f3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{37c1f155da14de91565a.js → edf58513f789856cd1db.js} +1 -1
- package/assets/esri/core/workers/chunks/{f34e3fa0c5b28531e289.js → ef789e8487deab916fad.js} +1 -1
- package/assets/esri/core/workers/chunks/f28ffda9a95c6568503d.js +1 -0
- package/assets/esri/core/workers/chunks/f98689562017583f73ee.js +1 -0
- package/assets/esri/core/workers/chunks/{292daac70bb828e4923f.js → f9cd068d184cab66dc33.js} +1 -1
- package/assets/esri/core/workers/chunks/{dff2df259f140b7d97a9.js → fd88e07cba5964f80e9e.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9b16fd41cd59d452522.js → fdbe16e3b23e01655c0c.js} +1 -1
- package/assets/esri/core/workers/chunks/{063905fbf9a0c6586949.js → ffdba51e7256ebf8ebd3.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +35 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/chunks/containsOperator.js +1 -1
- package/chunks/densifyOperator.js +1 -1
- package/chunks/differenceOperator.js +1 -1
- package/chunks/intersectsOperator.js +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/config.js +1 -1
- package/core/XHRAdapter.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/quantityFormatUtils.js +1 -1
- package/core/unitFormatUtils.js +1 -1
- package/core/unitUtils.js +1 -1
- package/editing/fieldUtils.js +5 -0
- package/geometry/Extent.js +1 -1
- package/geometry/Geometry.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/Point.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/geometry/support/polygonUtils.js +1 -1
- package/interfaces.d.ts +90 -7
- package/kernel.js +1 -1
- package/layers/Layer.js +1 -1
- package/layers/MapNotesLayer.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/save/groupLayerUtils.js +1 -1
- package/layers/save/imageryUtils.js +1 -1
- package/layers/save/streamLayerUtils.js +1 -1
- package/layers/support/DateTimeFieldFormat.js +1 -1
- package/layers/support/FieldFormat.js +1 -1
- package/layers/support/LayerLoadContext.js +1 -1
- package/layers/support/NumberFieldFormat.js +1 -1
- package/layers/support/arcgisLayerUrl.js +1 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/fetchService.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +1 -1
- package/networks/support/UNTraceConfiguration.js +1 -1
- package/package.json +1 -1
- package/popup/ExpressionInfo.js +1 -1
- package/popup/FieldInfo.js +1 -1
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/content/BarChartMediaInfo.js +1 -1
- package/popup/content/ColumnChartMediaInfo.js +1 -1
- package/popup/content/Content.js +1 -1
- package/popup/content/CustomContent.js +1 -1
- package/popup/content/ExpressionContent.js +1 -1
- package/popup/content/FieldsContent.js +1 -1
- package/popup/content/ImageMediaInfo.js +1 -1
- package/popup/content/LineChartMediaInfo.js +1 -1
- package/popup/content/MediaContent.js +1 -1
- package/popup/content/PieChartMediaInfo.js +1 -1
- package/popup/content/RelationshipContent.js +1 -1
- package/popup/content/TextContent.js +1 -1
- package/popup/content/UtilityNetworkAssociationsContent.js +1 -1
- package/popup/content/mixins/ChartMediaInfo.js +1 -1
- package/popup/content/mixins/MediaInfo.js +1 -1
- package/popup/content.js +1 -1
- package/popup/support/FieldInfoFormat.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/request/cors.js +5 -0
- package/request/loadImage.js +5 -0
- package/request/preferredHosts.js +5 -0
- package/request/process.js +5 -0
- package/request/queue.js +5 -0
- package/request/serviceJSON.js +5 -0
- package/request.js +1 -1
- package/rest/geometryService/utils.js +1 -1
- package/rest/knowledgeGraphService.d.ts +1 -0
- package/support/getDefaultUnitForView.js +1 -1
- package/support/popupUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/time/TimeExtent.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementAreaVisualization.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementLabelVisualization.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementManipulatorVisualization.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementSketchVisualization.js +5 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +5 -0
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +5 -0
- package/views/2d/analysis/analysisViewModuleImportUtils.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SDataRequester.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/BufferManager.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/ManagedTextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileErrors.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/magnifier/resources.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/components/FeatureList.js +1 -1
- package/widgets/Editor/components/MergeFeaturesList.js +5 -0
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/PanelContent.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/css.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/errors.js +1 -1
- package/widgets/Editor/support/mergeFeaturesUtils.js +1 -1
- package/widgets/Editor/support/splitFeatureUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/utils.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/support/FilterCondition.js +1 -1
- package/assets/esri/core/workers/chunks/0200637e0503556a3b97.js +0 -1
- package/assets/esri/core/workers/chunks/022c854eff2c2c2aed6b.js +0 -1
- package/assets/esri/core/workers/chunks/06f75c5b6b50934d72a6.js +0 -1
- package/assets/esri/core/workers/chunks/15f969836d63c7fe2d9d.js +0 -1
- package/assets/esri/core/workers/chunks/2857bcb68df874e9aa62.js +0 -1
- package/assets/esri/core/workers/chunks/2a9fc0301268ff909246.js +0 -1
- package/assets/esri/core/workers/chunks/2ddcf3cea0efe4052618.js +0 -1
- package/assets/esri/core/workers/chunks/2e8a4df83c43f86d7361.js +0 -1
- package/assets/esri/core/workers/chunks/2f2e4f81f3daa3fb8527.js +0 -1
- package/assets/esri/core/workers/chunks/3109f0a6914e7be088ed.js +0 -1
- package/assets/esri/core/workers/chunks/31bb1ee9370c2753ce9d.js +0 -1
- package/assets/esri/core/workers/chunks/329fccd7f5cb8401e0c3.js +0 -1
- package/assets/esri/core/workers/chunks/38f6b9288c82dac9a800.js +0 -1
- package/assets/esri/core/workers/chunks/3b1848713ee25f750242.js +0 -1
- package/assets/esri/core/workers/chunks/4291681d067ebdf86e73.js +0 -1
- package/assets/esri/core/workers/chunks/42a1e71d09e8583a7327.js +0 -1
- package/assets/esri/core/workers/chunks/44f27eac92c5ccc57e12.js +0 -1
- package/assets/esri/core/workers/chunks/4941bfd3aae7f6bdac97.js +0 -1
- package/assets/esri/core/workers/chunks/4bd2cc65f7db0d261543.js +0 -1
- package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +0 -1
- package/assets/esri/core/workers/chunks/4fbe2a8d742065cbaea3.js +0 -1
- package/assets/esri/core/workers/chunks/4fe4feeb251f2916a339.js +0 -1
- package/assets/esri/core/workers/chunks/55eb6a0f1e4569a65f2a.js +0 -1
- package/assets/esri/core/workers/chunks/591e459f9fce34f519ca.js +0 -1
- package/assets/esri/core/workers/chunks/59514624daf188a8030f.js +0 -1
- package/assets/esri/core/workers/chunks/5c09d98b41f71a036e2a.js +0 -1
- package/assets/esri/core/workers/chunks/605b9643b1baeff16149.js +0 -1
- package/assets/esri/core/workers/chunks/6293e33f304c4952f88c.js +0 -1
- package/assets/esri/core/workers/chunks/655beaf83e9845a02334.js +0 -1
- package/assets/esri/core/workers/chunks/6e25ef5ad6d6b3f88343.js +0 -1
- package/assets/esri/core/workers/chunks/759321045c264bc6964e.js +0 -1
- package/assets/esri/core/workers/chunks/7e3f27ebf366d4266350.js +0 -1
- package/assets/esri/core/workers/chunks/826072cfc0ac8e36f03c.js +0 -1
- package/assets/esri/core/workers/chunks/9b0c2f4311fe9bca370a.js +0 -1
- package/assets/esri/core/workers/chunks/9c48d8d17831aa57f8a4.js +0 -1
- package/assets/esri/core/workers/chunks/9f28b2800945903bc165.js +0 -1
- package/assets/esri/core/workers/chunks/a27e74117c37f3efcbca.js +0 -1
- package/assets/esri/core/workers/chunks/a41ba05c09a59d1eb35f.js +0 -1
- package/assets/esri/core/workers/chunks/a93ebd076bc55aa6eab0.js +0 -1
- package/assets/esri/core/workers/chunks/aaed35a6414859233678.js +0 -1
- package/assets/esri/core/workers/chunks/acd0564ad1544f452f3f.js +0 -1
- package/assets/esri/core/workers/chunks/b0f43191a431c9de16e5.js +0 -1
- package/assets/esri/core/workers/chunks/b320bb76c7e9998fe53b.js +0 -1
- package/assets/esri/core/workers/chunks/ba4571d2637a74a59552.js +0 -1
- package/assets/esri/core/workers/chunks/c4090a60d149a5962179.js +0 -1
- package/assets/esri/core/workers/chunks/c61c61dac1e8d6188749.js +0 -1
- package/assets/esri/core/workers/chunks/c84caf81bfaa4a8b5aa1.js +0 -1
- package/assets/esri/core/workers/chunks/c8c8cf43fd640d2f5cb1.js +0 -1
- package/assets/esri/core/workers/chunks/d28670cb11164e318e45.js +0 -1
- package/assets/esri/core/workers/chunks/d56ac52a5288e06365e7.js +0 -1
- package/assets/esri/core/workers/chunks/ddca92e18e96ea1c9d89.js +0 -1
- package/assets/esri/core/workers/chunks/ded9747ae04ab889d52a.js +0 -1
- package/assets/esri/core/workers/chunks/df5afa06c6deb6b40109.js +0 -1
- package/assets/esri/core/workers/chunks/df8279e1baf378faf85f.js +0 -1
- package/assets/esri/core/workers/chunks/e3434f91f47f551d9e02.js +0 -1
- package/assets/esri/core/workers/chunks/eb6c3dd440ede4adf603.js +0 -1
- package/assets/esri/core/workers/chunks/edc671b9b83c8e19cb42.js +0 -1
- package/assets/esri/core/workers/chunks/f141c9f7f0d9b2322bf6.js +0 -1
- package/assets/esri/core/workers/chunks/f57401a759f420596b2c.js +0 -1
- package/assets/esri/core/workers/chunks/f7a1f48c53422c6e2028.js +0 -1
- package/assets/esri/core/workers/chunks/f7f002ea5ff5fe7f6249.js +0 -1
- package/assets/esri/core/workers/chunks/f8e889be4b45f6f0667e.js +0 -1
- package/assets/esri/core/workers/chunks/fbd796c88f07bb6755dc.js +0 -1
- package/assets/esri/core/workers/chunks/fec3897ed7e8691387ed.js +0 -1
- package/processRequest.js +0 -5
- package/requestQueue.js +0 -5
- package/support/requestPresets.js +0 -5
- package/support/requestUtils.js +0 -5
- /package/{rest/support → request}/ImageWithType.js +0 -0
- /package/{requestConfig.js → request/config.js} +0 -0
- /package/{support/requestImageUtils.js → request/image.js} +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import e from"../request.js";async function r(r,t){return(await e(r,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}})).data}export{r as requestServiceJSON};
|
package/request.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"./config.js";import
|
|
5
|
+
import e from"./config.js";import r from"./core/Error.js";import has from"./core/has.js";import{onAbort as t}from"./core/promiseUtils.js";import{isDataProtocol as o,isBlobProtocol as s,normalize as n,queryToObject as i,getInterceptor as a}from"./core/urlUtils.js";import{requestConfig as u}from"./request/config.js";import{createRequestError as p,processRequest as c}from"./request/process.js";import{ensureRequestQueue as l}from"./request/queue.js";async function f(e,r){e instanceof URL&&(e=e.toString());const u=o(e),l=s(e);l||u||(e=n(e));const f={url:e,requestOptions:{...r}};r?.query&&(f.requestOptions.query=r?.query instanceof URLSearchParams?i(r.query.toString().replaceAll("+"," ")):r?.query);const b=e=>({data:e,getAllHeaders:q,getHeader:q,httpStatus:200,requestOptions:f.requestOptions,url:f.url}),g=a(e,m.internalInterceptors);if(g){const e=await w(g,f);if(null!=e)return b(e)}let O=a(e);if(O){const e=await w(O,f);if(null!=e)return b(e);O.after||O.error||(O=null)}if(e=f.url,"image"===(r=f.requestOptions).responseType&&(has("host-webworker")||has("host-node")))throw p("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),f);if("head"===r.method){if(r.body)throw p("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),f);if(u||l)throw p("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),f)}if(await h(),d)return d.execute(e,r);const j=new AbortController,v=t(r,()=>j.abort()),k={controller:j,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:O,parameters:f,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=r.useQueue?y(k):c(k),E=await S.finally(()=>v?.remove());return O?.after?.(E),E}let d;const m=e.request,q=()=>null;async function h(){has("host-webworker")&&(!d&&globalThis.invokeStaticMessage?d=await import("./core/workers/request.js"):u.isForeignWorker=!0)}async function w(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let s,n;try{n=await e.before(t)}catch(o){s=p("request:interceptor",o,t)}if((n instanceof Error||n instanceof r)&&(s=p("request:interceptor",n,t)),s)throw e.error&&e.error(s),s;return n}}async function y(e){const r=await l(e);return r?r.push(e):c(e)}export{f as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{getGeometryType as e,getJsonType as t}from"../../geometry/support/jsonUtils.js";function r(e){return{geometryType:t(e[0]),geometries:e.map(e=>e.toJSON())}}function o(t,r,o){const n=e(r);return t.map(e=>{const t=n.fromJSON(e);return t.spatialReference=o,t})}export{o as decodeGeometries,r as encodeGeometries};
|
|
@@ -16,6 +16,7 @@ export const executeSearchStreaming: __esri.knowledgeGraphService["executeSearch
|
|
|
16
16
|
export const executeUpdateGraphProperty: __esri.knowledgeGraphService["executeUpdateGraphProperty"];
|
|
17
17
|
export const executeUpdateNamedType: __esri.knowledgeGraphService["executeUpdateNamedType"];
|
|
18
18
|
export const executeUpdateSearchIndex: __esri.knowledgeGraphService["executeUpdateSearchIndex"];
|
|
19
|
+
export const fetchAllClientDataKeys: __esri.knowledgeGraphService["fetchAllClientDataKeys"];
|
|
19
20
|
export const fetchAsynchronousFindPathsResultData: __esri.knowledgeGraphService["fetchAsynchronousFindPathsResultData"];
|
|
20
21
|
export const fetchClientDataAtKeys: __esri.knowledgeGraphService["fetchClientDataAtKeys"];
|
|
21
22
|
export const fetchKnowledgeGraph: __esri.knowledgeGraphService["fetchKnowledgeGraph"];
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getDefaultUnitSystem as t}from"../core/unitUtils.js";import r from"../portal/Portal.js";function e(e){const
|
|
5
|
+
import{getDefaultUnitSystem as t}from"../core/unitUtils.js";import r from"../portal/Portal.js";function e(e){const i="metric";if(!e)return i;const{map:n}=e,o=(n&&"portalItem"in n?n.portalItem?.portal:null)??r.getDefault();switch(o.user?.units??o.units){case i:return i;case"english":return"imperial"}return t(e.spatialReference)??i}export{e as getDefaultUnitForView};
|
package/support/popupUtils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../PopupTemplate.js";import{isFieldVisibleByDefault as t,isFieldEditable as i,getDisplayFieldName as n,isRasterPixelValueField as o}from"../layers/support/fieldUtils.js";import r from"../popup/FieldInfo.js";import s from"../popup/content/AttachmentsContent.js";import l from"../popup/content/FieldsContent.js";import a from"../popup/support/FieldInfoFormat.js";function d({displayField:t,editFieldsInfo:i,fields:n,objectIdField:o,title:r},s){if(!n)return null;const l=b({editFieldsInfo:i,fields:n,objectIdField:o},s);if(!l.length)return null;const a=I({titleBase:r,fields:n,displayField:t}),d=y();return new e({title:a,content:d,fieldInfos:l})}function u(t){const{fields:i,featureReduction:n,title:o}=t,r=n.fields;if(!r)return null;const s=w(r,i??[]);if(!s.length)return null;const l=v();return new e({title:o,content:l,fieldInfos:s})}const c=(e,i)=>i.visibleFieldNames?i.visibleFieldNames.has(e.name):t(e,i);function f({fields:e,ignoreFieldTypes:t,sortDisabled:i}){const n=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===n&&(e=e.slice()),!0!==i&&e.sort(p),e}function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:j(e)?-1:j(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){return new l({fieldInfos:b(e,t).filter(e=>e.visible)})}function b(e,t){const n=t?.visibleFieldNames;return f({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||C,sortDisabled:t?.sortDisabled}).map(t=>new r({fieldName:t.name,isEditable:i(t,e),label:t.alias,format:g(t),visible:c(t,{...e,visibleFieldNames:n})}))}function w(e,t){return e.map(e=>new r({fieldName:e.name,isEditable:!1,label:e.alias,format:F(e,t),visible:!0}))}function F(e,t){const{onStatisticField:i,onStatisticExpression:n,statisticType:o}=e;if(i){const e=t.find(e=>i===e.name);if(e)return g(e)}return"number"===n?.returnType?new a({digitSeparator:!0,places:2}):"count"===o?new a({digitSeparator:!0,places:0}):void 0}function g(e){switch(e.type){case"small-integer":case"integer":
|
|
5
|
+
import e from"../PopupTemplate.js";import{isFieldVisibleByDefault as t,isFieldEditable as i,getDisplayFieldName as n,isRasterPixelValueField as o}from"../layers/support/fieldUtils.js";import r from"../popup/FieldInfo.js";import s from"../popup/content/AttachmentsContent.js";import l from"../popup/content/FieldsContent.js";import a from"../popup/support/FieldInfoFormat.js";function d({displayField:t,editFieldsInfo:i,fields:n,objectIdField:o,title:r},s){if(!n)return null;const l=b({editFieldsInfo:i,fields:n,objectIdField:o},s);if(!l.length)return null;const a=I({titleBase:r,fields:n,displayField:t}),d=y();return new e({title:a,content:d,fieldInfos:l})}function u(t){const{fields:i,featureReduction:n,title:o}=t,r=n.fields;if(!r)return null;const s=w(r,i??[]);if(!s.length)return null;const l=v();return new e({title:o,content:l,fieldInfos:s})}const c=(e,i)=>i.visibleFieldNames?i.visibleFieldNames.has(e.name):t(e,i);function f({fields:e,ignoreFieldTypes:t,sortDisabled:i}){const n=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===n&&(e=e.slice()),!0!==i&&e.sort(p),e}function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:j(e)?-1:j(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){return new l({fieldInfos:b(e,t).filter(e=>e.visible)})}function b(e,t){const n=t?.visibleFieldNames;return f({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||C,sortDisabled:t?.sortDisabled}).map(t=>new r({fieldName:t.name,isEditable:i(t,e),label:t.alias,format:g(t),visible:c(t,{...e,visibleFieldNames:n})}))}function w(e,t){return e.map(e=>new r({fieldName:e.name,isEditable:!1,label:e.alias,format:F(e,t),visible:!0}))}function F(e,t){const{onStatisticField:i,onStatisticExpression:n,statisticType:o}=e;if(i){const e=t.find(e=>i===e.name);if(e)return g(e)}return"number"===n?.returnType?new a({digitSeparator:!0,places:2}):"count"===o?new a({digitSeparator:!0,places:0}):void 0}function g(e){switch(e.type){case"small-integer":case"integer":return new a({digitSeparator:!0,places:0});case"single":case"double":return new a({digitSeparator:!0,places:2});case"string":return o(e.name)?new a({digitSeparator:!0,places:0}):void 0;default:return}}function y(){return[new l,new s]}function v(){return[new l]}function I(e){const t=n(e),{titleBase:i}=e;return t?`${i}: {${t.trim()}}`:i??""}function j(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const C=["geometry","blob","raster","guid","xml"];export{b as createFieldInfos,m as createFieldsContent,d as createPopupTemplate,u as createPopupTemplateForFeatureReduction};
|
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const f="20251011",e="6abee44c043f07bde1faed64dbf9a0120767fff1";export{f as buildDate,e as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/has.js";import{pt2px as e,toPt as t,px2pt as l}from"../../core/screenUtils.js";import{isSubtypeGroupLayer as a}from"../../layers/support/layerUtils.js";import{loadArcade as i}from"../../support/loadArcade.js";import{getStroke as r}from"./gfxUtils.js";import{renderSymbol as s,renderOnce as o}from"./renderUtils.js";import{isSymbol3D as n}from"./typeUtils.js";import{applyColorToSymbol as c,applySizesToSymbol as u,applyRotationToSymbol as p,getColorFromSymbol as f,applyOpacityToColor as y}from"./utils.js";import{renderRelationshipRamp as h}from"../../widgets/Legend/styles/support/relationshipUtils.js";import{getRelationshipRampElement as d}from"../../widgets/Legend/support/relationshipRampUtils.js";let m=null;const b=[255,255,255];function g(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function w(e,t,l){const{backgroundColor:a,outline:i,dotSize:r}=e,s=l?.swatchSize||22,o=.8,n=Math.round(s*s/Math.max(r,.5)**2*o),c=window.devicePixelRatio,u=document.createElement("canvas"),p=s*c;u.width=p,u.height=p,u.style.width=u.width/c+"px",u.style.height=u.height/c+"px";const f=u.getContext("2d");if(a&&(f.fillStyle=a.toCss(!0),f.fillRect(0,0,p,p),f.fill()),f.fillStyle=t?.toCss(!0)??"",m&&m.length/2===n)for(let h=0;h<2*n;h+=2){const e=m[h],t=m[h+1];f.fillRect(e,t,r*c,r*c),f.fill()}else{m=[];for(let e=0;e<2*n;e+=2){const e=g(0,p),t=g(0,p);m.push(e,t),f.fillRect(e,t,r*c,r*c),f.fill()}}i&&(i.color&&(f.strokeStyle=i.color.toCss(!0)),f.lineWidth=i.width,f.strokeRect(0,0,p,p));const y=new Image(s,s);return y.src=u.toDataURL(),y.ariaLabel=l?.ariaLabel??null,y.alt=l?.ariaLabel??"",y}function S(e,t={}){const l=t.radius||40,a=2*Math.PI*l,i=e.length,o=a/i,n=[],c=r(t.outline);null!=c?.width&&(c.width*=2),(c||t.backgroundColor)&&n.push({shape:{type:"circle",cx:l,cy:l,r:l},fill:t.backgroundColor,stroke:c,offset:[0,0]});const u=t.values,p=u&&u.length===i&&100===u.reduce((e,t)=>e+t,0),f=[0];for(let r=0;r<i;r++){let t=null;p&&(t=u[r]*a/100,f.push(t+f[r])),n.push({shape:{type:"circle",cx:l,cy:l,r:l/2},fill:[0,0,0,0],stroke:{width:l,dashArray:`${(t??o)/2} ${a}`,dashoffset:"-"+(p?f[r]/2:r*(o/2)),color:e[r]},offset:[0,0]})}let y=null;const h=2*l+(c?.width||0),d=t.holePercentage;if(d){c&&n.push({shape:{type:"circle",cx:l,cy:l,r:l*d},fill:null,stroke:c,offset:[0,0]});const e=h/2;y=[[{shape:{type:"circle",cx:e,cy:e,r:e},fill:b,stroke:c?{...c,color:b}:null,offset:[0,0]},{shape:{type:"circle",cx:e,cy:e,r:l*d},fill:[0,0,0],stroke:null,offset:[0,0]}]]}return s([n],[h,h],{cssEffectFilter:t.cssEffectFilter,ignoreStrokeWidth:!0,masking:y,rotations:[-90],ariaLabel:t.ariaLabel})}function v(e,t={}){const l=e?.authoringInfo;if(!("relationship"===l?.type)||!l?.numClasses||!e.uniqueValueInfos)return null;const{focus:a,numClasses:i}=l,r=d({focus:a,numClasses:i,infos:e.uniqueValueInfos}),s=t?.node||document.createElement("div");return o(s,()=>h(r,t.id||"relationship",{opacity:t.opacity||1,cssEffectFilter:t.cssEffectFilter,ariaLabel:t.ariaLabel})),s}function V(e,t={}){const l=24,a=75,i="horizontal"===t.align,r=i?a:l,s=i?l:a,o=t.width??r,n=t.height??s,c=t.gradient??!0,u=window.devicePixelRatio,p=o*u,f=n*u,y=document.createElement("canvas");y.width=p,y.height=f,y.ariaLabel=t.ariaLabel??null,y.style.width=`${o}px`,y.style.height=`${n}px`;const h=y.getContext("2d"),d=i?p:0,m=i?0:f;if(c){const t=h.createLinearGradient(0,0,d,m),l=e.length,a=1===l?0:1/(l-1);e.forEach((e,l)=>t.addColorStop(l*a,e.toString())),h.fillStyle=t,h.fillRect(0,0,p,f)}else{const t=i?p/e.length:p,l=i?f:f/e.length;let a=0,r=0;for(const s of e)h.fillStyle=s.toString(),h.fillRect(a,r,t,l),a=i?a+t:0,r=i?0:r+l}const b=document.createElement("div");return b.style.width=`${o}px`,b.style.height=`${n}px`,x(b,t?.cssEffectFilter),b.appendChild(y),b}function k(e){const t=e.match(/drop-shadow\(\s*([^\s]+)\s+[^\s]+\s+[^\s]+\s+.+?\)/);return t?t[1]:null}function x(l,a){if(!a)return;l.style.filter=a;const i=k(a);if(i){const a=e(t(i));a<0?l.style.marginLeft=`${Math.abs(a)}px`:l.style.marginRight=`${a}px`}}async function L(e,t){switch(e.type){case"web-style":{const{previewWebStyleSymbol:l}=await import("./previewWebStyleSymbol.js");return l(e,L,t)}case"label-3d":case"line-3d":case"mesh-3d":case"point-3d":case"polygon-3d":{const{previewSymbol3D:l}=await import("./previewSymbol3D.js");return l(e,t)}case"simple-marker":case"simple-line":case"simple-fill":case"picture-marker":case"picture-fill":case"text":{const{previewSymbol2D:l}=await import("./previewSymbol2D.js");return l(e,t)}case"cim":{const{previewCIMSymbol:l}=await import("./previewCIMSymbol.js");return l(e,t)}default:return}}function R(e){return e&&void 0!==e.opacity?e.opacity*("parent"in e?R(e.parent):1):1}async function
|
|
5
|
+
import"../../core/has.js";import{pt2px as e,toPt as t,px2pt as l}from"../../core/screenUtils.js";import{isSubtypeGroupLayer as a}from"../../layers/support/layerUtils.js";import{loadArcade as i}from"../../support/loadArcade.js";import{getStroke as r}from"./gfxUtils.js";import{renderSymbol as s,renderOnce as o}from"./renderUtils.js";import{isSymbol3D as n}from"./typeUtils.js";import{applyColorToSymbol as c,applySizesToSymbol as u,applyRotationToSymbol as p,getColorFromSymbol as f,applyOpacityToColor as y}from"./utils.js";import{renderRelationshipRamp as h}from"../../widgets/Legend/styles/support/relationshipUtils.js";import{getRelationshipRampElement as d}from"../../widgets/Legend/support/relationshipRampUtils.js";let m=null;const b=[255,255,255];function g(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function w(e,t,l){const{backgroundColor:a,outline:i,dotSize:r}=e,s=l?.swatchSize||22,o=.8,n=Math.round(s*s/Math.max(r,.5)**2*o),c=window.devicePixelRatio,u=document.createElement("canvas"),p=s*c;u.width=p,u.height=p,u.style.width=u.width/c+"px",u.style.height=u.height/c+"px";const f=u.getContext("2d");if(a&&(f.fillStyle=a.toCss(!0),f.fillRect(0,0,p,p),f.fill()),f.fillStyle=t?.toCss(!0)??"",m&&m.length/2===n)for(let h=0;h<2*n;h+=2){const e=m[h],t=m[h+1];f.fillRect(e,t,r*c,r*c),f.fill()}else{m=[];for(let e=0;e<2*n;e+=2){const e=g(0,p),t=g(0,p);m.push(e,t),f.fillRect(e,t,r*c,r*c),f.fill()}}i&&(i.color&&(f.strokeStyle=i.color.toCss(!0)),f.lineWidth=i.width,f.strokeRect(0,0,p,p));const y=new Image(s,s);return y.src=u.toDataURL(),y.ariaLabel=l?.ariaLabel??null,y.alt=l?.ariaLabel??"",y}function S(e,t={}){const l=t.radius||40,a=2*Math.PI*l,i=e.length,o=a/i,n=[],c=r(t.outline);null!=c?.width&&(c.width*=2),(c||t.backgroundColor)&&n.push({shape:{type:"circle",cx:l,cy:l,r:l},fill:t.backgroundColor,stroke:c,offset:[0,0]});const u=t.values,p=u&&u.length===i&&100===u.reduce((e,t)=>e+t,0),f=[0];for(let r=0;r<i;r++){let t=null;p&&(t=u[r]*a/100,f.push(t+f[r])),n.push({shape:{type:"circle",cx:l,cy:l,r:l/2},fill:[0,0,0,0],stroke:{width:l,dashArray:`${(t??o)/2} ${a}`,dashoffset:"-"+(p?f[r]/2:r*(o/2)),color:e[r]},offset:[0,0]})}let y=null;const h=2*l+(c?.width||0),d=t.holePercentage;if(d){c&&n.push({shape:{type:"circle",cx:l,cy:l,r:l*d},fill:null,stroke:c,offset:[0,0]});const e=h/2;y=[[{shape:{type:"circle",cx:e,cy:e,r:e},fill:b,stroke:c?{...c,color:b}:null,offset:[0,0]},{shape:{type:"circle",cx:e,cy:e,r:l*d},fill:[0,0,0],stroke:null,offset:[0,0]}]]}return s([n],[h,h],{cssEffectFilter:t.cssEffectFilter,ignoreStrokeWidth:!0,masking:y,rotations:[-90],ariaLabel:t.ariaLabel})}function v(e,t={}){const l=e?.authoringInfo;if(!("relationship"===l?.type)||!l?.numClasses||!e.uniqueValueInfos)return null;const{focus:a,numClasses:i}=l,r=d({focus:a,numClasses:i,infos:e.uniqueValueInfos}),s=t?.node||document.createElement("div");return o(s,()=>h(r,t.id||"relationship",{opacity:t.opacity||1,cssEffectFilter:t.cssEffectFilter,ariaLabel:t.ariaLabel})),s}function V(e,t={}){const l=24,a=75,i="horizontal"===t.align,r=i?a:l,s=i?l:a,o=t.width??r,n=t.height??s,c=t.gradient??!0,u=window.devicePixelRatio,p=o*u,f=n*u,y=document.createElement("canvas");y.width=p,y.height=f,y.ariaLabel=t.ariaLabel??null,y.style.width=`${o}px`,y.style.height=`${n}px`;const h=y.getContext("2d"),d=i?p:0,m=i?0:f;if(c){const t=h.createLinearGradient(0,0,d,m),l=e.length,a=1===l?0:1/(l-1);e.forEach((e,l)=>t.addColorStop(l*a,e.toString())),h.fillStyle=t,h.fillRect(0,0,p,f)}else{const t=i?p/e.length:p,l=i?f:f/e.length;let a=0,r=0;for(const s of e)h.fillStyle=s.toString(),h.fillRect(a,r,t,l),a=i?a+t:0,r=i?0:r+l}const b=document.createElement("div");return b.style.width=`${o}px`,b.style.height=`${n}px`,x(b,t?.cssEffectFilter),b.appendChild(y),b}function k(e){const t=e.match(/drop-shadow\(\s*([^\s]+)\s+[^\s]+\s+[^\s]+\s+.+?\)/);return t?t[1]:null}function x(l,a){if(!a)return;l.style.filter=a;const i=k(a);if(i){const a=e(t(i));a<0?l.style.marginLeft=`${Math.abs(a)}px`:l.style.marginRight=`${a}px`}}async function L(e,t){switch(e.type){case"web-style":{const{previewWebStyleSymbol:l}=await import("./previewWebStyleSymbol.js");return l(e,L,t)}case"label-3d":case"line-3d":case"mesh-3d":case"point-3d":case"polygon-3d":{const{previewSymbol3D:l}=await import("./previewSymbol3D.js");return l(e,t)}case"simple-marker":case"simple-line":case"simple-fill":case"picture-marker":case"picture-fill":case"text":{const{previewSymbol2D:l}=await import("./previewSymbol2D.js");return l(e,t)}case"cim":{const{previewCIMSymbol:l}=await import("./previewCIMSymbol.js");return l(e,t)}default:return}}function R(e){return e&&void 0!==e.opacity?e.opacity*("parent"in e?R(e.parent):1):1}async function F(e,t){if(!e)return;const l=e.sourceLayer,a=(null!=t&&t.useSourceLayer?l:e.layer)??l,r=t?.ignoreOpacity?1:R(a);if(null!=e.symbol&&(null==t||!0!==t.ignoreGraphicSymbol)){const l="web-style"===e.symbol.type?await e.symbol.fetchSymbol({...t,acceptedFormats:t?.webStyleAcceptedFormats,cache:t?.webStyleCache}):e.symbol.clone();return c(l,null,{add:r}),l}const s=t?.renderer??I(a);let o=s&&"getSymbolAsync"in s?await s.getSymbolAsync(e,t):null;if(!o)return;if(o="web-style"===o.type?await o.fetchSymbol({...t,acceptedFormats:t?.webStyleAcceptedFormats,cache:t?.webStyleCache}):o.clone(),!(s&&"visualVariables"in s&&s.visualVariables?.length&&j(o)))return c(o,null,{add:r}),o;if("arcadeRequiredForVisualVariables"in s&&s.arcadeRequiredForVisualVariables&&null==t?.arcade){const e={...t};e.arcade=await i(),t=e}const{getColor:n,getOpacity:f,getAllSizes:y,getRotationAngle:h}=await import("../../renderers/visualVariables/support/visualVariableUtils.js"),d=[],m=[],b=[],g=[];for(const i of s.visualVariables)switch(i.type){case"color":d.push(i);break;case"opacity":m.push(i);break;case"rotation":g.push(i);break;case"size":i.target||b.push(i)}const w=!!d.length&&d[d.length-1],S=w?n(w,e,t):null,v=!!t?.ignoreOpacity,V=!!m.length&&m[m.length-1],k=V?f(V,e,t):null;if(c(o,S,v?void 0:{override:k,add:r}),b.length&&!0!==t?.ignoreSizeVariables){const l=y(b,e,t);await u(o,l)}if(!0!==t?.ignoreRotationVariables)for(const i of g)p(o,h(i,e,t),i.axis);return o}async function C(e,t){if(!e)return;const{layer:l,sourceLayer:a}=e,r=R(l??a);if(null!=e.symbol&&(null==t||!0!==t.ignoreGraphicSymbol)){const l="web-style"===e.symbol.type?await e.symbol.fetchSymbol({...t,acceptedFormats:t?.webStyleAcceptedFormats}):e.symbol.clone();return f(l,r)}const s=t?.renderer??I(l)??I(a);let o=s&&"getSymbolAsync"in s?await s.getSymbolAsync(e,t):void 0;if(!o)return;o="web-style"===o.type?await o.fetchSymbol({...t,acceptedFormats:t?.webStyleAcceptedFormats}):o.clone();const n=f(o,void 0);if(!s||!("visualVariables"in s)||"visualVariables"in s&&!s.visualVariables||"visualVariables"in s&&!s.visualVariables?.length||!j(o))return n?y(n,r):void 0;if("arcadeRequiredForVisualVariables"in s&&s.arcadeRequiredForVisualVariables&&null==t?.arcade){const e={...t};e.arcade=await i(),t=e}const{getColor:c,getOpacity:u}=await import("../../renderers/visualVariables/support/visualVariableUtils.js"),p=[],h=[];if(s.visualVariables)for(const i of s.visualVariables)switch(i.type){case"color":p.push(i);break;case"opacity":h.push(i)}const d=p.length>0?p[p.length-1]:null,m=(d?c(d,e,t):void 0)??n,b=h.length>0?h[h.length-1]:null,g=b?u(b,e,t):null;return null!=m&&null!=g&&(m.a=g),m?y(m,r):null}function j(e){return!n(e)||"water"!==e.symbolLayers.at(0)?.type}function I(e){if(e)return"renderer"in e?e.renderer:void 0}async function U(e,t,l){if(!e)return;const{layer:a,sourceLayer:i}=e,r=l?.renderer??I(a)??I(i);if(!r)return null;if("visualVariables"in r&&r.visualVariables?.length){const{getRampStops:i}=await import("../../widgets/Legend/support/colorRampUtils.js"),{getRampStops:s}=await import("../../widgets/Legend/support/sizeRampUtils.js"),{getFormatOptionsForVisualVariable:o}=await import("../../widgets/Legend/support/utils.js");let n=null;for(const c of r.visualVariables){const u=t?o(a,c,t.timeZone):null;let p=null;switch(c.type){case"color":p=await i(c,null,u);break;case"opacity":p=await i(c);break;case"size":c.target||(p=await s(r,c,null,l?.scale||t?.scale,t,u))}if(p?.length){const t=p.find((t,l)=>{const a=e.attributes[c.field];return 0===l?a>=t.value:l===p?.length-1?a<=t.value:t.value===a});if(t){n=t.label;break}}}if(n)return n}switch(r.type){case"class-breaks":{const t="getClassBreakInfo"in r?await r.getClassBreakInfo(e,l):null;return t?.label??(t&&r.classBreakInfos?.length>1)?`${t.minValue} - ${t.maxValue}`:null}case"unique-value":{const t="getUniqueValueInfo"in r?await r.getUniqueValueInfo(e,l):null;return t?.label}}return null}async function z(e,t){e?.layer&&a(e.layer)&&((e=e.cloneShallow()).layer=e.layer.findSublayerForFeature(e)??null);const i=null===e?t?.fallbackSymbol??null:await F(e,{ignoreGraphicSymbol:!!e.layer,ignoreOpacity:t?.ignoreOpacity??!0,ignoreRotationVariables:t?.ignoreRotationVariables??!0,ignoreSizeVariables:t?.ignoreSizeVariables??!0})??t?.fallbackSymbol??null;if(!i)return null;const r=await L(i,{geometry:t.useGeometryForShape?e?.geometry??null:null,useMarkerSymbolSize:!1!==t.useMarkerSymbolSize,size:{width:l(t.widthInPixels??16),height:l(t.heightInPixels??16)},..."cim"===i?.type?{cimOptions:{feature:{attributes:e?.attributes??{}}}}:{}});if(!r)return null;return"element"===(t?.format??"element")?r:r.outerHTML}export{C as getDisplayedColor,F as getDisplayedSymbol,U as getLegendLabel,z as previewGraphic,V as renderColorRampPreviewHTML,w as renderDotDensityPreviewHTML,S as renderPieChartPreviewHTML,L as renderPreviewHTML,v as renderRelationshipRampPreviewHTML};
|
package/time/TimeExtent.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{JSONSupport as e}from"../core/JSONSupport.js";import{truncateDate as r,offsetDate as s}from"../core/timeUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as i}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as o}from"../core/accessorSupport/decorators/writer.js";import{system as a}from"./constants.js";var u;let m=class extends e{static{u=this}static get allTime(){return
|
|
5
|
+
import{__decorate as t}from"tslib";import{JSONSupport as e}from"../core/JSONSupport.js";import{truncateDate as r,offsetDate as s}from"../core/timeUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as i}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as o}from"../core/accessorSupport/decorators/writer.js";import{system as a}from"./constants.js";var u;let m=class extends e{static{u=this}static get allTime(){return p}static get empty(){return d}static fromArray(t){return new u({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(u.allTime)}get isEmpty(){return this.equals(u.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new u({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===s&&r===n}expandTo(t,e=a){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=r(n,t,e));let i=this.end;if(i){const n=r(i,t,e);i=i.getTime()===n.getTime()?n:s(n,1,t,e)}return new u({start:n,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return u.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=t.start?.getTime()??-1/0,n=t.end?.getTime()??1/0;let i,l;return s>=e&&s<=r?i=s:e>=s&&e<=n&&(i=e),r>=s&&r<=n?l=r:n>=e&&n<=r&&(l=n),null==i||null==l||isNaN(i)||isNaN(l)?u.empty:new u({start:i===-1/0?null:new Date(i),end:l===1/0?null:new Date(l)})}offset(t,e,r=a){if(this.isEmpty||this.isAllTime)return this.clone();const n=new u,{start:i,end:l}=this;return null!=i&&(n.start=s(i,t,e,r)),null!=l&&(n.end=s(l,t,e,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new u({start:e,end:r})}};t([n({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"end",void 0),t([i("end")],m.prototype,"readEnd",null),t([o("end")],m.prototype,"writeEnd",null),t([n({readOnly:!0,json:{read:!1}})],m.prototype,"isAllTime",null),t([n({readOnly:!0,json:{read:!1}})],m.prototype,"isEmpty",null),t([n({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"start",void 0),t([i("start")],m.prototype,"readStart",null),t([o("start")],m.prototype,"writeStart",null),m=u=t([l("esri.time.TimeExtent")],m);const p=new m,d=new m({start:void 0,end:void 0});export{m as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import{multiplyOpacity as s}from"../../../../core/colorUtils.js";import{initial as t}from"../../../../core/reactiveUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import p from"../../../../layers/GraphicsLayer.js";import m from"../../../../symbols/SimpleFillSymbol.js";import c from"../../../../symbols/SimpleLineSymbol.js";function n(e){return"simple-line"===e?.type}let h=class extends i{constructor(e){super(e),this._graphicsLayer=new p({listMode:"hide",internal:!0}),this._updatingHandles=new l}initialize(){this.view.map?.add(this._graphicsLayer),this._updatingHandles.add(()=>({color:this.view.effectiveTheme.accentColor,fill:this.measurementViewData.result?.display.fill,outline:this.measurementViewData.result?.display.outline,visible:this.measurementViewData.visible}),({color:e,fill:i,outline:t,visible:o})=>{if(this._graphicsLayer.visible=o,o)if(i&&t){if(2===this._graphicsLayer.graphics.length){const[r,s]=this._graphicsLayer.graphics.toArray(),{symbol:o}=s;if(n(o)&&!!o.color?.equals(e))return r.geometry=i,void(s.geometry=t)}this._graphicsLayer.graphics.destroyAll(),this._graphicsLayer.addMany([new r({geometry:i,symbol:new m({color:s(e,.3),outline:null})}),new r({geometry:t,symbol:new c({color:e,width:2})})])}else this._graphicsLayer.graphics.destroyAll()},t)}destroy(){this._graphicsLayer.removeFromParent(),this._graphicsLayer.graphics.destroyAll(),this._graphicsLayer.destroy(),this._updatingHandles.destroy()}get updating(){return!this._graphicsLayer.loaded||this._updatingHandles.updating}};e([o()],h.prototype,"_graphicsLayer",void 0),e([o()],h.prototype,"_updatingHandles",void 0),e([o()],h.prototype,"measurementViewData",void 0),e([o()],h.prototype,"updating",null),e([o()],h.prototype,"view",void 0),h=e([a("esri.views.2d.analysis.AreaMeasurement.AreaMeasurementAreaVisualization")],h);export{h as AreaMeasurementAreaVisualization};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../../../../core/Accessor.js";import{debounce as t,ignoreAbortErrors as s}from"../../../../core/promiseUtils.js";import{createLength as o,createArea as i}from"../../../../core/quantityUtils.js";import{initial as n}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as p}from"../../../../core/support/UpdatingHandles.js";import l from"../../../../geometry/Polyline.js";import{e as m}from"../../../../chunks/areaOperator.js";import{l as c,e as d}from"../../../../chunks/geodeticAreaOperator.js";import{l as f,e as g}from"../../../../chunks/geodeticDensifyOperator.js";import{l as y,e as h}from"../../../../chunks/geodeticLengthOperator.js";import{e as j}from"../../../../chunks/lengthOperator.js";import{load as _,execute as w}from"../../../../geometry/operators/projectOperator.js";import{e as R}from"../../../../chunks/simplifyOperator.js";import{isSupported as v,geodesicDensify as q,geodesicLengths as O,geodesicAreas as k}from"../../../../geometry/support/geodesicUtils.js";const H=1e5;async function b(e,r){if(!e?.rings.length||!e.rings[0].length)return null;await _();const t=w(e,r);return t?t.spatialReference.isGeographic?v(t.spatialReference)?A(t):U(t):t.spatialReference.isWebMercator?U(t):G(t):null}async function U(e){await Promise.all([c(),f(),y()]);const r=R(e);if(!r)return null;const t=D(r),s=g(r,H,{unit:"meters"});if(!s)return null;const n=g(t,H,{unit:"meters"});if(!n)return null;const a=h(r,{unit:"meters"}),u=d(r,{unit:"square-meters"});return{area:i(u,"square-meters"),display:{fill:s,outline:n},mode:"geodesic",perimeter:o(a,"meters")}}function A(e){const r=R(e);if(!r)return null;const t=D(r),s=q(r,H),n=q(t,H),a=O([r],"meters")[0],u=k([r],"square-meters")[0];return{area:i(u,"square-meters"),display:{fill:s,outline:n},mode:"geodesic",perimeter:o(a,"meters")}}function G(e){const r=R(e);if(!r)return null;const t=D(r),s=j(t,{unit:"meters"}),n=m(r,{unit:"square-meters"});return{area:i(n,"square-meters"),display:{fill:r,outline:t},mode:"euclidean",perimeter:o(s,"meters")}}function D(e){return new l({spatialReference:e.spatialReference,paths:e.rings})}let L=class extends r{constructor(e){super(e),this._result=null,this._updatingHandles=new p,this._debouncedGetResult=t(async e=>{this._result=await b(e,this.view.spatialReference)})}initialize(){this._updatingHandles.add(()=>this.measurementViewData.analysis.geometry,e=>{s(this._debouncedGetResult(e))},n)}destroy(){this._updatingHandles.destroy()}get result(){return this._result}get updating(){return this._updatingHandles.updating}};e([a()],L.prototype,"_result",void 0),e([a()],L.prototype,"_updatingHandles",void 0),e([a()],L.prototype,"measurementViewData",void 0),e([a()],L.prototype,"result",null),e([a()],L.prototype,"updating",null),e([a()],L.prototype,"view",void 0),L=e([u("esri.views.2d.analysis.AreaMeasurement.AreaMeasurementController")],L);export{L as AreaMeasurementController};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as s}from"tslib";import e from"../../../../Graphic.js";import t from"../../../../core/Accessor.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{multiplyOpacity as i,getContrast as a}from"../../../../core/colorUtils.js";import{formatArea as o}from"../../../../core/quantityFormatUtils.js";import{watch as m,initial as p}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import{e as c}from"../../../../chunks/labelPointOperator.js";import{onLocaleChange as d}from"../../../../intl/locale.js";import{fetchMessageBundle as g}from"../../../../intl/messages.js";import u from"../../../../layers/GraphicsLayer.js";import y from"../../../../symbols/Font.js";import _ from"../../../../symbols/TextSymbol.js";function f(s){return"text"===s?.type}let v=class extends t{get _messages(){return this._messagesTask?.value}constructor(s){super(s),this._graphicsLayer=new u({listMode:"hide",internal:!0}),this._updatingHandles=new h,this._messagesTask=null}initialize(){this.view.map?.add(this._graphicsLayer),this.addHandles([m(()=>this.measurementViewData.visible,s=>{this._graphicsLayer.visible=s},p),d(()=>this._updateMessageBundle())]),this._updatingHandles.add(()=>({area:this.measurementViewData.result?.area,color:this.view.effectiveTheme.textColor,geometry:this.measurementViewData.result?.display.fill,messages:this._messages,unit:this.measurementViewData.unit,visible:this.measurementViewData.visible}),({area:s,color:t,geometry:r,messages:m,unit:p,visible:n})=>{if(this._graphicsLayer.visible=n,!n)return;if(!s||!r||!m)return void this._graphicsLayer.graphics.destroyAll();const l=c(r),h=m&&s?o(m,s,p):null;if(this._graphicsLayer.graphics.length){const s=this._graphicsLayer.graphics.at(0);return s.geometry=l,void(f(s.symbol)&&(s.symbol.text=h??""))}const d=i(a(t,160),.5),g=new y({family:"sans-serif",size:14}),u=new _({color:t,haloColor:d,haloSize:2,font:g,text:h});this._graphicsLayer.add(new e({geometry:l,symbol:u}))},p),this._updateMessageBundle()}destroy(){this._graphicsLayer.removeFromParent(),this._graphicsLayer.graphics.destroyAll(),this._graphicsLayer.destroy(),this._updatingHandles.destroy()}get updating(){return!this._graphicsLayer.loaded||!this._messagesTask?.finished||this._updatingHandles.updating}_updateMessageBundle(){return this._messagesTask?.abort(),this._messagesTask=r(()=>g("esri/core/t9n/Units")),this._messagesTask.promise}};s([n()],v.prototype,"_graphicsLayer",void 0),s([n()],v.prototype,"_updatingHandles",void 0),s([n()],v.prototype,"_messages",null),s([n()],v.prototype,"_messagesTask",void 0),s([n()],v.prototype,"measurementViewData",void 0),s([n()],v.prototype,"updating",null),s([n()],v.prototype,"view",void 0),v=s([l("esri.views.2d.analysis.AreaMeasurement.AreaMeasurementLabelVisualization")],v);export{v as AreaMeasurementLabelVisualization};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as r}from"tslib";import e from"../../../../Graphic.js";import t from"../../../../core/Accessor.js";import{initial as s}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as o}from"../../../../core/support/UpdatingHandles.js";import p from"../../../../layers/GraphicsLayer.js";import c from"../../../../symbols/SimpleFillSymbol.js";let n=class extends t{constructor(r){super(r),this._graphicsLayer=new p({listMode:"hide",internal:!0}),this._updatingHandles=new o}initialize(){this.view.map?.add(this._graphicsLayer),this._updatingHandles.add(()=>({geometry:this.measurementViewData.analysis.geometry}),({geometry:r})=>{if(!r)return void this._graphicsLayer.graphics.destroyAll();const t=this._graphicsLayer.graphics.at(0);t?t.geometry=r:(this._graphicsLayer.graphics.destroyAll(),this._graphicsLayer.add(new e({geometry:r,symbol:new c({color:null,outline:null})})))},s)}destroy(){this._graphicsLayer.removeFromParent(),this._graphicsLayer.graphics.destroyAll(),this._graphicsLayer.destroy(),this._updatingHandles.destroy()}get graphic(){return this._graphicsLayer.graphics.at(0)}get graphicsLayer(){return this._graphicsLayer}get updating(){return!this._graphicsLayer.loaded||this._updatingHandles.updating}};r([i()],n.prototype,"_graphicsLayer",void 0),r([i()],n.prototype,"_updatingHandles",void 0),r([i()],n.prototype,"graphic",null),r([i()],n.prototype,"graphicsLayer",null),r([i()],n.prototype,"measurementViewData",void 0),r([i()],n.prototype,"updating",null),r([i()],n.prototype,"view",void 0),n=r([a("esri.views.2d.analysis.AreaMeasurement.AreaMeasurementManipulatorVisualization")],n);export{n as AreaMeasurementManipulatorVisualization};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as r}from"tslib";import e from"../../../../core/Accessor.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import t from"../../../../layers/GraphicsLayer.js";let a=class extends e{constructor(r){super(r),this._graphicsLayer=new t({listMode:"hide",internal:!0})}initialize(){this.view.map?.add(this._graphicsLayer)}destroy(){this._graphicsLayer.removeFromParent(),this._graphicsLayer.destroy()}get graphicsLayer(){return this._graphicsLayer}get updating(){return!this._graphicsLayer.loaded}};r([o()],a.prototype,"_graphicsLayer",void 0),r([o()],a.prototype,"graphicsLayer",null),r([o()],a.prototype,"measurementViewData",void 0),r([o()],a.prototype,"updating",null),r([o()],a.prototype,"view",void 0),a=r([s("esri.views.2d.analysis.AreaMeasurement.AreaMeasurementSketchVisualization")],a);export{a as AreaMeasurementSketchVisualization};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{multiplyOpacity as i}from"../../../../core/colorUtils.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import{isAborted as a,ignoreAbortErrors as o}from"../../../../core/promiseUtils.js";import{watch as r,initial as n}from"../../../../core/reactiveUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import c from"../../../../symbols/SimpleFillSymbol.js";import m from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as d}from"../../../analysis/ExclusiveOperationManager.js";import u from"../../../../widgets/Sketch/SketchViewModel.js";function w(e){return"polygon"===e?.type}let y=class extends t{constructor(e){super(e),this._areaSymbol=null,this._invisibleAreaSymbol=new c({color:null,outline:null}),this._operationManager=new d,this._sketchViewModel=null,this._updatingHandles=new h}initialize(){this._sketchViewModel=new u({defaultCreateOptions:{mode:"click"},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:"none",shapeOperation:"none"},toggleToolOnClick:!1,tool:"reshape"},updateOnGraphicClick:!1,view:this.view}),this.addHandles([r(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{this._operationManager.stop(),t&&e&&this.reshape()}),r(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},n),r(()=>this.view.effectiveTheme.accentColor,e=>{this._areaSymbol=new c({color:i(e,.3),outline:new m({color:e,width:2})})},n)])}destroy(){this._invisibleAreaSymbol.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return"idle";switch(this._operationManager.currentOperationType){case"place":return"placing";case"reshape":return"reshaping"}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start("place",async t=>{if(!this._sketchViewModel||!this.measurementViewData.sketchGraphicsLayer)return;const i=this._sketchViewModel.on("create",e=>{switch(e.state){case"active":{const t=e.graphic?.geometry;"polygon"===t?.type&&(this.measurementViewData.analysis.geometry=t);break}case"cancel":case"complete":t.stop()}});t.handles.push(i,s(()=>{if(i.remove(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll(),a(e))return t.reject();t.resolve({})})),this._sketchViewModel.polygonSymbol=this._invisibleAreaSymbol,this._sketchViewModel.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.addPromise(o(this._sketchViewModel.create("polygon")))})}async reshape(e){return this._operationManager.start("reshape",async t=>{if(!this._sketchViewModel)return;const i=()=>this._areaSymbol&&this._sketchViewModel&&this.measurementViewData.manipulatorGraphic&&this.measurementViewData.manipulatorGraphicsLayer?(this._sketchViewModel.polygonSymbol=this._areaSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(o(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:"reshape"})))):Promise.resolve(),r=this._sketchViewModel.on("update",e=>{const s=e.graphics[0]?.geometry;this.measurementViewData.analysis.geometry=w(s)?s:null,"complete"===e.state&&(this.measurementViewData.interactive?i():t.stop())});t.handles.push(r,s(()=>{if(r.remove(),this._sketchViewModel?.cancel(),a(e))return t.reject();t.resolve()})),await i()})}};e([l()],y.prototype,"_sketchViewModel",void 0),e([l()],y.prototype,"_updatingHandles",void 0),e([l()],y.prototype,"measurementViewData",void 0),e([l()],y.prototype,"state",null),e([l()],y.prototype,"updating",null),e([l()],y.prototype,"view",void 0),y=e([p("esri.views.2d.analysis.AreaMeasurement.AreaMeasurementTool")],y);export{y as AreaMeasurementTool};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as a}from"../../../support/getDefaultUnitForView.js";import{AnalysisView2D as r}from"./AnalysisView2D.js";import{AreaMeasurementAreaVisualization as s}from"./AreaMeasurement/AreaMeasurementAreaVisualization.js";import{AreaMeasurementController as o}from"./AreaMeasurement/AreaMeasurementController.js";import{AreaMeasurementLabelVisualization as n}from"./AreaMeasurement/AreaMeasurementLabelVisualization.js";import{AreaMeasurementManipulatorVisualization as l}from"./AreaMeasurement/AreaMeasurementManipulatorVisualization.js";import{AreaMeasurementSketchVisualization as p}from"./AreaMeasurement/AreaMeasurementSketchVisualization.js";import{AreaMeasurementTool as u}from"./AreaMeasurement/AreaMeasurementTool.js";import m from"../../interactive/snapping/SnappingOptions.js";let h=class extends r{constructor(t){super(t),this._manipulatorVisualization=null,this.analysis=null,this.snappingOptions=new m,this.type="area-measurement-view-2d"}initialize(){const{view:t}=this;this._areaVisualization=new s({view:t,measurementViewData:this}),this._controller=new o({view:t,measurementViewData:this}),this._labelVisualization=new n({view:t,measurementViewData:this}),this._manipulatorVisualization=new l({view:t,measurementViewData:this}),this._sketchVisualization=new p({view:t,measurementViewData:this}),this._tool=new u({view:t,measurementViewData:this})}destroy(){this._areaVisualization?.destroy(),this._controller?.destroy(),this._labelVisualization?.destroy(),this._manipulatorVisualization?.destroy(),this._sketchVisualization?.destroy(),this._tool?.destroy()}get manipulatorGraphic(){return this._manipulatorVisualization?.graphic}get manipulatorGraphicsLayer(){return this._manipulatorVisualization?.graphicsLayer}get sketchGraphicsLayer(){return this._sketchVisualization?.graphicsLayer}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get result(){return this._controller?.result}get unit(){return this.analysis.unit??a(this.view)}get updating(){return(this._areaVisualization?.updating??!0)||(this._controller?.updating??!0)||(this._labelVisualization?.updating??!0)||(this._sketchVisualization?.updating??!0)||(this._tool?.updating??!0)}get visible(){return super.visible}set visible(t){super.visible=t}async place(t){return this._tool.place(t)}};t([e()],h.prototype,"_areaVisualization",void 0),t([e()],h.prototype,"_controller",void 0),t([e()],h.prototype,"_labelVisualization",void 0),t([e()],h.prototype,"_manipulatorVisualization",void 0),t([e()],h.prototype,"_sketchVisualization",void 0),t([e()],h.prototype,"_tool",void 0),t([e({constructOnly:!0})],h.prototype,"analysis",void 0),t([e()],h.prototype,"manipulatorGraphic",null),t([e()],h.prototype,"manipulatorGraphicsLayer",null),t([e()],h.prototype,"sketchGraphicsLayer",null),t([e({readOnly:!0})],h.prototype,"result",null),t([e({type:m,nonNullable:!0})],h.prototype,"snappingOptions",void 0),t([e({readOnly:!0})],h.prototype,"type",void 0),t([e({readOnly:!0})],h.prototype,"unit",null),t([e({readOnly:!0})],h.prototype,"updating",null),h=t([i("esri.views.2d.analysis.AreaMeasurementAnalysisView2D")],h);const c=h;export{c as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Error.js";const
|
|
5
|
+
import e from"../../../core/Error.js";const n={"area-measurement":()=>import("./AreaMeasurementAnalysisView2D.js"),dimension:null,"direct-line-measurement":null,"elevation-profile":()=>import("./ElevationProfileAnalysisView2D.js"),"line-of-sight":null,slice:null,viewshed:null,"volume-measurement":null};function i(i){const l=n[i.type];if(!l)throw new e("analysis-view-module-import-utils:analysis-not-supported",`Analysis "${i.type}" is not supported`);return l()}export{n as analysisModules,i as importAnalysisViewModule};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../core/Error.js";import{handlesGroup as t}from"../../../../core/handleUtils.js";import has from"../../../../core/has.js";import{nextTick as s}from"../../../../core/nextTick.js";import{
|
|
5
|
+
import e from"../../../../core/Error.js";import{handlesGroup as t}from"../../../../core/handleUtils.js";import has from"../../../../core/has.js";import{nextTick as s}from"../../../../core/nextTick.js";import{ignoreAbortErrors as i,throwIfNotAbortError as r,createResolver as o}from"../../../../core/promiseUtils.js";import n from"../../../../core/RandomLCG.js";import{watch as u}from"../../../../core/reactiveUtils.js";import{pt2px as a}from"../../../../core/screenUtils.js";import{ignoreConnectionErrors as d}from"../../../../core/workers/utils.js";import c from"../../../../layers/support/TileInfo.js";import{tileSize as p}from"../../engine/webgl/definitions.js";import{PipelineConnectionHandlers as h}from"./PipelineConnectionHandlers.js";import l from"./Processor.js";import{FeatureSource as g}from"./sources/FeatureSource.js";import{FeatureTileSubscription as _}from"./sources/FeatureTileSubscription.js";import{Tile as f}from"./support/Tile.js";import b from"../../tiling/TileInfoView.js";class m{constructor(e){this.inner=e,this.resolver=o()}}class y{constructor(){this._aggregateAdapter={getFeatureObjectIds:e=>this._processor.getFeatureObjectIdsForAggregate(e)},this._subscriptions=new Map,this._cachedObjectIds=new Set,this._updateRequested=!1,this._didSourceRefresh=!1,this._updateSubscriptionRequests=[],this._updateHighlightRequests=[]}destroy(){this._subscriptions.clear(),this._processor?.destroy(),this._source?.destroy(),this._handles?.remove(),this._updateOverridesRequest=null,this._tileInfoView=null}onAttach(e){has("esri-2d-update-debug")&&console.debug("Pipeline.onAttach");const s=this._connection,r=c.fromJSON(e.tileInfoJSON);this._tileInfoView=new b(r),this._source=new g(this._aggregateAdapter,this._subscriptions,s,this._cachedObjectIds),this._processor=new l(s,this._source),this._handles=t([this._source.store.events.on("changed",()=>this._requestUpdate()),this._source.store.events.on("refresh",()=>this._requestRefresh()),u(()=>this._source.updateTracking.updating,()=>{this._requestUpdate(),i(this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}))})])}onDetach(){has("esri-2d-update-debug")&&console.debug("Pipeline.onDetach"),this.destroy()}set remoteClient(e){this._connection=new h(e)}get features(){const t=this._source?.queryEngine;if(!t)throw new e("no-queryEngine","No query engine defined");return t}get aggregates(){const t=this._processor?.aggregateQueryEngine;if(!t)throw new e("no-queryEngine","No aggregate query engine defined");return t}get processor(){return this._processor}get streamMessenger(){return this._source.streamMessenger}getUsedMemory(){return this._source.usedMemory+this._processor.usedMemory}getDisplayFeatures(e){return this._processor.getDisplayFeatures(e)}getDisplayIds(e){return this._processor.getDisplayIds(e)}getObjectIdsFromGlobalIds(e){return this._source.getObjectIdsFromGlobalIds(e)}async updateSchema(e,t){return has("esri-2d-update-debug")&&this._updateSchemaRequest&&console.error("InternalError: Schema already updating"),this._updateSchemaRequest=new m({schema:e,version:t}),this._requestUpdate(),this._updateSchemaRequest.resolver.promise}updateSubscriptions(e){const t=new m(e);return this._updateSubscriptionRequests.push(t),this._requestUpdate(),t.resolver.promise}updateHighlight(e){const t=new m(e);return this._updateHighlightRequests.push(t),this._requestUpdate(),t.resolver.promise}async onOverride(t){if(null!=this._updateOverridesRequest)throw new e("featurelayer","InternalError - Already processing an edit");this._updateOverridesRequest=new m(t);const s=this._updateOverridesRequest.resolver.promise;return this._requestUpdate(),s}queryStatistics(){return this._source.statistics.toJSON()}async queryVisibleFeatures(e,t){return this.features.executeQuery(e,t)}async queryHeatmapStatistics(e){const t=Math.round(a(e.radius));let s=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const r="string"==typeof e.fieldOffset,o=e.fieldOffset??0,n=Array.from(this._subscriptions.values()),u=this._source.chunks(),d=t**2,c=3/(Math.PI*d),h=2*t,l=Math.ceil(p/h);for(const a of n){const t=a.tile,n=new Float64Array(l*l);for(const s of u){const i=s.getTileReader(t);if(!i)continue;const u=i.getCursor();for(;u.next();){let t=1;if(null!=e.field){const s=u.readAttribute(e.field);t=r?-1*+s:+s+o}const s=u.readXForDisplay()/h,i=u.readYForDisplay()/h,a=Math.floor(s),p=Math.floor(i);if(a<0||p<0||a>=l||p>=l)continue;const g=((.5+a-s)*h)**2+((.5+p-i)*h)**2;if(g>d)continue;const _=t*(c*(1-g/d)**2);n[p+a*l]+=_}}for(let e=0;e<n.length;e++)s=Math.min(s,n[e]),i=Math.max(i,n[e])}return{max:i,min:s}}async getSampleFeatures(e){const t=this._source.chunks();if(t.reduce((e,t)=>e+t.size(),0)<=e.minFeatureCount){if(!this._source.updateTracking.updating){const e=[];return this._source.store.forEachUnsafe(t=>e.push(t.readLegacyFeatureWorldSpace())),e}return null}const s=new Set,i=[],r=t.map(e=>e.reader.getCursor()),o=new n,u=3*e.sampleSize;for(let n=0;n<u&&i.length<e.sampleSize;n++){const e=r[o.getIntRange(0,t.length-1)];if(0===e.getSize())continue;const n=o.getIntRange(0,e.getSize()-1);e.setIndex(n);const u=e.getObjectId();s.has(u)||(s.add(u),i.push(e.readLegacyFeatureWorldSpace()))}return i.length>=e.sampleSize?i:null}_requestUpdate(){this._updateRequested||(this._updateRequested=!0,s(()=>this._scheduleNextUpdate()))}_requestRefresh(){this._didSourceRefresh=!0,this._requestUpdate()}_scheduleNextUpdate(){this._updateRequested&&(this._ongoingUpdate||(this._ongoingUpdate=d(this._doUpdate()).finally(()=>{this._ongoingUpdate=null,this._scheduleNextUpdate()}),this._updateRequested=!1))}_subscribe(e){const t=e.tileId;if(this._subscriptions.has(t))return;has("esri-2d-update-debug")&&console.debug(`Tile[${t}] Pipeline.subscribe`);const s=new f(this._tileInfoView,t),i=new _(s,e.version);this._subscriptions.set(t,i),this._source.onSubscribe(i),this._processor.onSubscribe(i)}_unsubscribe(e){const t=this._subscriptions.get(e);t&&(has("esri-2d-update-debug")&&console.debug(`Tile[${e}] Pipeline.unsubscribe`),t.abort(),this._source.onUnsubscribe(t),this._processor.onUnsubscribe(t),this._subscriptions.delete(t.key.id))}async _doUpdate(){if(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateStart"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}),this._updateSubscriptionRequests.length){const e=this._updateSubscriptionRequests;this._updateSubscriptionRequests=[];for(const t of e)this._doUpdateSubscriptions(t.inner),t.resolver.resolve()}if(this._updateHighlightRequests.length){const e=this._updateHighlightRequests,t=new Set,s=new Set;for(const i of e)for(const{objectId:e,highlightFlags:r}of i.inner.highlights)r?(t.add(e),s.delete(e)):(s.add(e),t.delete(e));this._source.prepareCacheUpdate(t,s)}const e=this._updateSchemaRequest;this._updateSchemaRequest=null;let t=!1;if(null!=e){const{schema:s,version:i}=e.inner;t=await this._doUpdateSchema(s,i)}this._processor.requiresInvalidation()&&(t=!0),this._didSourceRefresh&&(t=!0,this._didSourceRefresh=!1),t&&(this._processor.invalidate(),await this._connection.container.updateRenderState(this._processor.version));const s=this._updateOverridesRequest;if(this._updateOverridesRequest=null,null!=s){has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverride",s.inner),null!=s.inner.historicMoment&&this._source.unsafeSetQueryHistoricMoment(s.inner.historicMoment);const e=await this._source.normalizeOverrides(s.inner);await this._source.applyOverride(e),has("esri-2d-update-debug")&&console.debug("Pipeline.endOverride",s.inner)}if(await this._source.applyCacheUpdate(),this._updateHighlightRequests.length){const e=this._updateHighlightRequests;this._updateHighlightRequests=[];for(const t of e)this._processor.updateHighlight(t.inner),t.resolver.resolve()}const i=this._source.cleanup();this._processor.removeChunks(i);try{const e=this._source.takeOverrideUpdate();if(null!=e&&this._subscriptions.size){has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesStart"),await this._connection.container.lockForOverrides();try{await this._processor.applyOverrideUpdate(e)}catch(o){has("esri-2d-update-debug")&&console.debug("InternalError",o)}await this._connection.container.unlockForOverrides(),has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesEnd")}this._subscriptions.size&&(has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksStart"),await this._processor.updateChunks(),has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksEnd"))}catch(o){r(o)}null!=s&&s.resolver.resolve(),null!=e&&e.resolver.resolve(),null==e&&t&&await this._connection.container.trySwapRenderState(),this._connection.onEvent({type:"performance",usedMemory:this.getUsedMemory()}),this._updateRequested?(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=true]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0})):(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=false, After flush]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:this._updateRequested}))}async _doUpdateSchema(e,t){has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateStart`,{schema:e});const s={tileInfo:this._tileInfoView?.tileInfo},i=await this._source.update(e.source,t),r=Array.from(this._subscriptions.values()),o=this._processor.update(e,t,s,i,r);return has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateEnd`),o}_doUpdateSubscriptions(e){has("esri-2d-update-debug")&&console.debug("Pipeline.updateSubscriptions",e);for(const t of e.subscribe)this._subscribe(t);for(const t of e.unsubscribe)this._unsubscribe(t)}}export{y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as t}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Logger.js";import{assertIsSome as s}from"../../../../../core/maybe.js";import{load as r,execute as i,isLoaded as a}from"../../../../../geometry/operators/gx/operatorGeodeticDensify.js";import{geodeticCurveType as o}from"../../../../../geometry/operators/support/geodeticCurveType.js";import{intersectsWithMargin as n,fromValues as l,intersects as c,empty as d,expandPointInPlace as u}from"../../../../../geometry/support/aaBoundingRect.js";import{getClosestDenormalizedXToReference as h}from"../../../../../geometry/support/normalizeUtils.js";import{normalizeCentralMeridianForDisplay as p}from"../../../../../geometry/support/normalizeUtilsSync.js";import{quantizeOptimizedGeometry as m,convertToGeometry as f,convertFromPolyline as _}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as b}from"../../../../../layers/graphics/OptimizedFeature.js";import g from"../../../../../layers/graphics/OptimizedGeometry.js";import{internalTrackPartField as y,externalTrackLineOidPrefix as I,internalTimeReceivedField as v}from"../../../../../layers/support/streamLayerUtils.js";import{tileSize as k}from"../../../engine/webgl/definitions.js";import{AccumulatedStatistics as F}from"../aggregation/AccumulatedStatistics.js";import{ComputedAggregateField as O}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as j}from"./AAggregateStrategy.js";import{ASendState as x}from"./AProcessorStrategy.js";import{FeatureTileAppendMessage as S}from"../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as T}from"../support/arcadeUtils.js";import{ComputedAttributeStorage as R}from"../support/ComputedAttributeStorage.js";import D from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as w}from"../support/FeatureMetadata.js";import{FeatureSetReaderIndirect as L}from"../support/FeatureSetReaderIndirect.js";import{FeatureSetReaderJSON as A}from"../support/FeatureSetReaderJSON.js";let C;const G=()=>e.getLogger("esri.views.2d.layers.features.processor.TrackStrategy"),P=32;class W{constructor(t,e,s,r,i){this.chunkIndex=t,this.featureIndex=e,this.objectId=s,this.displayId=r,this.time=i}}class z{static getOid(t){return I+t}constructor(t,e,s,r,i,a,o,n){this._schema=t,this.trackId=e,this.objectId=s,this.displayId=r,this._fields=i,this._spatialReference=a,this._metadata=o,this._isStream=n,this._maxDisplayDuration=this._schema.maxDisplayDuration>0?this._schema.maxDisplayDuration:1/0,this._maxDisplayObservationsPerTrack=this._schema.maxDisplayObservationsPerTrack>=1?this._schema.maxDisplayObservationsPerTrack:1/0,this._observationRecords=[],this._nextObservationRecords=[],this._trackLinePath=[],this._bounds=[],this._trackLineGeometry=new g}get _trackLineAttributes(){const t={...this._latestObservationFeature?.attributes,aggregateId:this.objectId,[y]:0};if(null!=this._statistics)for(const e of this._statistics.values())t[e.field.name]=e.value;return t}get _startTimeField(){return this._metadata.timeInfo?.startTimeField}get length(){return this._observationRecords.length}*observations(){yield*this._observationRecords}*previousObservations(){for(let t=0;t<this._observationRecords.length-1;t++)yield this._observationRecords[t]}get latestObservationFeature(){return this._latestObservationFeature}get latestObservationRecord(){return this._latestObservationRecord}stageObservation(t,e){this._nextObservationRecords.push(new W(t,e.getIndex(),e.getObjectId(),e.getDisplayId(),null!=this._startTimeField?e.readAttributeAsTimestamp(this._startTimeField):null))}commitObservations(t,e,r){const i=new Set(this._nextObservationRecords.map(t=>t.objectId)),a=this._observationRecords.filter(t=>!i.has(t.objectId)).map(t=>t.objectId);let o,n;switch(this._observationRecords=[],this._trackLinePath=[],this._isStream||null==this._startTimeField||this._nextObservationRecords.sort((t,e)=>{const s=t.time,r=e.time;return null!=s&&null!=r?s-r:0}),this._schema.timeField){case"startTimeField":o=this._metadata.timeInfo?.startTimeField;break;case"endTimeField":o=this._metadata.timeInfo?.endTimeField;break;case"timeReceived":o=this._isStream?v:null}n=this._isStream?r?.end??Date.now():r?.end??-1/0;const l=e.map(t=>t.reader.getCursor());let c;for(let d=this._nextObservationRecords.length-1;d>=0&&!(this._observationRecords.length>=this._maxDisplayObservationsPerTrack);d--){const t=this._nextObservationRecords[d],e=l[t.chunkIndex];s(e),e.setIndex(t.featureIndex);const r=null!=o?e.readAttributeAsTimestamp(o):null;(null!=r?n-r:0)>=this._maxDisplayDuration||(this._commitObservation(t,e),c??=t)}if(null!=c){const{chunkIndex:e,featureIndex:r}=c,i=`${c.objectId}.latest`,o=t.createDisplayIdForObjectId(i),n=l[e];s(n),n.setIndex(r);const d=new b(n.readGeometryWorldSpace(),{...n.readAttributes(),[y]:1},null,i,o);this._latestObservationFeature&&a.push(this._latestObservationFeature.objectId),this._latestObservationFeature=d,this._latestObservationRecord=c}else this._latestObservationFeature=null;return this._trackLineGeometry=q(this._trackLinePath,this._spatialReference),this._bounds=N(this._trackLineGeometry),this._nextObservationRecords=[],a}updateStatistics(t,e){this._statistics=F.create(this._fields);const r=t.map(t=>t.reader.getCursor());for(const{chunkIndex:i,featureIndex:a}of this._observationRecords){const t=r[i];s(t),t.setIndex(a),this._statistics.insert(t,e)}}overlapsTile(t){for(const e of this._bounds)if(n(e,t.bounds,P))return!0;return!1}getLatestObservationFeatureForTile(t){if(null==this._latestObservationFeature)return null;const{objectId:e,displayId:s,geometry:r,attributes:i}=this._latestObservationFeature,a=m(r,this._metadata.geometryType,t.subscription.tile.transform)??new g,o=l(1/0,1/0,-1/0,-1/0);E(a,(t,e)=>u(o,[t,e]));if(!c(o,l(0,0,k,k)))return null;return new b(a,i,null,e,s)}getTrackLineFeatureForTile(t){const e=m(this._trackLineGeometry,"esriGeometryPolyline",t.subscription.tile.transform)??new g;return new b(e,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineOptimizedFeature(){return new b(this._trackLineGeometry,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineDisplayFeature(){const{_trackLineGeometry:t,_trackLineAttributes:e,displayId:s}=this;return{geometry:f(t,"esriGeometryPolyline",!1,!1),attributes:e,displayId:s}}_commitObservation(t,e){const s=e.readCentroidWorldSpace();let r=s?.coords[0],i=s?.coords[1];null==s&&(r=e.readXWorldSpace(),i=e.readYWorldSpace()),null!=r&&null!=i&&(this._observationRecords.unshift(t),this._trackLinePath.unshift([r,i]))}}class M extends x{constructor(t){super(t),this.done=!1}}class U extends j{static async create(t,e,s,i,o,n){const l=new R({spatialReference:e}),c=await Promise.all(t.fields.map(async t=>O.create(l,t))),d=t.featureFilter?await D.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:e,filterJSON:t.featureFilter}):null;return e.isWrappable||a()||await Promise.all([import("../../../../../geometry/operators/support/apiConverter.js"),import("../../../../../geometry/operators/support/jsonConverter.js"),r()]).then(([t,e,s])=>{C={fromGeometryToGXGeometry:e.fromGeometryToGXGeometry,toGeometry:e.toGeometry,fromSpatialReference:t.fromSpatialReference}}),new U(t,s,i,e,c,d,o,n)}constructor(t,e,s,r,i,a,o,n){super(e,s,r,i,n),this._schema=t,this._featureFilter=a,this._arcadeContextInfo=o,this._tracks=new Map,this._handledChunks=new Set,this._metadata=e.metadata.weakCloneWithAdditionalFields([{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"}]),this._trackLineMetadata=w.createFeature({geometryType:"esriGeometryPolyline",featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:{fields:[...this._source.metadata.fieldsIndex.fields,...this.aggregateFields,{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"},{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}],timeZoneByFieldName:null},globalIdField:null,spatialReference:e.metadata.spatialReference,outSpatialReference:e.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:e.metadata.timeInfo,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}destroy(){super.destroy();for(const t of this._tracks.values())this._removeTrack(t);this._tracks.clear()}get _isStream(){return this._source.isStream}get enablePixelBuffering(){return!0}get isAggregate(){return!1}requiresInvalidation(){const t=new Set(this._source.chunks().map(t=>t.chunkId));for(const e of t)if(!this._handledChunks.has(e))return!0;for(const e of this._handledChunks)if(!t.has(e))return!0;return!1}invalidate(){this._handledChunks.clear(),super.invalidate()}createState(t){return new M(t)}async*applyOverrideUpdate(t){G().error("Applying override to tracks is not supported")}displayMap(t,e,s){const r=new Map(t.map(t=>[e(t),t])),i=[];for(const a of this._tracks.values()){const t=r.get(a.objectId);if(null!=t){const e=s(a.displayId,t,a.objectId);i.push(e),r.delete(a.objectId);continue}const e=a.latestObservationFeature;if(e?.objectId){const t=r.get(e.objectId);if(null!=t){const a=s(e.displayId,t,e.objectId);i.push(a),r.delete(e.objectId);continue}}for(const o of a.observations()){const t=r.get(o.objectId);if(null!=t){const e=s(o.displayId,t,o.objectId);i.push(e),r.delete(o.objectId)}}}return i}getDisplayFeatures(t){const e=new Set(t),s=[],r=[],i=this._source.chunks().map(t=>t.reader.getCursor());for(const a of this._tracks.values()){if(e.has(a.displayId)&&r.push(a.getTrackLineDisplayFeature()),null!=a.latestObservationFeature&&e.has(a.latestObservationFeature.displayId)){const{displayId:t,chunkIndex:e,featureIndex:r}=a.latestObservationRecord,o=i[e];o.setIndex(r),s.push({displayId:t,...o.readLegacyFeatureWorldSpace()})}for(const{displayId:t,chunkIndex:r,featureIndex:o}of a.observations())if(e.has(t)){const e=i[r];e.setIndex(o),s.push({displayId:t,...e.readLegacyFeatureWorldSpace()})}}return{features:s,aggregates:[],tracks:r}}getFeatureObjectIdsForAggregate(t){for(const e of this._tracks.values())if(e.objectId===t)return Array.from(e.observations(),t=>t.objectId);return[]}async*updateChunks(){0===this._handledChunks.size&&this._rebuildTracks();for(const t of this._sendStates.values())yield*this._update(t)}forEachAggregateWorldSpace(t){for(const e of this._tracks.values())t(e.getTrackLineOptimizedFeature())}_rebuildTracks(){const t=this._source.chunks();if(!t.length)return;const e=this._metadata.timeInfo?.trackIdField;if(null==e)return;const s=new Set;for(let r=0;r<t.length;r++){const i=t[r];this._handledChunks.add(i.chunkId);const a=i.reader.getCursor();for(;a.next();){const t=a.readAttribute(e),i=a.getObjectId();if(null!=t&&null!=i&&(null===this._featureFilter||this._featureFilter.check(a,this._sqlOptions))){if(a.getDisplayId()||a.setDisplayId(this._attributeStore.createDisplayIdForObjectId(i)),!this._tracks.has(t)){const e=z.getOid(t),s=this._attributeStore.createDisplayIdForObjectId(e),r=new z(this._schema,t,e,s,this.aggregateFields,this.spatialReference,this._source.metadata,this._isStream);this._tracks.set(t,r)}this._tracks.get(t).stageObservation(r,a),s.add(t)}}}for(const r of this._tracks.values())if(s.has(r.trackId)){const e=r.commitObservations(this._attributeStore,t,this._featureFilter?.timeExtent);for(const t of e)this._attributeStore.releaseDisplayIdForObjectId(t);r.updateStatistics(t,T(1,this._arcadeContextInfo))}else this._removeTrack(r)}_removeTrack(t){this._tracks.delete(t.trackId),this._attributeStore.releaseDisplayIdForObjectId(t.objectId);for(const{objectId:e}of t.observations())this._attributeStore.releaseDisplayIdForObjectId(e);null!=t.latestObservationFeature&&this._attributeStore.releaseDisplayIdForObjectId(t.latestObservationFeature.objectId)}*_update(e){if(e.done)return;e.done=!this._source.updateTracking.updating;const s=[],r=[];for(const t of this._tracks.values())if(t.length>0){if(this._schema.showLatestObservation){const r=t.getLatestObservationFeatureForTile(e);null!=r&&s.push(r)}this._schema.showTrackLine&&t.overlapsTile(e.subscription.tile)&&r.push(t.getTrackLineFeatureForTile(e))}const i=A.fromOptimizedFeatures(s,this._metadata,e.subscription.tile.transform),a=A.fromOptimizedFeatures(r,this._trackLineMetadata,e.subscription.tile.transform);let o=[];if(this._schema.showPreviousObservations){const s=this._source.chunks().map(()=>[]);for(const t of this._tracks.values())for(const{chunkIndex:e,featureIndex:r}of t.previousObservations())s[e].push(r);o=this._source.chunks().map((t,r)=>{const i=t.getTileReader(e.subscription.tile);if(null==i)return null;const a=L.from(i,s[r]);return a.setProcessorAttributes({[y]:2}),"esriGeometryPoint"!==a.geometryType&&null!=a.getInTransform()||a.setTransformForDisplay(e.subscription.tile.transform),a}).filter(t)}this.events.emit("changed");const n=e.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo),l=a.getCursor();for(;l.next();)this._attributeStore.setAttributeData(l.getDisplayId(),l,n,this._sqlOptions);for(const t of o){const e=t.getCursor();for(;e.next();)this._attributeStore.setAttributeData(e.getDisplayId(),e,n,this._sqlOptions)}const c=i.getCursor();for(;c.next();)this._attributeStore.setAttributeData(c.getDisplayId(),c,n,this._sqlOptions);yield new S(e.subscription,a,!1,!1,{});for(const t of o)yield new S(e.subscription,t,!1,!1,{});yield new S(e.subscription,i,!1,e.done,{})}}function q(t,e){if(t.length<2)return _({paths:[t]},!1,!1);if(e.isWrappable){let s=!1;for(let r=1;r<t.length;r++){const i=t[r][0],a=h(i,t[r-1][0],e);i!==a&&(t[r][0]=a,s=!0)}if(s){const s=p({paths:[t],spatialReference:e});if(null!=s)return _({paths:s.paths},!1,!1)}return _({paths:[t]},!1,!1)}const s=C.fromGeometryToGXGeometry({hasM:!1,hasZ:!1,paths:[t]}),r=C.fromSpatialReference(e);if(null!=r){const t=i(s,1e6,r,o.geodesic);if(null!=t){const e=C.toGeometry(t,r);if(null!=e&&"paths"in e)return _({paths:e.paths},!1,!1)}}return _({paths:[t]},!1,!1)}function E(t,e){const s=2,{coords:r,lengths:i}=t;if(!i.length)return void e(r[0],r[1]);let a=0;for(let o=0;o<i.length;o++){const t=i[o];let n=0,l=0;for(let i=0;i<t;i++)n+=r[s*(i+a)],l+=r[s*(i+a)+1],e(n,l);a+=t}}function N(t){const{lengths:e,coords:s}=t,r=2;if(!e.length)return[d()];const i=[];let a=0;for(let o=0;o<e.length;o++){const t=e[o],n=d();i.push(n);for(let e=0;e<t;e++){const t=s[r*(e+a)],i=s[r*(e+a)+1];u(n,[t,i])}a+=t}return i}export{U as TrackStrategy};
|
|
5
|
+
import{isSome as t}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Logger.js";import{assertIsSome as s}from"../../../../../core/maybe.js";import{isLoaded as r,load as i,execute as a}from"../../../../../geometry/operators/gx/operatorGeodeticDensify.js";import{geodeticCurveType as o}from"../../../../../geometry/operators/support/geodeticCurveType.js";import{intersectsWithMargin as n,fromValues as l,intersects as c,empty as d,expandPointInPlace as u}from"../../../../../geometry/support/aaBoundingRect.js";import{getClosestDenormalizedXToReference as h}from"../../../../../geometry/support/normalizeUtils.js";import{normalizeCentralMeridianForDisplay as p}from"../../../../../geometry/support/normalizeUtilsSync.js";import{quantizeOptimizedGeometry as m,convertToGeometry as f,convertFromPolyline as _}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as b}from"../../../../../layers/graphics/OptimizedFeature.js";import g from"../../../../../layers/graphics/OptimizedGeometry.js";import{internalTrackPartField as y,externalTrackLineOidPrefix as I,internalTimeReceivedField as v}from"../../../../../layers/support/streamLayerUtils.js";import{tileSize as k}from"../../../engine/webgl/definitions.js";import{AccumulatedStatistics as F}from"../aggregation/AccumulatedStatistics.js";import{ComputedAggregateField as O}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as j}from"./AAggregateStrategy.js";import{ASendState as x}from"./AProcessorStrategy.js";import{FeatureTileAppendMessage as S}from"../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as T}from"../support/arcadeUtils.js";import{ComputedAttributeStorage as R}from"../support/ComputedAttributeStorage.js";import D from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as w}from"../support/FeatureMetadata.js";import{FeatureSetReaderIndirect as L}from"../support/FeatureSetReaderIndirect.js";import{FeatureSetReaderJSON as A}from"../support/FeatureSetReaderJSON.js";let C;const G=()=>e.getLogger("esri.views.2d.layers.features.processor.TrackStrategy"),P=32;class W{constructor(t,e,s,r,i){this.chunkIndex=t,this.featureIndex=e,this.objectId=s,this.displayId=r,this.time=i}}class z{static getOid(t){return I+t}constructor(t,e,s,r,i,a,o,n){this._schema=t,this.trackId=e,this.objectId=s,this.displayId=r,this._fields=i,this._spatialReference=a,this._metadata=o,this._isStream=n,this._maxDisplayDuration=this._schema.maxDisplayDuration>0?this._schema.maxDisplayDuration:1/0,this._maxDisplayObservationsPerTrack=this._schema.maxDisplayObservationsPerTrack>=1?this._schema.maxDisplayObservationsPerTrack:1/0,this._observationRecords=[],this._nextObservationRecords=[],this._trackLinePath=[],this._bounds=[],this._trackLineGeometry=new g}get _trackLineAttributes(){const t={...this._latestObservationFeature?.attributes,aggregateId:this.objectId,[y]:0};if(null!=this._statistics)for(const e of this._statistics.values())t[e.field.name]=e.value;return t}get _startTimeField(){return this._metadata.timeInfo?.startTimeField}get length(){return this._observationRecords.length}*observations(){yield*this._observationRecords}*previousObservations(){for(let t=0;t<this._observationRecords.length-1;t++)yield this._observationRecords[t]}get latestObservationFeature(){return this._latestObservationFeature}get latestObservationRecord(){return this._latestObservationRecord}stageObservation(t,e){this._nextObservationRecords.push(new W(t,e.getIndex(),e.getObjectId(),e.getDisplayId(),null!=this._startTimeField?e.readAttributeAsTimestamp(this._startTimeField):null))}commitObservations(t,e,r){const i=new Set(this._nextObservationRecords.map(t=>t.objectId)),a=this._observationRecords.filter(t=>!i.has(t.objectId)).map(t=>t.objectId);let o,n;switch(this._observationRecords=[],this._trackLinePath=[],this._isStream||null==this._startTimeField||this._nextObservationRecords.sort((t,e)=>{const s=t.time,r=e.time;return null!=s&&null!=r?s-r:0}),this._schema.timeField){case"startTimeField":o=this._metadata.timeInfo?.startTimeField;break;case"endTimeField":o=this._metadata.timeInfo?.endTimeField;break;case"timeReceived":o=this._isStream?v:null}n=this._isStream?r?.end??Date.now():r?.end??-1/0;const l=e.map(t=>t.reader.getCursor());let c;for(let d=this._nextObservationRecords.length-1;d>=0&&!(this._observationRecords.length>=this._maxDisplayObservationsPerTrack);d--){const t=this._nextObservationRecords[d],e=l[t.chunkIndex];s(e),e.setIndex(t.featureIndex);const r=null!=o?e.readAttributeAsTimestamp(o):null;(null!=r?n-r:0)>=this._maxDisplayDuration||(this._commitObservation(t,e),c??=t)}if(null!=c){const{chunkIndex:e,featureIndex:r}=c,i=`${c.objectId}.latest`,o=t.createDisplayIdForObjectId(i),n=l[e];s(n),n.setIndex(r);const d=new b(n.readGeometryWorldSpace(),{...n.readAttributes(),[y]:1},null,i,o);this._latestObservationFeature&&a.push(this._latestObservationFeature.objectId),this._latestObservationFeature=d,this._latestObservationRecord=c}else this._latestObservationFeature=null;return this._trackLineGeometry=q(this._trackLinePath,this._spatialReference),this._bounds=N(this._trackLineGeometry),this._nextObservationRecords=[],a}updateStatistics(t,e){this._statistics=F.create(this._fields);const r=t.map(t=>t.reader.getCursor());for(const{chunkIndex:i,featureIndex:a}of this._observationRecords){const t=r[i];s(t),t.setIndex(a),this._statistics.insert(t,e)}}overlapsTile(t){for(const e of this._bounds)if(n(e,t.bounds,P))return!0;return!1}getLatestObservationFeatureForTile(t){if(null==this._latestObservationFeature)return null;const{objectId:e,displayId:s,geometry:r,attributes:i}=this._latestObservationFeature,a=m(r,this._metadata.geometryType,t.subscription.tile.transform)??new g,o=l(1/0,1/0,-1/0,-1/0);E(a,(t,e)=>u(o,[t,e]));if(!c(o,l(0,0,k,k)))return null;return new b(a,i,null,e,s)}getTrackLineFeatureForTile(t){const e=m(this._trackLineGeometry,"esriGeometryPolyline",t.subscription.tile.transform)??new g;return new b(e,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineOptimizedFeature(){return new b(this._trackLineGeometry,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineDisplayFeature(){const{_trackLineGeometry:t,_trackLineAttributes:e,displayId:s}=this;return{geometry:f(t,"esriGeometryPolyline",!1,!1),attributes:e,displayId:s}}_commitObservation(t,e){const s=e.readCentroidWorldSpace();let r=s?.coords[0],i=s?.coords[1];null==s&&(r=e.readXWorldSpace(),i=e.readYWorldSpace()),null!=r&&null!=i&&(this._observationRecords.unshift(t),this._trackLinePath.unshift([r,i]))}}class M extends x{constructor(t){super(t),this.done=!1}}class U extends j{static async create(t,e,s,a,o,n){const l=new R({spatialReference:e}),c=await Promise.all(t.fields.map(async t=>O.create(l,t))),d=t.featureFilter?await D.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:e,filterJSON:t.featureFilter}):null;return e.isWrappable||r()||await Promise.all([import("../../../../../geometry/operators/support/apiConverter.js"),import("../../../../../geometry/operators/support/jsonConverter.js"),i()]).then(([t,e,s])=>{C={fromGeometryToGXGeometry:e.fromGeometryToGXGeometry,toGeometry:e.toGeometry,fromSpatialReference:t.fromSpatialReference}}),new U(t,s,a,e,c,d,o,n)}constructor(t,e,s,r,i,a,o,n){super(e,s,r,i,n),this._schema=t,this._featureFilter=a,this._arcadeContextInfo=o,this._tracks=new Map,this._handledChunks=new Set,this._metadata=e.metadata.weakCloneWithAdditionalFields([{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"}]),this._trackLineMetadata=w.createFeature({geometryType:"esriGeometryPolyline",featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:{fields:[...this._source.metadata.fieldsIndex.fields,...this.aggregateFields,{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"},{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}],timeZoneByFieldName:null},globalIdField:null,spatialReference:e.metadata.spatialReference,outSpatialReference:e.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:e.metadata.timeInfo,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}destroy(){super.destroy();for(const t of this._tracks.values())this._removeTrack(t);this._tracks.clear()}get _isStream(){return this._source.isStream}get enablePixelBuffering(){return!0}get isAggregate(){return!1}requiresInvalidation(){const t=new Set(this._source.chunks().map(t=>t.chunkId));for(const e of t)if(!this._handledChunks.has(e))return!0;for(const e of this._handledChunks)if(!t.has(e))return!0;return!1}invalidate(){this._handledChunks.clear(),super.invalidate()}createState(t){return new M(t)}async*applyOverrideUpdate(t){G().error("Applying override to tracks is not supported")}displayMap(t,e,s){const r=new Map(t.map(t=>[e(t),t])),i=[];for(const a of this._tracks.values()){const t=r.get(a.objectId);if(null!=t){const e=s(a.displayId,t,a.objectId);i.push(e),r.delete(a.objectId);continue}const e=a.latestObservationFeature;if(e?.objectId){const t=r.get(e.objectId);if(null!=t){const a=s(e.displayId,t,e.objectId);i.push(a),r.delete(e.objectId);continue}}for(const o of a.observations()){const t=r.get(o.objectId);if(null!=t){const e=s(o.displayId,t,o.objectId);i.push(e),r.delete(o.objectId)}}}return i}getDisplayFeatures(t){const e=new Set(t),s=[],r=[],i=this._source.chunks().map(t=>t.reader.getCursor());for(const a of this._tracks.values()){if(e.has(a.displayId)&&r.push(a.getTrackLineDisplayFeature()),null!=a.latestObservationFeature&&e.has(a.latestObservationFeature.displayId)){const{displayId:t,chunkIndex:e,featureIndex:r}=a.latestObservationRecord,o=i[e];o.setIndex(r),s.push({displayId:t,...o.readLegacyFeatureWorldSpace()})}for(const{displayId:t,chunkIndex:r,featureIndex:o}of a.observations())if(e.has(t)){const e=i[r];e.setIndex(o),s.push({displayId:t,...e.readLegacyFeatureWorldSpace()})}}return{features:s,aggregates:[],tracks:r}}getFeatureObjectIdsForAggregate(t){for(const e of this._tracks.values())if(e.objectId===t)return Array.from(e.observations(),t=>t.objectId);return[]}async*updateChunks(){0===this._handledChunks.size&&this._rebuildTracks();for(const t of this._sendStates.values())yield*this._update(t)}forEachAggregateWorldSpace(t){for(const e of this._tracks.values())t(e.getTrackLineOptimizedFeature())}_rebuildTracks(){const t=this._source.chunks();if(!t.length)return;const e=this._metadata.timeInfo?.trackIdField;if(null==e)return;const s=new Set;for(let r=0;r<t.length;r++){const i=t[r];this._handledChunks.add(i.chunkId);const a=i.reader.getCursor();for(;a.next();){const t=a.readAttribute(e),i=a.getObjectId();if(null!=t&&null!=i&&(null===this._featureFilter||this._featureFilter.check(a,this._sqlOptions))){if(a.getDisplayId()||a.setDisplayId(this._attributeStore.createDisplayIdForObjectId(i)),!this._tracks.has(t)){const e=z.getOid(t),s=this._attributeStore.createDisplayIdForObjectId(e),r=new z(this._schema,t,e,s,this.aggregateFields,this.spatialReference,this._source.metadata,this._isStream);this._tracks.set(t,r)}this._tracks.get(t).stageObservation(r,a),s.add(t)}}}for(const r of this._tracks.values())if(s.has(r.trackId)){const e=r.commitObservations(this._attributeStore,t,this._featureFilter?.timeExtent);for(const t of e)this._attributeStore.releaseDisplayIdForObjectId(t);r.updateStatistics(t,T(1,this._arcadeContextInfo))}else this._removeTrack(r)}_removeTrack(t){this._tracks.delete(t.trackId),this._attributeStore.releaseDisplayIdForObjectId(t.objectId);for(const{objectId:e}of t.observations())this._attributeStore.releaseDisplayIdForObjectId(e);null!=t.latestObservationFeature&&this._attributeStore.releaseDisplayIdForObjectId(t.latestObservationFeature.objectId)}*_update(e){if(e.done)return;e.done=!this._source.updateTracking.updating;const s=[],r=[];for(const t of this._tracks.values())if(t.length>0){if(this._schema.showLatestObservation){const r=t.getLatestObservationFeatureForTile(e);null!=r&&s.push(r)}this._schema.showTrackLine&&t.overlapsTile(e.subscription.tile)&&r.push(t.getTrackLineFeatureForTile(e))}const i=A.fromOptimizedFeatures(s,this._metadata,e.subscription.tile.transform),a=A.fromOptimizedFeatures(r,this._trackLineMetadata,e.subscription.tile.transform);let o=[];if(this._schema.showPreviousObservations){const s=this._source.chunks().map(()=>[]);for(const t of this._tracks.values())for(const{chunkIndex:e,featureIndex:r}of t.previousObservations())s[e].push(r);o=this._source.chunks().map((t,r)=>{const i=t.getTileReader(e.subscription.tile);if(null==i)return null;const a=L.from(i,s[r]);return a.setProcessorAttributes({[y]:2}),"esriGeometryPoint"!==a.geometryType&&null!=a.getInTransform()||a.setTransformForDisplay(e.subscription.tile.transform),a}).filter(t)}this.events.emit("changed");const n=e.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo),l=a.getCursor();for(;l.next();)this._attributeStore.setAttributeData(l.getDisplayId(),l,n,this._sqlOptions);for(const t of o){const e=t.getCursor();for(;e.next();)this._attributeStore.setAttributeData(e.getDisplayId(),e,n,this._sqlOptions)}const c=i.getCursor();for(;c.next();)this._attributeStore.setAttributeData(c.getDisplayId(),c,n,this._sqlOptions);yield new S(e.subscription,a,!1,!1,{});for(const t of o)yield new S(e.subscription,t,!1,!1,{});yield new S(e.subscription,i,!1,e.done,{})}}function q(t,e){if(t.length<2)return _({paths:[t]},!1,!1);if(e.isWrappable){let s=!1;for(let r=1;r<t.length;r++){const i=t[r][0],a=h(i,t[r-1][0],e);i!==a&&(t[r][0]=a,s=!0)}if(s){const s=p({paths:[t],spatialReference:e});if(null!=s)return _({paths:s.paths},!1,!1)}return _({paths:[t]},!1,!1)}const s=C.fromGeometryToGXGeometry({hasM:!1,hasZ:!1,paths:[t]}),r=C.fromSpatialReference(e);if(null!=r){const t=a(s,1e6,r,o.geodesic);if(null!=t){const e=C.toGeometry(t,r);if(null!=e&&"paths"in e)return _({paths:e.paths},!1,!1)}}return _({paths:[t]},!1,!1)}function E(t,e){const s=2,{coords:r,lengths:i}=t;if(!i.length)return void e(r[0],r[1]);let a=0;for(let o=0;o<i.length;o++){const t=i[o];let n=0,l=0;for(let i=0;i<t;i++)n+=r[s*(i+a)],l+=r[s*(i+a)+1],e(n,l);a+=t}}function N(t){const{lengths:e,coords:s}=t,r=2;if(!e.length)return[d()];const i=[];let a=0;for(let o=0;o<e.length;o++){const t=e[o],n=d();i.push(n);for(let e=0;e<t;e++){const t=s[r*(e+a)],i=s[r*(e+a)+1];u(n,[t,i])}a+=t}return i}export{U as TrackStrategy};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{handlesGroup as t}from"../../../../../../core/handleUtils.js";import has from"../../../../../../core/has.js";import{throwIfAborted as e,onAbort as s}from"../../../../../../core/promiseUtils.js";import{AFeatureTileLoadStrategy as o}from"./AFeatureTileLoadStrategy.js";import{DrillDownTileSourceChunk as r}from"./chunks/DrillDownTileSourceChunk.js";import{FeatureSetReaderJSON as i}from"../../support/FeatureSetReaderJSON.js";class l{constructor(e,o){this.subscription=e,this._tileIdToResult=new Map,this._controller=new AbortController,this._handles=t([s(e.signal,()=>this._controller.abort()),s(o,()=>this._controller.abort())])}destroy(){this._controller.abort(),this._handles.remove()}get(t){return this._tileIdToResult.get(t)}set(t,e){this._tileIdToResult.set(t,e)}get options(){return{signal:this._controller.signal}}}class
|
|
5
|
+
import{handlesGroup as t}from"../../../../../../core/handleUtils.js";import has from"../../../../../../core/has.js";import{throwIfAborted as e,onAbort as s}from"../../../../../../core/promiseUtils.js";import{AFeatureTileLoadStrategy as o}from"./AFeatureTileLoadStrategy.js";import{DrillDownTileSourceChunk as r}from"./chunks/DrillDownTileSourceChunk.js";import{FeatureSetReaderJSON as i}from"../../support/FeatureSetReaderJSON.js";const a=has("featurelayer-query-max-depth");class l{constructor(e,o){this.subscription=e,this._tileIdToResult=new Map,this._controller=new AbortController,this._handles=t([s(e.signal,()=>this._controller.abort()),s(o,()=>this._controller.abort())])}destroy(){this._controller.abort(),this._handles.remove()}get(t){return this._tileIdToResult.get(t)}set(t,e){this._tileIdToResult.set(t,e)}get options(){return{signal:this._controller.signal}}}class n extends o{constructor(){super(...arguments),this._loadStates=new Map}destroy(){super.destroy();for(const t of this._loadStates.values())t.destroy();this._loadStates.clear()}get about(){return{willQueryAllFeatures:!1,willQueryFullResolutionGeometry:!1}}async load(t){this._loadStates.has(t.key.id)||this._loadStates.set(t.key.id,new l(t,this._options));const s=this._loadStates.get(t.key.id);let o;try{for await(const o of this._fetchChunkInfos(s,t.tile,0)){const{queryJSON:t,reader:i,sourceTile:a,sourceTileDepth:l,tile:n}=o,h=new r(i,t,n,a,l,!1);e(s.options),this._addChunk(h)}}catch(n){o=n}e(s.options);const a=new r(i.empty(this.metadata),null,t.tile,null,-1,!0);if(this._addChunk(a),o)throw o}unload(t){super.unload(t),this._loadStates.get(t.key.id)?.destroy(),this._loadStates.delete(t.key.id)}async*_fetchChunkInfos(t,e,s){let o=t.get(e.id);const r=!!o;if(o||(o=await this._fetchChunkInfo(t,e,s),t.set(e.id,o)),o.reader.exceededTransferLimit&&s<has("featurelayer-query-max-depth"))for(const i of e.createChildTiles())yield*this._fetchChunkInfos(t,i,s+1);else r||(yield o)}async _fetchChunkInfo(t,e,s){const o=t.subscription.tile.getQuantizationParameters(),r=this._queryInfo.createTileQuery(e,{returnExceededLimitFeatures:s===a,quantizationParameters:o});return{reader:await this._fetch(r,t.options,{chunkId:e.id}),queryJSON:r.inner.toJSON(),tile:t.subscription.tile,sourceTile:e,sourceTileDepth:s}}}export{n as FeatureDrillDownTileLoadStrategy};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import"../../../core/has.js";import{abortMaybe as t,destroyMaybe as s}from"../../../core/maybe.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as a}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as o}from"./AnalysisView3D.js";import{AreaMeasurementController as n}from"./AreaMeasurement/support/AreaMeasurementController.js";import{AreaMeasurement3DPathHelper as l}from"./AreaMeasurement/support/AreaMeasurementPathHelper.js";import{AreaMeasurementVisualization as
|
|
5
|
+
import{__decorate as e}from"tslib";import"../../../core/has.js";import{abortMaybe as t,destroyMaybe as s}from"../../../core/maybe.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as a}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as o}from"./AnalysisView3D.js";import{AreaMeasurementController as n}from"./AreaMeasurement/support/AreaMeasurementController.js";import{AreaMeasurement3DPathHelper as l}from"./AreaMeasurement/support/AreaMeasurementPathHelper.js";import{AreaMeasurementVisualization as p}from"./AreaMeasurement/support/AreaMeasurementVisualization.js";import{toPreferredLengthUnit as u,toPreferredAreaUnit as m}from"./AreaMeasurement/support/utils.js";import y from"../interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js";import{connectAnalysisViewToTool as d,removeAnalysisViewTool as h,startPlaceOperation as c}from"../../analysis/analysisViewUtils.js";import{loadGeodesicAreaMeasurementUtils as g}from"../../support/geodesicAreaMeasurementUtils.js";import{loadGeodesicLengthMeasurementUtils as v}from"../../support/geodesicLengthMeasurementUtils.js";let M=class extends o{constructor(e){super(e),this.type="area-measurement-view-3d",this.analysis=null,this.measurementData=null,this.lastDraggedVertex=null,this.stagedPoint=null,this.mode=0,this.tool=null,this.userOperation=null}initialize(){const{analysis:e,view:t}=this;this.path=new l({view:t,areaMeasurement:e}),this._analysisVisualization=new p({view:t,analysis:e,analysisViewData:this}),this.addResolvingPromise(Promise.all([g(),v()]).then(([s,r])=>{this.destroyed||(this._analysisController=new n({view:t,analysis:e,analysisViewData:this,geodesicAreaMeasurementUtils:s,geodesicLengthMeasurementUtils:r}))})),this.addHandles(d(this,y))}destroy(){h(this),this.userOperation=t(this.userOperation),this._analysisController=s(this._analysisController),this._analysisVisualization=s(this._analysisVisualization),this.path.destroy()}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get updating(){return!!this._analysisVisualization?.loadingMessages}get result(){const{measurementData:e}=this;if(!e)return{area:null,mode:null,perimeter:null};const{unit:t}=this;if("euclidean"===e.actualMeasurementMode){const{area:s,perimeterLength:r}=e;return{area:s?m(s,t):null,perimeter:r?u(r,t):null,mode:"euclidean"}}const{geodesicArea:s,pathLength:r}=e;return{area:s?m(s,t):null,perimeter:r?u(r,t):null,mode:"geodesic"}}get viewData(){return this._analysisVisualization.viewData}get areaLabel(){return this._analysisVisualization.areaLabel}get perimeterLengthLabel(){return this._analysisVisualization.perimeterLengthLabel}get validMeasurement(){return this.path.isValidPolygon}get unit(){return this.analysis.unit??a(this.view)}get testData(){}place(e){return c(this,{placementOptions:e})}};e([r()],M.prototype,"_analysisVisualization",void 0),e([r()],M.prototype,"_analysisController",void 0),e([r({readOnly:!0})],M.prototype,"type",void 0),e([r({constructOnly:!0,nonNullable:!0})],M.prototype,"analysis",void 0),e([r()],M.prototype,"updating",null),e([r()],M.prototype,"result",null),e([r()],M.prototype,"measurementData",void 0),e([r()],M.prototype,"viewData",null),e([r()],M.prototype,"areaLabel",null),e([r()],M.prototype,"perimeterLengthLabel",null),e([r()],M.prototype,"validMeasurement",null),e([r()],M.prototype,"path",void 0),e([r()],M.prototype,"lastDraggedVertex",void 0),e([r()],M.prototype,"stagedPoint",void 0),e([r()],M.prototype,"mode",void 0),e([r()],M.prototype,"unit",null),e([r()],M.prototype,"tool",void 0),e([r()],M.prototype,"userOperation",void 0),M=e([i("esri.views.3d.analysis.AreaMeasurementAnalysisView3D")],M);const w=M;export{w as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{neverReached as s}from"../../../core/compilerUtils.js";import{lerp as i}from"../../../core/mathUtils.js";import{destroyMaybe as r,disposeMaybe as o}from"../../../core/maybe.js";import{watch as a,initial as h}from"../../../core/reactiveUtils.js";import{signal as n}from"../../../core/signal.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{fromMat4 as u}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{targetTo as d}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as p}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{neverReached as s}from"../../../core/compilerUtils.js";import{lerp as i}from"../../../core/mathUtils.js";import{destroyMaybe as r,disposeMaybe as o}from"../../../core/maybe.js";import{watch as a,initial as h}from"../../../core/reactiveUtils.js";import{signal as n}from"../../../core/signal.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{fromMat4 as u}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{targetTo as d}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as p}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{equals as m,copy as f,set as _}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{clone as g,ZEROS as x,zeros as y}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as b}from"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{zeros as T}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as v}from"../../../geometry/ellipsoidUtils.js";import{C as S,c as C}from"../../../chunks/Clouds.glsl.js";import{cloudPresets as w}from"./CloudsPresets.js";import{CloudsTechnique as j}from"./CloudsTechnique.js";import{CloudsTechniqueConfiguration as P}from"./CloudsTechniqueConfiguration.js";import{NoiseTextureAtlas as z}from"./NoiseTextureAtlas.js";import{TaskPriority as I}from"../../support/Scheduler.js";import{Yield as M}from"../../support/Yield.js";import{ColorAttachment0 as H}from"../../webgl/enums.js";import{FramebufferObject as q}from"../../webgl/FramebufferObject.js";import{TextureDescriptor as R}from"../../webgl/TextureDescriptor.js";let U=class extends e{constructor(t){super(t),this._state=n(0),this._passParameters=new S,this._weatherTileCount=128,this._sliceIndex=0,this._tileIndex=0,this._tilesPerSlice=1,this.coverage=i(w.default.coverage[0],w.default.coverage[1],.5),this.density=i(w.default.density[0],w.default.density[1],.5),this.absorption=i(w.default.absorption[0],w.default.absorption[1],.5),this.cloudSize=i(w.default.cloudSize[0],w.default.cloudSize[1],.5),this.detailSize=i(w.default.detailSize[0],w.default.detailSize[1],.5),this.smoothness=i(w.default.smoothness[0],w.default.smoothness[1],.5),this.cloudHeight=i(w.default.cloudHeight[0],w.default.cloudHeight[1],.5),this.raymarchingSteps=w.default.raymarchingSteps,this._viewMatrix=p(),this._dirty=!0,this.readyToRun=!0,this._configuration=new P}initialize(){const t=v(this.view.spatialReference);this._passParameters.cloudRadius=.5*t.radius;const e=()=>this.setDirty();this.addHandles([this.view.resourceController.scheduler.registerTask(I.CLOUDS_GENERATOR,this),a(()=>this.coverage,e,h),a(()=>this.density,e,h),a(()=>this.absorption,e,h),a(()=>this.cloudSize,e,h),a(()=>this.detailSize,e,h),a(()=>this.smoothness,e,h),a(()=>this.cloudHeight,e,h),a(()=>this.raymarchingSteps,e,h)]);const s=g(this._computeWeatherTile());let i=0;this.addHandles(a(()=>{const t=this._computeWeatherTile();return m(s,t)||(++i,f(s,t)),i},e))}destroy(){this.destroyCubeMap(),this._passParameters.noiseTexture=r(this._passParameters.noiseTexture)}_precompile(){this._configuration.steps=this.raymarchingSteps,this._configuration.writeTextureChannels=0,this.context.techniques.precompile(j,this._configuration),this._configuration.writeTextureChannels=1,this.context.techniques.precompile(j,this._configuration)}_acquireTechnique(){switch(this.raymarchingSteps){case 0:this._tilesPerSlice=1;break;case 1:this._tilesPerSlice=4;break;case 3:case 2:this._tilesPerSlice=8;break;default:s(this.raymarchingSteps)}return this._configuration.writeTextureChannels=1-this.parameters.readChannels,this._configuration.steps=this.raymarchingSteps,this.context.techniques.get(j,this._configuration)}_computeWeatherTile(){const{camera:t,environment:e}=this.view,{latitude:s,longitude:i}=t.position;if(null==s||null==i)return x;_(A,(s+90)/180,(i+180)/360);const r=Math.floor(this._weatherTileCount*Math.abs(2*A[0]-1));A[0]=Math.floor(2*this._weatherTileCount*A[0]),A[1]=Math.floor(4*(this._weatherTileCount-r)*A[1]);let o=0,a=0;if("virtual"!==e?.lighting?.type&&null!=e?.lighting?.date){const t=new Date(e.lighting.date);t.setUTCHours(e.lighting.date.getUTCHours()+(e.lighting.displayUTCOffset??0)),o=31*t.getUTCMonth()+t.getUTCDate(),a=t.getUTCFullYear()}return A[0]=(A[0]+o)%(2*this._weatherTileCount),A[1]=(A[1]+a%100)%(4*this._weatherTileCount),A}get state(){return this._state.value}set state(t){this._state.value=t}get usedMemory(){return(this._fbo?.usedMemory??0)+(this._passParameters.noiseTexture?.textureAtlas?.usedMemory??0)}_ensureNoiseTexture(){return this._passParameters.noiseTexture??=new z({context:this.context}),this._passParameters.noiseTexture}_ensureFrameBufferCube(t){const e=this.context.renderContext.rctx;if(null==this._fbo){const s=new R(t,t/2);s.target=35866,s.depth=6,s.wrapMode=33071,this._fbo=new q(e,s),this.parameters.data=this,this.parameters.absorption=this.absorption,this.parameters.coverage=this.coverage}return e.unbindTexture(this._fbo.colorTexture),this._fbo}get cubeMap(){return this._fbo}get parameters(){return this.context.renderContext.bind.clouds}destroyCubeMap(){this._fbo=o(this._fbo),this.parameters.data=null}applyPreset(t,e){const s=t.median,r=t=>{const r=i(t[0],t[1],s);return e<.5?i(t[0],r,2*e):i(r,t[1],2*(e-.5))};this.coverage=r(t.coverage),this.density=r(t.density),this.absorption=r(t.absorption),this.cloudSize=r(t.cloudSize),this.detailSize=r(t.detailSize),this.smoothness=r(t.smoothness),this.cloudHeight=r(t.cloudHeight),this.raymarchingSteps=t.raymarchingSteps,this._precompile()}setDirty(){this._dirty=this.readyToRun=!0}runTask(t){if(3===this.state)return M;this._dirty&&(this._sliceIndex=this._tileIndex=0,this.state=1,this._passParameters.absorption=this.absorption,this._passParameters.density=this.density,this._passParameters.cloudSize=this.cloudSize,this._passParameters.detailSize=this.detailSize,this._passParameters.smoothness=this.smoothness,this._passParameters.cloudHeight=this.cloudHeight,this._passParameters.coverage=this.coverage,this._ensureNoiseTexture().updateWeatherMap(this._computeWeatherTile()),this._dirty=!1);const e=this._acquireTechnique();if(!this._ensureNoiseTexture().textureAtlas||!e.compiled)return M;const s=O[this._sliceIndex],i=k[this._sliceIndex];d(this._viewMatrix,D,s,i),u(this._passParameters.viewMatrix,this._viewMatrix);const r=this.context.renderContext.rctx,o=r.getViewport(),a=C/this._tilesPerSlice,h=this._tileIndex*a;r.setViewport(0,h,C,a);const n=this._ensureFrameBufferCube(C);r.bindFramebuffer(n),this._passParameters.lastSlice=5===this._sliceIndex,r.bindTechnique(e,this.context.renderContext.bind,this._passParameters);const l=35866;return n.setColorTextureTarget(l,H,this._sliceIndex),r.screen.draw(),r.gl.flush(),r.setViewport(o.x,o.y,o.width,o.height),this.requestRender(),++this._tileIndex,5===this._sliceIndex&&this._tileIndex===this._tilesPerSlice?(this._sliceIndex=this._tileIndex=0,this.state=2,this.readyToRun=!1):this._tileIndex===this._tilesPerSlice&&(++this._sliceIndex,this._tileIndex=0),t.madeProgress(),M}};t([l({constructOnly:!0})],U.prototype,"context",void 0),t([l({constructOnly:!0})],U.prototype,"view",void 0),t([l({constructOnly:!0})],U.prototype,"requestRender",void 0),t([l()],U.prototype,"coverage",void 0),t([l()],U.prototype,"density",void 0),t([l()],U.prototype,"absorption",void 0),t([l()],U.prototype,"cloudSize",void 0),t([l()],U.prototype,"detailSize",void 0),t([l()],U.prototype,"smoothness",void 0),t([l()],U.prototype,"cloudHeight",void 0),t([l()],U.prototype,"raymarchingSteps",void 0),t([l()],U.prototype,"readyToRun",void 0),U=t([c("esri.views.3d.environment.CloudsRenderer")],U);const O=[b(1,0,0),b(-1,0,0),b(0,1,0),b(0,-1,0),b(0,0,1),b(0,0,1)],k=[b(0,0,-1),b(0,0,-1),b(0,0,-1),b(0,0,-1),b(0,1,0),b(0,1,0)],D=T(),A=y();export{U as CloudsRenderer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../../../Color.js";import{multiplyOpacityToUnitRGBA as e,
|
|
5
|
+
import t from"../../../../../Color.js";import{multiplyOpacityToUnitRGBA as e,colorEquals as i,getContrast as s}from"../../../../../core/colorUtils.js";import a from"../../../../../core/Handles.js";import"../../../../../core/has.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{watch as o,sync as n}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as l}from"../../../../../core/screenUtils.js";import{create as h}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import _ from"../../../../../geometry/Point.js";import{Manipulator3D as u}from"../../Manipulator3D.js";import{createManipulatorMaterial as p}from"../../manipulatorUtils.js";import{RenderObject as c}from"../../RenderObject.js";import{PickResult as d}from"../support/PickRequest.js";import{LaserlineVisualElement as m}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as w}from"../../../webgl-engine/lib/GeometryUtil.js";import{ManipulatorCollection as v}from"../../../../interactive/ManipulatorCollection.js";import{newToolIntersector as g}from"../../../../interactive/ToolIntersector.js";class y{constructor(t){this.vertexManipulators=[],this._destroyed=!1,this._isManipulatorsOwner=!0,this._visible=!0,this._listenerHandles=null,this._tempHandlePosition=h();const{analysisViewData:e,manipulators:i,toolState:s,view:a,visible:r}=t;this._analysisViewData=e,this._toolState=s,null!=i?(this._manipulators=i,this._isManipulatorsOwner=!1):this._manipulators=new v,this._view=a,this._intersector=g(a.state.viewingMode);const o=p(this._handleColor),n=[new c(w(o,1,32,32))],l=new u({view:a,renderObjects:n});l.available=!1,l.radius=D,l.interactive=!1,this._manipulators.add(l),this._cursorManipulator=l,this._cursorManipulatorMaterial=o,this._laserLine=new m({view:a,attached:!0,style:{glowWidth:V,glowFalloff:M,innerWidth:b},isDecoration:!0}),this._updateVisibility(r??!0)}destroy(){this._listenerHandles=r(this._listenerHandles),this._isManipulatorsOwner?this._manipulators=r(this._manipulators):this._manipulators=null,this._laserLine=r(this._laserLine),this._destroyed=!0}get destroyed(){return this._destroyed}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get testData(){}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}_setVisibility(t){this._destroyed||this._visible===t||this._updateVisibility(t)}_updateVisibility(t){this._visible=t,this._laserLine.visible=t,t?(this._initializeListeners(),this._updateAll()):(this._destroyListeners(),this.vertexManipulators.forEach(({manipulator:t})=>this._removeVertexManipulator(t)),this.vertexManipulators=[])}vertexHandleAt(t,e){const i=this._manipulators.intersect(t,e);return i?.metadata}pick(t){const e=this._view.spatialReference,i=l(t.screenPoint);this._view.sceneIntersectionHelper.intersectToolIntersectorScreen(i,this._intersector);const s=this._intersector.results.min,a=h();if(!s.getIntersectionPoint(a))return null;const r=this._view.renderCoordsHelper.fromRenderCoords(a,new _({spatialReference:e}));return null==r?null:new d(a,r)}_updateAll(){this._visible&&(this._updateVertexManipulators(),this._updateLaserLine())}_createVertexManipulator(){const t=p(this._handleColor),e=[new c(w(t,1,32,32))],i=new u({view:this._view,renderObjects:e});return i.radius=D,this._manipulators.add(i),{manipulator:i,material:t}}_removeVertexManipulator(t){this._manipulators.remove(t)}_updateVertexManipulators(){const{viewData:t}=this._analysisViewData,e=this._analysisViewData.path?this._analysisViewData.path.vertices:[],i=this.vertexManipulators;f(i,e.length,()=>this._createVertexManipulator(),({manipulator:t})=>this._removeVertexManipulator(t)),i.forEach(({manipulator:i},s)=>{i.metadata=e[s],i.renderLocation=t.positionsRender[s],i.cursor=0===s&&"drawing"===this._toolState.polygonState?"crosshair":null}),"drawing"===this._toolState.polygonState&&null!=this._analysisViewData.stagedPoint?(this._cursorManipulator.available=!0,this._cursorManipulator.location=this._analysisViewData.stagedPoint):this._cursorManipulator.available=!1}get _handleColor(){return e(this._view.effectiveTheme.accentColor,.5)}_getFocusPoint(){const{lastDraggedVertex:t}=this._analysisViewData;switch(this._toolState.polygonState){case"drawing":return null!=this._analysisViewData.stagedPoint?this._analysisViewData.stagedPoint:null!=t?this._analysisViewData.path.getVertexPositionAsPoint(t):this._analysisViewData.path.lastPoint;case"editing":return null!=t?this._analysisViewData.path.getVertexPositionAsPoint(t):null;default:return this._analysisViewData.stagedPoint}}_updateLaserLine(){const t="measured"!==this._toolState.polygonState&&this._toolState.active,e=this._getFocusPoint();if(t&&null!=e){const t=this._tempHandlePosition;this._view.renderCoordsHelper.toRenderCoords(e,t),this._laserLine.heightManifoldTarget=t}else this._laserLine.heightManifoldTarget=null}_initializeListeners(){this._listenerHandles=new a,this._listenerHandles.add([o(()=>this._toolState.polygonState,()=>this._updateLaserLine()),o(()=>this._analysisViewData.viewData,()=>this._updateAll(),n),o(()=>({lastDraggedVertex:this._analysisViewData.lastDraggedVertex,cursorPoint:this._analysisViewData.stagedPoint}),()=>this._updateLaserLine()),o(()=>this._toolState.active,()=>this._updateAll()),o(()=>this._view.effectiveTheme.accentColor,i=>{const a=e(i,.5);for(const{material:t}of this.vertexManipulators)t.setParameters({color:a});this._cursorManipulatorMaterial.setParameters({color:a});const r=t.toUnitRGB(i),o=t.toUnitRGB(s(i)),n=.75*i.a,l=this._laserLine,h=l.style;l.style={...h,glowColor:r,innerColor:o,globalAlpha:n}},{initial:!0,equals:i})])}_destroyListeners(){this._listenerHandles=r(this._listenerHandles)}}function f(t,e,i,s){for(;t.length<e;)t.push(i());if(s)for(;t.length>e;){s(t.pop())}else t.length=e}const V=8,M=8,b=1,D=5;export{y as default};
|
package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../../../../Color.js";import i from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as s,getContrast as o,
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../../../Color.js";import i from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as s,getContrast as o,colorVectorEquals as n,colorVectorToColorAndOpacity as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{watch as l,initial as d}from"../../../../../core/reactiveUtils.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as c}from"../../../../../core/accessorSupport/decorators/subclass.js";import{create as p}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPoints as u}from"../../../../../geometry/support/lineSegment.js";import{Manipulator3D as m}from"../../Manipulator3D.js";import{createManipulatorMaterial as g}from"../../manipulatorUtils.js";import{RenderObject as _}from"../../RenderObject.js";import{LaserlineVisualElement as y}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as v}from"../../../webgl-engine/lib/GeometryUtil.js";let b=class extends i{constructor(t){super(t),this.cursorPoint=null,this._visible=!1,this._laserLine=null,this.laserLineEnabled=!0,this._lastDraggedHandle=null}initialize(){this._laserLine=new y({view:this.view,attached:!0,isDecoration:!0}),this._updateVisibility(this._visible),this._connectToAnalysisView(),this.addHandles(l(()=>this._params,({laserLineGlowColor:t,laserLineInnerColor:e,laserLineGlobalAlpha:i})=>{const s=this._laserLine,o=s.style;s.style={...o,innerColor:e,glowColor:t,globalAlpha:i}}))}destroy(){this._laserLine=r(this._laserLine)}get _params(){const{accentColor:t}=this.view.effectiveTheme;return{laserLineGlowColor:e.toUnitRGB(t),laserLineGlowWidth:8,laserLineGlowFalloff:8,laserLineInnerColor:e.toUnitRGB(o(t)),laserLineInnerWidth:.75,laserLineGlobalAlpha:.75*t.a,handleColor:s(t,.5),handleRadius:5}}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get testData(){}get _cursorPosition(){const t=p(),e=this.cursorPoint;return e&&this.view.renderCoordsHelper.toRenderCoords(e,t),t}get _startPosition(){const t=p(),e=this.analysis.startPoint;return e&&this.view.renderCoordsHelper.toRenderCoords(e,t),t}get _endPosition(){const t=p(),e=this.analysis.endPoint;return e&&this.view.renderCoordsHelper.toRenderCoords(e,t),t}get _laserLineParams(){const t=this._focusPosition,{active:e,lineState:i}=this.toolState,s=this.analysisViewData,o=this.laserLineEnabled&&!!t&&"measured"!==i&&e;if(!o||!this.visible||null==s||s.destroyed)return{heightManifoldTarget:null,pointDistanceLine:null,lineVerticalPlaneSegment:null};const n=s.actualVisualizedMeasurement,a="local"!==this.view.viewingMode&&o&&!!this.analysis.startPoint&&"geodesic"===n,r=o&&2===s.viewMode;return{heightManifoldTarget:"euclidean"===n?t:null,pointDistanceLine:a?this._pointDistanceLine:null,lineVerticalPlaneSegment:r?u(this._startPosition,this._endPosition):null}}get _focusPosition(){const{lineState:t}=this.toolState,e=this.analysisViewData,i=null!=e&&!e.destroyed&&1===e.measurementMode&&1===e.viewMode;switch(t){case"drawing":return i?this._startPosition:this.analysis.endPoint?this._endPosition:this._startPosition;case"editing":return i?"start"===this._lastDraggedHandle?this._endPosition:this._startPosition:"start"===this._lastDraggedHandle?this._startPosition:this._endPosition;default:return null!=this.cursorPoint?this._cursorPosition:null}}get _pointDistanceLine(){return{origin:"drawing"===this.toolState.lineState||"end"===this._lastDraggedHandle?this._startPosition:this._endPosition,target:this._focusPosition}}createManipulators(){const t=this._params,{view:e}=this,i=()=>{const i=g(t.handleColor),s=[new _(v(i,1,32,32))],o=new m({view:e,renderObjects:s});return o.available=!1,o.radius=t.handleRadius,[o,i]},[s,o]=i(),[r,d]=i(),h=new m({view:this.view,available:!1,interactive:!1});null!=this.analysis.startPoint&&(s.location=this.analysis.startPoint,s.available=!0),null!=this.analysis.endPoint&&(r.location=this.analysis.endPoint,r.available=!0);const c=()=>{let t=this._lastDraggedHandle;s.grabbing&&!r.grabbing&&(t="start"),r.grabbing&&!s.grabbing&&(t="end"),s.grabbing||r.grabbing||(t=null),this._lastDraggedHandle=t},p=s.events.on("grab-changed",c),u=r.events.on("grab-changed",c);return this.addHandles([p,u,l(()=>a(this._params.handleColor),t=>{o.setParameters({color:t}),d.setParameters({color:t})},{equals:n})],"manipulators"),{start:s,end:r,cursor:h}}show(){this.destroyed||this._visible||this._updateVisibility(!0)}hide(){!this.destroyed&&this._visible&&this._updateVisibility(!1)}_connectToAnalysisView(){this.removeHandles("analysis-view"),this.addHandles([l(()=>this.analysisViewData?.destroyed,t=>{t&&this.removeHandles("analysis-view")},d),l(()=>["measured"===this.toolState.lineState,this.analysisViewData],([t,e])=>{null==e||e.destroyed||(e.allowVisualElementsOrientationChange=!t)},d),l(()=>this._laserLineParams,t=>{const e=this._laserLine;e.heightManifoldTarget=t.heightManifoldTarget,e.pointDistanceLine=t.pointDistanceLine,e.lineVerticalPlaneSegment=t.lineVerticalPlaneSegment},d)],"analysis-view")}_updateVisibility(t){this.initialized&&(this._visible=t,t&&(this._laserLine.style={innerColor:this._params.laserLineInnerColor,innerWidth:this._params.laserLineInnerWidth,glowColor:this._params.laserLineGlowColor,glowWidth:this._params.laserLineGlowWidth,glowFalloff:this._params.laserLineGlowFalloff,globalAlpha:this._params.laserLineGlobalAlpha}),this._laserLine.visible=t)}};t([h({constructOnly:!0})],b.prototype,"view",void 0),t([h()],b.prototype,"_params",null),t([h({constructOnly:!0})],b.prototype,"analysis",void 0),t([h({constructOnly:!0})],b.prototype,"analysisViewData",void 0),t([h()],b.prototype,"cursorPoint",void 0),t([h()],b.prototype,"toolState",void 0),t([h()],b.prototype,"visible",null),t([h()],b.prototype,"testData",null),t([h()],b.prototype,"_visible",void 0),t([h()],b.prototype,"_laserLine",void 0),t([h({constructOnly:!0})],b.prototype,"laserLineEnabled",void 0),t([h()],b.prototype,"_cursorPosition",null),t([h()],b.prototype,"_startPosition",null),t([h()],b.prototype,"_endPosition",null),t([h()],b.prototype,"_lastDraggedHandle",void 0),t([h()],b.prototype,"_laserLineParams",null),t([h()],b.prototype,"_focusPosition",null),t([h()],b.prototype,"_pointDistanceLine",null),b=t([c("esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DView")],b);export{b as DirectLineMeasurement3DView};
|