@arcgis/core 5.0.0-next.11 → 5.0.0-next.13
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
|
@@ -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 as e}from"./UnitFactory.js";import{
|
|
5
|
+
import{E as e}from"./UnitFactory.js";import{getSpatialReference as t,fromGeometry as r,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=t(e);return s.accelerateGeometry(r(e),o(a),1)}function n(e,t){return s.execute(r(e),r(t),o(e.spatialReference),null)}const c=s.supportsCurves(),u=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,u as c,n as e,c as s};
|
|
@@ -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 e}from"../core/arrayUtils.js";import{deg2rad as t}from"../core/mathUtils.js";import{convertToSpatialReferenceUnit as r}from"../core/unitUtils.js";import{
|
|
5
|
+
import{isSome as e}from"../core/arrayUtils.js";import{deg2rad as t}from"../core/mathUtils.js";import{convertToSpatialReferenceUnit as r}from"../core/unitUtils.js";import{supportsCurves as o,execute as s,executeMany as a}from"../geometry/operators/gx/operatorDensify.js";import{getSpatialReference as n,toGeometry as i,fromGeometry as m}from"../geometry/operators/support/apiConverter.js";function p(e,o,a={}){let{maxAngleInDegrees:p=0,maxDeviation:u=0,unit:c}=a;const l=n(e);return c&&(o=r(o,c,l),u&&(u=r(u,c,l))),i(s(m(e),o,u,t(p)),l)}function u(o,s,p={}){let{maxAngleInDegrees:u=0,maxDeviation:c=0,unit:l}=p;const f=o.map(m),x=n(o);return l&&(s=r(s,l,x),c&&(c=r(c,l,x))),a(f,s,c,t(u)).map(e=>i(e,x)).filter(e)}const c=o(),l=Object.freeze(Object.defineProperty({__proto__:null,execute:p,executeMany:u,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{u as a,l as d,p as e,c as s};
|
|
@@ -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{supportsCurves as e,execute as r,executeMany as t}from"../geometry/operators/gx/operatorDifference.js";import{getSpatialReference as o,toGeometry as s,fromSpatialReference as a,fromGeometry as p}from"../geometry/operators/support/apiConverter.js";function n(e,t){const n=o(e);return s(r(p(e),p(t),a(n)),n)}function u(e,r){const n=e.map(p),u=o(e);return t(n,p(r),a(u)).map(e=>s(e,u))}const c=e(),m=Object.freeze(Object.defineProperty({__proto__:null,execute:n,executeMany:u,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{u as a,m as d,n as e,c as s};
|
|
@@ -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{O as e}from"./OperatorIntersects.js";import{
|
|
5
|
+
import{O as e}from"./OperatorIntersects.js";import{getSpatialReference as r,fromGeometry as t,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=r(e);return s.accelerateGeometry(t(e),o(a),1)}function n(e,r){return s.execute(t(e),t(r),o(e.spatialReference),null)}const c=s.supportsCurves(),p=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,n as e,p as i,c as s};
|
|
@@ -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{id as e}from"../kernel.js";import{
|
|
5
|
+
import{id as e}from"../kernel.js";import{makeAbsolute as t,makeRelative as r,isAbsolute as s,normalize as o,isDataProtocol as l,hasSameOrigin as n,getAppUrl as a,changeDomain as c,splitPathExtension as i}from"../core/urlUtils.js";import{normalizeArcGISOnlineOrgDomain as u}from"../portal/support/urlUtils.js";function p(e,s){const o=s?.url?.path;if(e&&o&&(e=t(e,o,{preserveProtocolRelative:!0}),s.portalItem&&s.readResourcePaths)){const t=r(e,s.portalItem.itemUrl);null!=t&&t.startsWith(U)&&s.readResourcePaths.push(s.portalItem.resourceFromPath(t).path)}return(e=I(e,s?.portal))&&d.test(e)?R(e):e}function m(e,n,a=0){if(null==(e=e&&d.test(e)?w(e):e))return e;!s(e)&&n?.blockedRelativeUrls&&n.blockedRelativeUrls.push(e);let c=t(e);if(n){const t=n.verifyItemRelativeUrls?.rootPath||n.url?.path;if(t){const s=I(t,n.portal),o=I(c,n.portal);c=r(o,s,s);null!=c&&c!==o&&c!==e&&n.verifyItemRelativeUrls&&n.verifyItemRelativeUrls.writtenUrls.push(c)}}return c=x(c,n?.portal),s(c)&&(c=o(c)),n?.resources&&n?.portalItem&&!s(c)&&!l(c)&&0===a&&n.resources.toKeep.push({resource:n.portalItem.resourceFromPath(c),compress:!1}),c}function f(e,t,r){return p(e,r)}function h(e,t,r,s){const o=m(e,s);void 0!==o&&(t[r]=o)}const d=/\/items\/([^/]+)\/resources\/(.*)/,U="./resources/";function v(e){const t=e?.match(d)??null;return t?.[1]??null}function g(e){const t=e?.match(d)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=i(r);return{prefix:null,filename:e,extension:t}}const{path:o,extension:l}=i(r.slice(s+1));return{prefix:r.slice(0,s),filename:o,extension:l}}function x(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?c(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function I(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=a();return n(s,`${s.scheme}://${r}`)?c(e,t.portalHostname,r):c(e,r,t.portalHostname)}function R(t){if(!t)return t||null;let r=t;return r&&e&&!e.findCredential(r)&&(r=u(r),r=r.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),r=r.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),r=r.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),r}function w(t){if(!t)return t||null;let r=t;return r=r.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),r=r.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),r=r.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),r&&e&&!e.findCredential(r)&&(r=u(r)),r}const y=Object.freeze(Object.defineProperty({__proto__:null,ensureMainOnlineDomain:x,fromCDNUrl:w,fromJSON:p,itemIdFromResourceUrl:v,prefixAndFilenameFromResourceUrl:g,read:f,toCDNUrl:R,toJSON:m,write:h},Symbol.toStringTag,{value:"Module"}));export{R as a,y as b,w as c,x as e,p as f,v as i,g as p,f as r,m as t,h as w};
|
package/config.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"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.
|
|
5
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.13";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/XHRAdapter.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 t from"../request.js";import{isTimeoutError as e}from"../
|
|
5
|
+
import t from"../request.js";import{isTimeoutError as e}from"../request/process.js";class s extends EventTarget{constructor(){super(...arguments),this._readyState=0,this._responseType="",this.timeout=0,this._withCredentials=!1,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.onreadystatechange=null,this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this._abortController=null,this._error=null,this._options={},this._response=null,this._sendFlag=!1,this._url=""}get readyState(){return this._readyState}get response(){return""===this.responseType||"text"===this.responseType?this.responseText:this.readyState!==this.DONE||this._error||!this._response?null:this._response.data}get responseText(){return""!==this.responseType&&"text"!==this.responseType&&this._throwDOMException(),this.readyState!==this.DONE?"":this._response?this._response.data:null!=this._error?.raw?"string"==typeof this._error.raw?this._error.raw:JSON.stringify(this._error.raw):""}get responseType(){return this._responseType}set responseType(t){("document"!==t||globalThis instanceof Window)&&(this.readyState!==this.LOADING&&this.readyState!==this.DONE||this._throwDOMException(),this._responseType=t)}get responseURL(){return(this._response||this._error)?.url??""}get responseXML(){return""!==this.responseType&&"document"!==this.responseType&&this._throwDOMException(),this.readyState!==this.DONE?null:this._response?.data??null}get status(){return(this._response||this._error)?.httpStatus??0}get statusText(){return""}get upload(){return console.warn("upload not implemented"),null}get withCredentials(){return this._withCredentials}set withCredentials(t){this.readyState!==this.UNSENT&&this.readyState!==this.OPENED&&this._throwDOMException(),this._withCredentials=t}static{this.UNSENT=0}static{this.OPENED=1}static{this.HEADERS_RECEIVED=2}static{this.LOADING=3}static{this.DONE=4}abort(){this.readyState===this.OPENED&&this._sendFlag||this.readyState===this.HEADERS_RECEIVED||this.readyState===this.LOADING?(this._sendFlag=!1,this._error=null,this._response=null,this._abortController?.abort(),this._updateReadyState(this.DONE),this._dispatchProgressEvent("abort"),this._dispatchProgressEvent("loadend")):this.readyState===this.DONE&&this._updateReadyState(this.UNSENT)}getAllResponseHeaders(){let t="";const e=(this._response||this._error)?.getAllHeaders?.();if(e)for(const[s,r]of e)t+=`${s}: ${r}\r\n`;return t}getResponseHeader(t){return(this._response||this._error)?.getHeader?.(t)??null}open(t,e){switch(this._sendFlag=!1,this._options={},t){case"GET":this._options.method="auto";break;case"POST":this._options.method="post";break;case"HEAD":this._options.method="head";break;case"DELETE":this._options.method="delete";break;case"PUT":this._options.method="put"}this._url=e,this._error=null,this._response=null,this._abortController=new AbortController,this._updateReadyState(this.OPENED)}overrideMimeType(t){throw new Error("overrideMimeType not implemented")}send(s){(this.readyState!==this.OPENED||this._sendFlag)&&this._throwDOMException(),this._sendFlag=!0,this._updateReadyState(this.LOADING),this._dispatchProgressEvent("loadstart");const r=this._options;s instanceof URLSearchParams?r.body=s.toString():r.body=s,r.responseType=""===this.responseType?"text":"arraybuffer"===this.responseType?"array-buffer":this.responseType,r.signal=this._abortController?.signal,this.timeout&&(r.timeout=this.timeout),this.withCredentials&&(r.withCredentials=!0),t(this._url,r).then(t=>{this._response=t,this._updateReadyState(this.DONE),this._dispatchProgressEvent("load")}).catch(t=>{this._sendFlag&&(this._error=t.details,this._updateReadyState(this.DONE),e(t)?this._dispatchProgressEvent("timeout"):"AbortError"===t.name?this._dispatchProgressEvent("abort"):this._dispatchProgressEvent("error"))}).finally(()=>{this._sendFlag&&this._dispatchProgressEvent("loadend")})}setRequestHeader(t,e){(this.readyState!==this.OPENED||this._sendFlag)&&this._throwDOMException(),this._options.headers??={},this._options.headers[t]=e}_dispatchProgressEvent(t){const e=new ProgressEvent(t,{loaded:0,total:0});this.dispatchEvent(e),this[`on${t}`]?.(e)}_throwDOMException(){throw new DOMException("","InvalidStateError")}_updateReadyState(t){if(this._readyState!==t&&(this._readyState=t,t!==this.UNSENT)){const t=new Event("readystatechange");this.dispatchEvent(t),this.onreadystatechange?.(t)}}}export{s as XHRAdapter};
|
|
@@ -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{create as t}from"../factories/mat3f64.js";import{create as n}from"../factories/quatf64.js";import{fromValues as s,create as o}from"../factories/vec3f64.js";import{getEpsilon as a,RANDOM as r}from"./common.js";import{f as e,i as c,H as i,n as u}from"../../../../chunks/vec32.js";import{
|
|
5
|
+
import{create as t}from"../factories/mat3f64.js";import{create as n}from"../factories/quatf64.js";import{fromValues as s,create as o}from"../factories/vec3f64.js";import{getEpsilon as a,RANDOM as r}from"./common.js";import{f as e,i as c,H as i,n as u}from"../../../../chunks/vec32.js";import{s as h,a as M,n as f,d as l,h as m,c as p,g as q,l as d,i as g,b as j,e as P}from"../../../../chunks/vec42.js";function I(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function b(t,n,s){s*=.5;const o=Math.sin(s);return t[0]=o*n[0],t[1]=o*n[1],t[2]=o*n[2],t[3]=Math.cos(s),t}function v(t,n){const s=2*Math.acos(n[3]),o=Math.sin(s/2);return o>a()?(t[0]=n[0]/o,t[1]=n[1]/o,t[2]=n[2]/o):(t[0]=1,t[1]=0,t[2]=0),s}function x(t,n,s){const o=n[0],a=n[1],r=n[2],e=n[3],c=s[0],i=s[1],u=s[2],h=s[3];return t[0]=o*h+e*c+a*u-r*i,t[1]=a*h+e*i+r*c-o*u,t[2]=r*h+e*u+o*i-a*c,t[3]=e*h-o*c-a*i-r*u,t}function y(t,n,s){s*=.5;const o=n[0],a=n[1],r=n[2],e=n[3],c=Math.sin(s),i=Math.cos(s);return t[0]=o*i+e*c,t[1]=a*i+r*c,t[2]=r*i-a*c,t[3]=e*i-o*c,t}function A(t,n,s){s*=.5;const o=n[0],a=n[1],r=n[2],e=n[3],c=Math.sin(s),i=Math.cos(s);return t[0]=o*i-r*c,t[1]=a*i+e*c,t[2]=r*i+o*c,t[3]=e*i-a*c,t}function _(t,n,s){s*=.5;const o=n[0],a=n[1],r=n[2],e=n[3],c=Math.sin(s),i=Math.cos(s);return t[0]=o*i+a*c,t[1]=a*i-o*c,t[2]=r*i+e*c,t[3]=e*i-r*c,t}function k(t,n){const s=n[0],o=n[1],a=n[2];return t[0]=s,t[1]=o,t[2]=a,t[3]=Math.sqrt(Math.abs(1-s*s-o*o-a*a)),t}function z(t,n,s,o){const r=n[0],e=n[1],c=n[2],i=n[3];let u,h,M,f,l,m=s[0],p=s[1],q=s[2],d=s[3];return h=r*m+e*p+c*q+i*d,h<0&&(h=-h,m=-m,p=-p,q=-q,d=-d),1-h>a()?(u=Math.acos(h),M=Math.sin(u),f=Math.sin((1-o)*u)/M,l=Math.sin(o*u)/M):(f=1-o,l=o),t[0]=f*r+l*m,t[1]=f*e+l*p,t[2]=f*c+l*q,t[3]=f*i+l*d,t}function E(t){const n=r,s=n(),o=n(),a=n(),e=Math.sqrt(1-s),c=Math.sqrt(s);return t[0]=e*Math.sin(2*Math.PI*o),t[1]=e*Math.cos(2*Math.PI*o),t[2]=c*Math.sin(2*Math.PI*a),t[3]=c*Math.cos(2*Math.PI*a),t}function L(t,n){const s=n[0],o=n[1],a=n[2],r=n[3],e=s*s+o*o+a*a+r*r,c=e?1/e:0;return t[0]=-s*c,t[1]=-o*c,t[2]=-a*c,t[3]=r*c,t}function O(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function S(t,n){const s=n[0]+n[4]+n[8];let o;if(s>0)o=Math.sqrt(s+1),t[3]=.5*o,o=.5/o,t[0]=(n[5]-n[7])*o,t[1]=(n[6]-n[2])*o,t[2]=(n[1]-n[3])*o;else{let s=0;n[4]>n[0]&&(s=1),n[8]>n[3*s+s]&&(s=2);const a=(s+1)%3,r=(s+2)%3;o=Math.sqrt(n[3*s+s]-n[3*a+a]-n[3*r+r]+1),t[s]=.5*o,o=.5/o,t[3]=(n[3*a+r]-n[3*r+a])*o,t[a]=(n[3*a+s]+n[3*s+a])*o,t[r]=(n[3*r+s]+n[3*s+r])*o}return t}function T(t,n,s,o){const a=.5*Math.PI/180;n*=a,s*=a,o*=a;const r=Math.sin(n),e=Math.cos(n),c=Math.sin(s),i=Math.cos(s),u=Math.sin(o),h=Math.cos(o);return t[0]=r*i*h-e*c*u,t[1]=e*c*h+r*i*u,t[2]=e*i*u-r*c*h,t[3]=e*i*h+r*c*u,t}function H(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}const W=l,X=h,Y=m,Z=x,w=p,B=q,C=d,D=g,F=D,G=j,J=G,K=f,N=M,Q=P;function R(t,n,s){const o=e(n,s);return o<-.999999?(c(U,V,n),i(U)<1e-6&&c(U,$,n),u(U,U),b(t,U,Math.PI),t):o>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(c(U,n,s),t[0]=U[0],t[1]=U[1],t[2]=U[2],t[3]=1+o,K(t,t))}const U=o(),V=s(1,0,0),$=s(0,1,0);function tt(t,n,s,o,a,r){return z(nt,n,a,r),z(st,s,o,r),z(t,nt,st,2*r*(1-r)),t}const nt=n(),st=n();function ot(t,n,s,o){const a=at;return a[0]=s[0],a[3]=s[1],a[6]=s[2],a[1]=o[0],a[4]=o[1],a[7]=o[2],a[2]=-n[0],a[5]=-n[1],a[8]=-n[2],K(t,S(t,a))}const at=t(),rt=Object.freeze(Object.defineProperty({__proto__:null,add:Y,calculateW:k,conjugate:O,copy:W,dot:B,equals:Q,exactEquals:N,fromEuler:T,fromMat3:S,getAxisAngle:v,identity:I,invert:L,len:F,length:D,lerp:C,mul:Z,multiply:x,normalize:K,random:E,rotateX:y,rotateY:A,rotateZ:_,rotationTo:R,scale:w,set:X,setAxes:ot,setAxisAngle:b,slerp:z,sqlerp:tt,sqrLen:J,squaredLength:G,str:H},Symbol.toStringTag,{value:"Module"}));export{Y as add,k as calculateW,O as conjugate,W as copy,B as dot,Q as equals,N as exactEquals,T as fromEuler,S as fromMat3,v as getAxisAngle,I as identity,L as invert,F as len,D as length,C as lerp,Z as mul,x as multiply,K as normalize,rt as q,E as random,y as rotateX,A as rotateY,_ as rotateZ,R as rotationTo,w as scale,X as set,ot as setAxes,b as setAxisAngle,z as slerp,tt as sqlerp,J as sqrLen,G as squaredLength,H as str};
|
|
@@ -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{cyclicalDegrees as r}from"./Cyclical.js";import{toUnit as t}from"./quantityUtils.js";import{formatAngleDegrees as e,formatDecimal as a,
|
|
5
|
+
import{cyclicalDegrees as r}from"./Cyclical.js";import{toUnit as t}from"./quantityUtils.js";import{formatAngleDegrees as e,formatDecimal as a,formatMetricArea as n,formatImperialArea as u,formatMetricLength as i,formatImperialLength as c,formatImperialVerticalLength as o,formatMetricVerticalLength as l,formatMetricVolume as f,formatImperialVolume as m,formatRelativeDecimal as b,formatMetricRelativeLength as s,formatMetricRelativeVerticalLength as v,formatImperialRelativeLength as p,formatImperialRelativeVerticalLength as h,formatDMS as g,formatRelativeAngleDegrees as L}from"./unitFormatUtils.js";function d(r,e,n,u=2,i="abbr"){return a(r,t(e,n).value,n,u,i)}function M(r,e,a,n=2,u="abbr"){return b(r,t(e,a).value,a,n,u)}function w(r,t,e=2,a="abbr"){return i(r,t.value,t.unit,e,a)}function I(r,t,e=2,a="abbr"){return s(r,t.value,t.unit,e,a)}function V(r,t,e=2,a="abbr"){return l(r,t.value,t.unit,e,a)}function R(r,t,e=2,a="abbr"){return v(r,t.value,t.unit,e,a)}function y(r,t,e=2,a="abbr"){return n(r,t.value,t.unit,e,a)}function j(r,t,e=2,a="abbr"){return f(r,t.value,t.unit,e,a)}function D(r,t,e=2,a="abbr"){return c(r,t.value,t.unit,e,a)}function A(r,t,e=2,a="abbr"){return p(r,t.value,t.unit,e,a)}function T(r,t,e=2,a="abbr"){return o(r,t.value,t.unit,e,a)}function U(r,t,e=2,a="abbr"){return h(r,t.value,t.unit,e,a)}function q(r,t,e=2,a="abbr"){return u(r,t.value,t.unit,e,a)}function x(r,t,e=2,a="abbr"){return m(r,t.value,t.unit,e,a)}function C(r){return g(r.value,r.unit)}function F(t,a,n,u=r,i=!0){return e(t.value,t.unit,t.rotationType,a,n,u,i)}function S(r,t,e){return L(r.value,r.unit,r.rotationType,t,e??void 0)}function k(r,t,e,a,n="abbr"){switch(a=a??2,e){case"imperial":return D(r,t,a,n);case"metric":return w(r,t,a,n);default:return d(r,t,e,a,n)}}function z(r,t,e,a=2,n="abbr"){switch(e){case"imperial":return A(r,t,a,n);case"metric":return I(r,t,a,n);default:return M(r,t,e,a,n)}}function B(r,t,e,a=2,n="abbr"){switch(e){case"imperial":return T(r,t,a,n);case"metric":return V(r,t,a,n);default:return d(r,t,e,a,n)}}function E(r,t,e,a=2,n="abbr"){switch(e){case"imperial":return U(r,t,a,n);case"metric":return R(r,t,a,n);default:return M(r,t,e,a,n)}}function G(r,t,e,a=2,n="abbr"){switch(e){case"imperial":return q(r,t,a,n);case"metric":return y(r,t,a,n);default:return d(r,t,e,a,n)}}function H(r,t,e,a=2,n="abbr"){switch(e){case"imperial":return x(r,t,a,n);case"metric":return j(r,t,a,n);default:return d(r,t,e,a,n)}}export{F as formatAngle,G as formatArea,C as formatDMS,d as formatDecimal,q as formatImperialArea,D as formatImperialLength,A as formatImperialRelativeLength,U as formatImperialRelativeVerticalLength,T as formatImperialVerticalLength,x as formatImperialVolume,k as formatLength,y as formatMetricArea,w as formatMetricLength,I as formatMetricRelativeLength,R as formatMetricRelativeVerticalLength,V as formatMetricVerticalLength,j as formatMetricVolume,S as formatRelativeAngle,M as formatRelativeDecimal,z as formatRelativeLength,E as formatRelativeVerticalLength,B as formatVerticalLength,H as formatVolume};
|
package/core/unitFormatUtils.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{cyclicalDegrees as t}from"./Cyclical.js";import{clamp as n}from"./mathUtils.js";import{convertRotationType as r}from"./quantityUtils.js";import{replace as i}from"./string.js";import{convertUnit as o,
|
|
5
|
+
import{cyclicalDegrees as t}from"./Cyclical.js";import{clamp as n}from"./mathUtils.js";import{convertRotationType as r}from"./quantityUtils.js";import{replace as i}from"./string.js";import{convertUnit as o,adaptiveMetricAreaUnit as e,adaptiveImperialAreaUnit as u,adaptiveMetricLengthUnit as s,adaptiveImperialLengthUnit as c,adaptiveImperialVerticalLengthUnit as a,adaptiveMetricVerticalLengthUnit as m,adaptiveMetricVolumeUnit as f,adaptiveImperialVolumeUnit as b}from"./unitUtils.js";import{formatNumber as l}from"../intl/number.js";function g(t,n,r){return t.units[n][r]}function p(t,n,r,i=2,o="abbr"){return`${l(n,{minimumFractionDigits:i,maximumFractionDigits:i,signDisplay:n>0?"never":"exceptZero"})} ${g(t,r,o)}`}function D(t,n,r,i=2,o="abbr"){return`${l(n,{minimumFractionDigits:i,maximumFractionDigits:i,signDisplay:"exceptZero"})} ${g(t,r,o)}`}function x(t,n,r,i=2,e="abbr"){const u=s(n,r);return p(t,o(n,r,u),u,i,e)}function F(t,n,r,i=2,e="abbr"){const u=s(n,r);return D(t,o(n,r,u),u,i,e)}function y(t,n,r,i=2,e="abbr"){const u=m(n,r);return p(t,o(n,r,u),u,i,e)}function d(t,n,r,i=2,e="abbr"){const u=m(n,r);return D(t,o(n,r,u),u,i,e)}function h(t,n,r,i=2,e="abbr"){const u=c(n,r);return p(t,o(n,r,u),u,i,e)}function M(t,n,r,i=2,e="abbr"){const u=c(n,r);return D(t,o(n,r,u),u,i,e)}function $(t,n,r,i=2,e="abbr"){const u=a(n,r);return p(t,o(n,r,u),u,i,e)}function j(t,n,r,i=2,e="abbr"){const u=a(n,r);return D(t,o(n,r,u),u,i,e)}function B(t,n,r,i=2,u="abbr"){const s=e(n,r);return p(t,o(n,r,s),s,i,u)}function w(t,n,r,i=2,e="abbr"){const s=u(n,r);return p(t,o(n,r,s),s,i,e)}function U(t,n,r,i=2,e="abbr"){const u=f(n,r);return p(t,o(n,r,u),u,i,e)}function Z(t,n,r,i=2,e="abbr"){const u=b(n,r);return p(t,o(n,r,u),u,i,e)}function S(t,n,r=2){let i=o(t,n,"degrees"),e=i-Math.floor(i);i-=e,e*=60;let u=e-Math.floor(e);return e-=u,u*=60,`${i.toFixed()}° ${e.toFixed()}' ${u.toFixed(r)}"`}const v=(t,n)=>({style:"unit",unitDisplay:"narrow",unit:"degree",maximumFractionDigits:n,minimumFractionDigits:n,signDisplay:t>0?"never":"exceptZero"});function z(n,i,e,u,s,c=t,a=!0){let m=c.normalize(r(o(n,i,"degrees"),e,u),0,a);const f=v(m,s??2);return m=q(m,f),l(m,f)}function N(t,n,r,i,e=2){r!==i&&(t=-t);const u={style:"unit",unitDisplay:"narrow",unit:"degree",maximumFractionDigits:e,minimumFractionDigits:e,signDisplay:"exceptZero"};let s=o(t,n,"degrees")%360;return s=q(s,u),l(s,u)}const k=new Map;function q(t,n){const r=JSON.stringify(n);let i=k.get(r);return i||(i=new Intl.NumberFormat("en-US",n),k.set(r,i)),/^[-+]?360\.?0*°?$/.test(i.format(t))?0:t}const C=["B","kB","MB","GB","TB"];function G(t,r){let o=0===(r=Math.round(r))?0:Math.floor(Math.log(r)/Math.log(1024));o=n(o,0,C.length-1);const e=l(r/1024**o,{maximumFractionDigits:2});return i(t.units.bytes[C[o]],{fileSize:e})}export{z as formatAngleDegrees,S as formatDMS,p as formatDecimal,G as formatFileSize,w as formatImperialArea,h as formatImperialLength,M as formatImperialRelativeLength,j as formatImperialRelativeVerticalLength,$ as formatImperialVerticalLength,Z as formatImperialVolume,B as formatMetricArea,x as formatMetricLength,F as formatMetricRelativeLength,d as formatMetricRelativeVerticalLength,y as formatMetricVerticalLength,U as formatMetricVolume,N as formatRelativeAngleDegrees,D as formatRelativeDecimal,g as unitName};
|
package/core/unitUtils.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"./has.js";import{strict as e}from"./jsonMap.js";import{getReferenceEllipsoid as s}from"../geometry/ellipsoidUtils.js";import{earth as i,mars as n,moon as t}from"../geometry/support/Ellipsoid.js";import{isWKIDFromMars as a,isWKIDFromMoon as r,isGeographic as c,isEarth as u}from"../geometry/support/spatialReferenceUtils.js";import l from"../geometry/support/WKIDUnitConversion.js";const o=39.37,m=i.radius*Math.PI/200,f=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,d=l,U=/UNIT\[([^\]]+)]/i,b=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),B=e()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),h=e=>e*e,_=e=>e*e*e,k={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:h(.001)},"square-centimeters":{inBaseUnits:h(.01)},"square-decimeters":{inBaseUnits:h(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:h(1e3)},"square-inches":{inBaseUnits:h(.0254)},"square-feet":{inBaseUnits:h(.3048)},"square-yards":{inBaseUnits:h(.9144)},"square-miles":{inBaseUnits:h(1609.344)},"square-nautical-miles":{inBaseUnits:h(1852)},"square-us-feet":{inBaseUnits:h(1200/3937)},acres:{inBaseUnits:.0015625*h(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*_(.001)},"cubic-centimeters":{inBaseUnits:1e3*_(.01)},"cubic-decimeters":{inBaseUnits:1e3*_(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*_(1e3)},"cubic-inches":{inBaseUnits:1e3*_(.0254)},"cubic-feet":{inBaseUnits:1e3*_(.3048)},"cubic-yards":{inBaseUnits:1e3*_(.9144)},"cubic-miles":{inBaseUnits:1e3*_(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},y=(()=>{const e={};for(const s in k)for(const i in k[s].units)e[i]=s;return e})();function q(e,s,i){return e*k[i].units[s].inBaseUnits}function p(e,s,i){return e/k[i].units[s].inBaseUnits}const w=["inches","feet","yards","miles","nautical-miles","us-feet","millimeters","centimeters","decimeters","meters","kilometers"],g=["square-inches","square-feet","square-yards","square-miles","square-nautical-miles","square-us-feet","square-millimeters","square-centimeters","square-decimeters","square-meters","square-kilometers","acres","ares","hectares"],M=["cubic-inches","cubic-feet","cubic-yards","cubic-miles","liters","cubic-millimeters","cubic-centimeters","cubic-decimeters","cubic-meters","cubic-kilometers"],S=["metric","imperial"],D=[...S,...g],v=[...S,...w],C=[...S,...M],P=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function x(e){return"imperial"===e||"metric"===e}function E(e){const s=y[e];if(!s)throw new Error("unknown type");return s}function I(e){return k[e].baseUnit}function j(e){return I(E(e))}function R(e,s=null){return s=s||E(e),k[s].baseUnit===e}function N(e,s,i){if(s===i)return e;const n=E(s);if(n!==E(i))throw new Error("incompatible units");const t=R(s,n)?e:q(e,s,n);return R(i,n)?t:p(t,i,n)}function O(e,s,i,n=!1){if(!n&&c(s))throw new Error("Unable to convert from an angular unit to a linear unit.");const t=oe(s);return t!==i&&(e=t?N(e,t,i):N(e*=ae(s),"meters",i)),e}function F(e,s,i,n=!1){if(!n&&c(i))throw new Error("Unable to convert from a linear unit to an angular unit.");const t=oe(i);return s!==t&&(e=t?N(e,s,t):N(e,s,"meters")/ae(i)),e}function J(e){switch(e){case"metric":return"meters";case"imperial":return"feet";default:return e}}function T(e){return J(e)}function K(e){switch(e){case"metric":return"square-meters";case"imperial":return"square-feet";default:return e}}function A(e){switch(e){case"metric":return"cubic-meters";case"imperial":return"cubic-feet";default:return e}}function G(e,s,i){switch(i){case"metric":return L(e,s);case"imperial":return W(e,s);default:return i}}function H(e,s,i){switch(i){case"metric":return Y(e,s);case"imperial":return $(e,s);default:return i}}function L(e,s){const i=N(e,s,"meters");return Math.abs(i)<3e3?"meters":"kilometers"}function Y(e,s){const i=N(e,s,"meters");return Math.abs(i)<1e5?"meters":"kilometers"}function W(e,s){const i=N(e,s,"feet");return Math.abs(i)<1e3?"feet":"miles"}function $(e,s){const i=N(e,s,"feet");return Math.abs(i)<1e5?"feet":"miles"}function z(e,s){const i=N(e,s,"square-meters");return Math.abs(i)<3e6?"square-meters":"square-kilometers"}function Q(e,s){const i=N(e,s,"square-feet");return Math.abs(i)<1e6?"square-feet":"square-miles"}function V(e,s,i){switch(i){case"metric":return z(e,s);case"imperial":return Q(e,s);default:return i}}function X(e,s){const i=N(e,s,"cubic-meters");return Math.abs(i)<3e8?"cubic-meters":"cubic-kilometers"}function Z(e,s){const i=N(e,s,"cubic-feet");return Math.abs(i)<1e8?"cubic-feet":"cubic-miles"}function ee(e,s,i){switch(i){case"metric":return X(e,s);case"imperial":return Z(e,s);default:return i}}function se(e,s,i){return N(e,s,"meters")/(i*Math.PI/180)}function ie(e){return B.fromJSON(e.toLowerCase())||null}function ne(e){if(null!=e&&!u(e))return 1;const s=ae(e);return s>1e5?1:s}function te(e){return ae(e)>=s(e).metersPerDegree?"meters":oe(e)}function ae(e,s=i.metersPerDegree){return re(e,!0)??s}function re(e,s=!1){const i=e?.wkid??null,c=e?.wkt2??e?.wkt??null;let u=null;if(i){if(a(i))return n.metersPerDegree;if(r(i))return t.metersPerDegree;u=d.values[d[i]],!u&&s&&b.has(i)&&(u=m)}else c&&(be(c)?u=ue(f.exec(c),u):Ue(c)&&(u=ue(U.exec(c),u)));return u}function ce(e){return c(e)?1:ae(e)}function ue(e,s){return e?.[1]?le(e[1]):s}function le(e){return parseFloat(e.split(",")[1])}function oe(e){const s=e?.wkid??null,i=e?.wkt2??e?.wkt??null;let n=null;if(s)n=d.units[d[s]];else if(i){const e=be(i)?f:Ue(i)?U:null;if(e){const s=e.exec(i);s?.[1]&&(n=he(s[1]))}}return null!=n?ie(n):null}function me(e){const s=oe(e);return null!=s&&v.includes(s)?s:null}function fe(e){const s=te(e);return null!=s&&v.includes(s)?s:null}function de(e){const s=oe(e);return null==s?null:P.get(s)}function Ue(e){return/^GEOCCS/i.test(e)}function be(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const Be=1e-7;function he(e){const s=/[\\"']([^\\"']+)/.exec(e);let i=s?.[1];if(!i||!ie(i)){const s=le(e);i=null;const n=d.values;for(let e=0;e<n.length;++e)if(Math.abs(s-n[e])<Be){i=d.units[e];break}}return i}function _e(e){const s=oe(e);if(null==s)return null;switch(s){case"feet":case"us-feet":case"clarke-feet":case"fathoms":case"nautical-miles":case"us-chains":case"us-links":case"us-miles":case"clarke-yards":case"clarke-chains":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"sears-links":case"benoit-1895-a-yards":case"benoit-1895-a-feet":case"benoit-1895-a-chains":case"benoit-1895-a-links":case"benoit-1895-b-yards":case"benoit-1895-b-feet":case"benoit-1895-b-chains":case"benoit-1895-b-links":case"1865-feet":case"indian-feet":case"indian-1937-feet":case"indian-1962-feet":case"indian-1975-feet":case"indian-yards":case"indian-1937-yards":case"indian-1962-yards":case"indian-1975-yards":case"statute-miles":case"gold-coast-feet":case"british-1936-feet":case"yards":case"chains":case"links":case"sears-1922-truncated-yards":case"sears-1922-truncated-feet":case"sears-1922-truncated-chains":case"sears-1922-truncated-links":case"us-yards":case"inches":case"us-inches":case"rods":case"us-rods":case"us-nautical-miles":case"uk-nautical-miles":case"smoots":case"tx-vara":case"points":return"imperial";case"millimeters":case"centimeters":case"meters":case"german-meters":case"kilometers":case"decimeters":case"micrometers":case"nanometers":case"50-kilometers":case"150-kilometers":return"metric"}return null}const ke={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},ye={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},qe={esriDUDecimalDegrees:"degrees",esriDURadians:"radians"},pe=e()(ke),we=e()(ye),ge=e()(qe);export{V as adaptiveAreaUnit,Q as adaptiveImperialAreaUnit,W as adaptiveImperialLengthUnit,$ as adaptiveImperialVerticalLengthUnit,Z as adaptiveImperialVolumeUnit,G as adaptiveLengthUnit,z as adaptiveMetricAreaUnit,L as adaptiveMetricLengthUnit,Y as adaptiveMetricVerticalLengthUnit,X as adaptiveMetricVolumeUnit,H as adaptiveVerticalLengthUnit,ee as adaptiveVolumeUnit,ge as angleUnitsJSONMap,de as areaUnitFromSpatialReference,pe as areaUnitsJSONMap,j as baseUnitForUnit,I as baseUnitForUnitType,O as convertFromSpatialReferenceUnit,F as convertToSpatialReferenceUnit,N as convertUnit,K as defaultAreaUnit,J as defaultLengthUnit,T as defaultVerticalLengthUnit,A as defaultVolumeUnit,_e as getDefaultUnitSystem,ce as getMetersPerCartesianUnitForSR,re as getMetersPerUnit,ae as getMetersPerUnitForSR,ne as getMetersPerVerticalUnitForSR,oe as getUnitString,te as getVerticalUnitStringForSR,b as gradGcsIds,o as inchesPerMeter,R as isBaseUnit,x as isMeasurementSystem,be as isProjectedWKT,se as lengthToDegrees,me as lengthUnitFromSpatialReference,w as lengthUnits,we as lengthUnitsJSONMap,D as measurementAreaUnits,v as measurementLengthUnits,C as measurementVolumeUnits,ie as unitFromRESTJSON,E as unitType,fe as verticalLengthUnitFromSpatialReference};
|
|
5
|
+
import"./has.js";import{strict as e}from"./jsonMap.js";import{getReferenceEllipsoid as s}from"../geometry/ellipsoidUtils.js";import{earth as i,mars as n,moon as t}from"../geometry/support/Ellipsoid.js";import{isGeographic as a,isWKIDFromMars as r,isWKIDFromMoon as c,isEarth as u}from"../geometry/support/spatialReferenceUtils.js";import l from"../geometry/support/WKIDUnitConversion.js";const o=39.37,m=i.radius*Math.PI/200,f=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,d=l,U=/UNIT\[([^\]]+)]/i,b=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),B=e()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),h=e=>e*e,_=e=>e*e*e,k={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:h(.001)},"square-centimeters":{inBaseUnits:h(.01)},"square-decimeters":{inBaseUnits:h(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:h(1e3)},"square-inches":{inBaseUnits:h(.0254)},"square-feet":{inBaseUnits:h(.3048)},"square-yards":{inBaseUnits:h(.9144)},"square-miles":{inBaseUnits:h(1609.344)},"square-nautical-miles":{inBaseUnits:h(1852)},"square-us-feet":{inBaseUnits:h(1200/3937)},acres:{inBaseUnits:.0015625*h(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*_(.001)},"cubic-centimeters":{inBaseUnits:1e3*_(.01)},"cubic-decimeters":{inBaseUnits:1e3*_(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*_(1e3)},"cubic-inches":{inBaseUnits:1e3*_(.0254)},"cubic-feet":{inBaseUnits:1e3*_(.3048)},"cubic-yards":{inBaseUnits:1e3*_(.9144)},"cubic-miles":{inBaseUnits:1e3*_(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},y=(()=>{const e={};for(const s in k)for(const i in k[s].units)e[i]=s;return e})();function q(e,s,i){return e*k[i].units[s].inBaseUnits}function p(e,s,i){return e/k[i].units[s].inBaseUnits}const w=["inches","feet","yards","miles","nautical-miles","us-feet","millimeters","centimeters","decimeters","meters","kilometers"],g=["square-inches","square-feet","square-yards","square-miles","square-nautical-miles","square-us-feet","square-millimeters","square-centimeters","square-decimeters","square-meters","square-kilometers","acres","ares","hectares"],M=["cubic-inches","cubic-feet","cubic-yards","cubic-miles","liters","cubic-millimeters","cubic-centimeters","cubic-decimeters","cubic-meters","cubic-kilometers"],S=["metric","imperial"],D=[...S,...g],v=[...S,...w],C=[...S,...M],P=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function x(e){return"imperial"===e||"metric"===e}function E(e){const s=y[e];if(!s)throw new Error("unknown type");return s}function I(e){return k[e].baseUnit}function j(e){return I(E(e))}function R(e,s=null){return s=s||E(e),k[s].baseUnit===e}function N(e,s,i){if(s===i)return e;const n=E(s);if(n!==E(i))throw new Error("incompatible units");const t=R(s,n)?e:q(e,s,n);return R(i,n)?t:p(t,i,n)}function O(e,s,i,n=!1){if(!n&&a(s))throw new Error("Unable to convert from an angular unit to a linear unit.");const t=oe(s);return t!==i&&(e=t?N(e,t,i):N(e*=ae(s),"meters",i)),e}function F(e,s,i,n=!1){if(!n&&a(i))throw new Error("Unable to convert from a linear unit to an angular unit.");const t=oe(i);return s!==t&&(e=t?N(e,s,t):N(e,s,"meters")/ae(i)),e}function J(e){switch(e){case"metric":return"meters";case"imperial":return"feet";default:return e}}function T(e){return J(e)}function K(e){switch(e){case"metric":return"square-meters";case"imperial":return"square-feet";default:return e}}function A(e){switch(e){case"metric":return"cubic-meters";case"imperial":return"cubic-feet";default:return e}}function G(e,s,i){switch(i){case"metric":return L(e,s);case"imperial":return W(e,s);default:return i}}function H(e,s,i){switch(i){case"metric":return Y(e,s);case"imperial":return $(e,s);default:return i}}function L(e,s){const i=N(e,s,"meters");return Math.abs(i)<3e3?"meters":"kilometers"}function Y(e,s){const i=N(e,s,"meters");return Math.abs(i)<1e5?"meters":"kilometers"}function W(e,s){const i=N(e,s,"feet");return Math.abs(i)<1e3?"feet":"miles"}function $(e,s){const i=N(e,s,"feet");return Math.abs(i)<1e5?"feet":"miles"}function z(e,s){const i=N(e,s,"square-meters");return Math.abs(i)<3e6?"square-meters":"square-kilometers"}function Q(e,s){const i=N(e,s,"square-feet");return Math.abs(i)<1e6?"square-feet":"square-miles"}function V(e,s,i){switch(i){case"metric":return z(e,s);case"imperial":return Q(e,s);default:return i}}function X(e,s){const i=N(e,s,"cubic-meters");return Math.abs(i)<3e8?"cubic-meters":"cubic-kilometers"}function Z(e,s){const i=N(e,s,"cubic-feet");return Math.abs(i)<1e8?"cubic-feet":"cubic-miles"}function ee(e,s,i){switch(i){case"metric":return X(e,s);case"imperial":return Z(e,s);default:return i}}function se(e,s,i){return N(e,s,"meters")/(i*Math.PI/180)}function ie(e){return B.fromJSON(e.toLowerCase())||null}function ne(e){if(null!=e&&!u(e))return 1;const s=ae(e);return s>1e5?1:s}function te(e){return ae(e)>=s(e).metersPerDegree?"meters":oe(e)}function ae(e,s=i.metersPerDegree){return re(e,!0)??s}function re(e,s=!1){const i=e?.wkid??null,a=e?.wkt2??e?.wkt??null;let u=null;if(i){if(r(i))return n.metersPerDegree;if(c(i))return t.metersPerDegree;u=d.values[d[i]],!u&&s&&b.has(i)&&(u=m)}else a&&(be(a)?u=ue(f.exec(a),u):Ue(a)&&(u=ue(U.exec(a),u)));return u}function ce(e){return a(e)?1:ae(e)}function ue(e,s){return e?.[1]?le(e[1]):s}function le(e){return parseFloat(e.split(",")[1])}function oe(e){const s=e?.wkid??null,i=e?.wkt2??e?.wkt??null;let n=null;if(s)n=d.units[d[s]];else if(i){const e=be(i)?f:Ue(i)?U:null;if(e){const s=e.exec(i);s?.[1]&&(n=he(s[1]))}}return null!=n?ie(n):null}function me(e){const s=oe(e);return null!=s&&v.includes(s)?s:null}function fe(e){const s=te(e);return null!=s&&v.includes(s)?s:null}function de(e){const s=oe(e);return null==s?null:P.get(s)}function Ue(e){return/^GEOCCS/i.test(e)}function be(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const Be=1e-7;function he(e){const s=/[\\"']([^\\"']+)/.exec(e);let i=s?.[1];if(!i||!ie(i)){const s=le(e);i=null;const n=d.values;for(let e=0;e<n.length;++e)if(Math.abs(s-n[e])<Be){i=d.units[e];break}}return i}function _e(e){const s=oe(e);if(null==s)return null;switch(s){case"feet":case"us-feet":case"clarke-feet":case"fathoms":case"nautical-miles":case"us-chains":case"us-links":case"us-miles":case"clarke-yards":case"clarke-chains":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"sears-links":case"benoit-1895-a-yards":case"benoit-1895-a-feet":case"benoit-1895-a-chains":case"benoit-1895-a-links":case"benoit-1895-b-yards":case"benoit-1895-b-feet":case"benoit-1895-b-chains":case"benoit-1895-b-links":case"1865-feet":case"indian-feet":case"indian-1937-feet":case"indian-1962-feet":case"indian-1975-feet":case"indian-yards":case"indian-1937-yards":case"indian-1962-yards":case"indian-1975-yards":case"statute-miles":case"gold-coast-feet":case"british-1936-feet":case"yards":case"chains":case"links":case"sears-1922-truncated-yards":case"sears-1922-truncated-feet":case"sears-1922-truncated-chains":case"sears-1922-truncated-links":case"us-yards":case"inches":case"us-inches":case"rods":case"us-rods":case"us-nautical-miles":case"uk-nautical-miles":case"smoots":case"tx-vara":case"points":return"imperial";case"millimeters":case"centimeters":case"meters":case"german-meters":case"kilometers":case"decimeters":case"micrometers":case"nanometers":case"50-kilometers":case"150-kilometers":return"metric"}return null}const ke={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},ye={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},qe={esriDUDecimalDegrees:"degrees",esriDURadians:"radians"},pe=e()(ke),we=e()(ye),ge=e()(qe);export{V as adaptiveAreaUnit,Q as adaptiveImperialAreaUnit,W as adaptiveImperialLengthUnit,$ as adaptiveImperialVerticalLengthUnit,Z as adaptiveImperialVolumeUnit,G as adaptiveLengthUnit,z as adaptiveMetricAreaUnit,L as adaptiveMetricLengthUnit,Y as adaptiveMetricVerticalLengthUnit,X as adaptiveMetricVolumeUnit,H as adaptiveVerticalLengthUnit,ee as adaptiveVolumeUnit,ge as angleUnitsJSONMap,de as areaUnitFromSpatialReference,pe as areaUnitsJSONMap,j as baseUnitForUnit,I as baseUnitForUnitType,O as convertFromSpatialReferenceUnit,F as convertToSpatialReferenceUnit,N as convertUnit,K as defaultAreaUnit,J as defaultLengthUnit,T as defaultVerticalLengthUnit,A as defaultVolumeUnit,_e as getDefaultUnitSystem,ce as getMetersPerCartesianUnitForSR,re as getMetersPerUnit,ae as getMetersPerUnitForSR,ne as getMetersPerVerticalUnitForSR,oe as getUnitString,te as getVerticalUnitStringForSR,b as gradGcsIds,o as inchesPerMeter,R as isBaseUnit,x as isMeasurementSystem,be as isProjectedWKT,se as lengthToDegrees,me as lengthUnitFromSpatialReference,w as lengthUnits,we as lengthUnitsJSONMap,D as measurementAreaUnits,v as measurementLengthUnits,C as measurementVolumeUnits,ie as unitFromRESTJSON,E as unitType,fe as verticalLengthUnitFromSpatialReference};
|
|
@@ -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{supportsFieldConfiguration as r}from"../layers/support/layerUtils.js";function e(e,t){return r(t)?t.getFieldAlias(e.name):e.alias}export{e as getEffectiveFieldAlias};
|
package/geometry/Extent.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{replace as i}from"../core/string.js";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 s}from"../core/accessorSupport/decorators/subclass.js";import n from"./Geometry.js";import m from"./Point.js";import r from"./SpatialReference.js";import{extentContainsPoint as a,extentContainsExtent as h}from"./support/contains.js";import{getFeatureExtentIntersector as o}from"./support/intersectsBase.js";import{equals as x,getInfo as l}from"./support/spatialReferenceUtils.js";import{canProject as p,geographicToWebMercator as c,webMercatorToGeographic as y}from"./support/webMercatorUtils.js";var u;function f(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}function d(t,i,e){return null==i?e:null==e?i:t(i,e)}let z=u=class extends n{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,i,e,s,n){return f(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?r.WGS84:t.spatialReference,t):{xmin:t,ymin:i,xmax:e,ymax:s,spatialReference:n??r.WGS84}}static fromPoint(t){return new u({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new m({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const i=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-i.x,t.y-i.y,t.z-i.z):this.offset(t.x-i.x,t.y-i.y)}clone(){const t=new u;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const i=this.spatialReference,e=t.spatialReference;return i&&e&&!i.equals(e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0)),"point"===t.type?a(this,t):"extent"===t.type&&h(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const i=this.spatialReference,e=t.spatialReference;return i&&e&&!i.equals(e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const i=.5*(1-t),e=this.width*i,s=this.height*i;if(this.xmin+=e,this.ymin+=s,this.xmax-=e,this.ymax-=s,this.hasZ){const t=(this.zmax-this.zmin)*i;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*i;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const i=this.spatialReference,e=t.spatialReference;i&&e&&!x(i,e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0));return o(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,i,e){return this.xmin+=t,this.ymin+=i,this.xmax+=t,this.ymax+=i,null!=e&&(this.zmin+=e,this.zmax+=e),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.min,this.zmin,t.zmin),this.zmax=d(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.min,this.mmin,t.mmin),this.mmax=d(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.max,this.zmin,t.zmin),this.zmax=d(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.max,this.mmin,t.mmin),this.mmax=d(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=l(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,s=this._getCM(t);if(s){const n=e.isWebMercator?y(s):s;this.xmin-=s.x,this.xmax-=s.x,e.isWebMercator||(n.x=M(n.x,t).x),this.spatialReference=new r(i((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:n.x}))}return this}_getCM(t){let i=null;const[e,s]=t.valid,n=this.xmin,m=this.xmax;return n>=e&&n<=s&&(m>=e&&m<=s)||(i=this.center),i}_normalize(t,i,e){const s=this.spatialReference;if(!s)return this;const n=e??l(s);if(null==n)return this;const m=this._getParts(n).map(t=>t.extent);if(m.length<2)return m[0]||this;if(m.length>2)return t?this._shiftCM(n):this.set({xmin:n.valid[0],xmax:n.valid[1]});if(t)return this._shiftCM(n);if(i)return m;let r=!0,a=!0;return m.forEach(t=>{t.hasZ||(r=!1),t.hasM||(a=!1)}),{rings:m.map(t=>{const i=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(r){const e=(t.zmax-t.zmin)/2;for(let t=0;t<i.length;t++)i[t].push(e)}if(a){const e=(t.mmax-t.mmin)/2;for(let t=0;t<i.length;t++)i[t].push(e)}return i}),hasZ:r,hasM:a,spatialReference:s}}_getParts(t){let i=this.cache._parts;if(!i){i=[];const{ymin:e,ymax:s,spatialReference:n}=this,m=this.width,r=this.xmin,a=this.xmax;let h;t=t||l(n);const[o,x]=t.valid;h=M(this.xmin,t);const p=h.x,c=h.frameId;h=M(this.xmax,t);const y=h.x,f=h.frameId,d=p===y&&m>0;if(m>2*x){const t=new u(r<a?p:y,e,x,s,n),m=new u(o,e,r<a?y:p,s,n),h=new u(0,e,x,s,n),l=new u(o,e,0,s,n),d=[],z=[];t.contains(h)&&d.push(c),t.contains(l)&&z.push(c),m.contains(h)&&d.push(f),m.contains(l)&&z.push(f);for(let i=c+1;i<f;i++)d.push(i),z.push(i);i.push({extent:t,frameIds:[c]},{extent:m,frameIds:[f]},{extent:h,frameIds:d},{extent:l,frameIds:z})}else p>y||d?i.push({extent:new u(p,e,x,s,n),frameIds:[c]},{extent:new u(o,e,y,s,n),frameIds:[f]}):i.push({extent:new u(p,e,y,s,n),frameIds:[c]});this.cache._parts=i}const e=this.hasZ,s=this.hasM;if(e||s){const t={};e&&(t.zmin=this.zmin,t.zmax=this.zmax),s&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let e=0;e<i.length;e++)i[e].extent.set(t)}return i}};function M(t,i){const[e,s]=i.valid,n=2*s;let m,r=0;return t>s?(m=Math.ceil(Math.abs(t-s)/n),t-=m*n,r=m):t<e&&(m=Math.ceil(Math.abs(t-e)/n),t+=m*n,r=-m),{x:t,frameId:r}}t([e({readOnly:!0})],z.prototype,"cache",null),t([e({readOnly:!0})],z.prototype,"center",null),t([e({readOnly:!0})],z.prototype,"extent",null),t([e({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasM",null),t([e({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasZ",null),t([e({readOnly:!0})],z.prototype,"height",null),t([e({readOnly:!0})],z.prototype,"width",null),t([e({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],z.prototype,"xmin",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"ymin",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"mmin",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"zmin",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"xmax",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"ymax",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"mmax",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"zmax",void 0),z=u=t([s("esri.geometry.Extent")],z),z.prototype.toJSON.isDefaultToJSON=!0;
|
|
5
|
+
import{__decorate as t}from"tslib";import{replace as i}from"../core/string.js";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 s}from"../core/accessorSupport/decorators/subclass.js";import n from"./Geometry.js";import m from"./Point.js";import r from"./SpatialReference.js";import{extentContainsPoint as a,extentContainsExtent as h}from"./support/contains.js";import{getFeatureExtentIntersector as o}from"./support/intersectsBase.js";import{equals as x,getInfo as l}from"./support/spatialReferenceUtils.js";import{canProject as p,geographicToWebMercator as c,webMercatorToGeographic as y}from"./support/webMercatorUtils.js";var u;function f(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}function d(t,i,e){return null==i?e:null==e?i:t(i,e)}let z=u=class extends n{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,i,e,s,n){return f(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?r.WGS84:t.spatialReference,t):{xmin:t,ymin:i,xmax:e,ymax:s,spatialReference:n??r.WGS84}}static fromPoint(t){return new u({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new m({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const i=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-i.x,t.y-i.y,t.z-i.z):this.offset(t.x-i.x,t.y-i.y)}clone(){const t=new u;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const i=this.spatialReference,e=t.spatialReference;return i&&e&&!i.equals(e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0)),"point"===t.type?a(this,t):"extent"===t.type&&h(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const i=this.spatialReference,e=t.spatialReference;return i&&e&&!i.equals(e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const i=.5*(1-t),e=this.width*i,s=this.height*i;if(this.xmin+=e,this.ymin+=s,this.xmax-=e,this.ymax-=s,this.hasZ){const t=(this.zmax-this.zmin)*i;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*i;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const i=this.spatialReference,e=t.spatialReference;i&&e&&!x(i,e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0));return o(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,i,e){return this.xmin+=t,this.ymin+=i,this.xmax+=t,this.ymax+=i,null!=e&&(this.zmin+=e,this.zmax+=e),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.min,this.zmin,t.zmin),this.zmax=d(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.min,this.mmin,t.mmin),this.mmax=d(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.max,this.zmin,t.zmin),this.zmax=d(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.max,this.mmin,t.mmin),this.mmax=d(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=l(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,s=this._getCM(t);if(s){const n=e.isWebMercator?y(s):s;this.xmin-=s.x,this.xmax-=s.x,e.isWebMercator||(n.x=M(n.x,t).x),this.spatialReference=new r(i((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:n.x}))}return this}_getCM(t){let i=null;const[e,s]=t.valid,n=this.xmin,m=this.xmax;return n>=e&&n<=s&&(m>=e&&m<=s)||(i=this.center),i}_normalize(t,i,e){const s=this.spatialReference;if(!s)return this;const n=e??l(s);if(null==n)return this;const m=this._getParts(n).map(t=>t.extent);if(m.length<2)return m[0]||this;if(m.length>2)return t?this._shiftCM(n):this.set({xmin:n.valid[0],xmax:n.valid[1]});if(t)return this._shiftCM(n);if(i)return m;let r=!0,a=!0;return m.forEach(t=>{t.hasZ||(r=!1),t.hasM||(a=!1)}),{rings:m.map(t=>{const i=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(r){const e=(t.zmax-t.zmin)/2;for(let t=0;t<i.length;t++)i[t].push(e)}if(a){const e=(t.mmax-t.mmin)/2;for(let t=0;t<i.length;t++)i[t].push(e)}return i}),hasZ:r,hasM:a,spatialReference:s}}_getParts(t){let i=this.cache._parts;if(!i){i=[];const{ymin:e,ymax:s,spatialReference:n}=this,m=this.width,r=this.xmin,a=this.xmax;let h;t=t||l(n);const[o,x]=t.valid;h=M(this.xmin,t);const p=h.x,c=h.frameId;h=M(this.xmax,t);const y=h.x,f=h.frameId,d=p===y&&m>0;if(m>2*x){const t=new u(r<a?p:y,e,x,s,n),m=new u(o,e,r<a?y:p,s,n),h=new u(0,e,x,s,n),l=new u(o,e,0,s,n),d=[],z=[];t.contains(h)&&d.push(c),t.contains(l)&&z.push(c),m.contains(h)&&d.push(f),m.contains(l)&&z.push(f);for(let i=c+1;i<f;i++)d.push(i),z.push(i);i.push({extent:t,frameIds:[c]},{extent:m,frameIds:[f]},{extent:h,frameIds:d},{extent:l,frameIds:z})}else p>y||d?i.push({extent:new u(p,e,x,s,n),frameIds:[c]},{extent:new u(o,e,y,s,n),frameIds:[f]}):i.push({extent:new u(p,e,y,s,n),frameIds:[c]});this.cache._parts=i}const e=this.hasZ,s=this.hasM;if(e||s){const t={};e&&(t.zmin=this.zmin,t.zmax=this.zmax),s&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let e=0;e<i.length;e++)i[e].extent.set(t)}return i}};function M(t,i){const[e,s]=i.valid,n=2*s;let m,r=0;return t>s?(m=Math.ceil(Math.abs(t-s)/n),t-=m*n,r=m):t<e&&(m=Math.ceil(Math.abs(t-e)/n),t+=m*n,r=-m),{x:t,frameId:r}}t([e({readOnly:!0})],z.prototype,"cache",null),t([e({readOnly:!0})],z.prototype,"center",null),t([e({readOnly:!0})],z.prototype,"extent",null),t([e({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasM",null),t([e({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasZ",null),t([e({readOnly:!0})],z.prototype,"height",null),t([e({readOnly:!0})],z.prototype,"width",null),t([e({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],z.prototype,"xmin",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"ymin",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"mmin",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"zmin",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"xmax",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"ymax",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"mmax",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"zmax",void 0),z=u=t([s("esri.geometry.Extent")],z),z.prototype.toJSON.isDefaultToJSON=!0;export{z as default};
|
package/geometry/Geometry.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 e}from"tslib";import{JSONSupport as r}from"../core/JSONSupport.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as o}from"../core/accessorSupport/decorators/reader.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import s from"./SpatialReference.js";let c=class extends r{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=s.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,r){if(e instanceof s)return e;if(null!=e){const t=new s;return t.read(e,r),t}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,r){this.cache[e]=r}};e([t()],c.prototype,"type",void 0),e([t({readOnly:!0})],c.prototype,"cache",null),e([t({readOnly:!0})],c.prototype,"extent",null),e([t({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],c.prototype,"hasM",void 0),e([t({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],c.prototype,"hasZ",void 0),e([t({type:s,json:{write:!0},value:s.WGS84})],c.prototype,"spatialReference",void 0),e([o("spatialReference")],c.prototype,"readSpatialReference",null),c=e([a("esri.geometry.Geometry")],c);
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONSupport as r}from"../core/JSONSupport.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as o}from"../core/accessorSupport/decorators/reader.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import s from"./SpatialReference.js";let c=class extends r{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=s.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,r){if(e instanceof s)return e;if(null!=e){const t=new s;return t.read(e,r),t}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,r){this.cache[e]=r}};e([t()],c.prototype,"type",void 0),e([t({readOnly:!0})],c.prototype,"cache",null),e([t({readOnly:!0})],c.prototype,"extent",null),e([t({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],c.prototype,"hasM",void 0),e([t({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],c.prototype,"hasZ",void 0),e([t({type:s,json:{write:!0},value:s.WGS84})],c.prototype,"spatialReference",void 0),e([o("spatialReference")],c.prototype,"readSpatialReference",null),c=e([a("esri.geometry.Geometry")],c);export{c as default};
|
package/geometry/Mesh.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 e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import r from"../core/Error.js";import{LoadableMixin as o}from"../core/Loadable.js";import s from"../core/Logger.js";import{EsriPromiseMixin as n}from"../core/Promise.js";import{throwIfAborted as i,whenOrAbort as a}from"../core/promiseUtils.js";import{watch as p}from"../core/reactiveUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{fromValues as m}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"./Geometry.js";import u from"./Point.js";import f from"./Polygon.js";import{create as d,
|
|
5
|
+
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import r from"../core/Error.js";import{LoadableMixin as o}from"../core/Loadable.js";import s from"../core/Logger.js";import{EsriPromiseMixin as n}from"../core/Promise.js";import{throwIfAborted as i,whenOrAbort as a}from"../core/promiseUtils.js";import{watch as p}from"../core/reactiveUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{fromValues as m}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"./Geometry.js";import u from"./Point.js";import f from"./Polygon.js";import{create as d,zero as g,fromBuffer as x}from"./support/aaBoundingBox.js";import{composeAxes as y,create as v}from"./support/axisAngleDegrees.js";import j from"./support/MeshComponent.js";import{componentNotFoundMessage as S,meshNotLoadedMessage as w,invalidLocationMessage as b,invalidPolygonMessage as L,InvalidLocationError as A}from"./support/meshErrors.js";import C from"./support/MeshGeoreferencedVertexSpace.js";import M from"./support/MeshLocalVertexSpace.js";import R from"./support/MeshTransform.js";import{MeshVertexAttributes as U}from"./support/MeshVertexAttributes.js";import{vertexSpaceOriginToPoint as _,isRelativeVertexSpace as F,selectVertexSpace as P}from"./support/meshVertexSpaceUtils.js";import{triangulate as E}from"./support/triangulationUtils.js";import{centerAt as B}from"./support/meshUtils/centerAt.js";import{computeMeshExtent as G}from"./support/meshUtils/extent.js";import{loadExternal as k}from"./support/meshUtils/loadExternal.js";import{addMeshMaterialCloneContext as I,addMeshTextureCloneContext as T,getMeshCloneContext as O}from"./support/meshUtils/meshCloneUtils.js";import{Metadata as z}from"./support/meshUtils/Metadata.js";import{convertUnitGeometry as V,createUnitSizeBox as D,extractSingleFaceOfBox as N,createUnitSizeSphere as Z,createUnitSizeCylinder as H,convertPlaneSizeParameter as K,createUnitSizePlane as W}from"./support/meshUtils/primitives.js";import{rotate as q}from"./support/meshUtils/rotate.js";import{scale as J}from"./support/meshUtils/scale.js";var Q;const X={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:C,local:M}};let Y=Q=class extends(t(o(n(h)))){constructor(e){super(e),this.components=null,this.vertexSpace=new C,this.transform=null,this.metadata=new z,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new U,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles(p(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{spatialReference:e,vertexSpace:t}=this,r=this;return G({get transform(){return r.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){const{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?d(g):x(e)}get origin(){const e=_(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new u({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(j.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.getLogger(this).error("removeComponent()",S)}}rotate(e,t,r,o){return y(e,t,r,$),q(this,$,o),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:o,vertexAttributes:s}=this,n=s?.position;if(!n)return this;if(F(o)){const[s,n,i]=o.origin;o.origin=m(s+e,n+t,i+r)}else{for(let o=0;o<n.length;o+=3)n[o]+=e,n[o+1]+=t,n[o+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(J(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(B(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(k(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone(I(T(e)))}cloneShallow(){return new Q({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const[{toBinaryGLTF:t}]=await Promise.all([import("./support/meshUtils/exporters/gltf/gltfexport.js"),this.load(e)]);return i(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(s.getLogger(this).error(e,w),!1)}static createBox(e,t){if(!(e instanceof u))return s.getLogger(this.prototype).error(".createBox()",b),null;const r=new Q(V(D(),e,t));return t?.imageFace&&"all"!==t.imageFace?N(r,t.imageFace):r}static createSphere(e,t){return e instanceof u?new Q(V(Z(t?.densificationFactor||0),e,t)):(s.getLogger(this.prototype).error(".createSphere()",b),null)}static createCylinder(e,t){return e instanceof u?new Q(V(H(t?.densificationFactor||0),e,t)):(s.getLogger(this.prototype).error(".createCylinder()",b),null)}static createPlane(e,t){if(!(e instanceof u))return s.getLogger(this.prototype).error(".createPlane()",b),null;const r=t?.facing??"up",o=K(r,t?.size);return new Q(V(W(r),e,{...t,size:o}))}static createFromPolygon(e,t){if(!(e instanceof f))return s.getLogger(this.prototype).error(".createFromPolygon()",L),null;const r=E(e);return new Q({vertexAttributes:new U({position:r.position}),components:[new j({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new C})}static async createFromGLTF(e,t,r){if(!(e instanceof u)){const e=new A;throw s.getLogger(this.prototype).error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await a(import("./support/meshUtils/loadGLTFMesh.js"),r);return new Q((await o(e,t,r)).mesh)}static createWithExternalSource(e,t,r){const o=r?.extent??null,{spatialReference:s}=e,n=r?.transform?.clone()??new R,i=P(e,r),a=r?.unitConversionDisabled,p={source:t,extent:o,unitConversionDisabled:a},c=new z;return c.externalSources.push(p),new Q({metadata:c,transform:n,vertexSpace:i,spatialReference:s})}static createIncomplete(e,t){const{spatialReference:o}=e,s=t?.transform?.clone()??new R,n=P(e,t),i=new Q({transform:s,vertexSpace:n,spatialReference:o});return i.addResolvingPromise(Promise.reject(new r("mesh-incomplete","Mesh resources are not complete"))),i}};e([c({type:[j],json:{write:!0}})],Y.prototype,"components",void 0),e([c({nonNullable:!0,types:X,constructOnly:!0,json:{write:!0},clonable:(e,t)=>O(t)?.vertexSpace??e.clone(t)})],Y.prototype,"vertexSpace",void 0),e([c({type:R,clonable:(e,t)=>{const r=O(t);return r&&"transform"in r?r.transform:e?.clone()??e},json:{write:!0}})],Y.prototype,"transform",void 0),e([c({constructOnly:!0,type:z,clonable:(e,t)=>O(t)?.metadata??e.clone()})],Y.prototype,"metadata",void 0),e([c()],Y.prototype,"hasExtent",null),e([c()],Y.prototype,"_transformedExtent",null),e([c()],Y.prototype,"_untransformedBounds",null),e([c()],Y.prototype,"origin",null),e([c({readOnly:!0,json:{read:!1}})],Y.prototype,"extent",null),e([c({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Y.prototype,"hasZ",void 0),e([c({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Y.prototype,"hasM",void 0),e([c({type:U,nonNullable:!0,json:{write:!0},clonable:(e,t)=>O(t)?.vertexAttributes??e.clone(t)})],Y.prototype,"vertexAttributes",void 0),Y=Q=e([l("esri.geometry.Mesh")],Y);const $=v();export{Y as default};
|
package/geometry/Point.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"../core/Accessor.js";import r from"../core/Logger.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import{cast as i}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as o}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../core/accessorSupport/decorators/writer.js";import{ensureNumber as n}from"../core/accessorSupport/ensureType.js";import p from"./Geometry.js";import u from"./SpatialReference.js";import{getLatitude as c,getLongitude as h,distance as d}from"./support/pointUtils.js";import{getInfo as m}from"./support/spatialReferenceUtils.js";import{lngLatToXY as y,xyToLngLat as f}from"./support/webMercatorUtils.js";var g;const w=[0,0];function x(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let _=g=class extends p{static copy(t,r){r._set("x",t._get("x")),r._set("y",t._get("y")),r._set("z",t._get("z")),r._set("m",t._get("m"));const s=t._get("spatialReference");r._set("spatialReference",e.isFrozen(s)?s:s.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,s,i,o){let l;if(Array.isArray(t))l=t,o=e,t=l[0],e=l[1],s=l[2],i=l[3];else if(t&&"object"==typeof t){if(l=t,t=null!=l.x?l.x:l.longitude,e=null!=l.y?l.y:l.latitude,s=l.z,i=l.m,(o=l.spatialReference)&&"esri.geometry.SpatialReference"!==o.declaredClass&&(o=new u(o)),null!=l.longitude||null!=l.latitude)if(null==l.longitude)r.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==l.latitude)r.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!l.declaredClass&&o?.isWebMercator){const r=y(l.longitude,l.latitude,w);t=r[0],e=r[1]}}else x(s)?(o=s,s=null):x(i)&&(o=i,i=null);const a={x:t,y:e};return null==a.x&&null!=a.y?r.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&r.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=o&&(a.spatialReference=o),null!=s&&(a.z=s),null!=i&&(a.m=i),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){return c(this)}set latitude(t){const{spatialReference:e,x:r}=this;null!=t&&e&&(e.isWebMercator?this._set("y",y(r,t,w)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){return h(this)}set longitude(t){const{y:e,spatialReference:r}=this;null!=t&&r&&(r.isWebMercator?this._set("x",y(t,e,w)[0]):r.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,r){e[r]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new g;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return g.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:r,z:s,m:i,spatialReference:o}=this,{z:l,m:a}=t;let{x:n,y:p,spatialReference:u}=t;if(!o.equals(u))if(o.isWebMercator&&u.isWGS84)[n,p]=y(n,p),u=o;else{if(!o.isWGS84||!u.isWebMercator)return!1;[n,p]=f(n,p),u=o}return e===n&&r===p&&s===l&&i===a&&o.wkid===u.wkid}offset(t,e,r){return this.x+=t,this.y+=e,null!=r&&(this.z=(this.z??0)+r),this}normalize(){if(!this.spatialReference)return this;const t=m(this.spatialReference);if(!t)return this;let e=this.x;const[r,s]=t.valid,i=2*s;let o;return e>s?(o=Math.ceil(Math.abs(e-s)/i),e-=o*i):e<r&&(o=Math.ceil(Math.abs(e-r)/i),e+=o*i),this._set("x",e),this}distance(t){return d(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};t([s({readOnly:!0})],_.prototype,"cache",null),t([s({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],_.prototype,"hasM",null),t([s({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],_.prototype,"hasZ",null),t([s({type:Number})],_.prototype,"latitude",null),t([s({type:Number})],_.prototype,"longitude",null),t([s({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),i(t=>isNaN(t)?t:n(t))],_.prototype,"x",void 0),t([a("x")],_.prototype,"writeX",null),t([o("x")],_.prototype,"readX",null),t([s({type:Number,json:{write:!0}})],_.prototype,"y",void 0),t([s({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],_.prototype,"z",void 0),t([s({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],_.prototype,"m",void 0),_=g=t([l("esri.geometry.Point")],_),_.prototype.toJSON.isDefaultToJSON=!0;
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../core/Accessor.js";import r from"../core/Logger.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import{cast as i}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as o}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../core/accessorSupport/decorators/writer.js";import{ensureNumber as n}from"../core/accessorSupport/ensureType.js";import p from"./Geometry.js";import u from"./SpatialReference.js";import{getLatitude as c,getLongitude as h,distance as d}from"./support/pointUtils.js";import{getInfo as m}from"./support/spatialReferenceUtils.js";import{lngLatToXY as y,xyToLngLat as f}from"./support/webMercatorUtils.js";var g;const w=[0,0];function x(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let _=g=class extends p{static copy(t,r){r._set("x",t._get("x")),r._set("y",t._get("y")),r._set("z",t._get("z")),r._set("m",t._get("m"));const s=t._get("spatialReference");r._set("spatialReference",e.isFrozen(s)?s:s.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,s,i,o){let l;if(Array.isArray(t))l=t,o=e,t=l[0],e=l[1],s=l[2],i=l[3];else if(t&&"object"==typeof t){if(l=t,t=null!=l.x?l.x:l.longitude,e=null!=l.y?l.y:l.latitude,s=l.z,i=l.m,(o=l.spatialReference)&&"esri.geometry.SpatialReference"!==o.declaredClass&&(o=new u(o)),null!=l.longitude||null!=l.latitude)if(null==l.longitude)r.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==l.latitude)r.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!l.declaredClass&&o?.isWebMercator){const r=y(l.longitude,l.latitude,w);t=r[0],e=r[1]}}else x(s)?(o=s,s=null):x(i)&&(o=i,i=null);const a={x:t,y:e};return null==a.x&&null!=a.y?r.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&r.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=o&&(a.spatialReference=o),null!=s&&(a.z=s),null!=i&&(a.m=i),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){return c(this)}set latitude(t){const{spatialReference:e,x:r}=this;null!=t&&e&&(e.isWebMercator?this._set("y",y(r,t,w)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){return h(this)}set longitude(t){const{y:e,spatialReference:r}=this;null!=t&&r&&(r.isWebMercator?this._set("x",y(t,e,w)[0]):r.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,r){e[r]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new g;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return g.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:r,z:s,m:i,spatialReference:o}=this,{z:l,m:a}=t;let{x:n,y:p,spatialReference:u}=t;if(!o.equals(u))if(o.isWebMercator&&u.isWGS84)[n,p]=y(n,p),u=o;else{if(!o.isWGS84||!u.isWebMercator)return!1;[n,p]=f(n,p),u=o}return e===n&&r===p&&s===l&&i===a&&o.wkid===u.wkid}offset(t,e,r){return this.x+=t,this.y+=e,null!=r&&(this.z=(this.z??0)+r),this}normalize(){if(!this.spatialReference)return this;const t=m(this.spatialReference);if(!t)return this;let e=this.x;const[r,s]=t.valid,i=2*s;let o;return e>s?(o=Math.ceil(Math.abs(e-s)/i),e-=o*i):e<r&&(o=Math.ceil(Math.abs(e-r)/i),e+=o*i),this._set("x",e),this}distance(t){return d(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};t([s({readOnly:!0})],_.prototype,"cache",null),t([s({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],_.prototype,"hasM",null),t([s({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],_.prototype,"hasZ",null),t([s({type:Number})],_.prototype,"latitude",null),t([s({type:Number})],_.prototype,"longitude",null),t([s({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),i(t=>isNaN(t)?t:n(t))],_.prototype,"x",void 0),t([a("x")],_.prototype,"writeX",null),t([o("x")],_.prototype,"readX",null),t([s({type:Number,json:{write:!0}})],_.prototype,"y",void 0),t([s({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],_.prototype,"z",void 0),t([s({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],_.prototype,"m",void 0),_=g=t([l("esri.geometry.Point")],_),_.prototype.toJSON.isDefaultToJSON=!0;export{_ 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{JSONSupport as r}from"../core/JSONSupport.js";import{clone as i}from"../core/lang.js";import{getMetersPerUnitForSR as s,getUnitString as o}from"../core/unitUtils.js";import{Integer as n}from"../core/accessorSupport/ensureType.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../core/accessorSupport/decorators/writer.js";import{isWGS84 as u,isWebMercator as c,isGeographic as d,isWrappable as m,wgs84 as w,webMercator as h,equals as y,plateCarree as k}from"./support/spatialReferenceUtils.js";var S;let f=class extends r{static{S=this}static{this.GCS_NAD_1927=null}static{this.WGS84=null}static{this.WebMercator=null}static{this.PlateCarree=null}static fromJSON(t){if(!t)return null;if(102100===t?.wkid)return S.WebMercator;if(4326===t?.wkid)return S.WGS84;const e=new S;return e.read(t),e}constructor(t){super(t),this.latestWkid=null,this.wkid=null,this.wkt=null,this.wkt2=null,this.vcsWkid=null,this.latestVcsWkid=null,this.imageCoordinateSystem=null}normalizeCtorArgs(t){if(t&&"object"==typeof t)return t;const e="string"==typeof t?"wkt":"wkid";return{[e]:t}}get isWGS84(){return u(this)}get isWebMercator(){return c(this)}get isGeographic(){return d(this)}get isWrappable(){return m(this)}get metersPerUnit(){return s(this)}get unit(){return o(this)||(this.isGeographic?"degrees":null)}writeWkt(t,e){this.wkid||(e.wkt=t)}clone(){if(this===S.WGS84)return new S(w);if(this===S.WebMercator)return new S(h);const t=new S;return null!=this.wkid?(t.wkid=this.wkid,null!=this.latestWkid&&(t.latestWkid=this.latestWkid),null!=this.vcsWkid&&(t.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(t.latestVcsWkid=this.latestVcsWkid)):(null!=this.wkt&&(t.wkt=this.wkt),null!=this.wkt2&&(t.wkt2=this.wkt2)),this.imageCoordinateSystem&&(t.imageCoordinateSystem=i(this.imageCoordinateSystem)),t}equals(t){if(null==t)return!1;if(this.imageCoordinateSystem||t.imageCoordinateSystem){if(null==this.imageCoordinateSystem||null==t.imageCoordinateSystem)return!1;const{id:e,referenceServiceName:r}=t.imageCoordinateSystem,{geodataXform:i}=t.imageCoordinateSystem,s=this.imageCoordinateSystem;return null==e||i?JSON.stringify(s)===JSON.stringify(t.imageCoordinateSystem):r?s.id===e&&s.referenceServiceName===r:s.id===e}return y(this,t)}toJSON(t){return this.write(void 0,t)}};t([l({readOnly:!0})],f.prototype,"isWGS84",null),t([l({readOnly:!0})],f.prototype,"isWebMercator",null),t([l({readOnly:!0})],f.prototype,"isGeographic",null),t([l({readOnly:!0})],f.prototype,"isWrappable",null),t([l({type:n,json:{write:!0}})],f.prototype,"latestWkid",void 0),t([l({readOnly:!0})],f.prototype,"metersPerUnit",null),t([l({readOnly:!0})],f.prototype,"unit",null),t([l({type:n,json:{write:!0,origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkt}}}}}}})],f.prototype,"wkid",void 0),t([l({type:String,json:{origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkid}}}}}}})],f.prototype,"wkt",void 0),t([p("wkt"),p("web-scene","wkt")],f.prototype,"writeWkt",null),t([l({type:String,json:{write:!1}})],f.prototype,"wkt2",void 0),t([l({type:n,json:{write:!0}})],f.prototype,"vcsWkid",void 0),t([l({type:n,json:{write:!0}})],f.prototype,"latestVcsWkid",void 0),t([l()],f.prototype,"imageCoordinateSystem",void 0),f=S=t([a("esri.geometry.SpatialReference")],f)
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../core/Accessor.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{clone as i}from"../core/lang.js";import{getMetersPerUnitForSR as s,getUnitString as o}from"../core/unitUtils.js";import{Integer as n}from"../core/accessorSupport/ensureType.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../core/accessorSupport/decorators/writer.js";import{isWGS84 as u,isWebMercator as c,isGeographic as d,isWrappable as m,wgs84 as w,webMercator as h,equals as y,plateCarree as k}from"./support/spatialReferenceUtils.js";var S;let f=class extends r{static{S=this}static{this.GCS_NAD_1927=null}static{this.WGS84=null}static{this.WebMercator=null}static{this.PlateCarree=null}static fromJSON(t){if(!t)return null;if(102100===t?.wkid)return S.WebMercator;if(4326===t?.wkid)return S.WGS84;const e=new S;return e.read(t),e}constructor(t){super(t),this.latestWkid=null,this.wkid=null,this.wkt=null,this.wkt2=null,this.vcsWkid=null,this.latestVcsWkid=null,this.imageCoordinateSystem=null}normalizeCtorArgs(t){if(t&&"object"==typeof t)return t;const e="string"==typeof t?"wkt":"wkid";return{[e]:t}}get isWGS84(){return u(this)}get isWebMercator(){return c(this)}get isGeographic(){return d(this)}get isWrappable(){return m(this)}get metersPerUnit(){return s(this)}get unit(){return o(this)||(this.isGeographic?"degrees":null)}writeWkt(t,e){this.wkid||(e.wkt=t)}clone(){if(this===S.WGS84)return new S(w);if(this===S.WebMercator)return new S(h);const t=new S;return null!=this.wkid?(t.wkid=this.wkid,null!=this.latestWkid&&(t.latestWkid=this.latestWkid),null!=this.vcsWkid&&(t.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(t.latestVcsWkid=this.latestVcsWkid)):(null!=this.wkt&&(t.wkt=this.wkt),null!=this.wkt2&&(t.wkt2=this.wkt2)),this.imageCoordinateSystem&&(t.imageCoordinateSystem=i(this.imageCoordinateSystem)),t}equals(t){if(null==t)return!1;if(this.imageCoordinateSystem||t.imageCoordinateSystem){if(null==this.imageCoordinateSystem||null==t.imageCoordinateSystem)return!1;const{id:e,referenceServiceName:r}=t.imageCoordinateSystem,{geodataXform:i}=t.imageCoordinateSystem,s=this.imageCoordinateSystem;return null==e||i?JSON.stringify(s)===JSON.stringify(t.imageCoordinateSystem):r?s.id===e&&s.referenceServiceName===r:s.id===e}return y(this,t)}toJSON(t){return this.write(void 0,t)}};t([l({readOnly:!0})],f.prototype,"isWGS84",null),t([l({readOnly:!0})],f.prototype,"isWebMercator",null),t([l({readOnly:!0})],f.prototype,"isGeographic",null),t([l({readOnly:!0})],f.prototype,"isWrappable",null),t([l({type:n,json:{write:!0}})],f.prototype,"latestWkid",void 0),t([l({readOnly:!0})],f.prototype,"metersPerUnit",null),t([l({readOnly:!0})],f.prototype,"unit",null),t([l({type:n,json:{write:!0,origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkt}}}}}}})],f.prototype,"wkid",void 0),t([l({type:String,json:{origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkid}}}}}}})],f.prototype,"wkt",void 0),t([p("wkt"),p("web-scene","wkt")],f.prototype,"writeWkt",null),t([l({type:String,json:{write:!1}})],f.prototype,"wkt2",void 0),t([l({type:n,json:{write:!0}})],f.prototype,"vcsWkid",void 0),t([l({type:n,json:{write:!0}})],f.prototype,"latestVcsWkid",void 0),t([l()],f.prototype,"imageCoordinateSystem",void 0),f=S=t([a("esri.geometry.SpatialReference")],f),f.prototype.toJSON.isDefaultToJSON=!0,f.GCS_NAD_1927=e.freeze(new f({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'})),f.WGS84=e.freeze(new f(w)),f.WebMercator=e.freeze(new f(h)),f.PlateCarree=e.freeze(new f(k));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{mars as n,moon as t,earth as e}from"./support/Ellipsoid.js";import{equals as r,isValid as i,isWKIDFromMars as c,isWKIDFromMoon as o}from"./support/spatialReferenceUtils.js";function S(n){return{wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${n.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`}}const T=S(e),G=S(n),I=S(t),p={wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${e.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`},s=G.wkt.toUpperCase(),u=I.wkt.toUpperCase();function E(r){if(null!=r&&i(r)){const e=r.wkid,i=r.wkt2??r.wkt;if(c(e))return n;const S=i?.toUpperCase();if(i&&S===s)return n;if(o(e)||S&&S===u)return t}return e}const R=Math.cos(Math.PI/16/16);function A(r){return c(r)?n:o(r)?t:e}function O(n){return r(n,T)}function U(n){return O(n)||r(n,G)||r(n,I)}export{T as SphericalECEFSpatialReferenceLike,G as SphericalPCPFMarsLike,I as SphericalPCPFMoonLike,p as WGS84ECEFSpatialReferenceLike,E as getReferenceEllipsoid,A as getReferenceEllipsoidFromWKID,O as isSphericalECEF,U as isSphericalPCPF,R as radiusModifier};
|