@arcgis/core 5.0.0-next.124 → 5.0.0-next.126
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/applications/Components/applySetUtils.d.ts +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{a327f36561f093dc0fab.js → 19fcc74d34cbbaa56a41.js} +1 -1
- package/assets/esri/core/workers/chunks/1ce46085095679386580.js +1 -0
- package/assets/esri/core/workers/chunks/{a2f38e86acf45272dbc2.js → 214323c62d6d3b603a00.js} +1 -1
- package/assets/esri/core/workers/chunks/215c54520d0da638fe57.js +1 -0
- package/assets/esri/core/workers/chunks/249630af2fb01257eb75.js +1 -0
- package/assets/esri/core/workers/chunks/3214763f268622f09986.js +1 -0
- package/assets/esri/core/workers/chunks/{18c05353d6d8950d1491.js → 36215b2c0b1020743458.js} +1 -1
- package/assets/esri/core/workers/chunks/{2badadf8032e166b34ec.js → 3f3c63420644f9522ab1.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f70a41258b2a0157aa5.js → 3fa59195286af30932d9.js} +1 -1
- package/assets/esri/core/workers/chunks/41108f58f0f439ebba3f.js +1 -0
- package/assets/esri/core/workers/chunks/4fe210314813ea1f7a26.js +1 -0
- package/assets/esri/core/workers/chunks/52705ccbb452a3edb064.js +1 -0
- package/assets/esri/core/workers/chunks/54c545f44b7ce21fb604.js +1 -0
- package/assets/esri/core/workers/chunks/{cfdb17522112c52f81ad.js → 558e9fed2e58cbbf9947.js} +1 -1
- package/assets/esri/core/workers/chunks/56e3c34ebdee61ff4b33.js +1 -0
- package/assets/esri/core/workers/chunks/{b50d2d3379654de1f2f3.js → 58134617fb7530836b81.js} +1 -1
- package/assets/esri/core/workers/chunks/58c4be467a922fe37f01.js +1 -0
- package/assets/esri/core/workers/chunks/{f0582d8111ec825e1f9a.js → 651b46aeabf22ff53a38.js} +1 -1
- package/assets/esri/core/workers/chunks/{90316fb569389d48920f.js → 666f201d222c50ab8428.js} +1 -1
- package/assets/esri/core/workers/chunks/6988517cb09928fed0f8.js +1 -0
- package/assets/esri/core/workers/chunks/6bf7d8de86b9eb76f920.js +1 -0
- package/assets/esri/core/workers/chunks/6c0b7890c8eec7febe28.js +1 -0
- package/assets/esri/core/workers/chunks/{25267253ba578eba38cf.js → 754e4d0b8c1ad392bd83.js} +1 -1
- package/assets/esri/core/workers/chunks/7ec83fc059325e207825.js +1 -0
- package/assets/esri/core/workers/chunks/7f385e9c88df3395e678.js +1 -0
- package/assets/esri/core/workers/chunks/{66ed527cd8ad11d008be.js → 80d51d58db09b9f96cb5.js} +1 -1
- package/assets/esri/core/workers/chunks/81c758bdc07ed9d9a132.js +1 -0
- package/assets/esri/core/workers/chunks/{8670d9d11950f3c61b79.js → 83711695e16912e9b9c5.js} +1 -1
- package/assets/esri/core/workers/chunks/a143a6f8e2f21548b244.js +1 -0
- package/assets/esri/core/workers/chunks/a4947d5d2fa6b7bd399b.js +1 -0
- package/assets/esri/core/workers/chunks/{1f30558e3ad6ac68bdb8.js → b4203e488bb928ff8032.js} +1 -1
- package/assets/esri/core/workers/chunks/b4b16914950792c46bd3.js +1 -0
- package/assets/esri/core/workers/chunks/{360b3499e2a671c309ce.js → b6969a42602517a6ef1c.js} +1 -1
- package/assets/esri/core/workers/chunks/{1aa2187597f7c4adb67f.js → bcb254cb7297fec88679.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d1a772abd730b61854f.js → bd2125e0a68378533641.js} +1 -1
- package/assets/esri/core/workers/chunks/{d76dfac06299cbd4f00e.js → c0b6706f86665cec85f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{f114da7ef2b891184e77.js → c3c6d337ff53e5d921e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{b5f68e1fdbaca3cd9c8d.js → c941b716ea3c13cabc80.js} +1 -1
- package/assets/esri/core/workers/chunks/c99f36159b5ed6f9267e.js +1 -0
- package/assets/esri/core/workers/chunks/cf4202ad468501ef24cf.js +1 -0
- package/assets/esri/core/workers/chunks/{e2dc7e6b84e9b38ef9fe.js → d2017b0b27b9e4ada922.js} +1 -1
- package/assets/esri/core/workers/chunks/{4742a8c19b86a5f859f0.js → d47ca631e109144b6ba9.js} +1 -1
- package/assets/esri/core/workers/chunks/{38124ee5119e614645c9.js → d78b2f85ec9212a973e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{7cd4280d24b24045bd7e.js → d8adab2d55b39241b232.js} +1 -1
- package/assets/esri/core/workers/chunks/e0519f24430fecead87b.js +1 -0
- package/assets/esri/core/workers/chunks/e33f5780fb45ac7ca889.js +1 -0
- package/assets/esri/core/workers/chunks/{eb9e913fe0dfcc71cf92.js → e4611ebd7dba7692a914.js} +1 -1
- package/assets/esri/core/workers/chunks/{86f2ec2692363abc97d1.js → e52793690dff1a199647.js} +1 -1
- package/assets/esri/core/workers/chunks/{c13efb74aa4602f6a1ee.js → e56a10a475ce128b5fce.js} +1 -1
- package/assets/esri/core/workers/chunks/ea633a6a3b9ea8ce965d.js +1 -0
- package/assets/esri/core/workers/chunks/eae1c098c16e2faaf90d.js +1 -0
- package/assets/esri/core/workers/chunks/{8650fbe1db55b7280c00.js → ef4237dc7b67c9039826.js} +1 -1
- package/assets/esri/core/workers/chunks/f5f513997cde0ce0f2a2.js +1 -0
- package/assets/esri/core/workers/chunks/fcc8d0b60f7c2397e550.js +1 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/SpatialReference.js +1 -1
- package/chunks/containsOperator.js +1 -1
- package/chunks/disjointOperator.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +0 -31
- package/{layers/graphics/editingSupport.d.ts → editing/types.d.ts} +8 -8
- package/editing/types.js +2 -0
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/support/zscale.js +1 -1
- package/graphic/KnowledgeGraphGraphicOrigin.d.ts +0 -1
- package/graphic/LinkChartGraphicOrigin.js +1 -1
- package/interfaces.d.ts +60 -60
- package/kernel.js +1 -1
- package/layers/CSVLayer.d.ts +317 -540
- package/layers/CSVLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +13 -13
- package/layers/FeatureLayer.js +1 -1
- package/layers/GeoJSONLayer.d.ts +4 -4
- package/layers/OrientedImageryLayer.d.ts +6 -6
- package/layers/SceneLayer.d.ts +2 -2
- package/layers/SubtypeGroupLayer.d.ts +5 -5
- package/layers/graphics/applyEditsUtils.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/EditBusLayer.d.ts +1 -1
- package/layers/raster/functions/ExtractBandFunction.js +1 -1
- package/layers/support/SubtypeSublayer.d.ts +5 -5
- package/layers/support/capabilities.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/networks/support/Circuit.d.ts +11 -2
- package/networks/support/CircuitSection.d.ts +3 -2
- package/package.json +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/featureService/types.d.ts +7 -1
- package/rest/query/operations/editsZScale.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMCursor.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/cim/placements/PlacementAtExtremities.js +1 -1
- package/symbols/cim/placements/PlacementAtMeasuredUnits.js +1 -1
- package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
- package/symbols/cim/placements/PlacementOnLine.js +1 -1
- package/symbols/cim/placements/PlacementOnVertices.js +1 -1
- package/symbols/cim/types.d.ts +7 -0
- package/versionManagement/VersionManagementService.d.ts +3 -2
- package/views/2d/analysis/DistanceMeasurement/utils.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/BezierSegmentPlugin.js +1 -1
- package/views/draw/plugins/CircularArcSegmentPlugin.js +1 -1
- package/views/draw/plugins/FreehandSegmentPlugin.js +1 -1
- package/views/draw/plugins/MultipointPlugin.js +1 -1
- package/views/draw/plugins/PointPlugin.js +1 -1
- package/views/draw/plugins/PolygonPlugin.js +1 -1
- package/views/draw/plugins/PolylinePlugin.js +1 -1
- package/views/draw/plugins/ShapePlugin.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDynamic.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/webscene/Glow.d.ts +10 -2
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Home/HomeViewModel.d.ts +2 -1
- package/widgets/Home/HomeViewModel.js +1 -1
- package/widgets/Home.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/types.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/assets/esri/core/workers/chunks/0184b4c0c92c76c60ab2.js +0 -1
- package/assets/esri/core/workers/chunks/0bf742d48f434c4c575f.js +0 -1
- package/assets/esri/core/workers/chunks/15ba0296403dd4152b88.js +0 -1
- package/assets/esri/core/workers/chunks/1701d9c50610f0b2dd38.js +0 -1
- package/assets/esri/core/workers/chunks/231602adad900fc024f0.js +0 -1
- package/assets/esri/core/workers/chunks/27aa21da934ecaca381a.js +0 -1
- package/assets/esri/core/workers/chunks/2907e9a7216b5a29729b.js +0 -1
- package/assets/esri/core/workers/chunks/2b0891ba57ba66b913ce.js +0 -1
- package/assets/esri/core/workers/chunks/2cd56b7ab70f908bbbd4.js +0 -1
- package/assets/esri/core/workers/chunks/2e1fe0dd357eb7a6f47f.js +0 -1
- package/assets/esri/core/workers/chunks/2e9d280f51ab43e6f102.js +0 -1
- package/assets/esri/core/workers/chunks/2eb7df99170b7bb2a914.js +0 -1
- package/assets/esri/core/workers/chunks/36b8dd092697ef544f40.js +0 -1
- package/assets/esri/core/workers/chunks/394aa478c29599b08bf5.js +0 -1
- package/assets/esri/core/workers/chunks/4ba4aa6c75e3f8950e65.js +0 -1
- package/assets/esri/core/workers/chunks/4d45c51ff32dd75299ac.js +0 -1
- package/assets/esri/core/workers/chunks/4fdc838f4c3efab6cd61.js +0 -1
- package/assets/esri/core/workers/chunks/6321680c8070dffa3b6c.js +0 -1
- package/assets/esri/core/workers/chunks/6b02919373bd4da7ff73.js +0 -1
- package/assets/esri/core/workers/chunks/a03196e6579d738251fc.js +0 -1
- package/assets/esri/core/workers/chunks/a0b715cf03895082b773.js +0 -1
- package/assets/esri/core/workers/chunks/aec827b50df6edc54808.js +0 -1
- package/assets/esri/core/workers/chunks/c80c82acec04ee0ade04.js +0 -1
- package/assets/esri/core/workers/chunks/d27a542a406ac3fe2ad9.js +0 -1
- package/assets/esri/core/workers/chunks/d9c1e1ec5c56f09fb82f.js +0 -1
- package/assets/esri/core/workers/chunks/ec2dfd89e4ce6fda4971.js +0 -1
- package/assets/esri/core/workers/chunks/ffb73b4e8f2f7ffd2db4.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{isSome as i}from"../../../core/arrayUtils.js";import{handlesGroup as l}from"../../../core/handleUtils.js";import o from"../../../core/Logger.js";import{throwIfAborted as n}from"../../../core/promiseUtils.js";import{watch as r}from"../../../core/reactiveUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{BezierSegmentPlugin as u}from"../../../views/draw/plugins/BezierSegmentPlugin.js";import{CircularArcSegmentPlugin as c}from"../../../views/draw/plugins/CircularArcSegmentPlugin.js";import{FreehandSegmentPlugin as g}from"../../../views/draw/plugins/FreehandSegmentPlugin.js";import{MultipointPlugin as p}from"../../../views/draw/plugins/MultipointPlugin.js";import{PointPlugin as y}from"../../../views/draw/plugins/PointPlugin.js";import{PolygonPlugin as d}from"../../../views/draw/plugins/PolygonPlugin.js";import{PolylinePlugin as m}from"../../../views/draw/plugins/PolylinePlugin.js";import{ShapePlugin as P}from"../../../views/draw/plugins/ShapePlugin.js";let h=class extends t{constructor(e){super(e),this.sketch=null}get _simplePointPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-leaf-point"),localizationKey:"leaf-point-segment",kind:["vertex"],geometryType:"point",icon:"line-straight",legacyCreateTool:"point",create:()=>new y,[Symbol.toStringTag]:"Point"}}get _textPointPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-text-point"),localizationKey:"root-text",kind:["vertex"],geometryType:"point",icon:"add-text",legacyCreateTool:"text",create:()=>new y,[Symbol.toStringTag]:"Text"}}get _multipointPlugin(){const e={...this._simplePointPlugin,localizationKey:"leaf-point",icon:"point",hidden:!0};return{uniqueId:Symbol.for("esri-builtin-plugin-multipoint"),localizationKey:"root-multipoint",kind:["part"],geometryType:"multipoint",icon:"pins",legacyCreateTool:"multipoint",excludedViews:["3d"],create:()=>new p,availableDownstreamPlugins:[e],defaultDownstreamPlugin:e,[Symbol.toStringTag]:"Multipoint"}}get _freehandPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-freehand"),localizationKey:"leaf-freehand",kind:["vertex","section","part"],geometryType:"polyline",icon:"freehand",legacyCreateTool:"freehandPolyline",create(){const e=new g;return e.completeOnDragEnd=!0,e},[Symbol.toStringTag]:"Freehand"}}get _bezierPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-bezier-segment"),localizationKey:"leaf-bezier",kind:["vertex","section"],geometryType:"point",icon:"bezier-curve",excludedViews:["3d"],create:()=>new u,[Symbol.toStringTag]:"Bezier"}}get _endpointArcPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-circular-arc-segment-end-first"),localizationKey:"leaf-endpoint-arc",kind:["vertex","section"],geometryType:"point",icon:"end-point-arc-segment",excludedViews:["3d"],create:()=>new c({arcDrawingMode:"end-first"}),availableDownstreamPlugins:[],[Symbol.toStringTag]:"Endpoint Arc"}}get _interiorArcPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-circular-arc-segment-interior-first"),localizationKey:"leaf-circular-arc",kind:["vertex","section"],geometryType:"point",icon:"arc-segment",excludedViews:["3d"],create:()=>new c({arcDrawingMode:"interior-first"}),availableDownstreamPlugins:[],[Symbol.toStringTag]:"Interior Arc"}}get _singlePartPolylinePlugin(){const e=this.sketch?.visibleElements.createTools,t=!this._isExcludedByAvailableCreateTools("freehandPolyline")&&!1!==e?.freehandPolyline,l=!this._isExcludedByAvailableCreateTools("polyline")&&!1!==e?.polyline;return{uniqueId:Symbol.for("esri-builtin-plugin-simple-polyline"),localizationKey:"root-polyline",kind:["section","part"],geometryType:"polyline",legacyCreateTool:"polyline",icon:l?"line":"freehand",create:()=>new m,availableDownstreamPlugins:l?[this._simplePointPlugin,t?this._freehandPlugin:null,this._bezierPlugin,this._interiorArcPlugin,this._endpointArcPlugin].filter(i):[t?this._freehandPlugin:null].filter(i),defaultDownstreamPlugin:l?this._simplePointPlugin:this._freehandPlugin,[Symbol.toStringTag]:"Polyline"}}get _singlePartPolygonPlugin(){const e=this.sketch?.visibleElements.createTools,t=!this._isExcludedByAvailableCreateTools("freehandPolygon")&&!1!==e?.freehandPolygon,l=!this._isExcludedByAvailableCreateTools("polygon")&&!1!==e?.polygon;return{uniqueId:Symbol.for("esri-builtin-plugin-simple-polygon"),localizationKey:"root-polygon",kind:["section","part"],geometryType:"polygon",legacyCreateTool:"polygon",icon:l?"polygon":"freehand-area",create:()=>new d,availableDownstreamPlugins:l?[this._simplePointPlugin,t?this._freehandPlugin:null,this._bezierPlugin,this._interiorArcPlugin,this._endpointArcPlugin].filter(i):[t?this._freehandPlugin:null].filter(i),defaultDownstreamPlugin:l?this._simplePointPlugin:this._freehandPlugin,[Symbol.toStringTag]:"Polygon"}}get _rectanglePlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-simple-rectangle"),localizationKey:"root-rectangle",kind:["part"],geometryType:"polygon",icon:"rectangle",legacyCreateTool:"rectangle",create:()=>new P,[Symbol.toStringTag]:"Rectangle"}}get _circlePlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-simple-ellipse"),localizationKey:"root-circle",kind:["part"],geometryType:"polygon",icon:"circle",legacyCreateTool:"circle",create(){const e=new P;return e.shapeType="circle",e.defaultUniform=!0,e.defaultCentered=!0,e},[Symbol.toStringTag]:"Circle"}}set sketchViewModel(e){this._overrideIfSome("sketchViewModel",e)}get sketchViewModel(){return this.sketch?.viewModel}get effectiveRootPoint(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.point&&!this._isExcludedByAvailableCreateTools("point")?{...this._simplePointPlugin,icon:"pin",localizationKey:"root-point"}:null}get effectiveRootText(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.text&&!this._isExcludedByAvailableCreateTools("text")?this._textPointPlugin:null}get effectiveRootMultipoint(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.multipoint&&!this._isExcludedByAvailableCreateTools("multipoint")&&"3d"!==this.sketchViewModel?.view?.type?this._multipointPlugin:null}get effectiveRootPolyline(){const e=this.sketch?.visibleElements.createTools,t=!this._isExcludedByAvailableCreateTools("polyline")&&!1!==e?.polyline,i=!this._isExcludedByAvailableCreateTools("freehandPolyline")&&!1!==e?.freehandPolyline;return t||i?this._singlePartPolylinePlugin:null}get effectiveRootPolygon(){const e=this.sketch?.visibleElements.createTools,t=!this._isExcludedByAvailableCreateTools("polygon")&&!1!==e?.polygon,i=!this._isExcludedByAvailableCreateTools("freehandPolygon")&&!1!==e?.freehandPolygon;return t||i?this._singlePartPolygonPlugin:null}get effectiveRootRectangle(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.rectangle&&!this._isExcludedByAvailableCreateTools("rectangle")?this._rectanglePlugin:null}get effectiveRootCircle(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.circle&&!this._isExcludedByAvailableCreateTools("circle")?this._circlePlugin:null}get availablePlugins(){const e=[this.effectiveRootPoint,this.effectiveRootText,this.effectiveRootMultipoint,this.effectiveRootPolyline,this.effectiveRootPolygon,this.effectiveRootRectangle,this.effectiveRootCircle].filter(i),t=this.sketch?.availableCreateTools;if(!t)return e;const l=e=>{if(!e.legacyCreateTool)return Number.MAX_SAFE_INTEGER;const i=t.indexOf(e.legacyCreateTool);return-1===i?Number.MAX_SAFE_INTEGER:i};return e.map((e,t)=>({plugin:e,index:t,order:l(e)})).sort((e,t)=>e.order-t.order||e.index-t.index).map(({plugin:e})=>e)}getPluginsEquivalentToCreateTool(e,t){switch(e){case"text":return[this._textPointPlugin];case"point":return[this._simplePointPlugin];case"rectangle":return[this._rectanglePlugin];case"circle":return[this._circlePlugin];case"freehandPolyline":return[this._singlePartPolylinePlugin,this._freehandPlugin];case"freehandPolygon":return[this._singlePartPolygonPlugin,this._freehandPlugin];case"polyline":return"freehand"===t?[this._singlePartPolylinePlugin,this._freehandPlugin]:[this._singlePartPolylinePlugin,this._simplePointPlugin];case"polygon":return"freehand"===t?[this._singlePartPolygonPlugin,this._freehandPlugin]:[this._singlePartPolygonPlugin,this._simplePointPlugin];default:return null}}getDrawingModeEquivalentToPluginStack(e){const t=e.at(-1);if(t===this._freehandPlugin)return"freehand";return t===this._rectanglePlugin||t===this._circlePlugin?"hybrid":"click"}async makeRenderer(e={}){const t=this.sketchViewModel;if(!t?.view)return null;const{abortOptions:i,useTextSymbol:l}=e;return"2d"===t.view.type?await this._makeDrawToolRenderer2D({view:t.view,svm:t,useTextSymbol:l,abortOptions:i}):await this._makeDrawToolRenderer3D({view:t.view,svm:t,useTextSymbol:l,abortOptions:i})}_isExcludedByAvailableCreateTools(e){return!!this.sketch&&!this.sketch.availableCreateTools?.includes(e)}async _makeDrawToolRenderer2D(e){const{DrawToolRenderer2D:t}=await import("../../../views/2d/interactive/editingTools/draw/DrawToolRenderer2D.js"),{view:i,svm:l,useTextSymbol:o,abortOptions:r}=e;n(r);const s=o?l.textSymbol??l.pointSymbol:l.pointSymbol,a=new t({symbolOverrides:{polyline:{outputGeometry:{default:l.polylineSymbol},outline:{active:l.activeLineSymbol??void 0}},polygon:{outputGeometry:{default:l.activeFillSymbol??l.polygonSymbol}},point:{outputGeometry:{default:s},vertex:{default:l.vertexSymbol,active:l.activeVertexSymbol??void 0}}},view:i}),u=this._setupSymbolWatcher(a,l,o);return a.addHandles(u),a}async _makeDrawToolRenderer3D(e){const{view:t,svm:i,useTextSymbol:l,abortOptions:n}=e;return o.getLogger(this).warnOnce("Using DrawToolRenderer2D in 3D view. A 3D-specific implementation of DrawToolRenderer is not yet available."),this._makeDrawToolRenderer2D({view:t,svm:i,useTextSymbol:l,abortOptions:n})}_setupSymbolWatcher(e,t,i){const o=(t,i,l)=>(o,n)=>{o!==n&&e.overrideSymbol({symbol:o,geometryType:t,role:i,state:l})};return l([r(()=>t.polylineSymbol,o("polyline","outputGeometry")),r(()=>t.activeLineSymbol,o("polyline","outline","active")),r(()=>t.activeFillSymbol??t.polygonSymbol,o("polygon","outputGeometry")),r(()=>i?t.textSymbol??t.pointSymbol:t.pointSymbol,o("point","outputGeometry")),r(()=>t.vertexSymbol,o("point","vertex")),r(()=>t.activeVertexSymbol,o("point","vertex","active"))])}};e([s()],h.prototype,"_simplePointPlugin",null),e([s()],h.prototype,"_textPointPlugin",null),e([s()],h.prototype,"_multipointPlugin",null),e([s()],h.prototype,"_freehandPlugin",null),e([s()],h.prototype,"_bezierPlugin",null),e([s()],h.prototype,"_endpointArcPlugin",null),e([s()],h.prototype,"_interiorArcPlugin",null),e([s()],h.prototype,"_singlePartPolylinePlugin",null),e([s()],h.prototype,"_singlePartPolygonPlugin",null),e([s()],h.prototype,"_rectanglePlugin",null),e([s()],h.prototype,"_circlePlugin",null),e([s()],h.prototype,"sketch",void 0),e([s()],h.prototype,"sketchViewModel",null),e([s()],h.prototype,"effectiveRootPoint",null),e([s()],h.prototype,"effectiveRootText",null),e([s()],h.prototype,"effectiveRootMultipoint",null),e([s()],h.prototype,"effectiveRootPolyline",null),e([s()],h.prototype,"effectiveRootPolygon",null),e([s()],h.prototype,"effectiveRootRectangle",null),e([s()],h.prototype,"effectiveRootCircle",null),e([s()],h.prototype,"availablePlugins",null),h=e([a("esri.widgets.Sketch.support.PluginManager")],h);export{h as PluginManager};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{isSome as i}from"../../../core/arrayUtils.js";import{handlesGroup as o}from"../../../core/handleUtils.js";import l from"../../../core/Logger.js";import{throwIfAborted as n}from"../../../core/promiseUtils.js";import{watch as r}from"../../../core/reactiveUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{BezierSegmentPlugin as u}from"../../../views/draw/plugins/BezierSegmentPlugin.js";import{CircularArcSegmentPlugin as c}from"../../../views/draw/plugins/CircularArcSegmentPlugin.js";import{FreehandSegmentPlugin as g}from"../../../views/draw/plugins/FreehandSegmentPlugin.js";import{MultipointPlugin as p}from"../../../views/draw/plugins/MultipointPlugin.js";import{PointPlugin as y}from"../../../views/draw/plugins/PointPlugin.js";import{PolygonPlugin as m}from"../../../views/draw/plugins/PolygonPlugin.js";import{PolylinePlugin as d}from"../../../views/draw/plugins/PolylinePlugin.js";import{ShapePlugin as P}from"../../../views/draw/plugins/ShapePlugin.js";let h=class extends t{constructor(e){super(e),this.sketch=null}get _simplePointPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-leaf-point"),localizationKey:"leaf-point-segment",kind:["vertex"],geometryType:"point",icon:"line-straight",legacyCreateTool:"point",create:()=>new y,[Symbol.toStringTag]:"Point"}}get _simplePointPluginRoot(){return{...this._simplePointPlugin,icon:"pin",localizationKey:"root-point",create(){const e=new y;return e.enableHelpMessages=!0,e}}}get _textPointPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-text-point"),localizationKey:"root-text",kind:["vertex"],geometryType:"point",icon:"add-text",legacyCreateTool:"text",create:()=>new y,[Symbol.toStringTag]:"Text"}}get _multipointPlugin(){const e={...this._simplePointPlugin,localizationKey:"leaf-point",icon:"point",hidden:!0};return{uniqueId:Symbol.for("esri-builtin-plugin-multipoint"),localizationKey:"root-multipoint",kind:["part"],geometryType:"multipoint",icon:"pins",legacyCreateTool:"multipoint",excludedViews:["3d"],create:()=>new p,availableDownstreamPlugins:[e],defaultDownstreamPlugin:e,[Symbol.toStringTag]:"Multipoint"}}get _freehandPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-freehand"),localizationKey:"leaf-freehand",kind:["vertex","section","part"],geometryType:"polyline",icon:"freehand",legacyCreateTool:"freehandPolyline",create(){const e=new g;return e.completeOnDragEnd=!0,e},[Symbol.toStringTag]:"Freehand"}}get _bezierPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-bezier-segment"),localizationKey:"leaf-bezier",kind:["vertex","section"],geometryType:"point",icon:"bezier-curve",excludedViews:["3d"],create:()=>new u,[Symbol.toStringTag]:"Bezier"}}get _endpointArcPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-circular-arc-segment-end-first"),localizationKey:"leaf-endpoint-arc",kind:["vertex","section"],geometryType:"point",icon:"end-point-arc-segment",excludedViews:["3d"],create:()=>new c({arcDrawingMode:"end-first"}),availableDownstreamPlugins:[],[Symbol.toStringTag]:"Endpoint Arc"}}get _interiorArcPlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-circular-arc-segment-interior-first"),localizationKey:"leaf-circular-arc",kind:["vertex","section"],geometryType:"point",icon:"arc-segment",excludedViews:["3d"],create:()=>new c({arcDrawingMode:"interior-first"}),availableDownstreamPlugins:[],[Symbol.toStringTag]:"Interior Arc"}}get _singlePartPolylinePlugin(){const e=this.sketch?.visibleElements.createTools,t=!this._isExcludedByAvailableCreateTools("freehandPolyline")&&!1!==e?.freehandPolyline,o=!this._isExcludedByAvailableCreateTools("polyline")&&!1!==e?.polyline;return{uniqueId:Symbol.for("esri-builtin-plugin-simple-polyline"),localizationKey:"root-polyline",kind:["section","part"],geometryType:"polyline",legacyCreateTool:"polyline",icon:o?"line":"freehand",create:()=>new d,availableDownstreamPlugins:o?[this._simplePointPlugin,t?this._freehandPlugin:null,this._bezierPlugin,this._interiorArcPlugin,this._endpointArcPlugin].filter(i):[t?this._freehandPlugin:null].filter(i),defaultDownstreamPlugin:o?this._simplePointPlugin:this._freehandPlugin,[Symbol.toStringTag]:"Polyline"}}get _singlePartPolygonPlugin(){const e=this.sketch?.visibleElements.createTools,t=!this._isExcludedByAvailableCreateTools("freehandPolygon")&&!1!==e?.freehandPolygon,o=!this._isExcludedByAvailableCreateTools("polygon")&&!1!==e?.polygon;return{uniqueId:Symbol.for("esri-builtin-plugin-simple-polygon"),localizationKey:"root-polygon",kind:["section","part"],geometryType:"polygon",legacyCreateTool:"polygon",icon:o?"polygon":"freehand-area",create:()=>new m,availableDownstreamPlugins:o?[this._simplePointPlugin,t?this._freehandPlugin:null,this._bezierPlugin,this._interiorArcPlugin,this._endpointArcPlugin].filter(i):[t?this._freehandPlugin:null].filter(i),defaultDownstreamPlugin:o?this._simplePointPlugin:this._freehandPlugin,[Symbol.toStringTag]:"Polygon"}}get _rectanglePlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-simple-rectangle"),localizationKey:"root-rectangle",kind:["part"],geometryType:"polygon",icon:"rectangle",legacyCreateTool:"rectangle",create:()=>new P,[Symbol.toStringTag]:"Rectangle"}}get _circlePlugin(){return{uniqueId:Symbol.for("esri-builtin-plugin-simple-ellipse"),localizationKey:"root-circle",kind:["part"],geometryType:"polygon",icon:"circle",legacyCreateTool:"circle",create(){const e=new P;return e.shapeType="circle",e.defaultUniform=!0,e.defaultCentered=!0,e},[Symbol.toStringTag]:"Circle"}}set sketchViewModel(e){this._overrideIfSome("sketchViewModel",e)}get sketchViewModel(){return this.sketch?.viewModel}get effectiveRootPoint(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.point&&!this._isExcludedByAvailableCreateTools("point")?this._simplePointPluginRoot:null}get effectiveRootText(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.text&&!this._isExcludedByAvailableCreateTools("text")?this._textPointPlugin:null}get effectiveRootMultipoint(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.multipoint&&!this._isExcludedByAvailableCreateTools("multipoint")&&"3d"!==this.sketchViewModel?.view?.type?this._multipointPlugin:null}get effectiveRootPolyline(){const e=this.sketch?.visibleElements.createTools,t=!this._isExcludedByAvailableCreateTools("polyline")&&!1!==e?.polyline,i=!this._isExcludedByAvailableCreateTools("freehandPolyline")&&!1!==e?.freehandPolyline;return t||i?this._singlePartPolylinePlugin:null}get effectiveRootPolygon(){const e=this.sketch?.visibleElements.createTools,t=!this._isExcludedByAvailableCreateTools("polygon")&&!1!==e?.polygon,i=!this._isExcludedByAvailableCreateTools("freehandPolygon")&&!1!==e?.freehandPolygon;return t||i?this._singlePartPolygonPlugin:null}get effectiveRootRectangle(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.rectangle&&!this._isExcludedByAvailableCreateTools("rectangle")?this._rectanglePlugin:null}get effectiveRootCircle(){const e=this.sketch?.visibleElements.createTools;return!1!==e?.circle&&!this._isExcludedByAvailableCreateTools("circle")?this._circlePlugin:null}get availablePlugins(){const e=[this.effectiveRootPoint,this.effectiveRootText,this.effectiveRootMultipoint,this.effectiveRootPolyline,this.effectiveRootPolygon,this.effectiveRootRectangle,this.effectiveRootCircle].filter(i),t=this.sketch?.availableCreateTools;if(!t)return e;const o=e=>{if(!e.legacyCreateTool)return Number.MAX_SAFE_INTEGER;const i=t.indexOf(e.legacyCreateTool);return-1===i?Number.MAX_SAFE_INTEGER:i};return e.map((e,t)=>({plugin:e,index:t,order:o(e)})).sort((e,t)=>e.order-t.order||e.index-t.index).map(({plugin:e})=>e)}getPluginsEquivalentToCreateTool(e,t){switch(e){case"text":return[this._textPointPlugin];case"point":return[this._simplePointPluginRoot];case"rectangle":return[this._rectanglePlugin];case"circle":return[this._circlePlugin];case"freehandPolyline":return[this._singlePartPolylinePlugin,this._freehandPlugin];case"freehandPolygon":return[this._singlePartPolygonPlugin,this._freehandPlugin];case"polyline":return"freehand"===t?[this._singlePartPolylinePlugin,this._freehandPlugin]:[this._singlePartPolylinePlugin,this._simplePointPlugin];case"polygon":return"freehand"===t?[this._singlePartPolygonPlugin,this._freehandPlugin]:[this._singlePartPolygonPlugin,this._simplePointPlugin];default:return null}}getDrawingModeEquivalentToPluginStack(e){const t=e.at(-1);if(t===this._freehandPlugin)return"freehand";return t===this._rectanglePlugin||t===this._circlePlugin?"hybrid":"click"}async makeRenderer(e={}){const t=this.sketchViewModel;if(!t?.view)return null;const{abortOptions:i,useTextSymbol:o}=e;return"2d"===t.view.type?await this._makeDrawToolRenderer2D({view:t.view,svm:t,useTextSymbol:o,abortOptions:i}):await this._makeDrawToolRenderer3D({view:t.view,svm:t,useTextSymbol:o,abortOptions:i})}_isExcludedByAvailableCreateTools(e){return!!this.sketch&&!this.sketch.availableCreateTools?.includes(e)}async _makeDrawToolRenderer2D(e){const{DrawToolRenderer2D:t}=await import("../../../views/2d/interactive/editingTools/draw/DrawToolRenderer2D.js"),{view:i,svm:o,useTextSymbol:l,abortOptions:r}=e;n(r);const s=l?o.textSymbol??o.pointSymbol:o.pointSymbol,a=new t({symbolOverrides:{polyline:{outputGeometry:{default:o.polylineSymbol},outline:{active:o.activeLineSymbol??void 0}},polygon:{outputGeometry:{default:o.activeFillSymbol??o.polygonSymbol}},point:{outputGeometry:{default:s},vertex:{default:o.vertexSymbol,active:o.activeVertexSymbol??void 0}}},view:i}),u=this._setupSymbolWatcher(a,o,l);return a.addHandles(u),a}async _makeDrawToolRenderer3D(e){const{view:t,svm:i,useTextSymbol:o,abortOptions:n}=e;return l.getLogger(this).warnOnce("Using DrawToolRenderer2D in 3D view. A 3D-specific implementation of DrawToolRenderer is not yet available."),this._makeDrawToolRenderer2D({view:t,svm:i,useTextSymbol:o,abortOptions:n})}_setupSymbolWatcher(e,t,i){const l=(t,i,o)=>(l,n)=>{l!==n&&e.overrideSymbol({symbol:l,geometryType:t,role:i,state:o})};return o([r(()=>t.polylineSymbol,l("polyline","outputGeometry")),r(()=>t.activeLineSymbol,l("polyline","outline","active")),r(()=>t.activeFillSymbol??t.polygonSymbol,l("polygon","outputGeometry")),r(()=>i?t.textSymbol??t.pointSymbol:t.pointSymbol,l("point","outputGeometry")),r(()=>t.vertexSymbol,l("point","vertex")),r(()=>t.activeVertexSymbol,l("point","vertex","active"))])}};e([s()],h.prototype,"_simplePointPlugin",null),e([s()],h.prototype,"_simplePointPluginRoot",null),e([s()],h.prototype,"_textPointPlugin",null),e([s()],h.prototype,"_multipointPlugin",null),e([s()],h.prototype,"_freehandPlugin",null),e([s()],h.prototype,"_bezierPlugin",null),e([s()],h.prototype,"_endpointArcPlugin",null),e([s()],h.prototype,"_interiorArcPlugin",null),e([s()],h.prototype,"_singlePartPolylinePlugin",null),e([s()],h.prototype,"_singlePartPolygonPlugin",null),e([s()],h.prototype,"_rectanglePlugin",null),e([s()],h.prototype,"_circlePlugin",null),e([s()],h.prototype,"sketch",void 0),e([s()],h.prototype,"sketchViewModel",null),e([s()],h.prototype,"effectiveRootPoint",null),e([s()],h.prototype,"effectiveRootText",null),e([s()],h.prototype,"effectiveRootMultipoint",null),e([s()],h.prototype,"effectiveRootPolyline",null),e([s()],h.prototype,"effectiveRootPolygon",null),e([s()],h.prototype,"effectiveRootRectangle",null),e([s()],h.prototype,"effectiveRootCircle",null),e([s()],h.prototype,"availablePlugins",null),h=e([a("esri.widgets.Sketch.support.PluginManager")],h);export{h as PluginManager};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,8377],{4144(e,t,n){n.d(t,{Hh:()=>c,fz:()=>a,g7:()=>l,s1:()=>s,zo:()=>u});var o=n(76061),r=n(83290);let i;function s(){return!!i&&(0,r.i)()}async function c(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(9192)]).then(n.bind(n,9192)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);i=new e.OperatorProject,t(r.p)}}function l(e,t){return i.execute(e,t,null)}function u(e,t){const n=i.executeMany(new o.S(e),t,null);return Array.from(n)}function a(){return i.supportsCurves()}},8377(e,t,n){n.r(t),n.d(t,{execute:()=>d,executeMany:()=>h,isLoaded:()=>m,load:()=>p});var o=n(4144),r=n(17499),i=n(60408);let s,c,l,u,a,f;function m(){return!!s&&(0,o.s1)()}async function p(){if(!m()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(7992)]).then(n.bind(n,83299)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6129)]).then(n.bind(n,86129)),(0,o.Hh)()]);s=e.fromGeometries,c=e.fromGeometry,l=e.fromSpatialReference,u=e.toGeometry,a=e.getSpatialReference,f=t.createProjectionTransformation}}function d(e,t,n){const s=c(e),a=l(t),m=f(s.getSpatialReference(),a,n),p=u((0,o.g7)(s.getGeometry(),m),a);return!n?.zConversionDisabled&&p&&!(0,i.uW)(p)&&e.spatialReference&&(0,r.gw)([p],e.spatialReference,t),p}function h(e,t,n){const[i,c]=s(e),m=l(t),p=f(c,m,n),d=(0,o.zo)(i,p).map(e=>u(e,m));if(!n?.zConversionDisabled&&d){const n=a(e);n&&(0,r.gw)(d,n,t)}return d}},17499(e,t,n){n.d(t,{gw:()=>s});var o=n(49186),r=n(60408),i=n(62815);function s(e,t,n){let o;for(const s of e)if(s&&(0,r.Pv)(s)&&!("vertexAttributes"in s)){if(!o){null==t.vcsWkid&&null==n.vcsWkid||l(t,n);const e="type"in s?s.type:(0,r.$B)(s);if(o=(0,i.N)(e,t,n),!o)return}o(s)}}class c extends o.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function l({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new c}},61691(e,t,n){n.d(t,{G:()=>o});class o{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},62815(e,t,n){n.d(t,{N:()=>s,d:()=>c});var o=n(86211),r=n(73941),i=n(21325);function s(e,t,n){const o=c(t,n);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}function c(e,t){return null==e||null==t||t.vcsWkid||(0,i.aI)(e,t)||(0,r.xP)(e)||(0,r.xP)(t)?1:(0,o.G9)(e)/(0,o.G9)(t)}},76061(e,t,n){n.d(t,{S:()=>r});var o=n(61691);class r extends o.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6102,9397],{18251(t,e,r){r.r(e),r.d(e,{default:()=>l});var s=r(5482),n=r(69540),a=r(25482),i=r(91429),o=r(51850),u=r(93223);let l=class extends((0,n.OU)(a.o)){constructor(t){super(t),this.type="local",this.origin=(0,o.vt)()}};(0,s.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],l.prototype,"type",void 0),(0,s.Cg)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,s.Cg)([(0,i.$K)("esri.geometry.support.MeshLocalVertexSpace")],l)},20615(t,e,r){r.d(e,{I:()=>i});var s=r(2272),n=r(80893),a=r(61956);function i(t,e,r,i){return(0,n.gW)((0,s.Dl)(t),a.A.from(e),r,i)}},24770(t,e,r){r.d(e,{$I:()=>m,AU:()=>d,g7:()=>f,i4:()=>c,ui:()=>p,up:()=>b,vt:()=>l,yo:()=>y});var s=r(34727),n=r(58083),a=r(67026),i=r(82534),o=r(35522),u=r(51850);function l(t=b){return[t[0],t[1],t[2],t[3]]}function c(t,e,r=l()){return(0,o.C)(r,t),r[3]=e,r}function p(t,e=l()){const r=(0,n.l)(M,t);return g(e,(0,s.KJ)((0,a.Xd)(e,r))),e}function h(t,e,r=l()){return(0,a.x8)(M,t,m(t)),(0,a.x8)(S,e,m(e)),(0,a.lw)(M,S,M),g(r,(0,s.KJ)((0,a.Xd)(r,M)))}function d(t,e,r,s=l()){return c(u.Cw,t,_),c(u.JP,e,v),c(u.Cb,r,A),h(_,v,_),h(_,A,s),s}function y(t){return t}function f(t){return t[3]}function m(t){return(0,s.kU)(t[3])}function g(t,e){return t[3]=e,t}const b=[0,0,1,0],M=(0,i.vt)(),S=(0,i.vt)(),_=(l(),l()),v=l(),A=l()},27615(t,e,r){r.d(e,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>c,yJ:()=>p});var s=r(35522),n=r(86738),a=r(95696),i=r(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function l(t,e){if(!o(t))return null;const[r,s,a]=t.origin;return new n.A({x:r,y:s,z:a,spatialReference:e})}function c(t,e){const{x:r,y:s,z:n,spatialReference:o}=t,u=[r,s,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new i.default({origin:u}):new a.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,s.t2)(t.origin,e.origin))}},35522(t,e,r){r.d(e,{$A:()=>q,Bw:()=>a,C:()=>i,Cc:()=>w,DI:()=>v,Il:()=>U,Io:()=>b,Ln:()=>g,Om:()=>x,Qr:()=>p,Re:()=>l,S8:()=>A,T9:()=>f,WQ:()=>u,Z0:()=>F,_S:()=>d,aI:()=>E,ei:()=>I,gL:()=>R,hG:()=>M,hZ:()=>o,hs:()=>m,jb:()=>N,jk:()=>y,lo:()=>V,lw:()=>c,m3:()=>S,oW:()=>P,t2:()=>T,tn:()=>h,uE:()=>j,xg:()=>Z,ze:()=>_});var s=r(51850),n=r(34304);function a(t){const e=t[0],r=t[1],s=t[2];return Math.sqrt(e*e+r*r+s*s)}function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,s){return t[0]=e,t[1]=r,t[2]=s,t}function u(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function l(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function c(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function p(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function h(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function f(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function m(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function g(t,e,r,s){return t[0]=e[0]+r[0]*s,t[1]=e[1]+r[1]*s,t[2]=e[2]+r[2]*s,t}function b(t,e){const r=e[0]-t[0],s=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+s*s+n*n)}function M(t,e){const r=e[0]-t[0],s=e[1]-t[1],n=e[2]-t[2];return r*r+s*s+n*n}function S(t){const e=t[0],r=t[1],s=t[2];return e*e+r*r+s*s}function _(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function v(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function A(t,e){const r=e[0],s=e[1],n=e[2];let a=r*r+s*s+n*n;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function x(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function q(t,e,r){const s=e[0],n=e[1],a=e[2],i=r[0],o=r[1],u=r[2];return t[0]=n*u-a*o,t[1]=a*i-s*u,t[2]=s*o-n*i,t}function w(t,e,r,s){const n=e[0],a=e[1],i=e[2];return t[0]=n+s*(r[0]-n),t[1]=a+s*(r[1]-a),t[2]=i+s*(r[2]-i),t}function F(t,e,r){const s=e[0],n=e[1],a=e[2];return t[0]=r[0]*s+r[4]*n+r[8]*a+r[12],t[1]=r[1]*s+r[5]*n+r[9]*a+r[13],t[2]=r[2]*s+r[6]*n+r[10]*a+r[14],t}function I(t,e,r){const s=e[0],n=e[1],a=e[2];return t[0]=s*r[0]+n*r[3]+a*r[6],t[1]=s*r[1]+n*r[4]+a*r[7],t[2]=s*r[2]+n*r[5]+a*r[8],t}function R(t,e,r){const s=r[0],n=r[1],a=r[2],i=r[3],o=e[0],u=e[1],l=e[2],c=n*l-a*u,p=a*o-s*l,h=s*u-n*o,d=n*h-a*p,y=a*c-s*h,f=s*p-n*c,m=2*i;return t[0]=o+c*m+2*d,t[1]=u+p*m+2*y,t[2]=l+h*m+2*f,t}const O=(0,s.vt)(),C=(0,s.vt)();function T(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function E(t,e){if(t===e)return!0;const r=t[0],s=t[1],a=t[2],i=e[0],o=e[1],u=e[2],l=(0,n.FD)();return Math.abs(r-i)<=l*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-o)<=l*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(a-u)<=l*Math.max(1,Math.abs(a),Math.abs(u))}function P(t,e,r){const s=r[0]-e[0],n=r[1]-e[1],a=r[2]-e[2];let i=s*s+n*n+a*a;return i>0?(i=1/Math.sqrt(i),t[0]=s*i,t[1]=n*i,t[2]=a*i,t):(t[0]=0,t[1]=0,t[2]=0,t)}const N=l,D=c,Q=p,Z=b,V=M,U=a,j=S;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:u,angle:function(t,e){A(O,t),A(C,e);const r=x(O,C);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,e,r,s,n,a){const i=1-a,o=i*i,u=a*a,l=o*i,c=3*a*o,p=3*u*i,h=u*a;return t[0]=e[0]*l+r[0]*c+s[0]*p+n[0]*h,t[1]=e[1]*l+r[1]*c+s[1]*p+n[1]*h,t[2]=e[2]*l+r[2]*c+s[2]*p+n[2]*h,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:i,cross:q,crossAndNormalize:function(t,e,r){const s=e[0],n=e[1],a=e[2],i=r[0],o=r[1],u=r[2],l=n*u-a*o,c=a*i-s*u,p=s*o-n*i,h=Math.sqrt(l*l+c*c+p*p);return t[0]=l/h,t[1]=c/h,t[2]=p/h,t},direction:P,dist:Z,distance:b,div:Q,divide:p,dot:x,equals:E,exactEquals:T,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,r,s,n,a){const i=a*a,o=i*(2*a-3)+1,u=i*(a-2)+a,l=i*(a-1),c=i*(3-2*a);return t[0]=e[0]*o+r[0]*u+s[0]*l+n[0]*c,t[1]=e[1]*o+r[1]*u+s[1]*l+n[1]*c,t[2]=e[2]*o+r[2]*u+s[2]*l+n[2]*c,t},inverse:v,len:U,length:a,lerp:w,max:f,min:y,mul:D,multiply:c,negate:_,normalize:A,random:function(t,e=1){const r=n.Ov,s=2*r()*Math.PI,a=2*r()-1,i=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(s)*i,t[1]=Math.sin(s)*i,t[2]=a*e,t},rotateX:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(s)-n[2]*Math.sin(s),a[2]=n[1]*Math.sin(s)+n[2]*Math.cos(s),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},rotateY:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[2]*Math.sin(s)+n[0]*Math.cos(s),a[1]=n[1],a[2]=n[2]*Math.cos(s)-n[0]*Math.sin(s),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},rotateZ:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0]*Math.cos(s)-n[1]*Math.sin(s),a[1]=n[0]*Math.sin(s)+n[1]*Math.cos(s),a[2]=n[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:g,set:o,sign:d,sqrDist:V,sqrLen:j,squaredDistance:M,squaredLength:S,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:N,subtract:l,transformMat3:I,transformMat4:F,transformQuat:R},Symbol.toStringTag,{value:"Module"}))},56512(t,e,r){function s(t){let e,r,s=[],n=!1;return function(...a){return n&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}(a,s)||(r=t.apply(this,a),e=this,s=a,n=!0),r}}r.d(e,{B:()=>s})},63579(t,e,r){r.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>f,in:()=>y,yr:()=>l});var s=r(11254),n=r(4576),a=r(74887),i=r(20557);class o{constructor(t,e,r){this.assetName=t,this.assetMimeType=e,this.parts=r}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const r=await Promise.all(e.map(e=>e.toBlob(t)));return(0,a.Te)(t),new Blob(r)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,a.Te)(t),e}}function l(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(h):h(t.files);case"service":return t.assets.some(h);case"loadable":return!0;default:return!1}}(t?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(t){if(t instanceof File){const{type:e,name:r}=t;return c.test(e)||p.test(r)}return c.test(t.assetMimeType)||p.test(t.assetName)}function d(t,e){if(!t)return!1;const{source:r}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(r,e)}function y(t,e){if(t===e)return!0;const{source:r}=t,{source:s}=e;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...r.assets].sort(t),n=[...s.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function f(t,e){return t instanceof File?(0,i.rq)(t,e):(0,i.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},63746(t,e,r){function s(t){return class{constructor(){for(const e of t)this[e]=null}}}function n(t,e=1){const{transform:r,hasZ:s,hasM:n}=t;if(null==r)return s&&1!==e?t=>{t[2]*=e}:null;const[a,i]=function(t,e,r,s){let{scale:n,translate:a,originPosition:i}=t;return"upperLeft"===i&&(n=n.map((t,e)=>1===e?-t:t)),e&&(n=n.map((t,e)=>2===e?t*s:t)),!e&&r&&(n=n.filter((t,e)=>2!==e),a=a.filter((t,e)=>2!==e)),[n,a]}(r,s,n,e),o=t.hasZ?3:2;return t=>{for(let e=0;e<t.length&&(e!==o||0!==t[e]);++e)t[e]=t[e]*a[e]+i[e]}}r.d(e,{Mv:()=>n,_7:()=>s}),r(53966)},64314(t,e,r){r.d(e,{A:()=>q});var s=r(5482),n=r(69622),a=r(49186),i=r(44208),o=r(74887),u=r(84952),l=r(91429),c=r(21325),p=r(20557),h=r(2272),d=r(65615),y=r(20615),f=r(74910),m=r(78286),g=r(99199),b=r(62815),M=r(63746);class S{constructor(t){this._options=t,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=S._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t&&(this.featureSet.objectIdFieldName=t)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:r}of e)r&&(r.spatialReference=t)}feature(){this._attributesClass??=(0,M._7)(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([t,e]){this.featureSet.features.at(-1).centroid={x:t,y:e}}geometry(t,e,r){this._previousX=this._previousY=0,this._lengths=r;let s,{hasZ:n,hasM:a}=this.featureSet;switch(n??=!1,a??=!1,this._i=0,this._vertex=[0,0],n&&this._vertex.push(0),a&&this._vertex.push(0),this._finishVertex=S._finishVertexNonPoint,e){case"esriGeometryPoint":this._point={x:0,y:0},s=this._point,this._finishVertex=n?a?S._finishVertexPointXYZM:S._finishVertexPointXYZ:a?S._finishVertexPointXYM:S._finishVertexPointXY;break;case"esriGeometryMultipoint":s={points:[],hasZ:n,hasM:a},this._part=s.points,this._parts=[];break;case"esriGeometryPolyline":s={paths:[],hasZ:n,hasM:a},this._parts=s.paths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],hasZ:n,hasM:a},this._parts=s.rings,this._part=[]}1===t?(this.featureSet.queryGeometry=s,this.featureSet.queryGeometryType=e,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=s}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,this._transformInPlace&&(e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._transformInPlace(e)),this._finishVertex(this))}curvedGeometry(t,e,r,s){let n,{hasZ:a,hasM:i}=this.featureSet;switch(a??=!1,i??=!1,t){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${t} does not make sense`);case"esriGeometryPolyline":n={paths:[],curvePaths:[],hasZ:a,hasM:i},this._parts=n.curvePaths,this._part=[];break;case"esriGeometryPolygon":n={rings:[],curveRings:[],hasZ:a,hasM:i},this._parts=n.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=n}startCurvedPart(t){this._part.push(this._transform(t))}finishCurvedPart(t){this._parts.push(this._part),this._part=[]}lineSegment(t,e){this._part.push(this._transform(e))}bezierSegment(t,e,r,s){this._part.push({b:[this._transform(e),this._transformXY(r),this._transformXY(s)]})}circularArcSegment(t,e,r){this._part.push({c:[this._transform(e),this._transformXY(r)]})}ellipticArcSegment(t,e,r,s,n,a,i,o){this._part.push({a:[this._transform(e),this._transformXY(r),s,n,a,i,o]})}static _finishVertexPointXY({_point:t,_vertex:e}){[t.x,t.y]=e}static _finishVertexPointXYZ({_point:t,_vertex:e}){[t.x,t.y,t.z]=e}static _finishVertexPointXYM({_point:t,_vertex:e}){[t.x,t.y,t.m]=e}static _finishVertexPointXYZM({_point:t,_vertex:e}){[t.x,t.y,t.z,t.m]=e}static _finishVertexNonPoint(t){const{_part:e,_parts:r,_lengths:s,_vertex:n}=t;e.push([...n]),e.length<s[r.length]||(t._previousX=t._previousY=0,t._part=[],r.push(e))}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:r,transform:s}=this.featureSet,n=r?(0,b.d)(t,e):1;this._transformInPlace??=(0,M.Mv)(this.featureSet,n),this._transformInPlaceXY??=(0,M.Mv)({transform:s})}_transform(t){const e=[...t];return this._transformInPlace?.(e),e}_transformXY(t){const e=[t[0],t[1]];return this._transformInPlaceXY?.(e),e}}var _=r(80893),v=r(22671),A=r(61956);async function x(t,e,r,s){const n=(0,h.Dl)(t),a={...r},i=A.A.from(e),o=!i.quantizationParameters;return await(0,_.IJ)(n,i,new S({sourceSpatialReference:i.sourceSpatialReference,applyTransform:o}),a,s)}let q=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const r=await this.executeJSON(t,e);return this.featureSetFromJSON(t,r,e)}async executeJSON(t,e){const r=this._normalizeQuery(t),s=null!=t.outStatistics?.[0],n=(0,i.A)("featurelayer-pbf-statistics"),a=(!s||n)&&!0!==t.returnTrueCurves;let o;if(this.pbfSupported&&a)try{o=await x(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return this.pbfSupported&&a||(o=await(0,g.e)(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})),this._normalizeFields(o.fields),o}async featureSetFromJSON(t,e,s){if(!this._queryGet3DObjectFormat(t)||null==this.infoFor3D||!e.features)return v.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([r.e(8487),r.e(36),r.e(8366)]).then(r.bind(r,40050)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,y.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return(0,f.L)(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,m.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:s},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let a=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),n(this.url,a,e)}async executeRelationshipQueryForCount(t,e){const[{default:s},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let a=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),n(this.url,a,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:s,fetchAttachments:n,processAttachmentQueryResult:a}=await(0,o.qr)(r.e(9239).then(r.bind(r,9239)),e),i=(0,h.Dl)(this.url);return a(i,await(this.queryAttachmentsSupported?s(i,t,e):n(i,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:s}=await(0,o.qr)(r.e(3103).then(r.bind(r,33103)),e);return s(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:s}=await(0,o.qr)(r.e(566).then(r.bind(r,80566)),e);return s(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(r.bind(r,11273)),e);return s(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(r.bind(r,21277)),e);return s(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(r.bind(r,8018)),e);return s(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(r.bind(r,10980)),e);return s(this.parsedUrl,t,e)}_normalizeQuery(t){let e=A.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?d.A.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this,s=this._queryGet3DObjectFormat(t);if(null!=r&&s){if(e=e===t?e.clone():e,e.formatOf3DObjects=s,e.outSpatialReference&&!(0,c.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new a.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:s,originY:n,originZ:a,translationX:i,translationY:o,translationZ:u,scaleX:l,scaleY:c,scaleZ:p,rotationX:h,rotationY:d,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;e.outFields.push(s,n,a,i,o,u,l,c,p,h,d,y,f)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryGet3DObjectFormat({returnGeometry:t,multipatchOption:e,outStatistics:r}){return!0!==t||"xyFootprint"===e||r?null:(0,p.Hz)(this.infoFor3D)}};(0,s.Cg)([(0,l.MZ)({type:d.A})],q.prototype,"dynamicDataSource",void 0),(0,s.Cg)([(0,l.MZ)()],q.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)()],q.prototype,"gdbVersion",void 0),(0,s.Cg)([(0,l.MZ)()],q.prototype,"infoFor3D",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],q.prototype,"parsedUrl",null),(0,s.Cg)([(0,l.MZ)()],q.prototype,"pbfSupported",void 0),(0,s.Cg)([(0,l.MZ)()],q.prototype,"queryAttachmentsSupported",void 0),(0,s.Cg)([(0,l.MZ)()],q.prototype,"relativeTimeBinWindow",void 0),(0,s.Cg)([(0,l.MZ)()],q.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)()],q.prototype,"uniqueIdFields",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],q.prototype,"url",void 0),q=(0,s.Cg)([(0,l.$K)("esri.layers.graphics.sources.support.QueryTask")],q)},64714(t,e,r){r.d(e,{F0:()=>o,Vx:()=>c,e2:()=>h,f:()=>d});var s=r(44208),n=r(4718),a=r(99352),i=r(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?i.Cb:"esriGeometryPolyline"===t?i.yM:i.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(t,e){if((0,s.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this${p(e)} = null;`;for(const e in t)r+=`this${p(e)} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function p(t){return u.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}function h(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:a.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:a.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:e,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67026(t,e,r){r.d(e,{A6:()=>f,Xd:()=>c,Xr:()=>d,hZ:()=>g,lw:()=>p,t2:()=>I,x8:()=>l});var s=r(29242),n=r(82534),a=r(51850),i=r(34304),o=r(35522),u=r(78955);function l(t,e,r){r*=.5;const s=Math.sin(r);return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=Math.cos(r),t}function c(t,e){const r=2*Math.acos(e[3]),s=Math.sin(r/2);return s>(0,i.FD)()?(t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s):(t[0]=1,t[1]=0,t[2]=0),r}function p(t,e,r){const s=e[0],n=e[1],a=e[2],i=e[3],o=r[0],u=r[1],l=r[2],c=r[3];return t[0]=s*c+i*o+n*l-a*u,t[1]=n*c+i*u+a*o-s*l,t[2]=a*c+i*l+s*u-n*o,t[3]=i*c-s*o-n*u-a*l,t}function h(t,e,r,s){const n=e[0],a=e[1],o=e[2],u=e[3];let l,c,p,h,d,y=r[0],f=r[1],m=r[2],g=r[3];return c=n*y+a*f+o*m+u*g,c<0&&(c=-c,y=-y,f=-f,m=-m,g=-g),1-c>(0,i.FD)()?(l=Math.acos(c),p=Math.sin(l),h=Math.sin((1-s)*l)/p,d=Math.sin(s*l)/p):(h=1-s,d=s),t[0]=h*n+d*y,t[1]=h*a+d*f,t[2]=h*o+d*m,t[3]=h*u+d*g,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function y(t,e){const r=e[0]+e[4]+e[8];let s;if(r>0)s=Math.sqrt(r+1),t[3]=.5*s,s=.5/s,t[0]=(e[5]-e[7])*s,t[1]=(e[6]-e[2])*s,t[2]=(e[1]-e[3])*s;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);const n=(r+1)%3,a=(r+2)%3;s=Math.sqrt(e[3*r+r]-e[3*n+n]-e[3*a+a]+1),t[r]=.5*s,s=.5/s,t[3]=(e[3*n+a]-e[3*a+n])*s,t[n]=(e[3*n+r]+e[3*r+n])*s,t[a]=(e[3*a+r]+e[3*r+a])*s}return t}function f(t,e,r,s){const n=.5*Math.PI/180;e*=n,r*=n,s*=n;const a=Math.sin(e),i=Math.cos(e),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),c=Math.cos(s);return t[0]=a*u*c-i*o*l,t[1]=i*o*c+a*u*l,t[2]=i*u*l-a*o*c,t[3]=i*u*c+a*o*l,t}const m=u.C,g=u.hZ,b=u.WQ,M=p,S=u.hs,_=u.Om,v=u.Cc,A=u.Bw,x=A,q=u.m3,w=q,F=u.S8,I=u.t2,R=u.aI,O=(0,a.vt)(),C=(0,a.fA)(1,0,0),T=(0,a.fA)(0,1,0),E=(0,n.vt)(),P=(0,n.vt)(),N=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(t,e){const r=e[0],s=e[1],n=e[2];return t[0]=r,t[1]=s,t[2]=n,t[3]=Math.sqrt(Math.abs(1-r*r-s*s-n*n)),t},conjugate:d,copy:m,dot:_,equals:R,exactEquals:I,fromEuler:f,fromMat3:y,getAxisAngle:c,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const r=e[0],s=e[1],n=e[2],a=e[3],i=r*r+s*s+n*n+a*a,o=i?1/i:0;return t[0]=-r*o,t[1]=-s*o,t[2]=-n*o,t[3]=a*o,t},len:x,length:A,lerp:v,mul:M,multiply:p,normalize:F,random:function(t){const e=i.Ov,r=e(),s=e(),n=e(),a=Math.sqrt(1-r),o=Math.sqrt(r);return t[0]=a*Math.sin(2*Math.PI*s),t[1]=a*Math.cos(2*Math.PI*s),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+i*o,t[1]=n*u+a*o,t[2]=a*u-n*o,t[3]=i*u-s*o,t},rotateY:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u-a*o,t[1]=n*u+i*o,t[2]=a*u+s*o,t[3]=i*u-n*o,t},rotateZ:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+n*o,t[1]=n*u-s*o,t[2]=a*u+i*o,t[3]=i*u-a*o,t},rotationTo:function(t,e,r){const s=(0,o.Om)(e,r);return s<-.999999?((0,o.$A)(O,C,e),(0,o.Il)(O)<1e-6&&(0,o.$A)(O,T,e),(0,o.S8)(O,O),l(t,O,Math.PI),t):s>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(O,e,r),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+s,F(t,t))},scale:S,set:g,setAxes:function(t,e,r,s){const n=N;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=s[0],n[4]=s[1],n[7]=s[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],F(t,y(t,n))},setAxisAngle:l,slerp:h,sqlerp:function(t,e,r,s,n,a){return h(E,e,n,a),h(P,r,s,a),h(t,E,P,2*a*(1-a)),t},sqrLen:w,squaredLength:q,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},69397(t,e,r){r.d(e,{Qf:()=>u,Qh:()=>i,RS:()=>n,Ul:()=>d,lM:()=>a,qK:()=>c});var s=r(34275);const n=16;function a(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r],!1));return e}function i(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return l(t,8);let r=p;for(let s=0;s<e;s++)r+=o(t[s]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?i(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+h:Array.isArray(e)?l(e,n):0:0),0)}function l(t,e){return p+t.length*e}const c=32,p=16,h=145,d=64},72593(t,e,r){r.r(e),r.d(e,{default:()=>$});var s=r(5482),n=r(92602),a=r(11254),i=r(4576),o=r(49186),u=r(44208),l=r(66552),c=r(92474),p=r(53966),h=r(93637),d=r(74887),y=r(36708),f=r(84952),m=r(13069),g=r(91429),b=r(5443),M=r(16930),S=r(95696),_=r(27615),v=r(63579),A=r(52106),x=r(86211),q=r(91218),w=r(65864),F=r(73836),I=r(21325),R=r(69938);async function O(t,e,r){const{geometry:s}=e,n={...e.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:e}=r,{origin:a,spatialReference:i,vertexSpace:o}=s,u=s.transform??new F.A,l="local"===o.type,c=t.spatialReference,p=c.isGeographic,h=(0,I.aI)(c,i),d=(0,q.isEqualBaseGCS)(i,c)&&(0,q.canProjectWithoutEngine)(i,c);if(!(l&&p&&d||!l&&!p&&h))return null;const y=(0,q.projectWithoutEngine)(a,i,c);if(null==y)return null;if(n[e.originX]=y.x,n[e.originY]=y.y,n[e.originZ]=y.z??0,null!=u){const{translation:t,scale:r,rotation:s}=u,a=l?1:(0,x.KX)(i)/(0,x.KX)(c);n[e.translationX]=t[0]*a,n[e.translationY]=t[2]*a,n[e.translationZ]=-t[1]*a,n[e.scaleX]=r[0],n[e.scaleY]=r[2],n[e.scaleZ]=r[1],n[e.rotationX]=s[0],n[e.rotationY]=s[2],n[e.rotationZ]=-s[1],n[e.rotationDeg]=s[3]}return{attributes:n}}return null==s?{attributes:n}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:n}}async function C(t,e){const r=await Promise.all((e.addAttachments??[]).map(e=>T(t,e))),s=await Promise.all((e.updateAttachments??[]).map(e=>T(t,e))),n=e.deleteAttachments??[];return r.length||s.length||n.length?{adds:r,updates:s,deletes:[...n]}:null}async function T(t,e){const{feature:r,attachment:s}=e,{globalId:n,name:a,contentType:i,data:o,uploadId:u}=s,l={globalId:n};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[t.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const t=await(0,f._0)(o);t&&(l.contentType=t.mediaType,l.data=t.data),o instanceof File&&(l.name=o.name)}return a&&(l.name=a),i&&(l.contentType=i),l}function E(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function P(t,e){return new A.A({attributes:t.attributes,geometry:(0,w.rS)({...t.geometry,spatialReference:e})})}function N(t,e){return{adds:t?.adds?.map(t=>P(t,e))||[],updates:t?.updates?.map(t=>({original:P(t[0],e),current:P(t[1],e)}))||[],deletes:t?.deletes?.map(t=>P(t,e))||[],spatialReference:e}}var D=r(64714),Q=r(64314),Z=r(60694),V=r(15426),U=r(20557),j=r(99199),J=r(96520),G=r(61956),k=r(79677),B=r(20816);const z=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),X=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let $=class extends c.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,r=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([(0,y.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:r,spatialReference:s,fieldsIndex:n,uniqueIdFields:a}=this.layer,i="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==i;return new Q.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:r,infoFor3D:i,pbfSupported:l,queryAttachmentsSupported:t?.operations?.supportsQueryAttachments??!1,relativeTimeBinWindow:t?.query?.relativeTimeBinWindow??0,sourceSpatialReference:s,uniqueIdFields:a,url:e.path})}async addAttachment(t,e){await this.load();const{layer:r}=this;await(0,V.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,i.query);try{return E((await(0,a.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async updateAttachment(t,e,r){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const n=t.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(r,o.query);try{return E((await(0,a.A)(i,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:r}=this;await(0,V.VA)(r,"editing");const s="infoFor3D"in r?r.infoFor3D:null,n=null!=s,u=n||(e?.globalIdUsed??!1),l=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,c=t.addFeatures?.map(t=>O(this.layer,t,s))??[],p=(await Promise.all(c)).filter(i.Ru),h=t.updateFeatures?.map(t=>O(this.layer,t,s))??[],d=(await Promise.all(h)).filter(i.Ru),y=function(t,e,r){if(!e||0===e.length)return[];if(r&&(0,R.zp)(e))return e.map(t=>t.globalId);if((0,R.r3)(e))return e.map(t=>t.objectId);const s=r?t.globalIdField:t.objectIdField;return s?e.map(t=>t.getAttribute(s)):[]}(this.layer,t.deleteFeatures,u);(0,J.u)(p,d,r.spatialReference);const f=await C(this.layer,t),m=r.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||r.gdbVersion,b={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,trueCurveClient:e?.editsRespectTrueCurves,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,B.ZJ)(this.layer.url,g,!0);const M=(0,B.w5)(this.layer.url,g||null);if(await(0,B.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:p.length?p:null,updates:d.length?d:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),b.returnServiceEditsOption=z.toJSON(e?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(b.adds=p.length?JSON.stringify(p):null,b.updates=d.length?JSON.stringify(d):null,b.deletes=y.length?u?JSON.stringify(y):y.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=l?JSON.stringify(l):void 0);const S=this._getLayerRequestOptions({method:"post",query:b});M&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=B.TA);const _=e?.returnServiceEditsOption?r.url:r.parsedUrl.path;let v;try{v=m?await this._asyncApplyEdits(_+"/applyEdits",S):await(0,a.A)(_+"/applyEdits",S)}catch(t){if(!function(t){const e=t.details.raw,r=+e.code,s=+e.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(t))throw t;S.authMode="immediate",v=m?await this._asyncApplyEdits(_+"/applyEdits",S):await(0,a.A)(_+"/applyEdits",S)}return this._createEditsResult(v)}async deleteAttachments(t,e){await this.load();const{layer:r}=this;await(0,V.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,a.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(E)}catch(t){throw this._createAttachmentErrorResult(s,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:n}=await(0,a.A)(`${s}/${r}`,e),{id:i,extent:o,fullExtent:u,timeExtent:l}=n,c=o||u;return{id:i,fullExtent:c&&b.A.fromJSON(c),timeExtent:l&&k.A.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(t,e={}){await this.load();const r=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,r)}async queryFeatures(t,e){await this.load();const r=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&r.features.length){const e=new Map;if(r.features.forEach(r=>{const s=r.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const r=t.toLowerCase();r&&r in s&&t!==r&&(s[t]=s[r],delete s[r],e.set(r,t))}})}),null!=r.fields)for(const t of r.fields){const r=e.get(t.name.toLowerCase());null!=r&&(t.name=r)}}return r}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,Z.Wo)(this.layer.url))return"unavailable";const t=(0,f.fj)(this.layer.url,"status"),e=await(0,a.A)(t,{query:{f:"json"}});return X.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:s}=await r.e(1384).then(r.bind(r,31384));return s(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const r=e.url;null!=r&&("layerId"in e&&(0,f.fj)(r,e.layerId.toString()),this._getOrCreateEditInterceptor(r).before=e=>{const r=e.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=e.requestOptions.query??{};r._ts=t.getTime(),e.requestOptions.query=r}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,i.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const r=(await(0,a.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,a.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,a.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,d.Pl)(L)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),e?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,a.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:e?.signal}));t=s}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const r=t.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,D.F0)(t.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:r}=await(0,a.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));r.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(t){(0,d.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const s=t.addFeatures.filter(t=>t.geometry);if(e.length!==s.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,a=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:s}=e;if((0,_.Hq)(s))n.push(e);else{const s=e.origin,{convertMeshVertexSpace:i}=await Promise.all([r.e(8487),r.e(4496)]).then(r.bind(r,28846)),o=await i(e,new S.A({origin:[s.x,s.y,s.z??0]}));a.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of a)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:a}=t,i=a.getExternalSourcesOnService(s),o=n.getAttribute(r);if(0===i.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(v.dK)??i[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:r}=this.layer,s=[];let n=null;if(Array.isArray(e))for(const t of e)s.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===r&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const a=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const r=t?.attachments,s={addFeatureResults:t?.addResults?.map(E)??[],updateFeatureResults:t?.updateResults?.map(E)??[],deleteFeatureResults:t?.deleteResults?.map(E)??[],addAttachmentResults:r?.addResults?r.addResults.map(E):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(E):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(E):[]};return t?.editMoment&&(s.editMoment=t.editMoment),s}(n);if(s.length>0){a.editedFeatureResults=[];for(const t of s){const{editedFeatures:e}=t,r=e?.spatialReference?new M.A(e.spatialReference):null;a.editedFeatureResults.push({layerId:t.id,editedFeatures:N(e,r)})}}return a}_createAttachmentErrorResult(t,e){const r=e.details.messages?.[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(t,e){const r=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(r)for(const t in e){const s=e[t];null!=s&&(r.set?r.set(t,s):r.append(t,s))}return r}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...t,query:{gdbVersion:s,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:r,parsedUrl:s}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==r)return!1;const a=(0,U.JZ)(n);if(null==a)return!1;const o=(0,f.fj)(s.path,`../${a.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(e)}const l=u.map(t=>t.getAttribute(r)).filter(i.Ru);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=n,h=new G.A({where:`${c} IN (${l.map(t=>`'${t}'`)})`,outFields:[p,c],returnGeometry:!1}),d=await(0,j.s)(o,h),{features:y}=d;return 0!==y.length&&!u.some(t=>{const e=t.getAttribute(r);if(!e)return!0;const{metadata:n}=t.geometry,a=y.filter(t=>t.getAttribute(c)===e);if(0===a.length)return!0;const i=a.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(s).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>i.every(e=>t!==e))})}};(0,s.Cg)([(0,g.MZ)()],$.prototype,"type",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],$.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],$.prototype,"supportedSourceTypes",void 0),(0,s.Cg)([(0,g.MZ)({readOnly:!0})],$.prototype,"queryTask",null),$=(0,s.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],$);const L=1e3},73836(t,e,r){r.d(e,{A:()=>d});var s=r(5482),n=r(69540),a=r(25482),i=r(91429),o=r(58083),u=r(9093),l=r(67026),c=r(82534),p=r(51850),h=r(24770);let d=class extends((0,n.OU)(a.o)){constructor(t){super(t),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(h.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,l.x8)(y,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(t,y,this.translation,this.scale),t}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,o.t2)(this.localMatrix,t.localMatrix)}};(0,s.Cg)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,s.Cg)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,s.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,s.Cg)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,s.Cg)([(0,i.MZ)()],d.prototype,"rotation",null),(0,s.Cg)([(0,i.MZ)()],d.prototype,"localMatrix",null),(0,s.Cg)([(0,i.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,s.Cg)([(0,i.$K)("esri.geometry.support.MeshTransform")],d);const y=(0,c.vt)()},74910(t,e,r){r.d(e,{L:()=>o});var s=r(5443),n=r(2272),a=r(80893),i=r(61956);async function o(t,e,r){const o=(0,n.Dl)(t),u=await(0,a.Jf)(o,i.A.from(e),{...r}),l=u.extent;return!l||isNaN(l.xmin)||isNaN(l.ymin)||isNaN(l.xmax)||isNaN(l.ymax)?{count:u.count,extent:null}:{count:u.count,extent:s.A.fromJSON(l)}}},78286(t,e,r){r.d(e,{V:()=>i});var s=r(2272),n=r(80893),a=r(61956);async function i(t,e,r,i){const o=(0,s.Dl)(t),u=await(0,n.Pk)(o,a.A.from(e),r,i);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},82534(t,e,r){function s(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>a});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:n,create:s,fromValues:function(t,e,r,s){return[t,e,r,s]}},Symbol.toStringTag,{value:"Module"}))},95696(t,e,r){r.d(e,{A:()=>l});var s,n=r(5482),a=r(69540),i=r(25482),o=r(91429),u=r(93223);let l=class extends((0,a.OU)(i.o)){static{s=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=s=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l)},99199(t,e,r){r.d(e,{e:()=>u,s:()=>o});var s=r(2272),n=r(80893),a=r(22671),i=r(61956);async function o(t,e,r,s){const n=await u(t,e,r,s);return a.A.fromJSON(n)}function u(t,e,r,a){const o=(0,s.Dl)(t),u={...r},l=i.A.from(e);return(0,n.eW)(o,l,l.sourceSpatialReference,u,a)}},99352(t,e,r){r.d(e,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9938],{17136(e,t,n){n.d(t,{Y_:()=>I,O7:()=>R,el:()=>k});var r=n(92602),a=n(69052),s=n(49186),i=n(53966),o=n(39829),l=n(82799),u=n(16930),c=n(80754),d=n(21325),p=n(28735),h=n(11254),f=n(60408),m=n(65864),g=n(2272),y=n(84952),b=n(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function S(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function v(e,t,n){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new s.A("internal:geometry",e)}const n=(0,c.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const a=e[r][0],s=e[r][1],i=e[r+1][0],o=e[r+1][1],l=Math.sqrt((i-a)*(i-a)+(o-s)*(o-s)),u=(o-s)/l,c=(i-a)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,i=c*r+a,o=u*r+s;n.push([i,o])}const e=(l+Math.floor(d-1)*t)/2,r=c*e+a,i=u*e+s;n.push([r,i])}n.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:r,spatialReference:e.spatialReference}):new l.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return n&&(e=(0,c.kS)(e,n)),e}function E(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,c.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,c.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,c.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,c.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function F(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const a=t.cutIndexes[r],s=t.geometries[r],i=(0,c.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some(n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,c.kd)(n,180);for(let n=0;n<t.length;n++){const t=s.getPoint(e,n);s.setPoint(e,n,t.clone().offset(r,0))}return!0}})}if(a===n){if(S(e))for(const t of(0,c.r8)(s))e[a]=e[a].addRing(t);else if(A(e))for(const t of(0,c.r8)(s))e[a]=e[a].addPath(t)}else n=a,e[a]=s}return e}async function k(e,t,n){if(!Array.isArray(e))return k([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let s,i,u,S,A,R,M,I,x=0;const $=[],P=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,i=(0,d.Vp)(s),u=s.isWebMercator,R=u?102100:4326,S=c.j7[R].maxX,A=c.j7[R].minX,M=c.j7[R].plus180Line,I=c.j7[R].minus180Line),i)if("mesh"===t.type)P.push(t);else if("point"===t.type)P.push(E(t.clone(),S,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>E(e,S,A)),P.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);P.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,c.kd)(e.xmin,A)*(2*S);let r=0===n?t.clone():(0,c.kS)(t.clone(),n);e.offset(n,0);let{xmin:a,xmax:s}=e;a=Number(a.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(M)&&s!==S?(x=s>x?s:x,r=v(r,u),$.push(r),P.push("cut")):e.intersects(I)&&a!==A?(x=s*(2*S)>x?s*(2*S):x,r=v(r,u,360),$.push(r),P.push("cut")):P.push(r)}else P.push(t.clone());else P.push(t);else P.push(t);let O=(0,c.kd)(x,S),C=-90;const _=O,L=new l.A;for(;O>0;){const e=360*O-180;L.addPath([[e,C],[e,-1*C]]),C*=-1,O--}if($.length>0&&_>0){const t=F($,await async function(e,t,n,r){const a=(0,g.Dl)(e),s=t[0].spatialReference,i={...r,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(s),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},o=await(0,h.A)(a.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,m.rS)(e);return t.spatialReference=s,t})}}(a,$,L,n)),r=[],s=[];for(let n=0;n<P.length;n++){const a=P[n];if("cut"!==a)s.push(a);else{const a=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(r.push(a),s.push("simplify")):s.push(u?(0,p.Gh)(a):a)}}if(!r.length)return s;const i=await async function(e,t,n){const r="string"==typeof e?(0,y.An)(e):e,a=t[0].spatialReference,s=(0,f.$B)(t[0]),i={...n,query:{...r.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,b.X)(t))}},{data:o}=await(0,h.A)(r.path+"/simplify",i);return(0,b.V)(o.geometries,s,a)}(a,r,n),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(i.shift()):i.shift())}return o}const T=[];for(let e=0;e<P.length;e++){const t=P[e];if("cut"!==t)T.push(t);else{const e=$.shift();T.push(!0===u?(0,p.Gh)(e):e)}}return T}function R(e,t,n){const r=(0,d.Vp)(n);if(null==r)return e;const[a,s]=r.valid,i=2*s;let o=0,l=0;t>s?o=Math.ceil(Math.abs(t-s)/i):t<a&&(o=-Math.ceil(Math.abs(t-a)/i)),e>s?l=Math.ceil(Math.abs(e-s)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i));let u=e+(o-l)*i;const c=u-t;return c>s?u-=i:c<a&&(u+=i),u}function M(e){const t=(0,d.Vp)(e);if(null==t)return null;const[n,r]=t.valid;return new a.hr(n,r)}const I=M(u.A.WGS84);M(u.A.WebMercator)},69052(e,t,n){n.d(t,{hr:()=>a,ie:()=>l,uC:()=>o});var r=n(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return s(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+i(this.range,e-t,n)}minimalMonotonic(e,t,n){return s(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(r)?n:r}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function s(e,t,n,r,a=0,s=!1){return(r-=a)<t?r+=i(e,t-r):r>n&&(r-=i(e,r-n)),s&&r===n&&(r=t),r+a}function i(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const o=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360))},69938(e,t,n){n.d(t,{applyEdits:()=>Z,zp:()=>J,r3:()=>V,uploadAssets:()=>ne});var r=n(52106),a=n(7762),s=n(49186),i=n(4718),o=n(53966),l=n(91869),u=n(74887),c=n(84952),d=n(13069),p=n(17136),h=n(21325),f=n(56512),m=n(65864),g=n(4305),y=n(50954),b=n(52006),w=n(49663),S=n(46068),A=n(15507);const v=1e-6,E=[0,0],F=new Set;class k{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:n,maxSegmentsPerCurve:r,minSegmentsPerCurve:a}){const s=n*n,i=t*t,o=1/r,l=this.interpolate(0),u=this.interpolate(1);(0,A.kb)(this.curveStart,l)>v&&e.push(l),this.initialize(l,u);const c=1/a;for(let e=a-1;e>0;e--){const t=e*c;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===s||!isFinite(s)||(0,A.kb)(this.arcStart,this.arcEnd)<s)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,A.kb)(this.curveEnd,u)>v&&e.push([...this.curveEnd]),e}}class R extends k{constructor(e,t){const[n,r,a]=t.b;super(e,n),this._controlPointsStack=[],this._curveControlPoints=[r,a],this._arcControlPoints=[r,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:n,tStart:r,tEnd:a}=this,[s,i]=this._arcControlPoints,o=(e-r)/(a-r),l=(0,A.RS)([],t,s,o),u=(0,A.RS)(E,s,i,o),c=(0,A.RS)([],i,n,o),d=(0,A.RS)([],l,u,o),p=(0,A.RS)([],u,c,o),h=(0,A.RS)([],d,p,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([p,c]),this.tEndStack.push(e),this.arcEndStack.push(h),this._arcControlPoints[0]=l,this._arcControlPoints[1]=d,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:n}=this,[r,a]=this._curveControlPoints;return(0,g.B4)(t,r,a,n,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[n,r]=this._arcControlPoints;return Math.max((0,A.yE)(n,e,t),(0,A.yE)(r,e,t))}}class M extends k{constructor(e,t){const[n]=t.a;super(e,n),this._derivedEllipse=(0,S.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,S.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,A.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function I(e,t,n,{cx:r,cy:a,radius:s,thetaStart:i,thetaEnd:o,isInvalid:l},{maxDeviation:u,maxSegmentLength:c,maxSegmentsPerCurve:d,minSegmentsPerCurve:p}){if(l)return e.push([...n]),e;const h=2*s,f=[r+s*Math.cos(i),a+s*Math.sin(i)],m=[r+s*Math.cos(o),a+s*Math.sin(o)];(0,A.kb)(t,f)>v&&e.push(f);const g=Math.abs(o-i),y=c>0&&c<h?2*Math.asin(c/h):g,b=u>0&&u<=s?2*Math.acos(1-u/s):g,w=Math.min(y,b),S=Math.min(d,Math.max(p,Math.ceil(Math.abs(g/w)))),E=1/S;for(let t=1;t<S;t++){const n=t*E,l=i*(1-n)+o*n;e.push([r+s*Math.cos(l),a+s*Math.sin(l)])}return e.push(m),(0,A.kb)(n,m)>v&&e.push([...n]),e}function x(e,t,n,r){return new R(t,n).densify(e,r)}function $(e,t,n,r){const a=(0,y.pM)(t,n),[s]=n.c;return I(e,t,s,a,r)}function P(e,t,n,r){const a=(0,w.i)(t,n),[s]=n.a;return I(e,t,s,a,r)}function O(e,t,n,r){const[a,s,i,o,l,u,c]=n.a;return 0===u||0===c?(e.push([...a]),e):new M(t,n).densify(e,r)}const C=(0,f.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function _(e,t,r,a){const i=new Set(t);return await async function(e,t,r,a){let i=null;for(const o of e){if(!o||!(0,b.Ed)(o)||null!=o.spatialReference.xyTolerance)continue;const e=!r&&L(o)?F:t;if((0,b.FD)(o).flat().some(t=>T(t,e))){const e=o.spatialReference;if(!e)throw new s.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=D(e);if(a.has(t))o.spatialReference=a.get(t);else{i||(i=await Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(9169)]).then(n.bind(n,78125)));const r=i.fromSpatialReference(e),l=r?.getTolerance();if(null==l)throw new s.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const u=o.spatialReference.clone();u.read({xyTolerance:l}),o.spatialReference=u,a.set(t,u)}}}}(e,i,r,a),e.map(e=>{if(!e||!(0,b.Ed)(e))return e;const t=e.spatialReference.xyTolerance;if(null==t)return e;const n=C(t),a=!r&&L(e)?F:i;return(0,m.rS)(function(e,t,n){if(!(0,b.Ed)(e))return e;const r=new Set(t),a=function(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}(n),s=(0,b.FD)(e),i=[];let o=!1;for(const e of s){const t=[];for(let n=0;n<e.length-1;n++){const s=n+1,i=[...(0,b.yP)(e[n])];0===n&&t.push(i);const l=e[s];(0,b.Xq)(l)?t.push([...l]):(0,b.n1)(l)&&!r.has("cubic-bezier")?x(t,i,l,a):(0,b.aO)(l)&&!r.has("circular-arc")?$(t,i,l,a):(0,b.DA)(l)&&!r.has("elliptic-arc")?P(t,i,l,a):(0,b.wY)(l)&&!r.has("elliptic-arc")?O(t,i,l,a):(t.push((0,b.tk)(l)),o=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...o?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...o?{curveRings:i}:{rings:i}}}(e,a,n))})}function L(e){if(!(0,b.Ed)(e))return!1;const t=(0,b.zt)(e);if(t.length<2)return!1;const n=(0,b.$3)(t[0])?b.$3:e=>!(0,b.$3)(e);for(let e=1;e<t.length;e++)if(n(t[e]))return!0;return!1}function T(e,t){return!((0,b.Xq)(e)||((0,b.n1)(e)?t.has("cubic-bezier"):(0,b.aO)(e)?t.has("circular-arc"):!(0,b.DA)(e)&&!(0,b.wY)(e)||t.has("elliptic-arc")))}function D(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}var z=n(47685),j=n(60694),B=n(30524),G=n(20557),U=n(77548);function N(e){return null!=e?.applyEdits}const W=new WeakMap;function X(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function V(e){return e.every(X)}function q(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function J(e){return e.every(q)}async function Z(e,t,n,r={}){let c;const p="gdbVersion"in e?e.gdbVersion:null,h=r.gdbVersion??p;if((0,z.Mk)(e)&&e.url)c=(0,z.Zk)(e.url,e.layerId,h,"original-and-current-features"===r.returnServiceEditsOption);else{c=(0,u.Tw)(),c.promise.then(t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)});const t={result:c.promise};e.emit("apply-edits",t)}try{const{results:u,edits:p}=await async function(e,t,n,r){if(await e.load(),!N(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,U.tk)(e))throw new s.A(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,n){const r=(0,U.BR)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),c=null!=e.infoFor3D;if(function(e,t,n,r,a,i){if(!(e&&(r||a)||n?.usingTelecomOperations))throw new s.A(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&n?.globalIdUsed&&!n.usingFeatureServiceEndpoint)throw new s.A(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new s.A(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!n?.globalIdUsed&&a)throw new s.A(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,r,n,!!i,!!u,`${e.type}-layer`),!r.data.isVersioned&&n?.gdbVersion)throw new s.A(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!r.editing.supportsRollbackOnFailure&&n?.rollbackOnFailureEnabled)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...n};if(null!=p.rollbackOnFailureEnabled||r.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.A.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),p.rollbackOnFailureEnabled=!0),!r.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new s.A(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const h=function(e,t,n){const r=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.A.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(r.addFeatures?.length&&!t.operations.supportsAdd)throw new s.A(`${n}:unsupported-operation`,"Layer does not support adding features.");if(r.updateFeatures?.length&&!t.operations.supportsUpdate)throw new s.A(`${n}:unsupported-operation`,"Layer does not support updating features.");if(r.deleteFeatures?.length&&!t.operations.supportsDelete)throw new s.A(`${n}:unsupported-operation`,"Layer does not support deleting features.");return r.addFeatures=r.addFeatures.map(ee),r.updateFeatures=r.updateFeatures.map(ee),r.addAssetFeatures=[],r}(t,r,`${e.type}-layer`),f=n?.globalIdUsed||c,m=e.fields.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(f){const{globalIdField:t}=e;if(null==t)throw new s.A(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");h.addFeatures.forEach(e=>function(e,t){const{attributes:n}=e;null==n[t]&&(n[t]=(0,d.yS)())}(e,t))}h.addFeatures.forEach(t=>function(e,t,n,r){Y(e,t,n,r),H(e,t)}(t,e,f,m)),h.updateFeatures.forEach(t=>function(e,t,n,r){Y(e,t,n,r),H(e,t);const a=(0,U.BR)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.A(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,m)),h.deleteFeatures.forEach(t=>function(e,t,n,r){Y(e,t,n,r)}(t,e,f,m)),h.addAttachments.forEach(t=>K(t,e)),h.updateAttachments.forEach(t=>K(t,e)),c&&await async function(e,t){const{infoFor3D:n}=t;if(null==n)return;if(!(0,G.JQ)(n))throw new s.A(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:r}=e;for(const t of e.addFeatures??[])te(t)&&r.push(t);for(const t of e.updateFeatures??[])te(t)&&r.push(t)}(h,e);const g=(0,l.tE)(W,e,()=>new Map),y=!(0,j.Wo)(e.url);return{edits:await Q(h,r.data.supportedCurveTypes??[],y,g),options:p}}(e,n,r);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,n,r),h=e=>e.filter(e=>!e.error).map(i.o8),f={edits:p,addedFeatures:h(u.addFeatureResults),updatedFeatures:h(u.updateFeatureResults),deletedFeatures:h(u.deleteFeatureResults),addedAttachments:h(u.addAttachmentResults),updatedAttachments:h(u.updateAttachmentResults),deletedAttachments:h(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:r.globalIdToObjectId};return u.editedFeatureResults?.length&&(f.editedFeatures=u.editedFeatureResults),c.resolve(f),u}catch(e){throw c.reject(e),e}}function Y(e,t,n,r){if(n){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(r.length&&"attributes"in e)for(const n of r){const r=e.attributes[n.name];if(void 0!==r&&!(0,B.OG)(n,r))throw new s.A(`${t.type}-layer:invalid-parameter`,`Big-integer field '${n.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.A(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.A(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function H(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:n}=e,{spatialReference:r,vertexSpace:a}=n,i=t.spatialReference,o="local"===a.type,l=(0,h.EA)(i),u=(0,h.aI)(i,r),c=u||(0,h.oT)(i)&&((0,h.oT)(r)||(0,h.K8)(r));if(!(o&&l&&c||!o&&!l&&u))throw new s.A(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${a.type} vertex space and a spatial reference wkid:${r.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function K(e,t){const{feature:n,attachment:r}=e;if(!n||"attributes"in n&&!n.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in n)&&!n.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new s.A(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&r.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const e=(0,c.r$)(r.data);if(e&&!e.isBase64)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function Q(e,t,n,r){const a=e.addFeatures??[],s=e.updateFeatures??[],i=a.concat(s).map(e=>e.geometry),o=await _(i,t,n,r),l=await(0,p.el)(o),u=a.length,c=s.length;return l.slice(0,u).forEach((e,t)=>a[t].geometry=e),l.slice(u,u+c).forEach((e,t)=>s[t].geometry=e),e}function ee(e){const t=new r.A;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function te(e){return"mesh"===e?.geometry?.type}function ne(e,t,n,r){if(!N(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.A(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(n,r)}},80754(e,t,n){n.d(t,{j7:()=>i,kS:()=>l,kd:()=>o,r8:()=>u});var r=n(82799),a=n(16930),s=n(60408);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=u(e);for(const e of n)for(const n of e)n[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},92300(e,t,n){n.d(t,{V:()=>i,X:()=>s});var r=n(60408),a=n(65864);function s(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,n){const r=(0,a.xD)(t);return e.map(e=>{const t=r.fromJSON(e);return t.spatialReference=n,t})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8434],{18768(e,t,i){i.d(t,{b:()=>a});var r=i(5482),s=i(53966),n=i(91429),o=i(60694);const a=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],i),i}},20615(e,t,i){i.d(t,{I:()=>o});var r=i(2272),s=i(80893),n=i(61956);function o(e,t,i,o){return(0,s.gW)((0,r.Dl)(e),n.A.from(t),i,o)}},24212(e,t,i){i.d(t,{$7:()=>a,B:()=>o,XF:()=>u,tW:()=>l,w7:()=>n});var r=i(56512),s=i(86211);function n(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?p:c}(e).mode}(null==e||(e.hasZ??!1),t)}function o(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function a(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function l(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function u(e,t){t&&e.warn(".elevationInfo=",t)}i(16271),(0,r.B)((e,t,i)=>{if(!e)return 0;if("decimal-degrees"===t)return 0;const r="unknown"!==t&&t?t:"meters",n=(0,s.mq)(i);return n?(0,s.oU)(e,r,n):0});const p={mode:"absolute-height",offset:0},c={mode:"on-the-ground",offset:null}},33446(e,t,i){i.d(t,{C:()=>o,m:()=>n});var r=i(49186),s=i(74887);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(i),n}async function o(e,t,i,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.Te)(o),a}},56512(e,t,i){function r(e){let t,i,r=[],s=!1;return function(...n){return s&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(n,r)||(i=e.apply(this,n),t=this,r=n,s=!0),i}}i.d(t,{B:()=>r})},56551(e,t,i){i.d(t,{H:()=>c});var r=i(5482),s=i(91429),n=i(69540),o=i(25482),a=i(56507),l=i(94359),u=i(93223);let p=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],p.prototype,"method",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),(0,r.Cg)([(0,s.MZ)({type:[a.jz],json:{write:{isRequired:!0}}})],p.prototype,"bandIds",void 0),(0,r.Cg)([(0,s.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],p.prototype,"renderer",void 0),p=(0,r.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],p);const c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,r.Cg)([(0,s.MZ)({type:[p],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},58501(e,t,i){i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(s)for(const e of i.features)s(e.geometry)}},62815(e,t,i){i.d(t,{N:()=>o,d:()=>a});var r=i(86211),s=i(73941),n=i(21325);function o(e,t,i){const r=a(t,i);if(1!==r)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,r);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,r);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,r);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,r);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,r);default:return}}function a(e,t){return null==e||null==t||t.vcsWkid||(0,n.aI)(e,t)||(0,s.xP)(e)||(0,s.xP)(t)?1:(0,r.G9)(e)/(0,r.G9)(t)}},74379(e,t,i){i.d(t,{V:()=>r,t:()=>s});const r=Symbol("isImageryGraphicOrigin");function s(e){return!!e&&r in e}},74910(e,t,i){i.d(t,{L:()=>a});var r=i(5443),s=i(2272),n=i(80893),o=i(61956);async function a(e,t,i){const a=(0,s.Dl)(e),l=await(0,n.Jf)(a,o.A.from(t),{...i}),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:r.A.fromJSON(u)}}},78286(e,t,i){i.d(t,{V:()=>o});var r=i(2272),s=i(80893),n=i(61956);async function o(e,t,i,o){const a=(0,r.Dl)(e),l=await(0,s.Pk)(a,n.A.from(t),i,o);return l.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(l.uniqueIds)??[]}},82371(e,t,i){i.d(t,{E9:()=>y,Tw:()=>m,X6:()=>d});var r=i(11254),s=i(5443),n=i(86738),o=i(16930),a=i(87186),l=i(20223),u=i(2272),p=i(22671);async function c(e,t,i){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},y=m?JSON.stringify(m.rasterFunctionDefinition||m):null,g=(0,u.lF)({...c.query,renderingRule:y,f:"json"}),h=(0,u.jV)(g,i);e=c.path;const f=d||await(0,r.A)(e,h).then(e=>e.data),v=f.hasRasterAttributeTable?(0,r.A)(`${e}/rasterAttributeTable`,h):null,w=f.hasColormap?(0,r.A)(`${e}/colormap`,h):null,R=f.hasHistograms?(0,r.A)(`${e}/histograms`,h):null,C=f.currentVersion>=10.3?(0,r.A)(`${e}/keyProperties`,h):null,b=f.hasMultidimensions?(0,r.A)(`${e}/multidimensionalInfo`,h):null,S=f.currentVersion>=10.81?(0,r.A)(`${e}/statistics`,h):null,x=await Promise.allSettled([v,w,R,C,b,S]),I=s.A.fromJSON(f.extent),M=Math.ceil(I.width/f.pixelSizeX-.1),F=Math.ceil(I.height/f.pixelSizeY-.1),A=o.A.fromJSON(f.spatialReference||f.extent.spatialReference),D="fulfilled"===x[0].status?x[0].value?.data:null,P=D?.features?.length?p.A.fromJSON(D):null,T="fulfilled"===x[1].status?x[1].value?.data.colormap:null,j=T?.length?T:null,N="fulfilled"===x[2].status?x[2].value?.data.histograms:null,Z=N?.[0]?.counts?.length?N:null,O="fulfilled"===x[3].status?x[3].value?.data??{}:{},_="fulfilled"===x[4].status?x[4].value?.data.multidimensionalInfo:null,V=_?.variables?.length?_:null;V&&V.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});let q=null;const E="fulfilled"===x[5].status?x[5].value?.data.statistics:null;if(E&&E.length===f.bandCount)q=E.map(e=>({avg:e.mean,count:e.count,max:e.max,median:e.median,min:e.min,mode:e.mode,stddev:e.standardDeviation,sum:e.sum}));else if(f.minValues&&f.minValues.length===f.bandCount){q=[];for(let e=0;e<f.minValues.length;e++)q.push({min:f.minValues[e],max:f.maxValues[e],avg:f.meanValues[e],stddev:f.stdvValues[e]})}const{defaultVariable:J,serviceDataType:G}=f;J&&J!==O.DefaultVariable&&(O.DefaultVariable=J),G?.includes("esriImageServiceDataTypeVector")&&!G.includes(O.DataType)&&(O.DataType=G.replace("esriImageServiceDataType",""));let z=f.noDataValue;f.noDataValues?.length&&f.noDataValues.some(e=>e!==z)&&(z=f.noDataValues);const $=f.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:f.extent.xmin,y:f.extent.ymax,spatialReference:A}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(M,F))/Math.LN2-8)),transposeInfo:f.transposeInfo}):void 0;return new a.A({width:M,height:F,bandCount:f.bandCount,extent:s.A.fromJSON(f.extent),spatialReference:A,pixelSize:new n.A({x:f.pixelSizeX,y:f.pixelSizeY,spatialReference:A}),pixelType:f.pixelType.toLowerCase(),statistics:q,attributeTable:P,colormap:j,histograms:Z,keyProperties:O,noDataValue:z,multidimensionalInfo:V,storageInfo:$})}function m(e,t,i){return c(e,{sourceJSON:t},i)}function d(e,t,i){return c(e,{rasterFunction:t},i)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},87772(e,t,i){i.r(t),i.d(t,{default:()=>gi});var r,s=i(5482),n=i(37838),o=i(69540),a=i(53966),l=i(25728),u=i(74887),p=i(91429),c=i(89808),m=i(99959),d=i(74379);class y extends m.A{get[(r=d.V,c.Q)](){return this.layer}constructor(e){super(),this[r]=!0,this.type="imagery",this.layer=e}get id(){return this.layer.id}}var g=i(4146),h=i(52106),f=i(11254),v=i(49186),w=i(4718),R=i(36708),C=i(84952),b=i(56507),S=i(62788),x=i(5443),I=i(39829),M=i(16930),F=i(21325),A=i(4366),D=i(20758),P=i(34251),T=i(10873),j=i(45617),N=i(25482),Z=i(94778);const O={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var _=i(22796),V=i(67369),q=i(70274),E=i(48940);const J=new Set(["u1","u2","u4","u8","s8","u16","s16"]),G={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},z=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function $(e){return z.has(e.type)}function U(e,t){if(!e||!t)return(0,w.o8)(e||t);const i=(0,w.o8)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),L(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(K(i.functionArguments).Raster=t);return i}function L(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&L(e[i].arguments,t))}function B(e){const t=(0,w.o8)(O[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=B(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=X(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return e.outputPixelType&&t.function&&(t.function.pixelType=e.outputPixelType.toUpperCase()),t}function K(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?K(t.functionArguments):e}const Q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function k(e,t){const i=J.has(t)?(0,Z.hP)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function H(e){if(null==e)return;const{fields:t}=e,i=t?.find(e=>e?.name&&"value"===e.name.toLowerCase());return i?.name}function W(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find(e=>"fill"===e.type)?.material?.color:e.symbol?.color}function X(e){const t=[],i=[];return e.forEach(e=>{t.push(e[0]),i.push((0,V.vL)([...e.slice(1),255]))}),{type:"RasterColormap",values:t,colors:i}}var Y=i(85675),ee=i(13868),te=i(43937);let ie=class extends N.o{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return this.requestRawData||"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new Y.A({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");this.requestRawData||(t=this._addResampleRasterFunction(t));const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=function(e,t){return U(new _.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,s)),this.requestRawData||!r||i||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&$(r)?U(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new _.A;r.functionName="Stretch";const s=Q[q.u.toJSON(e.stretchType)],n="u8",o=e.customStatistics?.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]),a={StretchType:s,Statistics:o,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(a.Min=e.outputMin),null!=e.outputMax&&(a.Max=e.outputMax),s===Q.standardDeviation?(a.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===Q.percentClip?(a.MinPercent=e.minPercent,a.MaxPercent=e.maxPercent,r.outputPixelType=n):s===Q.minMax?r.outputPixelType=n:s===Q.sigmoid&&(a.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=a,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new _.A;if(i)n.functionArguments={ColorRamp:(0,V.hf)(s)};else{const i=(0,V.hs)(s,!0);if(i)n.functionArguments={colorRampName:i};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach(e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm"),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,V.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new _.A({rasterFunctionDefinition:B(n)}):n}return i?new _.A({rasterFunctionDefinition:B(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=H(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach((t,i)=>{const r=t.symbol?.color;let s;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach(o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],r.r,r.g,r.b]))})});const i=a?k(n,a):n,r=new _.A;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:B(r)}):r}e.classBreakInfos.forEach((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)});const c=a?k(n,a):n,m=new _.A;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new _.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new _.A({rasterFunctionDefinition:B(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=H(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach(e=>{const i=e.value,r=W(e);null!=i&&r?.a&&t.set(String(i),r.toRgb())});const r=e.field;r&&n.forEach(({attributes:e})=>{const s=String(e[r]),n=e[o],l=t.get(s);l?i.push([n,...l]):a&&i.push([n,...a])})}}else for(let e=0;e<l.length;e++){const t=l[e],r=W(t),s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?k(i,r):i,p=new _.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:B(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,s=r?k(i,r):i,n=new _.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new _.A({rasterFunctionDefinition:B(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new _.A;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;let o,a;if(2===s?.length){const e=s.map(e=>e.toLowerCase());o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find(e=>"Magnitude"===e.field):new E.A,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:G[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const m=B(i);return t.convertToRFT?_.A.fromJSON({rasterFunctionDefinition:m}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new _.A;const r=new _.A;r.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,V.hf)(e.colorRamp):o.Colormap=(0,V.R8)(e.colorRamp)),i?new _.A({rasterFunctionDefinition:B(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new _.A({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new _.A({rasterFunctionDefinition:B(r)}):r,U(r,e)}};(0,s.Cg)([(0,p.MZ)()],ie.prototype,"layer",void 0),(0,s.Cg)([(0,p.MZ)()],ie.prototype,"requestRawData",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"adjustAspectRatio",null),(0,s.Cg)([(0,te.K)("adjustAspectRatio")],ie.prototype,"writeAdjustAspectRatio",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"bandIds",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"compression",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"compressionQuality",null),(0,s.Cg)([(0,te.K)("compressionQuality")],ie.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"compressionTolerance",null),(0,s.Cg)([(0,te.K)("compressionTolerance")],ie.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"format",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:ee.SZ.read},write:{writer:ee.SZ.write}}})],ie.prototype,"interpolation",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"noData",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:ee.hm.read},write:{writer:ee.hm.write}}})],ie.prototype,"noDataInterpretation",null),(0,s.Cg)([(0,p.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,write:ee.e8.write}})],ie.prototype,"pixelType",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"lercVersion",void 0),(0,s.Cg)([(0,te.K)("lercVersion")],ie.prototype,"writeLercVersion",null),(0,s.Cg)([(0,p.MZ)({type:Number})],ie.prototype,"version",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"mosaicRule",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0,name:"renderingRule"}})],ie.prototype,"rasterFunction",null),ie=(0,s.Cg)([(0,p.$K)("esri.layers.support.ExportImageServiceParameters")],ie);var re=i(20437),se=i(95466),ne=i(33446),oe=i(43577),ae=i(14140),le=i(74797),ue=i(87186),pe=i(12711),ce=i(85676),me=i(94359),de=i(65864),ye=i(17136),ge=i(2272),he=i(86738);let fe=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0}})],fe.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],fe.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],fe.prototype,"objectIds",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],fe.prototype,"where",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],fe.prototype,"maxCount",void 0),fe=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesParameters")],fe);const ve=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"make",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"model",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"focalLength",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"rows",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"cols",void 0),i=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfoMixin")],i),i};let we=class extends(ve(N.o)){constructor(e){super(e),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"uri",write:!0}})],we.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],we.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],we.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],we.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],we.prototype,"perspectiveCenter",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"orientation",void 0),we=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageInspectionInfo")],we);const Re=we;let Ce=class extends N.o{constructor(e){super(e),this.images=null}};var be;(0,s.Cg)([(0,p.MZ)({type:[Re],json:{write:!0}})],Ce.prototype,"images",void 0),Ce=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesResult")],Ce);let Se=be=class extends N.o{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new be((0,w.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,s.Cg)([(0,p.MZ)({type:[String],json:{name:"angleName",write:!0}})],Se.prototype,"angleNames",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Se.prototype,"point",void 0),(0,s.Cg)([(0,p.MZ)({type:M.A,json:{write:!0}})],Se.prototype,"spatialReference",void 0),(0,s.Cg)([(0,p.MZ)({type:b.jz,json:{write:!0}})],Se.prototype,"rasterId",void 0),Se=be=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleParameters")],Se);let xe=class extends N.o{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],xe.prototype,"north",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],xe.prototype,"up",void 0),(0,s.Cg)([(0,p.MZ)({type:M.A,json:{write:!0}})],xe.prototype,"spatialReference",void 0),xe=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleResult")],xe);var Ie=i(86211),Me=i(60408),Fe=i(50498),Ae=i(66552);const De=new Ae.J({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let Pe=class extends N.o{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var Te;(0,s.Cg)([(0,p.MZ)()],Pe.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],Pe.prototype,"measureOperation",void 0),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],Pe.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Pe.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Pe.prototype,"raster",void 0),Pe=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureParameters")],Pe);let je=Te=class extends Pe{constructor(e){super(e),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Te((0,w.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:!0,write:!0}})],je.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],je.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],je.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],je.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.Sk.read,write:Ie.Sk.write}})],je.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.dk.read,write:Ie.dk.write}})],je.prototype,"areaUnit",void 0),je=Te=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaParameters")],je);let Ne=class extends N.o{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ne.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ne.prototype,"sensorName",void 0),Ne=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResult")],Ne);var Ze=i(64108);let Oe=class extends N.o{constructor(e){super(e),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,s.Cg)([(0,p.MZ)({type:String})],Oe.prototype,"unit",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Oe.prototype,"value",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Oe.prototype,"displayValue",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Oe.prototype,"uncertainty",void 0),Oe=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResultValue")],Oe);const _e=Oe;let Ve=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:Ie.dk.read,write:Ie.dk.write}})],Ve.prototype,"unit",void 0),Ve=(0,s.Cg)([(0,Ze.$)("esri.rest.support.ImageMeasureResultAreaValue")],Ve);const qe=Ve;let Ee=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:Ie.Sk.read,write:Ie.Sk.write}})],Ee.prototype,"unit",void 0),Ee=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultLengthValue")],Ee);const Je=Ee;let Ge=class extends Ne{constructor(e){super(e),this.area=null,this.perimeter=null}};(0,s.Cg)([(0,p.MZ)({type:qe,json:{read:!0,write:!0}})],Ge.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],Ge.prototype,"perimeter",void 0),Ge=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaResult")],Ge);let ze=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.outSpatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:M.A,json:{name:"outSR",write:!0}})],ze.prototype,"outSpatialReference",void 0),ze=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryParameters")],ze);var $e=i(36005);let Ue=class extends N.o{constructor(e){super(e),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?I.A.fromJSON(e):x.A.fromJSON(e)}};var Le;(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Ue.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"shape",write:!0}})],Ue.prototype,"geometry",void 0),(0,s.Cg)([(0,$e.w)("geometry")],Ue.prototype,"readGeometry",null),Ue=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryResult")],Ue);let Be=Le=class extends Pe{constructor(e){super(e),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Le((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],Be.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],Be.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],Be.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],Be.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],Be.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.Sk.read,write:Ie.Sk.write}})],Be.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.b$.read,write:Ie.b$.write}})],Be.prototype,"angularUnit",void 0),Be=Le=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceParameters")],Be);let Ke=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:Ie.b$.read,write:Ie.b$.write}})],Ke.prototype,"unit",void 0),Ke=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultAngleValue")],Ke);const Qe=Ke;let ke=class extends Ne{constructor(e){super(e),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],ke.prototype,"distance",void 0),(0,s.Cg)([(0,p.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"azimuthAngle",void 0),(0,s.Cg)([(0,p.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"elevationAngle",void 0),ke=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceResult")],ke);var He=i(58174),We=i(79677),Xe=i(93223);let Ye=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],Ye.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Ye.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ye.prototype,"objectIds",void 0),(0,s.Cg)([(0,Xe.e)(He.x,{ignoreUnknown:!1,name:"spatialRel"})],Ye.prototype,"spatialRelationship",void 0),(0,s.Cg)([(0,p.MZ)({type:We.A,json:{name:"time",write:!0}})],Ye.prototype,"timeExtent",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],Ye.prototype,"where",void 0),Ye=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoParameters")],Ye);let et=class extends(ve(N.o)){constructor(e){super(e),this.id=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],et.prototype,"id",void 0),et=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfo")],et);const tt=et;let it=class extends N.o{constructor(e){super(e),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],it.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],it.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],it.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"gps",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"orientation",void 0),it=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfo")],it);const rt=it;let st=class extends N.o{constructor(e){super(e),this.images=null,this.cameras=null}};var nt;(0,s.Cg)([(0,p.MZ)({type:[rt],json:{write:!0}})],st.prototype,"images",void 0),(0,s.Cg)([(0,p.MZ)({type:[tt],json:{write:!0}})],st.prototype,"cameras",void 0),st=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoResult")],st);let ot=nt=class extends Pe{constructor(e){super(e),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new nt((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0}})],ot.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],ot.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],ot.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],ot.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],ot.prototype,"operationType",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.Sk.read,write:Ie.Sk.write}})],ot.prototype,"linearUnit",void 0),ot=nt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightParameters")],ot);let at=class extends Ne{constructor(e){super(e),this.height=null}};(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],at.prototype,"height",void 0),at=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightResult")],at);var lt,ut=i(22048);let pt=lt=class extends N.o{constructor(e){super(e),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Y.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map(e=>e.rasterFunctionDefinition||e.toJSON())))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new lt((0,w.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{write:!0}})],pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],pt.prototype,"mosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],pt.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:_.A,json:{write:!0,name:"renderingRule"}})],pt.prototype,"rasterFunction",null),(0,s.Cg)([(0,te.K)("rasterFunction")],pt.prototype,"writeRasterFunction",null),(0,s.Cg)([(0,p.MZ)({type:[_.A],json:{write:!0,name:"renderingRules"}})],pt.prototype,"rasterFunctions",void 0),(0,s.Cg)([(0,te.K)("rasterFunctions")],pt.prototype,"writeRasterFunctions",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],pt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,te.K)("pixelSize")],pt.prototype,"writePixelSize",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnCatalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnPixelValues",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],pt.prototype,"maxItemCount",void 0),(0,s.Cg)([(0,p.MZ)({type:We.A,json:{write:{target:"time"}}})],pt.prototype,"timeExtent",void 0),(0,s.Cg)([(0,te.K)("timeExtent")],pt.prototype,"writeTimeExtent",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],pt.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],pt.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"processAsMultidimensional",void 0),pt=lt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyParameters")],pt);var ct=i(22671);let mt=class extends N.o{constructor(e){super(e),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};var dt;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"catalogItemVisibilities",void 0),(0,s.Cg)([(0,p.MZ)({type:ct.A,json:{write:!0}})],mt.prototype,"catalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],mt.prototype,"location",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"objectId",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"processedValues",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"properties",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"value",void 0),mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyResult")],mt);let yt=dt=class extends N.o{constructor(e){super(e),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map(e=>e.toJSON())}}clone(){return new dt({geometries:this.geometries?.map(e=>e.clone())??[],rasterId:this.rasterId})}};(0,s.Cg)([(0,p.MZ)({type:[he.A],json:{write:!0}})],yt.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],yt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:b.jz,json:{write:!0}})],yt.prototype,"rasterId",void 0),yt=dt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationParameters")],yt);let gt=class extends N.o{constructor(e){super(e),this.geometries=null}};var ht;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"geometries",void 0),gt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationResult")],gt);let ft=ht=class extends Pe{constructor(e){super(e),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new ht((0,w.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:de.rS}})],ft.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],ft.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],ft.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],ft.prototype,"is3D",void 0),ft=ht=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointParameters")],ft);let vt=class extends Ne{constructor(e){super(e),this.point=null}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{name:"point.value",read:!0,write:!0}})],vt.prototype,"point",void 0),vt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointResult")],vt);var wt=i(34606),Rt=i(29127);let Ct=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,Me.$B)(e[0]),geometries:e.map(e=>({...e.toJSON(),spatialReference:void 0}))}:null}};(0,s.Cg)([(0,p.MZ)({types:[Fe.yR]})],Ct.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],Ct.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:[b.jz],json:{write:!0}})],Ct.prototype,"rasterIds",void 0),(0,s.Cg)([(0,p.MZ)({type:M.A,json:{name:"outSR",write:!0}})],Ct.prototype,"outSpatialReference",void 0),Ct=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapMultirayParameters")],Ct);let bt=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],bt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],bt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],bt.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({type:M.A,json:{name:"outSR",write:!0}})],bt.prototype,"outSpatialReference",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.DOff",write:!0}})],bt.prototype,"depthOffset",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.Adjust",write:!0}})],bt.prototype,"adjust",void 0),bt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapParameters")],bt);let St=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.referenceUri=null,this.rasterId=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"uri",write:!0}})],St.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],St.prototype,"rasterId",void 0),St=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlParameters")],St);let xt=class extends N.o{constructor(e){super(e),this.url=null}};(0,s.Cg)([(0,p.MZ)({json:{name:"imageURL",write:!0}})],xt.prototype,"url",void 0),xt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlResult")],xt);const It=new Ae.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let Mt=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,i){e?.length&&(t.geometryType=(0,Me.$B)(e[0]),t.geometries=e.map(e=>e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:[Fe.yR]})],Mt.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],Mt.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],Mt.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Mt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Mt.prototype,"constantZ",void 0),(0,s.Cg)([(0,p.MZ)({type:It.apiValues,json:{read:It.read,write:It.write}})],Mt.prototype,"baseType",void 0),Mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeParameters")],Mt);let Ft=class extends N.o{constructor(e){super(e),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"cut",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"fill",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"maxz",write:!0}})],Ft.prototype,"maxZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"minz",write:!0}})],Ft.prototype,"minZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"meanz",write:!0}})],Ft.prototype,"meanZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"cutCellCount",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"fillCellCount",void 0),Ft=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolume")],Ft);const At=Ft;let Dt=class extends N.o{constructor(e){super(e),this.volumes=[]}};(0,s.Cg)([(0,p.MZ)({type:[At],json:{write:!0}})],Dt.prototype,"volumes",void 0),Dt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeResult")],Dt);let Pt=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=JSON.stringify(e))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],Pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Pt.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.VisibleOnly",write:!0}})],Pt.prototype,"visibleOnly",void 0),Pt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MapToImageParameters")],Pt);let Tt=class extends N.o{constructor(e){super(e),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),he.A.fromJSON(e)}};var jt;(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Tt.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],Tt.prototype,"length",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Area",write:!0}})],Tt.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{name:"Center",write:!0}})],Tt.prototype,"center",void 0),(0,s.Cg)([(0,$e.w)("center")],Tt.prototype,"readCenter",null),Tt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureAreaFromImageResult")],Tt);let Nt=jt=class extends N.o{constructor(e){super(e),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,w.o8)({geometry:this.geometry,rasterId:this.rasterId});return new jt(e)}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:de.rS,write:!0}})],Nt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Nt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Nt.prototype,"rasterId",void 0),Nt=jt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureFromImageParameters")],Nt);let Zt=class extends N.o{constructor(e){super(e),this.geometry=null,this.length=null}};function Ot(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function _t(e,t,i){const r=(0,b.PZ)(ut.A,t),s=(0,ge.Dl)(e),n=r.geometry?[r.geometry]:[],o=await(0,ye.el)(n),a=r.toJSON();Ot(a);const l=o?.[0];null!=l&&(a.geometry=Jt(l));const u=(0,ge.lF)({...s.query,f:"json",...a});return(0,ge.jV)(u,i)}async function Vt(e,t,i){const r=(0,b.PZ)(pt,t),s=(0,ge.Dl)(e),n=r.geometry?[r.geometry]:[];return(0,ye.el)(n).then(e=>{const t=r.toJSON(),n=e?.[0];null!=n&&(t.geometry=JSON.stringify(Jt(n)));const o=(0,ge.lF)({...s.query,f:"json",...t}),a=(0,ge.jV)(o,i);return(0,f.A)(s.path+"/identify",a)}).then(e=>mt.fromJSON(e.data))}async function qt(e,t,i,r){const s=(0,ge.Dl)(e),n=await(0,ye.el)(i),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(Jt(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(Jt(n[1])));const a=(0,ge.lF)({...s.query,f:"json",...o}),l=(0,ge.jV)(a,r),{data:u}=await(0,f.A)(s.path+"/measure",l);return u}async function Et(e,t,i){t=(0,b.PZ)(Nt,t);const r=(0,ge.Dl)(e),s=t.toJSON(),n=(0,ge.lF)({...r.query,f:"json",...s}),o=(0,ge.jV)(n,i),{data:a}=await(0,f.A)(r.path+"/measureFromImage",o);return a}function Jt(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=Gt(e.spatialReference)),t}function Gt(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function zt(e,t){if(!e.imageCoordinateSystem)return(0,F.YX)(e);const i=Gt(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Zt.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],Zt.prototype,"length",void 0),Zt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureLengthFromImageResult")],Zt);var $t=i(82371),Ut=i(20223),Lt=i(20615),Bt=i(74910),Kt=i(78286),Qt=i(99199),kt=i(61956);const Ht=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Wt=(0,b.Qp)(b.GB,{min:0,max:255}),Xt=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new ie({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach(t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)}),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every(e=>"number"==typeof e))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?(0,S.F_)(()=>Y.A.fromJSON(t)):null}get fieldsIndex(){return this.fields?new se.A(this.fields):null}set format(e){e&&Ht.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Y.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?Y.A.fromJSON(i):this._isMosaicRuleSupported(t)?Y.A.fromJSON(t):null}writeMosaicRule(e,t,i){const{mosaicRule:r}=this;this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=Wt(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=i?.name}return e}get parsedUrl(){return(0,C.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,me.LF)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),$(s)||a.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON()}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push((0,le.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,le.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push((0,le.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push((0,le.nq)(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=(0,le.DV)(i),s=(0,le.y6)();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=(0,le.AL)(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=(0,le.jC)(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?_.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):_.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?M.A.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=ee.e8.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e,{renderer:r,symbolizer:s,pixelFilter:n}=this;const{isRawData:o}=e;if(o&&"lerc"!==this.format&&(r??=(0,pe.PD)(this.rasterInfo,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}),s||(this.symbolizer=new ce.A({rendererJSON:r.toJSON(),rasterInfo:this.rasterInfo}),s=this.symbolizer)),(o||!this._isPicture())&&r&&s&&!n){await this._updateSymbolizer(s,r);const{bandIds:n}=this;i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new v.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,w.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,i){const r=(0,b.PZ)(Mt,t).toJSON();r.geometries=JSON.stringify(r.geometries);const s=(0,ge.Dl)(e),n=(0,ge.lF)({...s.query,f:"json",...r}),o=(0,ge.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/calculateVolume`,o);return Dt.fromJSON({volumes:a.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new v.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(Se,t),s=r.toJSON();null!=s.angleName&&(s.angleName=s.angleName.join(",")),r?.point?.spatialReference?.imageCoordinateSystem&&(s.point.spatialReference=Gt(r.point.spatialReference)),r?.spatialReference?.imageCoordinateSystem&&(s.spatialReference=zt(r.spatialReference));const n=(0,ge.Dl)(e),o=(0,ge.lF)({...n.query,f:"json",...s}),a=(0,ge.jV)(o,i),{data:l}=await(0,f.A)(`${n.path}/computeAngles`,a);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new M.A({wkid:0,imageCoordinateSystem:l.spatialReference}):M.A.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new xe(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new v.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(yt,t),s=r.toJSON(),{geometries:n}=r;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(s.geometries.geometries[e].spatialReference=Gt(n[e].spatialReference));const o=(0,ge.Dl)(e),a=(0,ge.lF)({...o.query,f:"json",...s}),l=(0,ge.jV)(a,i),{data:u}=await(0,f.A)(`${o.path}/computePixelLocation`,l);return gt.fromJSON(u)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new v.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await _t(e,t,i),s=(0,ge.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new v.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await _t(e,t,i),s=(0,ge.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeStatisticsHistograms`,r),{statistics:o}=n;return o?.length&&o.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new v.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(ot,t),s=await qt(e,r,[r.fromGeometry,r.toGeometry],i);return at.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new v.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(je,t),s=await qt(e,r,[r.geometry],i);return Ge.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new v.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(Be,t),s=await qt(e,r,[r.fromGeometry,r.toGeometry],i);return ke.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new v.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(ft,t),s=await qt(e,r,[r.geometry],i);return vt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new v.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new v.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,i){const r=(0,b.PZ)(Nt,t),s=await Et(e,r,i);return Zt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new v.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new v.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,i){const r=(0,b.PZ)(Nt,t),s=await Et(e,r,i);return Tt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async internalFetchImage(e,t,i,s={}){await this._updateCurrentRasterInfo();const{exportImageServiceParameters:n}=this;let o=!1;s.requestRawData&&(await this._initJobHandler(),n.requestRawData||"lerc"===this.format||(o=!0,n.requestRawData=!0));const a=this.getExportImageServiceParameters(e,t,i,s.timeExtent);if(o&&(n.requestRawData=!1),null==a){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,s.returnImageBitmap?{imageBitmap:await(0,ne.m)(e,`${r(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*i,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ae.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ae.A({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const l=!!s.requestAsImageElement&&!this.pixelFilter,u=l&&!!s.returnImageBitmap,p={imageServiceParameters:a,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:l,returnImageBitmap:u,signal:s.signal};return this._requestArrayBuffer(p)}async fetchPixels(e,t,i,r={}){await this._initJobHandler(),r.applyRendering&&this._updateCurrentRasterInfo();const s=r.applyRendering?void 0:new ie({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,r.bandIds||delete n.bandIds,delete n.compressionQuality;const o={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:a}=await this._requestArrayBuffer(o);return a??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return(0,f.A)(r(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new v.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.A)(r(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>ct.A.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ge.Dl)(e),s=(0,ge.lF)({...r?.query,f:"json"}),n=(0,ge.jV)(s,i),o=`${r?.path}/${t}/info`,a=(0,f.A)(`${o}`,n),l=(0,f.A)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let m=null;p.statistics?.length&&(m=p.statistics.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]})));const d=x.A.fromJSON(p.extent),y=Math.ceil(d.width/p.pixelSizeX-.1),g=Math.ceil(d.height/p.pixelSizeY-.1),h=d.spatialReference,v=new he.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:h}),w=p.histograms?.length?p.histograms:null,R=new Ut.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new ue.A({width:y,height:g,bandCount:p.bandCount,extent:d,spatialReference:h,pixelSize:v,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:w,keyProperties:c,storageInfo:R})}(r(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,f.A)(r(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=i?.ics;if(!s)return;let n=null;try{n=(await(0,f.A)(r(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.A)(r(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,F.YX)(a),outSR:"0:"+e},u=(0,f.A)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const y={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,F.YX)(a),outSR:"0:"+e},g=(0,f.A)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(y),...t}).then(e=>e.data).catch(()=>({})),h=await Promise.all([o,u,g]);let v=h[0].ipxf;if(null==v){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(v={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const w=x.A.fromJSON(h[1]?.geometries?.[0]);w&&(w.spatialReference=new M.A({wkid:0,imageCoordinateSystem:s}));const R=h[2].geometries?h[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],C=R.length;if(C<3)return{ics:s,icsToPixelTransform:v,icsExtent:w,northDirection:null};let b=0,S=0,I=0,A=0;for(let e=0;e<C;e++)b+=R[e].x,S+=R[e].y,I+=R[e].x*R[e].x,A+=R[e].x*R[e].y;const D=(C*A-b*S)/(C*I-b*b);let P=0;const T=R[4].x>R[0].x,j=R[4].y>R[0].y;return D===1/0?P=j?90:270:0===D?P=T?0:180:D>0?P=T?180*Math.atan(D)/Math.PI:180*Math.atan(D)/Math.PI+180:D<0&&(P=j?180+180*Math.atan(D)/Math.PI:360+180*Math.atan(D)/Math.PI),{ics:s,icsToPixelTransform:v,icsExtent:w,northDirection:P}}async generateRasterInfo(e,t){const i=(0,b.PZ)(_.A,e),s={...t,query:this._getQueryParams()};if(!i||"none"===i.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(i))return this.serviceRasterInfo??(0,$t.Tw)(r(this.parsedUrl),this.sourceJSON,s);const n=function(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map(e=>i?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}(i);if(!n)throw new v.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[n])return this._functionRasterInfos[n];const o=(0,$t.X6)(r(this.parsedUrl),i,s);this._functionRasterInfos[n]=o;try{return await o}catch(e){throw this._functionRasterInfos[n]=null,e}}getExportImageServiceParameters(e,t,i,s,n){const o=zt((e=e.clone().shiftCentralMeridian()).spatialReference,r(this.parsedUrl));n??=this.exportImageServiceParameters;const a=n.toJSON(),{bandIds:l,noData:u}=a;let{renderingRule:p}=a;const c=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,d=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(l?.length&&this._hasRasterFunction(this.rasterFunction)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;a.bandIds=void 0}else a.bandIds=l?.join(",");Array.isArray(u)&&u.length>0&&(a.noData=u.join(","));const y=this._processMultidimensionalIntersection(null,s,n.mosaicRule);if(y.isOutSide)return null;a.mosaicRule=null!=y.mosaicRule?JSON.stringify(y.mosaicRule):null,s=y.timeExtent,a.renderingRule=this._getRenderingRuleString(_.A.fromJSON(p));const g={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?g.time=""+e:null==e&&null==t||(g.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:o,imageSR:o,size:t+","+i,...a,...g}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new v.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,w.o8)(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=(0,b.PZ)(wt.A,t),s=r.toJSON();Ot(s),s.outFields?.length&&(s.outFields=s.outFields.join(","));const n=await(0,ye.el)(r.geometry),o=n?.[0];null!=o&&(s.geometry=Jt(o));const a=(0,ge.Dl)(e),l=(0,ge.lF)({...a.query,f:"json",...s}),u=(0,ge.jV)(l,i),{data:p}=await(0,f.A)(`${a.path}/getSamples`,u),c=p.samples.map(e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map(e=>Number(e));return{...e,pixelValue:t}});return Rt.A.fromJSON({samples:c})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new v.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,w.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=I.A.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new v.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),Vt(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new v.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(bt,t),s=r.toJSON();r.geometry.spatialReference.imageCoordinateSystem&&(s.geometry=Jt(r.geometry)),r.depthOffset&&r.adjust||delete s.options;const n=(0,ge.Dl)(e),o=(0,ge.lF)({...n.query,f:"json",...s}),a=(0,ge.jV)(o,i),{data:l}=await(0,f.A)(`${n.path}/imageToMap`,a);return(0,de.rS)(l)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new v.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(Ct,t),s=r.toJSON();r.rasterIds?.length&&(s.rasterIds=r.rasterIds.join(","));const n=(0,ge.Dl)(e),o=(0,ge.lF)({...n.query,f:"json",...s}),a=(0,ge.jV)(o,i),{data:l}=await(0,f.A)(`${n.path}/imageToMapMultiray`,a);return(0,de.rS)(l)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new v.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(Pt,t),s=r.toJSON(),n=await(0,ye.el)(r.geometry),o=n?.[0];null!=o&&(s.geometry=Jt(o)),r.visibleOnly||delete s.options;const a=o?.spatialReference??r.geometry?.spatialReference;a&&(s.inSR=zt(a));const l=(0,ge.Dl)(e),u=(0,ge.lF)({...l.query,f:"json",...s}),p=(0,ge.jV)(u,i),{data:c}=await(0,f.A)(`${l.path}/mapToImage`,p);return(0,de.rS)(c)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new v.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(fe,t),s=r.toJSON(),n=await(0,ye.el)([r.fromGeometry,r.toGeometry]);null!=n[0]&&(s.fromGeometry=Jt(n[0]),n[0].spatialReference&&(s.inSR=zt(n[0].spatialReference))),null!=n[1]&&(s.toGeometry=Jt(n[1])),r.objectIds?.length&&(s.objectIds=s.objectIds.join(","));const o=(0,ge.Dl)(e),a=(0,ge.lF)({...o.query,f:"json",...s}),l=(0,ge.jV)(a,i),{data:u}=await(0,f.A)(`${o.path}/find`,l);return Ce.fromJSON(u)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new v.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(St,t).toJSON(),s=(0,ge.Dl)(e),n=(0,ge.lF)({...s.query,f:"json",...r}),o=(0,ge.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/getImageUrl`,o);return xt.fromJSON(a)}(r(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new kt.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new v.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,i){const r=(0,b.PZ)(ze,t),s=(0,ge.Dl)(e),n=r.toJSON();r.outSpatialReference&&(n.outSR=zt(r.outSpatialReference));const o=(0,ge.lF)({...s.query,f:"json",...n}),a=(0,ge.jV)(o,i),{data:l}=await(0,f.A)(s.path+"/queryBoundary",a);return Ue.fromJSON(l)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async queryExtent(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Bt.L)(this.url,e,t)}async queryRasters(e,t){({query:e,requestOptions:t}=await this._prepareForQuery(e,t));const i=await(0,Qt.s)(this.url,e,t),r=this.graphicOrigin;return i.features.forEach(e=>{e.layer=this,e.origin=r}),i}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Kt.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new v.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,i){const r=(0,b.PZ)(Ye,t),s=r.toJSON();Ot(s),s.objectIds?.length&&(s.objectIds=s.objectIds.join(",")),s.geometry||s.objectIds||s.time||s.where||(s.where="1=1");const n=await(0,ye.el)(r.geometry),o=n?.[0];null!=o&&(s.geometry=Jt(o));const a=o?.spatialReference??r.geometry?.spatialReference;a&&(s.inSR=zt(a));const l=(0,ge.Dl)(e),u=(0,ge.lF)({...l.query,f:"json",...s}),p=(0,ge.jV)(u,i),{data:c}=await(0,f.A)(`${l.path}/queryGPSInfo`,p);return st.fromJSON(c)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Lt.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new v.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,a=null,l=null;const u=le.F_.servicePixelValue.toLowerCase(),p=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some(e=>!e.toLowerCase().startsWith(u)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(u)&&e.length>u.length).map(e=>{const t=e.slice(u.length+1);return[this._updateRenderingRulesFunctionName(t,p),t]});a=t.map(e=>new _.A({functionName:e[0]})),l=t.map(e=>e[1]);const{rasterFunction:i}=this;0===a.length?i?.functionName?(a.push(i),l.push(i.functionName)):a=null:i?.functionName&&!a.some(e=>e.functionName===i.functionName)&&(a.push(i),l.push(i.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let d=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:i}=(0,A.Rp)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new v.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(d=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=I.A.fromExtent(g));const h=this._getQueryParams({geometry:g,timeExtent:d,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:a,pixelSize:i,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:s?1:null});delete h.f;const f=new pt(h);try{await this._generateRasterInfo(this.rasterFunction);const i=await Vt(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,a=null!=i.value&&i.value.toLowerCase().includes("nodata"),u=o&&!c&&i?.catalogItems?.features.length&&(n||!a),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?(0,A.XU)({rasterInfo:this.rasterInfo,multidimensionalDefinition:y?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!u)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p});const m=this.objectIdField||"ObjectId",g=i.catalogItems?.features??[],h=g.map(e=>e.attributes?.[m]),v=new kt.A({objectIds:h,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[m]}),w=await this.queryRasters(v);return w?.features?.length&&w.features.forEach(t=>{g.forEach(i=>{i.attributes[m]===t.attributes[m]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new v.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const i=(0,f.A)(r(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=(0,f.A)(r(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([i,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,A.z2)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,$t.Tw)(r(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,$t.E9)(e,t),e)),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([i,s,n]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),a.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.wB)(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach(e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!c){const t=e.multidimensionalDefinition.filter(e=>null!=e.variableName&&null==e.dimensionName);t.length?t.forEach(e=>{e.dimensionName=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new j.A({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(e=>!(!e.variableName&&!e.dimensionName)),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new v.A("imagery-layer:query-rasters","query operation is not supported on the input image service");const i=null!=e?(0,b.PZ)(kt.A,e):this.createQuery();return t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:i,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,pe.fp)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:i,ssl:s}=await(0,f.A)(r(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new v.A("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=(0,pe.I8)({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){const e=r?.bandIds??(0,pe.ci)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??(0,pe.PD)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=(0,pe.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new ce.A({rendererJSON:s,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):(0,D.D)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const i=await(0,f.A)(r(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:s,signal:n}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${r(this.parsedUrl)}/exportImage`,{data:o}=await(0,f.A)(i,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,ne.m)(o,i,n),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),a=(0,f.A)(r(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),l=(await Promise.all([a,o]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,D.g)(l)),!p)throw new v.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:n},m="gif"===u||"bmp"===u||u.includes("png")&&("png"===p||"jpg"===p)?(0,D.D)(l,{useCanvas:!0,...t},c):this._decodePixelBlock(l,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:u},c);return{pixelData:{pixelBlock:await m,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch(()=>null)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,A.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Y.A;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach(e=>e.variableName=""),t=t.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!l&&(!c||s)){const e={};e[p]=0,u=[i],l=[new h.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,le.eS)(this.rasterFields,e,t.effectiveMultidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:y}=le.F_,g=this.rasterFields.some(e=>e.name===d),f=this.graphicOrigin;for(let e=0;e<l.length;e++){const t=l[e];if(null!=i){const n=u[e],o=this.rasterFunction&&a&&a.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?a[r.indexOf(this.rasterFunction.functionName)]:i;if("nodata"===n.toLowerCase()&&!s)continue;g&&(t.attributes[d]=n),t.attributes[y]=o,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:i:o;this.rasterFunction||(p=l?n:i),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,t.origin=f,n&&this._updateFeatureWithDomainValues(t),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const i=`${le.F_.servicePixelValue}.${r[e]}`;t.attributes[i]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,A.Rp)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,A.Rp)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const o=r.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));o&&o[0]&&s.forEach(t=>{const i=le.ER+t.name;e.attributes[i]=o[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map(e=>parseFloat(e)),r=i.map(e=>[e]),s=i.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new ae.A({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new x.A(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,P.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[le.F_.magnitude]=o[0],e.attributes[le.F_.direction]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>"coded-value"===e.domain?.type);null!=t&&t.forEach(t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find(e=>e.code===i);r&&(e.attributes[t.name]=r.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach(e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:i,maxRecordCount:r}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,o=!(!e.spatialReference&&!e.extent?.spatialReference),a=t.includes("edit"),l=t.includes("mensuration")&&o,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),c=this._isMosaicDataset(e)&&t.includes("catalog"),m=t.includes("download"),d=i>=10.7&&n||i>=11.4&&(n||l&&u.includes("3d")),y=c&&e.fields&&e.fields.length>0,g=y&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:i>=11.2&&c,supportsImageToMapMultiray:i>=11.2&&c,supportsMapToImage:i>=11.2&&c,supportsFindImages:i>=11.2&&c,supportsGetImageUrl:i>=11.3&&m,supportsMeasure:l,supportsMeasureFromImage:i>=11.2,supportsDownload:m,supportsQuery:y,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:d,supportsComputePixelLocation:i>=10.7&&c,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&c,supportsAdd:a,supportsDelete:a,supportsEditing:a,supportsUpdate:a,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:r,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,supportsStatistics:!!g?.supportsStatistics,supportsOrderBy:!!g?.supportsOrderBy,supportsDistinct:!!g?.supportsDistinct,supportsPagination:!!g?.supportsPagination,supportsPaginationOnAggregatedQueries:!!g?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!g?.useStandardizedQueries,supportsPercentileStatistics:!!g?.supportsPercentileStatistics,supportsCentroid:!!g?.supportsReturningGeometryCentroid,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!!g?.supportsQueryWithDistance,supportsExtent:!!g?.supportsReturningQueryExtent,supportsGeometryProperties:!!g?.supportsReturningGeometryProperties,supportsHavingClause:!!g?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:g?.supportsSqlExpression??!!g,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!g?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function r(e){return e?.path??""}return(0,s.Cg)([(0,p.MZ)({clonable:!1})],i.prototype,"_functionRasterInfos",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"_serviceSupportsMosaicRule",void 0),(0,s.Cg)([(0,$e.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],i.prototype,"readServiceSupportsMosaicRule",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"_rasterFunctionNamesIndex",null),(0,s.Cg)([(0,p.MZ)()],i.prototype,"adjustAspectRatio",void 0),(0,s.Cg)([(0,p.MZ)({type:[b.jz],json:{write:!0}})],i.prototype,"bandIds",void 0),(0,s.Cg)([(0,$e.w)("bandIds")],i.prototype,"readBandIds",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],i.prototype,"capabilities",void 0),(0,s.Cg)([(0,$e.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],i.prototype,"readCapabilities",null),(0,s.Cg)([(0,p.MZ)({type:Number})],i.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,te.K)("compressionQuality")],i.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({type:Number})],i.prototype,"compressionTolerance",void 0),(0,s.Cg)([(0,te.K)("compressionTolerance")],i.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"defaultMosaicRule",void 0),(0,s.Cg)([(0,$e.w)("defaultMosaicRule",["defaultMosaicMethod"])],i.prototype,"readDefaultMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],i.prototype,"definitionExpression",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,constructOnly:!0})],i.prototype,"exportImageServiceParameters",void 0),(0,s.Cg)([(0,p.MZ)()],i.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:[re.A]})],i.prototype,"fields",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"fieldsIndex",null),(0,s.Cg)([(0,p.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],i.prototype,"format",null),(0,s.Cg)([(0,$e.w)("service","format",["serviceDataType"])],i.prototype,"readFormat",null),(0,s.Cg)([(0,p.MZ)({type:x.A})],i.prototype,"fullExtent",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"hasMultidimensions",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageHeight"}}})],i.prototype,"imageMaxHeight",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageWidth"}}})],i.prototype,"imageMaxWidth",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:ee.SZ.jsonValues,read:ee.SZ.read,write:ee.SZ.write}})],i.prototype,"interpolation",void 0),(0,s.Cg)([(0,p.MZ)()],i.prototype,"minScale",void 0),(0,s.Cg)([(0,$e.w)("service","minScale")],i.prototype,"readMinScale",null),(0,s.Cg)([(0,p.MZ)()],i.prototype,"maxScale",void 0),(0,s.Cg)([(0,$e.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,s.Cg)([(0,p.MZ)({type:Y.A})],i.prototype,"mosaicRule",null),(0,s.Cg)([(0,$e.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],i.prototype,"readMosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],i.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)()],i.prototype,"multidimensionalInfo",void 0),(0,s.Cg)([(0,p.MZ)({type:oe.A,json:{write:!0}})],i.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,p.MZ)({json:{type:b.jz}})],i.prototype,"noData",void 0),(0,s.Cg)([(0,te.K)("noData")],i.prototype,"writeNoData",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:ee.hm.jsonValues,read:ee.hm.read,write:ee.hm.write}})],i.prototype,"noDataInterpretation",void 0),(0,s.Cg)([(0,p.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],i.prototype,"objectIdField",void 0),(0,s.Cg)([(0,$e.w)("objectIdField")],i.prototype,"readObjectIdField",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"geometryType",void 0),(0,s.Cg)([(0,p.MZ)({})],i.prototype,"typeIdField",void 0),(0,s.Cg)([(0,p.MZ)({})],i.prototype,"types",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"parsedUrl",null),(0,s.Cg)([(0,p.MZ)({type:Function})],i.prototype,"pixelFilter",void 0),(0,s.Cg)([(0,p.MZ)()],i.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"sourceType",void 0),(0,s.Cg)([(0,$e.w)("sourceType",["serviceSourceType","fields"])],i.prototype,"readSourceType",null),(0,s.Cg)([(0,p.MZ)()],i.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({types:me.uy})],i.prototype,"renderer",null),(0,s.Cg)([(0,p.MZ)({types:me.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:me.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],i.prototype,"internalRenderer",null),(0,s.Cg)([(0,$e.w)("internalRenderer")],i.prototype,"readRenderer",null),(0,s.Cg)([(0,te.K)("internalRenderer")],i.prototype,"writeRenderer",null),(0,s.Cg)([(0,p.MZ)({clonable:!1})],i.prototype,"symbolizer",void 0),(0,s.Cg)([(0,p.MZ)(T.ke)],i.prototype,"opacity",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"rasterFields",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0})],i.prototype,"rasterFunctionInfos",void 0),(0,s.Cg)([(0,p.MZ)({type:_.A,json:{name:"renderingRule"}})],i.prototype,"rasterFunction",null),(0,s.Cg)([(0,$e.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],i.prototype,"readRasterFunction",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"serviceDataType",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:M.A})],i.prototype,"spatialReference",void 0),(0,s.Cg)([(0,$e.w)("spatialReference",["spatialReference","extent"])],i.prototype,"readSpatialReference",null),(0,s.Cg)([(0,p.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,type:ee.e8.jsonValues}})],i.prototype,"pixelType",void 0),(0,s.Cg)([(0,te.K)("pixelType")],i.prototype,"writePixelType",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0,type:ue.A})],i.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,p.MZ)()],i.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,p.MZ)(T.OZ)],i.prototype,"url",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"version",void 0),(0,s.Cg)([(0,$e.w)("version",["currentVersion","fields","timeInfo"])],i.prototype,"readVersion",null),i=(0,s.Cg)([(0,p.$K)("esri.layers.mixins.ArcGISImageService")],i),i};var Yt=i(18768),ei=i(63074),ti=i(69208),ii=i(16131),ri=i(8303),si=i(72545),ni=i(56551),oi=i(54310),ai=i(25036),li=i(82935),ui=i(91908),pi=i(24212),ci=i(30291),mi=i(88625),di=i(59923);let yi=class extends((0,ei.dM)((0,li.e)((0,ai.j)((0,ii.q)((0,ri.A)((0,ni.H)(Xt((0,si.G)((0,oi.J)((0,ti.d)((0,Yt.b)((0,l.M)((0,o.OU)(g.A)))))))))))))){constructor(...e){super(...e),this.graphicOrigin=new y(this),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.type="imagery",this._debouncedSaveOperations=(0,u.sg)(async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case 0:return s(this,t);case 1:return n(this,r,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(u.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,i=new Set,r=le.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=le.Oo.toLowerCase(),o=`${le.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===r||t.startsWith(o)||s&&t.startsWith(n)||i.add(e.name)}const a=(0,ci.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:l}=this;return a?.fieldInfos&&l&&(0,le.h4)(a.fieldInfos,l),a}queryFeatures(e,t){return this.queryRasters(e,t).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return(0,ui.D)(this,e)}write(e,t){return this._isPreviewLayer?((0,di.U4)(t,this,"preview layer cannot be saved"),null):super.write(e,t)}_validateElevationInfo(e){(0,pi.XF)(a.A.getLogger(this),(0,pi.$7)("Imagery layers","relative-to-scene",e)),(0,pi.XF)(a.A.getLogger(this),(0,pi.tW)("Imagery layers",e))}};(0,s.Cg)([(0,p.MZ)({type:mi.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],yi.prototype,"elevationInfo",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,clonable:!1})],yi.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,p.MZ)(T.fV)],yi.prototype,"legendEnabled",null),(0,s.Cg)([(0,p.MZ)({type:["show","hide"]})],yi.prototype,"listMode",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],yi.prototype,"isReference",void 0),(0,s.Cg)([(0,p.MZ)({type:["ArcGISImageServiceLayer"]})],yi.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,p.MZ)(T.M6)],yi.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,p.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],yi.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],yi.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,p.MZ)(T.PY)],yi.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],yi.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],yi.prototype,"_isPreviewLayer",null),yi=(0,s.Cg)([(0,p.$K)("esri.layers.ImageryLayer")],yi);const gi=yi},91908(e,t,i){i.d(t,{D:()=>n});var r=i(60694);const s=[];function n(e,t){if((0,r.Wo)(e.url??""))return!0;const{wkid:i}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},99199(e,t,i){i.d(t,{e:()=>l,s:()=>a});var r=i(2272),s=i(80893),n=i(22671),o=i(61956);async function a(e,t,i,r){const s=await l(e,t,i,r);return n.A.fromJSON(s)}function l(e,t,i,n){const a=(0,r.Dl)(e),l={...i},u=o.A.from(t);return(0,s.eW)(a,u,u.sourceSpatialReference,l,n)}}}]);
|