@arcgis/core 6.0.0-next.6 → 6.0.0-next.8
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/arcade/functions/knowledgegraph.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{f09c9d9a554c33a753b4.js → 02253bdffbd580af22d8.js} +1 -1
- package/assets/esri/core/workers/chunks/06ab24a083c3229228dd.js +1 -0
- package/assets/esri/core/workers/chunks/09a63cc1987f8636c5b0.js +1 -0
- package/assets/esri/core/workers/chunks/{8ba32d3a0df4a206ef1c.js → 15cc2c295682f48030f9.js} +1 -1
- package/assets/esri/core/workers/chunks/17b76e0d401c7e396d10.js +1 -0
- package/assets/esri/core/workers/chunks/{c18189710d6198516175.js → 19b9d393046a780e6c3f.js} +1 -1
- package/assets/esri/core/workers/chunks/1b35ec54968fbeec17ce.js +1 -0
- package/assets/esri/core/workers/chunks/1c0c5cb13c2590aae906.js +1 -0
- package/assets/esri/core/workers/chunks/1e0d2715d603f48a7e0b.js +1 -0
- package/assets/esri/core/workers/chunks/{83589144eeeb08f45557.js → 2aeb5cc32284dd3e4d22.js} +1 -1
- package/assets/esri/core/workers/chunks/{9a7fc93cc693fd12b5d8.js → 2b6c74646ff475a6e302.js} +1 -1
- package/assets/esri/core/workers/chunks/2d9a1f23ec6ce90723ac.js +1 -0
- package/assets/esri/core/workers/chunks/340621182db9e8edbec2.js +1 -0
- package/assets/esri/core/workers/chunks/{71f739bb3f7350704af6.js → 384ae10053d35940de73.js} +1 -1
- package/assets/esri/core/workers/chunks/3b3e519f15ed52c83f0c.js +1 -0
- package/assets/esri/core/workers/chunks/{72019baeba520edb6bb0.js → 3b737dae6efed627406e.js} +1 -1
- package/assets/esri/core/workers/chunks/3c0ed15b544df6fb0903.js +1 -0
- package/assets/esri/core/workers/chunks/3ffda5bf0b91700dc308.js +1 -0
- package/assets/esri/core/workers/chunks/{1317ecdfd0cfa683a493.js → 42323093827adffe56d3.js} +1 -1
- package/assets/esri/core/workers/chunks/451d7d456df0f4466563.js +1 -0
- package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +1 -0
- package/assets/esri/core/workers/chunks/4e544de61f07ca660236.js +1 -0
- package/assets/esri/core/workers/chunks/{67ac6b326bf80fc3d33d.js → 53be85d04cd2da4f391d.js} +1 -1
- package/assets/esri/core/workers/chunks/54778dec1598818d93cb.js +1 -0
- package/assets/esri/core/workers/chunks/{06e7400f5ebe0719b81c.js → 5a5d80c2519aa3ea8878.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb4ff0ac2bc445fec413.js → 5b434e8c98e7119d4a3b.js} +1 -1
- package/assets/esri/core/workers/chunks/606ea251075fe81a1206.js +1 -0
- package/assets/esri/core/workers/chunks/{3ac9dcbb0571a2580236.js → 62c8c9ad09e0166207fd.js} +1 -1
- package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +1 -0
- package/assets/esri/core/workers/chunks/{ac4cc49104d26c384e98.js → 658b2642ab6880770e4e.js} +1 -1
- package/assets/esri/core/workers/chunks/68be3fb88ca61f82fb90.js +1 -0
- package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +1 -0
- package/assets/esri/core/workers/chunks/6ebe73f69ae822053b70.js +1 -0
- package/assets/esri/core/workers/chunks/6ef647b7769d27529f9c.js +1 -0
- package/assets/esri/core/workers/chunks/709e019885822b1f6f3e.js +1 -0
- package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +1 -0
- package/assets/esri/core/workers/chunks/{cbe6c0f32608cb504695.js → 776ae25a34352d3468bc.js} +1 -1
- package/assets/esri/core/workers/chunks/8730e7e6e0296f43f10b.js +1 -0
- package/assets/esri/core/workers/chunks/8bea0d706ede6f84f8aa.js +1 -0
- package/assets/esri/core/workers/chunks/900181f68449d8f82eeb.js +1 -0
- package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +1 -0
- package/assets/esri/core/workers/chunks/{1ef39aef6b33c530cbe4.js → 966d0832a3c1f03668a0.js} +1 -1
- package/assets/esri/core/workers/chunks/9a28a66807a1e3557018.js +1 -0
- package/assets/esri/core/workers/chunks/{2f9033890c465acff698.js → 9bf48a907f91ea004648.js} +1 -1
- package/assets/esri/core/workers/chunks/9c7fa9d324fa0bf64d9c.js +1 -0
- package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +1 -0
- package/assets/esri/core/workers/chunks/{1ba1f705b6ce5c8ea702.js → a655ebdb4bf0660615a2.js} +1 -1
- package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +1 -0
- package/assets/esri/core/workers/chunks/af349c7bc8ef41a0e1bd.js +1 -0
- package/assets/esri/core/workers/chunks/{250d3be6d3849d71fed8.js → c29c474c4b1049352d3e.js} +1 -1
- package/assets/esri/core/workers/chunks/c8ba0673d1b87216e619.js +1 -0
- package/assets/esri/core/workers/chunks/{4d3f97a48046021713a6.js → ceb112fe7aef354f8051.js} +1 -1
- package/assets/esri/core/workers/chunks/d6ad4390df576198e45b.js +1 -0
- package/assets/esri/core/workers/chunks/ddf0671976648f621269.js +1 -0
- package/assets/esri/core/workers/chunks/ded8b64a46992c3ae693.js +1 -0
- package/assets/esri/core/workers/chunks/{0b36abcbf03037b4073d.js → e1af43e2a8f2ef1059e3.js} +1 -1
- package/assets/esri/core/workers/chunks/eaf6d587477399a83088.js +1 -0
- package/assets/esri/core/workers/chunks/ecaac39dde7ec4213264.js +1 -0
- package/assets/esri/core/workers/chunks/f122c18af10e56f9ec2b.js +1 -0
- package/assets/esri/core/workers/chunks/f31b424a3667686af10c.js +1 -0
- package/assets/esri/core/workers/chunks/{711cfb84659cb4437679.js → f528ac5c648ca6a98582.js} +1 -1
- package/assets/esri/core/workers/chunks/f92364afaefbac7e8f77.js +1 -0
- package/assets/esri/core/workers/chunks/fb444954be74c1962ced.js +1 -0
- package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +1 -0
- package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +1 -1
- package/assets/esri/themes/base/widgets/_Features.scss +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +5 -9
- package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +2 -4
- package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +4 -2
- package/chunks/GlobalIlluminationBlur.glsl.js +3 -5
- package/chunks/GlobalIlluminationUpscale.glsl.js +1 -1
- package/config.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/form/elements/inputs/DynamicChoiceInput.d.ts +35 -5
- package/geometry/projectionUtils.js +1 -1
- package/geometry/support/scaleUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/ParquetLayer.d.ts +3 -2
- package/layers/ParquetLayer.js +1 -1
- package/layers/graphics/data/FeatureStore.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/geometryUtils.js +1 -1
- package/layers/graphics/data/projectionSupport.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
- package/layers/mixins/ScaleRangeLayer.js +1 -1
- package/layers/mixins/SublayersOwner.js +1 -1
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/package.json +2 -2
- package/popup/FeaturesModel.d.ts +26 -5
- package/popup/FeaturesModel.js +1 -1
- package/rest/support/printTaskUtils.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/types.d.ts +3 -1
- package/views/3d/environment/Environment.d.ts +2 -2
- package/views/3d/environment/Environment.js +1 -1
- package/views/3d/environment/EnvironmentView.js +2 -0
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
- package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +1 -1
- package/views/3d/support/elevationUpdateUtils.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/Draw.d.ts +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/interactive/options/SnappingOptions.d.ts +1 -0
- package/views/interactive/options/TooltipOptions.d.ts +1 -0
- package/views/interactive/options/ViewOptions.d.ts +1 -0
- package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
- package/views/interactive/support/Units.d.ts +1 -0
- package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
- package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/layers/LineOfSightLayerView.d.ts +3 -4
- package/views/layers/ViewshedLayerView.d.ts +5 -6
- package/views/support/layerViewUtils.js +1 -1
- package/views/support/projectionUtils.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor.d.ts +10 -0
- package/widgets/Expand.js +1 -1
- package/widgets/FeatureForm.d.ts +2 -2
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesDrillIn.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
- package/widgets/Sketch.d.ts +1 -1
- package/widgets/Track/TrackViewModel.d.ts +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
- package/widgets/UtilityNetworkTrace/types.d.ts +2 -2
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/widgets/support/PluginSettingsControls.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/widgets/support/componentsUtils.js +1 -1
- package/assets/esri/core/workers/chunks/00a600c71ceebe7bfeee.js +0 -1
- package/assets/esri/core/workers/chunks/00d24415bdeb0adae3df.js +0 -1
- package/assets/esri/core/workers/chunks/0193df3f9fb23633da87.js +0 -1
- package/assets/esri/core/workers/chunks/02d4f91652a79d2b637e.js +0 -1
- package/assets/esri/core/workers/chunks/07aa6d36f1006b6ab7ff.js +0 -1
- package/assets/esri/core/workers/chunks/107b025dc5b09465a78f.js +0 -1
- package/assets/esri/core/workers/chunks/1f43e06dcfe56229bb0f.js +0 -1
- package/assets/esri/core/workers/chunks/25d6c674b1c4829f040f.js +0 -1
- package/assets/esri/core/workers/chunks/25e6013e2c095629b236.js +0 -1
- package/assets/esri/core/workers/chunks/2a570ce6b99dac6ee996.js +0 -1
- package/assets/esri/core/workers/chunks/2c90f7a6432cd716db8b.js +0 -1
- package/assets/esri/core/workers/chunks/2e6a2f4d686b71249c0e.js +0 -1
- package/assets/esri/core/workers/chunks/303fde8f3459dde16555.js +0 -1
- package/assets/esri/core/workers/chunks/350540770781b281c39a.js +0 -1
- package/assets/esri/core/workers/chunks/3880d2c7fb14955d7f93.js +0 -1
- package/assets/esri/core/workers/chunks/3b017b718ea2d4ed498f.js +0 -1
- package/assets/esri/core/workers/chunks/43fc42405167a5537039.js +0 -1
- package/assets/esri/core/workers/chunks/4d82db661365daa513a6.js +0 -1
- package/assets/esri/core/workers/chunks/56851011276de0b3e318.js +0 -1
- package/assets/esri/core/workers/chunks/5f3ab77a79c408423fde.js +0 -1
- package/assets/esri/core/workers/chunks/633a9051580c5302d2f7.js +0 -1
- package/assets/esri/core/workers/chunks/6469c0d18d3663e7da4b.js +0 -1
- package/assets/esri/core/workers/chunks/65654e481cce9ae40e54.js +0 -1
- package/assets/esri/core/workers/chunks/669e39c3437d7273f0c7.js +0 -1
- package/assets/esri/core/workers/chunks/798a63653f82c0e842c5.js +0 -1
- package/assets/esri/core/workers/chunks/84fcbf7a1d04f01685d1.js +0 -1
- package/assets/esri/core/workers/chunks/8b54589f173259c1ba55.js +0 -1
- package/assets/esri/core/workers/chunks/8e511079918e2fd9261f.js +0 -1
- package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +0 -1
- package/assets/esri/core/workers/chunks/9673a9efec86040b8c13.js +0 -1
- package/assets/esri/core/workers/chunks/a010d2e4e34eb7bc1fec.js +0 -1
- package/assets/esri/core/workers/chunks/b05a41a60e30935644be.js +0 -1
- package/assets/esri/core/workers/chunks/bff767ec5bb4c0d6b324.js +0 -1
- package/assets/esri/core/workers/chunks/c906f984b2b6e7578c06.js +0 -1
- package/assets/esri/core/workers/chunks/d21257d2e2a37266c0f7.js +0 -1
- package/assets/esri/core/workers/chunks/d270cc9807161033686e.js +0 -1
- package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +0 -1
- package/assets/esri/core/workers/chunks/e5943f3a4bbc12c06c4d.js +0 -1
- package/assets/esri/core/workers/chunks/ec9a2425b4a498054a19.js +0 -1
- package/assets/esri/core/workers/chunks/f0a68d2900d24f56afa0.js +0 -1
- package/assets/esri/core/workers/chunks/f0aaa646b17ffdbdcefa.js +0 -1
- package/assets/esri/core/workers/chunks/f46a0d7cf588ba1b4157.js +0 -1
- package/assets/esri/core/workers/chunks/f762f70e7d39634ce797.js +0 -1
- package/assets/esri/core/workers/chunks/fccbb902fe08448f91de.js +0 -1
- package/assets/esri/core/workers/chunks/fd0254c6fc6c03ec11ba.js +0 -1
- package/views/3d/environment/EnvironmentManager.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"attachments":{"addFile":"Add file","attachmentNumberedLabel":"Attachment {index}","attach":"Attach","attachmentEditingDisabled":"Attachment editing is disabled.","attachmentLimitExceeded":"Attachment limit exceeded","attachmentLimitReached":"Attachment limit reached","attachmentMustBeShorterThan":"Attachment must be shorter than {maxDuration}","attachmentsMustBeShorterThan":"Attachments must be shorter than {maxDuration}","attachmentMustBeSmallerThan":"Attachment must be smaller than {maxSize}","attachmentsMustBeSmallerThan":"Attachments must be smaller than {maxSize}","durationInSecond":"{count} second","durationInSeconds":"{count} seconds","capture":"Capture","captureMethodNotSupported":"Capture method is not supported","captureUnsupportedAdd":"Capture is not supported on this device.","captureUnsupportedDetail":"Capture is not supported on this device.","chooseFile":"Choose file","count":"Count: {count}","deleted":"Deleted","download":"Download","dragAndDropFile":"Drag and drop file.","fileExceedsMaximumSize":"File exceeds the maximum size","fileName":"File name","fileSelected":"File selected","fileToBeReplaced":"File to be replaced","imageResizedToMeetRequirements":"Image has been resized to meet requirements","maximumAudioLength":"Max audio length: {maxDuration}","maximumFileSize":"Maximum file size: {maxSize}","maximumNumberOfFiles":"Maximum number of files: {count}","maximumVideoLength":"Max video length: {maxDuration}","maximize":"Maximize","maximumNumberReachedRemoveToContinue":"Maximum number reached. Remove attachments to continue.","maxAttachmentsShort":"Max: {count}","maxAttachments":"Maximum attachments: {count}","minimumNotMet":"Minimum attachment requirement not met","minimumNumberOfFiles":"Minimum number of files: {count}","minAttachmentsShort":"Min: {count}","minAttachments":"Minimum attachments: {count}","noAttachments":"No attachments","noPreviewAvailable":"No preview available","remove":"Remove","replace":"Replace","recordAudio":"Record audio","takePhoto":"Take photo","takeVideo":"Take video","searchAttachments":"Search attachments","replaceFile":"Replace file","selectFile":"Select file","size":"Size","type":"Type","unableToAddAttachment":"Unable to add attachment","unableToAddAttachments":"Unable to add attachments","unsupportedDevice":"Unsupported device","unsupportedDeviceCaptureMessage":"This device does not support the required capture method.","viewAll":"View all","youCanAddUpToOneAttachment":"You can add up to 1 attachment","youCanAddUpToAttachments":"You can add up to {count} attachments"},"addFeature":"Add feature","addRecord":"Add record","unsupportedDomainGroupTitle":"Unsupported values","differentValues":"Different values","differentValuesPlaceholder":"(Different values)","empty":"No value","noDynamicChoices":"No choices are available","noDynamicChoicesWithNoValue":"No other choices are available","otherOptionLabel":"Other","expressionEvaluationFailed":"Form failed to run calculations","failedToCalculateValues":"Failed to calculate values","footerButtons":{"add":"Add","delete":"Delete","discard":"Discard","done":"Done","replace":"Replace","reset":"Reset","update":"Update"},"footerNotices":{"deleteDisabledMinimumAttachments":"Delete disabled. This feature requires a minimum number of attachments."},"formFailedToLoad":"Form failed to load.","formFailedToLoadTooManyComplexFeatures":"This form uses functions that limit attribute editing to {num} features.","formFailedToLoadTooManyFeatures":"Select up to {num} features to edit attributes.","noVisibleFields":{"allElementsHidden":"The selected features have no fields to display","elementsHiddenInSome":"The selected features have shared fields that are not displayed because of visibility expressions","noElements":"The selected feature has no fields to display","noElementsInCommon":"The selected features have no shared fields"},"other":"Other","recommended":"Recommended","relatedRecords":{"noOriginKeyFeature":"A feature cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noOriginKeyRecord":"A record cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noRecordsFound":"No records were found.","noRelatedRecordsFound":"No related records were found.","relatedRecordsTitle":"Related records","untitledLayer":"Untitled layer"},"requiredFieldBatchMode":"This field is required for one or more features.","requiredFieldLabel":"{name} - required field","deselectAllLabel":"Deselect all","selectAllLabel":"Select all","showAll":"Show all","showAllOptions":"Show all options","titles":{"addAttachments":"Add attachments","attachments":"Attachments","editFeature":"Edit feature","editFeatures":"Edit features","editAttachment":"Edit attachment","replaceAttachment":"Replace attachment"},"totalCount":"Total: {count}","unsupported":"Unsupported","unsupportedContingentValues":"Editing attributes for multiple features is not available for layers with contingent values.","validationErrors":{"cannotBeNull":"Field is required.","invalidCodedValue":"Value should be one of the listed values.","invalidType":"Not a valid value","invalidBatchFormType":"One or more features contain invalid values. Check individual features.","featuresInError":"One or more features have errors. Check individual features.","featuresWithInvalidValues":"One or more features have invalid values","nonVisibleError_changeValues":"The selected feature has hidden fields with invalid values. Change the values so that fields are visible.","nonVisibleError_checkIndividualFeatures":"One or more features have hidden fields with invalid values. Check individual features and correct the issues.","outsideRange":"Value should be between {min} and {max}","outsideRangeMax":"Value should be less than or equal to {max}","outsideRangeMin":"Value should be greater than or equal to {min}","tooFewSelectedChoices":"
|
|
1
|
+
{"attachments":{"addFile":"Add file","attachmentNumberedLabel":"Attachment {index}","attach":"Attach","attachmentEditingDisabled":"Attachment editing is disabled.","attachmentLimitExceeded":"Attachment limit exceeded","attachmentLimitReached":"Attachment limit reached","attachmentMustBeShorterThan":"Attachment must be shorter than {maxDuration}","attachmentsMustBeShorterThan":"Attachments must be shorter than {maxDuration}","attachmentMustBeSmallerThan":"Attachment must be smaller than {maxSize}","attachmentsMustBeSmallerThan":"Attachments must be smaller than {maxSize}","durationInSecond":"{count} second","durationInSeconds":"{count} seconds","capture":"Capture","captureMethodNotSupported":"Capture method is not supported","captureUnsupportedAdd":"Capture is not supported on this device.","captureUnsupportedDetail":"Capture is not supported on this device.","chooseFile":"Choose file","count":"Count: {count}","deleted":"Deleted","download":"Download","dragAndDropFile":"Drag and drop file.","fileExceedsMaximumSize":"File exceeds the maximum size","fileName":"File name","fileSelected":"File selected","fileToBeReplaced":"File to be replaced","imageResizedToMeetRequirements":"Image has been resized to meet requirements","maximumAudioLength":"Max audio length: {maxDuration}","maximumFileSize":"Maximum file size: {maxSize}","maximumNumberOfFiles":"Maximum number of files: {count}","maximumVideoLength":"Max video length: {maxDuration}","maximize":"Maximize","maximumNumberReachedRemoveToContinue":"Maximum number reached. Remove attachments to continue.","maxAttachmentsShort":"Max: {count}","maxAttachments":"Maximum attachments: {count}","minimumNotMet":"Minimum attachment requirement not met","minimumNumberOfFiles":"Minimum number of files: {count}","minAttachmentsShort":"Min: {count}","minAttachments":"Minimum attachments: {count}","noAttachments":"No attachments","noPreviewAvailable":"No preview available","remove":"Remove","replace":"Replace","recordAudio":"Record audio","takePhoto":"Take photo","takeVideo":"Take video","searchAttachments":"Search attachments","replaceFile":"Replace file","selectFile":"Select file","size":"Size","type":"Type","unableToAddAttachment":"Unable to add attachment","unableToAddAttachments":"Unable to add attachments","unsupportedDevice":"Unsupported device","unsupportedDeviceCaptureMessage":"This device does not support the required capture method.","viewAll":"View all","youCanAddUpToOneAttachment":"You can add up to 1 attachment","youCanAddUpToAttachments":"You can add up to {count} attachments"},"addFeature":"Add feature","addRecord":"Add record","unsupportedDomainGroupTitle":"Unsupported values","differentValues":"Different values","differentValuesPlaceholder":"(Different values)","empty":"No value","noDynamicChoices":"No choices are available","noDynamicChoicesWithNoValue":"No other choices are available","otherOptionLabel":"Other","expressionEvaluationFailed":"Form failed to run calculations","failedToCalculateValues":"Failed to calculate values","footerButtons":{"add":"Add","delete":"Delete","discard":"Discard","done":"Done","replace":"Replace","reset":"Reset","update":"Update"},"footerNotices":{"deleteDisabledMinimumAttachments":"Delete disabled. This feature requires a minimum number of attachments."},"formFailedToLoad":"Form failed to load.","formFailedToLoadTooManyComplexFeatures":"This form uses functions that limit attribute editing to {num} features.","formFailedToLoadTooManyFeatures":"Select up to {num} features to edit attributes.","noVisibleFields":{"allElementsHidden":"The selected features have no fields to display","elementsHiddenInSome":"The selected features have shared fields that are not displayed because of visibility expressions","noElements":"The selected feature has no fields to display","noElementsInCommon":"The selected features have no shared fields"},"other":"Other","recommended":"Recommended","relatedRecords":{"noOriginKeyFeature":"A feature cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noOriginKeyRecord":"A record cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noRecordsFound":"No records were found.","noRelatedRecordsFound":"No related records were found.","relatedRecordsTitle":"Related records","untitledLayer":"Untitled layer"},"requiredFieldBatchMode":"This field is required for one or more features.","requiredFieldLabel":"{name} - required field","deselectAllLabel":"Deselect all","selectAllLabel":"Select all","showAll":"Show all","showAllOptions":"Show all options","titles":{"addAttachments":"Add attachments","attachments":"Attachments","editFeature":"Edit feature","editFeatures":"Edit features","editAttachment":"Edit attachment","replaceAttachment":"Replace attachment"},"totalCount":"Total: {count}","unsupported":"Unsupported","unsupportedContingentValues":"Editing attributes for multiple features is not available for layers with contingent values.","validationErrors":{"cannotBeNull":"Field is required.","invalidCodedValue":"Value should be one of the listed values.","invalidType":"Not a valid value","invalidBatchFormType":"One or more features contain invalid values. Check individual features.","featuresInError":"One or more features have errors. Check individual features.","featuresWithInvalidValues":"One or more features have invalid values","nonVisibleError_changeValues":"The selected feature has hidden fields with invalid values. Change the values so that fields are visible.","nonVisibleError_checkIndividualFeatures":"One or more features have hidden fields with invalid values. Check individual features and correct the issues.","outsideRange":"Value should be between {min} and {max}","outsideRangeMax":"Value should be less than or equal to {max}","outsideRangeMin":"Value should be greater than or equal to {min}","tooFewSelectedChoices":"Minimum selections required: {min}","tooManySelectedChoices":"Maximum selections allowed: {max}","tooShort":"This field requires a minimum of {min} characters","valuesIncompatible":"Value is incompatible with other selected values"},"valueExpressionError":"Failed to calculate value","viewAll":"View all","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."}}
|
|
@@ -237,12 +237,14 @@ return value * 2.0 - 1.0;
|
|
|
237
237
|
fragGlobalIllumination.rgb = vec3(0.0);
|
|
238
238
|
`)}
|
|
239
239
|
|
|
240
|
-
// Tone-map accumulated
|
|
240
|
+
// Tone-map only the accumulated RGB lighting, not alpha (inverse occlusion).
|
|
241
241
|
fragGlobalIllumination.rgb = tonemapKhronosNeutral(fragGlobalIllumination.rgb);
|
|
242
|
-
fragGlobalIllumination.rgb = quantizeGlobalIlluminationColor(fragGlobalIllumination.rgb);
|
|
243
242
|
|
|
244
243
|
// Accumulate occlusion
|
|
245
244
|
fragGlobalIllumination.a = mix(lastFrameGlobalIllumination.a + accumulationDither, fragGlobalIllumination.a, occlusionBlendWeight);
|
|
246
245
|
|
|
246
|
+
// Quantize all channels after temporal blending and dithering for consistent RGBA8 storage.
|
|
247
|
+
fragGlobalIllumination = quantizeGlobalIlluminationColor(fragGlobalIllumination);
|
|
248
|
+
|
|
247
249
|
fragWeight = vec2(occlusionBlendWeight, colorBlendWeight * storedColorBlendWeightScale);
|
|
248
250
|
`),x}const M=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:A,build:j,defaultColorBleedWeight:0,defaultEmissionBoostFactor:x,defaultFactorDaylightDirectional:C,defaultRayMarchMaxReach:E,defaultRayMarchMaxReachEmissionWeight:1,defaultRayMarchMaxSteps:16,defaultRayMarchMinReach:T,defaultRayMarchMinReachEmissionWeight:1,defaultRayMarchWorldReach:25},Symbol.toStringTag,{value:`Module`}));export{A as G,M as a,k as b,j as c,E as d,S as e,x as f,C as g,O as h,T as i,D as j,w as k};
|
|
@@ -55,10 +55,7 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
55
55
|
bool shouldReuseCenterOcclusion = isScaledGlobalIllumination && centerOcclusionBlendWeight <= ${c.float(g)};
|
|
56
56
|
bool shouldSkipLowQualityBlur = !hasEmission && shouldReuseCenterOcclusion;
|
|
57
57
|
if (shouldSkipLowQualityBlur) {
|
|
58
|
-
fragColor =
|
|
59
|
-
quantizeGlobalIlluminationColor(centerGlobalIllumination.rgb),
|
|
60
|
-
centerGlobalIllumination.a
|
|
61
|
-
);
|
|
58
|
+
fragColor = quantizeGlobalIlluminationColor(centerGlobalIllumination);
|
|
62
59
|
return;
|
|
63
60
|
}
|
|
64
61
|
|
|
@@ -100,5 +97,6 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
100
97
|
float dither = ditherNoise(vec4(blurredEmission, occlusion)) - ${c.float(30517578125e-15)};
|
|
101
98
|
blurredEmission += isScaledGlobalIllumination ? ${c.float(.85)} * dither : dither;
|
|
102
99
|
|
|
103
|
-
|
|
100
|
+
// Quantize both filtered lighting and inverse occlusion before RGBA8 storage.
|
|
101
|
+
fragColor = quantizeGlobalIlluminationColor(vec4(blurredEmission, occlusion));
|
|
104
102
|
`),e}const v=new p;v.useFloatBlend=!1;const y=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:g,build:_},Symbol.toStringTag,{value:`Module`}));export{g as G,y as a,_ as b};
|
|
@@ -79,4 +79,4 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
79
79
|
) / jointBilateralWeightSum;
|
|
80
80
|
}
|
|
81
81
|
`),l.outputs.add(`fragColor`,`vec4`,0),l.outputs.add(`fragWeight`,`vec2`,1),f.main.add(a`sampleJointBilateralUpscale(uv, fragColor, fragWeight);
|
|
82
|
-
fragColor
|
|
82
|
+
fragColor = quantizeGlobalIlluminationColor(fragColor);`),l}const m=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationUpscaleDrawParameters:f,build:p},Symbol.toStringTag,{value:`Module`}));export{f as G,m as a,p as b};
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={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}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@6.0.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={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}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@6.0.0-next.7/assets`,t.defaultAssetsPath=t.assetsPath);export{t as default};
|
package/core/colorUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../Color.js";import{colorGamma as t,invColorGamma as n}from"../colorUtils.js";import{shuffle as r,getRandomNumberGenerator as i}from"./arrayUtils.js";import{clone as a}from"./lang.js";import{clamp as o}from"./mathUtils.js";import{equals as s}from"./libs/gl-matrix-2/math/vec4.js";import{fromValues as c}from"./libs/gl-matrix-2/factories/vec4f64.js";function l(e){return`r`in e&&`g`in e&&`b`in e}function u(e){return`h`in e&&`s`in e&&`v`in e}function d(e){return`l`in e&&`a`in e&&`b`in e}function f(e){return`l`in e&&`c`in e&&`h`in e}function p(e){return`x`in e&&`y`in e&&`z`in e}const m=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],h=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function g(e,t){let n=[],r,i;if(e[0].length!==t.length)throw Error(`dimensions do not match`);let a=e.length,o=e[0].length,s=0;for(r=0;r<a;r++){for(s=0,i=0;i<o;i++)s+=e[r][i]*t[i];n.push(s)}return n}function _(e){let t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),n=g(m,t);return{x:n[0]*100,y:n[1]*100,z:n[2]*100}}function v(e){let t=g(h,[e.x/100,e.y/100,e.z/100]).map(e=>{let t=e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(t[0]*255),g:Math.round(t[1]*255),b:Math.round(t[2]*255)}}function y(e){let t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function b(e){let t=e.l,n=e.a,r=e.b,i=[(t+16)/116+n/500,(t+16)/116,(t+16)/116-r/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:i[0]*95.047,y:i[1]*100,z:i[2]*108.883}}function x(e){let t=e.l,n=e.a,r=e.b,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a=a>0?a:a+2*Math.PI,{l:t,c:i,h:a}}function S(e){let t=e.l,n=e.c,r=e.h;return{l:t,a:n*Math.cos(r),b:n*Math.sin(r)}}function C(e){return y(_(e))}function w(e){return v(b(e))}function T(e){return x(y(_(e)))}function E(e){return v(b(S(e)))}function D(e){let{r:t,g:n,b:r}=e,i=Math.max(t,n,r),a=i-Math.min(t,n,r),o=i,s=a===0?0:i===t?(n-r)/a%6:i===n?(r-t)/a+2:(t-n)/a+4,c=a===0?0:a/o;return s<0&&(s+=6),s*=60,c*=100,o*=100/255,{h:s,s:c,v:o}}function O(e){let t=(e.h+360)%360/60,n=e.s/100,r=e.v/100*255,i=r*n,a=i*(1-Math.abs(t%2-1)),o;switch(Math.floor(t)){case 0:o={r:i,g:a,b:0};break;case 1:o={r:a,g:i,b:0};break;case 2:o={r:0,g:i,b:a};break;case 3:o={r:0,g:a,b:i};break;case 4:o={r:a,g:0,b:i};break;case 5:case 6:o={r:i,g:0,b:a};break;default:o={r:0,g:0,b:0}}return o.r=Math.round(o.r+r-i),o.g=Math.round(o.g+r-i),o.b=Math.round(o.b+r-i),o}function k(e){return l(e)?e:f(e)?E(e):d(e)?w(e):p(e)?v(e):u(e)?O(e):e}function A(e){return u(e)?e:D(k(e))}function j(e){return d(e)?e:C(k(e))}function M(e){return f(e)?e:T(k(e))}function N(e){return P(e).isBright?`light`:`dark`}function P(t){let{r:n,g:r,b:i,a}=t;return a<1&&(n=Math.round(a*n+(1-a)*255),r=Math.round(a*r+(1-a)*255),i=Math.round(a*i+(1-a)*255)),new e({r:n,g:r,b:i})}function F(e,t){let{r:n,g:r,b:i}=t?.ignoreAlpha?e:P(e);return .2126*n+.7152*r+.0722*i}function I(t,n=225){return F(t,{ignoreAlpha:!0})>n?new e([0,0,0,t.a]):new e([255,255,255,t.a])}function L(e,t){let n=j(e);n.l*=1-t;let r=k(n),i=e.clone();return i.setColor(r),i.a=e.a,i}function R(e,t){let n=e.clone();return n.a*=t,n}function z(e,t){let n=A(e);n.s*=t;let r=k(n),i=e.clone();return i.setColor(r),i.a=e.a,i}function B(e,t){return e===t||e!=null&&e.equals(t)}function V(e,t){return e===t||e!=null&&t!=null&&s(e,t)}function H(e){return c(e[0],e[1],e[2],e.length>3?e[3]:1)}function U(e){return e[0]??=0,e[1]??=0,e[2]??=0,e}function W(e){return e.length=4,U(e),e[3]??=1,o(e[3],0,1),e}function G(e,t){let n=e.toUnitRGBA();return n[3]*=t,n}function K(t,n,i={}){if(t.length===0||n<=0)return[];if(t=t.map(t=>typeof t==`string`?new e(t):t),t.length===1||n===1){let e=[],r=t[0];for(let t=0;t<n;t++)e.push(r.clone());return e}if(i.shuffle&&(t=r(a(t),i.seed)),t.length>=n){let e=[],r=(t.length-1)/(n-1);for(let i=0;i<n;i++){let n=Math.round(i*r);e.push(t[n].clone())}return e}return Z(t,n,i)}function q(t,n){let r=new e(t);if(!n?.strength||n.source!==`color`)return r;let[i,a,o]=r.toUnitRGB(),s=X(i,a,o),c=J(s.r+s.r*n.strength,s.g+s.g*n.strength,s.b+s.b*n.strength,r.a),l=J(
|
|
2
|
+
import e from"../Color.js";import{colorGamma as t,invColorGamma as n}from"../colorUtils.js";import{shuffle as r,getRandomNumberGenerator as i}from"./arrayUtils.js";import{clone as a}from"./lang.js";import{clamp as o}from"./mathUtils.js";import{equals as s}from"./libs/gl-matrix-2/math/vec4.js";import{fromValues as c}from"./libs/gl-matrix-2/factories/vec4f64.js";function l(e){return`r`in e&&`g`in e&&`b`in e}function u(e){return`h`in e&&`s`in e&&`v`in e}function d(e){return`l`in e&&`a`in e&&`b`in e}function f(e){return`l`in e&&`c`in e&&`h`in e}function p(e){return`x`in e&&`y`in e&&`z`in e}const m=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],h=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function g(e,t){let n=[],r,i;if(e[0].length!==t.length)throw Error(`dimensions do not match`);let a=e.length,o=e[0].length,s=0;for(r=0;r<a;r++){for(s=0,i=0;i<o;i++)s+=e[r][i]*t[i];n.push(s)}return n}function _(e){let t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),n=g(m,t);return{x:n[0]*100,y:n[1]*100,z:n[2]*100}}function v(e){let t=g(h,[e.x/100,e.y/100,e.z/100]).map(e=>{let t=e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(t[0]*255),g:Math.round(t[1]*255),b:Math.round(t[2]*255)}}function y(e){let t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function b(e){let t=e.l,n=e.a,r=e.b,i=[(t+16)/116+n/500,(t+16)/116,(t+16)/116-r/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:i[0]*95.047,y:i[1]*100,z:i[2]*108.883}}function x(e){let t=e.l,n=e.a,r=e.b,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a=a>0?a:a+2*Math.PI,{l:t,c:i,h:a}}function S(e){let t=e.l,n=e.c,r=e.h;return{l:t,a:n*Math.cos(r),b:n*Math.sin(r)}}function C(e){return y(_(e))}function w(e){return v(b(e))}function T(e){return x(y(_(e)))}function E(e){return v(b(S(e)))}function D(e){let{r:t,g:n,b:r}=e,i=Math.max(t,n,r),a=i-Math.min(t,n,r),o=i,s=a===0?0:i===t?(n-r)/a%6:i===n?(r-t)/a+2:(t-n)/a+4,c=a===0?0:a/o;return s<0&&(s+=6),s*=60,c*=100,o*=100/255,{h:s,s:c,v:o}}function O(e){let t=(e.h+360)%360/60,n=e.s/100,r=e.v/100*255,i=r*n,a=i*(1-Math.abs(t%2-1)),o;switch(Math.floor(t)){case 0:o={r:i,g:a,b:0};break;case 1:o={r:a,g:i,b:0};break;case 2:o={r:0,g:i,b:a};break;case 3:o={r:0,g:a,b:i};break;case 4:o={r:a,g:0,b:i};break;case 5:case 6:o={r:i,g:0,b:a};break;default:o={r:0,g:0,b:0}}return o.r=Math.round(o.r+r-i),o.g=Math.round(o.g+r-i),o.b=Math.round(o.b+r-i),o}function k(e){return l(e)?e:f(e)?E(e):d(e)?w(e):p(e)?v(e):u(e)?O(e):e}function A(e){return u(e)?e:D(k(e))}function j(e){return d(e)?e:C(k(e))}function M(e){return f(e)?e:T(k(e))}function N(e){return P(e).isBright?`light`:`dark`}function P(t){let{r:n,g:r,b:i,a}=t;return a<1&&(n=Math.round(a*n+(1-a)*255),r=Math.round(a*r+(1-a)*255),i=Math.round(a*i+(1-a)*255)),new e({r:n,g:r,b:i})}function F(e,t){let{r:n,g:r,b:i}=t?.ignoreAlpha?e:P(e);return .2126*n+.7152*r+.0722*i}function I(t,n=225){return F(t,{ignoreAlpha:!0})>n?new e([0,0,0,t.a]):new e([255,255,255,t.a])}function L(e,t){let n=j(e);n.l*=1-t;let r=k(n),i=e.clone();return i.setColor(r),i.a=e.a,i}function R(e,t){let n=e.clone();return n.a*=t,n}function z(e,t){let n=A(e);n.s*=t;let r=k(n),i=e.clone();return i.setColor(r),i.a=e.a,i}function B(e,t){return e===t||e!=null&&e.equals(t)}function V(e,t){return e===t||e!=null&&t!=null&&s(e,t)}function H(e){return c(e[0],e[1],e[2],e.length>3?e[3]:1)}function U(e){return e[0]??=0,e[1]??=0,e[2]??=0,e}function W(e){return e.length=4,U(e),e[3]??=1,o(e[3],0,1),e}function G(e,t){let n=e.toUnitRGBA();return n[3]*=t,n}function K(t,n,i={}){if(t.length===0||n<=0)return[];if(t=t.map(t=>typeof t==`string`?new e(t):t),t.length===1||n===1){let e=[],r=t[0];for(let t=0;t<n;t++)e.push(r.clone());return e}if(i.shuffle&&(t=r(a(t),i.seed)),t.length>=n){let e=[],r=(t.length-1)/(n-1);for(let i=0;i<n;i++){let n=Math.round(i*r);e.push(t[n].clone())}return e}return Z(t,n,i)}function q(t,n){let r=new e(t);if(!n?.strength||n.source!==`color`)return r;let[i,a,o]=r.toUnitRGB(),s=X(i,a,o),c=J(s.r+s.r*n.strength,s.g+s.g*n.strength,s.b+s.b*n.strength,r.a),l=J(s.r,s.g,s.b,r.a),[u,d,f]=c.toUnitRGB(),[p,m,h]=l.toUnitRGB(),g=Y(s.r+u-p,s.g+d-m,s.b+f-h);return new e([g.r*255,g.g*255,g.b*255,r.a])}function J(t,n,r,i){let a=.76,o=Math.max(t,Math.max(n,r));if(o<a)return new e([t*255,n*255,r*255,i]);let s=.24,c=1-s*s/(o+s-a),l=c/o,u=1-1/(.15*(o-c)+1),d=new e([t*l*255,n*l*255,r*l*255,i]),f=new e([c*255,c*255,c*255,i]);return e.blendColors(d,f,u)}function Y(e,t,r){return{r:e**n,g:t**n,b:r**n}}function X(e,n,r){return{r:e**t,g:n**t,b:r**t}}function Z(e,t,n={}){let i=[],a=e.length-1,o=Math.ceil((t-e.length)/a);outerLoop:for(let r=0;r<a;r++){let a=e[r],s=e[r+1];for(let r=1;r<=o;r++){let c=r/(o+1);if(i.push($(a,s,c,n)),i.length+e.length===t)break outerLoop}}return[...e.map(e=>e.clone()),...r(i,n.seed??1)]}const Q=(e,t)=>{let n=Math.floor(t()*10)-5;return Math.min(255,Math.max(0,e+n))};function $(t,n,r,a={}){let o=t.r,s=t.g,c=t.b,l=n.r,u=n.g,d=n.b,f=Math.round(o+(l-o)*r),p=Math.round(s+(u-s)*r),m=Math.round(c+(d-c)*r);if(!a.offset)return new e([f,p,m]);let h=i(a.seed);return new e([Q(f,h),Q(p,h),Q(m,h)])}export{B as colorEquals,V as colorVectorEquals,H as colorVectorToColorAndOpacity,K as createUniqueColors,L as darken,z as desaturate,F as getColorLuminance,N as getColorTheme,q as getColorWithEmissiveStrength,I as getContrast,l as isRGB,R as multiplyOpacity,G as multiplyOpacityToUnitRGBA,A as toHSV,j as toLAB,M as toLCH,k as toRGB,U as validateColor,W as validateColorAndOpacity};
|
package/core/has.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
const e=globalThis,t={...e.esriConfig?.has};function has(n){return typeof t[n]==`function`?t[n]=t[n](e):t[n]}has.add=(e,n,r,i)=>{(i||t[e]===void 0)&&(t[e]=n),r&&has(e)},has.cache=t,has.add(`big-integer-warning-enabled`,!0),has.add(`esri-deprecation-warnings`,!0),has.add(`esri-tests-disable-screenshots`,!1),has.add(`esri-tests-use-full-window`,!1),has.add(`esri-tests-post-to-influx`,!0),has.add(`esri-cim-animations-enable-status`,`enabled`),has.add(`esri-cim-animations-spotlight`,!1),has.add(`esri-cim-animations-freeze-time`,!1),(()=>{has.add(`host-webworker`,e.WorkerGlobalScope!==void 0&&self instanceof e.WorkerGlobalScope);let t=typeof window<`u`&&typeof location<`u`&&typeof document<`u`&&window.location===location&&window.document===document;if(has.add(`host-browser`,t),has.add(`host-node`,!!(typeof e.process==`object`&&e.process.versions?.node&&e.process.versions.v8)),has.add(`dom`,t),has(`host-browser`)){let e=navigator,t=e.userAgent,n=e.appVersion,r=parseFloat(n);if(has.add(`wp`,parseFloat(t.split(`Windows Phone`)[1])||void 0),has.add(`msapp`,parseFloat(t.split(`MSAppHost/`)[1])||void 0),has.add(`khtml`,n.includes(`Konqueror`)?r:void 0),has.add(`edge`,parseFloat(t.split(`Edge/`)[1])||void 0),has.add(`opr`,parseFloat(t.split(`OPR/`)[1])||void 0),has.add(`webkit`,!has(`wp`)&&!has(`edge`)&&parseFloat(t.split(`WebKit/`)[1])||void 0),has.add(`chrome`,!has(`edge`)&&!has(`opr`)&&parseFloat(t.split(`Chrome/`)[1])||void 0),has.add(`android`,!has(`wp`)&&parseFloat(t.split(`Android `)[1])||void 0),has.add(`safari`,n.includes(`Safari`)&&!has(`wp`)&&!has(`chrome`)&&!has(`android`)&&!has(`edge`)&&!has(`opr`)?parseFloat(n.split(`Version/`)[1]):void 0),has.add(`mac`,n.includes(`Macintosh`)),!has(`wp`)&&/(iPhone|iPod|iPad)/.test(t)){let e=RegExp.$1.replace(/P/,`p`),n=/OS ([\d_]+)/.test(t)?RegExp.$1:`1`,r=parseFloat(n.replace(/_/,`.`).replaceAll(`_`,``));has.add(e,r),has.add(`ios`,r)}has(`webkit`)||(t.includes(`Gecko`)&&!has(`wp`)&&!has(`khtml`)&&!has(`edge`)&&has.add(`mozilla`,r),has(`mozilla`)&&has.add(`ff`,parseFloat(t.split(`Firefox/`)[1]||t.split(`Minefield/`)[1])||void 0))}})(),(()=>{if(e.navigator){let e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),n=/iPhone/i.test(e);t&&has.add(`esri-mobile`,t),n&&has.add(`esri-iPhone`,n),has.add(`esri-geolocation`,!!navigator.geolocation)}has.add(`esri-wasm`,`WebAssembly`in e),has.add(`esri-temporal`,`Temporal`in e),has.add(`esri-performance-mode-frames-between-render`,20),has.add(`esri-force-performance-mode`,!1),has.add(`esri-shared-array-buffer`,()=>{let t=`SharedArrayBuffer`in e,n=e.crossOriginIsolated===!1;return t&&!n}),has.add(`wasm-simd`,()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))),has.add(`esri-atomics`,`Atomics`in e),has.add(`esri-workers`,`Worker`in e),has.add(`web-feat:cache`,`caches`in e),has.add(`esri-workers-arraybuffer-transfer`,!has(`safari`)||Number(has(`safari`))>=12),has.add(`min-workers-pool-size`,2),has.add(`max-workers-pool-size`,has(`esri-mobile`)?3:8),has.add(`featurelayer-simplify-thresholds`,[.5,.5,.5,.5]),has.add(`featurelayer-simplify-payload-size-factors`,[1,1,4]),has.add(`featurelayer-animation-enabled`,!0),has.add(`featurelayer-hybrid-tile-enabled`,!0),has.add(`featurelayer-snapshot-enabled`,!0),has.add(`featurelayer-snapshot-initial-tolerance`,0),has.add(`featurelayer-snapshot-point-min-threshold`,8e4),has.add(`featurelayer-snapshot-point-max-threshold`,4e5),has.add(`featurelayer-snapshot-multipoint-min-threshold`,2e4),has.add(`featurelayer-snapshot-multipoint-max-threshold`,1e5),has.add(`featurelayer-snapshot-polygon-min-threshold`,2e3),has.add(`featurelayer-snapshot-polygon-max-threshold`,2e3),has.add(`featurelayer-snapshot-polyline-min-threshold`,2e3),has.add(`featurelayer-snapshot-polyline-max-threshold`,2e3),has.add(`featurelayer-snapshot-max-vertex-count`,25e4),has.add(`featurelayer-snapshot-non-hosted-exceedslimit-enabled`,!0),has.add(`featurelayer-snapshot-concurrency`,4),has.add(`featurelayer-snapshot-allow-editable`,!1),has.add(`featurelayer-snapshot-coverage`,.1),has.add(`featurelayer-pixel-buffering-enabled`,!0),has.add(`featurelayer-query-max-depth`,4),has.add(`featurelayer-query-max-page-size`,8e3),has.add(`featurelayer-query-pausing-enabled`,!1),has.add(`featurelayer-query-tile-concurrency`,4),has.add(`featurelayer-query-tile-max-features`,6e5),has.add(`featurelayer-advanced-symbols`,!1),has.add(`featurelayer-pbf`,!0),has.add(`featurelayer-pbf-statistics`,!1),has.add(`featurelayer-pbf-true-curves`,!0),has.add(`feature-layers-workers`,!0),has.add(`feature-polyline-generalization-factor`,1),has.add(`featurelayer-relative-time-queries-enabled`,!0),has.add(`featurelayer-relative-time-queries-bin-window-public`,1),has.add(`featurelayer-relative-time-queries-bin-window-private`,60),has.add(`parquetlayer-full-query-feature-count`,5e5),has.add(`parquetlayer-persistence-enabled`,!0),has.add(`parquetlayer-cache-enabled`,!0),has.add(`parquetlayer-legacy-field-overrides-enabled`,!1),has.add(`sketch-layer-enabled`,!1),has.add(`mapview-transitions-duration`,200),has.add(`mapview-essential-goto-duration`,200),has.add(`mapview-srswitch-adjust-rotation-scale-threshold`,24e6),has.add(`mapserver-pbf-version-support`,10.81),has.add(`mapservice-popup-identify-max-tolerance`,20),has.add(`request-queue-concurrency-global`,64),has.add(`request-queue-concurrency-hosted`,16),has.add(`request-queue-concurrency-non-hosted`,16),has.add(`curve-densification-coarse-segments`,128),has.add(`curve-densification-max-segments`,2e3),has.add(`curve-densification-min-segments`,3),has.add(`curve-densification-pixel-deviation`,.5),has.add(`view-readyState-waiting-delay`,1e3),has.add(`gradient-depth-bias`,.01),has.add(`gradient-depth-epsilon`,1e-8),has.add(`enable-feature:esri-compress-textures`,!0),has.add(`enable-feature:im-shading`,!0),has.add(`enable-feature:im-vertex-normals`,!0),!has(`host-webworker`)&&has(`host-browser`)&&(has.add(`esri-csp-restrictions`,()=>{try{Function()}catch{return!0}return!1}),has.add(`esri-url-encodes-apostrophe`,()=>{let e=window.document.createElement(`a`);return e.href=`?'`,e.href.includes(`?%27`)}))})();export{has as default};
|
|
2
|
+
const e=globalThis,t={...e.esriConfig?.has};function has(n){return typeof t[n]==`function`?t[n]=t[n](e):t[n]}has.add=(e,n,r,i)=>{(i||t[e]===void 0)&&(t[e]=n),r&&has(e)},has.cache=t,has.add(`big-integer-warning-enabled`,!0),has.add(`esri-deprecation-warnings`,!0),has.add(`esri-tests-disable-screenshots`,!1),has.add(`esri-tests-use-full-window`,!1),has.add(`esri-tests-post-to-influx`,!0),has.add(`esri-cim-animations-enable-status`,`enabled`),has.add(`esri-cim-animations-spotlight`,!1),has.add(`esri-cim-animations-freeze-time`,!1),(()=>{has.add(`host-webworker`,e.WorkerGlobalScope!==void 0&&self instanceof e.WorkerGlobalScope);let t=typeof window<`u`&&typeof location<`u`&&typeof document<`u`&&window.location===location&&window.document===document;if(has.add(`host-browser`,t),has.add(`host-node`,!!(typeof e.process==`object`&&e.process.versions?.node&&e.process.versions.v8)),has.add(`dom`,t),has(`host-browser`)){let e=navigator,t=e.userAgent,n=e.appVersion,r=parseFloat(n);if(has.add(`wp`,parseFloat(t.split(`Windows Phone`)[1])||void 0),has.add(`msapp`,parseFloat(t.split(`MSAppHost/`)[1])||void 0),has.add(`khtml`,n.includes(`Konqueror`)?r:void 0),has.add(`edge`,parseFloat(t.split(`Edge/`)[1])||void 0),has.add(`opr`,parseFloat(t.split(`OPR/`)[1])||void 0),has.add(`webkit`,!has(`wp`)&&!has(`edge`)&&parseFloat(t.split(`WebKit/`)[1])||void 0),has.add(`chrome`,!has(`edge`)&&!has(`opr`)&&parseFloat(t.split(`Chrome/`)[1])||void 0),has.add(`android`,!has(`wp`)&&parseFloat(t.split(`Android `)[1])||void 0),has.add(`safari`,n.includes(`Safari`)&&!has(`wp`)&&!has(`chrome`)&&!has(`android`)&&!has(`edge`)&&!has(`opr`)?parseFloat(n.split(`Version/`)[1]):void 0),has.add(`mac`,n.includes(`Macintosh`)),!has(`wp`)&&/(iPhone|iPod|iPad)/.test(t)){let e=RegExp.$1.replace(/P/,`p`),n=/OS ([\d_]+)/.test(t)?RegExp.$1:`1`,r=parseFloat(n.replace(/_/,`.`).replaceAll(`_`,``));has.add(e,r),has.add(`ios`,r)}has(`webkit`)||(t.includes(`Gecko`)&&!has(`wp`)&&!has(`khtml`)&&!has(`edge`)&&has.add(`mozilla`,r),has(`mozilla`)&&has.add(`ff`,parseFloat(t.split(`Firefox/`)[1]||t.split(`Minefield/`)[1])||void 0))}})(),(()=>{if(e.navigator){let e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),n=/iPhone/i.test(e);t&&has.add(`esri-mobile`,t),n&&has.add(`esri-iPhone`,n),has.add(`esri-geolocation`,!!navigator.geolocation)}has.add(`esri-wasm`,`WebAssembly`in e),has.add(`esri-temporal`,`Temporal`in e),has.add(`esri-performance-mode-frames-between-render`,20),has.add(`esri-force-performance-mode`,!1),has.add(`esri-shared-array-buffer`,()=>{let t=`SharedArrayBuffer`in e,n=e.crossOriginIsolated===!1;return t&&!n}),has.add(`wasm-simd`,()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))),has.add(`esri-atomics`,`Atomics`in e),has.add(`esri-workers`,`Worker`in e),has.add(`web-feat:cache`,`caches`in e),has.add(`esri-workers-arraybuffer-transfer`,!has(`safari`)||Number(has(`safari`))>=12),has.add(`min-workers-pool-size`,2),has.add(`max-workers-pool-size`,has(`esri-mobile`)?3:8),has.add(`featurelayer-simplify-thresholds`,[.5,.5,.5,.5]),has.add(`featurelayer-simplify-payload-size-factors`,[1,1,4]),has.add(`featurelayer-animation-enabled`,!0),has.add(`featurelayer-hybrid-tile-enabled`,!0),has.add(`featurelayer-snapshot-enabled`,!0),has.add(`featurelayer-snapshot-initial-tolerance`,0),has.add(`featurelayer-snapshot-point-min-threshold`,8e4),has.add(`featurelayer-snapshot-point-max-threshold`,4e5),has.add(`featurelayer-snapshot-multipoint-min-threshold`,2e4),has.add(`featurelayer-snapshot-multipoint-max-threshold`,1e5),has.add(`featurelayer-snapshot-polygon-min-threshold`,2e3),has.add(`featurelayer-snapshot-polygon-max-threshold`,2e3),has.add(`featurelayer-snapshot-polyline-min-threshold`,2e3),has.add(`featurelayer-snapshot-polyline-max-threshold`,2e3),has.add(`featurelayer-snapshot-max-vertex-count`,25e4),has.add(`featurelayer-snapshot-non-hosted-exceedslimit-enabled`,!0),has.add(`featurelayer-snapshot-concurrency`,4),has.add(`featurelayer-snapshot-allow-editable`,!1),has.add(`featurelayer-snapshot-coverage`,.1),has.add(`featurelayer-pixel-buffering-enabled`,!0),has.add(`featurelayer-query-max-depth`,4),has.add(`featurelayer-query-max-page-size`,8e3),has.add(`featurelayer-query-pausing-enabled`,!1),has.add(`featurelayer-query-tile-concurrency`,4),has.add(`featurelayer-query-tile-max-features`,6e5),has.add(`featurelayer-snapping-density-sample-interval`,10),has.add(`featurelayer-snapping-density-max-vertices-per-feature`,16),has.add(`featurelayer-snapping-density-max-distance`,8),has.add(`featurelayer-advanced-symbols`,!1),has.add(`featurelayer-pbf`,!0),has.add(`featurelayer-pbf-statistics`,!1),has.add(`featurelayer-pbf-true-curves`,!0),has.add(`feature-layers-workers`,!0),has.add(`feature-polyline-generalization-factor`,1),has.add(`featurelayer-relative-time-queries-enabled`,!0),has.add(`featurelayer-relative-time-queries-bin-window-public`,1),has.add(`featurelayer-relative-time-queries-bin-window-private`,60),has.add(`parquetlayer-full-query-feature-count`,5e5),has.add(`parquetlayer-persistence-enabled`,!0),has.add(`parquetlayer-cache-enabled`,!0),has.add(`parquetlayer-legacy-field-overrides-enabled`,!1),has.add(`sketch-layer-enabled`,!1),has.add(`mapview-transitions-duration`,200),has.add(`mapview-essential-goto-duration`,200),has.add(`mapview-srswitch-adjust-rotation-scale-threshold`,24e6),has.add(`mapserver-pbf-version-support`,10.81),has.add(`mapservice-popup-identify-max-tolerance`,20),has.add(`request-queue-concurrency-global`,64),has.add(`request-queue-concurrency-hosted`,16),has.add(`request-queue-concurrency-non-hosted`,16),has.add(`curve-densification-coarse-segments`,128),has.add(`curve-densification-max-segments`,2e3),has.add(`curve-densification-min-segments`,3),has.add(`curve-densification-pixel-deviation`,.5),has.add(`view-readyState-waiting-delay`,1e3),has.add(`gradient-depth-bias`,.01),has.add(`gradient-depth-epsilon`,1e-8),has.add(`enable-feature:esri-compress-textures`,!0),has.add(`enable-feature:im-shading`,!0),has.add(`enable-feature:im-vertex-normals`,!0),!has(`host-webworker`)&&has(`host-browser`)&&(has.add(`esri-csp-restrictions`,()=>{try{Function()}catch{return!0}return!1}),has.add(`esri-url-encodes-apostrophe`,()=>{let e=window.document.createElement(`a`);return e.href=`?'`,e.href.includes(`?%27`)}))})();export{has as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{getAssetUrl as e}from"../../assets.js";import t from"../../config.js";import{getLocale as n}from"../../intl.js";import{fullVersion as r}from"../../kernel.js";import has from"../has.js";import i from"../Logger.js";import{makeAbsolute as a}from"../urlUtils.js";import{loaderConfig as o}from"./loaderConfig.js";import{receiveMessage as s,MessageType as c}from"./utils.js";import l from"./WorkerFallback.js";const u=()=>i.getLogger(`esri.core.workers.workerFactory`),{HANDSHAKE:d}=c;let f,p;const m=`Failed to create Worker. Fallback to execute module in main thread`;async function h(){if(!has(`esri-workers`))return g(new l);if(!f&&!p)try{let e='"use strict";let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}self.invokeStaticMessage=(e,o,r)=>{const t=r&&r.signal,n=globalId++;let s=null;return new Promise((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}).finally(()=>{t&&t.removeEventListener("abort",s)})};let workerVersionChecked=!1;function checkWorkerVersion(e){if(!workerVersionChecked&&e.kernelInfo){workerVersionChecked=!0;const{fullVersion:o}=configuration.kernelInfo,{fullVersion:r,version:t}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==r&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://esriurl.com/using-local-assets.\\nModules version: ${o}\\nAssets version: ${r??t}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let t;function n(e){const o=t.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],e=>{t=e.default||e,checkWorkerVersion(t),t.loadWorker(o.modulePath).then(e=>e||new Promise(e=>{require([o.modulePath],e)})).then(n)}):"System"in self&&"function"==typeof System.import?System.import(workerPath).then(e=>(t=e.default,checkWorkerVersion(t),t.loadWorker(o.modulePath))).then(e=>e||System.import(o.modulePath)).then(n):esriConfig.workers.useDynamicImport?import(workerPath).then(e=>{t=e.default||e,checkWorkerVersion(t),t.loadWorker(o.modulePath).then(e=>e||import(o.modulePath)).then(n)}):(self.RemoteClient||importScripts(workerPath),t=self.RemoteClient.default||self.RemoteClient,checkWorkerVersion(t),t.loadWorker(o.modulePath).then(n));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split(`{CONFIGURATION}`).join(_());f=URL.createObjectURL(new Blob([e],{type:`text/javascript`}))}catch(e){p=e||{}}let e;if(!f)u().warn(m,p),e=new l;else try{e=new Worker(f,{name:`esri-worker-${v++}`})}catch{u().warn(m,p),e=new l}return g(e)}async function g(e){return new Promise(t=>{function n(i){let a=s(i);a&&a.type===d&&(e.removeEventListener(`message`,n),e.removeEventListener(`error`,r),t(e))}function r(t){t.preventDefault(),e.removeEventListener(`message`,n),e.removeEventListener(`error`,r),u().warn(`Failed to create Worker. Fallback to execute module in main thread`,t),e=new l,e.addEventListener(`message`,n),e.addEventListener(`error`,r)}e.addEventListener(`message`,n),e.addEventListener(`error`,r)})}function _(){let i;if(t.default!=null){let e={...t};delete e.default,i=JSON.parse(JSON.stringify(e))}else i=JSON.parse(JSON.stringify(t));i.assetsPath=a(i.assetsPath),i.defaultAssetsPath=i.defaultAssetsPath?a(i.defaultAssetsPath):void 0,i.request.interceptors=[],i.log.interceptors=[],i.locale=n(),i.has={"esri-csp-restrictions":has(`esri-csp-restrictions`),"esri-2d-debug":!1,"esri-2d-update-debug":has(`esri-2d-update-debug`),"esri-2d-annotation-dimension-debug":has(`esri-2d-annotation-dimension-debug`),"esri-2d-log-updating":!1,"esri-2d-complex-shaping":has(`esri-2d-complex-shaping`),"esri-2d-force-complex-shaping":has(`esri-2d-force-complex-shaping`),"esri-2d-stabilize-glyphs":has(`esri-2d-stabilize-glyphs`),"featurelayer-pbf":has(`featurelayer-pbf`),"featurelayer-simplify-thresholds":has(`featurelayer-simplify-thresholds`),"featurelayer-simplify-payload-size-factors":has(`featurelayer-simplify-payload-size-factors`),"featurelayer-simplify-mobile-factor":has(`featurelayer-simplify-mobile-factor`),"featurelayer-query-max-depth":has(`featurelayer-query-max-depth`),"featurelayer-query-max-page-size":has(`featurelayer-query-max-page-size`),"featurelayer-query-tile-max-features":has(`featurelayer-query-tile-max-features`),"featurelayer-query-tile-concurrency":has(`featurelayer-query-tile-concurrency`),"featurelayer-query-pausing-enabled":has(`featurelayer-query-pausing-enabled`),"featurelayer-snapshot-concurrency":has(`featurelayer-snapshot-concurrency`),"featurelayer-snapshot-enabled":has(`featurelayer-snapshot-enabled`),"featurelayer-pixel-buffering-enabled":has(`featurelayer-pixel-buffering-enabled`),"parquetlayer-full-query-feature-count":has(`parquetlayer-full-query-feature-count`),"parquetlayer-cache-enabled":has(`parquetlayer-cache-enabled`),"parquetlayer-legacy-field-overrides-enabled":has(`parquetlayer-legacy-field-overrides-enabled`),"esri-atomics":has(`esri-atomics`),"esri-shared-array-buffer":has(`esri-shared-array-buffer`),"esri-tiles-debug":has(`esri-tiles-debug`),"esri-workers-arraybuffer-transfer":has(`esri-workers-arraybuffer-transfer`),"feature-polyline-generalization-factor":has(`feature-polyline-generalization-factor`),"host-webworker":1},i.workers.loaderUrl&&(i.workers.loaderUrl=a(i.workers.loaderUrl)),i.workers.workerPath?i.workers.workerPath=a(i.workers.workerPath):i.workers.workerPath=a(e(`esri/core/workers/RemoteClient.js`)),i.workers.useDynamicImport=has(`esri-esbuild-build`);let s=t.workers.loaderConfig,c=o({baseUrl:s?.baseUrl,locale:n(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...s?.has},map:{...s?.map},paths:{...s?.paths},packages:s?.packages||[]});return JSON.stringify({esriConfig:i,loaderConfig:c,kernelInfo:{fullVersion:r}})}let v=0;export{h as createWorker};
|
|
2
|
+
import{getAssetUrl as e}from"../../assets.js";import t from"../../config.js";import{getLocale as n}from"../../intl.js";import{fullVersion as r}from"../../kernel.js";import has from"../has.js";import i from"../Logger.js";import{makeAbsolute as a}from"../urlUtils.js";import{loaderConfig as o}from"./loaderConfig.js";import{receiveMessage as s,MessageType as c}from"./utils.js";import l from"./WorkerFallback.js";const u=()=>i.getLogger(`esri.core.workers.workerFactory`),{HANDSHAKE:d}=c;let f,p;const m=`Failed to create Worker. Fallback to execute module in main thread`;async function h(){if(!has(`esri-workers`))return g(new l);if(!f&&!p)try{let e='"use strict";let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}self.invokeStaticMessage=(e,o,r)=>{const t=r&&r.signal,n=globalId++;let s=null;return new Promise((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}).finally(()=>{t&&t.removeEventListener("abort",s)})};let workerVersionChecked=!1;function checkWorkerVersion(e){if(!workerVersionChecked&&e.kernelInfo){workerVersionChecked=!0;const{fullVersion:o}=configuration.kernelInfo,{fullVersion:r,version:t}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==r&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://esriurl.com/using-local-assets.\\nModules version: ${o}\\nAssets version: ${r??t}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let t;function n(e){const o=t.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],e=>{t=e.default||e,checkWorkerVersion(t),t.loadWorker(o.modulePath).then(e=>e||new Promise(e=>{require([o.modulePath],e)})).then(n)}):"System"in self&&"function"==typeof System.import?System.import(workerPath).then(e=>(t=e.default,checkWorkerVersion(t),t.loadWorker(o.modulePath))).then(e=>e||System.import(o.modulePath)).then(n):esriConfig.workers.useDynamicImport?import(workerPath).then(e=>{t=e.default||e,checkWorkerVersion(t),t.loadWorker(o.modulePath).then(e=>e||import(o.modulePath)).then(n)}):(self.RemoteClient||importScripts(workerPath),t=self.RemoteClient.default||self.RemoteClient,checkWorkerVersion(t),t.loadWorker(o.modulePath).then(n));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split(`{CONFIGURATION}`).join(_());f=URL.createObjectURL(new Blob([e],{type:`text/javascript`}))}catch(e){p=e||{}}let e;if(!f)u().warn(m,p),e=new l;else try{e=new Worker(f,{name:`esri-worker-${v++}`})}catch{u().warn(m,p),e=new l}return g(e)}async function g(e){return new Promise(t=>{function n(i){let a=s(i);a&&a.type===d&&(e.removeEventListener(`message`,n),e.removeEventListener(`error`,r),t(e))}function r(t){t.preventDefault(),e.removeEventListener(`message`,n),e.removeEventListener(`error`,r),u().warn(`Failed to create Worker. Fallback to execute module in main thread`,t),e=new l,e.addEventListener(`message`,n),e.addEventListener(`error`,r)}e.addEventListener(`message`,n),e.addEventListener(`error`,r)})}function _(){let i;if(t.default!=null){let e={...t};delete e.default,i=JSON.parse(JSON.stringify(e))}else i=JSON.parse(JSON.stringify(t));i.assetsPath=a(i.assetsPath),i.defaultAssetsPath=i.defaultAssetsPath?a(i.defaultAssetsPath):void 0,i.request.interceptors=[],i.log.interceptors=[],i.locale=n(),i.has={"esri-csp-restrictions":has(`esri-csp-restrictions`),"esri-2d-debug":!1,"esri-2d-update-debug":has(`esri-2d-update-debug`),"esri-2d-annotation-dimension-debug":has(`esri-2d-annotation-dimension-debug`),"esri-2d-log-updating":!1,"esri-2d-complex-shaping":has(`esri-2d-complex-shaping`),"esri-2d-force-complex-shaping":has(`esri-2d-force-complex-shaping`),"esri-2d-stabilize-glyphs":has(`esri-2d-stabilize-glyphs`),"featurelayer-pbf":has(`featurelayer-pbf`),"featurelayer-snapping-density-sample-interval":has(`featurelayer-snapping-density-sample-interval`),"featurelayer-snapping-density-max-vertices-per-feature":has(`featurelayer-snapping-density-max-vertices-per-feature`),"featurelayer-snapping-density-max-distance":has(`featurelayer-snapping-density-max-distance`),"featurelayer-simplify-thresholds":has(`featurelayer-simplify-thresholds`),"featurelayer-simplify-payload-size-factors":has(`featurelayer-simplify-payload-size-factors`),"featurelayer-simplify-mobile-factor":has(`featurelayer-simplify-mobile-factor`),"featurelayer-query-max-depth":has(`featurelayer-query-max-depth`),"featurelayer-query-max-page-size":has(`featurelayer-query-max-page-size`),"featurelayer-query-tile-max-features":has(`featurelayer-query-tile-max-features`),"featurelayer-query-tile-concurrency":has(`featurelayer-query-tile-concurrency`),"featurelayer-query-pausing-enabled":has(`featurelayer-query-pausing-enabled`),"featurelayer-snapshot-concurrency":has(`featurelayer-snapshot-concurrency`),"featurelayer-snapshot-enabled":has(`featurelayer-snapshot-enabled`),"featurelayer-pixel-buffering-enabled":has(`featurelayer-pixel-buffering-enabled`),"parquetlayer-full-query-feature-count":has(`parquetlayer-full-query-feature-count`),"parquetlayer-cache-enabled":has(`parquetlayer-cache-enabled`),"parquetlayer-legacy-field-overrides-enabled":has(`parquetlayer-legacy-field-overrides-enabled`),"esri-atomics":has(`esri-atomics`),"esri-shared-array-buffer":has(`esri-shared-array-buffer`),"esri-tiles-debug":has(`esri-tiles-debug`),"esri-workers-arraybuffer-transfer":has(`esri-workers-arraybuffer-transfer`),"feature-polyline-generalization-factor":has(`feature-polyline-generalization-factor`),"host-webworker":1},i.workers.loaderUrl&&(i.workers.loaderUrl=a(i.workers.loaderUrl)),i.workers.workerPath?i.workers.workerPath=a(i.workers.workerPath):i.workers.workerPath=a(e(`esri/core/workers/RemoteClient.js`)),i.workers.useDynamicImport=has(`esri-esbuild-build`);let s=t.workers.loaderConfig,c=o({baseUrl:s?.baseUrl,locale:n(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...s?.has},map:{...s?.map},paths:{...s?.paths},packages:s?.packages||[]});return JSON.stringify({esriConfig:i,loaderConfig:c,kernelInfo:{fullVersion:r}})}let v=0;export{h as createWorker};
|
|
@@ -4,21 +4,51 @@ import type { SingleChoiceInputProperties } from "./SingleChoiceInput.js";
|
|
|
4
4
|
export interface DynamicChoiceInputProperties extends SingleChoiceInputProperties, Partial<Pick<DynamicChoiceInput, "choiceExpression">> {}
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The `DynamicChoiceInput` class defines the desired user interface for a dynamic choice group input.
|
|
7
|
+
* The `DynamicChoiceInput` class defines the desired user interface for a dynamic choice group input. It lets users select a field value from a list of choices generated by an [Arcade](https://developers.arcgis.com/arcade) expression, rather than a fixed list. It is supported in both single and batch feature editing. Use a [dynamic choice input](/references/core/form/elements/inputs/DynamicChoiceInput/) when the available options depend on the feature being edited, values entered in other fields, or data queried from another layer or table.
|
|
8
|
+
*
|
|
9
|
+
* This [FieldElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/#input) is used in [field elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) `formTemplate`. This is displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/).
|
|
10
|
+
*
|
|
11
|
+
* To configure a dynamic choice input, set its [choiceExpression](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/DynamicChoiceInput/#choiceExpression) to the name of an Arcade expression in the form template's [FormTemplate.expressionInfos](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/#expressionInfos). The expression returns a dictionary containing a `choices` array, where each choice has a `name` for its display text and a `code` for the value stored in the field.
|
|
8
12
|
*
|
|
9
13
|
* @since 5.2
|
|
10
14
|
* @see [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/)
|
|
11
15
|
* @example
|
|
12
16
|
* // Creates a new dynamic choice input for a field element within a form
|
|
13
17
|
* const dynamicChoiceInput = new DynamicChoiceInput({
|
|
14
|
-
* choiceExpression:
|
|
15
|
-
* noValueOptionLabel: "No Value",
|
|
16
|
-
* showNoValueOption:
|
|
18
|
+
* choiceExpression: dynamicChoiceExpression.name, // reference to the defined expression
|
|
19
|
+
* noValueOptionLabel: "No Value (null)",
|
|
20
|
+
* showNoValueOption: false,
|
|
17
21
|
* });
|
|
18
22
|
*/
|
|
19
23
|
export default class DynamicChoiceInput extends SingleChoiceInput {
|
|
20
24
|
constructor(properties?: DynamicChoiceInputProperties);
|
|
21
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* A reference to an [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression that returns a dictionary. The dictionary should have a `choices` array of objects, with each object in the array having a `name` property that is the text displayed to the user, and a `code` property that is the value assigned to the field when that choice is selected.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // Set the choice expression for the dynamic choice input
|
|
30
|
+
* fieldElement.input = new DynamicChoiceInput({
|
|
31
|
+
* choiceExpression: dynamicChoiceExpression.name
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* const dynamicChoiceExpression = new ExpressionInfo({
|
|
35
|
+
* name: "dynamic-material-choices",
|
|
36
|
+
* title: "Dynamic material choices",
|
|
37
|
+
* expression:
|
|
38
|
+
* `var choices = [
|
|
39
|
+
* { name: "Unknown", code: 0 },
|
|
40
|
+
* { name: "Cast Iron - CAS", code: 83 },
|
|
41
|
+
* { name: "Copper - COP", code: 84 },
|
|
42
|
+
* { name: "Ductile Iron - DIP", code: 88 },
|
|
43
|
+
* { name: "Polyvinyl Chloride - PVC", code: 94 },
|
|
44
|
+
* { name: "Lead - LP", code: 109 }
|
|
45
|
+
* ];
|
|
46
|
+
* return {
|
|
47
|
+
* choices: choices
|
|
48
|
+
* };`,
|
|
49
|
+
* returnType: "dictionary",
|
|
50
|
+
* });
|
|
51
|
+
*/
|
|
22
52
|
accessor choiceExpression: string | null | undefined;
|
|
23
53
|
/** The type of form element input. */
|
|
24
54
|
get type(): "dynamic-choice";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../core/Error.js";import{throwIfAborted as t,waitTick as n}from"../core/promiseUtils.js";import{trackAccess as r}from"../core/accessorSupport/tracking.js";import{SimpleObservable as i}from"../core/accessorSupport/tracking/SimpleObservable.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{assertNotMeshes as o,assertNotMesh as s}from"./asserts.js";import{isSphericalECEF as c,isSphericalPCPF as l}from"./ellipsoidUtils.js";import u from"./Extent.js";import d from"./Geometry.js";import f from"./Multipoint.js";import p from"./Point.js";import ee from"./Polygon.js";import
|
|
2
|
+
import e from"../core/Error.js";import{throwIfAborted as t,waitTick as n}from"../core/promiseUtils.js";import{trackAccess as r}from"../core/accessorSupport/tracking.js";import{SimpleObservable as i}from"../core/accessorSupport/tracking/SimpleObservable.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{assertNotMeshes as o,assertNotMesh as s}from"./asserts.js";import{isSphericalECEF as c,isSphericalPCPF as l}from"./ellipsoidUtils.js";import u from"./Extent.js";import d from"./Geometry.js";import f from"./Multipoint.js";import p from"./Point.js";import ee from"./Polygon.js";import te from"./Polyline.js";import m from"./SpatialReference.js";import{WGS84ECEFSpatialReference as h}from"./spatialReferenceEllipsoidUtils.js";import g from"./operators/support/GeographicTransformation.js";import{projectBuffer as _}from"./projection/projectBuffer.js";import{projectionUtilsState as v}from"./projection/projectionUtilsState.js";import{getProjector as ne}from"./projection/projectors.js";import{projectXYZToVector as y}from"./projection/projectXYZToVector.js";import{isPoint as b,isExtent as x,isPolygon as re,isPolyline as ie,isMultipoint as ae}from"./support/jsonTypeUtils.js";import{fromJSON as S}from"./support/jsonUtils.js";import{equals as C,isValid as w,isWGS84 as T,isWebMercator as E,isCGCS2000 as D}from"./support/spatialReferenceUtils.js";import{isEllipticArc as O,isCircularArc as k,isBezierCurve as A,getEndpoint as j}from"./support/curves/curveUtils.js";const M=new i;function N(){let{projectOperator:e,jsonProjectOperator:t,geographicTransformationUtils:n}=v;return!!(e?.projectIsLoaded()&&t?.projectIsLoaded()&&n?.isLoaded())}function P(){return N()?!0:(r(M),F(),!1)}function oe(e,t){return!e||!t||U(e,t)||P()}function se(e,t){return!U(e,t)&&!N()}async function F(e){v.loadPromise??(v.loadPromise=Promise.all([import(`./operators/projectOperator.js`).then(e=>(v.projectOperator=e,e.projectLoad())),import(`./operators/json/projectOperator.js`).then(e=>(v.jsonProjectOperator=e,e.projectLoad())),import(`./operators/support/geographicTransformationUtils.js`).then(e=>(v.geographicTransformationUtils=e,e.load()))])),await v.loadPromise,t(e),M.notify()}function I(e,t,n){return Array.isArray(e)?e.length===0?[]:(o(e),L(e,e[0].spatialReference,t,n)):(s(e),L([e],e.spatialReference,t,n)[0])}function L(e,t,n,r){if(t==null||n==null)return e.map(e=>S(e));if(U(t,n,r))return e.map(e=>W(e,t,n));if(r?.geographicTransformation==null&&c(t))return L(e.map(e=>W(e,t,m.WGS84)),m.WGS84,n,{zConversionDisabled:r?.zConversionDisabled});if(r?.geographicTransformation==null&&c(n))return L(e,t,m.WGS84).map(e=>W(e,m.WGS84,n));if(!N())throw new B;let{geographicTransformationUtils:i,defaultTransformations:a}=v;if(!r?.geographicTransformation){if(r?.extendedParams)r={...r,geographicTransformation:i.getTransformation(t,n,r.areaOfInterestExtent)||new g};else if(!r?.areaOfInterestExtent){let e=ce(t,n),o=a[e];o||(o=i.getTransformation(t,n)||new g,a[e]=o),r={geographicTransformation:o,zConversionDisabled:r?.zConversionDisabled}}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d?v.projectOperator.projectExecuteMany(e,n,r):v.jsonProjectOperator.projectExecuteMany(e,n,r)}function ce(e,t){return[e.wkid?.toString()??`-1`,e.wkt?.toString()??``,e.wkt2?.toString()??``,t.wkid?.toString()??`-1`,t.wkt?.toString()??``,t.wkt2?.toString()??``].join()}function le(e,t,n){try{return I(e,t,n)}catch{return null}}function R(e,t){let n=z([e],t);return n.pending==null?n.geometries==null?{pending:null,geometry:null}:{pending:null,geometry:n.geometries[0]}:{pending:n.pending,geometry:null}}function z(e,t,n){if(!N()){for(let n of e)if(n!=null&&!C(n.spatialReference,t)&&w(n.spatialReference)&&w(t)&&!U(n.spatialReference,t))return r(M),{pending:F(),geometries:null}}return{pending:null,geometries:e.map(e=>e==null?null:C(e.spatialReference,t)?S(e):!w(e.spatialReference)||!w(t)?null:I(e,t,n))}}class B extends e{constructor(){super(`projection:not-loaded`,`projection engine not fully loaded yet, please call load()`)}}const V={get loadPromise(){return v.loadPromise}};async function H(e,n,r){if(t(r),!e)return e;let i=z(Array.isArray(e)?e:[e],n,r);if(i.pending)return await i.pending,t(r),H(e,n,r);let a=i.geometries??[];return Array.isArray(e)?a:a[0]}function U(e,t,n){return n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation?!1:C(e,t)?!0:w(e)&&w(t)&&!!ne(e,t)}function ue(e,t){if(C(e,t))return!0;if(!w(e)||!w(t))return!1;let n=T(e)||E(e)||D(e),r=T(t)||E(t)||D(t);return n&&r}async function de(e,t,r,i){if(N())return n(i);if(Array.isArray(e)){for(let{source:t,dest:n,options:r}of e)if(t&&n&&!U(t,n,r))return F(i)}else if(e&&t&&!U(e,t,r))return F(i);return n(i)}function W(e,t,n){return e?b(e)?G(e,t,new p,n,0):x(e)?Y(e,t,new u,n,0):re(e)?J(e,t,new ee,n,0):ie(e)?q(e,t,new te,n,0):ae(e)?K(e,t,new f,n,0):null:null}function fe(e,t,n=t.spatialReference,r=0){return n!=null&&e.spatialReference!=null&&G(e,e.spatialReference,t,n,r)!=null}function G(e,t,n,r,i){$[0]=e.x,$[1]=e.y;let a=e.z;return $[2]=a===void 0?i:a,_($,t,0,$,r,0)?(n.x=$[0],n.y=$[1],n.spatialReference=r,a===void 0&&!l(r)?(n.z=void 0,n.hasZ=!1):(n.z=$[2],n.hasZ=!0),e.m===void 0?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function pe(e,t,n=t.spatialReference,r=0){return e.spatialReference!=null&&n!=null&&K(e,e.spatialReference,t,n,r)!=null}function K(e,t,n,r,i){let{points:a,hasZ:o,hasM:s}=e,c=[],l=a.length,u=[];for(let e of a)u.push(e[0],e[1],o?e[2]:i);if(!_(u,t,0,u,r,0,l))return null;let d=Q(o,r);for(let e=0;e<l;++e){let t=e*3,n=u[t],r=u[t+1];d&&s?c.push([n,r,u[t+2],a[e][3]]):d?c.push([n,r,u[t+2]]):s?c.push([n,r,a[e][2]]):c.push([n,r])}return n.points=c,n.spatialReference=r,n.hasZ=o,n.hasM=s,n}function me(e,t,n=t.spatialReference,r=0){return e.spatialReference!=null&&n!=null&&q(e,e.spatialReference,t,n,r)!=null}function q(e,t,n,r,i){let{curvePaths:a,paths:o,hasZ:s,hasM:c}=e;if(!(a?Z(a,s??!1,c??!1,t,n.curvePaths=[],r,i):X(o,s??!1,c??!1,t,n.paths,r,i)))return null;let l=Q(s,r);return n.spatialReference=r,n.hasZ=l,n.hasM=c,n}function he(e,t,n=t.spatialReference,r=0){return e.spatialReference!=null&&n!=null&&J(e,e.spatialReference,t,n,r)!=null}function J(e,t,n,r,i){let{curveRings:a,rings:o,hasZ:s,hasM:c}=e;return(a?Z(a,s??!1,c??!1,t,n.curveRings=[],r,i):X(o,s??!1,c??!1,t,n.rings,r,i))?(n.spatialReference=r,n.hasZ=Q(s,r),n.hasM=c,n):null}function ge(e,t,n=t.spatialReference,r=0){return e.spatialReference!=null&&n!=null&&Y(e,e.spatialReference,t,n,r)!=null}function Y(e,t,n,r,i){let{xmin:a,ymin:o,xmax:s,ymax:c,hasZ:l,hasM:u}=e,d=l?e.zmin:i;if(!y(a,o,d,t,$,r))return null;let f=Q(l,r);n.xmin=$[0],n.ymin=$[1],f&&(n.zmin=$[2]);let p=l?e.zmax:i;return y(s,c,p,t,$,r)?(n.xmax=$[0],n.ymax=$[1],f&&(n.zmax=$[2]),u&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null}function X(e,t,n,r,i,a,o=0){let s=[];for(let n of e)for(let e of n)s.push(e[0],e[1],t?e[2]:o);if(!_(s,r,0,s,a,0))return!1;let c=0;i.length=0;let l=t?3:2,u=Q(t,a);for(let t of e){let e=[];for(let r of t){let t=s.slice(c,c+=3);u||t.pop(),n&&t.push(r[l]),e.push(t)}i.push(e)}return!0}function Z(e,t,n,r,i,a,o=0){let s=[];for(let n of e)for(let e of n){if(O(e))return!1;if(k(e)){let[n,r]=e.c;s.push(n[0],n[1],t?n[2]:o,r[0],r[1],o);continue}if(A(e)){let[n,r,i]=e.b;s.push(n[0],n[1],t?n[2]:o,r[0],r[1],o,i[0],i[1],o);continue}let n=e;s.push(n[0],n[1],t?n[2]:o)}if(!_(s,r,0,s,a,0))return!1;let c=0;i.length=0;let l=t?3:2,u=Q(t,a);for(let t of e){let e=[];for(let r of t){let t=s.slice(c,c+=3);if(u||t.pop(),n&&t.push(j(r)[l]),O(r))return!1;if(k(r)){let n=s[c++],r=s[c++];++c,e.push({c:[t,[n,r]]})}else if(A(r)){let n=s[c++],r=s[c++];++c;let i=s[c++],a=s[c++];++c,e.push({b:[t,[n,r],[i,a]]})}else e.push(t)}i.push(e)}return!0}function Q(e,t){return e||l(t)||C(t,h)}const $=a();export{U as canProjectWithoutEngine,de as initializeProjection,ue as isEqualBaseGCS,N as isLoaded,P as isLoadedOrLoad,oe as isLoadedOrLoadFor,F as load,I as project,H as projectAsync,ge as projectExtent,L as projectMany,pe as projectMultipoint,R as projectOrLoad,z as projectOrLoadMany,fe as projectPoint,he as projectPolygon,me as projectPolyline,W as projectWithoutEngine,se as requiresLoad,V as test,le as tryProject};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{floatEqualAbsolute as e}from"../../core/mathUtils.js";import{getMetersPerUnitForSR as t,inchesPerMeter as n}from"../../core/units.js";function r(e,r){let i=r||e.extent,a=e.width,o=t(i?.spatialReference);return i&&a?i.width/a*o*n*96:0}function i(e,r){return e/(t(r)*n*96)}function a(e){return e/(n*96)}function o(e,r){return e*(t(r)*n*96)}function s(e,t){let n=e.extent,r=e.width-(e.padding?e.padding.left+e.padding.right:0),a=i(t,n.spatialReference);return n.clone().expand(a*r/n.width)}function c(e,t,n){return l(e,t)&&u(e,n)}function l(t,n){return n===0||e(t,n)||t<n}function u(t,n){return n===0||e(t,n)||t>n}function d(t,n){return e(t,n)?0:(t||1/0)>(n||1/0)?1:-1}export{d as compareMinScale,s as getExtentForScale,i as getResolutionForScale,a as getResolutionInMetersForScale,r as getScale,o as getScaleForResolution,c as isInScaleRange};
|
|
2
|
+
import{floatEqualAbsolute as e}from"../../core/mathUtils.js";import{getMetersPerUnitForSR as t,inchesPerMeter as n}from"../../core/units.js";function r(e,r){let i=r||e.extent,a=e.width,o=t(i?.spatialReference);return i&&a?i.width/a*o*n*96:0}function i(e,r){return e/(t(r)*n*96)}function a(e){return e/(n*96)}function o(e,r){return e*(t(r)*n*96)}function s(e,t){let n=e.extent,r=e.width-(e.padding?e.padding.left+e.padding.right:0),a=i(t,n.spatialReference);return n.clone().expand(a*r/n.width)}function c(e,t,n){return l(e,t)&&u(e,n)}function l(t,n){return n===0||e(t,n)||t<n}function u(t,n){return n===0||e(t,n)||t>n}function d(t,n){return e(t,n)?0:(t||1/0)>(n||1/0)?1:-1}function f(e,t){return e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale,e}function p(e,t){if(t&&e){let{minScale:n,maxScale:r}=e;if(g(n,r))return h(t,n,r)}return!0}function m(e){return!e?.minScale||!e.maxScale||e.minScale>=e.maxScale}function h(e,t,n){return e==null||e>=n&&(t===0||e<=t)}function g(e,t){return e!=null&&e>0||t!=null&&t>0}export{d as compareMinScale,s as getExtentForScale,i as getResolutionForScale,a as getResolutionInMetersForScale,r as getScale,o as getScaleForResolution,p as isInEffectiveScaleRange,c as isInScaleRange,g as isScaleRangeActive,f as joinScaleRanges,h as scaleBoundsPredicate,m as validateScaleRange};
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`6.0.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`6.0.0-next.7`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}has(`host-webworker`)||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has(`host-webworker`);export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
|
package/layers/ParquetLayer.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import type { FeatureLayerCapabilities, FieldDomainOptions } from "./types.js";
|
|
|
15
15
|
import type { BlendLayer, BlendLayerProperties } from "./mixins/BlendLayer.js";
|
|
16
16
|
import type { CustomParametersMixin, CustomParametersMixinProperties } from "./mixins/CustomParametersMixin.js";
|
|
17
17
|
import type { DataSeriesLayer, DataSeriesLayerProperties } from "./mixins/DataSeriesLayer.js";
|
|
18
|
+
import type { DisplayFilteredLayer, DisplayFilteredLayerProperties } from "./mixins/DisplayFilteredLayer.js";
|
|
18
19
|
import type { FeatureEffectLayer, FeatureEffectLayerProperties } from "./mixins/FeatureEffectLayer.js";
|
|
19
20
|
import type { FeatureReductionLayer, FeatureReductionLayerProperties } from "./mixins/FeatureReductionLayer.js";
|
|
20
21
|
import type { OperationalLayer, OperationalLayerProperties } from "./mixins/OperationalLayer.js";
|
|
@@ -46,7 +47,7 @@ import type { ParquetFilesDataProperties } from "./support/ParquetFilesData.js";
|
|
|
46
47
|
import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
|
|
47
48
|
import type { LayerProperties } from "./Layer.js";
|
|
48
49
|
|
|
49
|
-
export interface ParquetLayerProperties extends LayerProperties, CustomParametersMixinProperties, OperationalLayerProperties, RefreshableLayerProperties, ScaleRangeLayerProperties, DataSeriesLayerProperties, OrderedLayerProperties, BlendLayerProperties, FeatureEffectLayerProperties, FeatureReductionLayerProperties, Partial<Pick<ParquetLayer, "charts" | "copyright" | "definitionExpression" | "geometryType" | "labelsVisible" | "legendEnabled" | "outFields" | "popupEnabled">> {
|
|
50
|
+
export interface ParquetLayerProperties extends LayerProperties, CustomParametersMixinProperties, OperationalLayerProperties, RefreshableLayerProperties, ScaleRangeLayerProperties, DataSeriesLayerProperties, DisplayFilteredLayerProperties, OrderedLayerProperties, BlendLayerProperties, FeatureEffectLayerProperties, FeatureReductionLayerProperties, Partial<Pick<ParquetLayer, "charts" | "copyright" | "definitionExpression" | "geometryType" | "labelsVisible" | "legendEnabled" | "outFields" | "popupEnabled">> {
|
|
50
51
|
/**
|
|
51
52
|
* The data source for the ParquetLayer. Set this property to [parquet files](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ParquetFilesData/)
|
|
52
53
|
* or a [portal item](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ParquetPortalItemData/) to define which Parquet content the layer loads.
|
|
@@ -925,4 +926,4 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
|
|
|
925
926
|
*/
|
|
926
927
|
queryObjectIds(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<ObjectId[]>;
|
|
927
928
|
}
|
|
928
|
-
declare const ParquetLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof DataSeriesLayer & typeof OrderedLayer & typeof BlendLayer & typeof FeatureEffectLayer & typeof FeatureReductionLayer
|
|
929
|
+
declare const ParquetLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof DataSeriesLayer & typeof DisplayFilteredLayer & typeof OrderedLayer & typeof BlendLayer & typeof FeatureEffectLayer & typeof FeatureReductionLayer
|
package/layers/ParquetLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import a from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as c}from"../core/object.js";import{on as l}from"../core/reactiveUtils.js";import{getFilename as u}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../core/accessorSupport/decorators/writer.js";import m from"../geometry/Extent.js";import h from"../geometry/SpatialReference.js";import g from"../graphic/ParquetGraphicOrigin.js";import _ from"./Layer.js";import{ParquetSource as v}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{DataSeriesLayer as x}from"./mixins/DataSeriesLayer.js";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import a from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as c}from"../core/object.js";import{on as l}from"../core/reactiveUtils.js";import{getFilename as u}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../core/accessorSupport/decorators/writer.js";import m from"../geometry/Extent.js";import h from"../geometry/SpatialReference.js";import g from"../graphic/ParquetGraphicOrigin.js";import _ from"./Layer.js";import{ParquetSource as v}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{DataSeriesLayer as x}from"./mixins/DataSeriesLayer.js";import{DisplayFilteredLayer as S}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as C}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as w}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{OrderedLayer as E}from"./mixins/OrderedLayer.js";import{RefreshableLayer as D}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as O}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as k,legendEnabled as A,popupEnabled as j}from"./support/commonProperties.js";import M from"./support/FeatureTemplate.js";import N from"./support/Field.js";import{defineFieldProperties as P}from"./support/fieldProperties.js";import{fixRendererFields as F}from"./support/fieldUtils.js";import I from"./support/GeometryEncodingLocation.js";import L from"./support/GeometryEncodingWkb.js";import R from"./support/LabelClass.js";import{reader as z}from"./support/labelingInfo.js";import B from"./support/ParquetFilesData.js";import V from"./support/ParquetPortalItemData.js";import{parquetGeometryTypeKebabDict as H}from"./support/parquetUtils.js";import{rendererTypes as U}from"../renderers/support/typeUtils.js";import W from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";import{utc as K}from"../time/constants.js";const q=P(),J=`__OBJECTID`,Y={types:{key:`type`,base:null,typeMap:{wkb:L,location:I}},json:{name:`layerDefinition.geometryEncoding`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryEncoding`}}}}};let X=class extends w(C(y(E(S(x(O(D(T(s(b(n(_)))))))))))){constructor(e){super(e),this._emptyUrls=new r,this.charts=null,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new g(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=J,this.operationalLayerType=`ParquetLayer`,this.outFields=null,this.persistenceEnabled=!!has(`parquetlayer-persistence-enabled`),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type=`parquet`,this.data=null}initialize(){this.addHandles(l(()=>this.source,`source-changed`,()=>{this.emit(`refresh`,{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this}get capabilities(){return this.source?.capabilities}get dateFieldsTimeZone(){return K}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,n,r){let i=e.filter(e=>e.name!==J||e.type!==`oid`).map(e=>e.toJSON(r));c(n,i,t)}get isTable(){return this.geometryEncoding==null&&this.displayOptimization==null}set renderer(e){F(e,this.fieldsIndex),this._set(`renderer`,e)}get title(){let e=this._get(`title`);if(e&&this.originOf(`title`)!==`defaults`)return e;switch(this.data?.type){case`files`:{let t=this.data.urls?.at(0);e=t?u(t,[`parquet`]):null;break}case`portal-item`:e=this.data.portalItem?.title}return e||`Parquet`}set title(e){this._set(`title`,e)}writeData(e,t,n,r){if(!e)return;if(e.type===`portal-item`&&e.portalItem?.type!==`Parquet Feature Layer`){r.messages?.push(new a(`parquet-layer:unsupported-data`,`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));return}let i=e.write({},r);i&&(t.source=i)}get urls(){return this.data?.type===`files`?this.data.urls:this._emptyUrls}set urls(e){i(o.getLogger(this),`urls`,{replacement:`data`,version:`5.1`,warnOnce:!0}),this.data=new B({urls:this._normalizeUrls(e)})}createPopupTemplate(e){return G(this,e)}createQuery(){let e=new W;return e.returnGeometry=!0,e.outFields=[`*`],e.where=this.definitionExpression||`1=1`,e}async createSource(e){let t=new v({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();let n=await this.source.queryFeatures(this._normalizeQuery(e),t),r=this.graphicOrigin;if(n?.features)for(let e of n.features)e.layer=e.sourceLayer=this,e.origin=r;return n}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}async hasDataChanged(){if(this.data?.type===`portal-item`){let e=this.data.portalItem,t=e.modified?.getTime();if(await e.reload(),t===e.modified?.getTime())return!1}return await this.source.reload(null),!0}_normalizeQuery(e){return W.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new r(e):e??new r}async _load(e){this.data?.type===`portal-item`&&await this.data.portalItem.load();let t=await this.createSource(e);this._set(`source`,t),this.read(t.sourceJSON,{origin:`service`}),[`fields`].forEach(e=>this.revertToOrigin(e,`service`)),F(this.renderer,this.fieldsIndex),this.spatialReference??=h.WGS84}};e([d({readOnly:!0,json:{read:!1,write:!1}})],X.prototype,`capabilities`,null),e([d({json:{origins:{"web-scene":{write:!1}},write:!0}})],X.prototype,`charts`,void 0),e([d({type:String})],X.prototype,`copyright`,void 0),e([d({readOnly:!0})],X.prototype,`dateFieldsTimeZone`,null),e([d({readOnly:!0})],X.prototype,`defaultPopupTemplate`,null),e([d({type:String,json:{name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],X.prototype,`definitionExpression`,void 0),e([d({type:Boolean})],X.prototype,`returnM`,void 0),e([d({type:Boolean})],X.prototype,`returnZ`,void 0),e([d()],X.prototype,`displayOptimization`,void 0),e([d({type:[N],json:{name:`layerDefinition.fields`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:`fields`}}}})],X.prototype,`fields`,void 0),e([p(`fields`)],X.prototype,`writeFields`,null),e([d(q.fieldsIndex)],X.prototype,`fieldsIndex`,void 0),e([d(Y)],X.prototype,`geometryEncoding`,void 0),e([d({type:m,json:{name:`extent`}})],X.prototype,`fullExtent`,void 0),e([d({type:H.apiValues,json:{name:`layerDefinition.geometryType`,read:{reader:H.read},write:{writer:H.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryType`,reader:H.read}}}}})],X.prototype,`geometryType`,void 0),e([d({readOnly:!0,clonable:!1})],X.prototype,`graphicOrigin`,void 0),e([d(k)],X.prototype,`labelsVisible`,void 0),e([d({type:[R],json:{name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:z},write:!0}})],X.prototype,`labelingInfo`,void 0),e([d(A)],X.prototype,`legendEnabled`,void 0),e([d()],X.prototype,`file`,void 0),e([d({type:String,readOnly:!0})],X.prototype,`objectIdField`,void 0),e([d({type:[`ParquetLayer`]})],X.prototype,`operationalLayerType`,void 0),e([d(q.outFields)],X.prototype,`outFields`,void 0),e([d(j)],X.prototype,`popupEnabled`,void 0),e([d({type:t,json:{name:`popupInfo`,write:!0}})],X.prototype,`popupTemplate`,void 0),e([d({types:U,json:{name:`layerDefinition.drawingInfo.renderer`,write:!0,origins:{service:{read:{source:`drawingInfo.renderer`}}}}})],X.prototype,`renderer`,null),e([d({type:v,readOnly:!0,cast:null,json:{read:!1}})],X.prototype,`source`,void 0),e([d({type:h,json:{name:`layerDefinition.spatialReference`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`extent.spatialReference`}}}}})],X.prototype,`spatialReference`,void 0),e([d({type:[M]})],X.prototype,`templates`,void 0),e([d()],X.prototype,`title`,null),e([d({json:{read:!1},readOnly:!0})],X.prototype,`type`,void 0),e([d({types:{key:`type`,base:null,typeMap:{files:B,"portal-item":V}},json:{name:`source`,origins:{"web-map":{write:{target:`source`,ignoreOrigin:!0}}}}})],X.prototype,`data`,void 0),e([p(`web-map`,`data`)],X.prototype,`writeData`,null),e([d({type:r.ofType(String),json:{read:!1,write:!1}})],X.prototype,`urls`,null),X=e([f(`esri.layers.ParquetLayer`)],X);export{X as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{EventEmitter as n}from"../../../core/Evented.js";import r from"../../../core/Logger.js";import{fromRect as i,create as a}from"../../../geometry/support/aaBoundingBox.js";import{create as o}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as s}from"../featureConversionUtils.js";import{BoundsStore as c}from"./BoundsStore.js";import{
|
|
2
|
+
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{EventEmitter as n}from"../../../core/Evented.js";import r from"../../../core/Logger.js";import{fromRect as i,create as a}from"../../../geometry/support/aaBoundingBox.js";import{create as o}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as s}from"../featureConversionUtils.js";import{BoundsStore as c}from"./BoundsStore.js";import{optimizedFeatureQueryEngineAdapter as l}from"./optimizedFeatureQueryEngineAdapter.js";const u=a();class d{constructor(e){this.geometryInfo=e,this._boundsStore=new c,this._featuresById=new Map,this._usedMemory=0,this.events=new n,this.featureAdapter=l}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{t.geometry!=null&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(this.fullBounds==null)return null;let[t,n,r,i]=this.fullBounds;return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:e}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(t){let n=t.map(e=>this._upsert(e));return this._emitChanged(),n.filter(e)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let n of e){let e=this._boundsStore.get(n.objectId);e&&t(i(u,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit(`changed`,void 0)}_add(e){if(!e)return;let n=e.objectId;if(n==null){r.getLogger(`esri.layers.graphics.data.FeatureStore`).error(new t(`featurestore:invalid-feature`,`feature id is missing`,{feature:e}));return}let i=this._featuresById.get(n),a;i?(e.displayId=i.displayId,a=this._boundsStore.get(n),this._boundsStore.delete(n),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):this.onFeatureAdd!=null&&this.onFeatureAdd(e),e.geometry?.coords?.length?(a=s(a??o(),e.geometry),a!=null&&this._boundsStore.set(n,a),this._featuresById.set(n,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0):(this._boundsStore.set(n,null),this._featuresById.set(n,e))}_upsert(e){let n=e?.objectId;if(n==null)return r.getLogger(`esri.layers.graphics.data.FeatureStore`).error(new t(`featurestore:invalid-feature`,`feature id is missing`,{feature:e})),null;let i=this._featuresById.get(n);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:a,attributes:c}=e;for(let e in c)i.attributes[e]=c[e];return a&&(i.geometry=a,this._boundsStore.set(n,s(o(),a)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){this.onFeatureRemove!=null&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}export{d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{importLazily as t}from"../../../core/importUtils.js";import{clone as n}from"../../../core/lang.js";import r from"../../../geometry/SpatialReference.js";import{polygonCentroid as i,extentCentroid as a}from"../../../geometry/support/centroid.js";import{getPolygonExtent as o,getGeometryExtent as s,expandExtent as c}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as l}from"../../../geometry/support/quantizationUtils.js";import{isValid as u,equals as d}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as f}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as p,isCoordinate as m,cloneCurve as h}from"../../../geometry/support/curves/curveUtils.js";import g from"./AttributesBuilder.js";import{cleanFromGeometryEngine as _,getGeometry as v,transformCentroid as y}from"./geometryUtils.js";import{project as b}from"./projectionSupport.js";import{getDateInNumber as x}from"./queryUtils.js";import{SnappingCandidateEdge as S,SnappingCandidateVertex as C}from"./SnappingCandidate.js";import{isDateField as w,isDateOnlyField as T,isTimestampOffsetField as E,isStringField as D,isTimeOnlyField as O}from"../../support/fieldUtils.js";import k from"../../../rest/support/AutoIntervalBinParameters.js";import A from"../../../rest/support/DateBinParameters.js";import{unitsDict as j}from"../../../rest/support/DateBinUtils.js";import M from"../../../rest/support/FixedBoundariesBinParameters.js";import N from"../../../rest/support/FixedIntervalBinParameters.js";import{calculateStringStatistics as P,calculateStatistics as F,processSummaryStatisticsResult as I,calculateUniqueValuesCount as L,createUVResult as R,calculateClassBreaks as z,resolveCBResult as B,calculateHistogram as V,calculatePercentile as H,binIndex as U,getBinParams as W,isNullCountSupported as G,getAttributeComparator as K}from"../../../statistics/utils.js";import{utc as q}from"../../../time/constants.js";import{DateTime as J}from"luxon";const Y=t(()=>import(`../../../geometry/operators/json/convexHullOperator.js`));class X{constructor(e,t,n){this.items=e,this.query=t,this.geometryType=n.geometryType,this.hasZ=!!t.returnZ&&n.hasZ,this.hasM=!!t.returnM&&n.hasM,this.fieldsIndex=n.fieldsIndex,this.spatialReference=n.spatialReference,this.featureAdapter=n.featureAdapter,this.featureIdInfo=n.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){let e=new g(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);let{groupByFieldsForStatistics:t,having:n,outStatistics:r}=this.query;if(!t?.length)return 1;let i=new Map,a=new Map,o=new Set;for(let s of r){let{statisticType:r}=s,c=r===`exceedslimit`?void 0:s.onStatisticField;if(!a.has(c)){let n=[];for(let r of t){let t=this._getAttributeValues(e,r,this.items,i);n.push(t)}a.set(c,this._calculateUniqueValues(n,this.items,e.returnDistinctValues))}let l=a.get(c);for(let t in l){let{data:r,items:i}=l[t],a=r.join(`,`);(!n||e.validateItems(i,n))&&o.add(a)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>e.statisticType===`exceedslimit`)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){let t=this.query.geometry;u(this.query.outSR)&&!d(t.spatialReference,this.query.outSR)?e.queryGeometry=_({spatialReference:this.query.outSR,...b(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=_({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,n){let r=this.featureAdapter,{point:i}=e,a=typeof e.distance==`number`?e.distance:e.distance.x,o=typeof e.distance==`number`?e.distance:e.distance.y;function s(e,t){let n=(e-i.x)/a,r=(t-i.y)/o;return n*n+r*r}let c={candidates:[]},l=this.geometryType===`esriGeometryPolygon`,u=this.geometryType===`esriGeometryPolyline`||this.geometryType===`esriGeometryPoint`,d=this._getPointCreator(t,this.spatialReference,n),g=new Q(null,0),_=new Q(null,0),v={x:0,y:0,z:0};for(let e of this.items){let t=r.getObjectId(e),n=r.getGeometryWithCurves?.(e);if(n!=null){b(n,t);continue}let i=r.getGeometry(e);i!=null&&y(i,t)}return c.candidates.sort((e,t)=>e.distance-t.distance),c;function y(t,n){let{coords:r,stride:a}=t,o=t.isPoint?te:t.lengths;if(g.coords=r,_.coords=r,e.returnEdge){let e=0;for(let t=0;t<o.length;t++){let r=o[t],u=e;for(let t=0;t<r;t++,e+=a){if(!l&&t===r-1||(g.coordsIndex=e,_.coordsIndex=t===r-1?u:e+a,!ee(v,i,g,_)))continue;let o=s(v.x,v.y);o<=1&&c.candidates.push(new S(n,d(v),Math.sqrt(o),d(g),d(_)))}}}if(e.vertexMode===`all`){let e=0;for(let t=0;t<o.length;t++){let r=o[t],i=e,u=_;u.coordsIndex=i;for(let t=0;t<r;t++,e+=a){if(g.coordsIndex=e,l&&t===r-1&&g.x===u.x&&g.y===u.y)continue;let i=s(g.x,g.y);i<=1&&c.candidates.push(new C(n,d(g),Math.sqrt(i)))}}}else if(u&&e.vertexMode===`ends`){let e=0,t=[];for(let n=0;n<o.length;n++){t.push(e);let r=o[n];e+=r*a,r>1&&t.push(e-a)}for(let e of t){g.coordsIndex=e;let t=s(g.x,g.y);t<=1&&c.candidates.push(new C(n,d(g),Math.sqrt(t)))}}}function b(t,n){let{candidates:r}=c,a={x:0,y:0,z:0};if(e.returnEdge){let e=[i.x,i.y],o=new Q(e,0),c=new Q(e,0);for(let{segments:i}of t.parts)for(let{start:t,curve:l}of i){let{curvePoint:i}=f(t,l,e),u=s(...i);if(u>1)continue;[a.x,a.y]=i,o.coords=t,c.coords=p(l);let g=m(l)?null:h(l);r.push(new S(n,d(a),Math.sqrt(u),d(o),d(c),!1,g))}}function o(e){a.x=t.vertexXY[e*2],a.y=t.vertexXY[e*2+1];let i=s(a.x,a.y);i>1||(a.z=t.vertexZ?.[e]??0,r.push(new C(n,d(a),Math.sqrt(i))))}if(e.vertexMode===`all`){let{vertexCount:e}=t;for(let t=0;t<e;++t)o(t)}else if(e.vertexMode===`ends`)switch(t.type){case`point`:o(0);break;case`polyline`:for(let e=0;e<t.partCount;++e){let n=t.partOffsets[e],r=t.partOffsets[e+1]-1;o(n),r!==n&&o(r)}}}}_getPointCreator(e,t,n){let r=n!=null&&!d(t,n)?e=>b(e,t,n):e=>e,{hasZ:i}=this;return i&&e?({x:e,y:t,z:n})=>r({x:e,y:t,z:n}):({x:e,y:t})=>r({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,minValue:o,maxValue:s,scale:c,timeZone:l,outStatisticTypes:u}=e,d=this.fieldsIndex.get(t),f=w(d)||T(d)||E(d),p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:c,timeZone:l},this.items),m=G({normalizationType:i,normalizationField:r,minValue:o,maxValue:s}),h={value:.5,fieldType:d?.type},g=D(d)?P({values:p,supportsNullCount:m,percentileParams:h,outStatisticTypes:u}):F({values:p,minValue:o,maxValue:s,useSampleStdDev:!i,supportsNullCount:m,percentileParams:h,outStatisticTypes:u});return I(g,u,f)}async createUniqueValuesResponse(e){let{field:t,valueExpression:n,domains:r,returnAllCodedValues:i,scale:a,timeZone:o}=e,s=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:n,scale:a,timeZone:o},this.items,!1),c=L(s);return R(c,r,i,e.fieldDelimiter)}async createClassBreaksResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items),m=z(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u});return B(m,o)}async createHistogramResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items);return V(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u})}_sortFeatures(e,t,n){if(e.length>1&&t?.length)for(let r of t.slice().reverse()){let{compare:t,fieldOrExpression:i,fieldInfo:a}=$(r,this.fieldsIndex);e.sort((e,r)=>t(n(e,i,a),n(r,i,a)))}}_topNFeatures(t,n,r,i){if(t.length>1&&n?.length){let a=n.map(e=>{let{compare:t,fieldOrExpression:n,fieldInfo:r}=$(e,this.fieldsIndex);return(e,a)=>t(i(e,n,r),i(a,n,r))}).reduceRight((e,t)=>(n,r)=>{let i=t(n,r);return i!==0&&!Number.isNaN(i)?i:e(n,r)}),o=[];for(let n of t)e(o,n,r,a);return o}return t.slice(0,r)}_createFeatureQueryResponse(e){let{items:t,geometryType:n,hasM:r,hasZ:i,featureIdInfo:a,spatialReference:o}=this,{outFields:s,outSR:c,quantizationParameters:u,resultRecordCount:d,resultOffset:f,returnZ:p,returnM:m}=e,h=d!=null&&t.length>(f||0)+d,g=s&&(s.includes(`*`)?[...this.fieldsIndex.fields]:s.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:h,features:this._createFeatures(e,t),fields:g,geometryType:n,hasM:r&&m,hasZ:i&&p,objectIdFieldName:a.type===`object-id`?a.fieldName:null,spatialReference:_(c||o),transform:u&&l(u)||null}}_createFeatures(e,t){let n=new g(e,this.featureAdapter,this.fieldsIndex),{hasM:r,hasZ:i}=this,{orderByFields:a,quantizationParameters:o,returnGeometry:s,returnCentroid:c,maxAllowableOffset:u,resultOffset:d,resultRecordCount:f,returnZ:p=!1,returnM:m=!1}=e,h=i&&p,_=r&&m,b,x=d||0,S=f==null?null:x+f;S!=null&&S<=5e3&&S<t.length?b=this._topNFeatures(t,a,S,(e,t,r)=>n.getFieldValue(e,t,r)):(b=[...t],this._sortFeatures(b,a,(e,t,r)=>n.getFieldValue(e,t,r))),(x>0||S!=null)&&(b=b.slice(x,S??void 0));let C=[],w=0;if(!this.geometryType||!s&&!c)for(let e of b){let t=n.getAttributes(e);t&&(C[w++]=this._addFeatureJSONMetadata(e,{attributes:t}))}else{let e=l(o)??void 0,t=this.geometryType===`esriGeometryPolygon`||this.geometryType===`esriGeometryPolyline`;if(s&&!c)for(let r of b){let i=this.featureAdapter.getGeometry(r),a=this._addFeatureJSONMetadata(r,{attributes:n.getAttributes(r),geometry:v(this.geometryType,i,u,e,h,_)});t&&i&&!a.geometry&&(a.centroid=y(this,this.featureAdapter.getCentroid(r,this),e)),C[w++]=a}else if(!s&&c)for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:y(this,this.featureAdapter.getCentroid(t,this),e)});else for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:y(this,this.featureAdapter.getCentroid(t,this),e),geometry:v(this.geometryType,this.featureAdapter.getGeometry(t),u,e,h,_)})}return C}_addFeatureJSONMetadata(e,t){let n=this.featureAdapter.getMetadata?.(e);return n!==void 0&&(t.metadata=n),t}_createExceedsLimitQueryResponse(){let e=!1,t=1/0,n=1/0,r=1/0;for(let e of this.query.outStatistics??[])if(e.statisticType===`exceedslimit`){t=e.maxPointCount==null?1/0:e.maxPointCount,n=e.maxRecordCount==null?1/0:e.maxRecordCount,r=e.maxVertexCount==null?1/0:e.maxVertexCount;break}return e=this.geometryType===`esriGeometryPoint`?this.items.length>t:this.items.length>n||this.items.reduce((e,t)=>e+(this.featureAdapter.getGeometry(t)?.size??0),0)>r,{fields:[{name:`exceedslimit`,type:`esriFieldTypeInteger`,alias:`exceedslimit`,sqlType:`sqlTypeInteger`,domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,n={attributes:{}}){let r=[],i=new Map,a=new Map,o=new Map,s=new Map,c=new g(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:d,orderByFields:f,resultRecordCount:p}=e,m=u?.length,h=!!m,_=h?u[0]:null,v=h&&!this.fieldsIndex.get(_);for(let f of l??[]){let{outStatisticFieldName:l,statisticType:p}=f,g=f,y=p===`exceedslimit`?void 0:f.onStatisticField,b=p===`percentile_disc`||p===`percentile_cont`,x=p===`EnvelopeAggregate`||p===`CentroidAggregate`||p===`ConvexHullAggregate`,S=h&&m===1&&(y===_||v)&&p===`count`;if(h){if(!o.has(y)){let e=[];for(let n of u){let r=this._getAttributeValues(c,n,t,i);e.push(r)}o.set(y,this._calculateUniqueValues(e,t,!x&&c.returnDistinctValues))}let n=o.get(y);if(!n)continue;let r=Object.keys(n);for(let a of r){let{count:r,data:o,items:f,itemPositions:p}=n[a],m=o.join(`,`);if(!d||c.validateItems(f,d)){let n=s.get(m)||{attributes:{}};if(e.returnAggIds&&(n.aggregateIds=f.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null)),x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(g,f);n.aggregateGeometries[t]=e}else{let e=null;if(S)e=r;else{let n=this._getAttributeValues(c,y,t,i),r=p.map(e=>n[e]);e=b&&`statisticParameters`in g?this._getPercentileValue(g,r):this._getStatisticValue(g,r,null,c.returnDistinctValues)}n.attributes[l]=e}let a=0;u.forEach((e,t)=>n.attributes[this.fieldsIndex.get(e)?e:`EXPR_${++a}`]=o[t]),s.set(m,n)}}}else if(x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:r}=await this._getAggregateGeometry(g,t);n.aggregateGeometries[r]=e}else{let e=this._getAttributeValues(c,y,t,i);n.attributes[l]=b&&`statisticParameters`in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,a,c.returnDistinctValues)}let C=(p===`min`||p===`max`)&&(D(this.fieldsIndex.get(y))||this._isAnyDateField(y))?this.fieldsIndex.get(y)?.type:null;r.push({name:l,alias:l,type:C||`esriFieldTypeDouble`})}let y=h?Array.from(s.values()):[n];return this._sortFeatures(y,f,(e,t)=>e.attributes[t]),p&&(y.length=Math.min(p,y.length)),{fields:r,features:y}}_isAnyDateField(e){let t=this.fieldsIndex.get(e);return w(t)||T(t)||E(t)||O(t)}async _getAggregateGeometry(e,t){let{statisticType:n,outStatisticFieldName:r}=e,{featureAdapter:s,spatialReference:c,geometryType:l}=this,u=t.map(e=>v(l,s.getGeometry(e))),d={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:f}=await Y.getImportPromise(),[p]=f(u,{merge:!0});if(p&&p.rings[0].length<=3&&(p=null),n===`EnvelopeAggregate`)d.aggregateGeometries={...p?o(p):Z(u),spatialReference:c},d.outStatisticFieldName=r||`extent`;else if(n===`CentroidAggregate`){let[e,t]=p?i(p):a(Z(u));d.aggregateGeometries={x:e,y:t,spatialReference:c},d.outStatisticFieldName=r||`centroid`}else n===`ConvexHullAggregate`&&(d.aggregateGeometries=p&&{...p,spatialReference:c},d.outStatisticFieldName=r||`convexHull`);return d}_getStatisticValue(e,t,n,r){let{onStatisticField:i,statisticType:a}=e,o=null;return o=n?.has(i)?n.get(i):D(this.fieldsIndex.get(i))||this._isAnyDateField(i)?P({values:t,returnDistinct:r}):F({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),n&&n.set(i,o),o[a===`var`?`variance`:a]}_getPercentileValue(e,t){let{onStatisticField:n,statisticParameters:r,statisticType:i}=e,{value:a,orderBy:o}=r,s={value:a,orderBy:o,fieldType:this.fieldsIndex.get(n)?.type,isDiscrete:i===`percentile_disc`};return H(t,s)}_getAttributeValues(e,t,n,r){if(r.has(t))return r.get(t);let i=this.fieldsIndex.get(t),a=n.map(n=>e.getFieldValue(n,t,i));return r.set(t,a),a}_calculateUniqueValues(e,t,n){let r={},i=t.length;for(let a=0;a<i;a++){let i=t[a],o=[];for(let t of e)o.push(t[a]);let s=o.join(`,`);r[s]==null?r[s]={count:1,data:o,items:[i],itemPositions:[a]}:(n||r[s].count++,r[s].items.push(i),r[s].itemPositions.push(a))}return r}async _getDataValues(e,t,i=!0){let a=new g(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:o,scale:s,timeZone:c}=e,l=r.fromJSON(this.query.outSR||this.spatialReference);return o?a.getExpressionValues(t,o,{viewingMode:`map`,scale:s,spatialReference:l},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},c):a.getDataValues(t,n(e),i)}_calculateHistogramBins(e,t,n){if(t.min==null&&t.max==null)return[];let r=t.intervals,i=t.min??0,a=t.max??0,o=r.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){let s=e[t],c=n[t];if(s!=null&&s>=i&&s<=a){let e=U(r,s);e>-1&&(o[e].count++,o[e].items.push(c))}}return o}async createQueryBinsResponse(e){let t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);let{value:n,outAlias:r,valueType:i}=t,a=[],o=[{name:r??n,alias:r??n,type:i??`esriFieldTypeString`},{name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`}],s=new g(e,this.featureAdapter,this.fieldsIndex),c=new Map,l=[...this.items];this._sortFeatures(l,[n],(e,t,n)=>s.getFieldValue(e,t,n));let u=this._getAttributeValues(s,n,l,c),d=this._calculateUniqueValues([u],l,s.returnDistinctValues);for(let t in d){let{items:i}=d[t],s=await this._createBinsResponse(e,i);if(a.push(...s.features.map(e=>({...e,attributes:{...e.attributes,[r??n]:t}}))),s.fields)for(let e of s.fields)o.some(t=>t.name===e.name)||o.push(e)}return{fields:o,features:a}}async _createBinsResponse(e,t){let n=e.bin;switch(t??=this.items,n.type){case`autoIntervalBin`:return this._createAutoIntervalBinsResponse(k.fromJSON(n),e,t);case`dateBin`:return this._createDateBinsResponse(A.fromJSON(n),e,t);case`fixedBoundariesBin`:return this._createFixedBoundariesBinsResponse(M.fromJSON(n),e,t);case`fixedIntervalBin`:return this._createFixedIntervalBinsResponse(N.fromJSON(n),e,t)}}async _createAutoIntervalBinsResponse(e,t,n){let{field:r,normalizationField:i,numBins:a,normalizationType:o,normalizationTotal:s,start:c,end:l}=e,u=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),d=W(u,{field:r,normalizationField:i,normalizationType:o,normalizationTotal:s,numBins:a,minValue:x(o?e.normalizationMinValue:c,!1),maxValue:x(o?e.normalizationMaxValue:l,!1)}),f=this._calculateHistogramBins(u,d,n);return this._createFeaturesFromHistogramBins(f,t)}async _createDateBinsResponse(e,t,n){let{field:r,interval:i,start:a,end:o,snapToData:s,returnFullIntervalBin:c,offset:l,firstDayOfWeek:u}=e,d=i.unit,f=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),p=O(this.fieldsIndex.get(r)),m=j.toJSON(d),h=f.filter(Boolean).sort((e,t)=>e-t),g=a==null?h[0]:x(a,p),_=o==null?h[h.length-1]:x(o,p),v=[];if(g!=null&&_!=null){let e={zone:t.outTimeReference?.ianaTimeZone??q},n={[l?.unit?j.toJSON(l.unit):`milliseconds`]:l?.value||0},r=J.fromMillis(g,e).minus(n),a=J.fromMillis(_,e).minus(n),o=typeof u==`number`&&u>=1&&u<=7?u:7,d=(e,t)=>{let n=(e.weekday-t+7)%7;return e.minus({days:n}).startOf(`day`)},f=(e,t)=>d(e,t).plus({days:7});if(s===`last`){let e=m===`week`?f(a,o):a;for(;e>r;){let t=e.minus({[m]:i.value});if(t<r){v.unshift([c?t.plus(n).toMillis():r.plus(n).toMillis(),e.plus(n).toMillis()]);break}v.unshift([t.plus(n).toMillis(),e.plus(n).toMillis()]),e=t}}else{let e=s===`first`?r:m===`week`?d(r,o):r.startOf(m);for(;e<=a;){let t=e.plus({[m]:i.value});if(t>a){v.push([e.plus(n).toMillis(),c?t.plus(n).toMillis():a.plus(n).toMillis()]);break}v.push([e.plus(n).toMillis(),t.plus(n).toMillis()]),e=t}}}let y=this._calculateHistogramBins(f,{intervals:v,min:g,max:_},n);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,n){let{field:r}=e,i=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),a=O(this.fieldsIndex.get(r)),o=e.boundaries.map(e=>x(e,a)).sort((e,t)=>e-t),s=[];for(let e=0;e<o.length-1;e++)s.push([o[e],o[e+1]]);let c={intervals:s,min:o.at(0),max:o.at(-1)},l=this._calculateHistogramBins(i,c,n);return this._createFeaturesFromHistogramBins(l,t)}async _createFixedIntervalBinsResponse(e,t,n){let{field:r,interval:i,normalizationType:a,start:o,end:s}=e,c=await this._getDataValues({field:r||e.expression,normalizationField:e.normalizationField,normalizationType:a,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),l=O(this.fieldsIndex.get(r)),u=W(c,{field:r,classificationMethod:`defined-interval`,definedInterval:i,minValue:x(a?e.normalizationMinValue:o,l),maxValue:x(a?e.normalizationMaxValue:s,l)},!0),d=this._calculateHistogramBins(c,u,n);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){let{upperBoundaryAlias:n,lowerBoundaryAlias:r}=t,i=r||`lowerBoundary`,a=n||`upperBoundary`,o=[],s=[{name:i,alias:i,type:`esriFieldTypeDouble`},{name:a,alias:a,type:`esriFieldTypeDouble`}],c=t.bin?.stackBy?.value,l=t.bin?.stackBy?.outAlias;c&&s.push({name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`},{name:l??c,alias:l??c,type:`esriFieldTypeString`});let u=0,d=t.bin.type===`dateBin`,f=t.outTimeReference?.ianaTimeZone;for(let n of e){let{minValue:e,maxValue:r,items:p}=n,m={attributes:{}};m.attributes[i]=d&&f&&e!=null?J.fromMillis(e,{zone:f}).toISO():e,t.bin.hideUpperBound||(m.attributes[a]=d&&f&&r!=null?J.fromMillis(r,{zone:f}).toISO():r),t.returnAggIds&&(m.aggregateIds=p.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null));let h;if(c?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[c],orderByFields:[c]},p),m.attributes.bin=++u,t.bin.jsonStyle===`flat`?o.push(...h.features.map(({attributes:{EXPR_1:e,...t},...n})=>({...n,attributes:l??e?{...t,[l??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>l??e?{...t,[l??e]:e}:t),o.push(m))):(t.bin?.splitBy&&(m.attributes.bin=++u),h=await this._createStatisticsQueryResponse(t,p,m),o.push(m)),h.fields)for(let e of h.fields)s.some(t=>t.name===e.name)||s.push(e)}return t.binOrder===`desc`&&o.reverse(),{fields:s,features:o}}}function Z(e){let t=s(e[0]);for(let n of e.slice(1))c(t,s(n));return t}function ee(e,t,n,r){let i=r.x-n.x,a=r.y-n.y,o=t.x-n.x,s=t.y-n.y,c=i*i+a*a;if(c===0)return!1;let l=o*i+s*a,u=Math.min(1,Math.max(0,l/c));return e.x=n.x+i*u,e.y=n.y+a*u,!0}class Q{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const te=[1];function $(e,t){let n=e.split(` `),r=n[0],i=t.get(r),a=n[1]?n[1].toLowerCase()===`desc`:!1;return{compare:K(i?.type,a,`case-insensitive`),fieldOrExpression:r,fieldInfo:i}}export{X as QueryEngineResult};
|
|
2
|
+
import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{importLazily as t}from"../../../core/importUtils.js";import{clone as n}from"../../../core/lang.js";import r from"../../../geometry/SpatialReference.js";import{polygonCentroid as i,extentCentroid as a}from"../../../geometry/support/centroid.js";import{getPolygonExtent as o,getGeometryExtent as s,expandExtent as c}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as l}from"../../../geometry/support/quantizationUtils.js";import{isValid as u,equals as d}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as f}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as p,isCoordinate as m,cloneCurve as h}from"../../../geometry/support/curves/curveUtils.js";import g from"./AttributesBuilder.js";import{getGeometry as _,transformCentroid as v}from"./geometryUtils.js";import{project as y}from"./projectionSupport.js";import{getDateInNumber as b}from"./queryUtils.js";import{SnappingCandidateEdge as x,SnappingCandidateVertex as S}from"./SnappingCandidate.js";import{isDateField as C,isDateOnlyField as w,isTimestampOffsetField as T,isStringField as E,isTimeOnlyField as D}from"../../support/fieldUtils.js";import O from"../../../rest/support/AutoIntervalBinParameters.js";import k from"../../../rest/support/DateBinParameters.js";import{unitsDict as A}from"../../../rest/support/DateBinUtils.js";import j from"../../../rest/support/FixedBoundariesBinParameters.js";import M from"../../../rest/support/FixedIntervalBinParameters.js";import{calculateStringStatistics as N,calculateStatistics as P,processSummaryStatisticsResult as F,calculateUniqueValuesCount as I,createUVResult as L,calculateClassBreaks as R,resolveCBResult as z,calculateHistogram as B,calculatePercentile as V,binIndex as H,getBinParams as U,isNullCountSupported as W,getAttributeComparator as G}from"../../../statistics/utils.js";import{utc as K}from"../../../time/constants.js";import{DateTime as q}from"luxon";const J=t(()=>import(`../../../geometry/operators/json/convexHullOperator.js`));class Y{constructor(e,t,n){this.items=e,this.query=t,this.geometryType=n.geometryType,this.hasZ=!!t.returnZ&&n.hasZ,this.hasM=!!t.returnM&&n.hasM,this.fieldsIndex=n.fieldsIndex,this.spatialReference=n.spatialReference,this.featureAdapter=n.featureAdapter,this.featureIdInfo=n.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){let e=new g(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);let{groupByFieldsForStatistics:t,having:n,outStatistics:r}=this.query;if(!t?.length)return 1;let i=new Map,a=new Map,o=new Set;for(let s of r){let{statisticType:r}=s,c=r===`exceedslimit`?void 0:s.onStatisticField;if(!a.has(c)){let n=[];for(let r of t){let t=this._getAttributeValues(e,r,this.items,i);n.push(t)}a.set(c,this._calculateUniqueValues(n,this.items,e.returnDistinctValues))}let l=a.get(c);for(let t in l){let{data:r,items:i}=l[t],a=r.join(`,`);(!n||e.validateItems(i,n))&&o.add(a)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>e.statisticType===`exceedslimit`)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){let t=this.query.geometry;e.queryGeometry={spatialReference:this.query.outSR,...u(this.query.outSR)&&!d(t.spatialReference,this.query.outSR)?y(t,t.spatialReference,this.query.outSR):t}}return e}createSnappingResponse(e,t,n){let r=this.featureAdapter,{point:i}=e,a=typeof e.distance==`number`?e.distance:e.distance.x,o=typeof e.distance==`number`?e.distance:e.distance.y;function s(e,t){let n=(e-i.x)/a,r=(t-i.y)/o;return n*n+r*r}let c={candidates:[]},l=this.geometryType===`esriGeometryPolygon`,u=this.geometryType===`esriGeometryPolyline`||this.geometryType===`esriGeometryPoint`,d=this._getPointCreator(t,this.spatialReference,n),g=new Q(null,0),_=new Q(null,0),v={x:0,y:0,z:0};for(let e of this.items){let t=r.getObjectId(e),n=r.getGeometryWithCurves?.(e);if(n!=null){b(n,t);continue}let i=r.getGeometry(e);i!=null&&y(i,t)}return c.candidates.sort((e,t)=>e.distance-t.distance),c;function y(t,n){let{coords:r,stride:a}=t,o=t.isPoint?ee:t.lengths;if(g.coords=r,_.coords=r,e.returnEdge){let e=0;for(let t=0;t<o.length;t++){let r=o[t],u=e;for(let t=0;t<r;t++,e+=a){if(!l&&t===r-1||(g.coordsIndex=e,_.coordsIndex=t===r-1?u:e+a,!Z(v,i,g,_)))continue;let o=s(v.x,v.y);o<=1&&c.candidates.push(new x(n,d(v),Math.sqrt(o),d(g),d(_)))}}}if(e.vertexMode===`all`){let e=0;for(let t=0;t<o.length;t++){let r=o[t],i=e,u=_;u.coordsIndex=i;for(let t=0;t<r;t++,e+=a){if(g.coordsIndex=e,l&&t===r-1&&g.x===u.x&&g.y===u.y)continue;let i=s(g.x,g.y);i<=1&&c.candidates.push(new S(n,d(g),Math.sqrt(i)))}}}else if(u&&e.vertexMode===`ends`){let e=0,t=[];for(let n=0;n<o.length;n++){t.push(e);let r=o[n];e+=r*a,r>1&&t.push(e-a)}for(let e of t){g.coordsIndex=e;let t=s(g.x,g.y);t<=1&&c.candidates.push(new S(n,d(g),Math.sqrt(t)))}}}function b(t,n){let{candidates:r}=c,a={x:0,y:0,z:0};if(e.returnEdge){let e=[i.x,i.y],o=new Q(e,0),c=new Q(e,0);for(let{segments:i}of t.parts)for(let{start:t,curve:l}of i){let{curvePoint:i}=f(t,l,e),u=s(...i);if(u>1)continue;[a.x,a.y]=i,o.coords=t,c.coords=p(l);let g=m(l)?null:h(l);r.push(new x(n,d(a),Math.sqrt(u),d(o),d(c),!1,g))}}function o(e){a.x=t.vertexXY[e*2],a.y=t.vertexXY[e*2+1];let i=s(a.x,a.y);i>1||(a.z=t.vertexZ?.[e]??0,r.push(new S(n,d(a),Math.sqrt(i))))}if(e.vertexMode===`all`){let{vertexCount:e}=t;for(let t=0;t<e;++t)o(t)}else if(e.vertexMode===`ends`)switch(t.type){case`point`:o(0);break;case`polyline`:for(let e=0;e<t.partCount;++e){let n=t.partOffsets[e],r=t.partOffsets[e+1]-1;o(n),r!==n&&o(r)}}}}_getPointCreator(e,t,n){let r=n!=null&&!d(t,n)?e=>y(e,t,n):e=>e,{hasZ:i}=this;return i&&e?({x:e,y:t,z:n})=>r({x:e,y:t,z:n}):({x:e,y:t})=>r({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,minValue:o,maxValue:s,scale:c,timeZone:l,outStatisticTypes:u}=e,d=this.fieldsIndex.get(t),f=C(d)||w(d)||T(d),p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:c,timeZone:l},this.items),m=W({normalizationType:i,normalizationField:r,minValue:o,maxValue:s}),h={value:.5,fieldType:d?.type},g=E(d)?N({values:p,supportsNullCount:m,percentileParams:h,outStatisticTypes:u}):P({values:p,minValue:o,maxValue:s,useSampleStdDev:!i,supportsNullCount:m,percentileParams:h,outStatisticTypes:u});return F(g,u,f)}async createUniqueValuesResponse(e){let{field:t,valueExpression:n,domains:r,returnAllCodedValues:i,scale:a,timeZone:o}=e,s=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:n,scale:a,timeZone:o},this.items,!1),c=I(s);return L(c,r,i,e.fieldDelimiter)}async createClassBreaksResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items),m=R(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u});return z(m,o)}async createHistogramResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items);return B(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u})}_sortFeatures(e,t,n){if(e.length>1&&t?.length)for(let r of t.slice().reverse()){let{compare:t,fieldOrExpression:i,fieldInfo:a}=$(r,this.fieldsIndex);e.sort((e,r)=>t(n(e,i,a),n(r,i,a)))}}_topNFeatures(t,n,r,i){if(t.length>1&&n?.length){let a=n.map(e=>{let{compare:t,fieldOrExpression:n,fieldInfo:r}=$(e,this.fieldsIndex);return(e,a)=>t(i(e,n,r),i(a,n,r))}).reduceRight((e,t)=>(n,r)=>{let i=t(n,r);return i!==0&&!Number.isNaN(i)?i:e(n,r)}),o=[];for(let n of t)e(o,n,r,a);return o}return t.slice(0,r)}_createFeatureQueryResponse(e){let{items:t,geometryType:n,hasM:r,hasZ:i,featureIdInfo:a,spatialReference:o}=this,{outFields:s,outSR:c,quantizationParameters:u,resultRecordCount:d,resultOffset:f,returnZ:p,returnM:m}=e,h=d!=null&&t.length>(f||0)+d,g=s&&(s.includes(`*`)?[...this.fieldsIndex.fields]:s.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:h,features:this._createFeatures(e,t),fields:g,geometryType:n,hasM:r&&m,hasZ:i&&p,objectIdFieldName:a.type===`object-id`?a.fieldName:null,spatialReference:c||o,transform:u&&l(u)||null}}_createFeatures(e,t){let n=new g(e,this.featureAdapter,this.fieldsIndex),{hasM:r,hasZ:i}=this,{orderByFields:a,quantizationParameters:o,returnGeometry:s,returnCentroid:c,maxAllowableOffset:u,resultOffset:d,resultRecordCount:f,returnZ:p=!1,returnM:m=!1}=e,h=i&&p,y=r&&m,b,x=d||0,S=f==null?null:x+f;S!=null&&S<=5e3&&S<t.length?b=this._topNFeatures(t,a,S,(e,t,r)=>n.getFieldValue(e,t,r)):(b=[...t],this._sortFeatures(b,a,(e,t,r)=>n.getFieldValue(e,t,r))),(x>0||S!=null)&&(b=b.slice(x,S??void 0));let C=[],w=0;if(!this.geometryType||!s&&!c)for(let e of b){let t=n.getAttributes(e);t&&(C[w++]=this._addFeatureJSONMetadata(e,{attributes:t}))}else{let e=l(o)??void 0,t=this.geometryType===`esriGeometryPolygon`||this.geometryType===`esriGeometryPolyline`;if(s&&!c)for(let r of b){let i=this.featureAdapter.getGeometry(r),a=this._addFeatureJSONMetadata(r,{attributes:n.getAttributes(r),geometry:_(this.geometryType,i,u,e,h,y)});t&&i&&!a.geometry&&(a.centroid=v(this,this.featureAdapter.getCentroid(r,this),e)),C[w++]=a}else if(!s&&c)for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:v(this,this.featureAdapter.getCentroid(t,this),e)});else for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:v(this,this.featureAdapter.getCentroid(t,this),e),geometry:_(this.geometryType,this.featureAdapter.getGeometry(t),u,e,h,y)})}return C}_addFeatureJSONMetadata(e,t){let n=this.featureAdapter.getMetadata?.(e);return n!==void 0&&(t.metadata=n),t}_createExceedsLimitQueryResponse(){let e=!1,t=1/0,n=1/0,r=1/0;for(let e of this.query.outStatistics??[])if(e.statisticType===`exceedslimit`){t=e.maxPointCount==null?1/0:e.maxPointCount,n=e.maxRecordCount==null?1/0:e.maxRecordCount,r=e.maxVertexCount==null?1/0:e.maxVertexCount;break}return e=this.geometryType===`esriGeometryPoint`?this.items.length>t:this.items.length>n||this.items.reduce((e,t)=>e+(this.featureAdapter.getGeometry(t)?.size??0),0)>r,{fields:[{name:`exceedslimit`,type:`esriFieldTypeInteger`,alias:`exceedslimit`,sqlType:`sqlTypeInteger`,domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,n={attributes:{}}){let r=[],i=new Map,a=new Map,o=new Map,s=new Map,c=new g(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:d,orderByFields:f,resultRecordCount:p}=e,m=u?.length,h=!!m,_=h?u[0]:null,v=h&&!this.fieldsIndex.get(_);for(let f of l??[]){let{outStatisticFieldName:l,statisticType:p}=f,g=f,y=p===`exceedslimit`?void 0:f.onStatisticField,b=p===`percentile_disc`||p===`percentile_cont`,x=p===`EnvelopeAggregate`||p===`CentroidAggregate`||p===`ConvexHullAggregate`,S=h&&m===1&&(y===_||v)&&p===`count`;if(h){if(!o.has(y)){let e=[];for(let n of u){let r=this._getAttributeValues(c,n,t,i);e.push(r)}o.set(y,this._calculateUniqueValues(e,t,!x&&c.returnDistinctValues))}let n=o.get(y);if(!n)continue;let r=Object.keys(n);for(let a of r){let{count:r,data:o,items:f,itemPositions:p}=n[a],m=o.join(`,`);if(!d||c.validateItems(f,d)){let n=s.get(m)||{attributes:{}};if(e.returnAggIds&&(n.aggregateIds=f.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null)),x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(g,f);n.aggregateGeometries[t]=e}else{let e=null;if(S)e=r;else{let n=this._getAttributeValues(c,y,t,i),r=p.map(e=>n[e]);e=b&&`statisticParameters`in g?this._getPercentileValue(g,r):this._getStatisticValue(g,r,null,c.returnDistinctValues)}n.attributes[l]=e}let a=0;u.forEach((e,t)=>n.attributes[this.fieldsIndex.get(e)?e:`EXPR_${++a}`]=o[t]),s.set(m,n)}}}else if(x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:r}=await this._getAggregateGeometry(g,t);n.aggregateGeometries[r]=e}else{let e=this._getAttributeValues(c,y,t,i);n.attributes[l]=b&&`statisticParameters`in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,a,c.returnDistinctValues)}let C=(p===`min`||p===`max`)&&(E(this.fieldsIndex.get(y))||this._isAnyDateField(y))?this.fieldsIndex.get(y)?.type:null;r.push({name:l,alias:l,type:C||`esriFieldTypeDouble`})}let y=h?Array.from(s.values()):[n];return this._sortFeatures(y,f,(e,t)=>e.attributes[t]),p&&(y.length=Math.min(p,y.length)),{fields:r,features:y}}_isAnyDateField(e){let t=this.fieldsIndex.get(e);return C(t)||w(t)||T(t)||D(t)}async _getAggregateGeometry(e,t){let{statisticType:n,outStatisticFieldName:r}=e,{featureAdapter:s,spatialReference:c,geometryType:l}=this,u=t.map(e=>_(l,s.getGeometry(e))),d={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:f}=await J.getImportPromise(),[p]=f(u,{merge:!0});if(p&&p.rings[0].length<=3&&(p=null),n===`EnvelopeAggregate`)d.aggregateGeometries={...p?o(p):X(u),spatialReference:c},d.outStatisticFieldName=r||`extent`;else if(n===`CentroidAggregate`){let[e,t]=p?i(p):a(X(u));d.aggregateGeometries={x:e,y:t,spatialReference:c},d.outStatisticFieldName=r||`centroid`}else n===`ConvexHullAggregate`&&(d.aggregateGeometries=p&&{...p,spatialReference:c},d.outStatisticFieldName=r||`convexHull`);return d}_getStatisticValue(e,t,n,r){let{onStatisticField:i,statisticType:a}=e,o=null;return o=n?.has(i)?n.get(i):E(this.fieldsIndex.get(i))||this._isAnyDateField(i)?N({values:t,returnDistinct:r}):P({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),n&&n.set(i,o),o[a===`var`?`variance`:a]}_getPercentileValue(e,t){let{onStatisticField:n,statisticParameters:r,statisticType:i}=e,{value:a,orderBy:o}=r,s={value:a,orderBy:o,fieldType:this.fieldsIndex.get(n)?.type,isDiscrete:i===`percentile_disc`};return V(t,s)}_getAttributeValues(e,t,n,r){if(r.has(t))return r.get(t);let i=this.fieldsIndex.get(t),a=n.map(n=>e.getFieldValue(n,t,i));return r.set(t,a),a}_calculateUniqueValues(e,t,n){let r={},i=t.length;for(let a=0;a<i;a++){let i=t[a],o=[];for(let t of e)o.push(t[a]);let s=o.join(`,`);r[s]==null?r[s]={count:1,data:o,items:[i],itemPositions:[a]}:(n||r[s].count++,r[s].items.push(i),r[s].itemPositions.push(a))}return r}async _getDataValues(e,t,i=!0){let a=new g(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:o,scale:s,timeZone:c}=e,l=r.fromJSON(this.query.outSR||this.spatialReference);return o?a.getExpressionValues(t,o,{viewingMode:`map`,scale:s,spatialReference:l},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},c):a.getDataValues(t,n(e),i)}_calculateHistogramBins(e,t,n){if(t.min==null&&t.max==null)return[];let r=t.intervals,i=t.min??0,a=t.max??0,o=r.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){let s=e[t],c=n[t];if(s!=null&&s>=i&&s<=a){let e=H(r,s);e>-1&&(o[e].count++,o[e].items.push(c))}}return o}async createQueryBinsResponse(e){let t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);let{value:n,outAlias:r,valueType:i}=t,a=[],o=[{name:r??n,alias:r??n,type:i??`esriFieldTypeString`},{name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`}],s=new g(e,this.featureAdapter,this.fieldsIndex),c=new Map,l=[...this.items];this._sortFeatures(l,[n],(e,t,n)=>s.getFieldValue(e,t,n));let u=this._getAttributeValues(s,n,l,c),d=this._calculateUniqueValues([u],l,s.returnDistinctValues);for(let t in d){let{items:i}=d[t],s=await this._createBinsResponse(e,i);if(a.push(...s.features.map(e=>({...e,attributes:{...e.attributes,[r??n]:t}}))),s.fields)for(let e of s.fields)o.some(t=>t.name===e.name)||o.push(e)}return{fields:o,features:a}}async _createBinsResponse(e,t){let n=e.bin;switch(t??=this.items,n.type){case`autoIntervalBin`:return this._createAutoIntervalBinsResponse(O.fromJSON(n),e,t);case`dateBin`:return this._createDateBinsResponse(k.fromJSON(n),e,t);case`fixedBoundariesBin`:return this._createFixedBoundariesBinsResponse(j.fromJSON(n),e,t);case`fixedIntervalBin`:return this._createFixedIntervalBinsResponse(M.fromJSON(n),e,t)}}async _createAutoIntervalBinsResponse(e,t,n){let{field:r,normalizationField:i,numBins:a,normalizationType:o,normalizationTotal:s,start:c,end:l}=e,u=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),d=U(u,{field:r,normalizationField:i,normalizationType:o,normalizationTotal:s,numBins:a,minValue:b(o?e.normalizationMinValue:c,!1),maxValue:b(o?e.normalizationMaxValue:l,!1)}),f=this._calculateHistogramBins(u,d,n);return this._createFeaturesFromHistogramBins(f,t)}async _createDateBinsResponse(e,t,n){let{field:r,interval:i,start:a,end:o,snapToData:s,returnFullIntervalBin:c,offset:l,firstDayOfWeek:u}=e,d=i.unit,f=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),p=D(this.fieldsIndex.get(r)),m=A.toJSON(d),h=f.filter(Boolean).sort((e,t)=>e-t),g=a==null?h[0]:b(a,p),_=o==null?h[h.length-1]:b(o,p),v=[];if(g!=null&&_!=null){let e={zone:t.outTimeReference?.ianaTimeZone??K},n={[l?.unit?A.toJSON(l.unit):`milliseconds`]:l?.value||0},r=q.fromMillis(g,e).minus(n),a=q.fromMillis(_,e).minus(n),o=typeof u==`number`&&u>=1&&u<=7?u:7,d=(e,t)=>{let n=(e.weekday-t+7)%7;return e.minus({days:n}).startOf(`day`)},f=(e,t)=>d(e,t).plus({days:7});if(s===`last`){let e=m===`week`?f(a,o):a;for(;e>r;){let t=e.minus({[m]:i.value});if(t<r){v.unshift([c?t.plus(n).toMillis():r.plus(n).toMillis(),e.plus(n).toMillis()]);break}v.unshift([t.plus(n).toMillis(),e.plus(n).toMillis()]),e=t}}else{let e=s===`first`?r:m===`week`?d(r,o):r.startOf(m);for(;e<=a;){let t=e.plus({[m]:i.value});if(t>a){v.push([e.plus(n).toMillis(),c?t.plus(n).toMillis():a.plus(n).toMillis()]);break}v.push([e.plus(n).toMillis(),t.plus(n).toMillis()]),e=t}}}let y=this._calculateHistogramBins(f,{intervals:v,min:g,max:_},n);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,n){let{field:r}=e,i=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),a=D(this.fieldsIndex.get(r)),o=e.boundaries.map(e=>b(e,a)).sort((e,t)=>e-t),s=[];for(let e=0;e<o.length-1;e++)s.push([o[e],o[e+1]]);let c={intervals:s,min:o.at(0),max:o.at(-1)},l=this._calculateHistogramBins(i,c,n);return this._createFeaturesFromHistogramBins(l,t)}async _createFixedIntervalBinsResponse(e,t,n){let{field:r,interval:i,normalizationType:a,start:o,end:s}=e,c=await this._getDataValues({field:r||e.expression,normalizationField:e.normalizationField,normalizationType:a,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),l=D(this.fieldsIndex.get(r)),u=U(c,{field:r,classificationMethod:`defined-interval`,definedInterval:i,minValue:b(a?e.normalizationMinValue:o,l),maxValue:b(a?e.normalizationMaxValue:s,l)},!0),d=this._calculateHistogramBins(c,u,n);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){let{upperBoundaryAlias:n,lowerBoundaryAlias:r}=t,i=r||`lowerBoundary`,a=n||`upperBoundary`,o=[],s=[{name:i,alias:i,type:`esriFieldTypeDouble`},{name:a,alias:a,type:`esriFieldTypeDouble`}],c=t.bin?.stackBy?.value,l=t.bin?.stackBy?.outAlias;c&&s.push({name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`},{name:l??c,alias:l??c,type:`esriFieldTypeString`});let u=0,d=t.bin.type===`dateBin`,f=t.outTimeReference?.ianaTimeZone;for(let n of e){let{minValue:e,maxValue:r,items:p}=n,m={attributes:{}};m.attributes[i]=d&&f&&e!=null?q.fromMillis(e,{zone:f}).toISO():e,t.bin.hideUpperBound||(m.attributes[a]=d&&f&&r!=null?q.fromMillis(r,{zone:f}).toISO():r),t.returnAggIds&&(m.aggregateIds=p.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null));let h;if(c?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[c],orderByFields:[c]},p),m.attributes.bin=++u,t.bin.jsonStyle===`flat`?o.push(...h.features.map(({attributes:{EXPR_1:e,...t},...n})=>({...n,attributes:l??e?{...t,[l??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>l??e?{...t,[l??e]:e}:t),o.push(m))):(t.bin?.splitBy&&(m.attributes.bin=++u),h=await this._createStatisticsQueryResponse(t,p,m),o.push(m)),h.fields)for(let e of h.fields)s.some(t=>t.name===e.name)||s.push(e)}return t.binOrder===`desc`&&o.reverse(),{fields:s,features:o}}}function X(e){let t=s(e[0]);for(let n of e.slice(1))c(t,s(n));return t}function Z(e,t,n,r){let i=r.x-n.x,a=r.y-n.y,o=t.x-n.x,s=t.y-n.y,c=i*i+a*a;if(c===0)return!1;let l=o*i+s*a,u=Math.min(1,Math.max(0,l/c));return e.x=n.x+i*u,e.y=n.y+a*u,!0}class Q{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const ee=[1];function $(e,t){let n=e.split(` `),r=n[0],i=t.get(r),a=n[1]?n[1].toLowerCase()===`desc`:!1;return{compare:G(i?.type,a,`case-insensitive`),fieldOrExpression:r,fieldInfo:i}}export{Y as QueryEngineResult};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{generalizeOptimizedGeometry as e,quantizeOptimizedGeometry as t,convertToGeometry as n,convertToPoint as r}from"../featureConversionUtils.js";function i(e,n,i,a=e.hasZ,o=e.hasM){if(n==null)return null;let s=e.hasZ&&a,c=e.hasM&&o;if(i){let e=t(n,`esriGeometryPoint`,i,a,o);return r(e,s,c)}return r(n,s,c)}function a(r,i,a,o,s,c){if(i==null)return null;let l=`coords`in i?i:i.geometry;if(l==null)return null;let{hasZ:u,hasM:d}=l,f=u&&(s??=u),p=d&&(c??=d);if(a){let i=e(l,r,a,s,c);return o&&(i=t(i,r,o)),n(i,r,f,p)}if(o){let e=t(l,r,o,s,c);return n(e,r,f,p)}return n(l,r,f,p)}
|
|
2
|
+
import{generalizeOptimizedGeometry as e,quantizeOptimizedGeometry as t,convertToGeometry as n,convertToPoint as r}from"../featureConversionUtils.js";function i(e,n,i,a=e.hasZ,o=e.hasM){if(n==null)return null;let s=e.hasZ&&a,c=e.hasM&&o;if(i){let e=t(n,`esriGeometryPoint`,i,a,o);return r(e,s,c)}return r(n,s,c)}function a(r,i,a,o,s,c){if(i==null)return null;let l=`coords`in i?i:i.geometry;if(l==null)return null;let{hasZ:u,hasM:d}=l,f=u&&(s??=u),p=d&&(c??=d);if(a){let i=e(l,r,a,s,c);return o&&(i=t(i,r,o)),n(i,r,f,p)}if(o){let e=t(l,r,o,s,c);return n(e,r,f,p)}return n(l,r,f,p)}export{a as getGeometry,i as transformCentroid};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{isSome as e}from"../../../core/arrayUtils.js";import{initializeProjection as t,projectMany as n}from"../../../geometry/projectionUtils.js";import{isPoint as r,isExtent as i,isPolygon as a,isPolyline as o,isMultipoint as s}from"../../../geometry/support/jsonTypeUtils.js";import{isValid as c,equals as l,isWebMercator as u}from"../../../geometry/support/spatialReferenceUtils.js";import{canProject as d,lngLatToXY as f,xyToLngLat as p}from"../../../geometry/support/webMercatorUtils.js";const m=[0,0];function h(e,t){let n=u(e)?f:p;if(r(t)){let e={x:0,y:0};return[e.x,e.y]=n(t.x,t.y,m),t.z!=null&&(e.z=t.z),t.m!=null&&(e.m=t.m),e}if(i(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=n(t.xmin,t.ymin,m),[e.xmax,e.ymax]=n(t.xmax,t.ymax,m),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if(a(t))return{rings:g(t.rings,n),hasM:t.hasM,hasZ:t.hasZ};if(o(t))return{paths:g(t.paths,n),hasM:t.hasM,hasZ:t.hasZ};if(s(t))return{points:_(t.points,n),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function g(e,t){let n=[];for(let r of e)n.push(_(r,t));return n}function _(e,t){let n=[];for(let r of e){let e=t(r[0],r[1],[0,0]);n.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return n}async function v(n,r){if(!n||!r)return;let i=Array.isArray(n)?n.map(e=>e.geometry==null?null:e.geometry.spatialReference).filter(e):[n];await t(i.map(e=>({source:e,dest:r})))}function y(e,t,r,i){if(!e)return null;if(r||(r=t,t=e.spatialReference),!c(t)||!c(r)||l(t,r))return e;if(d(t,r)){let t=h(r,e);return t.spatialReference=r,t}
|
|
2
|
+
import{isSome as e}from"../../../core/arrayUtils.js";import{initializeProjection as t,projectMany as n}from"../../../geometry/projectionUtils.js";import{isPoint as r,isExtent as i,isPolygon as a,isPolyline as o,isMultipoint as s}from"../../../geometry/support/jsonTypeUtils.js";import{isValid as c,equals as l,isWebMercator as u}from"../../../geometry/support/spatialReferenceUtils.js";import{canProject as d,lngLatToXY as f,xyToLngLat as p}from"../../../geometry/support/webMercatorUtils.js";const m=[0,0];function h(e,t){let n=u(e)?f:p;if(r(t)){let e={x:0,y:0};return[e.x,e.y]=n(t.x,t.y,m),t.z!=null&&(e.z=t.z),t.m!=null&&(e.m=t.m),e}if(i(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=n(t.xmin,t.ymin,m),[e.xmax,e.ymax]=n(t.xmax,t.ymax,m),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if(a(t))return{rings:g(t.rings,n),hasM:t.hasM,hasZ:t.hasZ};if(o(t))return{paths:g(t.paths,n),hasM:t.hasM,hasZ:t.hasZ};if(s(t))return{points:_(t.points,n),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function g(e,t){let n=[];for(let r of e)n.push(_(r,t));return n}function _(e,t){let n=[];for(let r of e){let e=t(r[0],r[1],[0,0]);n.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return n}async function v(n,r){if(!n||!r)return;let i=Array.isArray(n)?n.map(e=>e.geometry==null?null:e.geometry.spatialReference).filter(e):[n];await t(i.map(e=>({source:e,dest:r})))}function y(e,t,r,i){if(!e)return null;if(r||(r=t,t=e.spatialReference),!c(t)||!c(r)||l(t,r))return e;if(d(t,r)){let t=h(r,e);return t.spatialReference=r,t}let[a]=n([e],t,r,i);return a}class b{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,r){if(!e?.length||!t||!n||l(t,n))return e;let i={geometries:e,inSpatialReference:t,outSpatialReference:n,options:r,resolve:Promise.withResolvers()};return this._jobs.push(i),this._timer??=setTimeout(this._process,10),i.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let{geometries:t,inSpatialReference:r,outSpatialReference:i,resolve:a,options:o}=e,s=t.filter(e=>e!=null),c;c=d(r,i)&&o?.extendedParams==null?s.map(e=>h(i,e)):n(s,r,i,o);let l=0,u=t.map(e=>e==null?null:c[l++]);a.resolve(u),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}}const x=new b;function S(e,t,n,r){return x.push(e,t,n,r)}export{v as checkProjectionSupport,y as project,S as projectMany};
|